From nobody Mon Sep 15 00:14:22 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cQ5Bl1vpVz67jBD; Mon, 15 Sep 2025 00:14:55 +0000 (UTC) (envelope-from dbaio@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cQ5Bl0kYHz3bDC; Mon, 15 Sep 2025 00:14:55 +0000 (UTC) (envelope-from dbaio@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1757895295; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=uC7YIZaIQoZh3b6e88J7RzaKpDeDLlK1rBXgayS8Aac=; b=HvrpTzAJVlTRlNTsE6SycwF8cLOIa8d3KQF0HkVhEWInv2yyjvN7ATCpp2lh+NNZDdIIq4 amh0backPEt71tyCBqXgOVucuBG0+QXXYvTL9KIzf/gK4VAP2y6vV0dvp54BRHqSfxw5Iv 3jH9orHr4BIISFGdeIjYGFhx8gu7wqKnv9xWmt/R8BKcVb6yhKpqVGmiTpSCANv31O5HmR l5vpF9UlVET3/fSiQB/Q4plPTP8thsMfpvf6gs6QbaUWocVTe9L0Tqpt3UuZ7fLH3Xk6oW lo7obU7rv9OlqoJfQ1soQIQuRFnqNW5xwuyfMOrmjdx3KTEgoSoLsdyF382WhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1757895295; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=uC7YIZaIQoZh3b6e88J7RzaKpDeDLlK1rBXgayS8Aac=; b=LPiOHA/416g81/3vNsDEG34gxomuxDayiG5FA+ljfhObJgTvjKE+kzj+PIKPE/nWZlp1t0 xLpT1yvGpg8PNTo7Aljd5APLHVOwvjLxy+APGwh0GYRl7a7j57gt9uV6EDk+d0wvvTAzdU xbU0NgnY5eRfQG2fVKj2Jbh8bXlsHZpxfsvkVdEAfeX/HpqvirB2oiC0S1a9xdOcAUb6ns +s98W2s8t3dAk4O9XvivYSbADYJtPJGUsh5Qqr26QyB1vA3J7ndYhePw1OCyocw39gQcZ3 IzDeTWXWaMZyiyOzZLCj3ZLDIH223xsPj1h742VvUF5FZTBp4QU5lQ0i72DXeA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1757895295; a=rsa-sha256; cv=none; b=osxYJvplH/mS1ckoDMUzpxsDrtWUwvNdBARwDSo0697b+g5MW95Rxp/oCu2j9OSSUaPfJI 1QBWdpfSU9Y8s8JTRbXNsC0D7hXIjuGIkR6/fusC1D5cBDdVoz2zSRvm7KunlL6JHqfTd6 FDa/AFk4pXre/GRc/rMhLqirjlKIpAKyckowifdzlgwnDj+62n+XTafrEJ0jKHSus3/oBm PRzig/WGxXGErJJ0hGP8nHP9UEBSoxUC0B/yxdFc0ZA+TnglRxt6svrdUMPxJfaF2pKAgU cQFMQpLNWHKbCmSBJ79gBzXHU2g6y7NUtPi8Fcbwdrhb2T3aobaSNIg4QfF9Pg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from fauth-a2-smtp.messagingengine.com (fauth-a2-smtp.messagingengine.com [103.168.172.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: dbaio/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4cQ5Bk6z96zpcc; Mon, 15 Sep 2025 00:14:54 +0000 (UTC) (envelope-from dbaio@freebsd.org) Received: from phl-compute-02.internal (phl-compute-02.internal [10.202.2.42]) by mailfauth.phl.internal (Postfix) with ESMTP id A78F2F40068; Sun, 14 Sep 2025 20:14:54 -0400 (EDT) Received: from phl-imap-15 ([10.202.2.104]) by phl-compute-02.internal (MEProxy); Sun, 14 Sep 2025 20:14:54 -0400 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdeggdefiedvvdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpuffrtefokffrpgfnqfghnecuuegr ihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjug hrpefoggffhffvkfgjfhfutgfgsehtjeertdertddtnecuhfhrohhmpedfffgrnhhilhho ucfirdcuuegrihhofdcuoegusggrihhosefhrhgvvgeuufffrdhorhhgqeenucggtffrrg htthgvrhhnpeehveefgeeihfekueeikeffvdehgedvuefhleeftdeggfdtvdeileffgfeg veehheenucffohhmrghinhepfhhrvggvsghsugdrohhrghenucevlhhushhtvghrufhiii gvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegusggrihhoodhmvghsmhhtphgruhht hhhpvghrshhonhgrlhhithihqdduudekudefleduvddtqddvieektddvjeeikedquggsrg hioheppehfrhgvvggsshgurdhorhhgsehfrghsthhmrghilhdrtghomhdpnhgspghrtghp thhtohepgedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepuggvvhdqtghomhhmih htshdqshhrtgdqrghllhesfhhrvggvsghsugdrohhrghdprhgtphhtthhopeguvghvqdgt ohhmmhhithhsqdhsrhgtqdhmrghinhesfhhrvggvsghsugdrohhrghdprhgtphhtthhope hkvghvrghnshesfhhrvggvsghsugdrohhrghdprhgtphhtthhopehsrhgtqdgtohhmmhhi thhtvghrshesfhhrvggvsghsugdrohhrgh X-ME-Proxy: Feedback-ID: i9d2946a4:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id 776FD78026F; Sun, 14 Sep 2025 20:14:54 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 X-ThreadId: Am1ynKg1lObs Date: Sun, 14 Sep 2025 21:14:22 -0300 From: "Danilo G. Baio" To: "Kyle Evans" , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Message-Id: <54e7f090-c031-47f2-bc51-c020a77ab00a@app.fastmail.com> In-Reply-To: <202507260314.56Q3E5cY002869@gitrepo.freebsd.org> References: <202507260314.56Q3E5cY002869@gitrepo.freebsd.org> Subject: Re: git: dbaaadd4373a - main - jls: minor simplification to arg handling Content-Type: text/plain Content-Transfer-Encoding: 7bit On Sat, Jul 26, 2025, at 00:14, Kyle Evans wrote: > The branch main has been updated by kevans: > > URL: > https://cgit.FreeBSD.org/src/commit/?id=dbaaadd4373a725950ad11e578dab61537b7c4f2 > > commit dbaaadd4373a725950ad11e578dab61537b7c4f2 > Author: Kyle Evans > AuthorDate: 2025-07-26 03:13:41 +0000 > Commit: Kyle Evans > CommitDate: 2025-07-26 03:13:41 +0000 > > jls: minor simplification to arg handling > > It's easier to reason about the state of argc/argv if we just augment > them by optind after our getopt() loop. > > No functional change, but this sets the stage for another change to add > a `-c` mode to (c)heck for the existence of a jail quietly without > the caller having to worry about spurious output. > > Reviewed by: jamie > Differential Revision: https://reviews.freebsd.org/D51540 > --- > usr.sbin/jls/jls.c | 10 ++++++---- > 1 file changed, 6 insertions(+), 4 deletions(-) > > diff --git a/usr.sbin/jls/jls.c b/usr.sbin/jls/jls.c > index bd193a69c458..a1d1716713aa 100644 > --- a/usr.sbin/jls/jls.c > +++ b/usr.sbin/jls/jls.c > @@ -140,8 +140,11 @@ main(int argc, char **argv) > ip4_ok = feature_present("inet"); > #endif > > + argc -= optind; > + argv += optind; > + > /* Add the parameters to print. */ > - if (optind == argc) { > + if (argc == 0) { > if (pflags & (PRINT_HEADER | PRINT_NAMEVAL)) > add_param("all", NULL, (size_t)0, NULL, JP_USER); > else if (pflags & PRINT_VERBOSE) { > @@ -179,9 +182,8 @@ main(int argc, char **argv) > } > } else { > pflags &= ~PRINT_VERBOSE; > - while (optind < argc) > - add_param(argv[optind++], NULL, (size_t)0, NULL, > - JP_USER); > + for (i = 0; i < argc; i++) > + add_param(argv[i], NULL, (size_t)0, NULL, JP_USER); > } > > if (pflags & PRINT_SKIP) { Hi, Just replying to one of the recent changes on `jls`. We use `jls -n` in many scripts, and recently, it stopped working. The last build that was working for us: FreeBSD 15.0-CURRENT #0 main-n278879-4be9c6f38e78: Sat Jul 19 13:19:25 UTC 2025 We are now encountering the following issue on this build: FreeBSD 16.0-CURRENT #0 main-n280141-5e82eeccd252: Sat Sep 6 05:27:34 UTC 2025 $ jls -n desc=0 devfs_ruleset=0 nodying enforce_statfs=0 env="" host=disable ip4=disable ip6=disable jid=0 meta="" name="" osreldate=0 osrelease="" parent=0 path="" nopersist securelevel=0 sysvmsg=disable sysvsem=disable sysvshm=disable vnet=disable zfs=disable allow.noadjtime allow.nochflags allow.noextattr allow.nomlock allow.nomount allow.mount.nodevfs allow.mount.nofdescfs allow.mount.nonullfs allow.mount.noprocfs allow.mount.notmpfs allow.mount.nozfs allow.nonfsd allow.noquotas allow.noraw_sockets allow.noread_msgbuf allow.noreserved_ports allow.norouting allow.noset_hostname allow.nosettime allow.nosocket_af allow.nosuser allow.nosysvipc allow.nounprivileged_parent_tampering allow.nounprivileged_proc_debug children.cur=0 children.max=0 cpuset.id=0 host.domainname="" host.hostid=0 host.hostname="" host.hostuuid="" ip4.addr=0.0.0.0,0.0.0.0,0.0.0.0,0.0.0.0,0.0.0.0,0.0.0.0,0.0.0.0 ip4.nosaddrsel ip6.addr=::,::,::,::,::,:: ip6.nosaddrsel zfs.mount_snapshot=0 desc=0 devfs_ruleset=0 nodying enforce_statfs=0 env="" host=disable ip4=disable ip6=disable jid=0 meta="" name="" osreldate=0 osrelease="" parent=0 path="" nopersist securelevel=0 sysvmsg=disable sysvsem=disable sysvshm=disable vnet=disable zfs=disable allow.noadjtime allow.nochflags allow.noextattr allow.nomlock allow.nomount allow.mount.nodevfs allow.mount.nofdescfs allow.mount.nonullfs allow.mount.noprocfs allow.mount.notmpfs allow.mount.nozfs allow.nonfsd allow.noquotas allow.noraw_sockets allow.noread_msgbuf allow.noreserved_ports allow.norouting allow.noset_hostname allow.nosettime allow.nosocket_af allow.nosuser allow.nosysvipc allow.nounprivileged_parent_tampering allow.nounprivileged_proc_debug children.cur=0 children.max=0 cpuset.id=0 host.domainname="" host.hostid=0 host.hostname="" host.hostuuid="" ip4.addr=0.0.0.0,0.0.0.0,0.0.0.0,0.0.0.0,0.0.0.0,0.0.0.0,0.0.0.0 ip4.nosaddrsel ip6.addr=::,::,::,::,::,:: ip6.nosaddrsel zfs.mount_snapshot=0 desc=0 devfs_ruleset=0 nodying enforce_statfs=0 env="" host=disable ip4=disable ip6=disable jid=0 meta="" name="" osreldate=0 osrelease="" parent=0 path="" nopersist securelevel=0 sysvmsg=disable sysvsem=disable sysvshm=disable vnet=disable zfs=disable allow.noadjtime allow.nochflags allow.noextattr allow.nomlock allow.nomount allow.mount.nodevfs allow.mount.nofdescfs allow.mount.nonullfs allow.mount.noprocfs allow.mount.notmpfs allow.mount.nozfs allow.nonfsd allow.noquotas allow.noraw_sockets allow.noread_msgbuf allow.noreserved_ports allow.norouting allow.noset_hostname allow.nosettime [...] infinite loop -- Danilo G. Baio From nobody Mon Sep 15 00:31:24 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cQ5Ym2rv7z67kVF; Mon, 15 Sep 2025 00:31:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cQ5Ym2LRVz3clf; Mon, 15 Sep 2025 00:31:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1757896284; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NLi0BLfnbn1bGBDIJe/6RxHe3qDbn6IwBJnspWbpYZU=; b=xfzDZvBryayRoRI+1Cu0aJN+YNo9ZsVExRxuKwyWEQ84q2/1MJ2zZZSPHmDRjpoA596SDV /rW8L/0titg2AMXobRNk1+bTuwH0AHs/N+Ozsh5qrpJ3SxXp6b4VBku3azSbHghk0Fat/x prUnCHij8y013zWkTLTjIEoLwlTxbvkPShSiXVbf83Kv972Y+UzxO4ITqLLydNlRLaLr6u VBCTl++riZS/9xKRxxKFgZMztVgIXutrAYgSWPolxJwLNm579NzA+Io+xtH/MPBgCB8xcE ICpgvLq4pkoctSmGPjqnNp5tmwJD4Dw7Ect1LLc+fATyjjUt0HmiJ1JLzXq/dA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1757896284; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NLi0BLfnbn1bGBDIJe/6RxHe3qDbn6IwBJnspWbpYZU=; b=Fi0TjYoDOQ8vmIzitrRNL250U7hKl9yad9LqY1Ce1hiu3zP9LOJs6F2lnipb+CFQ+IfXgr il/8enxPX+Vysxv6IlZtpIUwpjBrl6GMYH8DOvSLoVjjJyoypR+gbyj5uS6VEOLSvTO9gq oHNrO0xRYEJRNkwGq8ChbpVn3yBNRwfsiLJ51np3y6JhOZmj4BhMhI5AcclboUCzUCTJsu wOodz2J0mAP6fjm6+8lumIWGQ7CDq7gwn6Tg0mVKKuUarQ2adnXSp3v5ABJ7UpgbM5SyXH o0qSldyXu6yCGA69Cwj3JgwFf1PAnwyb7zQcMlt5R5/Qes5h4lQBvH9sLEVTMw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1757896284; a=rsa-sha256; cv=none; b=tNxxczmLIG6zfjM264pFlbiqtSduM0Exim3pxn+0Q2jfVK3Gv23i22s7smtTSjgkoyFNEq eTDCQm1YprBv3V3f5z/NPCSv5kU/V/bTmjozOJwETiHOi0m37tygo9nBy34EX/5NjSXzP7 7wfkUsa0J2dUOE8+9fOSKD2cDmqrR9Yc8g6cd+98hNwjahPtdjlYlo9MAWw+ONQQ1ACt5j 8j24Q7kGOn3KnO2TZ17cTrYKz4usDN+xHcKifftVyVmNleE/XCcfkg5myPUIJVNLZbx/5/ OAHfDG+bhkq36Ddx/tX+UQbaLKNluJ42qhEkheAJDW/p/SC1eoPALqkCcGNgCw== 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 4cQ5Ym1xxnzX2K; Mon, 15 Sep 2025 00:31:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58F0VOLV049063; Mon, 15 Sep 2025 00:31:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58F0VOhb049060; Mon, 15 Sep 2025 00:31:24 GMT (envelope-from git) Date: Mon, 15 Sep 2025 00:31:24 GMT Message-Id: <202509150031.58F0VOhb049060@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alan Somers Subject: git: d1eaa52d10f9 - main - fusefs: fix the last_local_modify LLM/LastLocalModify.lookup/3 test List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d1eaa52d10f9b85e5f6358e1a280899b9d55dd07 Auto-Submitted: auto-generated The branch main has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=d1eaa52d10f9b85e5f6358e1a280899b9d55dd07 commit d1eaa52d10f9b85e5f6358e1a280899b9d55dd07 Author: Alan Somers AuthorDate: 2025-09-15 00:22:36 +0000 Commit: Alan Somers CommitDate: 2025-09-15 00:30:30 +0000 fusefs: fix the last_local_modify LLM/LastLocalModify.lookup/3 test The LastLocalModify tests were originally written to simulate a race condition between VOP_SETATTR and VOP_LOOKUP. They were later extended to cover some other VOPs that can affect file size, including VOP_WRITE. However, the test never correctly simulated the race with VOP_WRITE. So that test only ever passed by accident. Fix it by always opening the file with O_DIRECT. PR: 289237 Reported by: Siva Mahadevan MFC after: 1 week --- tests/sys/fs/fusefs/last_local_modify.cc | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/tests/sys/fs/fusefs/last_local_modify.cc b/tests/sys/fs/fusefs/last_local_modify.cc index 5fcd3c36c892..6b8c19f1efc7 100644 --- a/tests/sys/fs/fusefs/last_local_modify.cc +++ b/tests/sys/fs/fusefs/last_local_modify.cc @@ -174,7 +174,15 @@ static void* write_th(void* arg) { if (sem) sem_wait(sem); - fd = open("mountpoint/some_file.txt", O_RDWR); + /* + * Open the file in direct mode. + * The race condition affects both direct and non-direct writes, and + * they have separate code paths. However, in the non-direct case, the + * kernel updates last_local_modify _before_ sending FUSE_WRITE to the + * server. So the technique that this test program uses to invoke the + * race cannot work. Therefore, test with O_DIRECT only. + */ + fd = open("mountpoint/some_file.txt", O_RDWR | O_DIRECT); if (fd < 0) return (void*)(intptr_t)errno; @@ -332,7 +340,7 @@ TEST_P(LastLocalModify, lookup) /* Wait for FUSE_SETATTR to be sent */ sem_wait(&sem); - /* Lookup again, which will race with setattr */ + /* Lookup again, which will race with the mutator */ ASSERT_EQ(0, stat(FULLPATH, &sb)) << strerror(errno); ASSERT_EQ((off_t)newsize, sb.st_size); From nobody Mon Sep 15 00:32:54 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cQ5bV3X35z67kPL; Mon, 15 Sep 2025 00:32: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 4cQ5bV2zS1z3d6s; Mon, 15 Sep 2025 00:32:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1757896374; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=anMn8uNGib/O1w8+bMeZNWk+A3vffjPFPiCwxQvP/90=; b=S40QMzKvZacOs+yFObRaTviG1sn8vdLKZibykNaSlHz01+N8Dg13dkhZId2HzBsqboX2ZN amXfmCxUouuLUyWYkpdejmM1Xhhz83CdfJlh3Cq/wPase5vezgEkNsdHvWpgqFJIQXqigS yTONHpMTh/y3tGT2l9igOIZHSvguj//7UEe00E5e7b7lAFK0BQRYwufXD6PPzwIctTZYbb aCdBEqxa/YlEuI9POkvSDaGV8d/s3j6a/ZtFfnOiLusC9WrGlpFJaaoRd+QLIdCCqjHAQL W+QXsLbY6SWsGyeX0RlS1gKBQ9hQbx+hXpKSWgqhiY74pSEU9YdDqr9l2rvu4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1757896374; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=anMn8uNGib/O1w8+bMeZNWk+A3vffjPFPiCwxQvP/90=; b=Z5cyWqznykpTrmdbjJjZOPNqUKL2x6kU9jFw2DyBfVgJjI9OHQBLaYofeWv82tR8tzOGCR x5e//hnlQqJYZeO9jpu0b8spViIZfOPW0kE1vbxCLCaOGON3ERIWPRV+gjclWQO9ozB4wJ XUlydDetiszVjwoCKj8iMt0FoBP+AWuxjFW04N04pVu8j9goj43F6DVic0YBnohuaThawX 2g7AdjvCIN7pDyg+B7Gj7pJsPf39bvAZHPZzIRQCNzFN4oycjmp5KKyZRYP8/kAphgqBVO SYwYNoDlYtQr22mRY1XiBp6r26nkUSErXJBLTwmyHIbF6sZA8eYZgo2nEALTAA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1757896374; a=rsa-sha256; cv=none; b=LDOVLUb7C+l9slpuh1/m9xAdbFJffUX/xH0jUk0TB0K7r7tD9Rbtdb2/F9g+/6OQRtDkz/ dgxVPKIYXua3arKK85NRc0tWaHrT+qxmKGFlVL9DBbjpbevPosy4johTac7PlapYQ5R2In 9S3JhPDYoMMvPjXB1M4NRuq2PDDeKCFyt5S/NLgkNloXv1xkowjb/B3opvNkTHaigbbLXV UdMYXIRd28zUsv1O9ut7fzaNhSATYM50P1Gk4SmpNiUiym7liHGJb2BmyodpxF9ZK/3Gj7 PvWP4wui1eAp+SjLEjLsXEGLDI2v2Ln4g7TTZtPZwrQZRj4aSGjwvSOt75NWiw== 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 4cQ5bV2bDmzXZv; Mon, 15 Sep 2025 00:32: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 58F0WsOh051976; Mon, 15 Sep 2025 00:32:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58F0WsZo051973; Mon, 15 Sep 2025 00:32:54 GMT (envelope-from git) Date: Mon, 15 Sep 2025 00:32:54 GMT Message-Id: <202509150032.58F0WsZo051973@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alan Somers Subject: git: 2918cf358291 - main - fusefs: spaces to tabs. No functional change. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2918cf3582915bd8853784f53c88e2c34055df1f Auto-Submitted: auto-generated The branch main has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=2918cf3582915bd8853784f53c88e2c34055df1f commit 2918cf3582915bd8853784f53c88e2c34055df1f Author: Alan Somers AuthorDate: 2025-09-15 00:31:56 +0000 Commit: Alan Somers CommitDate: 2025-09-15 00:31:56 +0000 fusefs: spaces to tabs. No functional change. [skip ci] --- sys/fs/fuse/fuse_vnops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/fs/fuse/fuse_vnops.c b/sys/fs/fuse/fuse_vnops.c index de60a4717dd4..8712679375c6 100644 --- a/sys/fs/fuse/fuse_vnops.c +++ b/sys/fs/fuse/fuse_vnops.c @@ -953,7 +953,7 @@ fuse_vnop_copy_file_range(struct vop_copy_file_range_args *ap) *ap->a_outoffp += fwo->size; fuse_internal_clear_suid_on_write(outvp, outcred, td); if (*ap->a_outoffp > outfvdat->cached_attrs.va_size) { - fuse_vnode_setsize(outvp, *ap->a_outoffp, false); + fuse_vnode_setsize(outvp, *ap->a_outoffp, false); getnanouptime(&outfvdat->last_local_modify); } fuse_vnode_update(invp, FN_ATIMECHANGE); From nobody Mon Sep 15 01:00:54 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cQ6Cr294Vz67mNG; Mon, 15 Sep 2025 01:00:56 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cQ6Cr1TQXz3jkm; Mon, 15 Sep 2025 01:00:56 +0000 (UTC) (envelope-from kevans@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1757898056; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=SJqx6rs8OGgTffmC2BwzN/DorYSgvL5/ArPU6ArS7b8=; b=Q6NBcLCIXspH4chZFOuJzyrEs5Mf1saC0Ht9Ax0C6UULtJc66UinpD0dM9SOMix3m+DEFk Djx6MDEbOK4CLUlgp+dfISQzso++kjY8TcTmuWvrRCZRAdS8QMn74KXGlqhUgDyZLJhkXd 3XWho6rUYdWr+NVsJg8Fyj70b3mNH57VZvZoT/xb2ikficT95Bt++Q5NJZq8TE4BHNNTZ5 wF1DVUHEfZZM9iv10lekU00oaQhrQIbmhqopekOMT4z3hhx/8P5nW6f5l8V5Z4SpEbH4hm 4iNuek76H2uRfqvJENQI+y3CeGa474MX50Z5LrV6MKqZgLbTeF7dXym67+KUEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1757898056; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=SJqx6rs8OGgTffmC2BwzN/DorYSgvL5/ArPU6ArS7b8=; b=TJrU4FY4HXZIZXGZlQh2DhodYgDOoU/NnnT9HlUAhbsG3h7U+Ywx+//GUwvNvGSnEVmkgq m20u8pf8eCJE0kX/E0UVO92tv2yz15yzFvwskwbva+eUEAOFbtN4gY6p10vRyaCYc0kYHP QeF3mwqI1l7hsnQSO1uXWCkkvi7AhGMzr/JUhoMEBOJSgYwVp1Jxxyai0oHKqwajzVn8Lh bcL4yJV/y5womacfD7Uho8FDT3KD1YQ8z29U+gMvyk/XiE2Xbw7jSZ6e3hiHKkbae7wjGV v+QUpkmq9dIpXTvxRS5ZfhJndqivl6CGbXvxT1jZtoLrD8xpaHxJRk209tnxiQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1757898056; a=rsa-sha256; cv=none; b=N9vJmG8WxuyntcbCemJE43YckYN6uiJC373R1CuUpDcp0BBW5Yhzg8dx24fY4HySPIfGC/ QWGusFLnExEOabbpZOJIJFqD9nPYD+NyFIjScqvE0Di14ZAO501yfPY5Nn58Q2mbAtyxJ/ mKRVlDAZMmxWWQ+3jAXYlOzvWlqzWeBaeMQk6XFqqS332c+FNeF4+YMiC6nAjMOu7kNRad ztMC2kiGYTNaggMn7doMxNjagAHAHF76Fysxl9iUhqZeta2fB04H97IBbAarEWWLsmL8Rz OtGeSKMO0JYItAD2Oxsiq2auwOyWd8GdsW3g/ErJwKBC/iOJtXFLEimEEbXT5A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from [10.9.4.95] (unknown [209.182.120.176]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: kevans/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4cQ6Cq4vkbzqFL; Mon, 15 Sep 2025 01:00:55 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Message-ID: Date: Sun, 14 Sep 2025 20:00:54 -0500 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: dbaaadd4373a - main - jls: minor simplification to arg handling To: "Danilo G. Baio" , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202507260314.56Q3E5cY002869@gitrepo.freebsd.org> <54e7f090-c031-47f2-bc51-c020a77ab00a@app.fastmail.com> Content-Language: en-US Cc: James Gritton From: Kyle Evans In-Reply-To: <54e7f090-c031-47f2-bc51-c020a77ab00a@app.fastmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 9/14/25 19:14, Danilo G. Baio wrote: > > > On Sat, Jul 26, 2025, at 00:14, Kyle Evans wrote: >> The branch main has been updated by kevans: >> >> URL: >> https://cgit.FreeBSD.org/src/commit/?id=dbaaadd4373a725950ad11e578dab61537b7c4f2 >> >> commit dbaaadd4373a725950ad11e578dab61537b7c4f2 >> Author: Kyle Evans >> AuthorDate: 2025-07-26 03:13:41 +0000 >> Commit: Kyle Evans >> CommitDate: 2025-07-26 03:13:41 +0000 >> >> jls: minor simplification to arg handling >> >> It's easier to reason about the state of argc/argv if we just augment >> them by optind after our getopt() loop. >> >> No functional change, but this sets the stage for another change to add >> a `-c` mode to (c)heck for the existence of a jail quietly without >> the caller having to worry about spurious output. >> >> Reviewed by: jamie >> Differential Revision: https://reviews.freebsd.org/D51540 >> --- >> usr.sbin/jls/jls.c | 10 ++++++---- >> 1 file changed, 6 insertions(+), 4 deletions(-) >> >> diff --git a/usr.sbin/jls/jls.c b/usr.sbin/jls/jls.c >> index bd193a69c458..a1d1716713aa 100644 >> --- a/usr.sbin/jls/jls.c >> +++ b/usr.sbin/jls/jls.c >> @@ -140,8 +140,11 @@ main(int argc, char **argv) >> ip4_ok = feature_present("inet"); >> #endif >> >> + argc -= optind; >> + argv += optind; >> + >> /* Add the parameters to print. */ >> - if (optind == argc) { >> + if (argc == 0) { >> if (pflags & (PRINT_HEADER | PRINT_NAMEVAL)) >> add_param("all", NULL, (size_t)0, NULL, JP_USER); >> else if (pflags & PRINT_VERBOSE) { >> @@ -179,9 +182,8 @@ main(int argc, char **argv) >> } >> } else { >> pflags &= ~PRINT_VERBOSE; >> - while (optind < argc) >> - add_param(argv[optind++], NULL, (size_t)0, NULL, >> - JP_USER); >> + for (i = 0; i < argc; i++) >> + add_param(argv[i], NULL, (size_t)0, NULL, JP_USER); >> } >> >> if (pflags & PRINT_SKIP) { > > > Hi, > > Just replying to one of the recent changes on `jls`. > > We use `jls -n` in many scripts, and recently, it stopped working. > > The last build that was working for us: > FreeBSD 15.0-CURRENT #0 main-n278879-4be9c6f38e78: Sat Jul 19 13:19:25 UTC 2025 > > We are now encountering the following issue on this build: > FreeBSD 16.0-CURRENT #0 main-n280141-5e82eeccd252: Sat Sep 6 05:27:34 UTC 2025 > > $ jls -n > desc=0 devfs_ruleset=0 nodying enforce_statfs=0 env="" host=disable ip4=disable ip6=disable jid=0 meta="" name="" osreldate=0 osrelease="" parent=0 path="" nopersist securelevel=0 sysvmsg=disable sysvsem=disable sysvshm=disable vnet=disable zfs=disable allow.noadjtime allow.nochflags allow.noextattr allow.nomlock allow.nomount allow.mount.nodevfs allow.mount.nofdescfs allow.mount.nonullfs allow.mount.noprocfs allow.mount.notmpfs allow.mount.nozfs allow.nonfsd allow.noquotas allow.noraw_sockets allow.noread_msgbuf allow.noreserved_ports allow.norouting allow.noset_hostname allow.nosettime allow.nosocket_af allow.nosuser allow.nosysvipc allow.nounprivileged_parent_tampering allow.nounprivileged_proc_debug children.cur=0 children.max=0 cpuset.id=0 host.domainname="" host.hostid=0 host.hostname="" host.hostuuid="" ip4.addr=0.0.0.0,0.0.0.0,0.0.0.0,0.0.0.0,0.0.0.0,0.0.0.0,0.0.0.0 ip4.nosaddrsel ip6.addr=::,::,::,::,::,:: ip6.nosaddrsel zfs.mount_snapshot=0 > desc=0 devfs_ruleset=0 nodying enforce_statfs=0 env="" host=disable ip4=disable ip6=disable jid=0 meta="" name="" osreldate=0 osrelease="" parent=0 path="" nopersist securelevel=0 sysvmsg=disable sysvsem=disable sysvshm=disable vnet=disable zfs=disable allow.noadjtime allow.nochflags allow.noextattr allow.nomlock allow.nomount allow.mount.nodevfs allow.mount.nofdescfs allow.mount.nonullfs allow.mount.noprocfs allow.mount.notmpfs allow.mount.nozfs allow.nonfsd allow.noquotas allow.noraw_sockets allow.noread_msgbuf allow.noreserved_ports allow.norouting allow.noset_hostname allow.nosettime allow.nosocket_af allow.nosuser allow.nosysvipc allow.nounprivileged_parent_tampering allow.nounprivileged_proc_debug children.cur=0 children.max=0 cpuset.id=0 host.domainname="" host.hostid=0 host.hostname="" host.hostuuid="" ip4.addr=0.0.0.0,0.0.0.0,0.0.0.0,0.0.0.0,0.0.0.0,0.0.0.0,0.0.0.0 ip4.nosaddrsel ip6.addr=::,::,::,::,::,:: ip6.nosaddrsel zfs.mount_snapshot=0 > desc=0 devfs_ruleset=0 nodying enforce_statfs=0 env="" host=disable ip4=disable ip6=disable jid=0 meta="" name="" osreldate=0 osrelease="" parent=0 path="" nopersist securelevel=0 sysvmsg=disable sysvsem=disable sysvshm=disable vnet=disable zfs=disable allow.noadjtime allow.nochflags allow.noextattr allow.nomlock allow.nomount allow.mount.nodevfs allow.mount.nofdescfs allow.mount.nonullfs allow.mount.noprocfs allow.mount.notmpfs allow.mount.nozfs allow.nonfsd allow.noquotas allow.noraw_sockets allow.noread_msgbuf allow.noreserved_ports allow.norouting allow.noset_hostname allow.nosettime > [...] > infinite loop > Adding jamie@, neither of the changes to jls(1) should've caused this, as far as I can reason about (and I haven't observed this here, yet). This looks like a failure to terminate the print_jail loop at the end? From nobody Mon Sep 15 02:30:02 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cQ8Bg4qbkz67sdy; Mon, 15 Sep 2025 02:30:03 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cQ8Bg49CFz3pXn; Mon, 15 Sep 2025 02:30:03 +0000 (UTC) (envelope-from kevans@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1757903403; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=kdfNwAAa1b+fNjKrXYAIb7p5VOhytlBuRnEOlvzIeBA=; b=ARjxGbMOqUDS3db+J4O6tsZy9jJJ+afoMolwMOYrG918qiKAKt7xXA3jXAQWpNPAvLG3ZK mIA6Emm8hlDV1iX/aSdIMDNgpKaC3eDC/tpHuXVFRXzxUM6SlOl7O5wIjuTaehD5Jj1HoX AGV8uD2i1mV+yka+Og4N1WrG7bQovfFMoJqapzlwXPVGxqrXQeqcR20P0SX55Kbpxx9lZI 2SnZoMXTCz6+okuqt60F2yfiiO5xiawIsmjQH2lVpCQnq+lZr6AEtAW5C62cjsZ2eIuXA9 iB8o2MsG1xwMSo6RSy1p4+1LHORx2/zh1vhtGg9pZs/dhseFRhcErYnMpVCgyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1757903403; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=kdfNwAAa1b+fNjKrXYAIb7p5VOhytlBuRnEOlvzIeBA=; b=nE/pXx2WFP67WFTh+ZXOg9cmlgGcNAcOAgcm4V6MumGzmO+EuNqoiT+oXjDm0Tnywao880 XkA80VoMwf62/sCEJrxHJ+qcNSDF6cYhc0Xaffavbow58XY4rB8wgl2dnN2CSYkjxP1p7A aq93GgE0YH8LTPik1alBoVZ51JMDX89OFDzythz0RFUpkFWhjEgpn5uPYaHa9/it2o8xj3 eBVr5RQ2bQqXklFvMuz0D8Lei0CMtAo6ZRXlaGE91gMwohWj4jX6150RyvT9ynrQMcOOrK LTTvZFwr2uq+4bcdBOcbZb4FXIPKy3CbLTftbgIRgGfGu0POFqP21ml1NuvbSw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1757903403; a=rsa-sha256; cv=none; b=chLndDHJIU4+MUCB6KL/DRuW8B1ZPnR35bHntl+ruEx86mVeS2DEmmNQdOKAbysz2c4i98 gUHWBZzlmZBUGmQ5zqHFkvzDXOrIr8Df/Er8l0l0u8vaR5bScgUrIVCSfTZINAl1K+IG7j ikA0Z5vR+Sn6lQ8nDJDqfyDz6JkQeXLj8/mWCZcMyX2rc5BndTent8J/Re15/R/gg+/RCQ kGZxXEgK95ohi+zklEZ9DDii6L3vnWv11TT9ZISnEz8/sf4iAzlvUj+q5tfXle0pSEXiFX VNDXl7Ke43KLrVALFfi0O4iUrSF3zPEfdHuGHmXz/B5PSbdlaRNZC/BSNBksGA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from [10.9.4.95] (unknown [209.182.120.176]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: kevans/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4cQ8Bg0cVpzpRq; Mon, 15 Sep 2025 02:30:02 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Message-ID: Date: Sun, 14 Sep 2025 21:30:02 -0500 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: dbaaadd4373a - main - jls: minor simplification to arg handling From: Kyle Evans To: "Danilo G. Baio" , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Cc: James Gritton References: <202507260314.56Q3E5cY002869@gitrepo.freebsd.org> <54e7f090-c031-47f2-bc51-c020a77ab00a@app.fastmail.com> Content-Language: en-US In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 9/14/25 20:00, Kyle Evans wrote: > On 9/14/25 19:14, Danilo G. Baio wrote: >> >> >> On Sat, Jul 26, 2025, at 00:14, Kyle Evans wrote: >>> The branch main has been updated by kevans: >>> >>> URL: >>> https://cgit.FreeBSD.org/src/commit/?id=dbaaadd4373a725950ad11e578dab61537b7c4f2 >>> >>> commit dbaaadd4373a725950ad11e578dab61537b7c4f2 >>> Author:     Kyle Evans >>> AuthorDate: 2025-07-26 03:13:41 +0000 >>> Commit:     Kyle Evans >>> CommitDate: 2025-07-26 03:13:41 +0000 >>> >>>      jls: minor simplification to arg handling >>>      It's easier to reason about the state of argc/argv if we just augment >>>      them by optind after our getopt() loop. >>>      No functional change, but this sets the stage for another change to add >>>      a `-c` mode to (c)heck for the existence of a jail quietly without >>>      the caller having to worry about spurious output. >>>      Reviewed by:    jamie >>>      Differential Revision:  https://reviews.freebsd.org/D51540 >>> --- >>>   usr.sbin/jls/jls.c | 10 ++++++---- >>>   1 file changed, 6 insertions(+), 4 deletions(-) >>> >>> diff --git a/usr.sbin/jls/jls.c b/usr.sbin/jls/jls.c >>> index bd193a69c458..a1d1716713aa 100644 >>> --- a/usr.sbin/jls/jls.c >>> +++ b/usr.sbin/jls/jls.c >>> @@ -140,8 +140,11 @@ main(int argc, char **argv) >>>       ip4_ok = feature_present("inet"); >>>   #endif >>> >>> +    argc -= optind; >>> +    argv += optind; >>> + >>>       /* Add the parameters to print. */ >>> -    if (optind == argc) { >>> +    if (argc == 0) { >>>           if (pflags & (PRINT_HEADER | PRINT_NAMEVAL)) >>>               add_param("all", NULL, (size_t)0, NULL, JP_USER); >>>           else if (pflags & PRINT_VERBOSE) { >>> @@ -179,9 +182,8 @@ main(int argc, char **argv) >>>           } >>>       } else { >>>           pflags &= ~PRINT_VERBOSE; >>> -        while (optind < argc) >>> -            add_param(argv[optind++], NULL, (size_t)0, NULL, >>> -                JP_USER); >>> +        for (i = 0; i < argc; i++) >>> +            add_param(argv[i], NULL, (size_t)0, NULL, JP_USER); >>>       } >>> >>>       if (pflags & PRINT_SKIP) { >> >> >> Hi, >> >> Just replying to one of the recent changes on `jls`. >> >> We use `jls -n` in many scripts, and recently, it stopped working. >> >> The last build that was working for us: >> FreeBSD 15.0-CURRENT #0 main-n278879-4be9c6f38e78: Sat Jul 19 13:19:25 UTC 2025 >> >> We are now encountering the following issue on this build: >> FreeBSD 16.0-CURRENT #0 main-n280141-5e82eeccd252: Sat Sep  6 05:27:34 UTC 2025 >> >> $ jls -n >> desc=0 devfs_ruleset=0 nodying enforce_statfs=0 env="" host=disable ip4=disable ip6=disable jid=0 meta="" name="" osreldate=0 osrelease="" parent=0 path="" nopersist securelevel=0 sysvmsg=disable sysvsem=disable sysvshm=disable vnet=disable zfs=disable allow.noadjtime allow.nochflags allow.noextattr allow.nomlock allow.nomount allow.mount.nodevfs allow.mount.nofdescfs allow.mount.nonullfs allow.mount.noprocfs allow.mount.notmpfs allow.mount.nozfs allow.nonfsd allow.noquotas allow.noraw_sockets allow.noread_msgbuf allow.noreserved_ports allow.norouting allow.noset_hostname allow.nosettime allow.nosocket_af allow.nosuser allow.nosysvipc allow.nounprivileged_parent_tampering allow.nounprivileged_proc_debug children.cur=0 children.max=0 cpuset.id=0 host.domainname="" host.hostid=0 host.hostname="" host.hostuuid="" ip4.addr=0.0.0.0,0.0.0.0,0.0.0.0,0.0.0.0,0.0.0.0,0.0.0.0,0.0.0.0 ip4.nosaddrsel ip6.addr=::,::,::,::,::,:: ip6.nosaddrsel zfs.mount_snapshot=0 >> desc=0 devfs_ruleset=0 nodying enforce_statfs=0 env="" host=disable ip4=disable ip6=disable jid=0 meta="" name="" osreldate=0 osrelease="" parent=0 path="" nopersist securelevel=0 sysvmsg=disable sysvsem=disable sysvshm=disable vnet=disable zfs=disable allow.noadjtime allow.nochflags allow.noextattr allow.nomlock allow.nomount allow.mount.nodevfs allow.mount.nofdescfs allow.mount.nonullfs allow.mount.noprocfs allow.mount.notmpfs allow.mount.nozfs allow.nonfsd allow.noquotas allow.noraw_sockets allow.noread_msgbuf allow.noreserved_ports allow.norouting allow.noset_hostname allow.nosettime allow.nosocket_af allow.nosuser allow.nosysvipc allow.nounprivileged_parent_tampering allow.nounprivileged_proc_debug children.cur=0 children.max=0 cpuset.id=0 host.domainname="" host.hostid=0 host.hostname="" host.hostuuid="" ip4.addr=0.0.0.0,0.0.0.0,0.0.0.0,0.0.0.0,0.0.0.0,0.0.0.0,0.0.0.0 ip4.nosaddrsel ip6.addr=::,::,::,::,::,:: ip6.nosaddrsel zfs.mount_snapshot=0 >> desc=0 devfs_ruleset=0 nodying enforce_statfs=0 env="" host=disable ip4=disable ip6=disable jid=0 meta="" name="" osreldate=0 osrelease="" parent=0 path="" nopersist securelevel=0 sysvmsg=disable sysvsem=disable sysvshm=disable vnet=disable zfs=disable allow.noadjtime allow.nochflags allow.noextattr allow.nomlock allow.nomount allow.mount.nodevfs allow.mount.nofdescfs allow.mount.nonullfs allow.mount.noprocfs allow.mount.notmpfs allow.mount.nozfs allow.nonfsd allow.noquotas allow.noraw_sockets allow.noread_msgbuf allow.noreserved_ports allow.norouting allow.noset_hostname allow.nosettime >> [...] >> infinite loop >> > > Adding jamie@, neither of the changes to jls(1) should've caused this, as far as I can reason about (and I haven't observed this here, yet).  This looks like a failure to terminate the print_jail loop at the end? I still can't functionally update, but looking at the recent jaildesc work, I wonder if this is a side effect that has since been fixed in e75dda31c1eead9ad40580bd8 by removing the "desc" parameter. It would have been included in jailparam_all(), and I wonder if that somehow broke jls-style iteration? From nobody Mon Sep 15 03:03:48 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cQ8xk5k3vz67vqY; Mon, 15 Sep 2025 03:03:54 +0000 (UTC) (envelope-from jamie@gritton.org) Received: from m2.gritton.org (gritton.org [67.43.236.212]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4cQ8xk2wVJz3vsF; Mon, 15 Sep 2025 03:03:54 +0000 (UTC) (envelope-from jamie@gritton.org) Authentication-Results: mx1.freebsd.org; none Received: from gritton.org (localgritton [127.0.0.212]) by m2.gritton.org (Postfix) with ESMTPSA id 638017D3EF; Sun, 14 Sep 2025 20:03:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=gritton.org; s=m2; t=1757905428; bh=sjWAkFKxYJxPTTM8Dh6QypNkseGfIcV+dcE17JA7JTs=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=hl9RSS2lVadqrI4yfyIGfDvbEy7yQ68CoE3GixdsN+HWnR3XBPl0fXwu7kgBwYEpe GNaQ3PlSYyNOEdyf0VhMzHMTlnwccAknkwZx0KQ3ggBTGh+51ATDL9IUV3H+tyd3yM DViLuBGXgch1qRAFR7swjQB2Zf/lLXmIRgn+G1rM= List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Date: Sun, 14 Sep 2025 20:03:48 -0700 From: James Gritton To: Kyle Evans Cc: "Danilo G. Baio" , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: dbaaadd4373a - main - jls: minor simplification to arg handling In-Reply-To: References: <202507260314.56Q3E5cY002869@gitrepo.freebsd.org> <54e7f090-c031-47f2-bc51-c020a77ab00a@app.fastmail.com> Message-ID: X-Sender: jamie@gritton.org Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:36666, ipnet:67.43.224.0/20, country:CA] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4cQ8xk2wVJz3vsF On 2025-09-14 19:30, Kyle Evans wrote: > On 9/14/25 20:00, Kyle Evans wrote: >> On 9/14/25 19:14, Danilo G. Baio wrote: >>> >>> >>> On Sat, Jul 26, 2025, at 00:14, Kyle Evans wrote: >>>> The branch main has been updated by kevans: >>>> >>>> URL: >>>> https://cgit.FreeBSD.org/src/commit/?id=dbaaadd4373a725950ad11e578dab61537b7c4f2 >>>> >>>> commit dbaaadd4373a725950ad11e578dab61537b7c4f2 >>>> Author:     Kyle Evans >>>> AuthorDate: 2025-07-26 03:13:41 +0000 >>>> Commit:     Kyle Evans >>>> CommitDate: 2025-07-26 03:13:41 +0000 >>>> >>>>      jls: minor simplification to arg handling >>>>      It's easier to reason about the state of argc/argv if we just >>>> augment >>>>      them by optind after our getopt() loop. >>>>      No functional change, but this sets the stage for another >>>> change to add >>>>      a `-c` mode to (c)heck for the existence of a jail quietly >>>> without >>>>      the caller having to worry about spurious output. >>>>      Reviewed by:    jamie >>>>      Differential Revision:  https://reviews.freebsd.org/D51540 >>>> --- >>>>   usr.sbin/jls/jls.c | 10 ++++++---- >>>>   1 file changed, 6 insertions(+), 4 deletions(-) >>>> >>>> diff --git a/usr.sbin/jls/jls.c b/usr.sbin/jls/jls.c >>>> index bd193a69c458..a1d1716713aa 100644 >>>> --- a/usr.sbin/jls/jls.c >>>> +++ b/usr.sbin/jls/jls.c >>>> @@ -140,8 +140,11 @@ main(int argc, char **argv) >>>>       ip4_ok = feature_present("inet"); >>>>   #endif >>>> >>>> +    argc -= optind; >>>> +    argv += optind; >>>> + >>>>       /* Add the parameters to print. */ >>>> -    if (optind == argc) { >>>> +    if (argc == 0) { >>>>           if (pflags & (PRINT_HEADER | PRINT_NAMEVAL)) >>>>               add_param("all", NULL, (size_t)0, NULL, JP_USER); >>>>           else if (pflags & PRINT_VERBOSE) { >>>> @@ -179,9 +182,8 @@ main(int argc, char **argv) >>>>           } >>>>       } else { >>>>           pflags &= ~PRINT_VERBOSE; >>>> -        while (optind < argc) >>>> -            add_param(argv[optind++], NULL, (size_t)0, NULL, >>>> -                JP_USER); >>>> +        for (i = 0; i < argc; i++) >>>> +            add_param(argv[i], NULL, (size_t)0, NULL, JP_USER); >>>>       } >>>> >>>>       if (pflags & PRINT_SKIP) { >>> >>> >>> Hi, >>> >>> Just replying to one of the recent changes on `jls`. >>> >>> We use `jls -n` in many scripts, and recently, it stopped working. >>> >>> The last build that was working for us: >>> FreeBSD 15.0-CURRENT #0 main-n278879-4be9c6f38e78: Sat Jul 19 >>> 13:19:25 UTC 2025 >>> >>> We are now encountering the following issue on this build: >>> FreeBSD 16.0-CURRENT #0 main-n280141-5e82eeccd252: Sat Sep  6 >>> 05:27:34 UTC 2025 >>> >>> $ jls -n >>> desc=0 devfs_ruleset=0 nodying enforce_statfs=0 env="" host=disable >>> ip4=disable ip6=disable jid=0 meta="" name="" osreldate=0 >>> osrelease="" parent=0 path="" nopersist securelevel=0 sysvmsg=disable >>> sysvsem=disable sysvshm=disable vnet=disable zfs=disable >>> allow.noadjtime allow.nochflags allow.noextattr allow.nomlock >>> allow.nomount allow.mount.nodevfs allow.mount.nofdescfs >>> allow.mount.nonullfs allow.mount.noprocfs allow.mount.notmpfs >>> allow.mount.nozfs allow.nonfsd allow.noquotas allow.noraw_sockets >>> allow.noread_msgbuf allow.noreserved_ports allow.norouting >>> allow.noset_hostname allow.nosettime allow.nosocket_af allow.nosuser >>> allow.nosysvipc allow.nounprivileged_parent_tampering >>> allow.nounprivileged_proc_debug children.cur=0 children.max=0 >>> cpuset.id=0 host.domainname="" host.hostid=0 host.hostname="" >>> host.hostuuid="" >>> ip4.addr=0.0.0.0,0.0.0.0,0.0.0.0,0.0.0.0,0.0.0.0,0.0.0.0,0.0.0.0 >>> ip4.nosaddrsel ip6.addr=::,::,::,::,::,:: ip6.nosaddrsel >>> zfs.mount_snapshot=0 >>> desc=0 devfs_ruleset=0 nodying enforce_statfs=0 env="" host=disable >>> ip4=disable ip6=disable jid=0 meta="" name="" osreldate=0 >>> osrelease="" parent=0 path="" nopersist securelevel=0 sysvmsg=disable >>> sysvsem=disable sysvshm=disable vnet=disable zfs=disable >>> allow.noadjtime allow.nochflags allow.noextattr allow.nomlock >>> allow.nomount allow.mount.nodevfs allow.mount.nofdescfs >>> allow.mount.nonullfs allow.mount.noprocfs allow.mount.notmpfs >>> allow.mount.nozfs allow.nonfsd allow.noquotas allow.noraw_sockets >>> allow.noread_msgbuf allow.noreserved_ports allow.norouting >>> allow.noset_hostname allow.nosettime allow.nosocket_af allow.nosuser >>> allow.nosysvipc allow.nounprivileged_parent_tampering >>> allow.nounprivileged_proc_debug children.cur=0 children.max=0 >>> cpuset.id=0 host.domainname="" host.hostid=0 host.hostname="" >>> host.hostuuid="" >>> ip4.addr=0.0.0.0,0.0.0.0,0.0.0.0,0.0.0.0,0.0.0.0,0.0.0.0,0.0.0.0 >>> ip4.nosaddrsel ip6.addr=::,::,::,::,::,:: ip6.nosaddrsel >>> zfs.mount_snapshot=0 >>> desc=0 devfs_ruleset=0 nodying enforce_statfs=0 env="" host=disable >>> ip4=disable ip6=disable jid=0 meta="" name="" osreldate=0 >>> osrelease="" parent=0 path="" nopersist securelevel=0 sysvmsg=disable >>> sysvsem=disable sysvshm=disable vnet=disable zfs=disable >>> allow.noadjtime allow.nochflags allow.noextattr allow.nomlock >>> allow.nomount allow.mount.nodevfs allow.mount.nofdescfs >>> allow.mount.nonullfs allow.mount.noprocfs allow.mount.notmpfs >>> allow.mount.nozfs allow.nonfsd allow.noquotas allow.noraw_sockets >>> allow.noread_msgbuf allow.noreserved_ports allow.norouting >>> allow.noset_hostname allow.nosettime >>> [...] >>> infinite loop >>> >> >> Adding jamie@, neither of the changes to jls(1) should've caused this, >> as far as I can reason about (and I haven't observed this here, yet).  >> This looks like a failure to terminate the print_jail loop at the end? > > I still can't functionally update, but looking at the recent jaildesc > work, I wonder > if this is a side effect that has since been fixed in > e75dda31c1eead9ad40580bd8 by > removing the "desc" parameter. It would have been included in > jailparam_all(), and > I wonder if that somehow broke jls-style iteration? I'm nearly certain that it is. I noticed that "jls desc" produced such a loop, so I expect the exclusion of desc as a real parameter fixes it. - Jamie From nobody Mon Sep 15 03:04:11 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cQ8y35xFrz67w1y; Mon, 15 Sep 2025 03:04: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 4cQ8y34CfFz3w37; Mon, 15 Sep 2025 03:04:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1757905451; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wmXQG1dDWgnoL47x3VA7eEKgQY70wx/f78TwmpOw+2s=; b=Bgr+NF9kW9l6kBDNDUR+BmFMdo6T8ENsoj2EUkwn936XOhlHfQuJ1B+QcscOui5fU31nTf u9i+iODKzHpNT/ZdgsxPE8P4x72dz34O30BPrSKb2W7F0nP8x2FI5qvHce63yWFENTEFxc vjcyX96/wOmCN241nlLhQXso1tBglhXPf6OCFykWdgyqZ/IZbVuQij2PyLytHHslv/WYjj 5iEI+SsM76R6JBgCe5uq3WUV2s1AojTlx/DkBQVoLEnVowElJQbthVdIM2TBbN1t9R+GUD mT4E5CkKbX/DIdLWPMRQAI73Kx5bEqv1vHZwN6amZ3/Eq7ELTUBiaOQRDEjQBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1757905451; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wmXQG1dDWgnoL47x3VA7eEKgQY70wx/f78TwmpOw+2s=; b=E/GAkhHwl64AB250BxRmHQ3uy4zb5ZPiyD5JoTRFhHj/XH50V93LWzLUR3xAkp/Lp0d+j2 Ooy464CZvOGNAo8/5C4+gX21T60mSc86bnQd0ustSDrTdLB/mpbxnNkCuAUg0kmmMJP8At iyHSo43rjvNxLGb/GBBZiKs7HNlPiYVt5s/PqtFs1wmB8WZgPD/d7Bk30ZSrdKtMQllQmd ymjXsd+RluUR/3AlPhLHBsXZlcI9CNdNesyY95DQWCyk+gIz7nh4Ah0DLF8j6jICKIdKMr E9GvXurzUI5U0C7/fo3mypDjlgtiCPbARIM3Vr2ppLtryk4DRQtGhMHjcqzorw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1757905451; a=rsa-sha256; cv=none; b=j3bYCxALzXLMDanjHa9bHY4p2zBMjAYD6NfvYPaIvshT7ujYHMvR3Co8RqMxABGXa1F0m2 +/H6Vxp0yta7fN/LzRh7JWpe6mlxVRbsARiGKkETE1oY3QpcBieMKThSiN3c7g1hsHUlZ+ XKRhpfy4kXx1/wE20VUuA2P7UsqA/gct40ofJU8qaHPEVnsdNqbio1YzzI+QP8ROTUDU/c YgYioRiiHP7v6cXkfhjAncbO2HwcjcoCUnjus/Mgo5JcaW3MV9H+7vwkDOxHPKRVfsKaou XBDQL3Wy7Knz8qR7MRwBjA8+PHJKMikrFiDKppJCoYenmjXYp+WoIqfSS5Dpqg== 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 4cQ8y33nQtzcRN; Mon, 15 Sep 2025 03:04: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 58F34B5T035105; Mon, 15 Sep 2025 03:04:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58F34BWJ035102; Mon, 15 Sep 2025 03:04:11 GMT (envelope-from git) Date: Mon, 15 Sep 2025 03:04:11 GMT Message-Id: <202509150304.58F34BWJ035102@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 5e0a4859f28a - main - iwlwifi: Don't compile for gcc before 14 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5e0a4859f28ad4869f7a73faf42debc355a370bf Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=5e0a4859f28ad4869f7a73faf42debc355a370bf commit 5e0a4859f28ad4869f7a73faf42debc355a370bf Author: Warner Losh AuthorDate: 2025-09-14 18:03:16 +0000 Commit: Warner Losh CommitDate: 2025-09-15 03:03:45 +0000 iwlwifi: Don't compile for gcc before 14 gcc 13 and earlier don't have __builtin_bitcountg. The linux wifi kpi uses this unconditionally. While in this one use, it might not be needed, I opted to not compile iwlwifi when building gcc12 or 13 rather than risk breaking it for everbody else. With this change gcc12 builds the kernel. Maybe this will stop jenkins email for every commit I make. Sponsored by: Netflix --- sys/modules/Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/modules/Makefile b/sys/modules/Makefile index 5315d518afd8..f9fdbca78869 100644 --- a/sys/modules/Makefile +++ b/sys/modules/Makefile @@ -576,7 +576,10 @@ _mlx5ib= mlx5ib ${MACHINE_CPUARCH} == "i386" _ena= ena _gve= gve +# gcc13 and earlier lack __builtin_bitcountg used by linux emulation +.if !(${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} < 140000) _iwlwifi= iwlwifi +.endif _rtw88= rtw88 _rtw89= rtw89 _vmware= vmware From nobody Mon Sep 15 03:15:36 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cQ9CD6gVCz67wr2; Mon, 15 Sep 2025 03:15: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 4cQ9CD5DhSz3wgg; Mon, 15 Sep 2025 03:15:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1757906136; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=58S8qt0IxlezCZkk5uQSD0I5WNVfpDGq8UnudLcT+Ik=; b=Rn6fkbiZ0rT8qZgsB3ALLrAhOvKsIbBvc+arSzIcSn8zgNKkOBMOKhRt9Ff4GdDU2v9M2h /kAE1BRuuovZ+9GTffa4UMKt2P93Iv/gyPC+T+vKXcW7n+9tSAQm0mu4eQ2gpr4KgJQHhI BZzsOA4DhVoLyRKlnz5k2X9T+7PdODo78JgFMkRA6F/D2mRnnRKZ4lwcB32vIwz6i+SnYC Y82SaXRikDqpxn5WyZyXMOwtWFOg6gu5EHKeBXmiSEWYH4eI1r5h4W2GA0HAOvqi6ETc3v z/SJf+fm0S2PmOxFYrsiMNe0dQ+/PVrinAuI907O2fWwRumAjzQkhg5qIbdwrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1757906136; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=58S8qt0IxlezCZkk5uQSD0I5WNVfpDGq8UnudLcT+Ik=; b=tQhnQOlg4mv6jdtou+P9HuEd4CZb0KztsmY/5KSRfZYxzlMDuffMaYO4qWrkyJiCtzzQSk SxLnHyHnNle7gnXUPcdDQ/RpG4upYQDXYNn2BYYNL2CU9oFFYKYwBaCl74TZfibBa1unkh ZisqHA/rOxmk1Fr2z2PwtXH/EiCEw2IIjkymEYCnS6MfSwdhk1poEXt4uivy68SQ1odZOC G/HZEhRDEp7BBJq9bscZmYMCfmq/c8gbYycU25qfSE9NrXWY2m8dfkco+/ZOBnIvkaxibC 470PndAmlAgsNYmCYaiK5OmsT0B0I+9n9nB1rnbKX1IvWGqbxLrwuk9kENxJSA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1757906136; a=rsa-sha256; cv=none; b=YDRZ5ksNwiMs3woI+sVcZ+jJcvLReUWbw+HUeHTYxRXDQbLhs07Vxrvjfe7K/J+8rWyKN1 R8HDqwHblh7kuHbiHzDctnGgDyTgddeE8rEOXJjYdgGOn9ENH1euwpq4aZl99pefvpt/9A Hb2roroQd8jzJc36jjjzrAdY7Eqm80rI99U0gQFOZQf66lgyrH9YIb3l2OmZk/F0Sh0hLc KOAirZPXy56xVHAyft2Pv4iTi8unAbVGowXQFDcxnt6kebviTB2OKlvHDqJS8/mwJQWV3R 5S7k1WS+qIggH8m28EepSR/+oI0IrTe9UQQLgMMgxEpanO43n3E8s2V6qqafaw== 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 4cQ9CD4ncmzd87; Mon, 15 Sep 2025 03:15: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 58F3FaG4053892; Mon, 15 Sep 2025 03:15:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58F3FaLU053889; Mon, 15 Sep 2025 03:15:36 GMT (envelope-from git) Date: Mon, 15 Sep 2025 03:15:36 GMT Message-Id: <202509150315.58F3FaLU053889@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: e239f49146e0 - main - UPDATING: fix typos List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e239f49146e0b8a400db5eb014f4a3f706380780 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=e239f49146e0b8a400db5eb014f4a3f706380780 commit e239f49146e0b8a400db5eb014f4a3f706380780 Author: Harry Fellowes AuthorDate: 2025-09-14 18:12:33 +0000 Commit: Warner Losh CommitDate: 2025-09-15 03:07:13 +0000 UPDATING: fix typos Fixed typos in UPDATING Signed-off-by: Harry Fellowes Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1846 --- UPDATING | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/UPDATING b/UPDATING index f36cfdd9997d..999babfb6d7d 100644 --- a/UPDATING +++ b/UPDATING @@ -333,8 +333,8 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 16.x IS SLOW: 20250106: A new SOC_ROCKCHIP options appeared, so if you have a custom kernel configuration - targetting Rockchip SoC you need to add it so shared and mandatory drivers for - this SoC familly will be selected. + targeting Rockchip SoC you need to add it so shared and mandatory drivers for + this SoC family will be selected. Also a new rk8xx device was added, this select the base driver for Rockchip PMIC. 20241223: @@ -529,7 +529,7 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 16.x IS SLOW: 20230817: Serial communication (in boot loaders, kernel, and userland) has been changed to default to 115200 bps, in line with common industry - practice and typcial firmware serial console redirection + practice and typical firmware serial console redirection configuration. Note that the early x86 BIOS bootloader (i.e., boot0sio) does not @@ -613,7 +613,7 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 16.x IS SLOW: runs make -j${JOB_MAX} buildworld > ../buildworld.log 2>&1 - where JOB_MAX is derrived from ncpus in local.sys.mk if not set in env. + where JOB_MAX is derived from ncpus in local.sys.mk if not set in env. 20230316: Video related devices for some arm devices have been renamed. @@ -641,7 +641,7 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 16.x IS SLOW: 20230130: As of commit 7c40e2d5f685, the dependency on netlink(4) has been added to the linux_common(4) module. Users relying on linux_common may need - to complile netlink(4) module if it is not present in their kernel. + to compile netlink(4) module if it is not present in their kernel. 20230126: The WITHOUT_CXX option has been removed. C++ components in the base @@ -661,7 +661,7 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 16.x IS SLOW: 20221205: dma(8) has replaced sendmail(8) as the default mta. For people willing - to reenable sendmail(8): + to re-enable sendmail(8): $ cp /usr/share/examples/sendmail/mailer.conf /etc/mail/mailer.conf From nobody Mon Sep 15 04:05:24 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cQBJj3p13z67yxQ; Mon, 15 Sep 2025 04:05:25 +0000 (UTC) (envelope-from jamie@gritton.org) Received: from m2.gritton.org (gritton.org [67.43.236.212]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4cQBJj1Gd3z43Qc; Mon, 15 Sep 2025 04:05:25 +0000 (UTC) (envelope-from jamie@gritton.org) Authentication-Results: mx1.freebsd.org; none Received: from gritton.org (localgritton [127.0.0.212]) by m2.gritton.org (Postfix) with ESMTPSA id AE20F7F295; Sun, 14 Sep 2025 21:05:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=gritton.org; s=m2; t=1757909124; bh=JpVodKY+lLtlGHxKF0kflf7hUCo3OK9kNFzGcahxP50=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=J9c67R0bC5k3Cj9FUfVKCXRu2vSLeXdFQ0wgxhkB/Jc1x6Fe2wxihtxiJFjnoKIzZ jyiGLNuNRIE0iQ4wWOkp3teuIxfo5LEF6L25gJMdaNOIAJgeLYF5AQxDoUaCRo6Jg/ kQdsro1Dnlof5uYRaOdZ/D8nsAXBdLhEtTIyi8yc= List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Date: Sun, 14 Sep 2025 21:05:24 -0700 From: James Gritton To: Kyle Evans Cc: "Danilo G. Baio" , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: dbaaadd4373a - main - jls: minor simplification to arg handling In-Reply-To: References: <202507260314.56Q3E5cY002869@gitrepo.freebsd.org> <54e7f090-c031-47f2-bc51-c020a77ab00a@app.fastmail.com> Message-ID: X-Sender: jamie@gritton.org Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4cQBJj1Gd3z43Qc On 2025-09-14 19:30, Kyle Evans wrote: > On 9/14/25 20:00, Kyle Evans wrote: >> On 9/14/25 19:14, Danilo G. Baio wrote: >>> >>> >>> On Sat, Jul 26, 2025, at 00:14, Kyle Evans wrote: >>>> The branch main has been updated by kevans: >>>> >>>> URL: >>>> https://cgit.FreeBSD.org/src/commit/?id=dbaaadd4373a725950ad11e578dab61537b7c4f2 >>>> >>>> commit dbaaadd4373a725950ad11e578dab61537b7c4f2 >>>> Author:     Kyle Evans >>>> AuthorDate: 2025-07-26 03:13:41 +0000 >>>> Commit:     Kyle Evans >>>> CommitDate: 2025-07-26 03:13:41 +0000 >>>> >>>>      jls: minor simplification to arg handling >>>>      It's easier to reason about the state of argc/argv if we just >>>> augment >>>>      them by optind after our getopt() loop. >>>>      No functional change, but this sets the stage for another >>>> change to add >>>>      a `-c` mode to (c)heck for the existence of a jail quietly >>>> without >>>>      the caller having to worry about spurious output. >>>>      Reviewed by:    jamie >>>>      Differential Revision:  https://reviews.freebsd.org/D51540 >>>> --- >>>>   usr.sbin/jls/jls.c | 10 ++++++---- >>>>   1 file changed, 6 insertions(+), 4 deletions(-) >>>> >>>> diff --git a/usr.sbin/jls/jls.c b/usr.sbin/jls/jls.c >>>> index bd193a69c458..a1d1716713aa 100644 >>>> --- a/usr.sbin/jls/jls.c >>>> +++ b/usr.sbin/jls/jls.c >>>> @@ -140,8 +140,11 @@ main(int argc, char **argv) >>>>       ip4_ok = feature_present("inet"); >>>>   #endif >>>> >>>> +    argc -= optind; >>>> +    argv += optind; >>>> + >>>>       /* Add the parameters to print. */ >>>> -    if (optind == argc) { >>>> +    if (argc == 0) { >>>>           if (pflags & (PRINT_HEADER | PRINT_NAMEVAL)) >>>>               add_param("all", NULL, (size_t)0, NULL, JP_USER); >>>>           else if (pflags & PRINT_VERBOSE) { >>>> @@ -179,9 +182,8 @@ main(int argc, char **argv) >>>>           } >>>>       } else { >>>>           pflags &= ~PRINT_VERBOSE; >>>> -        while (optind < argc) >>>> -            add_param(argv[optind++], NULL, (size_t)0, NULL, >>>> -                JP_USER); >>>> +        for (i = 0; i < argc; i++) >>>> +            add_param(argv[i], NULL, (size_t)0, NULL, JP_USER); >>>>       } >>>> >>>>       if (pflags & PRINT_SKIP) { >>> >>> >>> Hi, >>> >>> Just replying to one of the recent changes on `jls`. >>> >>> We use `jls -n` in many scripts, and recently, it stopped working. >>> >>> The last build that was working for us: >>> FreeBSD 15.0-CURRENT #0 main-n278879-4be9c6f38e78: Sat Jul 19 >>> 13:19:25 UTC 2025 >>> >>> We are now encountering the following issue on this build: >>> FreeBSD 16.0-CURRENT #0 main-n280141-5e82eeccd252: Sat Sep  6 >>> 05:27:34 UTC 2025 >>> >>> $ jls -n >>> desc=0 devfs_ruleset=0 nodying enforce_statfs=0 env="" host=disable >>> ip4=disable ip6=disable jid=0 meta="" name="" osreldate=0 >>> osrelease="" parent=0 path="" nopersist securelevel=0 sysvmsg=disable >>> sysvsem=disable sysvshm=disable vnet=disable zfs=disable >>> allow.noadjtime allow.nochflags allow.noextattr allow.nomlock >>> allow.nomount allow.mount.nodevfs allow.mount.nofdescfs >>> allow.mount.nonullfs allow.mount.noprocfs allow.mount.notmpfs >>> allow.mount.nozfs allow.nonfsd allow.noquotas allow.noraw_sockets >>> allow.noread_msgbuf allow.noreserved_ports allow.norouting >>> allow.noset_hostname allow.nosettime allow.nosocket_af allow.nosuser >>> allow.nosysvipc allow.nounprivileged_parent_tampering >>> allow.nounprivileged_proc_debug children.cur=0 children.max=0 >>> cpuset.id=0 host.domainname="" host.hostid=0 host.hostname="" >>> host.hostuuid="" >>> ip4.addr=0.0.0.0,0.0.0.0,0.0.0.0,0.0.0.0,0.0.0.0,0.0.0.0,0.0.0.0 >>> ip4.nosaddrsel ip6.addr=::,::,::,::,::,:: ip6.nosaddrsel >>> zfs.mount_snapshot=0 >>> desc=0 devfs_ruleset=0 nodying enforce_statfs=0 env="" host=disable >>> ip4=disable ip6=disable jid=0 meta="" name="" osreldate=0 >>> osrelease="" parent=0 path="" nopersist securelevel=0 sysvmsg=disable >>> sysvsem=disable sysvshm=disable vnet=disable zfs=disable >>> allow.noadjtime allow.nochflags allow.noextattr allow.nomlock >>> allow.nomount allow.mount.nodevfs allow.mount.nofdescfs >>> allow.mount.nonullfs allow.mount.noprocfs allow.mount.notmpfs >>> allow.mount.nozfs allow.nonfsd allow.noquotas allow.noraw_sockets >>> allow.noread_msgbuf allow.noreserved_ports allow.norouting >>> allow.noset_hostname allow.nosettime allow.nosocket_af allow.nosuser >>> allow.nosysvipc allow.nounprivileged_parent_tampering >>> allow.nounprivileged_proc_debug children.cur=0 children.max=0 >>> cpuset.id=0 host.domainname="" host.hostid=0 host.hostname="" >>> host.hostuuid="" >>> ip4.addr=0.0.0.0,0.0.0.0,0.0.0.0,0.0.0.0,0.0.0.0,0.0.0.0,0.0.0.0 >>> ip4.nosaddrsel ip6.addr=::,::,::,::,::,:: ip6.nosaddrsel >>> zfs.mount_snapshot=0 >>> desc=0 devfs_ruleset=0 nodying enforce_statfs=0 env="" host=disable >>> ip4=disable ip6=disable jid=0 meta="" name="" osreldate=0 >>> osrelease="" parent=0 path="" nopersist securelevel=0 sysvmsg=disable >>> sysvsem=disable sysvshm=disable vnet=disable zfs=disable >>> allow.noadjtime allow.nochflags allow.noextattr allow.nomlock >>> allow.nomount allow.mount.nodevfs allow.mount.nofdescfs >>> allow.mount.nonullfs allow.mount.noprocfs allow.mount.notmpfs >>> allow.mount.nozfs allow.nonfsd allow.noquotas allow.noraw_sockets >>> allow.noread_msgbuf allow.noreserved_ports allow.norouting >>> allow.noset_hostname allow.nosettime >>> [...] >>> infinite loop >>> >> >> Adding jamie@, neither of the changes to jls(1) should've caused this, >> as far as I can reason about (and I haven't observed this here, yet).  >> This looks like a failure to terminate the print_jail loop at the end? > > I still can't functionally update, but looking at the recent jaildesc > work, I wonder > if this is a side effect that has since been fixed in > e75dda31c1eead9ad40580bd8 by > removing the "desc" parameter. It would have been included in > jailparam_all(), and > I wonder if that somehow broke jls-style iteration? I've verified that the patch stocks the problem, and took the liberty of MFCing it a day early. - Jamie From nobody Mon Sep 15 08:53:53 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cQJjY31QYz68HQy; Mon, 15 Sep 2025 08:53: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 4cQJjY2LFhz3c0Y; Mon, 15 Sep 2025 08:53:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1757926433; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uhzHiLap/N67kzfqtPCYLFhB94M9q5JlnYy/M+2cvtE=; b=UUEjXniimUu479Ne/444rNSCR4dCMA2YcqCvNOn3Tx+6jJKlTL/T79Zu2pYoonc7vQyfh5 ySYyqtm2rEX88jyeUoKMDkBPZXoXi3+vMCabN2bV8oGFfMvyv8Uo4nOGGZdJoNGzhGYlRs zYHBx1fCvUys/OhtolT757XSwxvbB0D8J3UI9/Bi6GZVkjhS9BFk8hvgBPkYfQOauVvG9p Nq/FtsTxliwoQwPdSfM6gA5giq7Fi6mh87Xt+s1QI7Dac/9/AicuS7uMeQX7IKnZrN4uSJ G35a9sUy4C7e+KyXyzKLIgmrmrWQXWGQYLo1hsZXgyLD89ZcD0f6pbUAmrHjaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1757926433; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uhzHiLap/N67kzfqtPCYLFhB94M9q5JlnYy/M+2cvtE=; b=e4qz8MELOFaRGE1mxJg5KLC8Jc/85wuGZp2G5aBG15SHzSIpCocLdIRok7N1MLCqJuukFV fJxTcruyS83XcW4jG1N6AyfQi25enON4ZmnbRa/34Olg+irGii1d6bssyA/+Oxgual0cAV d2zUaDXkxeF4qZGwXHt7DTc6lE0Flhdt4x7AfP481+ME7EBonNdXzk0e8mjaesuDvvu2vo czrvUsk9PsGX9d4ROoomVOh8uZYNYXIr0DcH+NJpZXvmXZgQ36BCMz+lpCl5qTyRazn/24 CHO3jjN2R34mj2EdY26EbQoDskuUd6GERjrzxc4ha1krkxbfpQGanmwL6MJpUg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1757926433; a=rsa-sha256; cv=none; b=sPfLUG46XwaB3HqD7auRQnd6DDz2Wr3+ysb87Wsffx2NJAQHCKRpR2O9LaSDaAEaBv/V5R l6ZNAviZacxb4d0uR9GEActVmjmq8mj5H/ugrKjckv++bQAct1LmvrBRTY6aGr89n7Lkty fo3QKG0RTZeNIh5HxDRf3s1GZzSwdYFNln5cphmN5hvV1QmmFVRy7wMmA+I0UTWoqbp+4N AE5vNrB9yuFY1JAmv8GTdl4DiUqE3sH4R/ZPLFBrspoPvBRoiszV68z7GBuUEtOMLEsvht PdHwM2+qRkBaqEI1vhtx4SdpighVNbLUnLMXa87tHBim+RsOvtN7VWcHFNRpaA== 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 4cQJjY1nq2znSK; Mon, 15 Sep 2025 08:53: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 58F8rrYP088308; Mon, 15 Sep 2025 08:53:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58F8rrtK088305; Mon, 15 Sep 2025 08:53:53 GMT (envelope-from git) Date: Mon, 15 Sep 2025 08:53:53 GMT Message-Id: <202509150853.58F8rrtK088305@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Peter Holm Subject: git: 7780766b403d - main - stress2: Do not exit the test program without clearing the trace flags Discussed with: kib List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pho X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7780766b403dd00b04cc597b44b6358010986616 Auto-Submitted: auto-generated The branch main has been updated by pho: URL: https://cgit.FreeBSD.org/src/commit/?id=7780766b403dd00b04cc597b44b6358010986616 commit 7780766b403dd00b04cc597b44b6358010986616 Author: Peter Holm AuthorDate: 2025-09-15 08:48:01 +0000 Commit: Peter Holm CommitDate: 2025-09-15 08:48:01 +0000 stress2: Do not exit the test program without clearing the trace flags Discussed with: kib --- tools/test/stress2/misc/kevent10.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/test/stress2/misc/kevent10.sh b/tools/test/stress2/misc/kevent10.sh index b7f74f487cec..cebbd040c37d 100755 --- a/tools/test/stress2/misc/kevent10.sh +++ b/tools/test/stress2/misc/kevent10.sh @@ -72,15 +72,15 @@ main(void) struct kevent events; char *fn = "/tmp/kevent10.trace"; - if (open(fn, O_RDWR | O_CREAT, 0666) == -1) - err(1, "%s", fn); + if (open(fn, O_RDWR | O_CREAT | O_TRUNC, 0666) == -1) + err(1, "open(%s)", fn); if (ktrace(fn, KTRFLAG_DESCEND | KTROP_SET, KTRFAC_GENIO, 0) == -1) err(1, "ktrace"); memset(&changes, 0, sizeof(struct kevent)); memset(&events, 0, sizeof(struct kevent)); if (kevent(0, &changes, -1, &events, 1, 0) == -1) - if (errno != EBADF) - err(1, "kevent"); + if (errno != EBADF && errno != EINVAL) + warn("kevent"); if (ktrace(fn, KTROP_CLEARFILE, KTRFAC_GENIO, 0) == -1) err(1, "ktrace clear"); From nobody Mon Sep 15 09:30:21 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cQKWf1t54z68KbL; Mon, 15 Sep 2025 09:30: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 4cQKWf1312z3gB8; Mon, 15 Sep 2025 09:30:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1757928622; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=buL/w5ofoNu2fnKMD3M6s8Qun1+XwtwmdmjpzGB2icw=; b=tFkcmuY4+yXYLqsWCxDHcSenqG3ofRAOQ7lMjzcrniNKhXwsAY/dIkcNav30+yIzYWx9k2 dO4R6VUMPySCAEhLqfJiVmJwrTOYIMwVRzoaVFn+WQJ8RUOXNBEtLlFKhZXOB3Hp12Uns+ TUZ3uXpCA5YUjUn4vHvKj/JgAud/N68WYmkBzcBZ2P3j5mEgFFkeEL5uWP92gC1MrbrpWQ KRW5GURClTjnHKqH11JPuMQ4Sr+J0O1RQ9wbxb8AUyaP6ejgu075D8eTCm8IZsE/WDPO2J vgbcQAR1XI5cGWv2uAdn6lxND7zbebLyOteEv/Yknrkt/YwVdAswfU+ZiKjQhw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1757928622; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=buL/w5ofoNu2fnKMD3M6s8Qun1+XwtwmdmjpzGB2icw=; b=snsZM66WD3Dc+zdxZPrUjKNXZF567lXSy8zvUEXVUS2k/aq2QwmfVuA59GUZtTui2aUWtI pKgavtUYmLdfa3z6a+yg9AY0DtLwk6Yun1As3qAz7iHOq47uvDVCRyubyeY+AtrK0RvnXR L6kWvF1foAvKbScG8spdfeAsab+2GGyMj28Y+bBv3b+dsoWE3UAoVZkpt/bQvkLIxftRur /OcEbv4/ffxzdVHdqQOkf6ZInfipLX+o6WIwmlz0v74EP6+YRsz5/zrdxStpLO8q/R6Ok9 EVjwU65FqdpwO9ULv67SQ0HUl3sCLHWlo+lQu4vJLRpvoqKJhPs4elZp/c1aMg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1757928622; a=rsa-sha256; cv=none; b=O4Zbc1jTTPC37p0UTU2sI53pswmwJWK2zBYXdtucSh7/9GDb+sk7gH+LlS10Xah9GQ06NX G5o+pMdyDrVBrUzWIqKB60yfUVuEG6JMSbxdFcKK5sz9r1uj/UFgXajYjJokkzfuFknbE5 TC29sesDah873WGiWPPmw86Ra6yg0Nr8pi/wOUuynPzour6cbLuXGWlDWcpKRLyfYBCizO LFSyNkgjqzwR2eL5gdBkzWLzgf32TTIuFCsM8fXl1goQY9W6v1kxbrq3Y25pFueSc2QF2K Fg2/yyomgH+MQN3ePzFc07WqsnSFuQujbcTlRP0nfjvHrkT0pJE6dyACn23mqA== 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 4cQKWf02SMzprN; Mon, 15 Sep 2025 09:30: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 58F9ULst055230; Mon, 15 Sep 2025 09:30:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58F9ULsG055227; Mon, 15 Sep 2025 09:30:21 GMT (envelope-from git) Date: Mon, 15 Sep 2025 09:30:21 GMT Message-Id: <202509150930.58F9ULsG055227@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: ef2f36be8fce - main - jail.2: Mention EPERM is returned on open directories List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ef2f36be8fce8cf7a62ce7d33ab1c4a181fac3e2 Auto-Submitted: auto-generated The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=ef2f36be8fce8cf7a62ce7d33ab1c4a181fac3e2 commit ef2f36be8fce8cf7a62ce7d33ab1c4a181fac3e2 Author: Olivier Certner AuthorDate: 2025-09-01 09:31:23 +0000 Commit: Olivier Certner CommitDate: 2025-09-15 09:29:44 +0000 jail.2: Mention EPERM is returned on open directories The manual page does not directly mention this reason for getting EPERM, instead referring the reader to chroot(2). We have had some questions about it recently, in part due to a bug (fixed), and this case is not an obvious permission/problem, so let's be more explicit. PR: 280809 Reviewed by: jamie MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D52319 --- lib/libsys/jail.2 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/libsys/jail.2 b/lib/libsys/jail.2 index d3f871608c1d..ee4e5b03d38e 100644 --- a/lib/libsys/jail.2 +++ b/lib/libsys/jail.2 @@ -23,7 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd September 9, 2025 +.Dd September 15, 2025 .Dt JAIL 2 .Os .Sh NAME @@ -555,6 +555,9 @@ and call .Xr chroot 2 internally, so they can fail for all the same reasons. +In particular, they return the +.Bq Er EPERM +error when the process to join a jail has open directories. Please consult the .Xr chroot 2 manual page for details. From nobody Mon Sep 15 09:30:22 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cQKWg1hpZz68KJb; Mon, 15 Sep 2025 09:30: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 4cQKWg0YVdz3gF0; Mon, 15 Sep 2025 09:30:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1757928623; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qNGFo8ln5KX1NMT2VLcO1+9GehxoQI/d2lLKT9Onn6s=; b=HIm1WB83FAXR4Y9F2fGkvDA8OZ2TwLIh1VP98fQ1QOCDvOgrttDqCExfrKDA05HsceBlWK rNwFlbB+bYS9OucrA+s+lr2GNEoaq8AncgBEsS/xqdYENjdAstawjRoQLe56EIbC4WSF/+ h8ZZbVZT19qijX71AZUvdmb+ZcR3oB0Z77cSA4j9SxwS4ghsnad62A+1rOEpBYzV42gmte ucvPwsx/z3gtR3tq4pebXdXoUC8OqOAOxt6ahRMSwgwzSPpXYqEFQuJxSTeg/wGovLuPdl ABHgLYQ3TCjl0rEKiK1So+8rvZCwzg7shc45qUSUjdSCMR9xaXbjPWtWuyHzgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1757928623; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qNGFo8ln5KX1NMT2VLcO1+9GehxoQI/d2lLKT9Onn6s=; b=bsBKJdolK7XuRjyNoN0fApYpLcc5lc6Wk8YjzSm7uKD0xKvAC+jGT1oD28tlEJ0/Sdkv9s CCGYgtyh+V8WnlxFxfeoT1Od/8PJu9LMYLNFxb3RWamR5JW8xA3KOQLqhu7fpjPB8cUEBq bjQOPo3IjUDkpvQVxVKcccuQYn2bS1AlbJqN1W8fcnMxkyhoOLBN26nNMJggjyMUdfVn6R U5wCsNHMPICVA5UHckL+hDeN7/89y3LjlZ9e0D+UzP304KRBugITxCQwkMh3Hb0d2yWHe7 HoCFCOmp5pgcEyBEFf785efj24hkQfCAwSaG9iW3WznFNrXNMnZ0hOZMptZk8g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1757928623; a=rsa-sha256; cv=none; b=qiTXWk2/NYyuEwl9QRhZpHi7oVtbL65a5iSCqpwwcUUAsTwByFJbDl1gc6oqdwNXfN5ypP iK0MnQQRjk4mbiFw0oO+sU44H8WTq9DLE9ffT15zM6Ut3vDxXaI3bukjm2Ut7E0+on0AS2 McV+QFLb+U4sXC1O7/YsE+1nE6Ck9jHZ1Blc9MZrOy92HdlAOR5JakZVGURSz01qGmbt5A a5f1tR0Rt+hyK+eaAEY9/BSmwRFEpdbRABngrPi97IgPVcoOgRLg2JCy//sLokJIG80l5F 8lAQttZrIwQWGMTlSfUV1qUx2UY7y9Qr7CubIoqUAtwSYsna0J+rE7XwEaVFxA== 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 4cQKWf72YszpXm; Mon, 15 Sep 2025 09:30: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 58F9UMnT055265; Mon, 15 Sep 2025 09:30:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58F9UM9C055262; Mon, 15 Sep 2025 09:30:22 GMT (envelope-from git) Date: Mon, 15 Sep 2025 09:30:22 GMT Message-Id: <202509150930.58F9UM9C055262@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: 4894f5ba3943 - main - acpi: Fix build when `ACPI_DEBUG_OUTPUT` defined List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4894f5ba394306a75dbed9ed4377ab0eae75aede Auto-Submitted: auto-generated The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=4894f5ba394306a75dbed9ed4377ab0eae75aede commit 4894f5ba394306a75dbed9ed4377ab0eae75aede Author: Aymeric Wibo AuthorDate: 2025-09-15 09:17:57 +0000 Commit: Olivier Certner CommitDate: 2025-09-15 09:29:49 +0000 acpi: Fix build when `ACPI_DEBUG_OUTPUT` defined Reviewed by: olce Fixes: ce5e22b28ef6 ("acpi: Use sleep types defined in sys/power.h") Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D52545 --- sys/dev/acpica/acpi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c index 702e1ecb5340..175bfe835e6f 100644 --- a/sys/dev/acpica/acpi.c +++ b/sys/dev/acpica/acpi.c @@ -3425,7 +3425,7 @@ acpi_EnterSleepState(struct acpi_softc *sc, enum power_stype stype) enum acpi_sleep_state slp_state; int sleep_result; - ACPI_FUNCTION_TRACE_U32((char *)(uintptr_t)__func__, state); + ACPI_FUNCTION_TRACE_U32((char *)(uintptr_t)__func__, stype); if (stype <= POWER_STYPE_AWAKE || stype >= POWER_STYPE_COUNT) return_ACPI_STATUS (AE_BAD_PARAMETER); @@ -3939,7 +3939,7 @@ acpi_system_eventhandler_sleep(void *arg, enum power_stype stype) struct acpi_softc *sc = (struct acpi_softc *)arg; int ret; - ACPI_FUNCTION_TRACE_U32((char *)(uintptr_t)__func__, state); + ACPI_FUNCTION_TRACE_U32((char *)(uintptr_t)__func__, stype); /* Check if button action is disabled or unknown. */ if (stype == ACPI_STATE_UNKNOWN) From nobody Mon Sep 15 11:49:03 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cQNc55tDLz67FMf; Mon, 15 Sep 2025 11:49:25 +0000 (UTC) (envelope-from dbaio@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cQNc556pzz42xR; Mon, 15 Sep 2025 11:49:25 +0000 (UTC) (envelope-from dbaio@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1757936965; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=m+v1FfL7YSmcELVN+/L/+3bupzJdnCviVTNnQGHP9rU=; b=Mv1J0Lo9wYrNScYVxknOlWWb0au+8HpqP5NYSxW750gzR2r+UKXoBkIa8d+DAmqlTS5mpA d7HHdS7aynSaHFwMsed0KTbsDbzwun/odAFRo5qWVz3EnNvKj6C2o1/WYOMQQmIuZgLfuA XxgGS7bG1VcRy8UeufjLeDjbxW/24j+ngrV0i54yysIkakQlmFsGBJmHETay3xqiT6PxYo 9vkWAxfUTemE1GiaRyrwSlfWLsji4IPLRa3DTr/OIRKO3suD327698nhnwKCfBcGab7gtQ KMF5n4kBMuKPAzyDkazU0xC86Kvg4UAhfesr7XOPrN5afWRcKJxpUeKzwDjp2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1757936965; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=m+v1FfL7YSmcELVN+/L/+3bupzJdnCviVTNnQGHP9rU=; b=LgLYN8+WvQcW6fW24iWox6kZwqghIG+7LfImsBt7U0yEeaX6jrS+j+SMoyWHOeVlaFehKx UWKGrtNN2NhkK1byVndOQwGPhODOai/9BGsxw7KX3Td/G3WttXkt3PnQvzYWGQGx82BwLs g41Yy7GIZ2h6f9mfTf41Ax+B6387wSPAS1zG344Z/Qj7owWQvdTCiD8l5qg5YECwjjagTB i/M3P+xta6ZYkNqFVM7zzeVEbXJWpnEyBIg8SYo5HoF7URpNa4YoiMHK8+fr03dKxdjL2d SDX9T4Zi8aXIc1DcVpZKfwfXk/yItKrpADKZYuPBBc4kXgeBjvCdxPErm+hIZw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1757936965; a=rsa-sha256; cv=none; b=Us1B3vt7ObduDO6eP0yiCPYMzDcxrE3cgpzXZEjtBn2lZFB1MbO5pbZV8aMoJ5fULzf+mn 3hWtE38KGotDcotuYQWzPCI3iCVjwAmL73DqhYPduHthJ/1ObzigyMrdJP6nYIUtcl19ro oiTdTzLyYFsw5EnM3yi5gItqTQkO3QIyX8H2BUom/OXNwZxyR9fonH/n1U3anwdlUOAAX6 dYdcVkZkM/LtHnmHPF31ykQh0TUW3FH4itESQ4nRTnXUoYkxTOLMxGXK8D/l4ar36zHYSF EZg7HV6ULg/S2QYFzbbh8Z8FmponUoeU/YeNjMB2rglMoJxbBqV/zdloAjeNLQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from fauth-a2-smtp.messagingengine.com (fauth-a2-smtp.messagingengine.com [103.168.172.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: dbaio/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4cQNc546jZz13XL; Mon, 15 Sep 2025 11:49:25 +0000 (UTC) (envelope-from dbaio@FreeBSD.org) Received: from phl-compute-02.internal (phl-compute-02.internal [10.202.2.42]) by mailfauth.phl.internal (Postfix) with ESMTP id B5AD5F40066; Mon, 15 Sep 2025 07:49:24 -0400 (EDT) Received: from phl-imap-15 ([10.202.2.104]) by phl-compute-02.internal (MEProxy); Mon, 15 Sep 2025 07:49:24 -0400 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdeggdefjeeiudcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpuffrtefokffrpgfnqfghnecuuegr ihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjug hrpefoggffhffvvefkjghfufgtgfesthhqredtredtjeenucfhrhhomhepfdffrghnihhl ohcuifdruceurghiohdfuceouggsrghioheshfhrvggvuefuffdrohhrgheqnecuggftrf grthhtvghrnhepgeeuheefudfffeevjeeikeejvdeuffetkeekieelueekheeuledtuefg vddufeeunecuffhomhgrihhnpehfrhgvvggsshgurdhorhhgnecuvehluhhsthgvrhfuih iivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepuggsrghiohdomhgvshhmthhprghu thhhphgvrhhsohhnrghlihhthidquddukedufeeluddvtddqvdeikedtvdejieekqdgusg grihhopeephfhrvggvuefuffdrohhrghesfhgrshhtmhgrihhlrdgtohhmpdhnsggprhgt phhtthhopeehpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopeguvghvqdgtohhmmh hithhsqdhsrhgtqdgrlhhlsehfrhgvvggsshgurdhorhhgpdhrtghpthhtohepuggvvhdq tghomhhmihhtshdqshhrtgdqmhgrihhnsehfrhgvvggsshgurdhorhhgpdhrtghpthhtoh epkhgvvhgrnhhssehfrhgvvggsshgurdhorhhgpdhrtghpthhtohepshhrtgdqtghomhhm ihhtthgvrhhssehfrhgvvggsshgurdhorhhgpdhrtghpthhtohepjhgrmhhivgesghhrih htthhonhdrohhrgh X-ME-Proxy: Feedback-ID: i9d2946a4:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id 8C495780271; Mon, 15 Sep 2025 07:49:24 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 X-ThreadId: Am1ynKg1lObs Date: Mon, 15 Sep 2025 08:49:03 -0300 From: "Danilo G. Baio" To: "James Gritton" , "Kyle Evans" Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Message-Id: In-Reply-To: References: <202507260314.56Q3E5cY002869@gitrepo.freebsd.org> <54e7f090-c031-47f2-bc51-c020a77ab00a@app.fastmail.com> Subject: Re: git: dbaaadd4373a - main - jls: minor simplification to arg handling Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On Mon, Sep 15, 2025, at 01:05, James Gritton wrote: > On 2025-09-14 19:30, Kyle Evans wrote: >> On 9/14/25 20:00, Kyle Evans wrote: >>> On 9/14/25 19:14, Danilo G. Baio wrote: >>>>=20 >>>>=20 >>>> On Sat, Jul 26, 2025, at 00:14, Kyle Evans wrote: >>>>> The branch main has been updated by kevans: >>>>>=20 >>>>> URL: >>>>> https://cgit.FreeBSD.org/src/commit/?id=3Ddbaaadd4373a725950ad11e5= 78dab61537b7c4f2 >>>>>=20 >>>>> commit dbaaadd4373a725950ad11e578dab61537b7c4f2 >>>>> Author:=C2=A0=C2=A0=C2=A0=C2=A0 Kyle Evans >>>>> AuthorDate: 2025-07-26 03:13:41 +0000 >>>>> Commit:=C2=A0=C2=A0=C2=A0=C2=A0 Kyle Evans >>>>> CommitDate: 2025-07-26 03:13:41 +0000 >>>>>=20 >>>>> =C2=A0=C2=A0=C2=A0=C2=A0 jls: minor simplification to arg handling >>>>> =C2=A0=C2=A0=C2=A0=C2=A0 It's easier to reason about the state of = argc/argv if we just=20 >>>>> augment >>>>> =C2=A0=C2=A0=C2=A0=C2=A0 them by optind after our getopt() loop. >>>>> =C2=A0=C2=A0=C2=A0=C2=A0 No functional change, but this sets the s= tage for another=20 >>>>> change to add >>>>> =C2=A0=C2=A0=C2=A0=C2=A0 a `-c` mode to (c)heck for the existence = of a jail quietly=20 >>>>> without >>>>> =C2=A0=C2=A0=C2=A0=C2=A0 the caller having to worry about spurious= output. >>>>> =C2=A0=C2=A0=C2=A0=C2=A0 Reviewed by:=C2=A0=C2=A0=C2=A0 jamie >>>>> =C2=A0=C2=A0=C2=A0=C2=A0 Differential Revision:=C2=A0 https://revi= ews.freebsd.org/D51540 >>>>> --- >>>>> =C2=A0 usr.sbin/jls/jls.c | 10 ++++++---- >>>>> =C2=A0 1 file changed, 6 insertions(+), 4 deletions(-) >>>>>=20 >>>>> diff --git a/usr.sbin/jls/jls.c b/usr.sbin/jls/jls.c >>>>> index bd193a69c458..a1d1716713aa 100644 >>>>> --- a/usr.sbin/jls/jls.c >>>>> +++ b/usr.sbin/jls/jls.c >>>>> @@ -140,8 +140,11 @@ main(int argc, char **argv) >>>>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ip4_ok =3D feature_present("inet"); >>>>> =C2=A0 #endif >>>>>=20 >>>>> +=C2=A0=C2=A0=C2=A0 argc -=3D optind; >>>>> +=C2=A0=C2=A0=C2=A0 argv +=3D optind; >>>>> + >>>>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 /* Add the parameters to print. */ >>>>> -=C2=A0=C2=A0=C2=A0 if (optind =3D=3D argc) { >>>>> +=C2=A0=C2=A0=C2=A0 if (argc =3D=3D 0) { >>>>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if (pflags = & (PRINT_HEADER | PRINT_NAMEVAL)) >>>>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 add_param("all", NULL, (size_t)0, NULL, JP_USER); >>>>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 else if (pf= lags & PRINT_VERBOSE) { >>>>> @@ -179,9 +182,8 @@ main(int argc, char **argv) >>>>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 } >>>>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 } else { >>>>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 pflags &=3D= ~PRINT_VERBOSE; >>>>> -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 while (optind < argc) >>>>> -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= add_param(argv[optind++], NULL, (size_t)0, NULL, >>>>> -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 JP_USER); >>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 for (i =3D 0; i < argc= ; i++) >>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= add_param(argv[i], NULL, (size_t)0, NULL, JP_USER); >>>>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 } >>>>>=20 >>>>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if (pflags & PRINT_SKIP) { >>>>=20 >>>>=20 >>>> Hi, >>>>=20 >>>> Just replying to one of the recent changes on `jls`. >>>>=20 >>>> We use `jls -n` in many scripts, and recently, it stopped working. >>>>=20 >>>> The last build that was working for us: >>>> FreeBSD 15.0-CURRENT #0 main-n278879-4be9c6f38e78: Sat Jul 19=20 >>>> 13:19:25 UTC 2025 >>>>=20 >>>> We are now encountering the following issue on this build: >>>> FreeBSD 16.0-CURRENT #0 main-n280141-5e82eeccd252: Sat Sep=C2=A0 6=20 >>>> 05:27:34 UTC 2025 >>>>=20 >>>> $ jls -n >>>> desc=3D0 devfs_ruleset=3D0 nodying enforce_statfs=3D0 env=3D"" host= =3Ddisable=20 >>>> ip4=3Ddisable ip6=3Ddisable jid=3D0 meta=3D"" name=3D"" osreldate=3D= 0=20 >>>> osrelease=3D"" parent=3D0 path=3D"" nopersist securelevel=3D0 sysvm= sg=3Ddisable=20 >>>> sysvsem=3Ddisable sysvshm=3Ddisable vnet=3Ddisable zfs=3Ddisable=20 >>>> allow.noadjtime allow.nochflags allow.noextattr allow.nomlock=20 >>>> allow.nomount allow.mount.nodevfs allow.mount.nofdescfs=20 >>>> allow.mount.nonullfs allow.mount.noprocfs allow.mount.notmpfs=20 >>>> allow.mount.nozfs allow.nonfsd allow.noquotas allow.noraw_sockets=20 >>>> allow.noread_msgbuf allow.noreserved_ports allow.norouting=20 >>>> allow.noset_hostname allow.nosettime allow.nosocket_af allow.nosuse= r=20 >>>> allow.nosysvipc allow.nounprivileged_parent_tampering=20 >>>> allow.nounprivileged_proc_debug children.cur=3D0 children.max=3D0=20 >>>> cpuset.id=3D0 host.domainname=3D"" host.hostid=3D0 host.hostname=3D= ""=20 >>>> host.hostuuid=3D""=20 >>>> ip4.addr=3D0.0.0.0,0.0.0.0,0.0.0.0,0.0.0.0,0.0.0.0,0.0.0.0,0.0.0.0=20 >>>> ip4.nosaddrsel ip6.addr=3D::,::,::,::,::,:: ip6.nosaddrsel=20 >>>> zfs.mount_snapshot=3D0 >>>> desc=3D0 devfs_ruleset=3D0 nodying enforce_statfs=3D0 env=3D"" host= =3Ddisable=20 >>>> ip4=3Ddisable ip6=3Ddisable jid=3D0 meta=3D"" name=3D"" osreldate=3D= 0=20 >>>> osrelease=3D"" parent=3D0 path=3D"" nopersist securelevel=3D0 sysvm= sg=3Ddisable=20 >>>> sysvsem=3Ddisable sysvshm=3Ddisable vnet=3Ddisable zfs=3Ddisable=20 >>>> allow.noadjtime allow.nochflags allow.noextattr allow.nomlock=20 >>>> allow.nomount allow.mount.nodevfs allow.mount.nofdescfs=20 >>>> allow.mount.nonullfs allow.mount.noprocfs allow.mount.notmpfs=20 >>>> allow.mount.nozfs allow.nonfsd allow.noquotas allow.noraw_sockets=20 >>>> allow.noread_msgbuf allow.noreserved_ports allow.norouting=20 >>>> allow.noset_hostname allow.nosettime allow.nosocket_af allow.nosuse= r=20 >>>> allow.nosysvipc allow.nounprivileged_parent_tampering=20 >>>> allow.nounprivileged_proc_debug children.cur=3D0 children.max=3D0=20 >>>> cpuset.id=3D0 host.domainname=3D"" host.hostid=3D0 host.hostname=3D= ""=20 >>>> host.hostuuid=3D""=20 >>>> ip4.addr=3D0.0.0.0,0.0.0.0,0.0.0.0,0.0.0.0,0.0.0.0,0.0.0.0,0.0.0.0=20 >>>> ip4.nosaddrsel ip6.addr=3D::,::,::,::,::,:: ip6.nosaddrsel=20 >>>> zfs.mount_snapshot=3D0 >>>> desc=3D0 devfs_ruleset=3D0 nodying enforce_statfs=3D0 env=3D"" host= =3Ddisable=20 >>>> ip4=3Ddisable ip6=3Ddisable jid=3D0 meta=3D"" name=3D"" osreldate=3D= 0=20 >>>> osrelease=3D"" parent=3D0 path=3D"" nopersist securelevel=3D0 sysvm= sg=3Ddisable=20 >>>> sysvsem=3Ddisable sysvshm=3Ddisable vnet=3Ddisable zfs=3Ddisable=20 >>>> allow.noadjtime allow.nochflags allow.noextattr allow.nomlock=20 >>>> allow.nomount allow.mount.nodevfs allow.mount.nofdescfs=20 >>>> allow.mount.nonullfs allow.mount.noprocfs allow.mount.notmpfs=20 >>>> allow.mount.nozfs allow.nonfsd allow.noquotas allow.noraw_sockets=20 >>>> allow.noread_msgbuf allow.noreserved_ports allow.norouting=20 >>>> allow.noset_hostname allow.nosettime >>>> [...] >>>> infinite loop >>>>=20 >>>=20 >>> Adding jamie@, neither of the changes to jls(1) should've caused thi= s,=20 >>> as far as I can reason about (and I haven't observed this here, yet)= .=C2=A0=20 >>> This looks like a failure to terminate the print_jail loop at the en= d? >>=20 >> I still can't functionally update, but looking at the recent jaildesc=20 >> work, I wonder >> if this is a side effect that has since been fixed in=20 >> e75dda31c1eead9ad40580bd8 by >> removing the "desc" parameter. It would have been included in=20 >> jailparam_all(), and >> I wonder if that somehow broke jls-style iteration? > > I've verified that the patch stocks the problem, and took the liberty = of=20 > MFCing it a day early. > > - Jamie Thanks to both of you for taking a look at this. --=20 Danilo G. Baio From nobody Mon Sep 15 11:54:19 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cQNjl6sv0z67Fj5; Mon, 15 Sep 2025 11:54: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 4cQNjl5wwRz43vZ; Mon, 15 Sep 2025 11:54:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1757937259; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mzZvZKB+72y6P2sLYUtfaCnIrMt4IsK2xQNvd8KEVvQ=; b=Z/EQ9TBXaWy730hpuhk82B9zVKBm4Y7WW6u0vQph9BrCo9jFhh5htecafNIWNHtlSkoFvo bwkSXN8G1VXPV0EwAjrcjQaF6RJ+TEbhLfhWT6IDaELPg2ExYCIL97DNoU1DzHMlVn5nbl J4YGW1S+XByXyMGbTIoWusDHam2yGliGJtKgFeFH0JFAXGzxPuejl4af2DkqHwEaafM70e M/PkTdIWpTKAGc+fuHYKsScKjxoEHTxtLY2nRqXJr9cBHY4Gv6RaIYvBidJol082nEn8QV da3QHfUre8TVNJ2Bq6NWi/wP9mgQ/+IAHZFe5LQHXTvgxjyurSRQF4UTpwxROg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1757937259; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mzZvZKB+72y6P2sLYUtfaCnIrMt4IsK2xQNvd8KEVvQ=; b=mrv38Yu4MEt4km0WYtR8fXQLnh6DrO5DRXCR1vmbjHD9gdDYv9gsONv7+gHGXwBS+bd+hg DTYqmv3m3r1ZuGCzfHHZRTcYbExN5Vk86GZNCFn1UWqnMa2rQAm2uqQGQdw2yyh9hs/Jci Cx/ukEUv0mB8mg4ROhzoc/ozopYvG/5UIZIfnkrdlDaeG0c0aM9nc9n51ve9yWDxdAz2HF 4+8aNV5vXnL3X2QZ90C0QzZGCXJfELn9ox0o2LUuqBWUKBK58xGIE6MjZBCITuVMI5bJvO Cs1QyLnDpu7Oh7N/VKVdWdN/QwrjBPZEE7mv5SsDbsIHhm8Be7Ci9VlZpAyJyw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1757937259; a=rsa-sha256; cv=none; b=NuFUB8T2kMvyJ2qJrgXlhYIzazK4NYF+JoulWZPxi9L1ljnrzq9yiwqum1Tkkvrm/EOJks Ep33BV0nvFlGsBDi+GuRLH4JxfMeG4P0ROmB4GxeT+vtBYRiItuGNcHcYntZxiVvrU8AMn FVYcwQzOVJwR8gDegUDtZ9io/xX6FhDzjVzdatOVV9hIEFnmJsVHsj/xMW4P7aSwzudqXY XRGE4yQpGogv5OLJlpO0MR1r6/7o5DurFbHMP2A0u7onRc6vT4429o8bLpdJxmyQWn6+t3 opQqTrcsQ3u6K4FWl8yEm05+fels6Exh8viiTd4pmvRKQhLPwcH4P8f+DQY7xA== 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 4cQNjl5PRLztJP; Mon, 15 Sep 2025 11:54: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 58FBsJDe025279; Mon, 15 Sep 2025 11:54:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58FBsJks025276; Mon, 15 Sep 2025 11:54:19 GMT (envelope-from git) Date: Mon, 15 Sep 2025 11:54:19 GMT Message-Id: <202509151154.58FBsJks025276@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: c2d03a920ec7 - main - pfctl: fix anchortypes bounds test List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c2d03a920ec75c431f0c6af0ad9cb6ae43e48dda Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=c2d03a920ec75c431f0c6af0ad9cb6ae43e48dda commit c2d03a920ec75c431f0c6af0ad9cb6ae43e48dda Author: Kristof Provost AuthorDate: 2025-08-20 14:26:00 +0000 Commit: Kristof Provost CommitDate: 2025-09-15 09:32:33 +0000 pfctl: fix anchortypes bounds test found by "buffer overflow 'anchortypes' 10 <= 12" smatch error feedback and ok sashan@, ok miod@ on an earlier version Obtained from: OpenBSD, jsg , 730c5d0121 Sponsored by: Rubicon Communications, LLC ("Netgate") --- sbin/pfctl/pfctl_parser.c | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/sbin/pfctl/pfctl_parser.c b/sbin/pfctl/pfctl_parser.c index ce58e0636022..6df7af0cc574 100644 --- a/sbin/pfctl/pfctl_parser.c +++ b/sbin/pfctl/pfctl_parser.c @@ -853,21 +853,22 @@ print_rule(struct pfctl_rule *r, const char *anchor_call, int verbose, int numer if (verbose) printf("@%d ", r->nr); - if (r->action == PF_MATCH) - printf("match"); - else if (r->action > PF_NORDR) - printf("action(%d)", r->action); - else if (anchor_call[0]) { - p = strrchr(anchor_call, '/'); - if (p ? p[1] == '_' : anchor_call[0] == '_') - printf("%s", anchortypes[r->action]); - else - printf("%s \"%s\"", anchortypes[r->action], - anchor_call); + if (anchor_call[0]) { + if (r->action >= nitems(anchortypes)) { + printf("anchor(%d)", r->action); + } else { + p = strrchr(anchor_call, '/'); + if (p ? p[1] == '_' : anchor_call[0] == '_') + printf("%s", anchortypes[r->action]); + else + printf("%s \"%s\"", anchortypes[r->action], + anchor_call); + } } else { - printf("%s", actiontypes[r->action]); - if (r->natpass) - printf(" pass"); + if (r->action >= nitems(actiontypes)) + printf("action(%d)", r->action); + else + printf("%s", actiontypes[r->action]); } if (r->action == PF_DROP) { if (r->rule_flag & PFRULE_RETURN) From nobody Mon Sep 15 11:54:20 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cQNjn0Tx2z67Flf; Mon, 15 Sep 2025 11:54:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cQNjm6vdDz442d; Mon, 15 Sep 2025 11:54:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1757937261; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dEyquR/JWZTUEgavovW0LVJK+hUo25vqb7bEGmp7NH8=; b=ec61XGX3uDo3zocY4w/yEWoKJAfL6veqdgVkIuUfkHh1Fq9qPFMCDjOAHNZ/vDjlafo2wm FySmMC+QsMV6h/FX5o/bNiR28VY9sl4nwhjD7oFwuch6ZKaYrs3WYz8x7QIfEM+cEkrtz0 8Db+GItAWcW1UeklpY219yvEGrLLg5ENIl124LYwlfdXYJPVq6ge85qQcEKPzkbCDwoNCs AAM/u3DQI4TWrYKnK0IGA5yDI8pzHYfupW8b361xG4aYeEqlEkA85gfBBJOUe/7oX1pgPE 1eEb4HElxikYZDVK/ZDoHOtCVVWLs/FakeAeHjqAOi1cYMlb5fT90vddr+hnmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1757937261; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dEyquR/JWZTUEgavovW0LVJK+hUo25vqb7bEGmp7NH8=; b=ZlO4xi+BDAGprqq98s0eO7vf5d+ogR06K5NVFcGrwNS1IxrQHYv2DBFaEoj7HkxJZ6pfPJ nt9D2lnP3Xo14jwPxmX2Jmp1BXpJPSWsnghf13xS9rzOL27AztITUUTgjBRxjdJ/n4vnkh K4p0ss/oPbfpFYidjLtIdEGn7KT+C4fUZt4Ha67Xd7W606AwBUrTUQVQhA2CI1KPN9DNyQ vWFWKY75JUmfBS+vhyGxfk2LDb0RiYEUmqv0OyKx28Lpm4GuhM2zacq7tMsdekdoAXANET Ja36ced8Irv3PgL3rnORnelljLAX40srCif/6F4Vijge6ZW/PS82lsqqCv/0pw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1757937261; a=rsa-sha256; cv=none; b=bRaWj7KG5RDxLYlqxrCVD5v8D2lcEmDXBXUcz1Wg8qKsAbwTFZBRguKeSQBZspVw0x0PAM X9vu8EsGuCWzJLdi+wPpIL52BftjZJ41S8QkXF1AznFb/mzb5bGEu6rRAuXmDaQSGImvFZ 9OCxNsbDtBGMN16TjHlJpZqgvo0G+TlpJm83Aks7qcr3CXLBHUHxwUd+oONk65+H6glNSu rCIt7EkuEa4MuBHc6XO50OeCR/gHrlxGFowPUz8ernGdiMkwdagBri62czCD3XwQAZJ57z f1BngrIITgO/ugm8gtd0pu4xGN8jvmZPHPYV0sNJ+syBp71vun/+bDCbLu9iDQ== 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 4cQNjm6MVSztdT; Mon, 15 Sep 2025 11:54:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58FBsK1G025312; Mon, 15 Sep 2025 11:54:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58FBsKYP025309; Mon, 15 Sep 2025 11:54:20 GMT (envelope-from git) Date: Mon, 15 Sep 2025 11:54:20 GMT Message-Id: <202509151154.58FBsKYP025309@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 79a0959affec - main - pfctl: add af-to and other missing action types in print_rule() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 79a0959affecd2b055b9048002c0635018576103 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=79a0959affecd2b055b9048002c0635018576103 commit 79a0959affecd2b055b9048002c0635018576103 Author: Kristof Provost AuthorDate: 2025-08-20 14:28:24 +0000 Commit: Kristof Provost CommitDate: 2025-09-15 09:32:34 +0000 pfctl: add af-to and other missing action types in print_rule() Sponsored by: Rubicon Communications, LLC ("Netgate") --- sbin/pfctl/pfctl_parser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/pfctl/pfctl_parser.c b/sbin/pfctl/pfctl_parser.c index 6df7af0cc574..a2b1e4d0841d 100644 --- a/sbin/pfctl/pfctl_parser.c +++ b/sbin/pfctl/pfctl_parser.c @@ -844,7 +844,7 @@ print_rule(struct pfctl_rule *r, const char *anchor_call, int verbose, int numer { static const char *actiontypes[] = { "pass", "block", "scrub", "no scrub", "nat", "no nat", "binat", "no binat", "rdr", "no rdr", - "", "", "match"}; + "synproxy drop", "defer", "match", "af-rt", "route-to" }; static const char *anchortypes[] = { "anchor", "anchor", "anchor", "anchor", "nat-anchor", "nat-anchor", "binat-anchor", "binat-anchor", "rdr-anchor", "rdr-anchor" }; From nobody Mon Sep 15 11:54:21 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cQNjp5rs9z67Fj6; Mon, 15 Sep 2025 11:54: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 4cQNjp0f1Vz442r; Mon, 15 Sep 2025 11:54:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1757937262; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MYN7t59ouROpZFehitW/O94UfH7lDnWgUqZFrkHWqn8=; b=jXRcuMyRly6/5lzubgj0DojJE00LUg2WPSZ/Otd/P6YfbrLVgbpZXYso2Ows0oyQzhJgZn oUAWo4UeVBEgztMqF3nzA8b5v5esbMJt3Vbtque2qPKU55XcgzhvEDDMbEOXVeirL56lij IFXyPu/L5ZwZkjWPrylfMmOwrJRk2JTRM4uukZ3Culm0FJjfxpBDioICKO5OGZGQl5ZzRQ PxSHiMnxOnwe/KicDmE8rfZs7xl2Fx3QPpCKeCml7NPTr7v4myTEfzI3XdNuAPxt7WYtbv tAcTSFwy6y4IAAtDMgdoDLFvosB7Gr2/CZiCHutCMaLBMr9eDpcWCKu2bxR3AA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1757937262; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MYN7t59ouROpZFehitW/O94UfH7lDnWgUqZFrkHWqn8=; b=CGN1P+DjJRvfULhnC6uFRnRne+v+30VfxSLRTcnqgwKaSSoZAwN2L7fNUFXnsTmvLwsWkR dKW6nNxzCV6Vq6SOOUz/hs3FPAUiKda4CKuodTWwyRDBf+s4ZFiTdf2X+yRnU56G42aQz7 KnSW1vAh0FcI8is7HPXCBOy4D31x2jLzSmKTsj3O2arCNwFFtl0cgW8XcQXCxGEtMVxNsQ 3VyNEnyfYdZMPVxqr6Wa/+IiWnmDkzm5HkK8kFp5vKJR3oQteNECZM7XgRiYbxk/3jjqGW r7TmBBHsA+qV7zQzrzMcqsH860U+4+hNXRHboJ4HClgRXFD/FF0VjnjVgTuMmA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1757937262; a=rsa-sha256; cv=none; b=WZ/sZGcpgtskW/Y30x2y44/oDyEGtJoEgOt813NWNFrmmziDJ7Kc0DMsf5SxwvH6GLgRHF 12QLBzIFDJD+SGJumtbeSIqL4hPIOR2r1aPNT2HEcL6GQCFN2dH+G/oIoJJYlJFITBLMO5 n+skJIVT/eq2O6RtbJIQalNMWQU7NLw1ilO1vF1R84viIXEsSaeZ7c1jdkZ1eUpTYVHUcO 81+1sulf4VSPx4UsmLJTZU92g9lozuWGihIg8rj3/JdBTeQxzc9LHOBfzBqxlwnI4OD2oG GB4p6zcUZxxn7FXEjPn5tKEkr7Ht0s6MSGtqJZuX8yi4WotonHB4EpkezS1XBQ== 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 4cQNjp0FlBztcT; Mon, 15 Sep 2025 11:54: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 58FBsLDW025345; Mon, 15 Sep 2025 11:54:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58FBsLTw025342; Mon, 15 Sep 2025 11:54:21 GMT (envelope-from git) Date: Mon, 15 Sep 2025 11:54:21 GMT Message-Id: <202509151154.58FBsLTw025342@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 864458ce5025 - main - pf.conf.5: document tcp.tsdiff List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 864458ce5025ab83c3d8cbaa514185b8cbc53acf Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=864458ce5025ab83c3d8cbaa514185b8cbc53acf commit 864458ce5025ab83c3d8cbaa514185b8cbc53acf Author: Kristof Provost AuthorDate: 2025-08-20 14:33:14 +0000 Commit: Kristof Provost CommitDate: 2025-09-15 09:32:34 +0000 pf.conf.5: document tcp.tsdiff from jesper wallin ok bluhm Obtained from: OpenBSD, jmc , 8c83d32726 Sponsored by: Rubicon Communications, LLC ("Netgate") --- share/man/man5/pf.conf.5 | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/share/man/man5/pf.conf.5 b/share/man/man5/pf.conf.5 index bdd8a843d72a..271a83a89ee5 100644 --- a/share/man/man5/pf.conf.5 +++ b/share/man/man5/pf.conf.5 @@ -27,7 +27,7 @@ .\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd July 30, 2025 +.Dd August 20, 2025 .Dt PF.CONF 5 .Os .Sh NAME @@ -274,6 +274,9 @@ The state after the first packet. .It Ar tcp.opening The state after the second packet but before both endpoints have acknowledged the connection. +.It Ar tcp.tsdiff +Maximum allowed time difference between RFC 1323 compliant packet timestamps. +30 seconds by default. .It Ar tcp.established The fully established state. .It Ar tcp.closing @@ -3580,7 +3583,7 @@ fragmentation = [ "fragment reassemble" ] timeout-list = timeout [ [ "," ] timeout-list ] timeout = ( "tcp.first" | "tcp.opening" | "tcp.established" | - "tcp.closing" | "tcp.finwait" | "tcp.closed" | + "tcp.closing" | "tcp.finwait" | "tcp.closed" | "tcp.tsdiff" | "sctp.first" | "sctp.opening" | "sctp.established" | "sctp.closing" | "sctp.closed" | "udp.first" | "udp.single" | "udp.multiple" | From nobody Mon Sep 15 11:54:24 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cQNjr43Bwz67Fdq; Mon, 15 Sep 2025 11:54: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 4cQNjr2CKNz44CV; Mon, 15 Sep 2025 11:54:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1757937264; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=S+7BHnIO15Szi6Qqtsj3g/IQ+S1di4+hTS1U08tN22U=; b=hCqrBQhnJxjPRju2oAcbJQf0Bw3W1wdVgjEaZNH2XMxRHUjykUAWkrSwTmFKnMdXkk6+WL kSTwVjOg/wE6seeDKeeylPMEzJgXx1jnsS7SuMvcZ+m83WzHCqjpyE/YrHFdC1xL3mzvK+ PCSaJOhwsRjq6hNkb1vfnSJsVOQt0mT2/18DTSXMCQ4Vo/BYOr0nRVbFmG1XYeWhjo8ZAE YS2R3w5zccSs2ZnIsMJ/mRXLyPDE4QmGdSh+tqNI8m9NvkHBxKYa6MTy73LS+fysAS1FLM 8VNwlR0OhXAD2EjWqtB6Q/3K1jxvvFPSn9j2/y0yPgfUGEJZsVmkB7GAdpx0kw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1757937264; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=S+7BHnIO15Szi6Qqtsj3g/IQ+S1di4+hTS1U08tN22U=; b=tQln6KI8N5P6O3cjQgbxp6C32DXxvyGVJq9giUqN8SZfUY++OUllay15A4pjUdGDV01RFT 4eCK5uLPs87v51Gnb55C68FCDAiMDTp0Q7lSdj7+lAMU4LtTOKSAvt1RzoMmuJZUq9Kkz5 TWRB9uRDwyuZwciM/bxMqlUwsDdjEmyu8N+XV2phrjqq1/MQz3rgHnoLA/sZOn0EHXmnC7 9qkQq7Zu1FpttxOOazpbj9eVhfFQQ2bf1Iw2iQ7vzXogmia5G8BJBy5HLZYEh0VisNF2eL MXYrHAknR3LMXoFPXrgGVnT1VzuOqxvO7qps/7qEm532ikk8vrVY+uDq8+lNKA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1757937264; a=rsa-sha256; cv=none; b=Q+r9SmIKwwNPpoJa0BIne70bkubxVOGsdsTyVLIaBAJXW4nePygUE3H8b6e2fsH5WEDSnv 0Kc2PIwG/fwYBDTl4adB3yOsuZqwW378VCMM/OmhLSciRqNP2ZKdo4sr9SKl3zxdBVoPwK TTKu1EXHvZvQnc6tRVk2h+Fkyw5NXKpru7yJ737ivPgQ1q+UsUimo5o2EvZ5MSuKy7ICb1 98pHsAD/5T/NOKm39mc99yd4+I6WqaoD7aPzFLF8KTfFkZ57Q/N97qHRCrowE0n1JSASAl 0Jsryl9HQHGrdIJ+PwJvmjLAp5h6ZmxFLVxrlMBJow5InYcHl4mgiLRFyWgwzA== 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 4cQNjr1pMzzt70; Mon, 15 Sep 2025 11:54: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 58FBsO6Y025411; Mon, 15 Sep 2025 11:54:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58FBsOMZ025408; Mon, 15 Sep 2025 11:54:24 GMT (envelope-from git) Date: Mon, 15 Sep 2025 11:54:24 GMT Message-Id: <202509151154.58FBsOMZ025408@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: c00aca9a714e - main - pf: Show pf fragment reassembly counters. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c00aca9a714ee3cdb867d4014898ec4e345465a5 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=c00aca9a714ee3cdb867d4014898ec4e345465a5 commit c00aca9a714ee3cdb867d4014898ec4e345465a5 Author: Kristof Provost AuthorDate: 2025-08-21 08:09:13 +0000 Commit: Kristof Provost CommitDate: 2025-09-15 09:32:34 +0000 pf: Show pf fragment reassembly counters. Framgent count and statistics are stored in struct pf_status. From there pfctl(8) and systat(1) collect and show them. Note that pfctl -s info needs the -v switch to show fragments. input claudio@; OK henning@ Obtained from: OpenBSD, bluhm , 19e99d0613 Sponsored by: Rubicon Communications, LLC ("Netgate") --- lib/libpfctl/libpfctl.c | 3 +++ lib/libpfctl/libpfctl.h | 2 ++ sbin/pfctl/pfctl_parser.c | 14 ++++++++++++++ sys/net/pfvar.h | 2 ++ sys/netpfil/pf/pf.h | 6 ++++++ sys/netpfil/pf/pf_ioctl.c | 6 ++++++ sys/netpfil/pf/pf_nl.c | 3 +++ sys/netpfil/pf/pf_nl.h | 2 ++ sys/netpfil/pf/pf_norm.c | 12 ++++++++++++ 9 files changed, 50 insertions(+) diff --git a/lib/libpfctl/libpfctl.c b/lib/libpfctl/libpfctl.c index 190ee46baf21..b96b973ddc7c 100644 --- a/lib/libpfctl/libpfctl.c +++ b/lib/libpfctl/libpfctl.c @@ -391,6 +391,8 @@ static const struct snl_attr_parser ap_getstatus[] = { { .type = PF_GS_CHKSUM, .off = _OUT(pf_chksum), .arg_u32 = PF_MD5_DIGEST_LENGTH, .cb = snl_attr_get_bytes }, { .type = PF_GS_BCOUNTERS, .off = _OUT(bcounters), .arg_u32 = 2 * 2, .cb = snl_attr_get_uint64_array }, { .type = PF_GS_PCOUNTERS, .off = _OUT(pcounters), .arg_u32 = 2 * 2 * 2, .cb = snl_attr_get_uint64_array }, + { .type = PF_GS_NCOUNTERS, .off = _OUT(ncounters), .cb = snl_attr_get_counters }, + { .type = PF_GS_FRAGMENTS, .off = _OUT(fragments), .cb = snl_attr_get_uint64 }, }; SNL_DECLARE_PARSER(getstatus_parser, struct genlmsghdr, snl_f_p_empty, ap_getstatus); #undef _OUT @@ -429,6 +431,7 @@ pfctl_get_status_h(struct pfctl_handle *h) TAILQ_INIT(&status->lcounters); TAILQ_INIT(&status->fcounters); TAILQ_INIT(&status->scounters); + TAILQ_INIT(&status->ncounters); while ((hdr = snl_read_reply_multi(&h->ss, seq_id, &e)) != NULL) { if (! snl_parse_nlmsg(&h->ss, hdr, &getstatus_parser, status)) diff --git a/lib/libpfctl/libpfctl.h b/lib/libpfctl/libpfctl.h index da16d5179ec0..dd76cab163b5 100644 --- a/lib/libpfctl/libpfctl.h +++ b/lib/libpfctl/libpfctl.h @@ -62,6 +62,8 @@ struct pfctl_status { struct pfctl_status_counters lcounters; struct pfctl_status_counters fcounters; struct pfctl_status_counters scounters; + struct pfctl_status_counters ncounters; + uint64_t fragments; uint64_t pcounters[2][2][2]; uint64_t bcounters[2][2]; }; diff --git a/sbin/pfctl/pfctl_parser.c b/sbin/pfctl/pfctl_parser.c index a2b1e4d0841d..9609e880584f 100644 --- a/sbin/pfctl/pfctl_parser.c +++ b/sbin/pfctl/pfctl_parser.c @@ -614,6 +614,20 @@ print_status(struct pfctl_status *s, struct pfctl_syncookies *cookies, int opts) printf("%14s\n", ""); } } + if (opts & PF_OPT_VERBOSE) { + printf("Fragments\n"); + printf(" %-25s %14ju %14s\n", "current entries", + s->fragments, ""); + TAILQ_FOREACH(c, &s->ncounters, entry) { + printf(" %-25s %14ju ", c->name, + c->counter); + if (runtime > 0) + printf("%14.1f/s\n", + (double)c->counter / (double)runtime); + else + printf("%14s\n", ""); + } + } printf("Counters\n"); TAILQ_FOREACH(c, &s->counters, entry) { printf(" %-25s %14ju ", c->name, c->counter); diff --git a/sys/net/pfvar.h b/sys/net/pfvar.h index e6fb1c2c3e1b..af207d6ece24 100644 --- a/sys/net/pfvar.h +++ b/sys/net/pfvar.h @@ -1751,6 +1751,7 @@ struct pf_kstatus { counter_u64_t lcounters[KLCNT_MAX]; /* limit counters */ struct pf_counter_u64 fcounters[FCNT_MAX]; /* state operation counters */ counter_u64_t scounters[SCNT_MAX]; /* src_node operation counters */ + counter_u64_t ncounters[NCNT_MAX]; uint32_t states; uint32_t src_nodes; uint32_t running; @@ -2440,6 +2441,7 @@ int pf_match_port(u_int8_t, u_int16_t, u_int16_t, u_int16_t); void pf_normalize_init(void); void pf_normalize_cleanup(void); +uint64_t pf_normalize_get_frag_count(void); int pf_normalize_tcp(struct pf_pdesc *); void pf_normalize_tcp_cleanup(struct pf_kstate *); int pf_normalize_tcp_init(struct pf_pdesc *, diff --git a/sys/netpfil/pf/pf.h b/sys/netpfil/pf/pf.h index 8edd5a5110a1..54ffdbed3de5 100644 --- a/sys/netpfil/pf/pf.h +++ b/sys/netpfil/pf/pf.h @@ -247,6 +247,12 @@ enum { PF_ADDR_ADDRMASK, PF_ADDR_NOROUTE, PF_ADDR_DYNIFTL, #define SCNT_SRC_NODE_REMOVALS 2 #define SCNT_MAX 3 +/* fragment counters */ +#define NCNT_FRAG_SEARCH 0 +#define NCNT_FRAG_INSERT 1 +#define NCNT_FRAG_REMOVALS 2 +#define NCNT_MAX 3 + #define PF_TABLE_NAME_SIZE 32 #define PF_QNAME_SIZE 64 diff --git a/sys/netpfil/pf/pf_ioctl.c b/sys/netpfil/pf/pf_ioctl.c index 06c40a03f575..5bfbb2c83f0e 100644 --- a/sys/netpfil/pf/pf_ioctl.c +++ b/sys/netpfil/pf/pf_ioctl.c @@ -421,6 +421,8 @@ pfattach_vnet(void) pf_counter_u64_init(&V_pf_status.fcounters[i], M_WAITOK); for (int i = 0; i < SCNT_MAX; i++) V_pf_status.scounters[i] = counter_u64_alloc(M_WAITOK); + for (int i = 0; i < NCNT_MAX; i++) + V_pf_status.ncounters[i] = counter_u64_alloc(M_WAITOK); if (swi_add(&V_pf_swi_ie, "pf send", pf_intr, curvnet, SWI_NET, INTR_MPSAFE, &V_pf_swi_cookie) != 0) @@ -2508,6 +2510,8 @@ pf_ioctl_clear_status(void) pf_counter_u64_zero(&V_pf_status.fcounters[i]); for (int i = 0; i < SCNT_MAX; i++) counter_u64_zero(V_pf_status.scounters[i]); + for (int i = 0; i < NCNT_MAX; i++) + counter_u64_zero(V_pf_status.ncounters[i]); for (int i = 0; i < KLCNT_MAX; i++) counter_u64_zero(V_pf_status.lcounters[i]); V_pf_status.since = time_uptime; @@ -6949,6 +6953,8 @@ pf_unload_vnet(void) pf_counter_u64_deinit(&V_pf_status.fcounters[i]); for (int i = 0; i < SCNT_MAX; i++) counter_u64_free(V_pf_status.scounters[i]); + for (int i = 0; i < NCNT_MAX; i++) + counter_u64_free(V_pf_status.ncounters[i]); rm_destroy(&V_pf_rules_lock); sx_destroy(&V_pf_ioctl_lock); diff --git a/sys/netpfil/pf/pf_nl.c b/sys/netpfil/pf/pf_nl.c index 73f018db0266..5c8f56ea4567 100644 --- a/sys/netpfil/pf/pf_nl.c +++ b/sys/netpfil/pf/pf_nl.c @@ -1234,6 +1234,9 @@ pf_handle_get_status(struct nlmsghdr *hdr, struct nl_pstate *npt) V_pf_status.fcounters); nlattr_add_counters(nw, PF_GS_SCOUNTERS, SCNT_MAX, pf_fcounter, V_pf_status.scounters); + nlattr_add_counters(nw, PF_GS_NCOUNTERS, NCNT_MAX, pf_fcounter, + V_pf_status.ncounters); + nlattr_add_u64(nw, PF_GS_FRAGMENTS, pf_normalize_get_frag_count()); pfi_update_status(V_pf_status.ifname, &s); nlattr_add_u64_array(nw, PF_GS_BCOUNTERS, 2 * 2, (uint64_t *)s.bcounters); diff --git a/sys/netpfil/pf/pf_nl.h b/sys/netpfil/pf/pf_nl.h index b60d3d4797c6..b769421bbfcc 100644 --- a/sys/netpfil/pf/pf_nl.h +++ b/sys/netpfil/pf/pf_nl.h @@ -352,6 +352,8 @@ enum pf_get_status_types_t { PF_GS_CHKSUM = 14, /* byte array */ PF_GS_PCOUNTERS = 15, /* u64 array */ PF_GS_BCOUNTERS = 16, /* u64 array */ + PF_GS_NCOUNTERS = 17, /* nested, */ + PF_GS_FRAGMENTS = 18, /* u64, */ }; enum pf_natlook_types_t { diff --git a/sys/netpfil/pf/pf_norm.c b/sys/netpfil/pf/pf_norm.c index 56074bedbc40..53010222dd07 100644 --- a/sys/netpfil/pf/pf_norm.c +++ b/sys/netpfil/pf/pf_norm.c @@ -211,6 +211,12 @@ pf_normalize_cleanup(void) mtx_destroy(&V_pf_frag_mtx); } +uint64_t +pf_normalize_get_frag_count(void) +{ + return (uma_zone_get_cur(V_pf_frent_z)); +} + static int pf_frnode_compare(struct pf_frnode *a, struct pf_frnode *b) { @@ -314,6 +320,7 @@ pf_free_fragment(struct pf_fragment *frag) /* Free all fragment entries */ while ((frent = TAILQ_FIRST(&frag->fr_queue)) != NULL) { TAILQ_REMOVE(&frag->fr_queue, frent, fr_next); + counter_u64_add(V_pf_status.ncounters[NCNT_FRAG_REMOVALS], 1); m_freem(frent->fe_m); uma_zfree(V_pf_frent_z, frent); @@ -331,6 +338,7 @@ pf_find_fragment(struct pf_frnode *key, uint32_t id) PF_FRAG_ASSERT(); frnode = RB_FIND(pf_frnode_tree, &V_pf_frnode_tree, key); + counter_u64_add(V_pf_status.ncounters[NCNT_FRAG_SEARCH], 1); if (frnode == NULL) return (NULL); MPASS(frnode->fn_fragments >= 1); @@ -438,6 +446,7 @@ pf_frent_insert(struct pf_fragment *frag, struct pf_frent *frent, ("overlapping fragment")); TAILQ_INSERT_AFTER(&frag->fr_queue, prev, frent, fr_next); } + counter_u64_add(V_pf_status.ncounters[NCNT_FRAG_INSERT], 1); if (frag->fr_firstoff[index] == NULL) { KASSERT(prev == NULL || pf_frent_index(prev) < index, @@ -496,6 +505,7 @@ pf_frent_remove(struct pf_fragment *frag, struct pf_frent *frent) } TAILQ_REMOVE(&frag->fr_queue, frent, fr_next); + counter_u64_add(V_pf_status.ncounters[NCNT_FRAG_REMOVALS], 1); KASSERT(frag->fr_entries[index] > 0, ("No fragments remaining")); frag->fr_entries[index]--; @@ -768,6 +778,7 @@ pf_join_fragment(struct pf_fragment *frag) frent = TAILQ_FIRST(&frag->fr_queue); TAILQ_REMOVE(&frag->fr_queue, frent, fr_next); + counter_u64_add(V_pf_status.ncounters[NCNT_FRAG_REMOVALS], 1); m = frent->fe_m; if ((frent->fe_hdrlen + frent->fe_len) < m->m_pkthdr.len) @@ -775,6 +786,7 @@ pf_join_fragment(struct pf_fragment *frag) uma_zfree(V_pf_frent_z, frent); while ((frent = TAILQ_FIRST(&frag->fr_queue)) != NULL) { TAILQ_REMOVE(&frag->fr_queue, frent, fr_next); + counter_u64_add(V_pf_status.ncounters[NCNT_FRAG_REMOVALS], 1); m2 = frent->fe_m; /* Strip off ip header. */ From nobody Mon Sep 15 11:54:23 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cQNjq5s3yz67Fdk; Mon, 15 Sep 2025 11:54: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 4cQNjq1YZLz448q; Mon, 15 Sep 2025 11:54:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1757937263; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fMsmWGQrVO+bpHeSAH1urIRGM6q8ePQGN2yZO4InGEw=; b=c5HQBW2mTzTfvBLkuolIR0iOlcGw5qiReIaSwe77KBMN7A1ZCtW+7+dElLhQdJKv+xCNTG H1LbAiZnQ9PcbxyiIh+jzJAZXGl5i2o/5kw1WqEIT5AXZMmMbhIddqJYMj9vmiN1PvhXkE nykeFrHBoou85WBhrDv63huOsryGp2YX5dDyVFit7ze40Snm7mXRo/dqWZ7F5EchXcIqu2 UE9QmrdsBcf0B1/K3LQINewhfOVHocPdqACOje/QNxmyFSF+jM5jt2e7Qlqq0XREeoHBs2 fdEWviYiOvMAUlyEgzhj4jv/9Bj/fo+T/oX0g283MjkCstiG4CXAiGMzmF8SSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1757937263; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fMsmWGQrVO+bpHeSAH1urIRGM6q8ePQGN2yZO4InGEw=; b=xHJGkmj/hEHMx3XYRU13SFuginejylTX79/XUqBXDmzbyQ3YIlrQzsAVPF+chuEowBbI9b Y71HYMIE0Du9HLyLrmXsDJnpIOmNh2YNx6ePKsDsDxsvuHEzu+smciIwHqoos4HVJHtZBv 1tT3V00PAq90Robcy2XrGx+iy9whuIEho9GYQZgGK4XqAaeAbUKGP18ImEr5K08ZyA+fti tUsX4bUTTapHc/CjKi7MX28986+vYVRN7s+eanelbi48FjoaQhQzur+MQ/oB6r1ROF6ThK tOyYeGJ36poDfQDjYtPC9aGftPi4eJfHwazRvurRLZ5X+n8pv9SLmhUwSQGL/g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1757937263; a=rsa-sha256; cv=none; b=SfmUGce7JG5iuNNGC6vrhgGi20+KLb5Zyq+1lJB4XltxPMT6t7lv9QH6tGSEwkMze+7yFy JZcJ7Xp0XqpyeZ4dee18+UWNNrj+VweECeOxw2sYCMgTB8Fi/24LuX90rtFUM/sM3JqKZc 1DqXeUT2r1FmVQh90Blem0vFjaIZwe8lBbLKvaAahfzMsVC15ZMgwVxtc0HuNmqxOK7OfT AEyfwG6f+736ayHB8ujeXQUx/xCkkPLQw3kGpoxahjigAGYBbSTN8pbda6bOZ2QTQrt6/C hnpWQIaHZLTnegzQMX2FAMZwF9kfhZbSwVwZh2UoNGlxKqBtoPQZLMaIZjvQ3g== 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 4cQNjq18lGztcW; Mon, 15 Sep 2025 11:54: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 58FBsN56025378; Mon, 15 Sep 2025 11:54:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58FBsN6I025375; Mon, 15 Sep 2025 11:54:23 GMT (envelope-from git) Date: Mon, 15 Sep 2025 11:54:23 GMT Message-Id: <202509151154.58FBsN6I025375@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 0a67f601fe4f - main - pf.conf.5: hint how to set tcp timeout collectively List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0a67f601fe4f2e8af72cb0f99785cba4c91f7d7c Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=0a67f601fe4f2e8af72cb0f99785cba4c91f7d7c commit 0a67f601fe4f2e8af72cb0f99785cba4c91f7d7c Author: Kristof Provost AuthorDate: 2025-08-20 14:34:33 +0000 Commit: Kristof Provost CommitDate: 2025-09-15 09:32:34 +0000 pf.conf.5: hint how to set tcp timeout collectively Hint that the tcp timeout values can be adjusted collectively via "set optimization". from jesper wallin ok bluhm Obtained from: OpenBSD, jmc , df80715c2d Sponsored by: Rubicon Communications, LLC ("Netgate") --- share/man/man5/pf.conf.5 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/share/man/man5/pf.conf.5 b/share/man/man5/pf.conf.5 index 271a83a89ee5..edaa160dddf2 100644 --- a/share/man/man5/pf.conf.5 +++ b/share/man/man5/pf.conf.5 @@ -267,6 +267,10 @@ which corresponds to the connection state. Each packet which matches this state will reset the TTL. Tuning these values may improve the performance of the firewall at the risk of dropping valid idle connections. +Alternatively, these values may be adjusted collectively +in a manner suitable for a specific environment using +.Cm set optimization +(see above). .Pp .Bl -tag -width xxxx -compact .It Ar tcp.first From nobody Mon Sep 15 11:54:25 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cQNjt19RHz67Fg9; Mon, 15 Sep 2025 11:54: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 4cQNjs34nZz44Fp; Mon, 15 Sep 2025 11:54:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1757937265; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+CRd18LE9luJlPyfDdrPrKED+PyuEFwOL0QT7gS4oMI=; b=DcOc5QOTy2NWRrDHMlIRjB9lUb6TDxpqW48xt4c7cGlYHqS5onVNjv1ytwCNXrEtDjHHPk 89IQtLZQxgET1CRXY+zFBMeDbDiRUCSITxv+vmD0+dhdRe+AizB8FI194k6xW0DSFUksum 2Fyy82LmGRoviHP8CtEyV4r+ZdOSGJ30JA7mGxTg7Ievy48tfEt3U27U9qsD6XRu3rJN5k EsucVVeK8ZlO8yp3ediUZ67KsslxpC88xZWNj/9MxA43ESclTbMtkTBXmsYfEQMyutojDY tp4sztIhb/ufgnPJhY5QkC26q81oQK/3eYkuq94AcceFXrCMTsUmjfXxSqc2gg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1757937265; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+CRd18LE9luJlPyfDdrPrKED+PyuEFwOL0QT7gS4oMI=; b=IpWJNIN11q2Jt+WD4MosnXK8ppr07jv+e3cff3DK9NxyYfOQSZbSSvgP0tG9K/0qujP+rf 55z8YTFssW3tYnAaenBshr3c6HEsefFyJC2WWLLh9HPtgm2w2veNbT1u2IJG+x7sATC/y4 7aw6tyCuLoN2uhgrJuCkQRd6ieWYf4PHHkFjpsLVxwrdfOYx3tlo3gaG4+nqdb0ZhT8tpf L33/gt01z7GHTJeMwc3YFS51Z8uuU/1yWDSPHAAfS+n9ztfcuKhEG5oiGUg3BaTdQhbjF+ OIbMrk13o77s4HqgBY04+VHle/qmvRByyLoq0DezbdGLpJ+unwWFm48It3lciw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1757937265; a=rsa-sha256; cv=none; b=c5pRJljlQKF+o/m8zvKePIng0f/9ewWhAT5pj7W2BlbB/jGmg5A/mDNPn0wftI0xrxo9zK YJD36W1VLRVWO1pfAb4UZKtTjO6aFkiqe1to8JBfpiKpiJDH9n0aQySRygzcvnpM04V5hj sSzw0qgbSDO6J9z4oYbBRch8+OKj8C4VdyUkRQsbCHS+/bC2P7oZfWDlxOdW2cNbPmNBci Dp/v80Xcpx/MB6cpwwKW2PIT2L6lm66rBe2pwtemudzkuBdvpYQC7LKl3fHHnuR6qb07aX 9IsMqCvR7VpSleEHFVvJSBbhHrM/8EV8sHJMwuQ2bgf2L57dTVgRpXeI8oCFqg== 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 4cQNjs2Xb4zt9y; Mon, 15 Sep 2025 11:54:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58FBsP5r025444; Mon, 15 Sep 2025 11:54:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58FBsPZv025441; Mon, 15 Sep 2025 11:54:25 GMT (envelope-from git) Date: Mon, 15 Sep 2025 11:54:25 GMT Message-Id: <202509151154.58FBsPZv025441@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 5e89648ee68e - main - pf tests: test fragment counters List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5e89648ee68e44d01d00d41d53b6934c604f8c50 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=5e89648ee68e44d01d00d41d53b6934c604f8c50 commit 5e89648ee68e44d01d00d41d53b6934c604f8c50 Author: Kristof Provost AuthorDate: 2025-08-21 08:10:08 +0000 Commit: Kristof Provost CommitDate: 2025-09-15 09:32:35 +0000 pf tests: test fragment counters Ensure that the fragmentation counters work as expected. Sponsored by: Rubicon Communications, LLC ("Netgate") --- tests/sys/netpfil/pf/fragmentation_pass.sh | 67 ++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) diff --git a/tests/sys/netpfil/pf/fragmentation_pass.sh b/tests/sys/netpfil/pf/fragmentation_pass.sh index 5deaba18301d..c749aac793ee 100644 --- a/tests/sys/netpfil/pf/fragmentation_pass.sh +++ b/tests/sys/netpfil/pf/fragmentation_pass.sh @@ -648,6 +648,72 @@ dummynet_fragmented_cleanup() pft_cleanup } +atf_test_case "counters" "cleanup" +counters_head() +{ + atf_set descr 'Test fragment counters' + atf_set require.user root +} + +counters_body() +{ + pft_init + + epair=$(vnet_mkepair) + vnet_mkjail alcatraz ${epair}a + + ifconfig ${epair}b inet 192.0.2.1/24 up + jexec alcatraz ifconfig ${epair}a 192.0.2.2/24 up + + jexec alcatraz pfctl -e + pft_set_rules alcatraz \ + "set reassemble yes" \ + "pass keep state" + + # All fragment counters are zero + counters=$(jexec alcatraz pfctl -si -v | grep -A 4 '^Fragments') + atf_check -s exit:0 -o match:"current entries[[:space:]]+0" \ + echo $counters + atf_check -s exit:0 -o match:"searches[[:space:]]+0" \ + echo $counters + atf_check -s exit:0 -o match:"inserts[[:space:]]+0" \ + echo $counters + atf_check -s exit:0 -o match:"removals[[:space:]]+0" \ + echo $counters + + # They remain zero after we've seen non-fragmented traffic + atf_check -s exit:0 -o ignore \ + ping -c 1 192.0.2.2 + counters=$(jexec alcatraz pfctl -si -v | grep -A 4 '^Fragments') + atf_check -s exit:0 -o match:"current entries[[:space:]]+0" \ + echo $counters + atf_check -s exit:0 -o match:"searches[[:space:]]+0" \ + echo $counters + atf_check -s exit:0 -o match:"inserts[[:space:]]+0" \ + echo $counters + atf_check -s exit:0 -o match:"removals[[:space:]]+0" \ + echo $counters + + # But once we've reassembled they're no longer zero + # (Count is 2, because in + out) + atf_check -s exit:0 -o ignore \ + ping -c 1 -s 2000 192.0.2.2 + counters=$(jexec alcatraz pfctl -si -v | grep -A 4 '^Fragments') + atf_check -s exit:0 -o match:"current entries[[:space:]]+0" \ + echo $counters + atf_check -s exit:0 -o match:"searches[[:space:]]+2" \ + echo $counters + atf_check -s exit:0 -o match:"inserts[[:space:]]+2" \ + echo $counters + atf_check -s exit:0 -o match:"removals[[:space:]]+2" \ + echo $counters +} + +counters_cleanup() +{ + pft_cleanup +} + atf_init_test_cases() { atf_add_test_case "too_many_fragments" @@ -665,4 +731,5 @@ atf_init_test_cases() atf_add_test_case "dummynet" atf_add_test_case "dummynet_nat" atf_add_test_case "dummynet_fragmented" + atf_add_test_case "counters" } From nobody Mon Sep 15 11:54:26 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cQNjv2VNjz67Flp; Mon, 15 Sep 2025 11:54: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 4cQNjt4sYYz43tG; Mon, 15 Sep 2025 11:54:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1757937266; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=R2Wrbt4yKQTsNx9wtj2Lw/HejWUqKWUb01+Y/AFJp5Y=; b=lQf+HBJjPsewydbrgxowZKaFzmhADMDpcIr8RopdS50friV2kqK/joY3JcpK9lWyJiOduD UNWdRnxCA+Hagwkq+UvKsW5/pd1DLMf0MPQIo0mxVcSjWO9uRBLBFBoIsEXEvegiJGfq8C f84njUiXdKG73lU0jJSN5ValI2Jc4t74vCv7kReAvKpms4hBclAnBtG68LRl2GH5ipqsbb 3t+sWNxJP7yW1+fxz30ejUluc4lGlAbZbtIqkJAZlWgcTwOD2S3l6i0eAfvPEBw4F7kkuo HREjfjAlw+PfHvkWh/buxPtOlCW/W7tsgOafIELeC/AJOFpur4u3oQsRSMjjPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1757937266; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=R2Wrbt4yKQTsNx9wtj2Lw/HejWUqKWUb01+Y/AFJp5Y=; b=tGV26pWrlWm8UlCfImfRIkGOTDXK9HgUjBg/wiNgKSWmGW39qiilKlZj/mcPZZq5+eafIe 6aGlnLG1Gl49bTkn56qm5ppgZhFWA2YETG5fbEkJqr78D+uK2tQZ6CpOK1A7KF+6XzTC2Y TOba+5lEO1E4I9qnoMq1P/9qnsyXblTdjX2eZmZFv9rOZ7XuYDdO+E5DkeIHtMPWUHW1SX yOraS5W5iiFuP4GszW32aEwkjLLjhAOEC8Hbi/EKpL6r2e6dPVzFca7jirxOPDy35O1dzw RkwJ1UTHzjvWk2wQBXtLWGEAPVjGzXshJoEt716apY3YK9luBO5Q5a663PoTkA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1757937266; a=rsa-sha256; cv=none; b=LuxXXOqHjO6jmJ3DkhZlvL6n5LOseQu//J5slwkeOUe0LmzjZKmKZtexVTTKn9aGVC4+9s +3Q/JmD+PCLbxrvkimhvYanQnwO8MhsrmOg9ZkQx26EQIeYBrboEwN6wqmaGHdOtE7WMp8 l4Wh8BrmftQ040T8AHGhPO9/yYKe3pA3219MeUCTrQQL2uTN2xUFZEmUzItHGjoM6sJxnk Qm2sjXliH1AVY++9TVFMm48XD1LBZMpd70nKrXp5Rj6TFngqBpAZVlHeXUhwEBSeu4Af7s 7yEuB6O2zYOwq4RkAPgac1Uywu9DPa62xi1zPkHZxiKsVVH/vWTy74TjBlvBfA== 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 4cQNjt3dHZztGS; Mon, 15 Sep 2025 11:54: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 58FBsQb0025478; Mon, 15 Sep 2025 11:54:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58FBsQAg025475; Mon, 15 Sep 2025 11:54:26 GMT (envelope-from git) Date: Mon, 15 Sep 2025 11:54:26 GMT Message-Id: <202509151154.58FBsQAg025475@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 2c42aecee696 - main - pfctl: ctime(3) and ctime_r(3) can fail when timestamps are way off. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2c42aecee69696aba85f1ad4c45033dd2db86b02 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=2c42aecee69696aba85f1ad4c45033dd2db86b02 commit 2c42aecee69696aba85f1ad4c45033dd2db86b02 Author: Kristof Provost AuthorDate: 2025-08-21 09:01:21 +0000 Commit: Kristof Provost CommitDate: 2025-09-15 09:32:35 +0000 pfctl: ctime(3) and ctime_r(3) can fail when timestamps are way off. Add missing error checks Input kettenis, millert OK millert Obtained from: OpenBSD, florian , a7b9eedcb4 Sponsored by: Rubicon Communications, LLC ("Netgate") --- sbin/pfctl/pfctl_table.c | 35 +++++++++++++++++++++++++---------- 1 file changed, 25 insertions(+), 10 deletions(-) diff --git a/sbin/pfctl/pfctl_table.c b/sbin/pfctl/pfctl_table.c index 0845f765a063..745ab84b3159 100644 --- a/sbin/pfctl/pfctl_table.c +++ b/sbin/pfctl/pfctl_table.c @@ -437,14 +437,19 @@ print_table(const struct pfr_table *ta, int verbose, int debug) int print_tstats(const struct pfr_tstats *ts, int debug) { - time_t time = ts->pfrts_tzero; - int dir, op; + time_t time = ts->pfrts_tzero; + int dir, op; + char *ct; if (!debug && !(ts->pfrts_flags & PFR_TFLAG_ACTIVE)) return (0); + ct = ctime(&time); print_table(&ts->pfrts_t, 1, debug); printf("\tAddresses: %d\n", ts->pfrts_cnt); - printf("\tCleared: %s", ctime(&time)); + if (ct) + printf("\tCleared: %s", ct); + else + printf("\tCleared: %lld\n", (long long)time); printf("\tReferences: [ Anchors: %-18d Rules: %-18d ]\n", ts->pfrts_refcnt[PFR_REFCNT_ANCHOR], ts->pfrts_refcnt[PFR_REFCNT_RULE]); @@ -543,12 +548,17 @@ nonzero_astats(struct pfr_astats *as) void print_astats(struct pfr_astats *as, int dns) { - time_t time = as->pfras_tzero; - int dir, op; + time_t time = as->pfras_tzero; + int dir, op; + char *ct; + ct = ctime(&time); print_addrx(&as->pfras_a, NULL, dns); - printf("\tCleared: %s", ctime(&time)); - if (as->pfras_a.pfra_fback == PFR_FB_NOCOUNT) + if (ct) + printf("\tCleared: %s", ct); + else + printf("\tCleared: %lld\n", (long long)time); + if (as->pfras_a.pfra_fback == PFR_FB_NOCOUNT) return; for (dir = 0; dir < PFR_DIR_MAX; dir++) for (op = 0; op < PFR_OP_ADDR_MAX; op++) @@ -653,8 +663,9 @@ pfctl_show_ifaces(const char *filter, int opts) void print_iface(struct pfi_kif *p, int opts) { - time_t tzero = p->pfik_tzero; - int i, af, dir, act; + time_t tzero = p->pfik_tzero; + int i, af, dir, act; + char *ct; printf("%s", p->pfik_name); if (opts & PF_OPT_VERBOSE) { @@ -665,7 +676,11 @@ print_iface(struct pfi_kif *p, int opts) if (!(opts & PF_OPT_VERBOSE2)) return; - printf("\tCleared: %s", ctime(&tzero)); + ct = ctime(&tzero); + if (ct) + printf("\tCleared: %s", ct); + else + printf("\tCleared: %lld\n", (long long)tzero); printf("\tReferences: %-18d\n", p->pfik_rulerefs); for (i = 0; i < 8; i++) { af = (i>>2) & 1; From nobody Mon Sep 15 11:54:27 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cQNjv6GN6z67FRB; Mon, 15 Sep 2025 11:54: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 4cQNjv53JNz44GV; Mon, 15 Sep 2025 11:54:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1757937267; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=spVJaeTMaY7zISx3BJc5aFuLcvx2GnuvjVrTfnLNr+A=; b=xlEAjVEB/vAh/D9TbCQzZ2hSXqXEOxAbeNhlJH/iM6gtfmdiUre8pDENSbOc/bryhy1eWH gKILy88eE3uQoV6ir1eYLFiLtA5ekPL41m5SuYCPti69E15euJtrzXjWJP/dgDl6gdjGMJ 5BA9AEg3GVuEfCiLiSGcD9Khrvi1Cly2E8cW3jmeC6/8ncEZH2Xf+Z1IHlBLVw102ZKkJf 8u2O3a2DJuf/CXJ1FFJNaSVi4Jns8K57Gd+uttfv8Hm8NvrkSqpZuM7/ifOu1BWkiCa0N0 chJRP+RdAr3GrZkSYk9qkDe/6+LRSoahyQ4UcY8LbxRfKYItxw3uQgsHQA0HnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1757937267; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=spVJaeTMaY7zISx3BJc5aFuLcvx2GnuvjVrTfnLNr+A=; b=Tl15lCjebDN9QbmuPnGSdxMc+Lit7WrApYpp60EYYLL9aIGB86iQt50+bTTLOkwkiPlb1B rvbZ4ewFOtK39Pj0ca6sGq8i/mDRlKsLTy0CURJ7hktzW1GOCeXD+hRnRffzRTivuQa+hg WJK/udKFu7lVZRB4W7jqL7/9+L4sZlBbSgHC0FL+SXHTFH5OgkCxkQl064DeIwX/X5v6nl FDf6bggxeUc/qzmCusLQTgRYUESCONwiqVua1GOecWQGcMIxHDrZdSFdUSWx5qjwFqUEJ6 ugLQ6A+WEjN8vB2dNbO0r99/WRJtqezsdRmG7vLYQbB1DwJ2yLNyR9cTvPjIvA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1757937267; a=rsa-sha256; cv=none; b=CDECyyYa/kY7DK+jCztXNzGvsSIBKLX40FaNDmzTwJXnCHRq2t6WmWviZDOfGfwOqbY/PC webvYksXzKD8uSX/9yDO74fSjKhqyPrF2qTQ0Wf4HAv9luF8503HJXKdNyt1tPQz8ygR9F s1vaeH0Zzkfp6W/S5mmzJ7Ya2nQqxI4UlOh/13/lPE89HPh+pOVJj+SntzXaMQYg+e+tbZ 3RQnFdDlNtbvhEmtyrdCbUSpQKTZTVN+umd4CSLDO9/2ndm5ptRD+/3siOZdmnJ+PdAOef gcR71GknHaB61QD5sReUTsi7Qru/uGm59zDtIjpLV3HiDw03r9rbNRxEfRQtRw== 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 4cQNjv4cWtztgs; Mon, 15 Sep 2025 11:54: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 58FBsRWA025511; Mon, 15 Sep 2025 11:54:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58FBsR7A025508; Mon, 15 Sep 2025 11:54:27 GMT (envelope-from git) Date: Mon, 15 Sep 2025 11:54:27 GMT Message-Id: <202509151154.58FBsR7A025508@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: a66df2b575c8 - main - pf: sync_ifp doesn't exist, remove externs List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a66df2b575c8add6331fc0a0a0f536e90ccfafb7 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=a66df2b575c8add6331fc0a0a0f536e90ccfafb7 commit a66df2b575c8add6331fc0a0a0f536e90ccfafb7 Author: Kristof Provost AuthorDate: 2025-08-21 09:33:06 +0000 Commit: Kristof Provost CommitDate: 2025-09-15 09:32:35 +0000 pf: sync_ifp doesn't exist, remove externs Obtained from: OpenBSD, jsg , 7ac7a88014 Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/net/pfvar.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/sys/net/pfvar.h b/sys/net/pfvar.h index af207d6ece24..e0fda082fefe 100644 --- a/sys/net/pfvar.h +++ b/sys/net/pfvar.h @@ -2392,8 +2392,6 @@ extern u_int16_t pf_cksum_fixup(u_int16_t, u_int16_t, u_int16_t, extern u_int16_t pf_proto_cksum_fixup(struct mbuf *, u_int16_t, u_int16_t, u_int16_t, u_int8_t); -VNET_DECLARE(struct ifnet *, sync_ifp); -#define V_sync_ifp VNET(sync_ifp); VNET_DECLARE(struct pf_krule, pf_default_rule); #define V_pf_default_rule VNET(pf_default_rule) extern void pf_addrcpy(struct pf_addr *, const struct pf_addr *, From nobody Mon Sep 15 11:54:28 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cQNjx1Y0Vz67FRD; Mon, 15 Sep 2025 11:54:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cQNjw63pcz44Gp; Mon, 15 Sep 2025 11:54:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1757937268; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TqgbwlzJ9ELssUIuIS0L0d9VDbgIq+s/AMB0sVWqhKM=; b=dSXmyszEuPvEOcDtavstdFwvjF+HqKw0CNcyq3Fxm3tRt0t3SwXU+aR+2x74hUPHAFNE+j ojc3GU/INA7OkBOUyfcGn6EPSRdHHqQX9zAI0A7oEoWAx/Pl4BVG7YnY/T1zPzrTln30bC KQFzWP1/aKsNN34HkGae/yifzdOV1ltmIOpwQVH5I4G7zdX9hUb/TwGg+Vmvfm+PECrkay pAxQ1xXBHd3lIrvs6u9dl67a3eSb0jX1a/2UZC/1SDqAzfMfEqRn7KPverLsAQ9DEZcFSi iDWK1VaNxw0nud8/h70VVZKQ9Vl/Jc2mnG4+kpwLzvF2k6AzoHSz8lEJGWz9Aw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1757937268; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TqgbwlzJ9ELssUIuIS0L0d9VDbgIq+s/AMB0sVWqhKM=; b=g9i/oZSs35hRxg/tqmqDxzdAbIccJVKegRQq1lk7DeIEMXCXzFffIzdieCMUhkUw5jjgK+ u/6ieNDUapsGX1X3rKphCuUFlnUzSk7ameXCkQnbhGJu90jfvrQqdd8DRwzDJRlX9bCO0m CxEQnh/La8qJJ4xvarcU2vc5/Z0CV1UKSlMjLAjG1MlNWEzWZAInJbGs94sujSVLdnPs4+ DG3wXjRYF8ySokyY2Acb/bu8Pf9Dle/7xzKJa31YdiY7H0vOazI8/l8poCuz+MBEsemDrb RWlSdXkrcX3SbfvhTPuUgLIUW9CXFpl0qnhKgw5wLOtpdpPnib7XZMbrI/1lPw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1757937268; a=rsa-sha256; cv=none; b=UKG6JYiSkeVoGfRliRunv6EpJjmyKNIg44w13ioFK1ERTJnKKAm1WP59LDQNpM1KuzFVTE /gcYhgVdynllb6ArKU7uvYgaC5yqf2zqIMqQ17HB7n5DGIlCWQNiWDnLMxAaVu5u9zmc8d GSXdkh1AqhEe+oHL3SCnxh9AYdEYvzo6cWgBpT7zzRG9wlvfQmhtPLrVuFP06ycd7jpWMW WEe7bQys7Vu5AFPEcDdP7ytomGUVBYCbAtMHnM72q3RrQoEhVxSs+VEk9Du3p1d16B7lKD H2mvHuYjBPlWO2fUDRQTIHhHwifAbERqbRDUAPZIa0CULLCucbeYON8hp+9h8g== 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 4cQNjw5cFBztdV; Mon, 15 Sep 2025 11:54: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 58FBsSqh025547; Mon, 15 Sep 2025 11:54:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58FBsSUX025544; Mon, 15 Sep 2025 11:54:28 GMT (envelope-from git) Date: Mon, 15 Sep 2025 11:54:28 GMT Message-Id: <202509151154.58FBsSUX025544@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 8e84e9443bb6 - main - pfctl: remove prototypes with no matching function List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8e84e9443bb6655f7e6c73546ac28549f768f4f3 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=8e84e9443bb6655f7e6c73546ac28549f768f4f3 commit 8e84e9443bb6655f7e6c73546ac28549f768f4f3 Author: Kristof Provost AuthorDate: 2025-08-21 09:35:07 +0000 Commit: Kristof Provost CommitDate: 2025-09-15 09:32:36 +0000 pfctl: remove prototypes with no matching function Obtained from: OpenBSD, jsg , 6768654732 Sponsored by: Rubicon Communications, LLC ("Netgate") --- sbin/pfctl/pfctl.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/sbin/pfctl/pfctl.h b/sbin/pfctl/pfctl.h index afecc78086e0..37e06e93dde6 100644 --- a/sbin/pfctl/pfctl.h +++ b/sbin/pfctl/pfctl.h @@ -62,7 +62,6 @@ struct pfr_anchoritem { SLIST_HEAD(pfr_anchors, pfr_anchoritem); -int pfr_get_fd(void); int pfr_add_table(struct pfr_table *, int *, int); int pfr_del_table(struct pfr_table *, int *, int); int pfr_get_tables(struct pfr_table *, struct pfr_table *, int *, int); @@ -85,7 +84,6 @@ int pfr_buf_load(struct pfr_buffer *, char *, int, int (*)(struct pfr_buffer *, char *, int, int), int); char *pf_strerror(int); int pfi_get_ifaces(const char *, struct pfi_kif *, int *); -int pfi_clr_istats(const char *, int *, int); void pfctl_print_title(char *); int pfctl_do_clear_tables(const char *, int); From nobody Mon Sep 15 11:54:29 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cQNjy2YLGz67FRH; Mon, 15 Sep 2025 11:54: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 4cQNjx6wKcz44Bb; Mon, 15 Sep 2025 11:54:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1757937270; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aqw+vKy9BCKguw5IZKnrNEkV6ifPi32mPyaB2lUGgIU=; b=tjTJNoj6+JMKWiu/4BapnYWWW+4zyGgcd+JQbdsX06nvGxJEdqZjgceWCD/1NK+lZEYi6Q SDxzmV94mQ+VPSrNTHmHbalJiAx+/ql99V7Rpmua+W5XcG4VyDC/8vlx1ln/0EDb9DcVZd EvzYcRaeKGTmP1aV/ZrkO2YSQOrJhyKTFdXmov8q9DpKdF3cmhF2inh1kcxcdS0huwJSaM Cs8nFC/nWja2MKy/biY06XhbEmtDX7dO0Rc58xsYueSgdjn+yA8TSMhaaDUEsBbl2wea6X lOFhBv66cYfc075pWyulyW+YuminAzHCj7WcaAKAzEkmDvL5AyufB/GrpXNfVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1757937270; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aqw+vKy9BCKguw5IZKnrNEkV6ifPi32mPyaB2lUGgIU=; b=ls+CXZg1tyveiX+l8oRVyvB5vx/uxIduSR8iAwJpSP6kjKQdzX0/lUgpEDWRiJgcWG0qmn hhNgfrEMv5AC2haVYWPH4ysbEzFVSZjYBsS4sIUc4k+rvDRde5XxRemIFfDPQOfPEjBAn1 ZYYXLWkAzr4PCutJKQ51u9qspnrwutGuVMG/aN/SX7wRcygAXvwb7SNjAYRxtIoYRG6p+G OlKbiuM6k1wy2cV/FZVx/908V5aNvUEMPSNcyYwX0YIPz1f0ZbNnUlCtrfg4n9m1POptOi 9aMJdRz8JasOTggtbw6HYSZ7yzFJWShZxbtyl8d5Wm2tmExoI2pB/d/B87BljQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1757937270; a=rsa-sha256; cv=none; b=pWwkY01x+jZK57/aU4M27tqfMRTodF11xZXiq9wbEzuvCSya1mV7rlYKviYIivQooNzfI3 Jm0G3DSQzEmW4E3W5dOXu/lJ9tQd6dAL1N+Qs0Q3kM14fHmK149TrMMOKAnO+tJbXFRftD QjLCHZ31AXxlbMvLuGfsMVlB8Wcz+FB1JgPVN7GrYbJCg7XWRJJw0ixAEFDa/qgigJ+7tI LmBWc21h8qveffPkmRbwFb0L9ixJuNdcxDiKXAe1sXbiPPTvYD2tqxKGkJEK8kmEdskkgu e24O4rg37i9DWvv+akstfd1U+sNZ1WCflRyz8v3Nj31z8lvQ9XBJj5DenjXOzQ== 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 4cQNjx6PsDztB0; Mon, 15 Sep 2025 11:54: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 58FBsTiY025580; Mon, 15 Sep 2025 11:54:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58FBsT2d025577; Mon, 15 Sep 2025 11:54:29 GMT (envelope-from git) Date: Mon, 15 Sep 2025 11:54:29 GMT Message-Id: <202509151154.58FBsT2d025577@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: d0ea3de0fe71 - main - pf tests: verify rule numbers in pflog output List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d0ea3de0fe71fe67537f84df59da69770784fa9a Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=d0ea3de0fe71fe67537f84df59da69770784fa9a commit d0ea3de0fe71fe67537f84df59da69770784fa9a Author: Kristof Provost AuthorDate: 2025-08-21 13:08:05 +0000 Commit: Kristof Provost CommitDate: 2025-09-15 09:32:36 +0000 pf tests: verify rule numbers in pflog output Sponsored by: Rubicon Communications, LLC ("Netgate") --- tests/sys/netpfil/pf/pflog.sh | 59 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) diff --git a/tests/sys/netpfil/pf/pflog.sh b/tests/sys/netpfil/pf/pflog.sh index a34ec893a75c..550548a59c11 100644 --- a/tests/sys/netpfil/pf/pflog.sh +++ b/tests/sys/netpfil/pf/pflog.sh @@ -394,6 +394,64 @@ rdr_action_cleanup() pft_cleanup } +atf_test_case "rule_number" "cleanup" +rule_number_head() +{ + atf_set descr 'Test rule numbers with anchors' + atf_set require.user root +} + +rule_number_body() +{ + pflog_init + + epair=$(vnet_mkepair) + + vnet_mkjail alcatraz ${epair}b + jexec alcatraz ifconfig ${epair}b 192.0.2.1/24 up + + ifconfig ${epair}a 192.0.2.2/24 up + ifconfig ${epair}a inet alias 192.0.2.3/24 up + ifconfig ${epair}a inet alias 192.0.2.4/24 up + + jexec alcatraz pfctl -e + jexec alcatraz ifconfig pflog0 up + pft_set_rules alcatraz \ + "pass log from 192.0.2.2" \ + "anchor \"foo\" {\n \ + pass log from 192.0.2.3\n \ + }" \ + "pass log from 192.0.2.4" + + jexec alcatraz tcpdump -n -e -ttt --immediate-mode -l -U -i pflog0 >> pflog.txt & + sleep 1 # Wait for tcpdump to start + + atf_check -s exit:0 -o ignore \ + ping -c 1 -S 192.0.2.2 192.0.2.1 + atf_check -s exit:0 -o ignore \ + ping -c 1 -S 192.0.2.3 192.0.2.1 + atf_check -s exit:0 -o ignore \ + ping -c 1 -S 192.0.2.4 192.0.2.1 + + jexec alcatraz pfctl -sr -a '*' -vv + + # Give tcpdump a little time to finish writing to the file + sleep 1 + cat pflog.txt + + atf_check -o match:"rule 0/0\(match\): pass in.*: 192.0.2.2.*ICMP echo request" \ + cat pflog.txt + atf_check -o match:"rule 1.foo.0/0\(match\): pass in.*: 192.0.2.3.*: ICMP echo request" \ + cat pflog.txt + atf_check -o match:"rule 2/0\(match\): pass in.*: 192.0.2.4.*: ICMP echo request" \ + cat pflog.txt +} + +rule_number_cleanup() +{ + pft_cleanup +} + atf_init_test_cases() { atf_add_test_case "malformed" @@ -403,4 +461,5 @@ atf_init_test_cases() atf_add_test_case "unspecified_v4" atf_add_test_case "unspecified_v6" atf_add_test_case "rdr_action" + atf_add_test_case "rule_number" } From nobody Mon Sep 15 13:11:00 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cQQQF1052z67Ksj; Mon, 15 Sep 2025 13:11: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 4cQQQF0JvJz3DT5; Mon, 15 Sep 2025 13:11:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1757941861; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rC0mOiFvrJLhfvV9x17uW+PPB3AZFublLO+OoRb4k1Q=; b=fwEqg/pHCU06nDkO2LAnQ3ASBI9Qy7rxpNqMMTKiaThNtOj7suerJap/ad0YLWrqQGjmvD hVk8LK2Rd6Gd1MVfwTpY4iL+Ifhy7q61CJho0B7vAOTM1JmnzSc4tjPKPzsIkqeA+rLLZx gcFFKzjJ99GUXv0Hpr6mzJUn98T70Q3Myyy4ngq0Q2/mkt2xIvRFHX/hg0ColzGxEwcezu tOmLx7jBs3Prax3bWHpIP+hPL1mVR/FsGkEC6G7PofoG8pYdW7TFfWcGam7dndllh7lW5R ep2zWATvrSW6YvX9ncfM237dbKbsdeACyQDVAQSZoUgAbBi45CTqOLiS5FbjmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1757941861; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rC0mOiFvrJLhfvV9x17uW+PPB3AZFublLO+OoRb4k1Q=; b=myYJYk3gCwioXBpvogAClneLvT8jgwdA3yrJgzWJIFq0VwTZV3JO5dzmWRKv3cTJe4+CAJ mEudLUgWGg6ADhUmmP9jNutJ4c77D+T/tp+Z1WXCWkIY+qe957+R4u6XhwpvGx+LJrujLq DmuBFB6MjLWFuBo4Dv2/McKG3HYHqqs3cTNnjMgF8ZAsM1+ZvdwJd6GGa49wfTaj6RW0zH MWz7bZugTwTzAHes2kR82/L9LjODwyGyHDwLnxSGncAYnNq/hXXYNmJ5Hfauv6W9Q5gc5P pGdzO6xhKW4UVh3pmPDD2Bp4V3BDtHqvJDOPWnUUZGcuRY+CQBPbFxPrbCbnIw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1757941861; a=rsa-sha256; cv=none; b=Hgwf6DlHV8FeemTC7XTHu6blwFAMTOZTKqqzNs/unE8yub8dCjkyMwAD0i08V69n4PnTlZ b4ZZreErRGmVLDNceeWhA5Ym5qyPyhpIhv0DvGJ3SUpPXD0oq8y/6zAfknqHkEy1wf+hyC gdttEUomoViGH+hnxvTXAAbBSfBZVJksYCNu317KsRd5CI1WsaU1k3h1j705I8PMm4y3I/ Kf2lnszTTlcUleF/GkYZLDPbKCxCXmHz472eHmUKWmVUlUQVdMTWhstYpHcJ1ShGOeJG21 49NnM2SYMdo9UJZ9p5Mm1WKWxZclS0/3IZsqvS2tl6JTXY8M2R8XVnJo5mIlyg== 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 4cQQQD72X0zvQ0; Mon, 15 Sep 2025 13:11: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 58FDB0WE072207; Mon, 15 Sep 2025 13:11:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58FDB0eo072204; Mon, 15 Sep 2025 13:11:00 GMT (envelope-from git) Date: Mon, 15 Sep 2025 13:11:00 GMT Message-Id: <202509151311.58FDB0eo072204@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: dafd960a3d65 - main - libsamplerate: Define as PRIVATELIB List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: dafd960a3d65cdaccb1f8b9395fad14092ec9eb2 Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=dafd960a3d65cdaccb1f8b9395fad14092ec9eb2 commit dafd960a3d65cdaccb1f8b9395fad14092ec9eb2 Author: Christos Margiolis AuthorDate: 2025-09-15 13:09:38 +0000 Commit: Christos Margiolis CommitDate: 2025-09-15 13:09:38 +0000 libsamplerate: Define as PRIVATELIB Fixes the following warnings: ld: error: relocation R_X86_64_32S cannot be used against local symbol; recompile with -fPIC >>> defined in /usr/obj/usr/src/amd64.amd64/lib/libsamplerate/libsamplerate.a(samplerate.o) >>> referenced by samplerate.c:498 (/usr/src/contrib/libsamplerate/samplerate.c:498) >>> >>> samplerate.o:(src_new) in archive /usr/obj/usr/src/amd64.amd64/lib/libsamplerate/libsamplerate.a Related discussion: https://reviews.freebsd.org/D52306 Sponsored by: The FreeBSD Foundation Reviewed by: fuz Differential Revision: https://reviews.freebsd.org/D52307 --- etc/mtree/BSD.usr.dist | 2 ++ lib/libsamplerate/Makefile | 2 +- share/mk/src.libnames.mk | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/etc/mtree/BSD.usr.dist b/etc/mtree/BSD.usr.dist index 7d3a72f43fa1..19da845e962f 100644 --- a/etc/mtree/BSD.usr.dist +++ b/etc/mtree/BSD.usr.dist @@ -26,6 +26,8 @@ .. .. .. + samplerate + .. sqlite3 .. ucl diff --git a/lib/libsamplerate/Makefile b/lib/libsamplerate/Makefile index 256f2087284f..6ca87d8b20ca 100644 --- a/lib/libsamplerate/Makefile +++ b/lib/libsamplerate/Makefile @@ -1,7 +1,7 @@ .PATH: ${SRCTOP}/contrib/libsamplerate LIB= samplerate -INTERNALLIB= +PRIVATELIB= SRCS= samplerate.c \ src_linear.c \ diff --git a/share/mk/src.libnames.mk b/share/mk/src.libnames.mk index 9ca043e7733c..d6597caf7e2a 100644 --- a/share/mk/src.libnames.mk +++ b/share/mk/src.libnames.mk @@ -29,6 +29,7 @@ _PRIVATELIBS= \ heimipcs \ kldelf \ ldns \ + samplerate \ sqlite3 \ ssh \ ucl \ @@ -72,7 +73,6 @@ _INTERNALLIBS= \ pfctl \ pkgecc \ pmcstat \ - samplerate \ sl \ sm \ smdb \ From nobody Mon Sep 15 13:11:02 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cQQQG3PjMz67L1H; Mon, 15 Sep 2025 13:11: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 4cQQQG16W4z3D7s; Mon, 15 Sep 2025 13:11:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1757941862; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZQ4A3mbexEQT7FeqNm4xIA4c37mlrxbiWsmp8SjjDBg=; b=D3TBp+O15Zg7zkx2dsgYa78sJs1hgXV7ZqKnDss2OMvUzLwn+peeJ+icZ3XLwesFG92tPD lcXd71n8K3/cQj614v9V9b16OLDhsZB0kU4sOiqXTMf0aUyiKbAOvGlHgB7wcyjxp1cd1J RotDZ66hr03tL3/9U+VNRHRK0cGvuThBgkcx+tRLHg7iLrVPMucrqfa2b2Hkgs9yKR64Xr dagzC9jqDKmKkXV16EHiREUUzsTG1SCEw489VSzxmhM/vyy+QCEuCCz18Y9YVfTjyAiuTq +WYGIqxxpbTF2iBw2FlWQHO4x3qxe3zXAx5OWKWnqT2lAPbImuFQWZLqJEml0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1757941862; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZQ4A3mbexEQT7FeqNm4xIA4c37mlrxbiWsmp8SjjDBg=; b=BeLTmbVAXFZ1NY5fXYcbB7nCJX3/qTqbKUrdcETSBorWT9b96a1LBSqXvi32YcqXRyA2cC BtHcs8JEObcLPsGYemICkZjBU4UB2AQA4+PFsOiAXHWfpNeamlleRGiu6guRWz7BfnyMyW 1iCkGliDiTTgrFUWZfk2azOtSlM4oX4wG2gkUWsqqePb7Z9hFwTcOpfOyhaB+KelSADgXi XvvEV/rqacr2hXc/x8piqAwc+5Db3C4sdA+QQi1NZVvKPdL1BPQ5uSd/mUbV++JeOONl/H vI7G3nK6QJYbr1Ynzmx4clZqsOvLCk5vSuW/Xb7n4Lhfm3TaC084/QkFt6S4DQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1757941862; a=rsa-sha256; cv=none; b=xcYlu8cHLiaDczFxnEbpXiXVBj8tjcXUtrmBuezybOgG+k4vVgJzvtjTyEUYkkssSYUgt6 iXXFdceieaqUpe/tq8dT3SCCb2n3LIDzbDz+8gVMVpvw/kAFkh4JQlQmP543E+ydlRIBkm 8N6zumNSmNJXuqhxmCtMzLvAJtFaM8d1+LGj0d4/gTK3g4tCfH9OY1Z3LfxRo4brNxdMKz 9syclK1V5tj7vnmlu+Sp6E0TVM6lRMsWVRnSMC0DE14CAhxlCvfiJvCcA2f9hzZPuJ1tAX kHQIqJrA0wjWu2BJECYz9YU9Bzbh3Z6YgaqK0pGpDctVShs6DnIZS0E7U/sIrA== 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 4cQQQG0Z5hzw0w; Mon, 15 Sep 2025 13:11: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 58FDB2ki072241; Mon, 15 Sep 2025 13:11:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58FDB2S7072238; Mon, 15 Sep 2025 13:11:02 GMT (envelope-from git) Date: Mon, 15 Sep 2025 13:11:02 GMT Message-Id: <202509151311.58FDB2S7072238@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: 680f9acc3657 - main - ng_hci: Cast NG_HCI_BDADDR_ANY to const bdaddr_t * List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 680f9acc3657efcea07d8ac0954645b6eaf8dac8 Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=680f9acc3657efcea07d8ac0954645b6eaf8dac8 commit 680f9acc3657efcea07d8ac0954645b6eaf8dac8 Author: Christos Margiolis AuthorDate: 2025-09-15 13:09:42 +0000 Commit: Christos Margiolis CommitDate: 2025-09-15 13:09:42 +0000 ng_hci: Cast NG_HCI_BDADDR_ANY to const bdaddr_t * This is needed to address some compiler errors cleanly, where consumer functions want this address to be a const pointer. Sponsored by: The FreeBSD Foundation MFC after: 3 days Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D52310 --- sys/netgraph/bluetooth/include/ng_hci.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netgraph/bluetooth/include/ng_hci.h b/sys/netgraph/bluetooth/include/ng_hci.h index 44a14e62f4ed..ce3291770740 100644 --- a/sys/netgraph/bluetooth/include/ng_hci.h +++ b/sys/netgraph/bluetooth/include/ng_hci.h @@ -448,7 +448,7 @@ typedef struct { typedef bdaddr_t * bdaddr_p; /* Any BD_ADDR. Note: This is actually 7 bytes (count '\0' terminator) */ -#define NG_HCI_BDADDR_ANY ((bdaddr_p) "\000\000\000\000\000\000") +#define NG_HCI_BDADDR_ANY (&(const bdaddr_t){"\000\000\000\000\000\000"}) /* HCI status return parameter */ typedef struct { From nobody Mon Sep 15 13:33:07 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cQQvl52mnz67M6R; Mon, 15 Sep 2025 13:33:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cQQvl42h3z3H2k; Mon, 15 Sep 2025 13:33:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1757943187; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Yom6LlgE3Ok8iUO0O4vnI3iyvpcjyQB9My9DSnm1bnA=; b=d5Vou+Z8HB03rTXhc2wuDvMff7mX+OdBnIZUEt40zxgl7PPjZem/LXp+ZDP0fnW1JOZnSG YNL5edYMoqqR4xWtpS/iGb4LICir0Vx9BYNhl6Dbq1DWvMMIyteNYDxCSf0Mw/PUnEKNWw 8TsoCDmsF+xwXUODAM3jerey+dOF9gMxAccRAzjmq6U9DNqnaAO6plLPAIn4QXDVxJlkEi Pq0WJGGOrSKTbMZ2tuh38jmA8HYObHS/kl7icR8kslu4xBPE78izqCT0FGBrtpznbrXuXi 0rp1fqK7D1wOFlMfkvChUQV3u7YiBud4vPoBX5pzT/UTIrb/sflM9jLzNMpy2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1757943187; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Yom6LlgE3Ok8iUO0O4vnI3iyvpcjyQB9My9DSnm1bnA=; b=tzWwQ8vAvY1zERLOoMIdU0T0NKwWYkwzvttGpLHP1uUDaZQ5XpoftEXD2rlDQRCZ3bb3KE YQL+FVK45hhxkvN4pzByhkK3zrw7k1mfqmwWjvaWB61p2XpOWQzgQrP8jMh2BSOP47F4OA JuT5TImk3A/Pvr4DTCfg40WrM4ZMJDd7HOQFYfUNd+FrZTet/HObn1BNS82oGjibkHpSDo 0pmcefPx0oI1v0/sHRzSSciuP4SaXi5t0eFsC2aHRgKXfKSBvjs+6Xww8n4PEAaSvnoEzT lGfH7Dx+MZmKGwG4cwuEvnQK87CJrNbGWLh4HdfMKd7CVdKpMSbsVmvhHrERig== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1757943187; a=rsa-sha256; cv=none; b=V/lKfXG9ofNEIyGDVUtlldhAw0iaqEJjf35tfgFLs0X2FRv2o3kw7U0a6+Vmg8Z8oqZ6bx oGJvaTrdh855jlvAFXJGGG0VNjKee1TsCVxDe7sOqszFY4y9zDNUwCeJyccuTBueluiRkO +PXdTEX3YcWPVKV2nNy/6MneRyX0u7Om6pOfTY7KZr8rV4w46rLY1apHy65Qb7qrca0MDw 9ut1vx1vUCk406QZSkfzME+s0pBaQksUSpVvHYs3SZpA7I+9SKLhyC/W1516oveG8g7Siv AQs4oWHwSUPPuAk9JqbFnrUSIM67sDvef22rKtfZwfbw71HPRh8Tf3wwFM7FgQ== 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 4cQQvl3YRLzxC8; Mon, 15 Sep 2025 13:33:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58FDX7BE014037; Mon, 15 Sep 2025 13:33:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58FDX70N014034; Mon, 15 Sep 2025 13:33:07 GMT (envelope-from git) Date: Mon, 15 Sep 2025 13:33:07 GMT Message-Id: <202509151333.58FDX70N014034@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: 8fee6b9ecc84 - main - arm64: Add the new C1 CPU IDs List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8fee6b9ecc84d3602a461f1cd33df91e50849cdf Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=8fee6b9ecc84d3602a461f1cd33df91e50849cdf commit 8fee6b9ecc84d3602a461f1cd33df91e50849cdf Author: Andrew Turner AuthorDate: 2025-09-15 12:05:05 +0000 Commit: Andrew Turner CommitDate: 2025-09-15 13:32:18 +0000 arm64: Add the new C1 CPU IDs Add the Arm C1-Nano, C1-Pro, C1-Premium, and C1-Ultra CPUs from their Technical Reference Manuals. Sponsored by: Arm Ltd --- sys/arm64/arm64/identcpu.c | 4 ++++ sys/arm64/include/cpu.h | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/sys/arm64/arm64/identcpu.c b/sys/arm64/arm64/identcpu.c index a001be200518..01b4ece59861 100644 --- a/sys/arm64/arm64/identcpu.c +++ b/sys/arm64/arm64/identcpu.c @@ -232,6 +232,10 @@ static const struct cpu_parts cpu_parts_arm[] = { { CPU_PART_CORTEX_X2, "Cortex-X2" }, { CPU_PART_CORTEX_X3, "Cortex-X3" }, { CPU_PART_CORTEX_X4, "Cortex-X4" }, + { CPU_PART_C1_NANO, "C1-Nano" }, + { CPU_PART_C1_PRO, "C1-Pro" }, + { CPU_PART_C1_PREMIUM, "C1-Premium" }, + { CPU_PART_C1_ULTRA, "C1-Ultra" }, { CPU_PART_NEOVERSE_E1, "Neoverse-E1" }, { CPU_PART_NEOVERSE_N1, "Neoverse-N1" }, { CPU_PART_NEOVERSE_N2, "Neoverse-N2" }, diff --git a/sys/arm64/include/cpu.h b/sys/arm64/include/cpu.h index 07a783138f42..124da8c215ed 100644 --- a/sys/arm64/include/cpu.h +++ b/sys/arm64/include/cpu.h @@ -125,7 +125,11 @@ #define CPU_PART_NEOVERSE_V3 0xD84 #define CPU_PART_CORTEX_X925 0xD85 #define CPU_PART_CORTEX_A725 0xD87 +#define CPU_PART_C1_NANO 0xD8A +#define CPU_PART_C1_PRO 0xD8B +#define CPU_PART_C1_ULTRA 0xD8C #define CPU_PART_NEOVERSE_N3 0xD8E +#define CPU_PART_C1_PREMIUM 0xD90 /* Cavium Part numbers */ #define CPU_PART_THUNDERX 0x0A1 From nobody Mon Sep 15 13:33:08 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cQQvm5Mvmz67MXM; Mon, 15 Sep 2025 13:33:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cQQvm4PRrz3HNg; Mon, 15 Sep 2025 13:33:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1757943188; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DO6KLdnGNv1vC7U7Mo3WBTGIeYcjMgBpzvQtahMdmE4=; b=aKEsPL7AN7H3oXyP9sToOyD/Qzb5s2uPqd+6jmQkwkI3URMlUxelfPymIHpejCjr8G75Iw 09VwbXnBDraF1i8WPktX+qDKEKbXIq3lMqvVhH3Afc1Sb6ZonRVqMhZK5qtf07oBqRdUfW ts5H82aRVaRYwF+6xrjgyjmOnj1P6aTqv6YNrKqrJnqztJGT/52UemZpB8/EOrIRhcY+rk 1fDPYMCaiP5OmzOnov+MtLmRM2tKdrAm9y9m7z/0Wj7eeRfpHQMlNQo6wx/7Dm8gXI3ibF jQmCSU4QNlmRdWrC6+zJKPBlhtX4LReSGegVZBhqkwvuNnh3LYmSkxNj01CzSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1757943188; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DO6KLdnGNv1vC7U7Mo3WBTGIeYcjMgBpzvQtahMdmE4=; b=vEr97rMRMxFVqDsF9YGYldfajmyE9tUDarmIPbWVjvr5IZgqXSvq0shoT+Bh8gwx/1ESMB ZPIGZwxOgLcXGG8S/I8BTzHSI+9QQR4PFcxC6iznkBymHclluJc9SskyDJEBZ50L/l2kog 1TDxJ6Uc4GFs9GpqcZyosZKuNb1ivOAhh82MucfNdHieWhEkmSdZ/fivZ7Is6Ebv+fud06 1FFGbT76UHhLoKe0HTGiM+42E1FZvMoTgTfcfQxGm2UAdUSILPfTIKb2ZNM3wFSLKWGUp4 ME+LKOQcWY9WSZhFc/ez4XW2SGjjBrCNyHDvRHbYer2iLt7guLvyZM+anM/Xow== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1757943188; a=rsa-sha256; cv=none; b=D8hxfB/Ma3zAzENg3pSi+egiM6T1OmLl3Y+Iy7h/IshWF7giMTpTJwq73vxt5ELdFECKIm jQCROk477bRruR0gRiooq+W5h/Q0I5yLLXykkLYji2g1YnM4oVklJN+kEzen/7Zzhq0NIT omIg8I2Uj88+n0OHUkS0u1W70ve/UZrms+S+7ZM6LTEXnLn0T1USKZ958fRjBvPwJDJfDE kelEc08Bk+R0MGRsJFEDkDJfGL2TZuud4VNl8GuTL7V9/II6+YBmq7U84aymWQ5G1maIHu jiVLbhmnChQH0nnpUVgNoQbsyqmalM77tv8Yng/xnctyz8StZIf4CGKQq86kqw== 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 4cQQvm3zkFzwjf; Mon, 15 Sep 2025 13:33:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58FDX8OZ014070; Mon, 15 Sep 2025 13:33:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58FDX8ev014067; Mon, 15 Sep 2025 13:33:08 GMT (envelope-from git) Date: Mon, 15 Sep 2025 13:33:08 GMT Message-Id: <202509151333.58FDX8ev014067@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: 226375a1f6e3 - main - arm64: Fix the FEAT_WFxT check List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 226375a1f6e3a71ca250c717e8d6d2c2e4b0b2e7 Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=226375a1f6e3a71ca250c717e8d6d2c2e4b0b2e7 commit 226375a1f6e3a71ca250c717e8d6d2c2e4b0b2e7 Author: Andrew Turner AuthorDate: 2025-09-15 12:08:04 +0000 Commit: Andrew Turner CommitDate: 2025-09-15 13:32:18 +0000 arm64: Fix the FEAT_WFxT check The check was always true so would incorrectly enable the feature when it wasn't supported. Due to another bug this was harmless. Sponsored by: Arm Ltd --- sys/arm/arm/generic_timer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/arm/arm/generic_timer.c b/sys/arm/arm/generic_timer.c index 97976408c943..dacef8de2257 100644 --- a/sys/arm/arm/generic_timer.c +++ b/sys/arm/arm/generic_timer.c @@ -889,7 +889,7 @@ wfxt_check(const struct cpu_feat *feat __unused, u_int midr __unused) if (!get_kernel_reg(ID_AA64ISAR2_EL1, &id_aa64isar2)) return (FEAT_ALWAYS_DISABLE); - if (ID_AA64ISAR2_WFxT_VAL(id_aa64isar2) >= ID_AA64ISAR2_WFxT_NONE) + if (ID_AA64ISAR2_WFxT_VAL(id_aa64isar2) >= ID_AA64ISAR2_WFxT_IMPL) return (FEAT_DEFAULT_ENABLE); return (FEAT_ALWAYS_DISABLE); From nobody Mon Sep 15 14:09:08 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cQRjK0PXHz67Pv3; Mon, 15 Sep 2025 14:09:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cQRjJ6vv9z3MSb; Mon, 15 Sep 2025 14:09:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1757945349; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tALl1Kbo+4p4zFI/ZJl+0M6i5RHx78txtgBKm4fd9nA=; b=OW9YdtBwo4J1zorOYunzx+lPLhCmlbxzVk1eBo4b9U2nnXf7hE47gG4TC3PAkiNiPAVlUn i72ZIHWzVZd1iKASxh2wJzPoUhTBOAGITovNpSoIiIwfvcjImjGgZ0nnpRO4fnKlEL64EJ BSBhGs8GAaN3B4yjIqREVcp9L+w111YCUOe6BudSAzWieYdJFwRjp+LPMgOiGqEmv7lqc6 Wa6iR7ZL5NKwzJ3jr2HW5EU7ET7m8MgimG8NwgT09b6yaFy6T9lWJ7bEn0/2efU9Z74ebD Rj7l8scsoJXxYo/5dZdGiS3u48uBwy3DHdIEzIplEpIDOxNYZ3Bx8NKL/IeAIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1757945349; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tALl1Kbo+4p4zFI/ZJl+0M6i5RHx78txtgBKm4fd9nA=; b=E9z0F5TMSy1ksv5p19EGzvy28p7tsF2pd0UBbBCBh5S1K8c3Bh6G4hkeL6LTQ/xiRmab6u i38IDOZQpDXUVocGfPmrEdKTarJ4Q3wXvwj/aB1nl5XOP6F0OtVi3pPl21LCoTUkZdX4GS LOYzInjgC/R6EGlL+stsmFbG/bcoNM6FfB20nSZBYJmdCPd780mP8OYe0y1IovCRwXPBxg BPke08MPwNkTtub+yRoEPBnn90LzRRdY6oG2P2vSlgjNoYhBkbBGXcBM2gdcymkl2G4SEI ThA3zPLyJiI7SVESEuOvjQla2DA7aQgZkvLIwUE9wzSwWon9zaZyDSsKHnxVKw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1757945349; a=rsa-sha256; cv=none; b=l94MyKe+vOavbfn6ct1Jx2/HYzaum8rnWQ1bgqiyxqYB+jbh4tEwrEovLJweYrvfifoAwM xcKC5ZZpqNCZxchQnbb8jrgsMlb2HaRqrKVGU/Fw+Mt2uB2uLcHTQQxFnDQbPvfqZiibQI m5DHkOBYChZulmLatXqWdJqaWinVRZPYFZYKfjpiq9a3oQk/7HXsCOhQvO1TKQXtpdX4MS mCYudgzvGLC4/NJXDZ5pGISfzsODWQVfcXczPKej8B3OVVdH6FJeM8XAvurk7qbC4szNNP qfD9IXwPj0ndJ/zyyXxIFu3Tx9Y+4b3C3o75s41GYR/8Gm950Hzwghms/AOsmw== 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 4cQRjJ6KTHzx31; Mon, 15 Sep 2025 14:09:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58FE98KU074031; Mon, 15 Sep 2025 14:09:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58FE98om074028; Mon, 15 Sep 2025 14:09:08 GMT (envelope-from git) Date: Mon, 15 Sep 2025 14:09:08 GMT Message-Id: <202509151409.58FE98om074028@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 7fbd362c091b - main - qat: enable qat driver for 402xx device List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7fbd362c091b2b384d14c3ed5af9234bb2eff9c2 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=7fbd362c091b2b384d14c3ed5af9234bb2eff9c2 commit 7fbd362c091b2b384d14c3ed5af9234bb2eff9c2 Author: Hareshx Sankar Raj AuthorDate: 2025-09-04 18:21:36 +0000 Commit: Mark Johnston CommitDate: 2025-09-15 13:48:45 +0000 qat: enable qat driver for 402xx device Enabled qat driver support for 402xx device with ID 0x4944/0x4945. This is an additional device supported under the existing qat_4xxx driver. Firmwares specific to the 402xx device are added. Signed-off-by: Hareshx Sankar Raj Relnotes: yes Sponsored by: Intel Corporation MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D52488 --- sys/contrib/dev/qat/qat_402xx.bin | Bin 0 -> 665360 bytes sys/contrib/dev/qat/qat_402xx_mmp.bin | Bin 0 -> 150084 bytes sys/dev/qat/include/common/adf_accel_devices.h | 4 ++ sys/dev/qat/qat_api/include/icp_sal_versions.h | 2 +- sys/dev/qat/qat_common/qat_uclo.c | 1 + sys/dev/qat/qat_hw/qat_4xxx/adf_4xxx_hw_data.c | 58 +++++++++++++++++++------ sys/dev/qat/qat_hw/qat_4xxx/adf_4xxx_hw_data.h | 6 +++ sys/dev/qat/qat_hw/qat_4xxx/adf_drv.c | 15 ++++--- sys/dev/qat/qat_hw/qat_4xxxvf/adf_drv.c | 15 ++++--- sys/modules/qatfw/qat_4xxx/Makefile | 5 ++- 10 files changed, 78 insertions(+), 28 deletions(-) diff --git a/sys/contrib/dev/qat/qat_402xx.bin b/sys/contrib/dev/qat/qat_402xx.bin new file mode 100644 index 000000000000..74151547edce Binary files /dev/null and b/sys/contrib/dev/qat/qat_402xx.bin differ diff --git a/sys/contrib/dev/qat/qat_402xx_mmp.bin b/sys/contrib/dev/qat/qat_402xx_mmp.bin new file mode 100644 index 000000000000..6404eb009d2f Binary files /dev/null and b/sys/contrib/dev/qat/qat_402xx_mmp.bin differ diff --git a/sys/dev/qat/include/common/adf_accel_devices.h b/sys/dev/qat/include/common/adf_accel_devices.h index c09aee8ea4bd..eeffc6a9132c 100644 --- a/sys/dev/qat/include/common/adf_accel_devices.h +++ b/sys/dev/qat/include/common/adf_accel_devices.h @@ -39,12 +39,16 @@ #define ADF_4XXXIOV_PCI_DEVICE_ID 0x4941 #define ADF_401XX_PCI_DEVICE_ID 0x4942 #define ADF_401XXIOV_PCI_DEVICE_ID 0x4943 +#define ADF_402XX_PCI_DEVICE_ID 0x4944 +#define ADF_402XXIOV_PCI_DEVICE_ID 0x4945 #define IS_QAT_GEN3(ID) ({ (ID == ADF_C4XXX_PCI_DEVICE_ID); }) static inline bool IS_QAT_GEN4(const unsigned int id) { return (id == ADF_4XXX_PCI_DEVICE_ID || id == ADF_401XX_PCI_DEVICE_ID || + id == ADF_402XX_PCI_DEVICE_ID || + id == ADF_402XXIOV_PCI_DEVICE_ID || id == ADF_4XXXIOV_PCI_DEVICE_ID || id == ADF_401XXIOV_PCI_DEVICE_ID); } diff --git a/sys/dev/qat/qat_api/include/icp_sal_versions.h b/sys/dev/qat/qat_api/include/icp_sal_versions.h index 03bcef4fcbbb..0eb227ade09c 100644 --- a/sys/dev/qat/qat_api/include/icp_sal_versions.h +++ b/sys/dev/qat/qat_api/include/icp_sal_versions.h @@ -26,7 +26,7 @@ /* Part name and number of the accelerator device */ #define SAL_INFO2_DRIVER_SW_VERSION_MAJ_NUMBER 3 -#define SAL_INFO2_DRIVER_SW_VERSION_MIN_NUMBER 15 +#define SAL_INFO2_DRIVER_SW_VERSION_MIN_NUMBER 16 #define SAL_INFO2_DRIVER_SW_VERSION_PATCH_NUMBER 0 /** diff --git a/sys/dev/qat/qat_common/qat_uclo.c b/sys/dev/qat/qat_common/qat_uclo.c index 54e8e8eb7421..b17020286d24 100644 --- a/sys/dev/qat/qat_common/qat_uclo.c +++ b/sys/dev/qat/qat_common/qat_uclo.c @@ -892,6 +892,7 @@ qat_uclo_get_dev_type(struct icp_qat_fw_loader_handle *handle) return ICP_QAT_AC_C4XXX_DEV_TYPE; case ADF_4XXX_PCI_DEVICE_ID: case ADF_401XX_PCI_DEVICE_ID: + case ADF_402XX_PCI_DEVICE_ID: return ICP_QAT_AC_4XXX_A_DEV_TYPE; default: pr_err("QAT: unsupported device 0x%x\n", diff --git a/sys/dev/qat/qat_hw/qat_4xxx/adf_4xxx_hw_data.c b/sys/dev/qat/qat_hw/qat_4xxx/adf_4xxx_hw_data.c index d730efd5952b..49e1e1859e78 100644 --- a/sys/dev/qat/qat_hw/qat_4xxx/adf_4xxx_hw_data.c +++ b/sys/dev/qat/qat_hw/qat_4xxx/adf_4xxx_hw_data.c @@ -536,8 +536,8 @@ adf_exit_accel_units(struct adf_accel_dev *accel_dev) } static const char * -get_obj_name(struct adf_accel_dev *accel_dev, - enum adf_accel_unit_services service) +get_obj_name_4xxx(struct adf_accel_dev *accel_dev, + enum adf_accel_unit_services service) { switch (service) { case ADF_ACCEL_ASYM: @@ -553,6 +553,24 @@ get_obj_name(struct adf_accel_dev *accel_dev, } } +static const char * +get_obj_name_402xx(struct adf_accel_dev *accel_dev, + enum adf_accel_unit_services service) +{ + switch (service) { + case ADF_ACCEL_ASYM: + return ADF_402XX_ASYM_OBJ; + case ADF_ACCEL_CRYPTO: + return ADF_402XX_SYM_OBJ; + case ADF_ACCEL_COMPRESSION: + return ADF_402XX_DC_OBJ; + case ADF_ACCEL_ADMIN: + return ADF_402XX_ADMIN_OBJ; + default: + return NULL; + } +} + static uint32_t get_objs_num(struct adf_accel_dev *accel_dev) { @@ -982,8 +1000,23 @@ adf_init_hw_data_4xxx(struct adf_hw_device_data *hw_data, u32 id) hw_data->clock_frequency = ADF_4XXX_AE_FREQ; hw_data->get_sku = get_sku; hw_data->heartbeat_ctr_num = ADF_NUM_HB_CNT_PER_AE; - hw_data->fw_name = ADF_4XXX_FW; - hw_data->fw_mmp_name = ADF_4XXX_MMP; + switch (id) { + case ADF_402XX_PCI_DEVICE_ID: + hw_data->fw_name = ADF_402XX_FW; + hw_data->fw_mmp_name = ADF_402XX_MMP; + hw_data->asym_ae_active_thd_mask = DEFAULT_4XXX_ASYM_AE_MASK; + break; + case ADF_401XX_PCI_DEVICE_ID: + hw_data->fw_name = ADF_4XXX_FW; + hw_data->fw_mmp_name = ADF_4XXX_MMP; + hw_data->asym_ae_active_thd_mask = DEFAULT_401XX_ASYM_AE_MASK; + break; + + default: + hw_data->fw_name = ADF_4XXX_FW; + hw_data->fw_mmp_name = ADF_4XXX_MMP; + hw_data->asym_ae_active_thd_mask = DEFAULT_4XXX_ASYM_AE_MASK; + } hw_data->init_admin_comms = adf_init_admin_comms; hw_data->exit_admin_comms = adf_exit_admin_comms; hw_data->send_admin_init = adf_4xxx_send_admin_init; @@ -1002,7 +1035,13 @@ adf_init_hw_data_4xxx(struct adf_hw_device_data *hw_data, u32 id) hw_data->get_ring_svc_map_data = get_ring_svc_map_data; hw_data->admin_ae_mask = ADF_4XXX_ADMIN_AE_MASK; hw_data->get_objs_num = get_objs_num; - hw_data->get_obj_name = get_obj_name; + switch (id) { + case ADF_402XX_PCI_DEVICE_ID: + hw_data->get_obj_name = get_obj_name_402xx; + break; + default: + hw_data->get_obj_name = get_obj_name_4xxx; + } hw_data->get_obj_cfg_ae_mask = get_obj_cfg_ae_mask; hw_data->get_service_type = adf_4xxx_get_service_type; hw_data->set_msix_rttable = set_msix_default_rttable; @@ -1022,15 +1061,6 @@ adf_init_hw_data_4xxx(struct adf_hw_device_data *hw_data, u32 id) hw_data->query_storage_cap = 1; hw_data->ring_pair_reset = adf_gen4_ring_pair_reset; - switch (id) { - case ADF_401XX_PCI_DEVICE_ID: - hw_data->asym_ae_active_thd_mask = DEFAULT_401XX_ASYM_AE_MASK; - break; - case ADF_4XXX_PCI_DEVICE_ID: - default: - hw_data->asym_ae_active_thd_mask = DEFAULT_4XXX_ASYM_AE_MASK; - } - adf_gen4_init_hw_csr_info(&hw_data->csr_info); adf_gen4_init_pf_pfvf_ops(&hw_data->csr_info.pfvf_ops); } diff --git a/sys/dev/qat/qat_hw/qat_4xxx/adf_4xxx_hw_data.h b/sys/dev/qat/qat_hw/qat_4xxx/adf_4xxx_hw_data.h index c35ebbcadcd7..fa7249dca596 100644 --- a/sys/dev/qat/qat_hw/qat_4xxx/adf_4xxx_hw_data.h +++ b/sys/dev/qat/qat_hw/qat_4xxx/adf_4xxx_hw_data.h @@ -87,6 +87,12 @@ #define ADF_4XXX_SYM_OBJ "qat_4xxx_sym.bin" #define ADF_4XXX_ASYM_OBJ "qat_4xxx_asym.bin" #define ADF_4XXX_ADMIN_OBJ "qat_4xxx_admin.bin" +#define ADF_402XX_FW "qat_402xx_fw" +#define ADF_402XX_MMP "qat_402xx_mmp_fw" +#define ADF_402XX_DC_OBJ "qat_402xx_dc.bin" +#define ADF_402XX_SYM_OBJ "qat_402xx_sym.bin" +#define ADF_402XX_ASYM_OBJ "qat_402xx_asym.bin" +#define ADF_402XX_ADMIN_OBJ "qat_402xx_admin.bin" /* Only 3 types of images can be loaded including the admin image */ #define ADF_4XXX_MAX_OBJ 3 diff --git a/sys/dev/qat/qat_hw/qat_4xxx/adf_drv.c b/sys/dev/qat/qat_hw/qat_4xxx/adf_drv.c index cb534dd03b86..f9ad39fa45f0 100644 --- a/sys/dev/qat/qat_hw/qat_4xxx/adf_drv.c +++ b/sys/dev/qat/qat_hw/qat_4xxx/adf_drv.c @@ -22,12 +22,14 @@ static MALLOC_DEFINE(M_QAT_4XXX, "qat_4xxx", "qat_4xxx"); PCI_VENDOR_ID_INTEL, device_id \ } -static const struct pci_device_id adf_pci_tbl[] = - { ADF_SYSTEM_DEVICE(ADF_4XXX_PCI_DEVICE_ID), - ADF_SYSTEM_DEVICE(ADF_401XX_PCI_DEVICE_ID), - { - 0, - } }; +static const struct pci_device_id adf_pci_tbl[] = { + ADF_SYSTEM_DEVICE(ADF_4XXX_PCI_DEVICE_ID), + ADF_SYSTEM_DEVICE(ADF_401XX_PCI_DEVICE_ID), + ADF_SYSTEM_DEVICE(ADF_402XX_PCI_DEVICE_ID), + { + 0, + } +}; static int adf_probe(device_t dev) @@ -135,6 +137,7 @@ adf_cleanup_accel(struct adf_accel_dev *accel_dev) switch (pci_get_device(accel_pci_dev->pci_dev)) { case ADF_4XXX_PCI_DEVICE_ID: case ADF_401XX_PCI_DEVICE_ID: + case ADF_402XX_PCI_DEVICE_ID: adf_clean_hw_data_4xxx(accel_dev->hw_device); break; default: diff --git a/sys/dev/qat/qat_hw/qat_4xxxvf/adf_drv.c b/sys/dev/qat/qat_hw/qat_4xxxvf/adf_drv.c index 2bbccb4d6b17..dbe40835ccbf 100644 --- a/sys/dev/qat/qat_hw/qat_4xxxvf/adf_drv.c +++ b/sys/dev/qat/qat_hw/qat_4xxxvf/adf_drv.c @@ -22,12 +22,14 @@ static MALLOC_DEFINE(M_QAT_4XXXVF, "qat_4xxxvf", "qat_4xxxvf"); PCI_VENDOR_ID_INTEL, device_id \ } -static const struct pci_device_id adf_pci_tbl[] = - { ADF_SYSTEM_DEVICE(ADF_4XXXIOV_PCI_DEVICE_ID), - ADF_SYSTEM_DEVICE(ADF_401XXIOV_PCI_DEVICE_ID), - { - 0, - } }; +static const struct pci_device_id adf_pci_tbl[] = { + ADF_SYSTEM_DEVICE(ADF_4XXXIOV_PCI_DEVICE_ID), + ADF_SYSTEM_DEVICE(ADF_401XXIOV_PCI_DEVICE_ID), + ADF_SYSTEM_DEVICE(ADF_402XXIOV_PCI_DEVICE_ID), + { + 0, + } +}; static int adf_probe(device_t dev) @@ -76,6 +78,7 @@ adf_cleanup_accel(struct adf_accel_dev *accel_dev) switch (pci_get_device(accel_pci_dev->pci_dev)) { case ADF_4XXXIOV_PCI_DEVICE_ID: case ADF_401XXIOV_PCI_DEVICE_ID: + case ADF_402XXIOV_PCI_DEVICE_ID: adf_clean_hw_data_4xxxiov(accel_dev->hw_device); break; default: diff --git a/sys/modules/qatfw/qat_4xxx/Makefile b/sys/modules/qatfw/qat_4xxx/Makefile index fb7171bcaf45..f6f19d6cbe32 100644 --- a/sys/modules/qatfw/qat_4xxx/Makefile +++ b/sys/modules/qatfw/qat_4xxx/Makefile @@ -4,6 +4,9 @@ KMOD= qat_4xxx_fw -FIRMWS= qat_4xxx.bin:qat_4xxx_fw:111 qat_4xxx_mmp.bin:qat_4xxx_mmp_fw:111 +FIRMWS= qat_4xxx.bin:qat_4xxx_fw:111 \ + qat_4xxx_mmp.bin:qat_4xxx_mmp_fw:111 \ + qat_402xx.bin:qat_402xx_fw:111 \ + qat_402xx_mmp.bin:qat_402xx_mmp_fw:111 .include From nobody Mon Sep 15 14:09:09 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cQRjL1HKZz67Q9X; Mon, 15 Sep 2025 14:09:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cQRjL0ZNWz3MwP; Mon, 15 Sep 2025 14:09:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1757945350; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HtU1xlqBZXOAjBn0w21bk4emV8iDx5JUHgoKuDcN45s=; b=Bgb8xwIi/L04/xyZpH/+u8YP+w10a97eTOZrd2WohbJ2vwSWGU5XtA0DhM9yXikxzmAPQc KQ9VwvmtngNV2De4Qsr9V1Td0KXAbHOjWz66jFEUlLRhTiZlc6NCFwbhKGDFvjEIbc25BI lMfiacaM1+ToTOMiXxMCOb9ba84w5zP6VZAfsClQZJCnSmyRc+VsEdQaHQsnvCZ3hPdDph 9HjQB0UlxVNRRBvMmNTnOFFHw+AFvf5xyEsKpRPpR2Is+mtcwvsoF+355FzQenJx/kqCtj wxnipNXnQXKHut2KDQtLorw5zz+zKyRKE4s9j25k91oYv0Q+g3+bBHuGmaQjdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1757945350; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HtU1xlqBZXOAjBn0w21bk4emV8iDx5JUHgoKuDcN45s=; b=v76IElDxU93mCrZtbn00zH6yopjp5rxJliCWxVdW1UkvHBUWIWa+UwZC6w7tmH5YyfVnzJ S1dI8ChN14Nfdxd4yQit4/N7T6lc+v0DMfSIHhwchwEwmSmd3TF1ZPlwDwswi2rPe8qwzZ F1nqSLrQph5Ht8xrtV2mQKuFVN1s14ksafQZWeeZ8RE7WnwmxOlsfG3JeOA5pYx4E3/OJD UkqVIbGXljsaCbyaBU67LrkQ+Ik+ipYuD17Oi90TwvukzkhZnyP3fOBTJwUSQL2nDR2TUF TPm36xotR+eywAiQnQUKaZrCzxnJxQ6bjGWMWO0rdj8gqO7B1cTFhuAKnQFs3w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1757945350; a=rsa-sha256; cv=none; b=k5BLdHLBpyzrY2DA7yXgrENErmhD/XKMGV0UGViXY6eX+3jSfhIMkULJrUxw0zXCAaq4uR ewkLWENbKPwUww4kIc9xyIHH+lshjf4FsgXX+60FqTWftOCga5Y1NglVtdY8O40QMMdmci oVNsLmUnhehXe3xrEwWt2vxJ5+pZlHnpOFm7A4jPrR33oZLYiLz9tmxCfiRH5hSyiWE2Rf hsliqVX9lai7uXpYK45JgxrmhXRYuWI+7DwlcR8p76zqCR2OILNRjysgS1SHI09sNvloDu hoFrIAjNWAohEyzqv+COGsPy6tFXqwanQCGm97hhxgMtMGlJtdS/ZkMkuGJhgA== 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 4cQRjL08zGzxWX; Mon, 15 Sep 2025 14:09: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 58FE99Of074063; Mon, 15 Sep 2025 14:09:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58FE99QY074060; Mon, 15 Sep 2025 14:09:09 GMT (envelope-from git) Date: Mon, 15 Sep 2025 14:09:09 GMT Message-Id: <202509151409.58FE99QY074060@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 18fd3f8ec5c5 - main - ng_btsocket_rfcomm: Mark a couple buffers as const in a helper function List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 18fd3f8ec5c50da21515757af24421a078a4a468 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=18fd3f8ec5c50da21515757af24421a078a4a468 commit 18fd3f8ec5c50da21515757af24421a078a4a468 Author: Mark Johnston AuthorDate: 2025-09-15 13:57:19 +0000 Commit: Mark Johnston CommitDate: 2025-09-15 13:57:19 +0000 ng_btsocket_rfcomm: Mark a couple buffers as const in a helper function Fixes: 680f9acc3657 ("ng_hci: Cast NG_HCI_BDADDR_ANY to const bdaddr_t *") --- sys/netgraph/bluetooth/socket/ng_btsocket_rfcomm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/netgraph/bluetooth/socket/ng_btsocket_rfcomm.c b/sys/netgraph/bluetooth/socket/ng_btsocket_rfcomm.c index 6c0a6fda1fb1..73a0897857b2 100644 --- a/sys/netgraph/bluetooth/socket/ng_btsocket_rfcomm.c +++ b/sys/netgraph/bluetooth/socket/ng_btsocket_rfcomm.c @@ -113,7 +113,7 @@ static void ng_btsocket_rfcomm_connect_cfm static int ng_btsocket_rfcomm_session_create (ng_btsocket_rfcomm_session_p *sp, struct socket *l2so, - bdaddr_p src, bdaddr_p dst, struct thread *td); + const bdaddr_t *src, const bdaddr_t *dst, struct thread *td); static int ng_btsocket_rfcomm_session_accept (ng_btsocket_rfcomm_session_p s0); static int ng_btsocket_rfcomm_session_connect @@ -1250,7 +1250,7 @@ ng_btsocket_rfcomm_connect_cfm(ng_btsocket_rfcomm_session_p s) static int ng_btsocket_rfcomm_session_create(ng_btsocket_rfcomm_session_p *sp, - struct socket *l2so, bdaddr_p src, bdaddr_p dst, + struct socket *l2so, const bdaddr_t *src, const bdaddr_t *dst, struct thread *td) { ng_btsocket_rfcomm_session_p s = NULL; From nobody Mon Sep 15 14:09:11 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cQRjM2j9Zz67Q54; Mon, 15 Sep 2025 14:09: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 4cQRjM1DK3z3Mr4; Mon, 15 Sep 2025 14:09:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1757945351; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8KmA5WXiGbjESSoXOxXVJS7fmEUFBdAuI9dtagXG5eo=; b=ZaMDJa/dfWPuF7ngJl4muWAai1inGgfArt7uIHH3EWy3YT+eZFgZcuA+saMMtpMFKQJABK YGhp5e63HYqTrOUSDKECwmkN8Z3NccwSsM+K0zVrI1nMy3MOlc++VsqsMK020seNDNAgEi IGEDSMOD/wwb65lfYHxX7aNDowJDc9sndam0osex5l/69ANWntb6G6B0h4CW46mFxmwcIr Ni+qDdh6x0YenwFaeVL1y/L+zQCdTzFJdxUFkC50kPJ4GYHcPld1s9B4MgZnlnH7VD+9Fh R/RQhbC6MoRHyofx4V6AwxINqIa0gw6oqpWDZfyH22T+LU49/dQ6+2TlVxuUnw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1757945351; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8KmA5WXiGbjESSoXOxXVJS7fmEUFBdAuI9dtagXG5eo=; b=pG06LtXqpmkU6FZ5/cySBsVsuff8hGOfiXl7H8BVAXX9pHaKUxrjUGlXZJFWs0V8QKeJWm RLXuW+iWRLcHhx3H+g2nBXeis8tZ7iEwHORM25wHktzFFjNt6dwHRA+Pj11it1n7eOmQcM 32Ga4yylPE25c6HtMQzGl9bccxuGSE8e+kayJB3j1NXQenW0Ln8ZEbRMzlu+sByW7nY40M os2CNMDtxnZXOmz+9j8S0UrgU5dSNPjqXvB1z1AWkVQp9wdvkgwMe9RixfkzN1IfiuKhtO +G8A7p6gr+7SazaBNXRJt6EK0QEodcO9AFDQ6cxYv3NjV8fHEHVBz3ArSmm6ew== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1757945351; a=rsa-sha256; cv=none; b=POFcqC44imJTZhK4CoRDYe1leN9rplIIwkvS9qXrO653G5j6boDDqwuBSBvwD/Pb7xWKoi lY5KwkyQIqhnUs3++zksL4YRXl0QKJ0Fzps6vcQl0bSRCgn2f0u1uB16eWXwDQ5bpbvW3c ATZzwhXnCgscMdBNjvH3atPgEHN7iv9cr+ujzKnAd5Bsduo++ZDdVRUvvr4KIqH2Z9/bSA YUerwq4xErvQyKd+cHa/A1uHe3y7LzjICm67XQtMEBd8k7z/cmR6MZJayOTElvd6mQ/+U/ 17gJaGgkyws31h7TJGKm9ZplxF+pJlx5ls838z3Nm141TT7BG7Uu6TlI3QrG2g== 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 4cQRjM0nD8zxYk; Mon, 15 Sep 2025 14:09: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 58FE9BCE074102; Mon, 15 Sep 2025 14:09:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58FE9BsE074099; Mon, 15 Sep 2025 14:09:11 GMT (envelope-from git) Date: Mon, 15 Sep 2025 14:09:11 GMT Message-Id: <202509151409.58FE9BsE074099@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 081f0e38e332 - main - zfs: Use the correct type for raidz_outlier_check_interval_ms List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 081f0e38e3324dd3ca63a2d5036a15f52e6cf858 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=081f0e38e3324dd3ca63a2d5036a15f52e6cf858 commit 081f0e38e3324dd3ca63a2d5036a15f52e6cf858 Author: Mark Johnston AuthorDate: 2025-09-15 14:07:35 +0000 Commit: Mark Johnston CommitDate: 2025-09-15 14:07:35 +0000 zfs: Use the correct type for raidz_outlier_check_interval_ms raidz_outlier_check_interval_ms has type hrtime_t, which is a long long, which is 64 bits wide on all supported platforms. --- sys/contrib/openzfs/module/zfs/vdev_raidz.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/contrib/openzfs/module/zfs/vdev_raidz.c b/sys/contrib/openzfs/module/zfs/vdev_raidz.c index 80727b0d8f91..56b8e3b60b22 100644 --- a/sys/contrib/openzfs/module/zfs/vdev_raidz.c +++ b/sys/contrib/openzfs/module/zfs/vdev_raidz.c @@ -5495,7 +5495,7 @@ ZFS_MODULE_PARAM(zfs, zfs_, scrub_after_expand, INT, ZMOD_RW, "completes"); ZFS_MODULE_PARAM(zfs_vdev, vdev_, read_sit_out_secs, ULONG, ZMOD_RW, "Raidz/draid slow disk sit out time period in seconds"); -ZFS_MODULE_PARAM(zfs_vdev, vdev_, raidz_outlier_check_interval_ms, ULONG, +ZFS_MODULE_PARAM(zfs_vdev, vdev_, raidz_outlier_check_interval_ms, U64, ZMOD_RW, "Interval to check for slow raidz/draid children"); ZFS_MODULE_PARAM(zfs_vdev, vdev_, raidz_outlier_insensitivity, UINT, ZMOD_RW, "How insensitive the slow raidz/draid child check should be"); From nobody Mon Sep 15 14:12:48 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cQRnX6WZqz67PyK; Mon, 15 Sep 2025 14:12:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cQRnX631Lz3QDs; Mon, 15 Sep 2025 14:12:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1757945568; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=x+X7cHWm6+XlPNcqxj3INm4ULbsgbKa4LJhjoAreVQk=; b=IVb3ngY0VI+eFvzrz4/hRgzkvM3Wy4WSUP5EgGD9iygIdDqSngIinqQ/Z7SOtfqhpFypGm VWRb85043ejW2k5llH9SHvKP+KjpjYruatUcKstqJ97VrcjTR45k2kOuMCx8wdoompVgxL I7GUDld2ChxNBBbPIAoOaJaDZscLkt0KbaBfrtO4xJMPnH1IAq1SXHjAlDVLgteMt1oYgi qlSm7ryo+uYjPDNSerDFszcI6y4iDgdh/lb+O2j0Fvq4IUZ8HOwjLFKz2QemMeKfAZRQrR lzclVMf2isdGAFNehne/a6BD8QZppShxXG1JOzttIhRo1ei1QVWcUs9Kt+yUnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1757945568; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=x+X7cHWm6+XlPNcqxj3INm4ULbsgbKa4LJhjoAreVQk=; b=NG2xBYPTqMxP9Vqz7OO/EeneLb1IMf2kbN1Lj/vFqF5zRtrJ+niC8mnr7/XGWIoRYWqcJO js8S2+XDUvn7Z8vCAgiaWunr9XqJLj2WvZLH48NMaFiX75LVzlaM3hlamT3zf+YB1mk+xy tZ1mGsQ3CVZES+OV0nr80I+fIPEfJsLDRcdjCOyjevBkP9rpDYbYeh5drGU+OVatUuYfrY wLlOhYTHOBDQ6mF87nmHaKzjWlOYosKkmTrDqSC9rYRHMCBHsWlZgsYToVW7GdpgR5Jucp nmYNE4hR1DNaELmooxG7oHlrjsSV6r5mHcOS8xWC4lq3K6Iuv3lIzL/Gh0Q5/w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1757945568; a=rsa-sha256; cv=none; b=lpOkHk52F5GHwNvf1mrQnbWylD1t0vpTSE/fO+i3WakQ+9hi+sX3fpRt0pFzppWyNmSMdC 5xgx1oz+9KW5gLXStKYedc++oXUHs0Ty7bb/yxLOt0/dpZ4cauK4xHaxnoTBukiZVm4dlQ B2IVLtfs/JqqCgUqJ5RQhZdASD6Z8pLOpE2RqeWkmoa+YrizA9ocZ6w1Ihb95kXNoqEWyS 49tNgIuYgE/vLXENGEKbl1icF5aXnqpBKYwgFEa+Xp/uXro5CZpYuTzEwckO4G9R0ezZn1 SJ4QvweItm3a2h8oc1EJ7Q/C0VI9TioLFN8O2S712PCgHO5Y9baMMqIBfrlYAA== 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 4cQRnX5cgfzxyX; Mon, 15 Sep 2025 14:12:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58FECmF8091259; Mon, 15 Sep 2025 14:12:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58FECmcW091256; Mon, 15 Sep 2025 14:12:48 GMT (envelope-from git) Date: Mon, 15 Sep 2025 14:12:48 GMT Message-Id: <202509151412.58FECmcW091256@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: f1b656f14464 - main - vm_fault_busy_sleep(): update comment after addition of allocflags arg List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f1b656f14464c2e3ec4ab2eeade3b00dce4bd459 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=f1b656f14464c2e3ec4ab2eeade3b00dce4bd459 commit f1b656f14464c2e3ec4ab2eeade3b00dce4bd459 Author: Konstantin Belousov AuthorDate: 2025-09-15 00:52:47 +0000 Commit: Konstantin Belousov CommitDate: 2025-09-15 14:11:57 +0000 vm_fault_busy_sleep(): update comment after addition of allocflags arg Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D52538 --- sys/vm/vm_fault.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/sys/vm/vm_fault.c b/sys/vm/vm_fault.c index 3dddc7a307d4..524aed2be2ff 100644 --- a/sys/vm/vm_fault.c +++ b/sys/vm/vm_fault.c @@ -1456,11 +1456,10 @@ vm_fault_getpages(struct faultstate *fs, int *behindp, int *aheadp) * and we could end up trying to pagein and pageout the same page * simultaneously. * - * We can theoretically allow the busy case on a read fault if the page - * is marked valid, but since such pages are typically already pmap'd, - * putting that special case in might be more effort then it is worth. - * We cannot under any circumstances mess around with a shared busied - * page except, perhaps, to pmap it. + * We allow the busy case on a read fault if the page is valid. We + * cannot under any circumstances mess around with a shared busied + * page except, perhaps, to pmap it. This is controlled by the + * VM_ALLOC_SBUSY bit in the allocflags argument. */ static void vm_fault_busy_sleep(struct faultstate *fs, int allocflags) From nobody Mon Sep 15 14:45:09 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cQSVs4LLqz67RvK; Mon, 15 Sep 2025 14:45:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cQSVs3nVhz3Ryv; Mon, 15 Sep 2025 14:45:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1757947509; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=C2Hoe4GKga5zTRjJTksnPrlAA72PV2JYx83UhpPznIo=; b=DQyOBri37gkYl6KToGGA9gJyH9EBJJiVIxx6z4CEjx/9PLQfO6zzenPj+emnwOARRUt0st b4/UFWGvOURDKpTwYy/jmvslmH912rGnO0COJBS3bniEQFgzi9PeCGxICnZaz5q3fj5Imo 0sRUvASQ/dJJwzH9zuanx09ZXfd9b1oTeep8VrB8tmM7Xuu6tdsrAEzU/CWI35T6b6hzIY 8uH68PaOeNObIRDpE5lXEaFJRch62FYuQLhQfrTpiTJ1VYM/V67+AjBF0pjLkohGpNeu8H 0FqVW8LqE1vJ2pbczaR9hhU9yRZq54GWT3IH2J0hkqzWO01dTdSvUS6gLp+FHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1757947509; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=C2Hoe4GKga5zTRjJTksnPrlAA72PV2JYx83UhpPznIo=; b=vIqRl0MBY3vjPENg9ci61+wdho1v2gGIFSaVhXcn+4b9OjWaRWzI3VBB7VKdbPZZwQ6zai bUq8iVvi1vLq3BAXHgdZVKUW27Yn/ua7as8PmYBAZNllEv2WzJf+CS0GTa2j+I9OLbW7dZ o4TgU+Ks1/lksa9ZmWiijxWp+19ymKZCssAj9LLwVWF/9jjRHKVwYO4fwLH7jNmKz99jBy WGXnbnEH0bRs1YXcLt+9uu/zHrV0IkCHTvSVOxwwg9TsNyTb7Kqg9T8EoxoWYIpGmMvl17 2tKAmw6zDd1ZfeG+qXiL7GUusnA0eX5YNdli0oHn0PcT/u3VlWG7Ki4+H4gsQg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1757947509; a=rsa-sha256; cv=none; b=hN2zORCrcQSUOvyZkBNuVXtq07fsfCV4dHmBjns27hgzts4soq5Rw1oAsLm7ptzUN8Z1wJ nreK5m//nWjvAOaLqJCbPdkLkI3GQYYuJrL7xBME+q1nYEYxF4bOh8pwUxbA2krkTjQQ0a ooL0hKuryYWHPrUZzdsA/20XWje66zuStO7bcZXdFhKs+kqW7lAWuf1+ug1qhag0HJLeo+ cx8y1h3nQ0UhRIVu8THrjvtLzXHd7kheD8lst9cp9hyq6GsAlEN436QB5QJgKvOCnxSfvn IhRZShwAS+kYCP5Qke+v58kRBuT0twtpwk0J+AHSEIPPs5VeRRltGYfMvnlIZQ== 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 4cQSVs36Slzym3; Mon, 15 Sep 2025 14:45:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58FEj90v047520; Mon, 15 Sep 2025 14:45:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58FEj9BY047517; Mon, 15 Sep 2025 14:45:09 GMT (envelope-from git) Date: Mon, 15 Sep 2025 14:45:09 GMT Message-Id: <202509151445.58FEj9BY047517@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Tom Jones Subject: git: d566b6a70bcb - main - udbc: Add usb debug host mode driver List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: thj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d566b6a70bcbc329e8c690464043401fa8bdd49f Auto-Submitted: auto-generated The branch main has been updated by thj: URL: https://cgit.FreeBSD.org/src/commit/?id=d566b6a70bcbc329e8c690464043401fa8bdd49f commit d566b6a70bcbc329e8c690464043401fa8bdd49f Author: Tom Jones AuthorDate: 2025-07-08 08:04:00 +0000 Commit: Tom Jones CommitDate: 2025-09-15 14:44:05 +0000 udbc: Add usb debug host mode driver xhci offers a debugging interface which uses a special usb 3 cable with the D+, D- and VBUS pairs disconnected. This interface allows a target device to configure its xhci controller as a debugging channel which can then be used to provide a serial link between the target and a debug host. This change extracts the udbc host mode driver from hrs@'s xhci debug implementation. Reviewed by: bcr (man page) MFC after: Before 15-ALPHA3 builds Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D51299 --- share/man/man4/udbc.4 | 132 ++++++++++++++ sys/dev/usb/serial/udbc.c | 404 ++++++++++++++++++++++++++++++++++++++++++ sys/modules/usb/Makefile | 7 +- sys/modules/usb/udbc/Makefile | 9 + 4 files changed, 548 insertions(+), 4 deletions(-) diff --git a/share/man/man4/udbc.4 b/share/man/man4/udbc.4 new file mode 100644 index 000000000000..c8fa02ec18f1 --- /dev/null +++ b/share/man/man4/udbc.4 @@ -0,0 +1,132 @@ +.\" +.\" Copyright (c) 2025 The FreeBSD Foundation +.\" +.\" This documentation was written by Tom Jones under +.\" sponsorship from the FreeBSD Foundation. +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.\" +.Dd September 3, 2025 +.Dt UDBC 4 +.Os +.Sh NAME +.Nm udbc +.Nd USB Debug Class device driver +.Sh SYNOPSIS +.Cd "device usb" +.Cd "device ucom" +.Cd "device udbc" +.Pp +In +.Xr rc.conf 5 : +.Cd kld_list="udbc" +.Sh DESCRIPTION +The +.Nm +driver provides support for USB Debug Class devices whose +interface class is Diagnostic Class and the subclass is DbC.GP. +.Pp +The USB Debug Class is defined in the USB 3.1 Device Class +Specification for Debug Devices. +This is designed to provide a general-purpose communication channel +for debugging. +It has also been widely implemented in USB xHCs +.Pq USB eXtensible Host Controllers , +which can be found on many commodity computers, +as an optional feature. +Once this feature is enabled on a USB xHC, one of the USB ports will +behave as a USB Debug Class device, +not a host port, +when a USB debug cable is connected. +The supported class in USB xHCs is typically DbC.GP, +while the specification defines several types of Debug Class devices. +The DbC.GP uses IN and OUT endpoint pairs and realizes a single +bidirectional serial communication channel. +On most systems, +including +.Fx , +the DbC.GP is seen as a simple serial device. +.Pp +Most systems with USB xHC can be configured to provide DbC.GP access. +The +.Nm +is a driver that connects to DbC.GP-supported devices, +offering +.Xr tty 4 +devices to connect to them via the +.Xr ucom 4 +device driver. +.Sh HARDWARE CONFIGURATION +A native DbC.GP device can be attached using the +.Nm +driver in a straightforward way. +.Pp +A USB xHC DbC.GP device on a target system needs a special hardware +configuration because all of the ports are supposed to be a USB Host. +There is one method to expose DbC.GP is to use a USB 3.1 A-to-A cable +.Pq section 5.5.2 in USB 3.1 Legacy Cable and Connector Specification . +When this cable is connected to a USB 3.1 port on the target system, +the DbC-enabled USB xHC automatically switches the port as a USB Device. +The +.Nm +driver can find a DbC.GP device on that port. +.Pp +Note that a USB xHC with USB 3.2 support +.Pq USB Type-C connectors +is not compatible with the USB 3.1 A-to-A cable. +Connecting a USB 3.2 C-to-C cable or A-to-C cable does not automatically work, +either, +because it needs role configuration of the port, which is not supported on +.Fx +yet. +.Sh FILES +.Bl -tag -width "/dev/ttyU*.*.init" -compact +.It Pa /dev/ttyU*.* +for callin ports +.It Pa /dev/ttyU*.*.init +.It Pa /dev/ttyU*.*.lock +corresponding callin initial-state and lock-state devices +.Pp +.It Pa /dev/cuaU*.* +for callout ports +.It Pa /dev/cuaU*.*.init +.It Pa /dev/cuaU*.*.lock +corresponding callout initial-state and lock-state devices +.El +.Sh SEE ALSO +.Xr tty 4 , +.Xr ucom 4 , +.Xr usb 4 , +.Xr xhci 4 +.Sh STANDARDS +.Rs +.%T eXtensible Host Controller Interface for Universal Serial Bus (XHCI) +.%U https://www.intel.com/content/dam/www/public/us/en/documents/technical-specifications/extensible-host-controler-interface-usb-xhci.pdf +.Re +.Rs +.%T USB 3.1 Device Class Specification for Debug Devices +.%U https://www.usb.org/sites/default/files/documents/usb_debug_class_rev_1_0_final_0.pdf +.Re +.Rs +.%T USB 3.1 Legacy Cable and Connector Specification +.%U https://www.usb.org/document-library/usb-31-legacy-cable-and-connector-revision-10 +.Re +.Sh HISTORY +The +.Nm +driver first appeared +.Fx +15.0. +.Sh AUTHORS +.An -nosplit +The +.Nm +driver was written by +.An Hiroki Sato Aq Mt hrs@FreeBSD.org . +.Sh BUGS +According to the XHCI specification the host side of USB Debug should work with +any USB 3.0 port, +whether connected directly to a controller or with a hub in between. +Testing on some controllers has encountered issues when using a hub rather than +a directly connected port on the controller. diff --git a/sys/dev/usb/serial/udbc.c b/sys/dev/usb/serial/udbc.c new file mode 100644 index 000000000000..d7ca6b25bf32 --- /dev/null +++ b/sys/dev/usb/serial/udbc.c @@ -0,0 +1,404 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-NetBSD + * + * Copyright (c) 2000 The NetBSD Foundation, Inc. + * Copyright (c) 2016-2024 Hiroki Sato + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Lennart Augustsson (lennart@augustsson.net). + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include "usbdevs.h" + +#define USB_DEBUG_VAR udbc_debug +#include +#include +#include + +static SYSCTL_NODE(_hw_usb, OID_AUTO, udbc, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, + "USB DbC Client"); + +#ifdef USB_DEBUG +static int udbc_debug = 0; +SYSCTL_INT(_hw_usb_udbc, OID_AUTO, debug, CTLFLAG_RWTUN, &udbc_debug, 0, + "Debug level"); +#endif + +#define UDBC_CONFIG_INDEX 0 + +#define UDBC_IBUFSIZE 1024 +#define UDBC_OBUFSIZE 1024 + +enum { + UDBC_BULK_DT_WR, + UDBC_BULK_DT_RD, + UDBC_N_TRANSFER, /* n of EP */ +}; + +struct udbc_softc { + struct ucom_super_softc sc_super_ucom; + struct ucom_softc sc_ucom; + + struct usb_device *sc_udev; + struct usb_xfer *sc_xfer[UDBC_N_TRANSFER]; + device_t sc_dev; + struct mtx sc_mtx; + + uint32_t sc_unit; +}; + +/* prototypes */ + +static device_probe_t udbc_probe; +static device_attach_t udbc_attach; +static device_detach_t udbc_detach; +static void udbc_free_softc(struct udbc_softc *); + +static usb_callback_t udbc_write_callback; +static usb_callback_t udbc_read_callback; + +static void udbc_free(struct ucom_softc *); +static void udbc_cfg_open(struct ucom_softc *); +static void udbc_cfg_close(struct ucom_softc *); +static int udbc_pre_param(struct ucom_softc *, struct termios *); +static int udbc_ioctl(struct ucom_softc *, uint32_t, caddr_t, int, + struct thread *); +static void udbc_start_read(struct ucom_softc *); +static void udbc_stop_read(struct ucom_softc *); +static void udbc_start_write(struct ucom_softc *); +static void udbc_stop_write(struct ucom_softc *); +static void udbc_poll(struct ucom_softc *ucom); + +static const struct usb_config udbc_config[UDBC_N_TRANSFER] = { + [UDBC_BULK_DT_WR] = { + .type = UE_BULK, + .endpoint = UE_ADDR_ANY, + .direction = UE_DIR_OUT, + .bufsize = UDBC_OBUFSIZE, + .flags = {.pipe_bof = 1,}, + .callback = &udbc_write_callback, + }, + + [UDBC_BULK_DT_RD] = { + .type = UE_BULK, + .endpoint = UE_ADDR_ANY, + .direction = UE_DIR_IN, + .bufsize = UDBC_IBUFSIZE, + .flags = {.pipe_bof = 1,.short_xfer_ok = 1,}, + .callback = &udbc_read_callback, + }, +}; + +static const struct ucom_callback udbc_callback = { + .ucom_cfg_open = &udbc_cfg_open, + .ucom_cfg_close = &udbc_cfg_close, + .ucom_pre_param = &udbc_pre_param, + .ucom_ioctl = &udbc_ioctl, + .ucom_start_read = &udbc_start_read, + .ucom_stop_read = &udbc_stop_read, + .ucom_start_write = &udbc_start_write, + .ucom_stop_write = &udbc_stop_write, + .ucom_poll = &udbc_poll, + .ucom_free = &udbc_free, +}; + +static device_method_t udbc_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, udbc_probe), + DEVMETHOD(device_attach, udbc_attach), + DEVMETHOD(device_detach, udbc_detach), + DEVMETHOD_END +}; + +static int +udbc_probe(device_t dev) +{ + struct usb_attach_arg *uaa = device_get_ivars(dev); + + if (uaa->usb_mode != USB_MODE_HOST) + return (ENXIO); + if (uaa->info.bConfigIndex != UDBC_CONFIG_INDEX) + return (ENXIO); + if (uaa->info.bInterfaceClass != UICLASS_DIAGNOSTIC) + return (ENXIO); + if (uaa->info.bDeviceProtocol != 0x00) /* GNU GDB == 1 */ + return (ENXIO); + + return (BUS_PROBE_SPECIFIC); +} + +static int +udbc_attach(device_t dev) +{ + struct usb_attach_arg *uaa = device_get_ivars(dev); + struct udbc_softc *sc = device_get_softc(dev); + int error; + + DPRINTF("\n"); + + sc->sc_udev = uaa->device; + sc->sc_dev = dev; + sc->sc_unit = device_get_unit(dev); + + device_set_usb_desc(dev); + mtx_init(&sc->sc_mtx, "udbc", NULL, MTX_DEF); + ucom_ref(&sc->sc_super_ucom); + + sc->sc_ucom.sc_portno = 0; + + error = usbd_transfer_setup(uaa->device, &uaa->info.bIfaceIndex, + sc->sc_xfer, udbc_config, UDBC_N_TRANSFER, sc, &sc->sc_mtx); + + if (error) { + device_printf(dev, + "allocating USB transfers failed\n"); + goto detach; + } + /* clear stall at first run */ + mtx_lock(&sc->sc_mtx); + usbd_xfer_set_stall(sc->sc_xfer[UDBC_BULK_DT_WR]); + usbd_xfer_set_stall(sc->sc_xfer[UDBC_BULK_DT_RD]); + mtx_unlock(&sc->sc_mtx); + + error = ucom_attach(&sc->sc_super_ucom, &sc->sc_ucom, 1, sc, + &udbc_callback, &sc->sc_mtx); + if (error) + goto detach; + ucom_set_pnpinfo_usb(&sc->sc_super_ucom, dev); + + return (0); /* success */ + +detach: + udbc_detach(dev); + return (ENXIO); +} + +static int +udbc_detach(device_t dev) +{ + struct udbc_softc *sc = device_get_softc(dev); + + ucom_detach(&sc->sc_super_ucom, &sc->sc_ucom); + usbd_transfer_unsetup(sc->sc_xfer, UDBC_N_TRANSFER); + + device_claim_softc(dev); + + udbc_free_softc(sc); + + return (0); +} + +UCOM_UNLOAD_DRAIN(udbc); + +static void +udbc_free_softc(struct udbc_softc *sc) +{ + if (ucom_unref(&sc->sc_super_ucom)) { + mtx_destroy(&sc->sc_mtx); + device_free_softc(sc); + } +} + +static void +udbc_free(struct ucom_softc *ucom) +{ + udbc_free_softc(ucom->sc_parent); +} + +static void +udbc_cfg_open(struct ucom_softc *ucom) +{ + /* + * This do-nothing open routine exists for the sole purpose of this + * DPRINTF() so that you can see the point at which open gets called + * when debugging is enabled. + */ + DPRINTF("\n"); +} + +static void +udbc_cfg_close(struct ucom_softc *ucom) +{ + /* + * This do-nothing close routine exists for the sole purpose of this + * DPRINTF() so that you can see the point at which close gets called + * when debugging is enabled. + */ + DPRINTF("\n"); +} + +static void +udbc_write_callback(struct usb_xfer *xfer, usb_error_t error) +{ + struct udbc_softc *sc = usbd_xfer_softc(xfer); + struct usb_page_cache *pc; + uint32_t buflen; + + DPRINTFN(3, "\n"); + + switch (USB_GET_STATE(xfer)) { + default: /* Error */ + if (error != USB_ERR_CANCELLED) { + /* try to clear stall first */ + usbd_xfer_set_stall(xfer); + } + /* FALLTHROUGH */ + case USB_ST_SETUP: + case USB_ST_TRANSFERRED: + pc = usbd_xfer_get_frame(xfer, 0); + if (ucom_get_data(&sc->sc_ucom, pc, 0, UDBC_OBUFSIZE, + &buflen) == 0) + break; + if (buflen != 0) { + usbd_xfer_set_frame_len(xfer, 0, buflen); + usbd_transfer_submit(xfer); + } + break; + } +} + +static void +udbc_read_callback(struct usb_xfer *xfer, usb_error_t error) +{ + struct udbc_softc *sc = usbd_xfer_softc(xfer); + struct usb_page_cache *pc; + int buflen; + + DPRINTFN(3, "\n"); + + usbd_xfer_status(xfer, &buflen, NULL, NULL, NULL); + + switch (USB_GET_STATE(xfer)) { + case USB_ST_TRANSFERRED: + pc = usbd_xfer_get_frame(xfer, 0); + ucom_put_data(&sc->sc_ucom, pc, 0, buflen); + /* FALLTHROUGH */ + case USB_ST_SETUP: +tr_setup: + usbd_xfer_set_frame_len(xfer, 0, usbd_xfer_max_len(xfer)); + usbd_transfer_submit(xfer); + return; + + default: /* Error */ + if (error != USB_ERR_CANCELLED) { + /* try to clear stall first */ + usbd_xfer_set_stall(xfer); + goto tr_setup; + } + return; + } +} + +static int +udbc_pre_param(struct ucom_softc *ucom, struct termios *t) +{ + DPRINTF("\n"); + + return (0); +} + +static int +udbc_ioctl(struct ucom_softc *ucom, uint32_t cmd, caddr_t data, int flag, + struct thread *td) +{ + return (ENOIOCTL); +} + +static void +udbc_start_read(struct ucom_softc *ucom) +{ + struct udbc_softc *sc = ucom->sc_parent; + + usbd_transfer_start(sc->sc_xfer[UDBC_BULK_DT_RD]); +} + +static void +udbc_stop_read(struct ucom_softc *ucom) +{ + struct udbc_softc *sc = ucom->sc_parent; + + usbd_transfer_stop(sc->sc_xfer[UDBC_BULK_DT_RD]); +} + +static void +udbc_start_write(struct ucom_softc *ucom) +{ + struct udbc_softc *sc = ucom->sc_parent; + + usbd_transfer_start(sc->sc_xfer[UDBC_BULK_DT_WR]); +} + +static void +udbc_stop_write(struct ucom_softc *ucom) +{ + struct udbc_softc *sc = ucom->sc_parent; + + usbd_transfer_stop(sc->sc_xfer[UDBC_BULK_DT_WR]); +} + +static void +udbc_poll(struct ucom_softc *ucom) +{ + struct udbc_softc *sc = ucom->sc_parent; + + usbd_transfer_poll(sc->sc_xfer, UDBC_N_TRANSFER); +} + +static driver_t udbc_driver = { + .name = "udbc", + .methods = udbc_methods, + .size = sizeof(struct udbc_softc), +}; + +DRIVER_MODULE(udbc, uhub, udbc_driver, NULL, NULL); +MODULE_DEPEND(udbc, ucom, 1, 1, 1); +MODULE_DEPEND(udbc, usb, 1, 1, 1); +MODULE_VERSION(udbc, 1); diff --git a/sys/modules/usb/Makefile b/sys/modules/usb/Makefile index 1290b878fa37..d9b1c8635b30 100644 --- a/sys/modules/usb/Makefile +++ b/sys/modules/usb/Makefile @@ -46,10 +46,9 @@ SUBDIR = usb SUBDIR += ${_dwc_otg} ehci ${_musb} ohci uhci xhci ${_uss820dci} \ ${_atmegadci} ${_avr32dci} ${_rsu} ${_rsufw} ${_bcm2838_xhci} SUBDIR += mtw ${_rum} ${_run} ${_runfw} ${_uath} upgt usie ural ${_zyd} ${_urtw} -SUBDIR += atp cfumass uhid uhid_snes ukbd ums udbp uep wmt wsp ugold uled \ - usbhid -SUBDIR += ucom u3g uark ubsa ubser uchcom ucycom ufoma uftdi ugensa uipaq ulpt \ - umb umct umcs umodem umoscom uplcom uslcom uvisor uvscom +SUBDIR += atp cfumass uhid uhid_snes ukbd ums udbp uep wmt wsp ugold uled usbhid +SUBDIR += ucom u3g uark ubsa ubser uchcom ucycom udbc ufoma uftdi ugensa uipaq +SUBDIR += ulpt umb umct umcs umodem umoscom uplcom uslcom uvisor uvscom SUBDIR += i2ctinyusb SUBDIR += cp2112 SUBDIR += udl diff --git a/sys/modules/usb/udbc/Makefile b/sys/modules/usb/udbc/Makefile new file mode 100644 index 000000000000..9996b2e391fb --- /dev/null +++ b/sys/modules/usb/udbc/Makefile @@ -0,0 +1,9 @@ +S= ${SRCTOP}/sys + +.PATH: $S/dev/usb/serial + +KMOD= udbc +SRCS= opt_bus.h opt_usb.h device_if.h bus_if.h usb_if.h usbdevs.h \ + udbc.c + +.include From nobody Mon Sep 15 16:49:38 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cQWGV3LXCz67cC1; Mon, 15 Sep 2025 16:49: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 4cQWGV2nWbz3kGN; Mon, 15 Sep 2025 16:49:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1757954978; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jnuJ00Xx0Dl/4jbITgaQ64vk1FLGGmUn300eEXrO8Oc=; b=e9FixbXeDZtE3tYAhKW2TUcxyEEWLr3kkDehqGwJ2R6NafBppU+ReRIGiutRDZ2bVl7K44 lpc70aMBmf/sICErHdT1Z3V8t/R+XyvdAN54AZyrhYn1S1dK6HRJU5+xQlN+UBpmjiU9kE OJQZMBiVQWI6ytxVyGgrRtqmbfcP70QzulaCuzSTLip3pm40sgQqJ+slk58eTUe43UHUor +wb67Coy1zrrgtSV6ihtUKcTEyaIN+d2LFDRne2v8rOPsFYRCzw6hnM/j5lyngRqUvHRK2 G19pSI6RF8h+lUHHawzgpfasH/mTrLceCfpFBxwgvEQFm8Z3CYeaaqn4MBo+KA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1757954978; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jnuJ00Xx0Dl/4jbITgaQ64vk1FLGGmUn300eEXrO8Oc=; b=om9oTnvjh6wPj/lsF9Bxn4y2ttuffAsJegNQYJ/DcFKBttRK0jfnW4WLPTyMiTv0CwhBEi JbrDFfodUIYLaZ1cQv2ZpS63Pqq+36Rb76vEq8WWUDcTq7iPgwIa8ZfDhtT6p05CaWpouy 7q1tqgAGUTFjTgvhU2Vs1yeay3c3jXy/af9CDMzpp6DG8C9Xm0PXfPLOHZYNNosDsrwaub FuNhbHVo0X5EhTbnPHyy2Zsp377XAh96HqJaCEIHK5kZCnFeJc/VtDCMRcO9Kq6Et6suHY jg9viMfOwrw5HOeNdYTo/D9FpEw20UDUDX/HPlpyZRm/7CUBGDqxApUEkdQvCA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1757954978; a=rsa-sha256; cv=none; b=e0nbFiRzH8lpetQCBjjPfjABceIA1JDy34/ycMSXVUQzkQlnCv/eEsdRYkZHxQG8E07pGH mnJU85YwK2FL2IiU5AHe7P15DMeU2QztLiGM90KKOHf5h1YVfwO0bb3T37hPzvopcOekVC fuNz5L46ttpb3CNJ4GQ+MYOo7o99KkEhASmPaHL4VXJV9Y6QX5ibfk7IozkV02z43TASo2 i/b6oCF9qD/86Khx9K062UqHC9/HMF1YlaWzB1aIpV+d6es3HccYXV5gkPZJm5bV2SsoNt ZqkU5fdFzOIhYMixP/HULFuMcXI+xG+w1JtqsYdsuBA1zqYl1rA2/WdrboDQPw== 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 4cQWGV2Jqqz137Y; Mon, 15 Sep 2025 16:49: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 58FGncU0073624; Mon, 15 Sep 2025 16:49:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58FGnc63073621; Mon, 15 Sep 2025 16:49:38 GMT (envelope-from git) Date: Mon, 15 Sep 2025 16:49:38 GMT Message-Id: <202509151649.58FGnc63073621@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Jonathan T. Looney" Subject: git: cd02a8a9f8be - main - ip6: add SO_BINTIME support List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jtl X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cd02a8a9f8be2085d5242606a79668dc3720e7b0 Auto-Submitted: auto-generated The branch main has been updated by jtl: URL: https://cgit.FreeBSD.org/src/commit/?id=cd02a8a9f8be2085d5242606a79668dc3720e7b0 commit cd02a8a9f8be2085d5242606a79668dc3720e7b0 Author: Jonathan T. Looney AuthorDate: 2025-09-12 17:49:17 +0000 Commit: Jonathan T. Looney CommitDate: 2025-09-15 16:46:03 +0000 ip6: add SO_BINTIME support This adds support for obtaining timestamps from IPv6 packets using the SO_BINTIME socket option, bringing it in parity with IPv4 behavior. Enable testing the SO_BINTIME option in the relevant (manual) regression test. PR: 289423 Reviewed by: markj MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D52504 --- sys/netinet6/ip6_input.c | 53 +++++++++++++++------- .../regression/sockets/udp_pingpong/udp_pingpong.c | 8 ++-- 2 files changed, 39 insertions(+), 22 deletions(-) diff --git a/sys/netinet6/ip6_input.c b/sys/netinet6/ip6_input.c index 45fd23ea6c21..b22491a6007f 100644 --- a/sys/netinet6/ip6_input.c +++ b/sys/netinet6/ip6_input.c @@ -1197,8 +1197,8 @@ ip6_savecontrol_v4(struct inpcb *inp, struct mbuf *m, struct mbuf **mp, { struct ip6_hdr *ip6 = mtod(m, struct ip6_hdr *); -#ifdef SO_TIMESTAMP - if ((inp->inp_socket->so_options & SO_TIMESTAMP) != 0) { +#if defined(SO_TIMESTAMP) && defined(SO_BINTIME) + if ((inp->inp_socket->so_options & (SO_TIMESTAMP | SO_BINTIME)) != 0) { union { struct timeval tv; struct bintime bt; @@ -1206,47 +1206,66 @@ ip6_savecontrol_v4(struct inpcb *inp, struct mbuf *m, struct mbuf **mp, } t; struct bintime boottimebin, bt1; struct timespec ts1; + int ts_clock; bool stamped; + ts_clock = inp->inp_socket->so_ts_clock; stamped = false; - switch (inp->inp_socket->so_ts_clock) { - case SO_TS_REALTIME_MICRO: + + /* + * Handle BINTIME first. We create the same output options + * for both SO_BINTIME and the case where SO_TIMESTAMP is + * set with the timestamp clock set to SO_TS_BINTIME. + */ + if ((inp->inp_socket->so_options & SO_BINTIME) != 0 || + ts_clock == SO_TS_BINTIME) { if ((m->m_flags & (M_PKTHDR | M_TSTMP)) == (M_PKTHDR | M_TSTMP)) { mbuf_tstmp2timespec(m, &ts1); - timespec2bintime(&ts1, &bt1); + timespec2bintime(&ts1, &t.bt); getboottimebin(&boottimebin); - bintime_add(&bt1, &boottimebin); - bintime2timeval(&bt1, &t.tv); + bintime_add(&t.bt, &boottimebin); } else { - microtime(&t.tv); + bintime(&t.bt); } - *mp = sbcreatecontrol(&t.tv, sizeof(t.tv), - SCM_TIMESTAMP, SOL_SOCKET, M_NOWAIT); + *mp = sbcreatecontrol(&t.bt, sizeof(t.bt), SCM_BINTIME, + SOL_SOCKET, M_NOWAIT); if (*mp != NULL) { mp = &(*mp)->m_next; stamped = true; } - break; - case SO_TS_BINTIME: + /* + * Suppress other timestamps if SO_TIMESTAMP is not + * set. + */ + if ((inp->inp_socket->so_options & SO_TIMESTAMP) == 0) + ts_clock = SO_TS_BINTIME; + } + + switch (ts_clock) { + case SO_TS_REALTIME_MICRO: if ((m->m_flags & (M_PKTHDR | M_TSTMP)) == (M_PKTHDR | M_TSTMP)) { mbuf_tstmp2timespec(m, &ts1); - timespec2bintime(&ts1, &t.bt); + timespec2bintime(&ts1, &bt1); getboottimebin(&boottimebin); - bintime_add(&t.bt, &boottimebin); + bintime_add(&bt1, &boottimebin); + bintime2timeval(&bt1, &t.tv); } else { - bintime(&t.bt); + microtime(&t.tv); } - *mp = sbcreatecontrol(&t.bt, sizeof(t.bt), SCM_BINTIME, - SOL_SOCKET, M_NOWAIT); + *mp = sbcreatecontrol(&t.tv, sizeof(t.tv), + SCM_TIMESTAMP, SOL_SOCKET, M_NOWAIT); if (*mp != NULL) { mp = &(*mp)->m_next; stamped = true; } break; + case SO_TS_BINTIME: + break; + case SO_TS_REALTIME: if ((m->m_flags & (M_PKTHDR | M_TSTMP)) == (M_PKTHDR | M_TSTMP)) { diff --git a/tools/regression/sockets/udp_pingpong/udp_pingpong.c b/tools/regression/sockets/udp_pingpong/udp_pingpong.c index 2fe342debdc6..e852f7a7af87 100644 --- a/tools/regression/sockets/udp_pingpong/udp_pingpong.c +++ b/tools/regression/sockets/udp_pingpong/udp_pingpong.c @@ -601,11 +601,9 @@ main(void) test_run(TT_TIMESTAMP, i, 1, "send()/recvmsg(), setsockopt(SO_TIMESTAMP, 1)"); printf("OK\n"); - if (i == 0) { - test_run(TT_BINTIME, i, 1, - "send()/recvmsg(), setsockopt(SO_BINTIME, 1)"); - printf("OK\n"); - } + test_run(TT_BINTIME, i, 1, + "send()/recvmsg(), setsockopt(SO_BINTIME, 1)"); + printf("OK\n"); test_run(TT_REALTIME_MICRO, i, 1, "send()/recvmsg(), setsockopt(SO_TS_CLOCK, SO_TS_REALTIME_MICRO)"); printf("OK\n"); From nobody Mon Sep 15 17:26:28 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cQX510Wflz67gFG; Mon, 15 Sep 2025 17:26:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cQX506wJYz3sRc; Mon, 15 Sep 2025 17:26:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1757957189; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rBbUeQt8+euoRj3G3Frz5sdlLSZQrGfMkPkbbHcGMtE=; b=ftXWN/CBX+snlVTbe4QVmr9O6gTZ9a2oJca7woC6W55Pa9znTMyFXYMfZ07BF0G9lyKAmA TVgHwla5iOwWc+f/2eOkcwTDxBdpPI4c9vmmCIEpHJIVN46wnzyhew612yeAvYOO79Ze24 3tNW4OAyOP8cllJFgoDovlutiyUt+ruoX+Qz7UG+SRl0USiIEDQNhs1biJgCOxHRb2BRjP MCREx3M3IDRCZ/zBXzd0btEYSI4TRIQEuqa2CsOoeR10hMgklEICmQuzsmk+aR2DxwtRpM yyd3NTA+ecEkWC9rj+9XWKkAf+S/lcDhEEHiL0Pw1mqFyCYpBicw/e2vUgfUzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1757957189; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rBbUeQt8+euoRj3G3Frz5sdlLSZQrGfMkPkbbHcGMtE=; b=vBO5i3R3+cTAzWqaEGjHbbABvk3z1yJhsN/Q3ulvIMqz0qyZkEZ+xw3g30IPKbPnUkJX/d mhruZGzQ6Lk7M+u4Ov6fb92weBIkzNTF5VcrUGr8M8Fb9+ymOzsJDosbAHxT5RayYrfdEA b+R2Zu5ly5B0YlFifr2QuxMjRKPPrV7S0bdUxhOUmRev18RZ+4cBiP4BjQWqds24K6TeyX K2DF/gLibt3iiqt+NLcNY8wBc7IfDLp+SF8Vt/sXEyiY1hR9FuDfQecEutPnsyBDjsHPFN 0XqskkcNgL6PtWwmcJWhywKuNEuIwpzI2+pSwgQSxW+sTCexTYZGDY7P3JMEJg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1757957189; a=rsa-sha256; cv=none; b=I3pvNW+89kOjlKdF0Q+cZ75ijTo6Ov889NcP5fpgB54JdJYhWl4OWSI8u6vRM6lQWmVY7g MgD44gynQ3xrmTkrZvImpjdeKuRL2SZE9IUAVpRBihZhFOAKxdIGmo/+Bbyw41sr19DiXh WCk65RccbEzaCRDPP2nLh2lav7N6PzH3DiW5+Obwpo1WiXmTYPaB1IeFZgZ5Iog6pRb/pT ASdzPRLkdq8QM7cw1ghawcqPBJdbQQNdg7P7AqyZTbiYu9eKaJA5rj5bcu2qFRzM9KhVSr CW2Bi6lOOoJnBcFHopXwJ0tNDHAxIU+XOemiTpahvUPyc8cK5EAsKTCCS0ee2A== 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 4cQX506QSqz13Rc; Mon, 15 Sep 2025 17:26: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 58FHQSjk048507; Mon, 15 Sep 2025 17:26:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58FHQSdN048504; Mon, 15 Sep 2025 17:26:28 GMT (envelope-from git) Date: Mon, 15 Sep 2025 17:26:28 GMT Message-Id: <202509151726.58FHQSdN048504@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 246d7e9fc239 - main - jail: Optionally allow audit session state to be configured in a jail List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 246d7e9fc23928be22db38220f5439f5cdee5264 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=246d7e9fc23928be22db38220f5439f5cdee5264 commit 246d7e9fc23928be22db38220f5439f5cdee5264 Author: Mark Johnston AuthorDate: 2025-09-15 17:23:50 +0000 Commit: Mark Johnston CommitDate: 2025-09-15 17:23:50 +0000 jail: Optionally allow audit session state to be configured in a jail Currently it is impossible for a privileged, jailed process to set audit session state. This can result in suprising audit event misattribution. For example, suppose a user ssh'es into a jail and restarts a service; normally, sshd sets audit state such that events generated by the SSH session are attributed to the newly authenticated user, but in a jail, the corresponding setaudit(2) call fails, so events are attributed to the user who had started sshd in the jail (typically the user who had started the jail itself by some means). While this behaviour is reasonable, administrators might want to trust the jailed sshd to reset audit state, such that the authenticated user appears in audit logs. Add a jail knob to enable this. Add a simple regression test. Reviewed by: kevans, jamie MFC after: 1 week Sponsored by: Modirum MDPay Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D51719 --- sys/kern/kern_jail.c | 13 ++++++++++++- sys/security/audit/audit_syscalls.c | 12 ------------ sys/sys/jail.h | 3 ++- usr.sbin/jail/jail.8 | 19 +++++++++++++++---- usr.sbin/jail/tests/jail_basic_test.sh | 20 ++++++++++++++++++++ 5 files changed, 49 insertions(+), 18 deletions(-) diff --git a/sys/kern/kern_jail.c b/sys/kern/kern_jail.c index a75ba89d2a7e..3697d95fe0e5 100644 --- a/sys/kern/kern_jail.c +++ b/sys/kern/kern_jail.c @@ -243,6 +243,9 @@ static struct bool_flags pr_flag_allow[NBBY * NBPW] = { {"allow.unprivileged_parent_tampering", "allow.nounprivileged_parent_tampering", PR_ALLOW_UNPRIV_PARENT_TAMPER}, +#ifdef AUDIT + {"allow.setaudit", "allow.nosetaudit", PR_ALLOW_SETAUDIT}, +#endif }; static unsigned pr_allow_all = PR_ALLOW_ALL_STATIC; const size_t pr_flag_allow_size = sizeof(pr_flag_allow); @@ -4289,7 +4292,6 @@ prison_priv_check(struct ucred *cred, int priv) */ case PRIV_KTRACE: -#if 0 /* * Allow jailed processes to configure audit identity and * submit audit records (login, etc). In the future we may @@ -4298,6 +4300,11 @@ prison_priv_check(struct ucred *cred, int priv) */ case PRIV_AUDIT_GETAUDIT: case PRIV_AUDIT_SETAUDIT: + if (cred->cr_prison->pr_allow & PR_ALLOW_SETAUDIT) + return (0); + else + return (EPERM); +#if 0 case PRIV_AUDIT_SUBMIT: #endif @@ -5034,6 +5041,10 @@ SYSCTL_JAIL_PARAM(_allow, settime, CTLTYPE_INT | CTLFLAG_RW, "B", "Jail may set system time"); SYSCTL_JAIL_PARAM(_allow, routing, CTLTYPE_INT | CTLFLAG_RW, "B", "Jail may modify routing table"); +#ifdef AUDIT +SYSCTL_JAIL_PARAM(_allow, setaudit, CTLTYPE_INT | CTLFLAG_RW, + "B", "Jail may set and get audit session state"); +#endif SYSCTL_JAIL_PARAM_SUBNODE(allow, mount, "Jail mount/unmount permission flags"); SYSCTL_JAIL_PARAM(_allow_mount, , CTLTYPE_INT | CTLFLAG_RW, diff --git a/sys/security/audit/audit_syscalls.c b/sys/security/audit/audit_syscalls.c index 40b2fb3d1c9f..262f2c1ae1e3 100644 --- a/sys/security/audit/audit_syscalls.c +++ b/sys/security/audit/audit_syscalls.c @@ -592,8 +592,6 @@ sys_getauid(struct thread *td, struct getauid_args *uap) { int error; - if (jailed(td->td_ucred)) - return (ENOSYS); error = priv_check(td, PRIV_AUDIT_GETAUDIT); if (error) return (error); @@ -609,8 +607,6 @@ sys_setauid(struct thread *td, struct setauid_args *uap) au_id_t id; int error; - if (jailed(td->td_ucred)) - return (ENOSYS); error = copyin(uap->auid, &id, sizeof(id)); if (error) return (error); @@ -650,8 +646,6 @@ sys_getaudit(struct thread *td, struct getaudit_args *uap) int error; cred = td->td_ucred; - if (jailed(cred)) - return (ENOSYS); error = priv_check(td, PRIV_AUDIT_GETAUDIT); if (error) return (error); @@ -674,8 +668,6 @@ sys_setaudit(struct thread *td, struct setaudit_args *uap) struct auditinfo ai; int error; - if (jailed(td->td_ucred)) - return (ENOSYS); error = copyin(uap->auditinfo, &ai, sizeof(ai)); if (error) return (error); @@ -715,8 +707,6 @@ sys_getaudit_addr(struct thread *td, struct getaudit_addr_args *uap) { int error; - if (jailed(td->td_ucred)) - return (ENOSYS); if (uap->length < sizeof(*uap->auditinfo_addr)) return (EOVERFLOW); error = priv_check(td, PRIV_AUDIT_GETAUDIT); @@ -734,8 +724,6 @@ sys_setaudit_addr(struct thread *td, struct setaudit_addr_args *uap) struct auditinfo_addr aia; int error; - if (jailed(td->td_ucred)) - return (ENOSYS); error = copyin(uap->auditinfo_addr, &aia, sizeof(aia)); if (error) return (error); diff --git a/sys/sys/jail.h b/sys/sys/jail.h index e12e8c3178c9..e6a13e6719dd 100644 --- a/sys/sys/jail.h +++ b/sys/sys/jail.h @@ -271,6 +271,7 @@ struct prison_racct { #define PR_ALLOW_SETTIME 0x00100000 #define PR_ALLOW_ROUTING 0x00200000 #define PR_ALLOW_UNPRIV_PARENT_TAMPER 0x00400000 +#define PR_ALLOW_SETAUDIT 0x00800000 /* * PR_ALLOW_PRISON0 are the allow flags that we apply by default to prison0, @@ -278,7 +279,7 @@ struct prison_racct { * build time. PR_ALLOW_ALL_STATIC should contain any bit above that we expect * to be used on the system, while PR_ALLOW_PRISON0 will be some subset of that. */ -#define PR_ALLOW_ALL_STATIC 0x007f87ff +#define PR_ALLOW_ALL_STATIC 0x00ff87ff #define PR_ALLOW_PRISON0 \ (PR_ALLOW_ALL_STATIC & ~(PR_ALLOW_UNPRIV_PARENT_TAMPER)) diff --git a/usr.sbin/jail/jail.8 b/usr.sbin/jail/jail.8 index 421aa9babb4c..d44b7f66a64e 100644 --- a/usr.sbin/jail/jail.8 +++ b/usr.sbin/jail/jail.8 @@ -23,7 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd August 7, 2025 +.Dd September 15, 2025 .Dt JAIL 8 .Os .Sh NAME @@ -702,15 +702,15 @@ The super-user will be disabled automatically if its parent system has it disabled. The super-user is enabled by default. .It Va allow.extattr -Allow privileged process in the jail to manipulate filesystem extended +Allow privileged processes in the jail to manipulate filesystem extended attributes in the system namespace. .It Va allow.adjtime -Allow privileged process in the jail to slowly adjusting global operating system +Allow privileged processes in the jail to slowly adjusting global operating system time. For example through utilities like .Xr ntpd 8 . .It Va allow.settime -Allow privileged process in the jail to set global operating system data +Allow privileged processes in the jail to set global operating system data and time. For example through utilities like .Xr date 1 . @@ -719,6 +719,17 @@ This permission includes also .It Va allow.routing Allow privileged process in the non-VNET jail to modify the system routing table. +.It Va allow.setaudit +Allow privileged processes in the jail to set +.Xr audit 4 +session state using +.Xr setaudit 2 +and related system calls. +This is useful, for example, for allowing a jailed +.Xr sshd 8 +to set the audit user ID for an authenticated session. +However, it gives jailed processes the ability to modify or disable audit +session state, so should be configured with care. .El .El .Pp diff --git a/usr.sbin/jail/tests/jail_basic_test.sh b/usr.sbin/jail/tests/jail_basic_test.sh index 6802da7b049a..c781eed78756 100755 --- a/usr.sbin/jail/tests/jail_basic_test.sh +++ b/usr.sbin/jail/tests/jail_basic_test.sh @@ -306,6 +306,25 @@ param_consistency_cleanup() fi } +atf_test_case "setaudit" +setaudit_head() +{ + atf_set descr 'Test that setaudit works in a jail when configured with allow.setaudit' + atf_set require.user root + atf_set require.progs setaudit +} + +setaudit_body() +{ + # Try to modify the audit mask within a jail without + # allow.setaudit configured. + atf_check -s not-exit:0 -o empty -e not-empty jail -c name=setaudit_jail \ + command=setaudit -m fr ls / + # The command should succeed if allow.setaudit is configured. + atf_check -s exit:0 -o ignore -e empty jail -c name=setaudit_jail \ + allow.setaudit command=setaudit -m fr ls / +} + atf_init_test_cases() { atf_add_test_case "basic" @@ -314,4 +333,5 @@ atf_init_test_cases() atf_add_test_case "commands" atf_add_test_case "jid_name_set" atf_add_test_case "param_consistency" + atf_add_test_case "setaudit" } From nobody Mon Sep 15 17:44:21 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cQXTd4W8Rz67hbs; Mon, 15 Sep 2025 17:44:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cQXTd3rP3z3vvN; Mon, 15 Sep 2025 17:44:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1757958261; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xViwxX4DzWYCmkSyvv42RXiEWLAoN2gaaCNoWLMSXVs=; b=VnMxJ1YTGiuU8YN7Yzb1NWl0Ia6eTffxA9Vwg8O6pXRPk5rgwxdfY4I/2gkz8FvB1UBAqh 70zZUBLYQXXquVjERzBcoFohLj5zFnrYTa3lbPRZWlc65pI0vVxJJEjr+ihUxMwG6DjY0B o/64e0bjuyfvlMbT/msbPJAFflj0H3SPMTsuI6uTPMLG2GmPBH/OePeW5Lf8f1103p7KEy aRtbJ0mt2IL5YelehGvQEY0XeQwWqcYEiaOaNImL14/4+4ssr0Xz+MjZewWj8eYlM1ox7p YAtm6eZ4O8GaF9nrAYmJGZHyeiGVKFYpGifbTBVkT/TNSLdJHIKK6+7NgJHUCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1757958261; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xViwxX4DzWYCmkSyvv42RXiEWLAoN2gaaCNoWLMSXVs=; b=pCNhgnxX+onFI7bT8jPGk/iUZH7bfsI2JbVWBbD4JpY56rDTaocAf2vwujgbeYmQ2xa6Id +Yaj9CWdbl6sPl68XK9HwcFp0XeQxRl8JQO3JdIccwtaFcLkLV24QyNuDaA5cvBjvgqIoa a0ZSgusoCXBApKNQnOicSMxdOIUUE2lmLrFkbt81UXFGpef+DO9ETAUIaK0inqqucYtQCr irNlwdFOBgvKwfYLLaqPZrjTcz+yjtJTcfrH/fEa2pc/xoUHZVKNuO+wss95CumNRGtfQQ hw+YBrxZ8rRHrBCUxWxYCYC7w2oECEwjWACG6onQIoxkDKS/HlLOn754n4+zLg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1757958261; a=rsa-sha256; cv=none; b=hiEhLA/eIEcAPpZMCtOXNlX8C6NFa+THt9Z5GGg1NFx1Zoz4eySNNQcwMRE+3OWEpKZWLp I1yNLS3TY8Q50SnIMyjgbdEf2rnjALiyl7Dk1H5QwV7KB2RQG3iESYqdStgTM/7tXVDBNG 2UtyQxx4DFJA8+N+2Pfl6Ejqlo2gAdpsN4ZufUeaVdcHdPWqQWY8oowhyCbJ9q1i4vPOSr M2pIJlm7TiBXtiFE79mSOr4DA0oyipaq7iAc0dyFS/+c0jVJEWNRoVFjWEzOlepQKtovp1 u8TTlTPWQvPDQkZ40Q4jKQ999SJqQMsoYWAOlOmNGDz8biPub3eDmGp+4DO3aQ== 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 4cQXTd3J8Tz13tG; Mon, 15 Sep 2025 17:44: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 58FHiL3P086057; Mon, 15 Sep 2025 17:44:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58FHiLZg086054; Mon, 15 Sep 2025 17:44:21 GMT (envelope-from git) Date: Mon, 15 Sep 2025 17:44:21 GMT Message-Id: <202509151744.58FHiLZg086054@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: e8b5025c3880 - main - sound: Honor CHN_F_NBIO List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e8b5025c3880b04c1c2139fe73b65fbd6deb41d4 Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=e8b5025c3880b04c1c2139fe73b65fbd6deb41d4 commit e8b5025c3880b04c1c2139fe73b65fbd6deb41d4 Author: Damjan Jovanovic AuthorDate: 2025-09-15 17:42:41 +0000 Commit: Christos Margiolis CommitDate: 2025-09-15 17:42:41 +0000 sound: Honor CHN_F_NBIO If the device is opened with O_NONBLOCK, even though we check for it in order to set CHN_F_NBIO, the subsequent chn_reset() calls will clear all flags, except those set in CHN_F_RESET, which does not include CHN_F_NBIO. Add CHN_F_NBIO to CHN_F_RESET. Additionally, because primary channels can be reused, make sure we do not unintentionally keep CHN_F_NBIO set if the channel is re-opened, but without O_NONBLOCK. PR: 289441 MFC after: 2 days Reviewed by: christos, markj Differential Revision: https://reviews.freebsd.org/D52493 --- sys/dev/sound/pcm/channel.h | 2 +- sys/dev/sound/pcm/dsp.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/dev/sound/pcm/channel.h b/sys/dev/sound/pcm/channel.h index fab182b22774..9ad21d219001 100644 --- a/sys/dev/sound/pcm/channel.h +++ b/sys/dev/sound/pcm/channel.h @@ -408,7 +408,7 @@ enum { #define CHN_F_RESET (CHN_F_BUSY | CHN_F_DEAD | \ CHN_F_VIRTUAL | CHN_F_HAS_VCHAN | \ - CHN_F_VCHAN_DYNAMIC | \ + CHN_F_VCHAN_DYNAMIC | CHN_F_NBIO | \ CHN_F_PASSTHROUGH | CHN_F_EXCLUSIVE) #define CHN_F_MMAP_INVALID (CHN_F_DEAD | CHN_F_RUNNING) diff --git a/sys/dev/sound/pcm/dsp.c b/sys/dev/sound/pcm/dsp.c index aa6ad4a59778..da38f52021ae 100644 --- a/sys/dev/sound/pcm/dsp.c +++ b/sys/dev/sound/pcm/dsp.c @@ -299,7 +299,7 @@ dsp_close(void *data) CHN_LOCK(rdch); chn_abort(rdch); /* won't sleep */ rdch->flags &= ~(CHN_F_RUNNING | CHN_F_MMAP | - CHN_F_DEAD | CHN_F_EXCLUSIVE); + CHN_F_DEAD | CHN_F_EXCLUSIVE | CHN_F_NBIO); chn_reset(rdch, 0, 0); chn_release(rdch); if (rdch->flags & CHN_F_VIRTUAL) { @@ -323,7 +323,7 @@ dsp_close(void *data) CHN_LOCK(wrch); chn_flush(wrch); /* may sleep */ wrch->flags &= ~(CHN_F_RUNNING | CHN_F_MMAP | - CHN_F_DEAD | CHN_F_EXCLUSIVE); + CHN_F_DEAD | CHN_F_EXCLUSIVE | CHN_F_NBIO); chn_reset(wrch, 0, 0); chn_release(wrch); if (wrch->flags & CHN_F_VIRTUAL) { From nobody Mon Sep 15 17:57:33 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cQXms3lYdz67jfN; Mon, 15 Sep 2025 17:57:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cQXms37XSz3y0V; Mon, 15 Sep 2025 17:57:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1757959053; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7WN0FlCVkQJd7vZFV+GyfjlAU0q2XtLBvzKseoKZdNY=; b=h0exXuiUHka38qFf+5FzkcDEUJazBkjLjCe/VXLZRlWm4h+2NO7OV54COCk8dVxSeLAYlW x7Wegv2i/sCQWZsoMgBNvi4MscVELLxTZqojeak/T98GCIKEBfPhQRLXkcLc1Qf1dYLAdZ LH3ZeEf1/My80V41e5TbCHLDsBxXC1tMSwbe8hmCLfXJAAMMnY+Ylk+hnArVAB3tjt4Cx/ IYyZDqFGFSrgAc0Sb9PVx+9qMxexQZ+saWR5/zZaP8idZLx+nMINaWwV1kxPc4Dl3uQq1r EFjl0P+z8BxDBakhRqDz9BjXRQhPdl5zTzwMlbz2nboeSlQAK7iJugI2Y+3vdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1757959053; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7WN0FlCVkQJd7vZFV+GyfjlAU0q2XtLBvzKseoKZdNY=; b=yokYJBI12jpLJWPT2UTsM5juFSp7+Z5UW2yBBkYtIyXEuCuC6PqF8W4EVkhH1kKfw8zl/m k9AJs95FSD1Gd2dBLP+yh4wjSsmJXM5FLAddZejvs/1U47z1HVM4UaaHSR2uPxGssquu75 Z7clCxHrFeWMccLLEeGdPhiBJoqXcc7qGH6h8aW+R9WccakiKvse8HVAKaoieJo4RjLp9W Zh4vedS4Z5yGgA3pu7AAaCnxS6Xw774ZcRse0/kC284x2v2h35BG+QWSCBT2bMm3TI0vvk dWOha1DB1/uAYujnXov4XzNK9UkcTL3yBB6eXC+OnjQkDj68gI/kGAR1mGk8JQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1757959053; a=rsa-sha256; cv=none; b=YqI9YxSjRG3A8eiLIu1IM0OhIkzxs4oODACvIgEdQflcJftJMVGT68mNESvGPtRc3FFowP K94+2W/EHKPHQNExCRDhx5wJDMgVNpQh84SVLQZ/pnQqkxyJAzoIkc1NeI4pWRcbRzgct3 iwbJujTBF/eI2H15Q0q3eWLGr2u6Jn4fKR22Xv7zB0AGomXHqhrsgUSa0QtzNRn/YDH73B xgPvgDwdfnJDEkjPdQ6y4VlXC7y3rDh2mxNHdbBIMnJTI1eP7AMw5bn9uwp1hVA8uGL3jU uR3wW9csdYcTEEPLGyc8q1Vqo6iDj3Tw/FBa4yF+r/GPV/ERk7zs1sXYvhj3MA== 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 4cQXms2cYyz14TD; Mon, 15 Sep 2025 17:57:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58FHvXlZ005197; Mon, 15 Sep 2025 17:57:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58FHvXZr005194; Mon, 15 Sep 2025 17:57:33 GMT (envelope-from git) Date: Mon, 15 Sep 2025 17:57:33 GMT Message-Id: <202509151757.58FHvXZr005194@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 18fd1443d205 - main - ifconfig: Enter jail as soon as possible List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 18fd1443d205aed6be22966125a4820f77571948 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=18fd1443d205aed6be22966125a4820f77571948 commit 18fd1443d205aed6be22966125a4820f77571948 Author: Dag-Erling Smørgrav AuthorDate: 2025-09-15 17:56:33 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-09-15 17:56:33 +0000 ifconfig: Enter jail as soon as possible Some options (in particular, -g) are processed immediately upon being parsed. This will produce the wrong result in combination with -j since we only attach to the jail after we're done parsing arguments. Solve this by attaching to the jail immediately when -j is encountered. The downside is that e.g. `ifconfig -j foo -j bar` would previously attach to jail “bar”, whereas now it will attempt to attach to jail “foo”, and if successful, attempt to attach to jail “bar” within jail “foo”. This may be considered a feature. PR: 289134 MFC after: 1 week Reviewed by: zlei Differential Revision: https://reviews.freebsd.org/D52501 --- sbin/ifconfig/ifconfig.8 | 42 +++++++++++++++++++++--------------------- sbin/ifconfig/ifconfig.c | 22 ++++++++-------------- sbin/ifconfig/ifconfig.h | 1 - 3 files changed, 29 insertions(+), 36 deletions(-) diff --git a/sbin/ifconfig/ifconfig.8 b/sbin/ifconfig/ifconfig.8 index b580191383b3..c4184ba61ee4 100644 --- a/sbin/ifconfig/ifconfig.8 +++ b/sbin/ifconfig/ifconfig.8 @@ -28,7 +28,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd August 10, 2025 +.Dd September 12, 2025 .Dt IFCONFIG 8 .Os .Sh NAME @@ -36,7 +36,7 @@ .Nd configure network interface parameters .Sh SYNOPSIS .Nm -.Op Fl j Ar jail +.Op Fl j Ar jid .Op Fl DkLmn .Op Fl f Ar type Ns Cm \&: Ns Ar format .Ar interface @@ -50,11 +50,11 @@ .Oc .Op Ar parameters .Nm -.Op Fl j Ar jail +.Op Fl j Ar jid .Ar interface .Cm destroy .Nm -.Op Fl j Ar jail +.Op Fl j Ar jid .Fl a .Op Fl dDkLmuv .Op Fl f Ar type Ns Cm \&: Ns Ar format @@ -64,16 +64,16 @@ .Nm .Fl C .Nm -.Op Fl j Ar jail +.Op Fl j Ar jid .Fl g Ar groupname .Nm -.Op Fl j Ar jail +.Op Fl j Ar jid .Fl l .Op Fl du .Op Fl g Ar groupname .Op Ar address_family .Nm -.Op Fl j Ar jail +.Op Fl j Ar jid .Op Fl dkLmuv .Op Fl f Ar type Ns Cm \&: Ns Ar format .Sh DESCRIPTION @@ -257,22 +257,22 @@ Setting to .Cm all selects all interfaces. -.It Fl j Ar jail -Perform the actions inside the -.Ar jail . +.It Fl j Ar jid +Perform the actions inside the jail specified by +.Ar jid , +which may be either a jail name or a numeric jail ID. .Pp The -.Cm ifconfig -will first attach to the -.Ar jail -(by jail id or jail name) before performing the effects. -.Pp -This allow network interfaces of -.Ar jail -to be configured even if the -.Cm ifconfig -binary is not available in -.Ar jail . +.Nm +utility will attach to the specified jail immediately upon +encountering the option on the command line. +The option may be specified multiple times to attach to a nested jail +(jail within a jail). +.Pp +This makes it possible to configure network interfaces within a vnet +jail even if the +.Nm +binary is not available inside the jail. .It Fl k Print keying information for the .Ar interface , diff --git a/sbin/ifconfig/ifconfig.c b/sbin/ifconfig/ifconfig.c index 3f998b7f2b52..c323a26ec1a8 100644 --- a/sbin/ifconfig/ifconfig.c +++ b/sbin/ifconfig/ifconfig.c @@ -463,6 +463,9 @@ args_parse(struct ifconfig_args *args, int argc, char *argv[]) { char options[1024]; struct option *p; +#ifdef JAIL + int jid; +#endif int c; /* Parse leading line options */ @@ -494,7 +497,11 @@ args_parse(struct ifconfig_args *args, int argc, char *argv[]) #ifdef JAIL if (optarg == NULL) usage(); - args->jail_name = optarg; + jid = jail_getid(optarg); + if (jid == -1) + Perror("jail not found"); + if (jail_attach(jid) != 0) + Perror("cannot attach to jail"); #else Perror("not built with jail support"); #endif @@ -611,9 +618,6 @@ main(int ac, char *av[]) { char *envformat; int flags; -#ifdef JAIL - int jid; -#endif struct ifconfig_args _args = {}; struct ifconfig_args *args = &_args; @@ -638,16 +642,6 @@ main(int ac, char *av[]) args_parse(args, ac, av); -#ifdef JAIL - if (args->jail_name) { - jid = jail_getid(args->jail_name); - if (jid == -1) - Perror("jail not found"); - if (jail_attach(jid) != 0) - Perror("cannot attach to jail"); - } -#endif - if (!args->all && !args->namesonly) { /* not listing, need an argument */ args->ifname = args_pop(args); diff --git a/sbin/ifconfig/ifconfig.h b/sbin/ifconfig/ifconfig.h index 468c9b4e80da..672020443b8c 100644 --- a/sbin/ifconfig/ifconfig.h +++ b/sbin/ifconfig/ifconfig.h @@ -249,7 +249,6 @@ struct ifconfig_args { const char *matchgroup; /* Group name to match */ const char *nogroup; /* Group name to exclude */ const struct afswtch *afp; /* AF we're operating on */ - const char *jail_name; /* Jail name or jail id specified */ }; struct option { From nobody Mon Sep 15 18:34:54 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cQYbz0cwRz67m1l; Mon, 15 Sep 2025 18:34:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cQYby6hWsz45Wy; Mon, 15 Sep 2025 18:34:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1757961294; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=haVfUuLh1PMf/00LO169qK3ASa8Ejz+8mRBljFJMhsc=; b=H2mZhERZi9sJYe2BcPEPZDCv32+JHtbNl7XjPnAq976oQkezr/8Gt053ETY2zqMOdT5+n/ FJmyLefDLBHWQ4wzptqP2xWvqMAAHUTyfHdVE/7sOESbojosgXneYUHB7NFU8SleDmtk5o cvV9e7NtczQQ+Q78pMEeQjJRcNeZnDFtobMX49omrR8fOP1o+IOsAWoC0ni9ls3UGRkJlo Qg+JRtwg3QRgBnBqDvUbRfZlTRVj/kCdBd7pNrKScPygTkM8GsUvUjsneRkJ4YzjWXWJ+t owGLnxUT8wSPKZ3EX4xKM0OnT54BJUUSNM7v9VbpsD1ClQWAZ2kgV8tqlSdesw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1757961294; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=haVfUuLh1PMf/00LO169qK3ASa8Ejz+8mRBljFJMhsc=; b=abz3kpZa/KVWSZpJCmbOdmTEOuNCE+vfcFcys6i7z5y8FS0ddz99bbzap1n7wXgNaXSN/k +vbQznSpLkpLEBX29/Dr5BjIf37pBYyQTSKF2d01lIA7J3ec/bNAJDhUYZFC8OoLB8ym6u kuOsSCAhVq8CQoJxnB4DTNR+Hf/p8Zise9PvnrOeulrHOtxjPQ2NzWDD+CQ4o/2H8XtFjW 4pviRTrD0rFD+x8G5A02OGS5gV7Z+HShq4/ZOeA+LJRdW2ySd/vECIQhfwdPDiop8tQZwa D7XhfjPcDBkjwwZVcrgO3qZO4YSG35qOjEU1OsPQ1e2Hxno2PG4NfNxYVJq0ag== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1757961294; a=rsa-sha256; cv=none; b=vQPhZDeNu9359WI5UQHEj6M4JFQJtGNmYR/rL9uO1PjD2Wne0ET1i3ILZuhPgQIrybpdmX OWxImcOUaqSB92qDTLY31aZcMBw0tI3M5NHopXFg89J8WSt6sZLTdGwg9VGXr2XUitCM44 8BTyEZuUVvYqJPSEbry8fAVGvF2MU2zSvigKJfEifxAzKIpa6D/5PuMEzseoGdnxEMNiT6 mjXkBftWg184AiUtPyXnqEHfhwpZq39vk1/CiS2RmPBITGTa1NlCsqMl3TupdWfWbzz5s9 Uyc/MQDu3N1MwEOt1f9M1tYE1mwie3IVlXPIvT0bweo/40z8n1PvIkeNdN1XDg== 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 4cQYby6H0Zz15wY; Mon, 15 Sep 2025 18:34: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 58FIYsPW079689; Mon, 15 Sep 2025 18:34:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58FIYswp079685; Mon, 15 Sep 2025 18:34:54 GMT (envelope-from git) Date: Mon, 15 Sep 2025 18:34:54 GMT Message-Id: <202509151834.58FIYswp079685@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Li-Wen Hsu Subject: git: a75c3c2c633d - main - udbc(4): connect to build List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: lwhsu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a75c3c2c633dfa29b628f692fc7274cab1920640 Auto-Submitted: auto-generated The branch main has been updated by lwhsu: URL: https://cgit.FreeBSD.org/src/commit/?id=a75c3c2c633dfa29b628f692fc7274cab1920640 commit a75c3c2c633dfa29b628f692fc7274cab1920640 Author: Li-Wen Hsu AuthorDate: 2025-09-15 18:34:43 +0000 Commit: Li-Wen Hsu CommitDate: 2025-09-15 18:34:43 +0000 udbc(4): connect to build Reviewed by: thj MFC with: d566b6a70bcbc329e8c690464043401fa8bdd49f Sponsored by: The FreeBSD Foundation --- share/man/man4/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile index 1d708cfda019..c454a696f112 100644 --- a/share/man/man4/Makefile +++ b/share/man/man4/Makefile @@ -1065,6 +1065,7 @@ MAN+= \ ucom.4 \ ucycom.4 \ udav.4 \ + udbc.4 \ udbp.4 \ udl.4 \ uep.4 \ From nobody Mon Sep 15 18:35:27 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cQYcb6Nd1z67mZc; Mon, 15 Sep 2025 18:35:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cQYcb5wNNz45kc; Mon, 15 Sep 2025 18:35:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1757961327; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TDTIx5pj1zawg+QdfXrNhX2hf3qo3yv4Ae74Hm+SFV8=; b=xd6YuNGBoBG/sG4kLB3IoRybKDCfDpES1ae8z5df4fhJvdTz/ONq2LGGbN9u0ob1uy58vZ Ka3NGRhURHOT3RdeyuFkGACX5x3NkyKYHXPn18/+fAOjOxHtl0I9tDv4eZjHveuPbF000v eqX5PMgp9x42442DF5GQ2tEarH4OMCo+IB6mnO12yhvF+0QeCWqwwVmb+9Z9BcEM7+bAIR PRaxetRcx5x568HvcW4AlS0UDhHUA/MmY/I8bHRMe0lu0Ln2KVQ9/y51JmtnhHcnLLbo+C SlVz8DJJuY/fRKdjQ5WrGBlgbmM8gSBwJa8d5botB1xDtq44gMAUyLB/5fH5tQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1757961327; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TDTIx5pj1zawg+QdfXrNhX2hf3qo3yv4Ae74Hm+SFV8=; b=FkjJDw+c0HYm8JcB2Kp0SvuRudtGQ7ZyDIFpwn51OWiK1vi/51oh8Y+19mXUfc2fZQEjOl PzD1L8q+HUG9lewXw99PaDgp1YRrJpJc8HjINXs6CzRlNyYILfIM82JvV5RiNdzYAkMGya b0fzuPXtGsXsD5/LjS93Bfrm2K9P+tYD08KNpXAv8faWOAS1w+ovNS4z9rVY84LHtoCDI2 /sdTrSGwXjVFlBIvcx7FRaWJtPMSPDNfNxZDtuxqalkfcSX87Vgs8FBQw3hVhsRmCbgdzd CuWMJ02EHzKLd4dfx7Mk0NgQV8t0jrOuqHVjmnczEU7dw8s7oqxZ3/X+FSULag== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1757961327; a=rsa-sha256; cv=none; b=JAD/c2zTNWl5Lk9tgSiGAJ4483E6gBMeFlACVsBFp9L19/pwXIUSRZ6TO+ghwMjhd6auqW qa+US/ijrh+nZ06KWwgdiWzRTwLehOTxOzNZc2fJJMXi1Xx75pbdJxS/KsF2VKd8kchL7c AjoK3zpiBm+I+jwR5YXm7CPwVuE5j742FhoMrhXK9br6ZtaV0iOCp7piJgx12h1IhRHbYs 4PwKspHnz47fyvIxc/gLo4jys7RMz9YFDgdivsTr2jQPKDkgLZtM5FyA+WY9LSz+97TAZu aI0r9xGDZc+hd5Gr+1XWrQKWwkdkrcPI6SeNFdna1AahLMFyZm1sKKAqJOnO8g== 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 4cQYcb5Vf9z15dT; Mon, 15 Sep 2025 18:35:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58FIZR6Y079999; Mon, 15 Sep 2025 18:35:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58FIZRoW079996; Mon, 15 Sep 2025 18:35:27 GMT (envelope-from git) Date: Mon, 15 Sep 2025 18:35:27 GMT Message-Id: <202509151835.58FIZRoW079996@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: 6d83ae143b1f - main - share/man/man[49]: Set PACKAGE=kernel-man List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6d83ae143b1f598b5f8868508f6e8a7d3440f568 Auto-Submitted: auto-generated The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=6d83ae143b1f598b5f8868508f6e8a7d3440f568 commit 6d83ae143b1f598b5f8868508f6e8a7d3440f568 Author: Lexi Winter AuthorDate: 2025-09-15 18:22:09 +0000 Commit: Lexi Winter CommitDate: 2025-09-15 18:35:18 +0000 share/man/man[49]: Set PACKAGE=kernel-man When MANSPLITPKG is disabled (which is now the default), the kernel manpages in sections 4 and 9 are installed in the -kernel package instead of the -kernel-man package, because bsd.man.mk doesn't add the -man suffix. Since we already have handling for kernel-man in generate-ucl.lua, set PACKAGE=kernel-man to make sure they're always in the right package. To avoid creating -kernel-man-man when WITH_MANSPLITPKG is enabled, add some logic to bsd.man.mk (suggested by kevans) to avoid adding the -man suffix if the package already has a -man suffix, and while here, ensure ${__group}PACKAGE is always defined. MFC after: 3 seconds Reviewed by: des, bapt Differential Revision: https://reviews.freebsd.org/D52525 --- share/man/man4/Makefile | 2 +- share/man/man9/Makefile | 2 +- share/mk/bsd.man.mk | 7 ++++--- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile index c454a696f112..f5d7a0e081fc 100644 --- a/share/man/man4/Makefile +++ b/share/man/man4/Makefile @@ -1,7 +1,7 @@ .include MANGROUPS= MAN -MANPACKAGE= kernel +MANPACKAGE= kernel-man # If you add a new file here, please consider adding an entry to the # hardware notes template (website/archetypes/release/hardware.adoc in diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile index 5bcde3030ebc..30f41073bcbf 100644 --- a/share/man/man9/Makefile +++ b/share/man/man9/Makefile @@ -1,6 +1,6 @@ .include -PACKAGE= kernel +PACKAGE= kernel-man MAN= accept_filter.9 \ accf_data.9 \ diff --git a/share/mk/bsd.man.mk b/share/mk/bsd.man.mk index a2c34eff9e3e..0a3594e05d94 100644 --- a/share/mk/bsd.man.mk +++ b/share/mk/bsd.man.mk @@ -105,15 +105,16 @@ manlinksinstall: manlinksinstall-${__group} ${__group}OWN?= ${MANOWN} ${__group}GRP?= ${MANGRP} ${__group}MODE?= ${MANMODE} +${__group}PACKAGE?= ${PACKAGE:Uutilities} # Tag processing is only done for NO_ROOT installs. .if defined(NO_ROOT) .if !defined(${__group}TAGS) || ! ${${__group}TAGS:Mpackage=*} -.if ${MK_MANSPLITPKG} == "no" -${__group}TAGS+= package=${${__group}PACKAGE:U${PACKAGE:Uutilities}} +.if ${MK_MANSPLITPKG} == "no" || ${${__group}PACKAGE:M*-man} +${__group}TAGS+= package=${${__group}PACKAGE} .else -${__group}TAGS+= package=${${__group}PACKAGE:U${PACKAGE:Uutilities}}-man +${__group}TAGS+= package=${${__group}PACKAGE}-man .endif .endif From nobody Mon Sep 15 19:26:02 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cQZl245Htz67vkk; Mon, 15 Sep 2025 19:26:06 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cQZl23VYkz4Lt9; Mon, 15 Sep 2025 19:26:06 +0000 (UTC) (envelope-from bz@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1757964366; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=yLCpkVcr2NRCTIkbzm1omgfwEG2vZoQ6wOK3X6SCdRU=; b=rqPIv258acT23qfukEPKB9b+LnPp7JOt55N4Xw3vT1fXDCu+YjdfeSuO4tHEmos0sFdAPt gc+m4aqMdPJfVLjnrVx0LgEU0yIl/J/heY0ycMe/aBiVhtW+q/KZWltqVlB+3EWdpQ1BVj DeUraVT4/0mcYPmXM142UBmCcLgf8f0gUNwIEtaRRZwZvbZ9C2PBl9RQ+LZ9Dce297ddS1 u04HjdcjCgBYvkazXgRojjlpsj15gnx6rWQ9Oxgk6iR4lVAYHtNAYFJ24r0vCtQAVURwXG BwAIb9HzxCdFo+Y9bnUg1a+sBp4GGj+yaeu2ga8zpmm1jsKwMexLkffbAgqWNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1757964366; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=yLCpkVcr2NRCTIkbzm1omgfwEG2vZoQ6wOK3X6SCdRU=; b=krFsDRNvxMp2qKwTOadDiHnCvy6fhwG16cPs31Y8kvy6UdErLDVn9kMimAMcmjMvv5dTZZ yxCGiA9ApCswjGIjhFw/MNT4dvqKLWerUQTedIuPlLKdtdPgKUxrp4DHLQXr3Hft4NMbBJ 9t+gK35fB7tsTDbKul7Joqree4zyhJnbbNKnktbLS8qTr77zdJ5xSuaAZTd9CaAw9xwOUA TWcK5lx7aHYa8fK5XiThCti0vRWuxMHnkOZ7G/s6XLp3VdHG0bI3Zo0kp55S09e5RqVF3H 4gP0S77Byq+f/YJj62czFtDyf/Ws33BE6FfdvP+tNW7zjuMetOQ5fi8jsI4x5Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1757964366; a=rsa-sha256; cv=none; b=xAOVaMOgWNJVMci6adr2UbFKcrqvTGkKO1eJ6N1CtUzEYToIRgUbsEuIuyHmJLZVVjhjnR iny72ijL53WsDxy9PdxI3LiNhzM+cu+RhqH8hppLg9uhipVtkqjMeAOEiKgKm6T08A4xCF D4u9tH11PXE31tj/MBrszCoIZFNQp28n50VR/be/TCP7Ch/8iRibYDZIQs3xQxMGXvbnl6 6TVbOLW3Hg1RxmT4t812y4fX2SYhxAulXIY+Q9DVyonzTl1HvzMmcwNexJ9Gcao28mlxpg NiHEOW+94xx6DUesAYueeWAhvQw8xCkE/rQy/hcKBOas7RgygY8fFkq+4Wf2Ug== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from mx-01.divo.sbone.de (mx-01.divo.sbone.de [IPv6:2003:a:140a:2200:6:594:fffe:19]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature ECDSA (prime256v1) client-digest SHA256) (Client CN "mx-01.divo.sbone.de", Issuer "E6" (verified OK)) (Authenticated sender: bz/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4cQZl220YSzc2; Mon, 15 Sep 2025 19:26:06 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:1025]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by mx-01.divo.sbone.de (Postfix) with ESMTPS id ED1ABA64805; Mon, 15 Sep 2025 19:25:55 +0000 (UTC) Received: from content-filter.t4-02.sbone.de (content-filter.t4-02.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:2742]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id 707552D029E6; Mon, 15 Sep 2025 19:26:04 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:4902:0:7404:2:1025]) by content-filter.t4-02.sbone.de (content-filter.t4-02.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:2742]) (amavisd-new, port 10024) with ESMTP id fTgPfo-Os28w; Mon, 15 Sep 2025 19:26:03 +0000 (UTC) Received: from strong-iwl0.sbone.de (strong-iwl0.sbone.de [IPv6:fde9:577b:c1a9:4902:a66b:b6ff:fe40:39a9]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id D55462D029D8; Mon, 15 Sep 2025 19:26:02 +0000 (UTC) Date: Mon, 15 Sep 2025 19:26:02 +0000 (UTC) From: "Bjoern A. Zeeb" To: Warner Losh , =?UTF-8?Q?Jean-S=C3=A9bastien_P=C3=A9dron?= cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 5e0a4859f28a - main - iwlwifi: Don't compile for gcc before 14 In-Reply-To: <202509150304.58F34BWJ035102@gitrepo.freebsd.org> Message-ID: References: <202509150304.58F34BWJ035102@gitrepo.freebsd.org> X-OpenPGP-Key-Id: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset=US-ASCII On Mon, 15 Sep 2025, Warner Losh wrote: > The branch main has been updated by imp: > > URL: https://cgit.FreeBSD.org/src/commit/?id=5e0a4859f28ad4869f7a73faf42debc355a370bf > > commit 5e0a4859f28ad4869f7a73faf42debc355a370bf > Author: Warner Losh > AuthorDate: 2025-09-14 18:03:16 +0000 > Commit: Warner Losh > CommitDate: 2025-09-15 03:03:45 +0000 > > iwlwifi: Don't compile for gcc before 14 > > gcc 13 and earlier don't have __builtin_bitcountg. The linux wifi kpi > uses this unconditionally. While in this one use, it might not be > needed, I opted to not compile iwlwifi when building gcc12 or 13 rather > than risk breaking it for everbody else. > > With this change gcc12 builds the kernel. Maybe this will stop jenkins > email for every commit I make. > > Sponsored by: Netflix > --- > sys/modules/Makefile | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/sys/modules/Makefile b/sys/modules/Makefile > index 5315d518afd8..f9fdbca78869 100644 > --- a/sys/modules/Makefile > +++ b/sys/modules/Makefile > @@ -576,7 +576,10 @@ _mlx5ib= mlx5ib > ${MACHINE_CPUARCH} == "i386" > _ena= ena > _gve= gve > +# gcc13 and earlier lack __builtin_bitcountg used by linux emulation (a) I beleive there is no __builtin_bitcountg but you mean __builtin_popcountg both here and in the commit message. (b) That was introduced in 7cbc4d875971860d941cc15d7f42e6cfeffbfe66 for DRM (c) There is no direct use in any LinuxKPI based wireless driver: % grep -r __builtin_popcountg sys/contrib/dev % (4) iwlwifi only uses HWEIGHT32, which was changed by the aforementioned commit in LinuxKPI. (5) Please do it right and in the place where it is actually defined to be used, in LinuxKPI, and not here as it can be easily fixed there with an #ifdef or otherwise as there were alternatives on the review if I remember correctly. I am Cc:ing dumbbell as well as he needed the change for DRM. PS: we also need to fix this in sys/sys at some point and save us some trouble. > +.if !(${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} < 140000) > _iwlwifi= iwlwifi > +.endif > _rtw88= rtw88 > _rtw89= rtw89 > _vmware= vmware > -- Bjoern A. Zeeb r15:7 From nobody Mon Sep 15 21:17:58 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cQdDS5Mb2z684Rr for ; Mon, 15 Sep 2025 21:18:16 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-pl1-x636.google.com (mail-pl1-x636.google.com [IPv6:2607:f8b0:4864:20::636]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cQdDS3G4tz3L3f for ; Mon, 15 Sep 2025 21:18:16 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-pl1-x636.google.com with SMTP id d9443c01a7336-25669596955so48442715ad.0 for ; Mon, 15 Sep 2025 14:18:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1757971090; x=1758575890; darn=freebsd.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=4RG3e6qX6+ru5ufRMZdFJFc3A8SB9vobUnyGRuygRLI=; b=qi/6ljuf2noFE24USGIvLSXeC5TUCriPUiw6p1GvONN8NbjsbkW8yZ2nAvitsv1vIy wUkTYc6YSMCdAYY3o8qmP+MVgN9tICo8Ojc8Roa8lC9xCC3FNzLwZS9vbYt+vbP0dDqX YmmMavSouaUA8fxuG+UfNEp7zi9MUK0Hl74omyMZiU2KHL4GuIa1JJ/x9Pf37+uoyvtj JXkdC8pvwsr5PUpGJJmsWsVQVnfZ2F7oOOoj2bnBg8fQ65z6oLqAPem3ylbQ6j8KQbnT H6FbRr+JEgXxRQEllZEAdhqKAQEoaaW2H8gOEsBwCFPeq2TXHUust2RGLhbXwHX8il/S z0xQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1757971090; x=1758575890; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=4RG3e6qX6+ru5ufRMZdFJFc3A8SB9vobUnyGRuygRLI=; b=nKuNC8XQ/JBpM2jqP1rF9edGHwq0nkn+e8Wfk5iN9DHW96EXHPs3bAr7AcPLhIxMic xLlIKm1n0vcWie/oufRpoBoRbROwHb3GkdFpbbs/vqGxqAuPbk13Q+6MilDgBcX3iVBN qJQqzb3hIrIdowGG58Bj0gY5xEs3K+2ZSl3Nj/PqKt/G1ZJGtBFNWWFypw/ssofIVALz 6DogNg0yUUO55uNnKo96cdwrq06tzMkL3WWe4hDHVreoBehOu6pWAEYPrMW/NM++hp/D FleHAONMI0frOiw4wQTnIa+9EvF0I5gfhiM8ITiLcd1aMqko4XSjGixeIzNESV1QpNxf SPHA== X-Forwarded-Encrypted: i=1; AJvYcCVDgM48d8WU7tnv0R2T7aw/COkU1d3O5dCsVWontx3lJVMFzeaaIksSUwpDj4lq3FN3NYoYeLj+W4SAADg1ljGTnXze9Q==@freebsd.org X-Gm-Message-State: AOJu0YzV6pVjWeet/HwELkA/RIWzCOuHtRp3fc609wez+JMN1BWSEqzA IXuq5MaVFSUQvcDFqFVdgGgC6Y9oyqiAA9U8Jv3GFI3jl1MQdLRlSpAHOFeFBYqdqP73wrN+Gki rDG6nGQakOIzYhF54Cf8jj2jOjdrZTGHvtZitmxNJsg== X-Gm-Gg: ASbGncs7ELcOOX6qGsQor/lJosl86Ar5/vXuArSm6vNsbEYP1B+STnMUMjwDRPv6gBu G+JwDCOuN+p7/CqlXeSDwdUQTflkCt+FfIKB10+OQPahWFvYKndk/3zMLhDYwk2Ysg8hLIEKBcP WKCm/2T7Wq2VcIeI7eo0zwxDunszFk863u+3//HH8TbZr5lXsIS8oS8emuLx4GnmQVBLEybg29Y /gR32/kSs5du3Kn0sfm26izXUDEDWJ/6ohFnVmA2IbsGuwQRm6OEy1xUw2GcYxJISQ95tOPTXx3 4Yy7 X-Google-Smtp-Source: AGHT+IEVqSQmFROgkN+Z+iKrolE9z874vUzYWiKirlYe8gp1cnr2Er8RpI7tEgnYt7hS99jX0XWaysR/db6F8GUaqfM= X-Received: by 2002:a17:903:24c:b0:250:bd52:4cdb with SMTP id d9443c01a7336-25d27624318mr141391255ad.32.1757971089883; Mon, 15 Sep 2025 14:18:09 -0700 (PDT) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 References: <202509150304.58F34BWJ035102@gitrepo.freebsd.org> In-Reply-To: From: Warner Losh Date: Mon, 15 Sep 2025 15:17:58 -0600 X-Gm-Features: Ac12FXwInvHoJAxFJZuHS318Rs6CgAVefGNHJhJA6xVfuJP5O4nGo_za49LzGCA Message-ID: Subject: Re: git: 5e0a4859f28a - main - iwlwifi: Don't compile for gcc before 14 To: "Bjoern A. Zeeb" Cc: Warner Losh , =?UTF-8?B?SmVhbi1Tw6liYXN0aWVuIFDDqWRyb24=?= , src-committers , "" , "" Content-Type: multipart/alternative; boundary="000000000000569709063edd8a31" X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4cQdDS3G4tz3L3f --000000000000569709063edd8a31 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Sep 15, 2025, 1:26=E2=80=AFPM Bjoern A. Zeeb wrote= : > On Mon, 15 Sep 2025, Warner Losh wrote: > > > The branch main has been updated by imp: > > > > URL: > https://cgit.FreeBSD.org/src/commit/?id=3D5e0a4859f28ad4869f7a73faf42debc= 355a370bf > > > > commit 5e0a4859f28ad4869f7a73faf42debc355a370bf > > Author: Warner Losh > > AuthorDate: 2025-09-14 18:03:16 +0000 > > Commit: Warner Losh > > CommitDate: 2025-09-15 03:03:45 +0000 > > > > iwlwifi: Don't compile for gcc before 14 > > > > gcc 13 and earlier don't have __builtin_bitcountg. The linux wifi kp= i > > uses this unconditionally. While in this one use, it might not be > > needed, I opted to not compile iwlwifi when building gcc12 or 13 > rather > > than risk breaking it for everbody else. > > > > With this change gcc12 builds the kernel. Maybe this will stop jenki= ns > > email for every commit I make. > > > > Sponsored by: Netflix > > --- > > sys/modules/Makefile | 3 +++ > > 1 file changed, 3 insertions(+) > > > > diff --git a/sys/modules/Makefile b/sys/modules/Makefile > > index 5315d518afd8..f9fdbca78869 100644 > > --- a/sys/modules/Makefile > > +++ b/sys/modules/Makefile > > @@ -576,7 +576,10 @@ _mlx5ib=3D mlx5ib > > ${MACHINE_CPUARCH} =3D=3D "i386" > > _ena=3D ena > > _gve=3D gve > > +# gcc13 and earlier lack __builtin_bitcountg used by linux emulation > > (a) I beleive there is no __builtin_bitcountg but you mean > __builtin_popcountg > both here and in the commit message. > Yes. (b) That was introduced in 7cbc4d875971860d941cc15d7f42e6cfeffbfe66 for DRM > > (c) There is no direct use in any LinuxKPI based wireless driver: > % grep -r __builtin_popcountg sys/contrib/dev > % > > (4) iwlwifi only uses HWEIGHT32, which was changed by the aforementioned > commit > in LinuxKPI. > Yes. I noticed all that. Didn't see a trivial way to fix it right. (5) Please do it right and in the place where it is actually defined to be > used, > in LinuxKPI, and not here as it can be easily fixed there with an > #ifdef or > otherwise as there were alternatives on the review if I remember > correctly. > Knock yourselves out. I was tired of the CI jobs whining and this was the easiest way to make that stop. I've got too many things on my plate to refine this more. If you want to support older gcc for this driver, that's up to you. The ci jobs have been failing for weeks if not longer I am Cc:ing dumbbell as well as he needed the change for DRM. > > PS: we also need to fix this in sys/sys at some point and save us some > trouble. > What's to fix? Creating the Generic wrapper around builtin_popcount? Warner > > +.if !(${COMPILER_TYPE} =3D=3D "gcc" && ${COMPILER_VERSION} < 140000) > > _iwlwifi=3D iwlwifi > > +.endif > > _rtw88=3D rtw88 > > _rtw89=3D rtw89 > > _vmware=3D vmware > > > > -- > Bjoern A. Zeeb r15:7 > --000000000000569709063edd8a31 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Mon, Sep 15, 2025, 1:26=E2=80= =AFPM Bjoern A. Zeeb <bz@freebsd.org> wrote:
On Mon, 15 Sep 2025, = Warner Losh wrote:

> The branch main has been updated by imp:
>
> URL:
https://cgit.FreeBSD.org/src/commit/?id=3D5e0a4859f28ad4869f7a73faf42deb= c355a370bf
>
> commit 5e0a4859f28ad4869f7a73faf42debc355a370bf
> Author:=C2=A0 =C2=A0 =C2=A0Warner Losh <imp@FreeBSD.org>
> AuthorDate: 2025-09-14 18:03:16 +0000
> Commit:=C2=A0 =C2=A0 =C2=A0Warner Losh <imp@FreeBSD.org>
> CommitDate: 2025-09-15 03:03:45 +0000
>
>=C2=A0 =C2=A0 iwlwifi: Don't compile for gcc before 14
>
>=C2=A0 =C2=A0 gcc 13 and earlier don't have __builtin_bitcountg. Th= e linux wifi kpi
>=C2=A0 =C2=A0 uses this unconditionally. While in this one use, it migh= t not be
>=C2=A0 =C2=A0 needed, I opted to not compile iwlwifi when building gcc1= 2 or 13 rather
>=C2=A0 =C2=A0 than risk breaking it for everbody else.
>
>=C2=A0 =C2=A0 With this change gcc12 builds the kernel. Maybe this will= stop jenkins
>=C2=A0 =C2=A0 email for every commit I make.
>
>=C2=A0 =C2=A0 Sponsored by:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Net= flix
> ---
> sys/modules/Makefile | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/sys/modules/Makefile b/sys/modules/Makefile
> index 5315d518afd8..f9fdbca78869 100644
> --- a/sys/modules/Makefile
> +++ b/sys/modules/Makefile
> @@ -576,7 +576,10 @@ _mlx5ib=3D mlx5ib
>=C2=A0 =C2=A0 =C2=A0${MACHINE_CPUARCH} =3D=3D "i386"
> _ena=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0ena
> _gve=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0gve
> +# gcc13 and earlier lack __builtin_bitcountg used by linux emulation<= br>
(a) I beleive there is no __builtin_bitcountg but you mean __builtin_popcou= ntg
both here and in the commit message.

Yes.

(b) That was introduced in 7cbc4d875971860d941cc15d7f42e6cfeffbfe66 for DRM=

(c) There is no direct use in any LinuxKPI based wireless driver:
% grep -r __builtin_popcountg sys/contrib/dev
%

(4) iwlwifi only uses HWEIGHT32, which was changed by the aforementioned co= mmit
=C2=A0 =C2=A0 =C2=A0in LinuxKPI.

Yes. I noticed all that. Didn't see a t= rivial way to fix it right.

(5) Please do it right and in the place where it is actually defined to be = used,
=C2=A0 =C2=A0 =C2=A0in LinuxKPI, and not here as it can be easily fixed the= re with an #ifdef or
=C2=A0 =C2=A0 =C2=A0otherwise as there were alternatives on the review if I= remember correctly.

Knock yourselves out. I was tired of the CI jobs whinin= g and this was the easiest way to make that stop. I've got too many thi= ngs on my plate to refine this more. If you want to support older gcc for t= his driver, that's up to you. The ci jobs have been failing for weeks i= f not longer

I am Cc:ing dumbbell as well as he needed the change for DRM.

PS: we also need to fix this in sys/sys at some point and save us some
trouble.

What's to fix? Creating the Generic wrapper around builtin_po= pcount?

Warner


> +.if !(${COMPILER_TYPE} =3D=3D "gcc" && ${COMPILER_V= ERSION} < 140000)
> _iwlwifi=3D=C2=A0 =C2=A0 =C2=A0iwlwifi
> +.endif
> _rtw88=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0rtw88<= br> > _rtw89=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0rtw89<= br> > _vmware=3D=C2=A0 =C2=A0 =C2=A0 vmware
>

--
Bjoern A. Zeeb=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0r15:7
--000000000000569709063edd8a31-- From nobody Mon Sep 15 21:32:12 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cQdXc4krcz685CG; Mon, 15 Sep 2025 21:32:16 +0000 (UTC) (envelope-from bz@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cQdXc4241z3LgV; Mon, 15 Sep 2025 21:32:16 +0000 (UTC) (envelope-from bz@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1757971936; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=bMKxtR1nO7tCnPJEUnIF2mIazjotx0l2HClE0YXFB0g=; b=Yduht1iJacHR9DICVzwJSgADvU6hZ05rLRNZiSdiwHkcXBixaY96NbAYYIUznKuFld17v2 efrIZAMa2B1nn+MdvUs7wVD1E1ToBAxwYMLO5jlMpaewthLxm8+1Gl1v4rcEQyy5cckDXA r6I9YGq5RhJ54F5HftJR7HCLldJUlzuTK5SH74Z/oW2knTQ8pGM974f0RvidGdjq8W5Mj8 YHizlrtFPiGGkC60hbWzZqgZUP1knfOky4e3OqEZtgnhiv6422HtQ1oq+gBl2XlXq8rxrr F9NnS70lEKgCP/mtfCZr36xuL36Ff7aJ+qZw+YzZf+PMATRjkdPnN0O63VrQBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1757971936; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=bMKxtR1nO7tCnPJEUnIF2mIazjotx0l2HClE0YXFB0g=; b=f/+8hPEk7AMO8c/dLvKpxE70dxRrMcY9agt6+aLb/zk3ZB/Pj2Ilz/H/waYgqnwlXz335o hPUIW+S7DRYbGap8IgG98onHpKpgJ/Vu2E6hZ/lYIArEGRO0YiNY3k8cIp2EqtQ0oo9oIA 98ftuLWfYrflWXddNo1vudXtnKLUxOMEwOF3bLkuNtJKkFJ8H7CGWe4A0lBThGRxEJLnTm PW1ixiu+kC1zgJ4wBsChvwiek4n6B8iO5sJqx74fl/14grpDVadhhMr7MFh0urDnqsk4xn p33ewMvZtc7rbgq6IrW7RJV1HZ9WcBlACdcJQZk5dvgdJFqXymeZZMxXgS+bHA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1757971936; a=rsa-sha256; cv=none; b=PZQRVRjb5bFLdSpeciz1vnUn2e1LgZQmTfdy0zJqMWrPRLqgyhwU7kPXVa0jFjHi/J/FD5 WupN7XMjfmHtMGH/FP8YsZJLo63zE02IQ1NpoCaUy9DIVBnnns1EJJnHz7vu3AEERivfc+ j+FoLVnRJ/Js1rUHW6sI4iyRivzN7ubvvTDK0yjcbEg7qiX1RXP0Plkos2ThvRXiO0pnPU WNvgshRwf6Kz4F/6CGcqg6iQerZDEPrarC74cukDlDzq0/dm1dXny+3aoXNdDS63TshwKk AbMlFOvd3dxSN/rhlxGnch7GeQiGQwVps0ADDvEapSadDBuNeVvATo95mS17DA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from mx-01.divo.sbone.de (mx-01.divo.sbone.de [IPv6:2003:a:140a:2200:6:594:fffe:19]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature ECDSA (prime256v1) client-digest SHA256) (Client CN "mx-01.divo.sbone.de", Issuer "E6" (verified OK)) (Authenticated sender: bz/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4cQdXc21yRz3Bs; Mon, 15 Sep 2025 21:32:16 +0000 (UTC) (envelope-from bz@freebsd.org) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:1025]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by mx-01.divo.sbone.de (Postfix) with ESMTPS id C9E31A64805; Mon, 15 Sep 2025 21:32:05 +0000 (UTC) Received: from content-filter.t4-02.sbone.de (content-filter.t4-02.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:2742]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id 4FA682D029E6; Mon, 15 Sep 2025 21:32:14 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:4902:0:7404:2:1025]) by content-filter.t4-02.sbone.de (content-filter.t4-02.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:2742]) (amavisd-new, port 10024) with ESMTP id 5Uwd4HrnlGBx; Mon, 15 Sep 2025 21:32:13 +0000 (UTC) Received: from strong-iwl0.sbone.de (strong-iwl0.sbone.de [IPv6:fde9:577b:c1a9:4902:a66b:b6ff:fe40:39a9]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 188A72D029D8; Mon, 15 Sep 2025 21:32:13 +0000 (UTC) Date: Mon, 15 Sep 2025 21:32:12 +0000 (UTC) From: "Bjoern A. Zeeb" To: Warner Losh cc: Warner Losh , =?UTF-8?Q?Jean-S=C3=A9bastien_P=C3=A9dron?= , src-committers , "" , "" Subject: Re: git: 5e0a4859f28a - main - iwlwifi: Don't compile for gcc before 14 In-Reply-To: Message-ID: References: <202509150304.58F34BWJ035102@gitrepo.freebsd.org> X-OpenPGP-Key-Id: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="1098556516-186450911-1757971933=:4619" This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --1098556516-186450911-1757971933=:4619 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8BIT On Mon, 15 Sep 2025, Warner Losh wrote: > On Mon, Sep 15, 2025, 1:26 PM Bjoern A. Zeeb wrote: > >> On Mon, 15 Sep 2025, Warner Losh wrote: >> >>> The branch main has been updated by imp: >>> >>> URL: >> https://cgit.FreeBSD.org/src/commit/?id=5e0a4859f28ad4869f7a73faf42debc355a370bf >>> >>> commit 5e0a4859f28ad4869f7a73faf42debc355a370bf >>> Author: Warner Losh >>> AuthorDate: 2025-09-14 18:03:16 +0000 >>> Commit: Warner Losh >>> CommitDate: 2025-09-15 03:03:45 +0000 >>> >>> iwlwifi: Don't compile for gcc before 14 >>> >>> gcc 13 and earlier don't have __builtin_bitcountg. The linux wifi kpi >>> uses this unconditionally. While in this one use, it might not be >>> needed, I opted to not compile iwlwifi when building gcc12 or 13 >> rather >>> than risk breaking it for everbody else. >>> >>> With this change gcc12 builds the kernel. Maybe this will stop jenkins >>> email for every commit I make. >>> >>> Sponsored by: Netflix >>> --- >>> sys/modules/Makefile | 3 +++ >>> 1 file changed, 3 insertions(+) >>> >>> diff --git a/sys/modules/Makefile b/sys/modules/Makefile >>> index 5315d518afd8..f9fdbca78869 100644 >>> --- a/sys/modules/Makefile >>> +++ b/sys/modules/Makefile >>> @@ -576,7 +576,10 @@ _mlx5ib= mlx5ib >>> ${MACHINE_CPUARCH} == "i386" >>> _ena= ena >>> _gve= gve >>> +# gcc13 and earlier lack __builtin_bitcountg used by linux emulation >> >> (a) I beleive there is no __builtin_bitcountg but you mean >> __builtin_popcountg >> both here and in the commit message. >> > > Yes. > > (b) That was introduced in 7cbc4d875971860d941cc15d7f42e6cfeffbfe66 for DRM >> >> (c) There is no direct use in any LinuxKPI based wireless driver: >> % grep -r __builtin_popcountg sys/contrib/dev >> % >> >> (4) iwlwifi only uses HWEIGHT32, which was changed by the aforementioned >> commit >> in LinuxKPI. >> > > Yes. I noticed all that. Didn't see a trivial way to fix it right. > > (5) Please do it right and in the place where it is actually defined to be >> used, >> in LinuxKPI, and not here as it can be easily fixed there with an >> #ifdef or >> otherwise as there were alternatives on the review if I remember >> correctly. >> > > Knock yourselves out. I was tired of the CI jobs whining and this was the > easiest way to make that stop. I've got too many things on my plate to > refine this more. If you want to support older gcc for this driver, that's > up to you. The ci jobs have been failing for weeks if not longer Okay, will do. But gcc12/13 had been whining for months on a lot of things constantly. I really don't know how a day to do it right would have made a difference. -- Bjoern A. Zeeb r15:7 --1098556516-186450911-1757971933=:4619-- From nobody Mon Sep 15 21:40:26 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cQdk26MDfz685lT; Mon, 15 Sep 2025 21:40: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 4cQdk25qlcz3NRR; Mon, 15 Sep 2025 21:40:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1757972426; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=06f3vAgAWyusL3V70NrEH2PNomgExo+7cQepHXoBmdQ=; b=hxOjHjDkBL5zkyTspRgWOiykSTJY17Dj/OeVP9BUciJ6Nlr8hBkrfXy4Nr2+Wm1lqWCVeS /I6g2+0ey439qIDxCGCrchxElCAGalfzzqI0iz/G3PEbLJcVbRUIi6r8vmXUa+PFZ+USGj RnFEnUOp4LzN5EvnQaIPw8PML2ehseEFAGZLtEIgkW4KWFutHPhrkOwXir1Z1dr6j7VKJx nVWqGYfC8iDPVtC/7Iy9uvmP2wPKHI0MooZhHDdxNN/UOPGVsdWhjulVyWW4h2GifUoNfL 7aGfvKupN/nGJlOpxjOpClsV0+qhFCEmS7zR3ZNTxIQmkkvqFKqPrw6ZdzHI6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1757972426; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=06f3vAgAWyusL3V70NrEH2PNomgExo+7cQepHXoBmdQ=; b=fkbiZYkyjleZn0lyIwWJ/BHS1OKG9A82JcmIVdGYGTxiyB6P9ejI1b18YOx5e+YyUSbaXJ uxSPySMDIhpS3MYWB4gnOOfkJr7K0sBSHA9eH5/SUNZH4qO0vNSIsLKt/GqqyZ/k9GnX0m jH7E0TG8tXi1h4t6BhLb6AZ37WTmeJUWQu2hJvdEPlC2KKnEmBDq8XWxHHWSETJXemS24w 1o0VxJbMLY4ooa08YhhGvjCFpcCxsJlnGWr1iGTuoPNW9+xgRTlPFyzrf+8SqwJKkcyO1y iSpxkFAFuSaaj8JHT8+R2LjAmAiziSw4oxJoulHLk+kZZ6UMKBJgmgPNii6a8Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1757972426; a=rsa-sha256; cv=none; b=hv5AnR+n4KNtMfkH6X6Wl+K2rYkMxPSnUQTd716ExdYxUqjGTsrvgcSM92ytLAzQTzxPwr 0nJ035BA98RRqTDheVd7WqNnud/U02+UfNBFQ6Wu0vbtfEt/RMuAu+3EP26i6OTEWHkNK8 Gq8QP3eQT6YzaPQ5pEJtkfwkbR8er7tUG53ji+w1+P7/JGLV3z5ss8EAeQq/K1PHWjYwMw z/NSVNf5Z0BC9YIAUU1Fmv7HfXVPL6XRZdcv23OjfGgEDsm4c296D/g5sc4OOWKoONIMO5 O1vtLi2kmhks1k0f6XHJb9q9D41PXhK3B+dvuaau7MdkrjK8F85NOUPp/Hf4FA== 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 4cQdk25K99z19bb; Mon, 15 Sep 2025 21:40: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 58FLeQth030084; Mon, 15 Sep 2025 21:40:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58FLeQQF030081; Mon, 15 Sep 2025 21:40:26 GMT (envelope-from git) Date: Mon, 15 Sep 2025 21:40:26 GMT Message-Id: <202509152140.58FLeQQF030081@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ahmad Khalifa Subject: git: 27699e31fa50 - main - boot/universe.sh: toggle LOADER_BIOS_TEXTONLY List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: vexeduxr X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 27699e31fa50e2bee6fdd0b5a0bfb92b4d35d7b7 Auto-Submitted: auto-generated The branch main has been updated by vexeduxr: URL: https://cgit.FreeBSD.org/src/commit/?id=27699e31fa50e2bee6fdd0b5a0bfb92b4d35d7b7 commit 27699e31fa50e2bee6fdd0b5a0bfb92b4d35d7b7 Author: Ahmad Khalifa AuthorDate: 2025-09-15 20:15:02 +0000 Commit: Ahmad Khalifa CommitDate: 2025-09-15 21:38:56 +0000 boot/universe.sh: toggle LOADER_BIOS_TEXTONLY Build without LOADER_BIOS_TEXTONLY since it is now the default. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D52559 --- tools/boot/universe.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/boot/universe.sh b/tools/boot/universe.sh index e97858ff2bcb..80a9cc0b90ff 100755 --- a/tools/boot/universe.sh +++ b/tools/boot/universe.sh @@ -95,11 +95,11 @@ for i in \ dobuild $ta _.boot.${ta}.no_zfs.log "MK_LOADER_ZFS=no" done -# Build w/ LOADER_BIOS_TEXTONLY +# Build w/o LOADER_BIOS_TEXTONLY for i in \ amd64/amd64 \ i386/i386 \ ; do ta=${i##*/} - dobuild $ta _.boot.${ta}.no_zfs.log "MK_LOADER_BIOS_TEXTONLY=yes" + dobuild $ta _.boot.${ta}.no_zfs.log "MK_LOADER_BIOS_TEXTONLY=no" done From nobody Mon Sep 15 21:44:08 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cQdpb234xz685rV for ; Mon, 15 Sep 2025 21:44:23 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-pj1-x1029.google.com (mail-pj1-x1029.google.com [IPv6:2607:f8b0:4864:20::1029]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cQdpb08sTz3P84 for ; Mon, 15 Sep 2025 21:44:23 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-pj1-x1029.google.com with SMTP id 98e67ed59e1d1-32dc6616f7dso3581379a91.1 for ; Mon, 15 Sep 2025 14:44:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1757972661; x=1758577461; darn=freebsd.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=ruKDfFtNRskvG2+OP7WSMtGiYD21uyK/2+J3o5Su2pg=; b=Gf1cJlEci+c1qbqw0zEn4YkWX8QwzUutDovBUWq8WTA6UYCDHlSJqtfYBvg9bahlYv Iexr8kgxM0u5N8mg3cjQ4Ckee3TM2VrrC4zIXAiI5s0NCY2RNFRdWHnWICTte2W5s6Ff zvanAF09Nk4PYYmdHkiU/nLC42RXoyje0Ps8xBOdUNOxN06MQYOR6sPHi9kvxhmdSHoi vtbmrgx7tK7Yn0Xw4SbZbUntcqE9TYpqBerCACILyY9zAVePC5oeAWnknCYuoHLyk38N lbDF83/F6GTSVJRmkvZTI03S6Gn+Eyz+fzWuDxNA/01RZkzbmW8bEeWH6LK2X6DUoA4j nReA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1757972661; x=1758577461; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=ruKDfFtNRskvG2+OP7WSMtGiYD21uyK/2+J3o5Su2pg=; b=sS8OYXDl0xzcgh79QW4FqIX3XDukFCb0OKoEYhr1Ubt3f5ZVB+nVJrDFsACHI0sdT7 oCRZdxScdjUQ1DmapuFZVeTndtqIPU7/VQA1Cxej10Lk+be+9Rk3L8NjN820MAqsF2Gm pAVF0qOywoPSNCXG9oKh8xjXIy/huSN21TC+H6dUUEOdmPujHbxe2q5hGq0xn2OcF7dP IiFX8V7lUOUYvsh02JFdzoNnvifKBDuQBL55SsnAa9l+5euHxXU/9aU/HaaxVG51E/77 a7atM4OmqtacQVSHzyW7xbjng8QjsfGov1GuY8nMgXw9S0JSUB4ogcgMIkDXP0Jeteyj SfVQ== X-Forwarded-Encrypted: i=1; AJvYcCUEmB+Rbp3d7o0cyyXMt/hIAJSyOEXKvHNAG+szeKDVBQdLh0anWOWw7YlEO1g3x1wNYo2fYwNXKol3UpkNcAk8oPKCBw==@freebsd.org X-Gm-Message-State: AOJu0YxozUnCbOUaChYYtZrySfOtUD6zdHC9QI9gGVVYfkNPRjaMYyVF ZCInOXSvSxA7E5kPtVki6OowHj3AfYCVseiS+/mpdUN5aFgyls8RmkJn0GT8yLbtB0hd3JrmxkZ iTASSAhVcljQRdKGy5hujlBDviME/LrXNtzlhyLm9gxvaMLixo38HLf4= X-Gm-Gg: ASbGncshNlWyb74Zoj2MqaogknmsCriGTyVdtWUMyZ8P+/Q61arVTfU81KIvdyjm7fq q5hNLi0bV+2M/ppnUyN/dpbfyyMxAguGKIrFYr/eWTft2cBcPZ1HRsawz1Z3K1yC88IIdGc9oaq 00g8o7Q9atowYWjAeorasS5pyLhoeuu2iD17Ht5O0nJh3Xk91eWktt1SWHPows/20ewm+pBsNEt 8+5IQjIIHvtBvC9bcEsmTb2uQfzJ/Zs8mCCG7z5BUcFF9TNag== X-Google-Smtp-Source: AGHT+IEC1Pl7WKurBGNvpSwBPTJv0jjb1b5CLlBwKtcoZuzdLESPS+XqGaWS7NXUAIQ4BY3MaJtoJ3NdYCkKwhBUthk= X-Received: by 2002:a17:90b:4cc9:b0:32e:59ef:f403 with SMTP id 98e67ed59e1d1-32e59f01354mr7409891a91.17.1757972660668; Mon, 15 Sep 2025 14:44:20 -0700 (PDT) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 References: <202509150304.58F34BWJ035102@gitrepo.freebsd.org> In-Reply-To: From: Warner Losh Date: Mon, 15 Sep 2025 15:44:08 -0600 X-Gm-Features: Ac12FXybeel4qYdHNfURW_7Wcqwos95JmqPCiZq0fQ_MurWuHmAUoy7iMF3ekkA Message-ID: Subject: Re: git: 5e0a4859f28a - main - iwlwifi: Don't compile for gcc before 14 To: "Bjoern A. Zeeb" Cc: Warner Losh , =?UTF-8?B?SmVhbi1Tw6liYXN0aWVuIFDDqWRyb24=?= , src-committers , "" , "" Content-Type: multipart/alternative; boundary="000000000000f6dd5e063edde708" X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4cQdpb08sTz3P84 --000000000000f6dd5e063edde708 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Sep 15, 2025 at 3:32=E2=80=AFPM Bjoern A. Zeeb wro= te: > On Mon, 15 Sep 2025, Warner Losh wrote: > > > On Mon, Sep 15, 2025, 1:26=E2=80=AFPM Bjoern A. Zeeb w= rote: > > > >> On Mon, 15 Sep 2025, Warner Losh wrote: > >> > >>> The branch main has been updated by imp: > >>> > >>> URL: > >> > https://cgit.FreeBSD.org/src/commit/?id=3D5e0a4859f28ad4869f7a73faf42debc= 355a370bf > >>> > >>> commit 5e0a4859f28ad4869f7a73faf42debc355a370bf > >>> Author: Warner Losh > >>> AuthorDate: 2025-09-14 18:03:16 +0000 > >>> Commit: Warner Losh > >>> CommitDate: 2025-09-15 03:03:45 +0000 > >>> > >>> iwlwifi: Don't compile for gcc before 14 > >>> > >>> gcc 13 and earlier don't have __builtin_bitcountg. The linux wifi > kpi > >>> uses this unconditionally. While in this one use, it might not be > >>> needed, I opted to not compile iwlwifi when building gcc12 or 13 > >> rather > >>> than risk breaking it for everbody else. > >>> > >>> With this change gcc12 builds the kernel. Maybe this will stop > jenkins > >>> email for every commit I make. > >>> > >>> Sponsored by: Netflix > >>> --- > >>> sys/modules/Makefile | 3 +++ > >>> 1 file changed, 3 insertions(+) > >>> > >>> diff --git a/sys/modules/Makefile b/sys/modules/Makefile > >>> index 5315d518afd8..f9fdbca78869 100644 > >>> --- a/sys/modules/Makefile > >>> +++ b/sys/modules/Makefile > >>> @@ -576,7 +576,10 @@ _mlx5ib=3D mlx5ib > >>> ${MACHINE_CPUARCH} =3D=3D "i386" > >>> _ena=3D ena > >>> _gve=3D gve > >>> +# gcc13 and earlier lack __builtin_bitcountg used by linux emulation > >> > >> (a) I beleive there is no __builtin_bitcountg but you mean > >> __builtin_popcountg > >> both here and in the commit message. > >> > > > > Yes. > > > > (b) That was introduced in 7cbc4d875971860d941cc15d7f42e6cfeffbfe66 for > DRM > >> > >> (c) There is no direct use in any LinuxKPI based wireless driver: > >> % grep -r __builtin_popcountg sys/contrib/dev > >> % > >> > >> (4) iwlwifi only uses HWEIGHT32, which was changed by the aforemention= ed > >> commit > >> in LinuxKPI. > >> > > > > Yes. I noticed all that. Didn't see a trivial way to fix it right. > > > > (5) Please do it right and in the place where it is actually defined to > be > >> used, > >> in LinuxKPI, and not here as it can be easily fixed there with an > >> #ifdef or > >> otherwise as there were alternatives on the review if I remember > >> correctly. > >> > > > > Knock yourselves out. I was tired of the CI jobs whining and this was t= he > > easiest way to make that stop. I've got too many things on my plate to > > refine this more. If you want to support older gcc for this driver, > that's > > up to you. The ci jobs have been failing for weeks if not longer > > Okay, will do. > > But gcc12/13 had been whining for months on a lot of things constantly. > I really don't know how a day to do it right would have made a difference= . > I thought this was right since I didn't see a good way to backport the macros to gcc12/13, but your point is well taken. But at the same time, I had a few minutes and this was the last thing in the way. Had there been a bunch more, I'd likely have gotten reviews for everything. Warner --000000000000f6dd5e063edde708 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Mon, Sep 15,= 2025 at 3:32=E2=80=AFPM Bjoern A. Zeeb <bz@freebsd.org> wrote:
On Mon, 15 Sep 2025, Warner Losh wrote:

> On Mon, Sep 15, 2025, 1:26=E2=80=AFPM Bjoern A. Zeeb <bz@freebsd.org> wrote:
>
>> On Mon, 15 Sep 2025, Warner Losh wrote:
>>
>>> The branch main has been updated by imp:
>>>
>>> URL:
>> https://c= git.FreeBSD.org/src/commit/?id=3D5e0a4859f28ad4869f7a73faf42debc355a370bf
>>>
>>> commit 5e0a4859f28ad4869f7a73faf42debc355a370bf
>>> Author:=C2=A0 =C2=A0 =C2=A0Warner Losh <imp@FreeBSD.org>=
>>> AuthorDate: 2025-09-14 18:03:16 +0000
>>> Commit:=C2=A0 =C2=A0 =C2=A0Warner Losh <imp@FreeBSD.org>=
>>> CommitDate: 2025-09-15 03:03:45 +0000
>>>
>>>=C2=A0 =C2=A0 iwlwifi: Don't compile for gcc before 14
>>>
>>>=C2=A0 =C2=A0 gcc 13 and earlier don't have __builtin_bitco= untg. The linux wifi kpi
>>>=C2=A0 =C2=A0 uses this unconditionally. While in this one use,= it might not be
>>>=C2=A0 =C2=A0 needed, I opted to not compile iwlwifi when build= ing gcc12 or 13
>> rather
>>>=C2=A0 =C2=A0 than risk breaking it for everbody else.
>>>
>>>=C2=A0 =C2=A0 With this change gcc12 builds the kernel. Maybe t= his will stop jenkins
>>>=C2=A0 =C2=A0 email for every commit I make.
>>>
>>>=C2=A0 =C2=A0 Sponsored by:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0Netflix
>>> ---
>>> sys/modules/Makefile | 3 +++
>>> 1 file changed, 3 insertions(+)
>>>
>>> diff --git a/sys/modules/Makefile b/sys/modules/Makefile
>>> index 5315d518afd8..f9fdbca78869 100644
>>> --- a/sys/modules/Makefile
>>> +++ b/sys/modules/Makefile
>>> @@ -576,7 +576,10 @@ _mlx5ib=3D mlx5ib
>>>=C2=A0 =C2=A0 =C2=A0${MACHINE_CPUARCH} =3D=3D "i386"<= br> >>> _ena=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0ena
>>> _gve=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0gve
>>> +# gcc13 and earlier lack __builtin_bitcountg used by linux em= ulation
>>
>> (a) I beleive there is no __builtin_bitcountg but you mean
>> __builtin_popcountg
>> both here and in the commit message.
>>
>
> Yes.
>
> (b) That was introduced in 7cbc4d875971860d941cc15d7f42e6cfeffbfe66 fo= r DRM
>>
>> (c) There is no direct use in any LinuxKPI based wireless driver:<= br> >> % grep -r __builtin_popcountg sys/contrib/dev
>> %
>>
>> (4) iwlwifi only uses HWEIGHT32, which was changed by the aforemen= tioned
>> commit
>>=C2=A0 =C2=A0 =C2=A0 in LinuxKPI.
>>
>
> Yes. I noticed all that. Didn't see a trivial way to fix it right.=
>
> (5) Please do it right and in the place where it is actually defined t= o be
>> used,
>>=C2=A0 =C2=A0 =C2=A0 in LinuxKPI, and not here as it can be easily = fixed there with an
>> #ifdef or
>>=C2=A0 =C2=A0 =C2=A0 otherwise as there were alternatives on the re= view if I remember
>> correctly.
>>
>
> Knock yourselves out. I was tired of the CI jobs whining and this was = the
> easiest way to make that stop. I've got too many things on my plat= e to
> refine this more. If you want to support older gcc for this driver, th= at's
> up to you. The ci jobs have been failing for weeks if not longer

Okay, will do.

But gcc12/13 had been whining for months on a lot of things constantly.
I really don't know how a day to do it right would have made a differen= ce.


--000000000000f6dd5e063edde708-- From nobody Mon Sep 15 21:44:48 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cQdq44TBHz6865G; Mon, 15 Sep 2025 21:44: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 4cQdq43clnz3PhQ; Mon, 15 Sep 2025 21:44:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1757972688; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rHY3VPB36PKzs6Pl9351UKgc7vgENOkU/h1inI1u9GQ=; b=aHBo3UaXLdD5Jf6ZeMsuKG2P+RkkMTQGDUWzLWyK8l4qpdmXGvzxkEJL2LDozo+lZ899KD +Ppmw8SXFzALUL18fd2JnQHUJ+mpk0t4dgcM4NWIINyX2pm8j6knCf/RKdTr31JpO4jMx6 3JgSiA9sxDAO1X5bJkOvADh69izBRPElBXovQg5TCKSvWxKP+EIAd2rxgSWK3F2VeE9M/y KFB7GLAScQH38MG9wIAAq2cZ321tqegZLMd9Pm9uyh8EGyrC7/WqUZQLugcRKi7GcA1nTh JdCiemo0Hb7IRsZpXVDceOBVM8ESBLcmRG1AEDg/j0IQahwVEkAcHwVSyh5tig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1757972688; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rHY3VPB36PKzs6Pl9351UKgc7vgENOkU/h1inI1u9GQ=; b=Sqv6Zqwofn1TFsfa+fOQTzFAORCxMJQXvuGFQTJRi3/QpIeSZlKXL4U0eEg7fP50/t6EPi UP8dvQC/iQEk62iREMusRA+kdxYxVy2aA6X3ML9pUJXxR3iNq7C9Wpl9dbwYZKw8i0ONq3 M7TH+oqVl4/2XA1FtdNt/+PTuMv5ZBhGVUWDPZNfvqZaUykDt0ABoRebZbGL2fpfhoZi9U O73Vm11M8qRAj/1dQgYXFts8BQixyYafh2xR8fU9yJPT8hQAXKiDT2yHVd92U+F5CKt7iG TQpVMVx0PyBuXqn2uWsfAW2fIS8u4xSIBvUWllvDpuLdV3vdHs1iRQkS6Ihvfw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1757972688; a=rsa-sha256; cv=none; b=t/kcKHwPtmZYaChRUKMhCegeWdJsBDEC3kLCAH1kDvUyKu2nA23hFmPKvscwCcu1eHbQrI qcSFqkFO6ksBZeVvnwFPXf033y/OP0luitf1aAfTA0JvuswHNh6zB3T/Z/dIRljMtukJqO jAM8KItetQIZHmc7egeblhGP0WkZV4qd6EX5HSEOAzwOXAy+BO/ga5hOBRNIHHoLXXbih7 g7dyJShCELaXpyZtB3bZIu62gnju/ELYXpji7ub2gVEtXgXN3K3sBC3ERYscvrerI5jdUa 9tLJWDGnYLbQ9XX/EDa/CC7pqt6brOOKE1j1Z1YXENa+Yy0RBRaKrY7TaQ7ufA== 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 4cQdq42h0Tz1Bkn; Mon, 15 Sep 2025 21:44: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 58FLim3B037532; Mon, 15 Sep 2025 21:44:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58FLimB4037529; Mon, 15 Sep 2025 21:44:48 GMT (envelope-from git) Date: Mon, 15 Sep 2025 21:44:48 GMT Message-Id: <202509152144.58FLimB4037529@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John-Mark Gurney Subject: git: e1bc42cb1551 - main - e1000: fix/complete merge of previous two commits List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jmg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e1bc42cb1551ca2a18ef60c38247fb5dc2509ea2 Auto-Submitted: auto-generated The branch main has been updated by jmg: URL: https://cgit.FreeBSD.org/src/commit/?id=e1bc42cb1551ca2a18ef60c38247fb5dc2509ea2 commit e1bc42cb1551ca2a18ef60c38247fb5dc2509ea2 Author: John-Mark Gurney AuthorDate: 2025-09-15 21:29:11 +0000 Commit: John-Mark Gurney CommitDate: 2025-09-15 21:43:54 +0000 e1000: fix/complete merge of previous two commits When fixing the conflicts caused by gallatin's commit and the reviewed patch, I missed this location because it didn't exist when gallatin did their change. Obtained from: Juniper Networks, Inc. --- sys/dev/e1000/if_em.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/dev/e1000/if_em.c b/sys/dev/e1000/if_em.c index 20df466b4e76..247cf9d7fed3 100644 --- a/sys/dev/e1000/if_em.c +++ b/sys/dev/e1000/if_em.c @@ -4815,7 +4815,8 @@ em_if_get_vf_counter(if_ctx_t ctx, ift_counter cnt) case IFCOUNTER_IERRORS: return sc->dropped_pkts; case IFCOUNTER_OERRORS: - return sc->watchdog_events; + return (if_get_counter_default(ifp, cnt) + + sc->watchdog_events); default: return (if_get_counter_default(ifp, cnt)); } From nobody Mon Sep 15 22:09:50 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cQfMy44NNz687pF; Mon, 15 Sep 2025 22:09: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 4cQfMy3Z1Wz3SsY; Mon, 15 Sep 2025 22:09:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1757974190; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xzbes/4mD8VASssDDkgL5X5KvDNP8k346Gu8C/EPbhs=; b=mKj2D8A/Fn2cC5Jg0Yf7ErePZk+z+vAX8nNPpsAa7Xc0jfwo1LLIrrJYjY/vLe9yKguq6O VgWpoO5iykKv2o2iUIQXojLkOe99rqWSNKXD7oMGq9YQY78x7D18NK93PavHYXM/k+g0bS rTxOxFOPafs6wHpGVA2RScNQkxmPNM7Rl4Jfww2oTsDYmLLhPDcB72VzfbfEeoHmAh52GR xZ3mONvQDBXTvRTsphVqe9WH7r9N5tdKvBP4KR0QkALnsenhTfMj7cKMAO+aobQnAjbXIG TAclTxcL9bm4y3BZtGXDFuIntl8RIJ694L90h3q1Hx3o6mTG9rtokytgECxtsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1757974190; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xzbes/4mD8VASssDDkgL5X5KvDNP8k346Gu8C/EPbhs=; b=uHVDGpNIevmOEnjnUYtEyaY6Huv2gy2tgIGbWlxWoMgGXfchthbQqtlfTGaKRiZT8U1e5c jnJHRAMCdK9dA9AVU+VHlu1n9ycAGbYL61nzpA54KI38Xng+F0oUuM5kNxdM4V5/yeJ0q+ 3oZ268qsjZzFprf03uTlUEjoy50J4Ju04L4d2Bbe0F5TT9XHC94aQwNo0SL7khBvCxyv3J eHU/rqDtu/85hmdOjkU7l7kKNk61eRI9PQY5CHGPi/Kaqxrablr/+Zh/i3nQf7N+m8V1S+ JLVQnQsf4/0qG34xybtBg3vFRxUQAdv48HYaxKDgxbSydSCATIyMpsJzsaRf9g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1757974190; a=rsa-sha256; cv=none; b=WeILlNWkaXHtRFnj/k4jtLWVKMhN5mDFQomDTjSMDVFDZeo0K9T8+mqA6QIbETdxqdrhYY S+4oz9qlPDBEzNKbfgGY3AMWCRSXhvFWy/SSHg1DuZJBHAUkRyXHga8M3KBfglioFuUW+9 tRw4svMs0L0M75Vq5C3CW6OG2AlDNbVVK2hqyFbOerUOGbVJKKczo4Jmc/tDQCk/3IGil1 TTB3FFn/TVpvOWYzw+sASHOFLdhojCE3i69CDKtAgKm25zvZrbni6gtrSoBSvdK8dk/JUv FclKQGSTwdHpBxXYL+EsngxAWEqW2eaYX/7M2RECJfWgPOtYYw6IEHsaR2Xt+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 4cQfMy2s0kz1Blv; Mon, 15 Sep 2025 22:09: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 58FM9of5077665; Mon, 15 Sep 2025 22:09:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58FM9o0S077662; Mon, 15 Sep 2025 22:09:50 GMT (envelope-from git) Date: Mon, 15 Sep 2025 22:09:50 GMT Message-Id: <202509152209.58FM9o0S077662@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alex Richardson Subject: git: 90234b9dd8cb - main - riscv: Provide prototypes for fpgetmask/fpsetmask List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: arichardson X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 90234b9dd8cb293f3eb9ce3765b17ebc05f9201a Auto-Submitted: auto-generated The branch main has been updated by arichardson: URL: https://cgit.FreeBSD.org/src/commit/?id=90234b9dd8cb293f3eb9ce3765b17ebc05f9201a commit 90234b9dd8cb293f3eb9ce3765b17ebc05f9201a Author: Alex Richardson AuthorDate: 2025-09-15 22:07:32 +0000 Commit: Alex Richardson CommitDate: 2025-09-15 22:08:14 +0000 riscv: Provide prototypes for fpgetmask/fpsetmask These functions are stubs that do nothing but are called by some software and not providing them results in implicit function declaration errors. This was missed in D25740. Reviewed by: #riscv, mhorne MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D52035 --- sys/riscv/include/ieeefp.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sys/riscv/include/ieeefp.h b/sys/riscv/include/ieeefp.h index 03a96e8a000f..84b554a04c65 100644 --- a/sys/riscv/include/ieeefp.h +++ b/sys/riscv/include/ieeefp.h @@ -5,4 +5,9 @@ /* TODO */ typedef int fp_except_t; +__BEGIN_DECLS +extern fp_except_t fpgetmask(void); +extern fp_except_t fpsetmask(fp_except_t); +__END_DECLS + #endif /* _MACHINE_IEEEFP_H_ */ From nobody Mon Sep 15 22:09:51 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cQfMz4mJ3z687gQ; Mon, 15 Sep 2025 22:09: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 4cQfMz3y8Qz3SvJ; Mon, 15 Sep 2025 22:09:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1757974191; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WaVKwC3xJT7jb7h9KYtc/n00+TBB+iRRZfuMMjnQeTE=; b=TF/oFUJTIkODpE/wUMz3nJmViJkEVjLzUCUy3AIPy0mQLM7PyeEnCLS9iQ8uuWAVh6acsW edoEWNh3znzTqHd5lbGrTt+gng7LWHcrXehygKHG8/9Q77i9pH1I7MCg/vzJjwyV2/KA06 qO6TkUZI928wdRtJ+n1gOKjFMF73f5bSTQBjCD7lQatYcqosEDNaB7h041yh+YGmthBN9p G1Nw5P0cbuQhrizn5QtocKFMv7aadpMREZ3mDGNG38MF9nUTyiMUf+pEHzBdCHl48c0RQb K2qKt87AqEmqOTZCmKRaQOiELlHMjnzvYwtBW5CqNrlp/PfryKKBLgFaiH647A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1757974191; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WaVKwC3xJT7jb7h9KYtc/n00+TBB+iRRZfuMMjnQeTE=; b=nq0ASSh2NIdukk0hS0TJAz0RhCd+ooUrjRmy2ztuaW2S7ArRBPKRoYgcjODhEVcvBUHBgG beKwg2rqf4AiUP/mcPJKHk75qOfsAEsRh/dwEGZ0k6gphrTMfAdpKb7TsxIcPwfQ3tMYB+ GtbtvcIugFWs9HkgxnuEGS8UZshtku+pnNj/I9scFmUJaSKv91MyeegBrq8kvY28mTWxHp VaSPcQ5nxcOYLU47Ea8fQ/JAw6Ov1yiampen3zWTOkqlesqT01EsPNi6g4slERjjFZAmOK 8/mU3DPPTumBEPXcG9KZA1NOp7TNgf4NxLrHqBKjoDzcTVeRgZ3FYXjoTm/Dew== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1757974191; a=rsa-sha256; cv=none; b=DSczGVBF6JuS05Tf36tdGUGUpYuWMeX7rZ/JpvucYQNZuTX8ANPIygTptAbs6GsLzUXIKU rginfxZQF2imZOz7M4RU7+fBmSTnGxJbiGi6yiycWgIjkq0f/Zkmu53xePvyBmL4xnuml1 CXEVvmdjnHw+j3TFydxQXZ6YMswv0CsmHTeg+VzOcFPUmglUPVzvZrhJf5B8NeaMxgELLB Q8S5OEHjYcWyRWGMW/0gnG4liPqCHja8voD4BnlNdOGZlYexOYK0Ti76H33gfUT5SbbtZq 3ndPNqW8Y2PZ2pSrb2FTB5uj+VN8aJabNYjHpcZI0P46baW+nxLzx3CxmVaeWw== 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 4cQfMz3X0Nz1Bs0; Mon, 15 Sep 2025 22:09: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 58FM9pKd077704; Mon, 15 Sep 2025 22:09:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58FM9ptY077701; Mon, 15 Sep 2025 22:09:51 GMT (envelope-from git) Date: Mon, 15 Sep 2025 22:09:51 GMT Message-Id: <202509152209.58FM9ptY077701@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alex Richardson Subject: git: 969be39fb3ca - main - if_ovpn.c: fix use of uninitialized variable List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: arichardson X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 969be39fb3caf4272f128dbf3267ceba5966a6ce Auto-Submitted: auto-generated The branch main has been updated by arichardson: URL: https://cgit.FreeBSD.org/src/commit/?id=969be39fb3caf4272f128dbf3267ceba5966a6ce commit 969be39fb3caf4272f128dbf3267ceba5966a6ce Author: Alex Richardson AuthorDate: 2025-09-15 22:08:43 +0000 Commit: Alex Richardson CommitDate: 2025-09-15 22:08:44 +0000 if_ovpn.c: fix use of uninitialized variable In case we use OVPN_CIPHER_ALG_NONE, the memcpy will attempt to copy 0 bytes from an uninitialized pointer. While the memcpy() implementation will treat this as a no-op and not actually dereferece the undefined variable it is still undefined behaviour to the compiler and should be fixed. Found by building with clang HEAD Reviewed by: kp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D52543 --- sys/net/if_ovpn.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/net/if_ovpn.c b/sys/net/if_ovpn.c index fe015632f33e..1c18baac3417 100644 --- a/sys/net/if_ovpn.c +++ b/sys/net/if_ovpn.c @@ -904,9 +904,11 @@ ovpn_create_kkey_dir(struct ovpn_kkey_dir **kdirp, kdir->cipher = cipher; kdir->keylen = keylen; kdir->tx_seq = 1; - memcpy(kdir->key, key, keylen); + if (keylen != 0) + memcpy(kdir->key, key, keylen); kdir->noncelen = ivlen; - memcpy(kdir->nonce, iv, ivlen); + if (ivlen != 0) + memcpy(kdir->nonce, iv, ivlen); if (kdir->cipher != OVPN_CIPHER_ALG_NONE) { /* Crypto init */ From nobody Mon Sep 15 22:35:23 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cQfxR6d7wz689nk; Mon, 15 Sep 2025 22:35:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cQfxR54S4z3Wpy; Mon, 15 Sep 2025 22:35:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1757975723; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gdGWKj5NI/svEmvfuD9OL2ROGdlSbmZTCKwWZgQ1QvY=; b=b+tWpguDPIRBhC3kOZGlyLMHm2cpLGWLoYKDUFQ7g1xN6yCsdJwPaypOSQsFKExkdtlVc0 Z4k632Sfa3OMFasCfp0PDcyaXXx/AHlC1V/RJoePPq0FGAEXmH+7SPpUySyNeSQ8XeqJh2 uFZ6bQz1c45KTITvK00bQcWEddLogHQZ+CLk1XVDLCybH7vL1+YN3Pn2U6eda1mgYbnMo4 UHtAhN2M1YgBW6f62li+fT3vs7Re8TI4LFnMMydcnNmoNe7zEoOPiJmlRdprxe64GaFIiA estMwaDEaP7nypCIuIeTi1NbZcKeIx21lGa1GyKsfi5MDfZVfhkVaHlurBc12g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1757975723; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gdGWKj5NI/svEmvfuD9OL2ROGdlSbmZTCKwWZgQ1QvY=; b=JNftfUg1ma0xrOuddASEbfm8yCxlXo4O+R1BUU9jazHJxSJq2NBRZwVZ1uG7xcNY1NCIZQ H1J5OVZ+Lx+Sg233d2Vxt5v6vawWxkZunRNEly70aL21t6XR2eBRaU5yg6WmlNhuq8JvOn AosjQVcAuz8SUjCoP5heSXG817jDHB0VjeFXf1wIVUO2G0TphnW0s1iFop4R76evMbP62c Ll0HUL0b2reDRt3itLFgtHpxrPfDwEl/km71vp4rROs9rC2IwfnZA3nfcVKGRbG/G9u6bF Tw/ziEDZrYnqq7UYPRbHdF8ekJUFuq3y3l+ikfpPeywMcrrgzwto3UBhfvHGfw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1757975723; a=rsa-sha256; cv=none; b=pvBgRgp25iCKopSfXFfjWN4t+OUxR1k9JmdTiJ4/mQ5/rTZHSu1el/24soNLdM7L/B0QBl FD32vJTZZctp4ZvU+ROXZ/QsJ6TLKS5YvusJoADbL6Qnz2XM2qgWAyGiSkBsJS2/SUY+2Z 7kjcIDg1Ux6cnN5zGUKlc2CoOqPc5k3YqUWXVhdahVUaFakUyxcWPwM8savOFWPeZqvLVj aGpyM0uEXNJ8l/GQ5/+LY/D4CGzMnfBtKG4ysB7jOIau42A2URSRnjHGC6sH6kd2PMzFXy HJj1SHGkmqJ8cw4U11m3z7+Vd9KNjqSzdlxN07n6FznHgSXqfnFi653PIkFGVg== 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 4cQfxR4gSKz1Chr; Mon, 15 Sep 2025 22:35:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58FMZNa4031244; Mon, 15 Sep 2025 22:35:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58FMZNu5031241; Mon, 15 Sep 2025 22:35:23 GMT (envelope-from git) Date: Mon, 15 Sep 2025 22:35:23 GMT Message-Id: <202509152235.58FMZNu5031241@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alex Richardson Subject: git: d61c75f634cf - main - libc++: avoid use of deprecated builtin List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: arichardson X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d61c75f634cf52fdef9590601d881f85275eee9a Auto-Submitted: auto-generated The branch main has been updated by arichardson: URL: https://cgit.FreeBSD.org/src/commit/?id=d61c75f634cf52fdef9590601d881f85275eee9a commit d61c75f634cf52fdef9590601d881f85275eee9a Author: Alex Richardson AuthorDate: 2025-09-15 22:10:07 +0000 Commit: Alex Richardson CommitDate: 2025-09-15 22:11:08 +0000 libc++: avoid use of deprecated builtin This pulls in LLVM commit accfbd4cb327411ad66c0109ba1841482b871967 to avoid the use of __libcpp_is_trivially_relocatable. This fixes building FreeBSD libc++ with clang HEAD as of today. Original commit message: [libc++] Replace __is_trivially_relocatable by is_trivially_copyable (#124970) The __is_trivially_relocatable builtin has semantics that do not correspond to any current or future notion of trivial relocation. Furthermore, it currently leads to incorrect optimizations for some types on supported compilers: - Clang on Windows where types with non-trivial destructors get incorrectly optimized - AppleClang where types with non-trivial move constructors get incorrectly optimized Until there is an agreed upon and bugfree implementation of what it means to be trivially relocatable, it is safer to simply use trivially copyable instead. This doesn't leave a lot of types behind and is definitely correct. Reviewed by: dim MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D52529 --- .../libcxx/include/__type_traits/is_trivially_relocatable.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/contrib/llvm-project/libcxx/include/__type_traits/is_trivially_relocatable.h b/contrib/llvm-project/libcxx/include/__type_traits/is_trivially_relocatable.h index c0871731cc00..9b0e240de55f 100644 --- a/contrib/llvm-project/libcxx/include/__type_traits/is_trivially_relocatable.h +++ b/contrib/llvm-project/libcxx/include/__type_traits/is_trivially_relocatable.h @@ -11,7 +11,6 @@ #include <__config> #include <__type_traits/enable_if.h> -#include <__type_traits/integral_constant.h> #include <__type_traits/is_same.h> #include <__type_traits/is_trivially_copyable.h> @@ -23,8 +22,11 @@ _LIBCPP_BEGIN_NAMESPACE_STD // A type is trivially relocatable if a move construct + destroy of the original object is equivalent to // `memcpy(dst, src, sizeof(T))`. - -#if __has_builtin(__is_trivially_relocatable) +// +// Note that we don't use the __is_trivially_relocatable Clang builtin right now because it does not +// implement the semantics of any current or future trivial relocation proposal and it can lead to +// incorrect optimizations on some platforms (Windows) and supported compilers (AppleClang). +#if __has_builtin(__is_trivially_relocatable) && 0 template struct __libcpp_is_trivially_relocatable : integral_constant {}; #else From nobody Mon Sep 15 22:35:24 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cQfxS6gkrz689Zb; Mon, 15 Sep 2025 22:35:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cQfxS5qSpz3X2J; Mon, 15 Sep 2025 22:35:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1757975724; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LBn9l8SAlGu9uAX7P5pUHWHCpqCiQhr0nWPla4xE3Tw=; b=ESn+IoQcufYGatiZxxShxwfJbd+BIcqR+0q9tH19iWA15QB4+jWCseokEq8/egTPI5wVsR ZbnHAGIKvYUdKXz2ehx0xO1cis7J4uWJbpTLI/1C91ktMQiVME3zxKPIbTjkFVOtxoFP8C lVHIqIgErjkGPVqJmZZEz8zITWmKPtW5UqYktUTlI0UIg7Ku4zPJZJYOrMtSl13Z0Qi82Q feEzsQq/2O33vvui0S4rwgBGO0w45uvSpQJrrpGmogjrZnGCIwxCZEo9oTcCzLghCxn8b3 Q4HlqIM8iCzY0EqJqYBF5e6hAlGPfWKnPR/mYF+V6tq3cZNDsWXZG2S0sJ74wA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1757975724; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LBn9l8SAlGu9uAX7P5pUHWHCpqCiQhr0nWPla4xE3Tw=; b=UDM9Lr+QSMK3lazhSAIR1wQEhNAZaj850GzTlAV1M8FfXiHED9XhU4ZkXlhede7tG/Q8Qm McdTXJcxk7cEqJiveonLE9u32N+6yWD4bR6Af/OUIPuZspsmqakhbkfa5+wbOXsQDqY1Ol cvLt3VWQUhGm/ARnXPSilh6A5WOhEwanC5FkJaEf7o3HX9frMCCxm2nvaawvEGMVLG7aPl wj4BQBziZ6J1+iMcMNuYlu7Y6RD/vFXTod7clQXUS5elykb3yin3mEhBTKWGh52rtg8EAL ex5AVkHoBVzn9m03PiENmo/mPak93zlsFBba2r3p7Tmv72RcbdAvKZ9V2gkJyg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1757975724; a=rsa-sha256; cv=none; b=EAWUIJgsvFriwUjbqmLzQ3JfJIQ7xNTgzN1ZTmk6S/Zi22j6ZR5YZp45k47JFJ/xan01E+ nsAMRKxTMywshDk5w5DB/hjuiDYjV0AtafYp2eETUCicQhkq/8krQ82Z56PU5LxUpNUASK Gpo/KN2ut2gHzqqgMvTeOidVq64BcuaMZ5CC/A32+6Es2xsK5xdkDnlZ1U/+aYiVlO4xqW Ibb2SZPyqmaEuZZ30zKch/XwvquTfjht3UyrWbfHcAlfjgr8JYNb123n/reGyINAZiBdU1 MgJLoZsP0wn99GDyZIUkrck2J3oOO5ZDdpYp4eeQ91zPCnfY/JwxsHmYT0uXzQ== 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 4cQfxS5KzZz1Cf2; Mon, 15 Sep 2025 22:35:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58FMZOpS031277; Mon, 15 Sep 2025 22:35:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58FMZOib031274; Mon, 15 Sep 2025 22:35:24 GMT (envelope-from git) Date: Mon, 15 Sep 2025 22:35:24 GMT Message-Id: <202509152235.58FMZOib031274@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alex Richardson Subject: git: dee76cf2f3da - main - libc++: avoid use of deprecated __reference_binds_to_temporary List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: arichardson X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: dee76cf2f3dace6290ccab07c2db17355994e70f Auto-Submitted: auto-generated The branch main has been updated by arichardson: URL: https://cgit.FreeBSD.org/src/commit/?id=dee76cf2f3dace6290ccab07c2db17355994e70f commit dee76cf2f3dace6290ccab07c2db17355994e70f Author: Alex Richardson AuthorDate: 2025-09-15 22:11:39 +0000 Commit: Alex Richardson CommitDate: 2025-09-15 22:12:45 +0000 libc++: avoid use of deprecated __reference_binds_to_temporary This was removed in upstream libc++ in commit 437ad06f762ab07d89badecdd20627db200b98d3, but as this does not apply cleanly to the current repository, I am applying the equivalent change in a minimally invasive way. This is needed to build with latest clang HEAD as of today. Reviewed by: dim MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D52530 --- contrib/llvm-project/libcxx/include/tuple | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/contrib/llvm-project/libcxx/include/tuple b/contrib/llvm-project/libcxx/include/tuple index 081b90c7bbec..1d39974d5a6b 100644 --- a/contrib/llvm-project/libcxx/include/tuple +++ b/contrib/llvm-project/libcxx/include/tuple @@ -302,7 +302,9 @@ class __tuple_leaf { template static _LIBCPP_HIDE_FROM_ABI constexpr bool __can_bind_reference() { -# if __has_keyword(__reference_binds_to_temporary) +# if __has_keyword(__reference_constructs_from_temporary) + return !__reference_constructs_from_temporary(_Hp, _Tp); +# elif __has_keyword(__reference_binds_to_temporary) return !__reference_binds_to_temporary(_Hp, _Tp); # else return true; From nobody Mon Sep 15 22:35:25 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cQfxV67S7z689jD; Mon, 15 Sep 2025 22:35:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cQfxV0FSPz3Wq5; Mon, 15 Sep 2025 22:35:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1757975726; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=L0Uor2HiTElHq5kSTPunLw02oHsPNFjHD0oFi9SsTcs=; b=w3Y17rbi81IEqXu82kP6UtfVNbz80nM0+PDDFXgb9vevgGwJMT3EIDBqe//RZ0UQKynxb2 fB0Svqf6gVWjZ0bSqXV3TtuHi0RlcjXzj3b/88re6LMydwvAH3IxRYPSbzRvaElN2e8L/J nwUcwWf9siQEcNsTfQhJm2m3t47iRV8BzJ/Kxzkt9Iukq1JyzbHztr4Q9keIaqjCE2Z7Sc hynhU3D2S7mIphLPXD/7erH8XvtTfE7p9PohBPd2GVdGup6kGggR7zvn/CVLmyPVU4gKDf FIqC9n1GyQnAkJkQRRktbIqtQL+kgOZc9faNODQR4laYC2ruO8nKlop62+quag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1757975726; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=L0Uor2HiTElHq5kSTPunLw02oHsPNFjHD0oFi9SsTcs=; b=Q6sFfXwXG7nmkXcGFmWkbbch4vdvuanU8zc4qUGtr4lTMVlvCh40cTaQyNyKPU5gjv8axv pcGDNhEJcXQ2UwoEAcnRabEjLHtapBPxAMa7hBg+xfCRtFvCL9ZPNRrBCL6+M6IzLW5rhl DB9AQpokPmvhKkRJazQ2jHXyDGEwL3P37Xqg4WItqp5HBKchUzkZWyvl5q3DogQFt4aZN5 D2728d0kW7NiltJnqJezG7N/7kGSCYvLIXxrt1gxUb20Oaq/kSPhRsLDWZpKFdoxMqtFV1 4Va6QNMuasmn9sz3eyx475onuV8n4hE8GH8Pqb4FcSoewbuHsPAuiGeWZ+m6zA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1757975726; a=rsa-sha256; cv=none; b=rPe+fKuhy1Uh0yisvRaNh8uM1Ur21cb/sYECJXCVntLiM+/AWhr0ZgmxfT4Bl3eDeuMTVH obBntDikZcfX1YhEPkLDgrmR8+LQhQrOQ+19HK7zxbS3492B9SJzs1HgayGGeGNZP/m0yS ys5rX4FJT39jFn9upUJiye8/mcsIALAI7Vy/4MmJbaIy2ub0pPGMW1ECWmj+jsoTHcqT7f noS6/+eCLep8PXPi0EIGaeEHHX0wIwXb2pADBw1O+P++OLvEGot3kxoQcczmzUhs0DYS6+ H5G3kZynexRl9/8gX12q0YAII55JST0SU7AvZxIGp82zLTIDjP/uhumDUY/Duw== 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 4cQfxT6Gf0z1Cf3; Mon, 15 Sep 2025 22:35:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58FMZPWV031316; Mon, 15 Sep 2025 22:35:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58FMZPKX031312; Mon, 15 Sep 2025 22:35:25 GMT (envelope-from git) Date: Mon, 15 Sep 2025 22:35:25 GMT Message-Id: <202509152235.58FMZPKX031312@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alex Richardson Subject: git: 086ce467adec - main - libc++: Fix deprecation warnings with latest clang List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: arichardson X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 086ce467adec42d58414fdb4d54c2b6819cf0c07 Auto-Submitted: auto-generated The branch main has been updated by arichardson: URL: https://cgit.FreeBSD.org/src/commit/?id=086ce467adec42d58414fdb4d54c2b6819cf0c07 commit 086ce467adec42d58414fdb4d54c2b6819cf0c07 Author: Alex Richardson AuthorDate: 2025-09-15 22:13:46 +0000 Commit: Alex Richardson CommitDate: 2025-09-15 22:13:46 +0000 libc++: Fix deprecation warnings with latest clang Latest clang has become more strict in diagnosing deprecated decls, so pull in LLVM commit 9feac2cbd0d80927ce9a8b4c3e810d2b81802d55. Original commit message: [libc++] Improve deprecated diagnostic guards. Recent Clang-21 builds improved the deprecated diagnotics. This uncovered missing guards in libc++ internally. Reviewed by: dim MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D52531 --- contrib/llvm-project/libcxx/include/__functional/binary_function.h | 5 ++--- contrib/llvm-project/libcxx/include/__functional/unary_function.h | 5 ++--- contrib/llvm-project/libcxx/include/__functional/weak_result_type.h | 2 ++ contrib/llvm-project/libcxx/include/__memory/allocator_traits.h | 2 ++ 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/contrib/llvm-project/libcxx/include/__functional/binary_function.h b/contrib/llvm-project/libcxx/include/__functional/binary_function.h index ddee3b170311..18879f65112b 100644 --- a/contrib/llvm-project/libcxx/include/__functional/binary_function.h +++ b/contrib/llvm-project/libcxx/include/__functional/binary_function.h @@ -39,11 +39,10 @@ struct __binary_function_keep_layout_base { }; #if _LIBCPP_STD_VER <= 14 || defined(_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION) -_LIBCPP_DIAGNOSTIC_PUSH -_LIBCPP_CLANG_DIAGNOSTIC_IGNORED("-Wdeprecated-declarations") +_LIBCPP_SUPPRESS_DEPRECATED_PUSH template using __binary_function = binary_function<_Arg1, _Arg2, _Result>; -_LIBCPP_DIAGNOSTIC_POP +_LIBCPP_SUPPRESS_DEPRECATED_POP #else template using __binary_function = __binary_function_keep_layout_base<_Arg1, _Arg2, _Result>; diff --git a/contrib/llvm-project/libcxx/include/__functional/unary_function.h b/contrib/llvm-project/libcxx/include/__functional/unary_function.h index 69b1bc94220a..d46df2e86fbd 100644 --- a/contrib/llvm-project/libcxx/include/__functional/unary_function.h +++ b/contrib/llvm-project/libcxx/include/__functional/unary_function.h @@ -36,11 +36,10 @@ struct __unary_function_keep_layout_base { }; #if _LIBCPP_STD_VER <= 14 || defined(_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION) -_LIBCPP_DIAGNOSTIC_PUSH -_LIBCPP_CLANG_DIAGNOSTIC_IGNORED("-Wdeprecated-declarations") +_LIBCPP_SUPPRESS_DEPRECATED_PUSH template using __unary_function = unary_function<_Arg, _Result>; -_LIBCPP_DIAGNOSTIC_POP +_LIBCPP_SUPPRESS_DEPRECATED_POP #else template using __unary_function = __unary_function_keep_layout_base<_Arg, _Result>; diff --git a/contrib/llvm-project/libcxx/include/__functional/weak_result_type.h b/contrib/llvm-project/libcxx/include/__functional/weak_result_type.h index ad7a8395186c..488fec9dac21 100644 --- a/contrib/llvm-project/libcxx/include/__functional/weak_result_type.h +++ b/contrib/llvm-project/libcxx/include/__functional/weak_result_type.h @@ -77,6 +77,7 @@ struct __maybe_derive_from_unary_function // bool is true template struct __maybe_derive_from_unary_function<_Tp, false> {}; +_LIBCPP_SUPPRESS_DEPRECATED_PUSH template ::value> struct __maybe_derive_from_binary_function // bool is true : public __derives_from_binary_function<_Tp>::type {}; @@ -99,6 +100,7 @@ struct __weak_result_type_imp<_Tp, false> template struct __weak_result_type : public __weak_result_type_imp<_Tp> {}; +_LIBCPP_SUPPRESS_DEPRECATED_POP // 0 argument case diff --git a/contrib/llvm-project/libcxx/include/__memory/allocator_traits.h b/contrib/llvm-project/libcxx/include/__memory/allocator_traits.h index c5fcc89327b8..f3e327edda12 100644 --- a/contrib/llvm-project/libcxx/include/__memory/allocator_traits.h +++ b/contrib/llvm-project/libcxx/include/__memory/allocator_traits.h @@ -40,6 +40,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD template \ struct NAME<_Tp, __void_t > : true_type {} +_LIBCPP_SUPPRESS_DEPRECATED_PUSH // __pointer template { using type _LIBCPP_NODEBUG = typename pointer_traits<_Ptr>::template rebind; #endif }; +_LIBCPP_SUPPRESS_DEPRECATED_POP // __void_pointer _LIBCPP_ALLOCATOR_TRAITS_HAS_XXX(__has_void_pointer, void_pointer); From nobody Mon Sep 15 22:35:26 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cQfxW4K9Jz689Zf; Mon, 15 Sep 2025 22:35:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cQfxW0Sywz3X45; Mon, 15 Sep 2025 22:35:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1757975727; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GP5PWxMNN7fG9Mj8rTGPsFM40X8nJcxA/rv5rg7XSuY=; b=axK8lLg/8MIJl+99zy7xp+rKsJp8jdO+pR5l9G0XbbGDNpqbRUBH4In9lHA/Bb3TT+peri g+JPPtPxsFnJ2bLCnGkc87rlgmWbK6AGAXoceNbiGCbKzd2simKNaqCaLFXfFYvBY4HWtG xdXAQkiwbpAWMLT2Hah+dNskR4AToib8cCntPEH6KSbmzt4oDddYkjwwQn0x9N1DnE3HaA eDzM2XgGNsOEVg2Z63qUA27OdiFhJEAmtYUr3GhxXXbgBQulPHtf9+Ujh/fvayVBve35KM gbaSiGRVSeciQSUsML+S+CO0/2rKsx7jVLxKwvqnFrnsNmzlMlU62ssFbS8gAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1757975727; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GP5PWxMNN7fG9Mj8rTGPsFM40X8nJcxA/rv5rg7XSuY=; b=M2AK2fLyFFOd7e2VSpGxUcTG1SNAYwVnm6wj1NH3/WZOhZ3nMgh6koRaNOgRRpiN5RJULn 4/DNjOLIjGQQuZvATylHXKLg54On04JmokNofnAcjBO0UhBD+sthp1yQ8MfdU8FAROBDAA qbrciDQYhVvQiO3vXIeBK5jdyMCtUxAVk/IP/79v+zV1J2rQlYkKbfxskNzl/TSbiBOQ6G klWoQcSR2N3jKDKtbAkIRywP/mGLymqW2CjK0nMS80hjq5uGcB6jO+zWkXiO2LxKfBYGsa rINnzLhLPCnmEiK5ecNSk0liVZZCYy2mq9uCspaQOtjP1wP//zpNzmnWSnXc/w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1757975727; a=rsa-sha256; cv=none; b=HipMfrkajIe0IIuTpyI+mEpCMRbZS2ZEMQQENixV5YPsbq4ju9umZsqM5I/Hsj029fiF7/ t1PdxspGzEr+R12P7Zk/aO6wvuT6IKW8bsdTyJiISWewHJTJ/JWUTk1wRdAhgMA4MCvZOV 7Yh7hjLsL+U/CbYu8PGq1o1vx0UO8nqR5o626RPcznbD5K3w/flrciqJiIVzfY3ssMZ1MY x0jGXQ7KY+QYtqyz5fiu//weRUy4uHT+FJa+L71o0LzeIMwnoD4VtcEZbm6GjTlMIV4jnS VDLu2h/WU8EbNxmH8pCXaG97tsYUiWKzzEnMHrMpaLc1qtasCJr+jEeRGGnOWA== 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 4cQfxV6mFFz1Cl2; Mon, 15 Sep 2025 22:35:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58FMZQqC031353; Mon, 15 Sep 2025 22:35:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58FMZQjR031350; Mon, 15 Sep 2025 22:35:26 GMT (envelope-from git) Date: Mon, 15 Sep 2025 22:35:26 GMT Message-Id: <202509152235.58FMZQjR031350@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alex Richardson Subject: git: 34a006eaa39c - main - libc++: silence -Wnontrivial-memaccess warning with newer clang List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: arichardson X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 34a006eaa39ceb6b0a96fa386c9b9b8a44681979 Auto-Submitted: auto-generated The branch main has been updated by arichardson: URL: https://cgit.FreeBSD.org/src/commit/?id=34a006eaa39ceb6b0a96fa386c9b9b8a44681979 commit 34a006eaa39ceb6b0a96fa386c9b9b8a44681979 Author: Alex Richardson AuthorDate: 2025-09-15 22:14:18 +0000 Commit: Alex Richardson CommitDate: 2025-09-15 22:14:18 +0000 libc++: silence -Wnontrivial-memaccess warning with newer clang Apply part of LLVM commit 71315698c91d0cda054b903da0594ca6f072c350 to silence the -Wnontrivial-memaccess warning that is triggered any time this function is instantiated by user code. This fixes another buildworld failure with Clang HEAD. Original commit message: [clang] Warn about memset/memcpy to NonTriviallyCopyable types (#111434) This implements a warning that's similar to what GCC does in that context: both memcpy and memset require their first and second operand to be trivially copyable, let's warn if that's not the case. Reviewed by: emaste, dim MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D52534 --- .../llvm-project/libcxx/include/__memory/uninitialized_algorithms.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/contrib/llvm-project/libcxx/include/__memory/uninitialized_algorithms.h b/contrib/llvm-project/libcxx/include/__memory/uninitialized_algorithms.h index 7475ef5cf85d..79cab80dcf73 100644 --- a/contrib/llvm-project/libcxx/include/__memory/uninitialized_algorithms.h +++ b/contrib/llvm-project/libcxx/include/__memory/uninitialized_algorithms.h @@ -642,7 +642,8 @@ __uninitialized_allocator_relocate(_Alloc& __alloc, _Tp* __first, _Tp* __last, _ __guard.__complete(); std::__allocator_destroy(__alloc, __first, __last); } else { - __builtin_memcpy(const_cast<__remove_const_t<_Tp>*>(__result), __first, sizeof(_Tp) * (__last - __first)); + // Casting to void* to suppress clang complaining that this is technically UB. + __builtin_memcpy(static_cast(const_cast<__remove_const_t<_Tp>*>(__result)), __first, sizeof(_Tp) * (__last - __first)); } } From nobody Tue Sep 16 01:11:29 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cQkPY6rd7z67gZB; Tue, 16 Sep 2025 01:11: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 4cQkPY6Jtzz3p2v; Tue, 16 Sep 2025 01:11:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1757985089; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7LfE/pbUqgF079w3NOTleNCb7E7puKnoJR2IYERtHpk=; b=Kn92f/fr49Y7nYmwcIdanUlfOu/5PXmrgwwHXA70pBpw4i9KDRxNjuiaOKQKGVlI8dcxzR LuDfNZJBVymAPau6xt/qRcH5yrVS3FBz36Q2OvhEIyI9fBxET6pTMPFTTb1ekuUzZNHlfb TpkTNTQeOTvv5bh8R6j5oIFfxm2M2/Pc4fgvb8s7mLJ4Y5Vf/oureoNqAMw+7s2e7lUrfM XfnMsqaZAUeC3UlWoNH9Ooz8ULNe/M1jo3naW26VjZjtaB72ZSTPN7iHdUhk6T/ZqgxRjy WOPZkGV7i7S5xKZa9X1OZJO8Ow6nJMTYMCeEzGdHv+NZLkFi+KhT2pss5L9aFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1757985089; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7LfE/pbUqgF079w3NOTleNCb7E7puKnoJR2IYERtHpk=; b=oQy7E59znQ8k0bDVYUjALJLoieLfjUs40hSNBoRsf9X8J4mwrgDv7uxhRADipvcScP9kOF kYjv+f/5D6GW6qW33Eilc1yZTM2lpIlY1pKD75U0OoNe0X83YHqQTOayoG+RdTUiVVqNXB S0DOG/LjZ0r9GYgURlZaCRPPGawZst8XLp4WBVrYrmYTJPq/ilv+LQizLHfTPWHZcNI35b JfFnBmLpD1jAjzsCCoXU1IlTzHGbZ59V7GWCov7eTnSWAGgjewJqyahbzdiXQZpsWY/+6M v6azTs4TwZgwSqRRWzDLL8MJcmQDUCAfLRHemWALeJzRmQh9kqrEdlgD4WyQTA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1757985089; a=rsa-sha256; cv=none; b=WIgUTowivybzkFvKcuxr9cRkZXmouHA1QbjEpNV2jBJbB1bcIuFxGiwxTjLOsb8YR4QKzD pLKBbo0hm0540gPM/JKkmsBnFgyW+K0KlJ7ZCmj93sZCtqpFk7KlRNRbJCgtaW8LQGyDB1 itt5ud2OQMnn3lPiXRoPGqASYP9V3JHdEC2/hKp9bCWgVx9VMvu7LO0WWaJMZ/rDFSsaj4 WQr7geUk1KP8X+1sL5P4yUEbqpPxbbpG3OwpGU7+3ENf59FnVPKoeV/WMzsKk+rEcUoPSw XL8Xgfe65dTU8nktcF6Ahc505ALu4qOeMcARh62tknZ0bGNceNnqVgRrKeHI4w== 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 4cQkPY5cS7z3hF; Tue, 16 Sep 2025 01:11: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 58G1BTCm024228; Tue, 16 Sep 2025 01:11:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58G1BTum024225; Tue, 16 Sep 2025 01:11:29 GMT (envelope-from git) Date: Tue, 16 Sep 2025 01:11:29 GMT Message-Id: <202509160111.58G1BTum024225@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Colin Percival Subject: git: b050bfa88d4e - main - release: Pass ABI to running pkgbase-stage on dvd List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b050bfa88d4ee2acedb590777603e5c3656cdaca Auto-Submitted: auto-generated The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=b050bfa88d4ee2acedb590777603e5c3656cdaca commit b050bfa88d4ee2acedb590777603e5c3656cdaca Author: Colin Percival AuthorDate: 2025-09-16 01:04:56 +0000 Commit: Colin Percival CommitDate: 2025-09-16 01:11:21 +0000 release: Pass ABI to running pkgbase-stage on dvd I did this for disc1 but forgot to amend the dvd invocation. Fixes: 340e68fd7c0d ("release: Pass ABI to pkgbase-stage.lua") MFC after: 3 days Sponsored by: https://www.patreon.com/cperciva --- release/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release/Makefile b/release/Makefile index 5dede64ac9c1..41bca6dceebc 100644 --- a/release/Makefile +++ b/release/Makefile @@ -309,7 +309,7 @@ dvd: ${PKGBASE_REPO} ${.CURDIR}/scripts/pkgbase-stage.lua dvd \ ${.OBJDIR}/pkgbase-repo/${PKG_ABI}/latest \ ${.TARGET}/usr/freebsd-packages/offline \ - "${_ALL_libcompats}" + "${_ALL_libcompats}" ${PKG_ABI} cp ${.CURDIR}/scripts/FreeBSD-base-offline.conf \ ${.TARGET}/usr/freebsd-packages/repos/ mtree -c -p ${.TARGET}/usr/freebsd-packages | \ From nobody Tue Sep 16 01:11:30 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cQkPb0gLwz67gTL; Tue, 16 Sep 2025 01:11:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cQkPZ6tkFz3p9r; Tue, 16 Sep 2025 01:11:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1757985091; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=St612i3RMjYGfw+FCuasTPFGQWdF7yefN4Htme+CUtM=; b=jyzmy8ZhtCCY1qYx725fnsWQE9LRGqsAIY+3gSBFU9M19tX6JP1GJY+Dfust/+FBeTdOCC OFBAXlIBi7ThXsC9Cu/U2gWRm1vJoAPuqT4GyhTLxJNX7ubSafyl5Su7MCjZ0dkby5e36I NvfjPgmtMAB5WCZhocq2egj1USUZthAZY1Fjs658S7/NWvJsw1577DoN34MMXjwqQ2DuGR o0x1jc2nO4PNwqfajOdVtzgu5FKY4n58uBOxNA9/UCzyVnrKUGQ7K7tHE23PvFOxgtPfs/ HQV8uhnvfrpltDH9Xrw3r2kCDG6vVO3R2xTFUttjDXQ7cGCYVZtUxs9fUwxikA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1757985091; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=St612i3RMjYGfw+FCuasTPFGQWdF7yefN4Htme+CUtM=; b=FnVYU8Kl1HEOesYPVDHkGmofINXLPTxvFw/g5ldb9Nks0VES3/XDJHA13ITcDK+BrjIbNG x9kOH3Nk3aGmhH4J7dJ5kZ2+g0TRavncP3FHANU5KS9fWPhui8aZ2dE1Jy7/JPNXrIAfm3 FRrjha+2jS2CCgTIuYzLzIdloaDdxYBvOBX0+rWVa4ULJjp+jGeqkOqPPY9IHPseRy9xAX 6Dbq4L0GDo+Mixhf7f03UUroa0ovU8QNK1D+473/axEIGmr07u49Eif2rcEdjZcTNXRmyA DTkoPiRM+C43QM8yg3TxPVwOHOMDgu+9VuGIoKJIWTOErJcVIejV855QjXecMw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1757985091; a=rsa-sha256; cv=none; b=suHAWoxehNP8Y4+bLrUWacPXLE7XKF67asiqTqZzXiH0iOV9VQ91gkdHlmWqeVQ21d59jK q+6j7BASEubjW6/fSXUkldcuos/IGVJjpjRtcpvMVh6DwfTJNqDivkBfczhaao9txi4dOQ dqYD12HDKa2jAvifsmAnA5GUUggcUbyC4l4T8VJTI9S+Fp3iCuu9IFqaO1UryjIOt03DKL cWBR8o7DMm2C7KpdGm5HMbSmsZkFctlA179NdSIDIohMZwBaayvA5jomi1w1UT9nEpsxJ2 LVv6JDW9TAViAZ92iaN2rwgqrGPdmaYB6ZiCwfM8NzWijiEzgG9fVquwU5Qhmw== 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 4cQkPZ6SHhz36k; Tue, 16 Sep 2025 01:11: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 58G1BUgT024261; Tue, 16 Sep 2025 01:11:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58G1BUTr024258; Tue, 16 Sep 2025 01:11:30 GMT (envelope-from git) Date: Tue, 16 Sep 2025 01:11:30 GMT Message-Id: <202509160111.58G1BUTr024258@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Colin Percival Subject: git: 8c9a919abaa3 - main - release: Fix typo in powerpc mkisoimages.sh List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8c9a919abaa3f6f16a17586ca72bab939788bf69 Auto-Submitted: auto-generated The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=8c9a919abaa3f6f16a17586ca72bab939788bf69 commit 8c9a919abaa3f6f16a17586ca72bab939788bf69 Author: Colin Percival AuthorDate: 2025-09-16 01:09:05 +0000 Commit: Colin Percival CommitDate: 2025-09-16 01:11:21 +0000 release: Fix typo in powerpc mkisoimages.sh "[ n foo ]" is an error and should have been "[ -n foo ]". Fortunately the only ill effect was to result in garbage in /tmp/ when creating powerpc ISO images. Fixes: 6c3e01bf8578 ("release: Randomize powerpc boot block file name") MFC after: 3 days Sponsored by: https://www.patreon.com/cperciva --- release/powerpc/mkisoimages.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release/powerpc/mkisoimages.sh b/release/powerpc/mkisoimages.sh index 9d83390f1a4e..705545dead4b 100644 --- a/release/powerpc/mkisoimages.sh +++ b/release/powerpc/mkisoimages.sh @@ -112,7 +112,7 @@ if [ -n "${METALOG}" ]; then fi ${MAKEFS} -D -N ${BASEBITSDIR}/etc -t cd9660 $bootable -o rockridge -o label="$LABEL" -o publisher="$publisher" "$NAME" "$MAKEFSARG" "$@" rm -f "$BASEBITSDIR/etc/fstab" -if [ n "$bootable" ]; then +if [ -n "$bootable" ]; then rm $BOOTBLOCK fi rm -rf "$BASEBITSDIR/ppc" From nobody Tue Sep 16 05:02:39 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cQqXM06p9z68HXN; Tue, 16 Sep 2025 05:02:43 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from omta003.cacentral1.a.cloudfilter.net (omta001.cacentral1.a.cloudfilter.net [3.97.99.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cQqXL1nv5z3P7V; Tue, 16 Sep 2025 05:02:42 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=permerror reason="p tag has invalid value: quarantine rua=mailto:p[ostmaster@cschubert.com" header.from=cschubert.com (policy=permerror); spf=pass (mx1.freebsd.org: domain of cy.schubert@cschubert.com designates 3.97.99.32 as permitted sender) smtp.mailfrom=cy.schubert@cschubert.com Received: from shw-obgw-4003a.ext.cloudfilter.net ([10.228.9.183]) by cmsmtp with ESMTPS id y5Nou9c6W9JM2yNpxuSlcD; Tue, 16 Sep 2025 05:02:41 +0000 Received: from spqr.komquats.com ([70.66.136.217]) by cmsmtp with ESMTPSA id yNpvulVfaWbOayNpwu0Hye; Tue, 16 Sep 2025 05:02:41 +0000 X-Auth-User: cschuber X-Authority-Analysis: v=2.4 cv=Q5lx4J2a c=1 sm=1 tr=0 ts=68c8ef71 a=h7br+8Ma+Xn9xscxy5znUg==:117 a=h7br+8Ma+Xn9xscxy5znUg==:17 a=kj9zAlcOel0A:10 a=yJojWOMRYYMA:10 a=6I5d2MoRAAAA:8 a=EkcXrb_YAAAA:8 a=YxBL1-UpAAAA:8 a=fTp3_WuIajQB4k7Q1AAA:9 a=CjuIK1q_8ugA:10 a=LK5xJRSDVpKd5WXXoEvA:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy.cwsent.com [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTP id 52190AD8; Mon, 15 Sep 2025 22:02:39 -0700 (PDT) Received: by slippy.cwsent.com (Postfix, from userid 1000) id 4BB672D5; Mon, 15 Sep 2025 22:02:39 -0700 (PDT) X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.8+dev Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Aymeric Wibo cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: e779891327b1 - main - sys/power: Sleep type reporting by PM backends In-reply-to: <202509142159.58ELx5Rg054606@gitrepo.freebsd.org> References: <202509142159.58ELx5Rg054606@gitrepo.freebsd.org> Comments: In-reply-to Aymeric Wibo message dated "Sun, 14 Sep 2025 21:59:05 +0000." List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Mon, 15 Sep 2025 22:02:39 -0700 Message-Id: <20250916050239.4BB672D5@slippy.cwsent.com> X-CMAE-Envelope: MS4xfK+v86YH25JgiBmnJZM/ykcfO0NU7dohbsHoY40X6MAoDK4/oocM5vOHQBGGUvLnZFZu/cnadLJqlXi6o+6Xn6iRV1Oy0PVESyou4UijJKVfCBK0fWKC PLwbsaCuwtq/CEForhLg3bdT8golrH+FgIrJrldts4vmxUt2CzcRL5GvlNFnhUO8wyVh8URbpy/h+QaNjNv2mYlErexI1mQT16TenJHloFsxq7/Xxu9Q54BC c6MJLS2fme2kgGxGW41AHv9gJCrjHvRXxvGhG2NlrJDzpR/pAQdhp7ro3y8o7DpYIC58A+ahDAQueuMU59Tay+oIsL3+dNlzYcBgPNh+cS8= X-Spamd-Bar: -- X-Spamd-Result: default: False [-2.87 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-0.99)[-0.993]; NEURAL_HAM_SHORT(-0.57)[-0.573]; MV_CASE(0.50)[]; RWL_MAILSPIKE_EXCELLENT(-0.40)[3.97.99.32:from]; R_SPF_ALLOW(-0.20)[+ip4:3.97.99.32/31]; RCVD_IN_DNSWL_LOW(-0.10)[3.97.99.32:from]; MIME_GOOD(-0.10)[text/plain]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; TO_DN_SOME(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:16509, ipnet:3.96.0.0/15, country:US]; DMARC_BAD_POLICY(0.00)[cschubert.com : p tag has invalid value: quarantine rua=mailto:p[ostmaster@cschubert.com]; HAS_REPLYTO(0.00)[Cy.Schubert@cschubert.com]; RCPT_COUNT_THREE(0.00)[4]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCVD_COUNT_THREE(0.00)[4]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-main@freebsd.org,dev-commits-src-all@freebsd.org]; RCVD_TLS_LAST(0.00)[]; R_DKIM_NA(0.00)[]; REPLYTO_EQ_FROM(0.00)[] X-Rspamd-Queue-Id: 4cQqXL1nv5z3P7V In message <202509142159.58ELx5Rg054606@gitrepo.freebsd.org>, Aymeric Wibo writ es: > The branch main has been updated by obiwac: > > URL: https://cgit.FreeBSD.org/src/commit/?id=e779891327b1d9b9ab10ba482e59f498 > 790505a7 > > commit e779891327b1d9b9ab10ba482e59f498790505a7 > Author: Aymeric Wibo > AuthorDate: 2025-09-14 21:58:13 +0000 > Commit: Aymeric Wibo > CommitDate: 2025-09-14 21:58:15 +0000 > > sys/power: Sleep type reporting by PM backends > > Allow PM backends to report supported sleep types when registering > through `power_pm_register`. Expose this information through > `kern.power.supported_stype` sysctl, and set defaults for > `power_standby/suspend/hibernate_stype` based on this. > > Implement this in ACPI PM backend. > > Reviewed by: mckusick (mentor), markj > Approved by: mckusick (mentor), markj > Sponsored by: The FreeBSD Foundation > Differential Revision: https://reviews.freebsd.org/D52044 > --- > sys/dev/acpica/acpi.c | 6 ++++-- > sys/kern/subr_power.c | 46 +++++++++++++++++++++++++++++++++++++++++----- > sys/sys/power.h | 3 ++- > 3 files changed, 47 insertions(+), 8 deletions(-) > > diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c > index 8dd879a573cc..702e1ecb5340 100644 > --- a/sys/dev/acpica/acpi.c > +++ b/sys/dev/acpica/acpi.c > @@ -734,7 +734,8 @@ acpi_attach(device_t dev) > goto out; > > /* Register ACPI again to pass the correct argument of pm_func. */ > - power_pm_register(POWER_PM_TYPE_ACPI, acpi_pm_func, sc); > + power_pm_register(POWER_PM_TYPE_ACPI, acpi_pm_func, sc, > + acpi_supported_stypes); > > acpi_platform_osc(dev); > > @@ -4776,7 +4777,8 @@ acpi_pm_register(void *arg) > if (!cold || resource_disabled("acpi", 0)) > return; > > - power_pm_register(POWER_PM_TYPE_ACPI, acpi_pm_func, NULL); > + power_pm_register(POWER_PM_TYPE_ACPI, acpi_pm_func, NULL, > + acpi_supported_stypes); > } > > SYSINIT(power, SI_SUB_KLD, SI_ORDER_ANY, acpi_pm_register, NULL); > diff --git a/sys/kern/subr_power.c b/sys/kern/subr_power.c > index eb5bd03f5018..44ad82860649 100644 > --- a/sys/kern/subr_power.c > +++ b/sys/kern/subr_power.c > @@ -39,13 +39,14 @@ > #include > #include > > -enum power_stype power_standby_stype = POWER_STYPE_STANDBY; > -enum power_stype power_suspend_stype = POWER_STYPE_SUSPEND_TO_IDLE; > -enum power_stype power_hibernate_stype = POWER_STYPE_HIBERNATE; > +enum power_stype power_standby_stype = POWER_STYPE_UNKNOWN; > +enum power_stype power_suspend_stype = POWER_STYPE_UNKNOWN; > +enum power_stype power_hibernate_stype = POWER_STYPE_UNKNOWN; > > static u_int power_pm_type = POWER_PM_TYPE_NONE; > static power_pm_fn_t power_pm_fn = NULL; > static void *power_pm_arg = NULL; > +static bool power_pm_supported[POWER_STYPE_COUNT] = {0}; > static struct task power_pm_task; > > enum power_stype > @@ -70,6 +71,26 @@ power_stype_to_name(enum power_stype stype) > return (power_stype_names[stype]); > } > > +static int > +sysctl_supported_stypes(SYSCTL_HANDLER_ARGS) > +{ > + int error; > + struct sbuf sb; > + enum power_stype stype; > + > + sbuf_new(&sb, NULL, 32, SBUF_AUTOEXTEND); > + for (stype = 0; stype < POWER_STYPE_COUNT; stype++) { > + if (power_pm_supported[stype]) > + sbuf_printf(&sb, "%s ", power_stype_to_name(stype)); > + } > + sbuf_trim(&sb); > + sbuf_finish(&sb); > + error = sysctl_handle_string(oidp, sbuf_data(&sb), sbuf_len(&sb), req); > + sbuf_delete(&sb); > + > + return (error); > +} > + > static int > power_sysctl_stype(SYSCTL_HANDLER_ARGS) > { > @@ -86,7 +107,8 @@ power_sysctl_stype(SYSCTL_HANDLER_ARGS) > new_stype = power_name_to_stype(name); > if (new_stype == POWER_STYPE_UNKNOWN) > return (EINVAL); > - /* TODO Check to see if the new stype is supported. */ > + if (!power_pm_supported[new_stype]) > + return (EOPNOTSUPP); > if (new_stype != old_stype) > *(enum power_stype *)oidp->oid_arg1 = new_stype; > return (0); > @@ -95,6 +117,9 @@ power_sysctl_stype(SYSCTL_HANDLER_ARGS) > static SYSCTL_NODE(_kern, OID_AUTO, power, CTLFLAG_RW, 0, > "Generic power management related sysctls"); > > +SYSCTL_PROC(_kern_power, OID_AUTO, supported_stype, > + CTLTYPE_STRING | CTLFLAG_RD, 0, 0, sysctl_supported_stypes, "A", > + "List supported sleep types"); > SYSCTL_PROC(_kern_power, OID_AUTO, standby, CTLTYPE_STRING | CTLFLAG_RW, > &power_standby_stype, 0, power_sysctl_stype, "A", > "Sleep type to enter on standby"); > @@ -114,7 +139,8 @@ power_pm_deferred_fn(void *arg, int pending) > } > > int > -power_pm_register(u_int pm_type, power_pm_fn_t pm_fn, void *pm_arg) > +power_pm_register(u_int pm_type, power_pm_fn_t pm_fn, void *pm_arg, > + bool pm_supported[static POWER_STYPE_COUNT]) > { > int error; > > @@ -123,6 +149,16 @@ power_pm_register(u_int pm_type, power_pm_fn_t pm_fn, vo > id *pm_arg) > power_pm_type = pm_type; > power_pm_fn = pm_fn; > power_pm_arg = pm_arg; > + memcpy(power_pm_supported, pm_supported, > + sizeof(power_pm_supported)); > + if (power_pm_supported[POWER_STYPE_STANDBY]) > + power_standby_stype = POWER_STYPE_STANDBY; > + if (power_pm_supported[POWER_STYPE_SUSPEND_TO_IDLE]) > + power_suspend_stype = POWER_STYPE_SUSPEND_TO_IDLE; > + else if (power_pm_supported[POWER_STYPE_SUSPEND_TO_MEM]) > + power_suspend_stype = POWER_STYPE_SUSPEND_TO_MEM; > + if (power_pm_supported[POWER_STYPE_HIBERNATE]) > + power_hibernate_stype = POWER_STYPE_HIBERNATE; > error = 0; > TASK_INIT(&power_pm_task, 0, power_pm_deferred_fn, NULL); > } else { > diff --git a/sys/sys/power.h b/sys/sys/power.h > index 44d7fc354423..33ace400bfd2 100644 > --- a/sys/sys/power.h > +++ b/sys/sys/power.h > @@ -91,7 +91,8 @@ extern const char *power_stype_to_name(enum power_stype _ > stype); > > typedef int (*power_pm_fn_t)(u_long _cmd, void* _arg, enum power_stype _styp > e); > extern int power_pm_register(u_int _pm_type, power_pm_fn_t _pm_fn, > - void *_pm_arg); > + void *_pm_arg, > + bool _pm_supported[static POWER_STYPE_COUNT]); > extern u_int power_pm_get_type(void); > extern void power_pm_suspend(int); > > One of this series of ACPI commits has broken power management on my machines. One of which managed to capture a dump from a kernel panic after poweroff(8) was issued. __curthread () at /opt/src/git-src/sys/amd64/include/pcpu_aux.h:57 57 __asm("movq %%gs:%c1,%0" : "=r" (td) (kgdb) #0 __curthread () at /opt/src/git-src/sys/amd64/include/pcpu_aux.h:57 td = #1 doadump (textdump=textdump@entry=1) at /opt/src/git-src/sys/kern/kern_shutdown.c:399 error = 0 coredump = #2 0xffffffff8070d320 in kern_reboot (howto=260) at /opt/src/git-src/sys/kern/kern_shutdown.c:519 once = 1 __pc = 0x0 #3 0xffffffff8070d857 in vpanic (fmt=0xffffffff80b8e00c "%s", ap=ap@entry=0xfffffe008a636960) at /opt/src/git-src/sys/kern/kern_shutdown.c:974 buf = "page fault", '\000' __pc = 0x0 __pc = 0x0 __pc = 0x0 other_cpus = {__bits = {14, 0 }} td = 0xfffff80006607000 bootopt = newpanic = #4 0xffffffff8070d683 in panic (fmt=) at /opt/src/git-src/sys/kern/kern_shutdown.c:887 ap = {{gp_offset = 16, fp_offset = 48, overflow_arg_area = 0xfffffe008a636990, reg_save_area = 0xfffffe008a636930}} #5 0xffffffff80aeb4bc in trap_fatal (frame=, eva=) at /opt/src/git-src/sys/amd64/amd64/trap.c:969 type = handled = #6 0xffffffff80aeb4bc in trap_pfault (frame=0xfffffe008a636a00, usermode=false, signo=, ucode=) __pc = 0x0 __pc = 0x0 __pc = 0x0 td = p = eva = 136 map = ftype = rv = #7 No locals. #8 device_get_softc (dev=dev@entry=0x0) at /opt/src/git-src/sys/kern/subr_bus.c:2141 No locals. #9 0xffffffff80429385 in acpi_wake_sleep_prep (handle=0xfffff80007706e00, stype=POWER_STYPE_POWEROFF) at /opt/src/git-src/sys/dev/acpica/acpi.c:3689 prw = {gpe_handle = 0x0, gpe_bit = 27, lowest_wake = 3, power_res = {{ Type = 0, Integer = {Type = 0, Value = 0}, String = {Type = 0, Length = 0, Pointer = 0x0}, Buffer = {Type = 0, Length = 0, Pointer = 0x0}, Package = {Type = 0, Count = 0, Elements = 0x0}, Reference = {Type = 0, ActualType = 0, Handle = 0x0}, Processor = {Type = 0, ProcId = 0, PblkAddress = 0, PblkLength = 87678488}, PowerResource = { Type = 0, SystemLevel = 0, ResourceOrder = 0}}, {Type = 369, Integer = {Type = 369, Value = 8}, String = {Type = 369, Length = 0, Pointer = 0x8 }, Buffer = {Type = 369, Length = 0, Pointer = 0x8 }, Buffer = {Type = 369, Length = 0, Pointer = 0x8 }, Package = {Type = 369, Count = 0, Elements = 0x8}, Reference = { Type = 369, ActualType = 0, Handle = 0x8}, Processor = { Type = 369, ProcId = 0, PblkAddress = 8, PblkLength = 0}, PowerResource = {Type = 369, SystemLevel = 0, ResourceOrder = 8}}, {Type = 2159484735, Integer = { Type = 2159484735, Value = 0}, String = {Type = 2159484735, Length = 4294967295, Pointer = 0x0}, Buffer = { Type = 2159484735, Length = 4294967295, Pointer = 0x0}, Package = {Type = 2159484735, Count = 4294967295, Elements = 0x0}, Reference = {Type = 2159484735, ActualType = 4294967295, Handle = 0x0}, Processor = { Type = 2159484735, ProcId = 4294967295, PblkAddress = 0, PblkLength = 87678488}, PowerResource = {Type = 2159484735, SystemLevel = 4294967295, ResourceOrder = 0}}, {Type = 458, Integer = {Type = 458, Value = 8}, String = {Type = 458, Length = 0, Pointer = 0x8 }, Buffer = {Type = 458, Length = 0, Pointer = 0x8 }, Package = {Type = 458, Count = 0, Elements = 0x8}, Reference = { Type = 458, ActualType = 0, Handle = 0x8}, Processor = { Type = 458, ProcId = 0, PblkAddress = 8, PblkLength = 0}, PowerResource = {Type = 458, SystemLevel = 0, ResourceOrder = 8}}, {Type = 2159484735, Integer = { Type = 2159484735, Value = 18446741877008067488}, String = { Type = 2159484735, Length = 4294967295, Pointer = 0xfffffe008a636ba0 "\300kc\212"}, Buffer = { Type = 2159484735, Length = 4294967295, Pointer = 0xfffffe008a636ba0 "\300kc\212"}, Package = { Type = 2159484735, Count = 4294967295, Elements = 0xfffffe008a636ba0}, Reference = { Type = 2159484735, ActualType = 4294967295, Handle = 0xfffffe008a636ba0}, Processor = {Type = 2159484735, ProcId = 4294967295, PblkAddress = 18446741877008067488, PblkLength = 2154715683}, PowerResource = {Type = 2159484735, SystemLevel = 4294967295, ResourceOrder = 2321771424}}, { Type = 87678488, Integer = {Type = 87678488, Value = 18446735277723512832}, String = {Type = 87678488, Length = 4294965248, Pointer = 0xfffff80006607000 "\300\321G\204\377\377\377\377\020 "}, Buffer = {Type = 87678488, Length = 4294965248, Pointer = 0xfffff80006607000 "\300\321G\204\377\377\377\377\020 "}, Package = {Type = 87678488, Count = 4294965248, Elements = 0xfffff80006607000}, Reference = {Type = 87678488, ActualType = 4294965248, Handle = 0xfffff80006607000}, Processor = {Type = 87678488, ProcId = 4294965248, PblkAddress = 18446735277723512832, PblkLength = 87678464}, PowerResource = {Type = 87678488, SystemLevel = 4294965248, ResourceOrder = 106983424}}, {Type = 663, Integer = { Type = 663, Value = 18446735277704207896}, String = { Type = 663, Length = 0, Pointer = 0xfffff8000539de18 ""}, Buffer = {Type = 663, Length = 0, Pointer = 0xfffff8000539de18 ""}, Package = {Type = 663, Count = 0, Elements = 0xfffff8000539de18}, Reference = { Type = 663, ActualType = 0, Handle = 0xfffff8000539de18}, Processor = {Type = 663, ProcId = 0, PblkAddress = 18446735277704207896, PblkLength = 2165581152}, PowerResource = {Type = 663, SystemLevel = 0, ResourceOrder = 87678488}}, {Type = 87678464, Integer = { Type = 87678464, Value = 8}, String = {Type = 87678464, Length = 4294965248, Pointer = 0x8 }, Buffer = {Type = 87678464, Length = 4294965248, Pointer = 0x8 }, Package = {Type = 87678464, Count = 4294965248, Elements = 0x8}, Reference = {Type = 87678464, ActualType = 4294965248, Handle = 0x8}, Processor = {Type = 87678464, ProcId = 4294965248, PblkAddress = 8, PblkLength = 2321771456}, PowerResource = {Type = 87678464, SystemLevel = 4294965248, ResourceOrder = 8}}}, power_res_count = 0} dev = 0x0 sc = sstate = #10 acpi_wake_prep (handle=0xfffff80007706e00, level=, context=, status=) at /opt/src/git-src/sys/dev/acpica/acpi.c:3764 stype = POWER_STYPE_POWEROFF #11 0xffffffff803756db in AcpiNsWalkNamespace (Type=Type@entry=6, StartNode=, StartNode@entry=0xfffff800050b3880, MaxDepth=MaxDepth@entry=100, Flags=Flags@entry=1, DescendingCallback=DescendingCallback@entry=0xffffffff80429320 , AscendingCallback=AscendingCallbac k@entry=0x0, Context=0xfffffe008a636ce4, ReturnValue=0x0) at /opt/src/git-src/sys/contrib/dev/acpica/components/namespace/nswalk.c:484 NodePreviouslyVisited = 0 '\000' ParentNode = 0xfffff800050b14c0 ChildNode = 0xfffff80007706e00 ChildType = 6 Level = 2 Status = 0 MutexStatus = #12 0xffffffff80375c45 in AcpiWalkNamespace (Type=Type@entry=6, StartObject=0xfffff800050b3880, MaxDepth=MaxDepth@entry=100, DescendingCallback=0xffffffff80429320 , AscendingCallback=AscendingCallback@entry=0x0, Context=Context@entry=0xfffffe008a636ce4, ReturnValue=) at /opt/src/git-src/sys/contrib/dev/acpica/components/namespace/nsxfeval.c:809 Status = 0 #13 0xffffffff80426384 in acpi_wake_prep_walk (stype=POWER_STYPE_POWEROFF) at /opt/src/git-src/sys/dev/acpica/acpi.c:3777 sb_handle = 0xfffff800050b3880 #14 acpi_shutdown (dev=0xfffff80007716e00) at /opt/src/git-src/sys/dev/acpica/acpi.c:878 No locals. #15 0xffffffff8074c706 in DEVICE_SHUTDOWN (dev=0xfffff80007716e00) at ./device_if.h:262 rc = _m = _cep = _ce = _desc = #16 device_shutdown (dev=0xfffff80007716e00) at /opt/src/git-src/sys/kern/subr_bus.c:2753 No locals. #17 bus_generic_shutdown (dev=) at /opt/src/git-src/sys/kern/subr_bus.c:3563 child = #18 0xffffffff8074c706 in DEVICE_SHUTDOWN (dev=0xfffff800051b8200) at ./device_if.h:262 rc = _m = _cep = _ce = #16 device_shutdown (dev=0xfffff80007716e00) at /opt/src/git-src/sys/kern/subr_bus.c:2753 No locals. #17 bus_generic_shutdown (dev=) at /opt/src/git-src/sys/kern/subr_bus.c:3563 child = #18 0xffffffff8074c706 in DEVICE_SHUTDOWN (dev=0xfffff800051b8200) at ./device_if.h:262 rc = _m = _cep = _ce = _desc = #19 device_shutdown (dev=0xfffff800051b8200) at /opt/src/git-src/sys/kern/subr_bus.c:2753 No locals. #20 bus_generic_shutdown (dev=) at /opt/src/git-src/sys/kern/subr_bus.c:3563 child = #21 0xffffffff80750d06 in DEVICE_SHUTDOWN (dev=0xfffff800051b8500) at ./device_if.h:262 rc = _m = _cep = _ce = _desc = #22 device_shutdown (dev=0xfffff800051b8500) at /opt/src/git-src/sys/kern/subr_bus.c:2753 No locals. #23 root_bus_module_handler (mod=, what=, arg=) at /opt/src/git-src/sys/kern/subr_bus.c:5211 No locals. #24 0xffffffff806e534b in module_shutdown (arg1=, arg2=) at /opt/src/git-src/sys/kern/kern_module.c:101 mod = 0xfffff800051d3b00 #25 0xffffffff8070d3d3 in kern_reboot (howto=16392) at /opt/src/git-src/sys/kern/kern_shutdown.c:527 _ep = _t = 0xfffff800050e9f40 _el = 0xfffff800050e4600 once = 1 __pc = 0x0 #26 0xffffffff8070cd9c in sys_reboot (td=0xfffff80006607000, uap=0xfffff80006607428) at /opt/src/git-src/sys/kern/kern_shutdown.c:308 error = 5 #27 0xffffffff80aebe69 in syscallenter (td=0xfffff80006607000) at /opt/src/git-src/sys/amd64/amd64/../../kern/subr_syscall.c:193 se = 0xffffffff81054310 p = 0xfffffe0081002010 sa = 0xfffff80006607418 error = sy_thr_static = true traced = _audit_entered = #28 amd64_syscall (td=0xfffff80006607000, traced=0) at /opt/src/git-src/sys/amd64/amd64/trap.c:1208 ksi = {ksi_link = {tqe_next = 0xfffffe008a636f30, tqe_prev = 0xffffffff80aeae4d }, ksi_info = { si_signo = -1973195040, si_errno = -512, si_code = -2139594896, si_pid = -1, si_uid = 25088, si_status = -2047, si_addr = 0x800000000000, si_value = {sival_int = -860430388, sival_ptr = 0x326493c1ccb6dfcc, sigval_int = -860430388, sigval_ptr = 0x326493c1ccb6dfcc}, _reason = {_fault = { _trapno = 3}, _timer = {_timerid = 3, _overrun = 0}, _mesgq = { _mqd = 3}, _poll = {_band = 3}, _capsicum = {_syscall = 3}, __spare__ = {__spare1__ = 3, __spare2__ = {106984784, -2048, -1973194752, -512, -2126868952, -1, 106983424}}}}, ksi_flags = -2130704888, ksi_sigq = 0x7} #29 No locals. #30 0x000000000028bb1a in ?? () -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org e**(i*pi)+1=0 From nobody Tue Sep 16 06:57:08 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cQt4N2KMkz68Rd8; Tue, 16 Sep 2025 06:57:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cQt4N183vz3YTM; Tue, 16 Sep 2025 06:57:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758005828; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EsiL77LZTTko3dsxzrTqEiMeqZlXIAz4Qc2RgPtOHgk=; b=Mqz+dLVEaIBXVvYOxKTCj/MiygAj6P3K1GIgPmrhDXD9OfNurU/o2hqCgL/BTkzDh2b4HJ Md3+LREHX8td/iZByEYQadFW9R1s4h3U3wDtGrMkWnANMlpFd+tMQBgSU29nP+EYoMKINy fqDR8iUs6gvRWtGfXWQyUBJZbpnJ26X5fktcrxis7es7WRceIQSgsNA2VngaNxengwvPAd vzxw7ka8hrAPHOvn1D3obFi6zPA9k50bk+g/ixjAjimwY4RoOrnOHikZANFTBpoU77S7pm vho/Ln/5SBE3fAdrW3BVPR5W0tr63F6V+cHv0qgwlLQMjvwRPVYg2gHUNGdFQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758005828; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EsiL77LZTTko3dsxzrTqEiMeqZlXIAz4Qc2RgPtOHgk=; b=BixuvDkyGZInoHyrcGUqsCEItpm7R4Qjru1M2ZmNJ8sMuU4RjMcXP3QALJ6hD5Y/3qL60K X8g1qO9QpSP/4y5qSJ2z8uSm10du8GLudLk61I1O0OobneZJztmRtTB/0Ntch/ITvbLRGO ACNjh46MQiiweT8+hc2047gvnTdDKBqdlIxwdXxedZc/Q3PcRsbmR3LPeyFIbBWSTNLk6Q ndXcmEGWbTdqyKvQwsXzKzOdsMb2LL3J11DY6O7I7F9d3LGcCEIdNDd130lzHoap4EGPCJ XjXb0BGiH2kF19xqOwG5ov/7aZyP+Ba9CvsHxyCPcGvHuSTlNNlxTFThQBsUqw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758005828; a=rsa-sha256; cv=none; b=Bg2vS19j6qMT62HiMoNhJs378Thx/+d1U6w9+SjSYah5FYH7GWLCwcS4bTY7vgsfFNwbT5 b4K7w0QsHHOZAcIZMyJmdIHl0LpkiXZQyPf3WV6DYIHcHd5ZS4CZ9biNOStUzGDxJ0CAoA WS2s6jag1XbhKgvEXSMnxq8J0UirDxYtbs/AObE0M+b9Ozagk+Nl4UPHh2jtRZwZXbRbDj eTB1vao7DcI1RUkiW0Xfg3489W2gV+Vqg/Rr3NP/Z/EFU+aB7KVAJL8RL4dr+7mQTtTnH7 WuBc+y6a8q1pEaFDF4gsKOdro4p/hrvQ2wqelEAMMfucpqOuVoMs5iGACOHAXw== 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 4cQt4N0fYQzTyc; Tue, 16 Sep 2025 06:57:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58G6v8dJ070908; Tue, 16 Sep 2025 06:57:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58G6v843070905; Tue, 16 Sep 2025 06:57:08 GMT (envelope-from git) Date: Tue, 16 Sep 2025 06:57:08 GMT Message-Id: <202509160657.58G6v843070905@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Corvin =?utf-8?Q?K=C3=B6hne?= Subject: git: effcd0ded0ef - main - bhyve: assign a valid INTPIN to NVIDIA GPUs List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: corvink X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: effcd0ded0ef1c92bef29c1e9bbf517c97bb45b8 Auto-Submitted: auto-generated The branch main has been updated by corvink: URL: https://cgit.FreeBSD.org/src/commit/?id=effcd0ded0ef1c92bef29c1e9bbf517c97bb45b8 commit effcd0ded0ef1c92bef29c1e9bbf517c97bb45b8 Author: Corvin Köhne AuthorDate: 2022-03-17 12:11:14 +0000 Commit: Corvin Köhne CommitDate: 2025-09-16 06:55:09 +0000 bhyve: assign a valid INTPIN to NVIDIA GPUs When passing an NVIDIA GPU to a Linux VM, the GPU driver refuses to work and complains about a missing IRQ: [ 77.208984] NVRM: Can't find an IRQ for your NVIDIA card! [ 77.212697] NVRM: Please check your BIOS settings. [ 77.212699] NVRM: [Plug & Play OS] should be set to NO [ 77.212700] NVRM: [Assign IRQ to VGA] should be set to YES [ 77.212702] nvidia: probe of 0000:00:07.0 failed with error -1 By setting a valid INTPIN in the PCI config space those error messages disappear. Additionally, tools like nvidia-smi are able to detect the GPU and the GPU driver seems to work properly. Note that bhyve still doesn't support legacy interrupts. So, the guest shouldn't try to use it even though we're assigning an INTPIN. Reviewed by: jhb Tested by: chuck MFC after: 1 week Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D51892 --- usr.sbin/bhyve/amd64/Makefile.inc | 1 + usr.sbin/bhyve/pci_passthru_quirks.c | 48 ++++++++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+) diff --git a/usr.sbin/bhyve/amd64/Makefile.inc b/usr.sbin/bhyve/amd64/Makefile.inc index 92e53433ff01..50a011ed4bfd 100644 --- a/usr.sbin/bhyve/amd64/Makefile.inc +++ b/usr.sbin/bhyve/amd64/Makefile.inc @@ -13,6 +13,7 @@ SRCS+= \ pci_gvt-d.c \ pci_lpc.c \ pci_passthru.c \ + pci_passthru_quirks.c \ pctestdev.c \ pm.c \ post.c \ diff --git a/usr.sbin/bhyve/pci_passthru_quirks.c b/usr.sbin/bhyve/pci_passthru_quirks.c new file mode 100644 index 000000000000..5ba0e674f311 --- /dev/null +++ b/usr.sbin/bhyve/pci_passthru_quirks.c @@ -0,0 +1,48 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2025 Beckhoff Automation GmbH & Co. KG + * Author: Corvin Köhne + */ + +#include + +#include + +#include "pci_passthru.h" + +#define PCI_VENDOR_NVIDIA 0x10DE + +static int +nvidia_gpu_probe(struct pci_devinst *const pi) +{ + struct passthru_softc *sc; + uint16_t vendor; + uint8_t class; + + sc = pi->pi_arg; + + vendor = pci_host_read_config(passthru_get_sel(sc), PCIR_VENDOR, 0x02); + if (vendor != PCI_VENDOR_NVIDIA) + return (ENXIO); + + class = pci_host_read_config(passthru_get_sel(sc), PCIR_CLASS, 0x01); + if (class != PCIC_DISPLAY) + return (ENXIO); + + return (0); +} + +static int +nvidia_gpu_init(struct pci_devinst *const pi, nvlist_t *const nvl __unused) +{ + pci_set_cfgdata8(pi, PCIR_INTPIN, 1); + + return (0); +} + +static struct passthru_dev nvidia_gpu = { + .probe = nvidia_gpu_probe, + .init = nvidia_gpu_init, +}; +PASSTHRU_DEV_SET(nvidia_gpu); From nobody Tue Sep 16 07:39:04 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cQv0m4C7tz68VP7; Tue, 16 Sep 2025 07:39:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cQv0m3JzNz3cFN; Tue, 16 Sep 2025 07:39:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758008344; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7R3LsFnlCyrNUYTVSnpjU5vf9teRwx0sS0Vt1BHfSlY=; b=E1d9G20SkaOXyG3VqmJ71ahNwMJeDcPglV72VDCd+qr/p9SHXN6p8JZEmsxLEMAUNLfDeA TOld6Ufr8JryP7Bc5f7Znp72Jzb1CkLeJbfP3+T4vqyUi7DofD9JqtXmxbLpgwkTBjw+ve fHlNMGoHdFaEXG8KxuoN+JrAO7vgWrpWYMCbyvFKi6eozOHADCpgrhgMdMRONEcLsb46wu DHP4Tdh2tN3A2+0b3pRF9S/Q9Xmlen6QVdYy+a+Y8s8XVeCVSBr7rxGuVn/Ef5+UK8fGn8 wJn2m6LsGDMjd+dSQr70IYjHkgU9KFW6IfRITOLmyESclWA5o1pdUcDZyk0Wyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758008344; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7R3LsFnlCyrNUYTVSnpjU5vf9teRwx0sS0Vt1BHfSlY=; b=odeE+KSsIZ8f8Tvnz2DrC6+pJPoSFCNfCQZ99fnrIk6IMrMhroFYys7reQU+Fi+2Z1+Mrj 4t1LnouNWGckf9skTwGVRAsnn07PMAx/W8wM/RuSUjs9RKUlcSfb3U6jXyeL7aJDNqgP2z ISf5eCznLHgS+NXB0kmVlc5o61DENIDgDJXnMqjdKYE4FQJLbChr+ds1zY3SKxcg8CCkQv 4GErVNq4izCzvgbhB7P8/fQlDZ5aH8yGdNnIUjkIamlXOteWmjPgEBtBa5nzZaUAfptsVk i8JIJlZTaXjDLRYhKIsvgjB5y9IQPVEhFk/NP4MZykhQI/aQk41FNZAo5FD5mw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758008344; a=rsa-sha256; cv=none; b=i48hmM2+w4srt7oEyCr87txsc2oSzRN9OkEWwDTDXhWxyQDEnQXCsNHSLhDRL5yLC2CnO+ T9CKr9fKMcd4jWjW4Lh9s9qMK+0M2DphAik2MuPnZe32K6tqU8AbHbMNm+y3LFjjaRHwje Al3UMRz3KO1pqAjrla6oUI10LmSW+fuR4CQM02vG+2yvFwXemNiK3Ub+Cw9XxxGy39PxKN bobGygDrcY+riLvF9w/x+/sXuB3ChAhUxnxSgF/VYG22iR7FeAgGTX/usAdA9FyKlL/cje qfl30f+AgnwLwzjVyg+B/W1k1z41WbCvKC7kyuBMpYcd64aodhNqXJ8VXyGtog== 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 4cQv0m2jCPzXGq; Tue, 16 Sep 2025 07:39: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 58G7d4C7047491; Tue, 16 Sep 2025 07:39:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58G7d4gr047488; Tue, 16 Sep 2025 07:39:04 GMT (envelope-from git) Date: Tue, 16 Sep 2025 07:39:04 GMT Message-Id: <202509160739.58G7d4gr047488@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Andrey V. Elsukov" Subject: git: 588a5fad3e8b - main - IPv6: fix off-by-one in pltime and vltime expiration checks List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ae X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 588a5fad3e8b98955b60707e3e92b8b43566e3f7 Auto-Submitted: auto-generated The branch main has been updated by ae: URL: https://cgit.FreeBSD.org/src/commit/?id=588a5fad3e8b98955b60707e3e92b8b43566e3f7 commit 588a5fad3e8b98955b60707e3e92b8b43566e3f7 Author: Andrey V. Elsukov AuthorDate: 2025-09-16 07:34:55 +0000 Commit: Andrey V. Elsukov CommitDate: 2025-09-16 07:34:55 +0000 IPv6: fix off-by-one in pltime and vltime expiration checks Previously, the macros used '>' instead of '>=' when comparing elapsed time against the preferred and valid lifetimes. This caused any deprecated address to become usable again for one extra second after receiving each Router Advertisement. In that short window, the address could be selected as a source for outgoing connections. Update the checks to use '>=' so that addresses are deprecated or invalid when their lifetime expires. PR: 289177 Reported by: Dmitry Nexus Reviewed by: zlei Submitted by: Marek Zarychta MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D52323 --- sys/netinet6/in6.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/netinet6/in6.h b/sys/netinet6/in6.h index 1ca846ebf514..67c3ccbb1be8 100644 --- a/sys/netinet6/in6.h +++ b/sys/netinet6/in6.h @@ -358,11 +358,11 @@ extern const struct in6_addr in6addr_linklocal_allv2routers; #define IFA6_IS_DEPRECATED(a) \ ((a)->ia6_lifetime.ia6t_pltime != ND6_INFINITE_LIFETIME && \ - (u_int32_t)((time_uptime - (a)->ia6_updatetime)) > \ + (u_int32_t)((time_uptime - (a)->ia6_updatetime)) >= \ (a)->ia6_lifetime.ia6t_pltime) #define IFA6_IS_INVALID(a) \ ((a)->ia6_lifetime.ia6t_vltime != ND6_INFINITE_LIFETIME && \ - (u_int32_t)((time_uptime - (a)->ia6_updatetime)) > \ + (u_int32_t)((time_uptime - (a)->ia6_updatetime)) >= \ (a)->ia6_lifetime.ia6t_vltime) #endif /* _KERNEL */ From nobody Tue Sep 16 09:21:31 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cQxH01FSQz68dTf; Tue, 16 Sep 2025 09:21: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 4cQxH00dJpz3pl2; Tue, 16 Sep 2025 09:21:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758014492; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MXo2hI+zyCmX5GqBQHo0yWktc1mhm6Bj4J0HE8UpoFw=; b=R/JWqkT6Im/9y0amUHJn9QBlzVbq5fA7Uj2f5FtUN7R4sieoyQ9YBUjJ2yjzaoC9GvlK8x UNLIFuyXEpYpnaUxc5f0uMmUEIe4qi8PDgPSm3PBCE5pC+xJ+15v54lt4r2HzO7oCqQb4F jM5u7At3XgWRiuDTcgudf8ItJnq0hxbB/K5qDShyg0Eo1KFcCgINKFKeaHfM3l/WjSkTKF AJQuvzOGfVrmCF5ZkX2NKeWvX5h2AnTSoSgQBovNS2Tgimevq1e7k2c3cE2zS86RdQDjg6 di93QhbfSgqYTDljn7F18YM2Khn1zGnNV3EfmGPh/nUj3n7470cz84blUfz7zQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758014492; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MXo2hI+zyCmX5GqBQHo0yWktc1mhm6Bj4J0HE8UpoFw=; b=dxajms3SsQe7kofEmJCXvT8Ms6uriWXwGLbEjBSEXXXEBRPtEBV5Upq0jmxYTD0o31tplW nRnuNoOkFpmfNvJVWdvrKe3Dzu4ME/g3OYfHgGVc5ZoCXmMK8kB5Fs+w9rBU9PWOI40omI 3N+cSJLmqCU4TQAmfGKS7zBfWAWvHWxSEVjEaD29bOYQsDr7X/C2rb3sNE4q7Xyv4uB/QG KurOArwdVXDPnMiFADhmh5+Z0ggVAGlRBoTCIpWmkbE8V9bIzAv/RoKLdekYwdQItUFzzs Jmss+3ITVNF4RgjGOVDI7IzCIQWtrPbzxOdWv5A3n+5NwSN9cj7ORlpn8MSM2w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758014492; a=rsa-sha256; cv=none; b=n1RwmS3KbVGEs7XdyfUzBXxu17bWiUtYAQfyAdCKleAMkkKh0dYBqx8VvCdpyG8VV3g5JU dYIG/oF0w/Rb3yX35yVen2qxsG+6IVoZrYrO5Gd7nd3tXQk1GMwDN0hrV9MKUkRUQbarzK 3G8+5wDJH4O3D9jHhsKuFvs/TwlmmnvSdt2HRbaYQ56GqCpj3bMHnf4CBh5H4n/Vg9ARaa l+prxPSNibVKzLa0wc8ENXeYZw/btwhjq34M3hQDiE9EE4/Hqg0cLk5/+WXpCPg0OFXgfB wzVioIdnhRch3MaJoPo/4bz6tgprUQaKSXJrSTrKagpDBBL+6iLy5uD5xJuaVg== 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 4cQxH00CzczbR9; Tue, 16 Sep 2025 09:21: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 58G9LVAd045195; Tue, 16 Sep 2025 09:21:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58G9LVUr045192; Tue, 16 Sep 2025 09:21:31 GMT (envelope-from git) Date: Tue, 16 Sep 2025 09:21:31 GMT Message-Id: <202509160921.58G9LVUr045192@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Peter Holm Subject: git: 8af56f7e08c5 - main - stress2: Fix how the reproducer is run. Lingering threads seen before List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pho X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8af56f7e08c54e8a79054fe0bf65eb6e50a09231 Auto-Submitted: auto-generated The branch main has been updated by pho: URL: https://cgit.FreeBSD.org/src/commit/?id=8af56f7e08c54e8a79054fe0bf65eb6e50a09231 commit 8af56f7e08c54e8a79054fe0bf65eb6e50a09231 Author: Peter Holm AuthorDate: 2025-09-16 09:18:20 +0000 Commit: Peter Holm CommitDate: 2025-09-16 09:18:20 +0000 stress2: Fix how the reproducer is run. Lingering threads seen before --- tools/test/stress2/misc/syzkaller61.sh | 26 ++++++++------------------ 1 file changed, 8 insertions(+), 18 deletions(-) diff --git a/tools/test/stress2/misc/syzkaller61.sh b/tools/test/stress2/misc/syzkaller61.sh index a25ae4cf00d8..d07f12b05b1a 100755 --- a/tools/test/stress2/misc/syzkaller61.sh +++ b/tools/test/stress2/misc/syzkaller61.sh @@ -1,15 +1,7 @@ #!/bin/sh -# Seen: -# [root@mercat1 /usr/src/tools/test/stress2/misc]# pgrep syzkaller61 | xargs procstat -k -# PID TID COMM TDNAME KSTACK -# 13332 106396 syzkaller61 - mi_switch thread_suspend_check ast_suspend ast_handler ast doreti_ast -# 13332 560662 syzkaller61 - mi_switch sleepq_switch sleepq_catch_signals sleepq_wait_sig _sleep umtxq_sleep do_wait __umtx_op_wait_uint_private sys__umtx_op amd64_syscall fast_syscall_common -# 13332 560776 syzkaller61 - mi_switch thread_suspend_switch thread_single fork1 sys_rfork amd64_syscall fast_syscall_common -# 13662 356440 syzkaller61 - mi_switch thread_suspend_check ast_suspend ast_handler ast doreti_ast -# 13662 561098 syzkaller61 - mi_switch sleepq_switch sleepq_catch_signals sleepq_wait_sig _sleep umtxq_sleep do_wait __umtx_op_wait_uint_private sys__umtx_op amd64_syscall fast_syscall_common -# 13662 561160 syzkaller61 - mi_switch thread_suspend_switch thread_single fork1 sys_rfork amd64_syscall fast_syscall_common -# [root@mercat1 /usr/src/tools/test/stress2/misc]# +# "panic: inconsistent boundary count 2" seen. +# Fixed by: 8321d0da2ce2 - main - kern/kern_thread.c: improve assert in thread_single_end() [ `uname -p` != "amd64" ] && exit 0 @@ -276,7 +268,7 @@ void execute_call(int call) { switch (call) { case 0: - NONFAILING(*(uint32_t*)0x20001f00 = 0x16); + NONFAILING(*(uint32_t*)0x20001f00 = 0x16); /* SIGTTOU */ NONFAILING(*(uint32_t*)0x20001f04 = 0); NONFAILING(*(uint32_t*)0x20001f08 = 0); NONFAILING(*(uint32_t*)0x20001f0c = 0); @@ -302,18 +294,16 @@ mycc -o /tmp/syzkaller61 -Wall -Wextra -O0 /tmp/syzkaller61.c -lpthread || (cd ../testcases/swap; ./swap -t 3m -i 10 -l 100 > /dev/null 2>&1) & for i in `jot 300`; do - (cd /tmp; timeout -k 3s 2s ./syzkaller61) & + (cd /tmp; su -m $testuser -c ./syzkaller61) & pids="$pids $!" done sleep 5 -pkill -9 syzkaller61 swap; sleep 1 -pgrep -q syzkaller61 && { pgrep syzkaller61 | xargs ps -lHp; exit 1; } -for pid in $pids; do - wait $pid -done +kill -9 $pids +wait $pids +while pkill -9 syzkaller61; do :; done while pkill swap; do :; done wait rm -rf /tmp/syzkaller61 /tmp/syzkaller61.c /tmp/syzkaller61.core \ /tmp/syzkaller.?????? -exit 0 +exit 0 From nobody Tue Sep 16 09:21:33 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cQxH12NQrz68dcg; Tue, 16 Sep 2025 09:21: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 4cQxH11rqbz3pT0; Tue, 16 Sep 2025 09:21:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758014493; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=G6XTEwlIYcBL7C/hWJznqhTYaxbyYih/Gw1d+kP9Yps=; b=u5UNXimRWYS6HOQMxRCLZ5X1nl7dFlEHYXueVCqWGe6qZm8ZYPR6DdhbHMIAqUKPgXVzkr 0RpfjXSScJi7Map00osqtzOZqoagxIsiVKptLbEKDtNx5OFyiPTwq57kDbU8WcnK9AdO0n 5WihwEnDkJBX5R7/oquYlMishP2GRFavEtX8FUMnMvTCt/u4AfNS03zsHUmdIa0Cyf/7v/ NZR1REjHMCCwernCrT1ipjj+m1pNJpiMocBWLS729qL4I5GCAJUVQkurUNUz6zHZgpQy// +8brkKJfFCF4TF3lMQTMIRD3FK4J9S6EziZrwfiBgDcp+ItQRE8/gKz2Or/VTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758014493; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=G6XTEwlIYcBL7C/hWJznqhTYaxbyYih/Gw1d+kP9Yps=; b=I6HDwTmYZNuELGSQfmkzPdXrdCaHtsIq+hjrGxDkW2u99rTYIeIRxMoaC/CGbf73o1flFH eZtcjChRXMjENbYZvI6S3xEM6kgqccVFF75gx9HQnU8z9LuRfpfXsQ9bYbVQBc6/ejOq06 4/5Vi1Qixz8pgxXNaQ6WLWlH+vCCL5UXRJZi6EwCkyAIOz4AtpNIUoGmIGKfgMl1Z1x2q0 ThzsdwpkUh3oNo6FEy0sbI/5FQWEGscGNGIpAVcfrnyU+vJHTk51gUxsQ7ki40NQQ38OEJ HHGOdenO9Qu92mF2Jc1ejrx7YoambgrEicv84HmKtzsSXQaeb50027/Dnev7XQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758014493; a=rsa-sha256; cv=none; b=gJl4RqD+fGJ1ZYHu8uzg+YswoUs83G1+LFPl43cpGFfd/gyDzAwP/VwzxMLY4GoVbhL60G a+HEhxWsvIJawl1fLmByQ9XTF9l7A0Rv71wc04ayRQNXviJ4eQVAf6TGvoTkLjG9IczuCl 3PqvZbBXbI/NxAwwWH/tO8n0+YnsKgF0kBwSUF0TiB8E0jBfisr2tOIk+Nav7ypnCORP1l gvXobRW1aYtNkUvIoFp/hqBvzEbzcbyiPbbXmTWpG5mCFn/N4t4Rj+ZubtrPnEkQWpTnVl +GY5WDYJBSm2DoabAqHz2Lmzy1gotwvUn88sy5VWE1OZvTji9njz9blcusDUyg== 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 4cQxH11RJjzbRB; Tue, 16 Sep 2025 09:21: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 58G9LXr2045230; Tue, 16 Sep 2025 09:21:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58G9LXoI045227; Tue, 16 Sep 2025 09:21:33 GMT (envelope-from git) Date: Tue, 16 Sep 2025 09:21:33 GMT Message-Id: <202509160921.58G9LXoI045227@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Peter Holm Subject: git: da20d88599d5 - main - stress2: Added two new fdescfs test scenarios List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pho X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: da20d88599d52667c9cd422632302cf5e2e19938 Auto-Submitted: auto-generated The branch main has been updated by pho: URL: https://cgit.FreeBSD.org/src/commit/?id=da20d88599d52667c9cd422632302cf5e2e19938 commit da20d88599d52667c9cd422632302cf5e2e19938 Author: Peter Holm AuthorDate: 2025-09-16 09:21:04 +0000 Commit: Peter Holm CommitDate: 2025-09-16 09:21:04 +0000 stress2: Added two new fdescfs test scenarios --- tools/test/stress2/misc/fdescfs2.sh | 44 ++++++++++++++++++++++++++++++++ tools/test/stress2/misc/fdescfs3.sh | 51 +++++++++++++++++++++++++++++++++++++ 2 files changed, 95 insertions(+) diff --git a/tools/test/stress2/misc/fdescfs2.sh b/tools/test/stress2/misc/fdescfs2.sh new file mode 100755 index 000000000000..21b82dcddd5e --- /dev/null +++ b/tools/test/stress2/misc/fdescfs2.sh @@ -0,0 +1,44 @@ +#!/bin/sh + +# +# Copyright (c) 2025 Peter Holm +# +# SPDX-License-Identifier: BSD-2-Clause +# + +# Test scenario description by: Kyle Evans + +# "panic: mtx_lock() of destroyed mutex 0xffffffff83717540 @ /usr/src/sys/fs/fdescfs/fdesc_vnops.c:151" seen + +[ `id -u ` -ne 0 ] && echo "Must be root!" && exit 1 +. ../default.cfg + +set -u + +kldstat | grep -q fdescfs.ko && { kldunload fdescfs.ko && wasloaded=1; } +while true; do + mount | grep -q "on $mntpoint " || + mount -t fdescfs dummy $mntpoint || continue + ls $mntpoint > /dev/null + if mount | grep -q "on $mntpoint "; then + if ! umount $mntpoint; then + umount -f $mntpoint || break + fi + fi +done > /dev/null 2>&1 & + +start=`date +%s` +while [ $((`date +%s` - start)) -lt 10 ]; do + kldstat | grep -q fdescfs.ko && + kldunload fdescfs.ko 2>/dev/null + sleep .1 + kldstat | grep -q fdescfs.ko || + kldload fdescfs.ko +done +kill %1 +wait +mount | grep -q "on $mntpoint " && umount $mntpoint +sleep .1 +set +u +[ $wasloaded ] || kldunload fdescfs.ko +exit 0 diff --git a/tools/test/stress2/misc/fdescfs3.sh b/tools/test/stress2/misc/fdescfs3.sh new file mode 100755 index 000000000000..eb24a6eac085 --- /dev/null +++ b/tools/test/stress2/misc/fdescfs3.sh @@ -0,0 +1,51 @@ +#!/bin/sh + +# +# Copyright (c) 2025 Peter Holm +# +# SPDX-License-Identifier: BSD-2-Clause +# + +[ `id -u ` -ne 0 ] && echo "Must be root!" && exit 1 + +. ../default.cfg + +mounts=15 # Number of parallel scripts +mdstart=$mdstart # Use md unit numbers from this point + +if [ $# -eq 0 ]; then + for i in `jot $mounts`; do + m=$(( i + mdstart - 1 )) + [ ! -d ${mntpoint}$m ] && mkdir ${mntpoint}$m + mount | grep "$mntpoint" | grep -q md$m && umount ${mntpoint}$m + done + ../testcases/swap/swap -t 2m -i 20 & + + # start the parallel tests + touch /tmp/$0 + for i in `jot $mounts`; do + m=$(( i + mdstart - 1 )) + ./$0 $m & + ./$0 find $m > /dev/null 2>&1 & + done + wait +else + if [ $1 = find ]; then + while [ -r /tmp/$0 ]; do + ls -lR ${mntpoint}* + done + else + + # The test: Parallel mount and unmounts + start=`date +%s` + while [ $((`date +%s` - start)) -lt 120 ]; do + m=$1 + mount -t fdescfs null ${mntpoint}$m + while mount | grep -qw $mntpoint$m; do + opt=$([ $((`date '+%s'` % 2)) -eq 0 ] && echo "-f") + umount $opt ${mntpoint}$m > /dev/null 2>&1 + done + done + rm -f /tmp/$0 + fi +fi From nobody Tue Sep 16 11:24:49 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cR01F5qJLz68nmn; Tue, 16 Sep 2025 11:24: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 4cR01F5H0lz46hG; Tue, 16 Sep 2025 11:24:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758021889; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TN1AvspHK7Jl0yfO4vns70pbURgOvEBoJvzRd1sTnUg=; b=BYXmoKFz9/x9kByOXllyqgwLElncASCIypKkEaDbYJoM3uSZcncYFdeA+KTI6b+iPYZKn7 skhHdLxJD77oP/tllw9M5IWsJRl08wiTj3Jb0pnTLNGdPq0f0BzK/oyY4UdzxwVO4XGsy0 wfP0cTLBHXOGsZ9lSzQx8sfSqexELG5xqSZxygqLYol1mcm0yhUkR3+IPeCb3pKj6fAo0j /Z02G7QKacfWxUQmwCYPY/0rjg+2gWDMzw18wTb96nGQ4jadHkMtcqu6B4bHcKvd4u5/Oy i62sbY+OefjC52kW9WUQxq95J4F493rtA4BdcHV2QL+GfsWD6LUpRKnHEAXL+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758021889; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TN1AvspHK7Jl0yfO4vns70pbURgOvEBoJvzRd1sTnUg=; b=IaNwVlArFDneMBvD+eWLudYREPf484JTmxPDooxZzG/rBmnUyAa6TUZjFYi1zX3O5Jaytq nM4I94ZhlLmSIXF3HfNYoRFm2cJgzORqhLTEWU8LLcVqdgdsBKSgxiiTz5HajRMw75QgLC hajWzxfm4UcF82L1z6xLzr4kwWxl+mxdbxy6+worrB8RImnrNMJASsa2Ap08iY2zkHsHhd yyNriupKVFfhFqgsCqfQTVjzMHbIT98d8xz1SLbO5LXuB7r4iM9W3gm/OpDdnKbZ1b8/27 cBlz1snBB4rnbXgWn6gpVrd9I4x/WyN/ss00hYL31sseckLw7X8ta4a6boZSdg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758021889; a=rsa-sha256; cv=none; b=QMCyvlHa1QFMZZHFnCOFKLUBw25yR14JmR4dWxMhGoLdId8jp48IRHEOY7OltNWVaJvzjd B2mBT6dhFAHSddJaOWY7QWwcU3sRGYJKAbJNRca4fWralZNyRX/y7M1ho4gAC+9ngz0fKg frKPI1QgUm28DGjagPXGq2JlCfszwko8TaKUVVLGaAG0qIlrMuLAWc86CHSADDlWHJMtGF 3oYxQtr4Ve8uJ/nWE0xiEnnYTlwb5Ou51JeBDnoTLukIH5/HkG8QWAQHrYyrxnNBLS6ls1 8tUVdLlxdQYpdNd4n65wr9SnJu58z6+THIn/kU8tNt0ioasyDNhA6DR9xLLjoQ== 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 4cR01F4bthzfSK; Tue, 16 Sep 2025 11:24: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 58GBOneB079942; Tue, 16 Sep 2025 11:24:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58GBOnSx079939; Tue, 16 Sep 2025 11:24:49 GMT (envelope-from git) Date: Tue, 16 Sep 2025 11:24:49 GMT Message-Id: <202509161124.58GBOnSx079939@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 7314f78b240b - main - aarch64: Clarify the initial adjustments to sp for kernel exception entry List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7314f78b240bdbf2bcec07e3d5a475e37941bb6b Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=7314f78b240bdbf2bcec07e3d5a475e37941bb6b commit 7314f78b240bdbf2bcec07e3d5a475e37941bb6b Author: John Baldwin AuthorDate: 2025-09-16 11:21:39 +0000 Commit: John Baldwin CommitDate: 2025-09-16 11:21:39 +0000 aarch64: Clarify the initial adjustments to sp for kernel exception entry The first store-pair instruction in save_registers_head decrements the stack pointer to create room for most of the trapframe (and the redzone area for nested exceptions). However, the expression was a bit non-intuitive as it was using an expression without a leading negative sign to adjust the stack pointer. Rewrite the expression so that it is more clearly a negative adjustment to the stack pointer. Suggested by: andrew Reviewed by: andrew Sponsored by: AFRL, DARPA Differential Revision: https://reviews.freebsd.org/D52514 --- sys/arm64/arm64/exception.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/arm64/arm64/exception.S b/sys/arm64/arm64/exception.S index 13095def8b00..6e673fbe5a43 100644 --- a/sys/arm64/arm64/exception.S +++ b/sys/arm64/arm64/exception.S @@ -43,9 +43,9 @@ .macro save_registers_head el .if \el == 1 mov x18, sp - stp x0, x1, [sp, #(TF_X - TF_SIZE - 128)]! + stp x0, x1, [sp, #-(TF_SIZE - TF_X + 128)]! .else - stp x0, x1, [sp, #(TF_X - TF_SIZE)]! + stp x0, x1, [sp, #-(TF_SIZE - TF_X)]! .endif stp x2, x3, [sp, #(2 * 8)] stp x4, x5, [sp, #(4 * 8)] From nobody Tue Sep 16 11:24:50 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cR01H0CMtz68nwR; Tue, 16 Sep 2025 11:24: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 4cR01G6W8mz46mG; Tue, 16 Sep 2025 11:24:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758021890; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bEVZC0Mermz2e62a/NuoQD0DB/SH9wcnNo5XRTFLq2g=; b=n1U4CY6R1Ze6JTFMMjhZLCbPlfCQX35Tx5x2/TIIogHy4psVNfpLUFXnApw4h+xBP2w+E9 Xnum/HoiqtTMD1CA3Z0rX/+rph3Hqg4SgFiQDLSHTfnEmAgDzp5qZ/MLZe5meH/M2sWd7U CQz+NLXsBEcnmn/GAlY83ST/EbbgaokEtmdDk6Cpkb4KxkiVWpUlka8vCEafkbpJO56832 KzdDv11oeiNh3btuF/ka6p9rIgXHmJpeA1wEiMtDC581k9pXWSSrGVYo9oI6OKbsEGqIAH GJMHTZ0vTdvtZppmx8GcfYknlQ27ZZw6+UcwGGtQ6heLjg3yxtXoUa/dA8pfzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758021890; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bEVZC0Mermz2e62a/NuoQD0DB/SH9wcnNo5XRTFLq2g=; b=t1ujUUAfsN+YqX6J/F15+rzZUwfsi8xpapVN85PMRw5GKgoEPNHkCz2wlcPXNaSVcs/Sze 2b+ZAwmx+zgGXPPDY4UbUSlqbJXDwG0LODsVacIlP9cE0KXDrb6JVpKCn5ycY4fAHsehiP VHZMYbdJrJXUmIDHBFJ88NV10x9CIaloP9FvrJ5BVqRzp6Bzap1A0eXFy6mQEXS/aEwntN Cb81KGsY3qbySxZPsy5NSnkKPZXasJiJCd1xgNxQnNbBkLvwpp/Nm0aVAy/1YZWu5iqwur GPdTAfl/H/tGCEUFDsAVRdqXS6OEt1P6CiH7CGprztURl1lADW9A4YxToNLxtQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758021890; a=rsa-sha256; cv=none; b=OnVutdqjvTh1DFzYHhe+W3Hm5zTJbd8ExhV+/RxHn0hjgpIOw13vZofJiSXiTrH9D213FV xHN2GtgPHfrgarnh5lQiXliCtT801y5zr55BWhvW0qsuRSjPVPgtTQvslDhklZEftdeutC 6jO0dyhjPP5wnZyV5TX23ogyHK9LBPqigSgiajdgIdgE9tDqWWMZRNgAElLo6Gsosrlzud pJQbwPoU8SosHi33rpCXD8itGUKDiLwY7pXgAt/Iao8XWZeuJT9xttkqLzbEkaPxLVJgzN 83WkdMKfNdws/lY4seAmVFgRSKANDfSOkbvk/PZkR3ebym9+Kand4tacaaonPg== 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 4cR01G5JPczfb5; Tue, 16 Sep 2025 11:24: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 58GBOorG079976; Tue, 16 Sep 2025 11:24:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58GBOoWr079973; Tue, 16 Sep 2025 11:24:50 GMT (envelope-from git) Date: Tue, 16 Sep 2025 11:24:50 GMT Message-Id: <202509161124.58GBOoWr079973@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 99213b3c352c - main - aarch64: Save correct value of x18 on trapframe for nested faults List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 99213b3c352cdf568ea7cf5b4dddb1879f16a601 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=99213b3c352cdf568ea7cf5b4dddb1879f16a601 commit 99213b3c352cdf568ea7cf5b4dddb1879f16a601 Author: Konrad Witaszczyk AuthorDate: 2025-09-16 11:21:57 +0000 Commit: John Baldwin CommitDate: 2025-09-16 11:23:58 +0000 aarch64: Save correct value of x18 on trapframe for nested faults x18 is overwritten with a temporary copy of the kernel stack pointer when it is saved in the trapframe. This does not matter in terms of function since nested exception return does not restore x18 from the trapframe, but it does mean that examining x18 in a debugger in stack frames above a nested fault outputs the wrong register value. To fix, compute the value of the original stack pointer to save in x18 later after the trapframe has been constructed. Reviewed by: jhb, andrew Sponsored by: AFRL, DARPA Differential Revision: https://reviews.freebsd.org/D52472 --- sys/arm64/arm64/exception.S | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/arm64/arm64/exception.S b/sys/arm64/arm64/exception.S index 6e673fbe5a43..5a4181348a54 100644 --- a/sys/arm64/arm64/exception.S +++ b/sys/arm64/arm64/exception.S @@ -42,7 +42,6 @@ */ .macro save_registers_head el .if \el == 1 - mov x18, sp stp x0, x1, [sp, #-(TF_SIZE - TF_X + 128)]! .else stp x0, x1, [sp, #-(TF_SIZE - TF_X)]! @@ -61,7 +60,9 @@ stp x24, x25, [sp, #(24 * 8)] stp x26, x27, [sp, #(26 * 8)] stp x28, x29, [sp, #(28 * 8)] -.if \el == 0 +.if \el == 1 + add x18, sp, #(TF_SIZE - TF_X + 128) +.else mrs x18, sp_el0 .endif mrs x10, elr_el1 From nobody Tue Sep 16 13:22:30 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cR2d22VdKz67Frd; Tue, 16 Sep 2025 13:22: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 4cR2d21tn7z3P7m; Tue, 16 Sep 2025 13:22:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758028950; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5WP9eZtvK/MxeYCvlts6FEKj6phYKzHAlH+FBOC1Z6k=; b=FT/ICy1w8NOLfFE8i6yBEZZ/FYbh8+ZRX4RRD2hA/kItN+wgypHYjBi+qEo3UnIIoocDB4 oJehSUu3STkKTYpZOiO1wKsv85ugYG0aoD/fWEWyXs/ejBLkwInDANlgX9Owq4kPe2aYg6 fjVrgUGTO2rzcmiqzAp18gZHvG127ceTlA5x6gjvnlQaE8e1JvP1eSbEeTTNdxg5QwJVzm /5d2vG4HYRJDNCN0LrKpGgdUNWl2ZFa+157KVpT2uVyalcl/Mw9oDW1PPbFm+OCWPGCFVK uELXLLVRn+DAba9CTzN6M/ILc36y42LSQzIdUPKECLZCGnjmLwT2FQ57GPm9Yw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758028950; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5WP9eZtvK/MxeYCvlts6FEKj6phYKzHAlH+FBOC1Z6k=; b=h3MrHPSrEmqy8pPCnQAZLi5wNHMsZzx9lLjQJE6XTx9E4ESgL9pN2fG52fHInOWPtntZx2 Fh9KnNbzJrUU2M8FWDU4nx/Z85ydf8XcDETcSR/bRdzE9Hhkc0B0JQvOV4iVIYj0f9G35M X+pO5a0W8Kc2FWjD4xkb4PMunZMXITSjiF07xoX2eYXykmojIZ7FRDACKvWj66vtF3gCk8 mXqs3UDPwaznJ6i21cFPMcRyH9e6llX4G64VwgUxLBH/4raJBxHmghqxB0DaWkY6Ua92bf dQgVX0I0pSUSaUtiJ8ErfdXQSWHx0WObB7NZXaN1ut8R0KkuxTt8O4HHlTIm9w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758028950; a=rsa-sha256; cv=none; b=YnFuXp95vA8ibygLqJu1bDs5R2CuCmxPdckA4K4uCTd9Iybh+ctDv0xh2HCjFXFv+VLeYz YPJ5XLHo1osyEuifeOtUcH6zLmQoB6s0APAgAoZwwRqQycadk4aIob6bSvhJJnt5iFxykW HfG8kRn9/y7YZDuMWz1rnmbrcMPV4zKW9LOuNikFoTdMhx3CHnhX317YrE8Si7RZjd454W 8ISYTE2bd2Vswt4dMfczKnRZdHqkry+jzLPb1fIsyh239ciq2UKzoqUcBCLnSam7/RtyA9 B/fRU6i5vWYYV85s62ZLpf4+8KmmS6/7/KctXeIUd3a/RuUu7KOfqt3HQzF+wg== 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 4cR2d21BrZzjyZ; Tue, 16 Sep 2025 13:22: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 58GDMUw4005212; Tue, 16 Sep 2025 13:22:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58GDMUiN005209; Tue, 16 Sep 2025 13:22:30 GMT (envelope-from git) Date: Tue, 16 Sep 2025 13:22:30 GMT Message-Id: <202509161322.58GDMUiN005209@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: e13b5298ec87 - main - if_re: Add PNP info for module List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e13b5298ec87be03da2231bc7b44a6a4b976b850 Auto-Submitted: auto-generated The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=e13b5298ec87be03da2231bc7b44a6a4b976b850 commit e13b5298ec87be03da2231bc7b44a6a4b976b850 Author: Mitchell Horne AuthorDate: 2025-09-16 13:19:00 +0000 Commit: Mitchell Horne CommitDate: 2025-09-16 13:22:05 +0000 if_re: Add PNP info for module Add PNP info so it the module can be by devmatch(8) and automatically loaded. On non-x86 platforms it is not included in GENERIC. Reviewed by: imp MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D52557 --- sys/dev/re/if_re.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/dev/re/if_re.c b/sys/dev/re/if_re.c index 67864c2de388..d56c975a43d2 100644 --- a/sys/dev/re/if_re.c +++ b/sys/dev/re/if_re.c @@ -353,6 +353,8 @@ static driver_t re_driver = { DRIVER_MODULE(re, pci, re_driver, 0, 0); DRIVER_MODULE(miibus, re, miibus_driver, 0, 0); +MODULE_PNP_INFO("U16:vendor;U16:device;U32:#;D:#", pci, re, re_devs, + nitems(re_devs) - 1); #define EE_SET(x) \ CSR_WRITE_1(sc, RL_EECMD, \ From nobody Tue Sep 16 13:23:15 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cR2dx26M3z67FZG; Tue, 16 Sep 2025 13:23:17 +0000 (UTC) (envelope-from des@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cR2dx16bkz3PnK; Tue, 16 Sep 2025 13:23:17 +0000 (UTC) (envelope-from des@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758028997; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Cqu72eK4lHrNY8Gl61BnJqVSeu/luEgp9yrfYspqx74=; b=mNx7GDcLTsgat79xSLjtCf1m0P1e7UTGXrZ6rccSj7jdl0PyJhy44sXDO4TOIdd6OQU2KR tEdCZQAc3nI8UkoDKFbMk0MBuImLEfuJ9xI5lpu5hUpPziPUbv8U5IPuoq1hqj/i+9LZh0 Y9fkyl9a57jQoVLmeCc7q9JHP1C6fzcGQkNz0oRu79sKfhCnbjz7LKwDYR/e0wZ3ETLHGL mcn1Gwj0Enf2r7obkUn3kl4ofb4vG6UY/mXPVXpyllOwfzxVIsh0wmje6iXeEv90qvcjVm cH8C9oknqtwdWGHqKipocG8vnMwlPw1Kz+jRstkcbsDpLF4sPpxG7EUyHlwsCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758028997; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Cqu72eK4lHrNY8Gl61BnJqVSeu/luEgp9yrfYspqx74=; b=GpYlS/2wuJsd8nxWqr3jbVVoAOajQi6s4BkMt5exZ1VJGdn8zz1V6ayzhznNSYvXGUsTmR NA/lt3iWApeHEU4GtNYDF4KeF4x88Blz22XIJQYUyvEQWs2TliSLsO1HeDMCw+/9lwenAh 4yMD69hCdvRi46BWjfaHwJNheCwjr7b7wu17mtB4Xdj65F30kP0SXNYQlG1jVOA2KNIT1J 6uzVKYzAA8VA1FKlYEVN7+Hi2oo3qHjgH/GcNvkVf3qynVDr+J2z95Jkta4Ez3S5J/OW/Q 93aZUKr2K0F1Ws4fUFm3EvAbpSkirTqP9BhDp4Qn2Sg4VbaEzYT6hlQgKVuxQw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758028997; a=rsa-sha256; cv=none; b=y1r08g2M4pctaTp68G8uOIfSvDX9ZqZzBGLqBPWZoVnL2wVVyR5FvIIdV3I477f7n642KB AED6gJDdC3IDh7G08edARiTco7c95/Yv8ODkOYuReuRNtc53ZCw1WxWQZ5P0Wq63Ry2syd RKaM7ecMZxvfQGFG8DChvdqic0+1XK5YxewLJr9COMDPQqTIQUz4m5pr3nPBuR/2KdWAK9 yRPrjSayCxwxF2FuJy+a18P6HmGq53Z1DxY/Y3bDQz1YNdjnQVBvF/fauOJNSFxr1kokM2 ugshOSoLaq/BzPYs/NSbdeZvEtavK3lzDgKv5Ttxiwt2Zfy4FAJF9zxbI+Is0w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from ltc.des.dev (unknown [IPv6:2a01:e0a:c54:bed0:922e:16ff:fef1:acef]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: des) by smtp.freebsd.org (Postfix) with ESMTPSA id 4cR2dx06NDzNtD; Tue, 16 Sep 2025 13:23:16 +0000 (UTC) (envelope-from des@freebsd.org) Received: by ltc.des.dev (Postfix, from userid 1001) id 58C1384AED; Tue, 16 Sep 2025 15:23:15 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Mark Johnston Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: b2f5dc591ef2 - main - src.opts.mk: Remove REPRODUCIBLE_BUILD from the default list In-Reply-To: <202509081922.588JM1NX027953@gitrepo.freebsd.org> (Mark Johnston's message of "Mon, 8 Sep 2025 19:22:01 GMT") References: <202509081922.588JM1NX027953@gitrepo.freebsd.org> User-Agent: Gnus/5.13 (Gnus v5.13) Date: Tue, 16 Sep 2025 15:23:15 +0200 Message-ID: <86tt12fs58.fsf@ltc.des.dev> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mark Johnston writes: > src.opts.mk: Remove REPRODUCIBLE_BUILD from the default list >=20=20=20=20=20 > It was added to the list in bsd.opts.mk in commit 4f81c42fbd76, so > should have been removed here. >=20=20=20=20=20 > Reported by: cperciva > Fixes: 4f81c42fbd76 ("share/mk: Substitute reproducible pref= ixes in dwarf info") > MFC after: 3 days > Sponsored by: The FreeBSD Foundation > Sponsored by: Klara, Inc. You forgot to regenerate src.conf.5. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@FreeBSD.org From nobody Tue Sep 16 13:38:29 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cR2zT4kzZz67GNx; Tue, 16 Sep 2025 13:38: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 4cR2zT4Qtjz3S3C; Tue, 16 Sep 2025 13:38:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758029909; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LUUypDfdsObtn6aV/ZefBB79oxTNdglc3B5ZttG9+v4=; b=DX0PUKvrB1yVP66gcAN1reA8D9YNLS+bO0xGk3l3IcHu705U6ymV/1bnqm5hf/ry0bSXcw 4L+xLAIPpEsz+2vjpHR1B4TjNd6HkkuQp22JTFLU3m99eKRrlANnyOdRYjCRD1K6y0i242 wCA3BS0fO3o0HwKpiOD6q1/ntMxCt0MKjtLQgri6IoD+xPIsUXHbEphP9oO7LhLDi44p0k xfurxZqWCJ6J1yK4aXVfCL5B3H73x0L27vMr44cWtX94pRKyeTE7P2N7EH+1E0zEN/b/qA d+7Dz/AkL8BCWsmSqO2pgmaPQ3O4J0RGMLEFKaI5GdU8j7vACA9RbjMih17SQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758029909; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LUUypDfdsObtn6aV/ZefBB79oxTNdglc3B5ZttG9+v4=; b=OPtvppCEdvfY3+o7MSFvUuygeWnOjtlvsgSDgG/ACwamtT/d9Ph7usdeB/Dm4I51c0y6nn ofOndPTXMyA2PVI+oaGpyg9ECJBW6FJ5W1j9DdjlDDZHXJAbbFueWR8HUokEg/991SJvRS p5vgOmXAUQ7oAKy0QIqO489vET8dY0zhZWIftT9GGTaQtvSPMP982eDfq4SPfJx+q0C+/6 gA5wX2aWa1YiEDi7gDh3tdz6saHx/VOA3IZ+pC2xGJa7Stj/CYBRwLqaef1V/QGhhNzcB3 M5uCGkpo3XmJFAJGHSIECjrCAxAhQQizNrIp8eFuPf/xhtMiwd40t3ayfiDA1w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758029909; a=rsa-sha256; cv=none; b=o0FF1tiLitu5AZWTGdYcgUSneOEBeLZR/vHMbNaIroRhkC6ci+Ju/VdJjscj8QMTCWPkV0 nkOcGpav2VdvF+hOS3dcnXAsVLzibsiEMQsncHOYTU0zt5vBJDqSQP+IfWHvh2Y13bLc87 J94xke52EQBhpYNkvuSqPt16MRY7wbSkDsh7gsyN0K84IKVxyst8Ly2tBnImRQ3pYcOEJY ElRCD65iCvKGtXR0XdIRdoKSm7VsgRnV3nhg1QIz3/nPRX5VJfO9ALQ9rmfWH0ISnkseco 9s7CXAj7H+CxUWkdkKu9qHckza2l4EnFZFjdMVUihi6PyIVOgs52CbODUVr57g== 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 4cR2zT3yT0zk9k; Tue, 16 Sep 2025 13:38: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 58GDcTaf026096; Tue, 16 Sep 2025 13:38:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58GDcTlF026093; Tue, 16 Sep 2025 13:38:29 GMT (envelope-from git) Date: Tue, 16 Sep 2025 13:38:29 GMT Message-Id: <202509161338.58GDcTlF026093@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 1a7a067da456 - main - stat: Add option to list holes List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1a7a067da456f8962ef87bfdf75c94cd12988615 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=1a7a067da456f8962ef87bfdf75c94cd12988615 commit 1a7a067da456f8962ef87bfdf75c94cd12988615 Author: Dag-Erling Smørgrav AuthorDate: 2025-09-16 13:37:57 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-09-16 13:38:25 +0000 stat: Add option to list holes Add a new -h option that causes stat to print a list of holes for each file argument. Sponsored by: Klara, Inc. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D52481 --- usr.bin/stat/stat.1 | 45 +++++++++- usr.bin/stat/stat.c | 176 ++++++++++++++++++++++++++++++---------- usr.bin/stat/tests/stat_test.sh | 72 ++++++++++++++++ 3 files changed, 250 insertions(+), 43 deletions(-) diff --git a/usr.bin/stat/stat.1 b/usr.bin/stat/stat.1 index 2996781fafa6..55e64de0767e 100644 --- a/usr.bin/stat/stat.1 +++ b/usr.bin/stat/stat.1 @@ -6,6 +6,8 @@ .\" This code is derived from software contributed to The NetBSD Foundation .\" by Andrew Brown and Jan Schaumann. .\" +.\" Copyright (c) 2025 Klara, Inc. +.\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: @@ -27,7 +29,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd June 22, 2017 +.Dd September 9, 2025 .Dt STAT 1 .Os .Sh NAME @@ -36,7 +38,7 @@ .Nd display file status .Sh SYNOPSIS .Nm -.Op Fl FHLnq +.Op Fl FHhLnq .Op Fl f Ar format | Fl l | r | s | x .Op Fl t Ar timefmt .Op Ar @@ -129,6 +131,45 @@ and use instead of .Xr lstat 2 . This requires root privileges. +.It Fl h +For each file argument, print a line consisting of a comma-separated +list of holes, a space, and the file name. +Each hole is reported as its starting offset as a decimal number +followed by a hyphen and the ending offset (one less than the starting +offset of the data region that follows the hole) as a decimal number. +If the file ends in a hole, the ending offset of the final hole will +be one less than the size of the file. +Otherwise, the final entry in the list (indeed, the only entry in the +list, if the file is not sparse), is a single decimal number +corresponding to the size of the file, representing the virtual hole +at the end of the file. +.Pp +If the argument is a directory, instead of a list of holes, a single +number is printed, corresponding to the minimum hole size for that +directory as reported by +.Xr pathconf 2 , +followed by a space and the directory name. +.Pp +Please note that the only way to retrieve information about the holes +in a file is to open it and walk the list of holes and data regions +using +.Xr lseek 2 . +If the file is being modified by another process at the same time as +.Nm +is inspecting it, the result may be inconsistent. +.Pp +This option cannot be combined with the +.Fl F , +.Fl f , +.Fl H , +.Fl L , +.Fl l , +.Fl r , +.Fl s , +.Fl t , +or +.Fl x +options. .It Fl L Use .Xr stat 2 diff --git a/usr.bin/stat/stat.c b/usr.bin/stat/stat.c index 1fd8288728c1..0ed5d3ae5b53 100644 --- a/usr.bin/stat/stat.c +++ b/usr.bin/stat/stat.c @@ -7,6 +7,8 @@ * This code is derived from software contributed to The NetBSD Foundation * by Andrew Brown. * + * Copyright (c) 2025 Klara, Inc. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -47,18 +49,19 @@ __RCSID("$NetBSD: stat.c,v 1.33 2011/01/15 22:54:10 njoly Exp $" #endif /* HAVE_CONFIG_H */ #include -#include #include #include #include #include #include +#include #include #include #include #include #include +#include #include #include #include @@ -178,22 +181,24 @@ __RCSID("$NetBSD: stat.c,v 1.33 2011/01/15 22:54:10 njoly Exp $" #define SHOW_filename 'N' #define SHOW_sizerdev 'Z' -void usage(const char *); -void output(const struct stat *, const char *, - const char *, int, int); -int format1(const struct stat *, /* stat info */ +static void usage(const char *); +static void output(const struct stat *, const char *, const char *, int); +static int format1(const struct stat *, /* stat info */ const char *, /* the file name */ const char *, int, /* the format string itself */ char *, size_t, /* a place to put the output */ int, int, int, int, /* the parsed format */ int, int); -int hex2byte(const char [2]); +static int hex2byte(const char [2]); #if HAVE_STRUCT_STAT_ST_FLAGS -char *xfflagstostr(unsigned long); +static char *xfflagstostr(unsigned long); #endif +static int fdlistholes(int, const char *); +static int listholes(const char *); static const char *timefmt; static int linkfail; +static bool nonl; #define addchar(s, c, nl) \ do { \ @@ -205,20 +210,22 @@ int main(int argc, char *argv[]) { struct stat st; - int ch, rc, errs, am_readlink; - int lsF, fmtchar, usestat, nfs_handle, fn, nonl, quiet; - const char *statfmt, *options, *synopsis; char dname[sizeof _PATH_DEV + SPECNAMELEN] = _PATH_DEV; - fhandle_t fhnd; + const char *statfmt, *options, *synopsis; const char *file; + fhandle_t fhnd; + int ch, rc, errs, am_readlink, fn, fmtchar; + bool lsF, holes, usestat, nfs_handle, quiet; am_readlink = 0; - lsF = 0; + errs = 0; + lsF = false; fmtchar = '\0'; - usestat = 0; - nfs_handle = 0; - nonl = 0; - quiet = 0; + holes = false; + usestat = false; + nfs_handle = false; + nonl = false; + quiet = false; linkfail = 0; statfmt = NULL; timefmt = NULL; @@ -231,28 +238,35 @@ main(int argc, char *argv[]) fmtchar = 'f'; quiet = 1; } else { - options = "f:FHlLnqrst:x"; - synopsis = "[-FLnq] [-f format | -l | -r | -s | -x] " + options = "Ff:HhLlnqrst:x"; + synopsis = "[-FHhLnq] [-f format | -l | -r | -s | -x] " "[-t timefmt] [file|handle ...]"; } while ((ch = getopt(argc, argv, options)) != -1) switch (ch) { case 'F': - lsF = 1; + lsF = true; break; case 'H': - nfs_handle = 1; + nfs_handle = true; + break; + case 'h': + holes = true; break; case 'L': - usestat = 1; + usestat = true; break; case 'n': - nonl = 1; + nonl = true; + break; + case 't': + timefmt = optarg; break; case 'q': - quiet = 1; + quiet = true; break; + /* remaining cases are purposefully out of order */ case 'f': if (am_readlink) { statfmt = "%R"; @@ -269,9 +283,6 @@ main(int argc, char *argv[]) fmtchar, ch); fmtchar = ch; break; - case 't': - timefmt = optarg; - break; default: usage(synopsis); } @@ -280,6 +291,28 @@ main(int argc, char *argv[]) argv += optind; fn = 1; + if (holes) { + if (fmtchar || lsF || nfs_handle || usestat || timefmt) + usage(synopsis); + if (argc > 0) { + while (argc-- > 0) { + if (listholes(*argv) != 0) { + if (!quiet) + warn("%s", *argv); + errs++; + } + argv++; + } + } else { + if (fdlistholes(STDIN_FILENO, "stdin") != 0) { + if (!quiet) + warn("stdin"); + errs++; + } + } + exit(errs ? 1 : 0); + } + if (fmtchar == '\0') { if (lsF) fmtchar = 'l'; @@ -318,7 +351,6 @@ main(int argc, char *argv[]) if (timefmt == NULL) timefmt = TIME_FORMAT; - errs = 0; do { if (argc == 0) { if (fdevname_r(STDIN_FILENO, dname + @@ -361,8 +393,7 @@ main(int argc, char *argv[]) errno == ENOENT && (rc = lstat(file, &st)) == -1) errno = ENOENT; - } - else + } else rc = lstat(file, &st); } @@ -371,9 +402,8 @@ main(int argc, char *argv[]) linkfail = 1; if (!quiet) warn("%s", file); - } - else - output(&st, file, statfmt, fn, nonl); + } else + output(&st, file, statfmt, fn); argv++; argc--; @@ -387,7 +417,7 @@ main(int argc, char *argv[]) /* * fflagstostr() wrapper that leaks only once */ -char * +static char * xfflagstostr(unsigned long fflags) { static char *str = NULL; @@ -402,10 +432,9 @@ xfflagstostr(unsigned long fflags) } #endif /* HAVE_STRUCT_STAT_ST_FLAGS */ -void +static void usage(const char *synopsis) { - (void)fprintf(stderr, "usage: %s %s\n", getprogname(), synopsis); exit(1); } @@ -413,9 +442,8 @@ usage(const char *synopsis) /* * Parses a format string. */ -void -output(const struct stat *st, const char *file, - const char *statfmt, int fn, int nonl) +static void +output(const struct stat *st, const char *file, const char *statfmt, int fn) { int flags, size, prec, ofmt, hilo, what; char buf[PATH_MAX + 4 + 1]; @@ -606,7 +634,7 @@ output(const struct stat *st, const char *file, /* * Arranges output according to a single parsed format substring. */ -int +static int format1(const struct stat *st, const char *file, const char *fmt, int flen, @@ -1073,7 +1101,7 @@ format1(const struct stat *st, (void)strcat(lfmt, "ll"); switch (ofmt) { case FMTF_DECIMAL: (void)strcat(lfmt, "d"); break; - case FMTF_OCTAL: (void)strcat(lfmt, "o"); break; + case FMTF_OCTAL: (void)strcat(lfmt, "o"); break; case FMTF_UNSIGNED: (void)strcat(lfmt, "u"); break; case FMTF_HEX: (void)strcat(lfmt, "x"); break; } @@ -1083,9 +1111,75 @@ format1(const struct stat *st, #define hex2nibble(c) (c <= '9' ? c - '0' : toupper(c) - 'A' + 10) -int +static int hex2byte(const char c[2]) { if (!(ishexnumber(c[0]) && ishexnumber(c[1]))) return -1; return (hex2nibble(c[0]) << 4) + hex2nibble(c[1]); } + +static int +fdlistholes(int fd, const char *fn) +{ + struct stat sb; + off_t pos = 0, off; + long l; + + if (fstat(fd, &sb) < 0) + return (-1); + if (S_ISDIR(sb.st_mode)) { + if ((l = fpathconf(fd, _PC_MIN_HOLE_SIZE)) < 0) + return (-1); + printf("%ld", l); + } else if (!S_ISREG(sb.st_mode)) { + errno = ESPIPE; + return (-1); + } else { + for (;;) { + if ((off = lseek(fd, pos, SEEK_HOLE)) < 0) { + if (errno != ENXIO) + return (-1); + /* + * This can only happen if the file was + * truncated while we were scanning it, or + * on the initial seek if the file is + * empty. Report the virtual hole at the + * end of the file at this position. + */ + off = pos; + } + printf("%jd", (intmax_t)off); + pos = off; + if ((off = lseek(fd, pos, SEEK_DATA)) < 0) { + if (errno != ENXIO) + return (-1); + /* + * There are no more data regions in the + * file, or it got truncated. However, we + * may not be at the end yet. + */ + if ((off = lseek(fd, 0, SEEK_END)) > pos) + printf("-%jd", (intmax_t)off - 1); + break; + } + printf("-%jd,", (intmax_t)off - 1); + pos = off; + } + } + printf(" %s", fn); + if (!nonl) + printf("\n"); + return (0); +} + +static int +listholes(const char *fn) +{ + int fd, ret; + + if ((fd = open(fn, O_RDONLY)) < 0) + return (-1); + ret = fdlistholes(fd, fn); + close(fd); + return (ret); +} diff --git a/usr.bin/stat/tests/stat_test.sh b/usr.bin/stat/tests/stat_test.sh index e75fd0c56490..afe698575034 100755 --- a/usr.bin/stat/tests/stat_test.sh +++ b/usr.bin/stat/tests/stat_test.sh @@ -1,6 +1,7 @@ # # Copyright (c) 2017 Dell EMC # 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 @@ -45,6 +46,76 @@ F_flag_body() atf_check -o match:'.* f\|' stat -Fn f } +atf_test_case h_flag cleanup +h_flag_head() +{ + atf_set "descr" "Verify the output format for -h" + atf_set "require.user" "root" +} +h_flag_body() +{ + # POSIX defines a hole as “[a] contiguous region of bytes + # within a file, all having the value of zero” and requires + # that “all seekable files shall have a virtual hole starting + # at the current size of the file” but says “it is up to the + # implementation to define when sparse files can be created + # and with what granularity for the size of holes”. It also + # defines a sparse file as “[a] file that contains more holes + # than just the virtual hole at the end of the file”. That's + # pretty much the extent of its discussion of holes, apart + # from the description of SEEK_HOLE and SEEK_DATA in the lseek + # manual page. In other words, there is no portable way to + # reliably create a hole in a file on any given file system. + # + # On FreeBSD, this test is likely to run on either tmpfs, ufs + # (ffs2), or zfs. Of those three, only tmpfs has predictable + # semantics and supports all possible configurations (the + # minimum hole size on zfs is variable for small files, and + # ufs will not allow a file to end in a hole). + atf_check mkdir mnt + atf_check mount -t tmpfs tmpfs mnt + cd mnt + + # For a directory, prints the minimum hole size, which on + # tmpfs is the system page size. + ps=$(sysctl -n hw.pagesize) + atf_check -o inline:"$((ps)) .\n" stat -h . + atf_check -o inline:"$((ps)) ." stat -hn . + + # For a file, prints a list of holes. + atf_check truncate -s 0 foo + atf_check -o inline:"0 foo" \ + stat -hn foo + atf_check truncate -s "$((ps))" foo + atf_check -o inline:"0-$((ps-1)) foo" \ + stat -hn foo + atf_check dd status=none if=/COPYRIGHT of=foo \ + oseek="$((ps))" bs=1 count=1 + atf_check -o inline:"0-$((ps-1)),$((ps+1)) foo" \ + stat -hn foo + atf_check truncate -s "$((ps*3))" foo + atf_check -o inline:"0-$((ps-1)),$((ps*2))-$((ps*3-1)) foo" \ + stat -hn foo + + # Test multiple files. + atf_check dd status=none if=/COPYRIGHT of=bar + sz=$(stat -f%z bar) + atf_check -o inline:"0-$((ps-1)),$((ps*2))-$((ps*3-1)) foo +$((sz)) bar +" \ + stat -h foo bar + + # For a device, fail. + atf_check -s exit:1 -e match:"/dev/null: Illegal seek" \ + stat -h /dev/null +} +h_flag_cleanup() +{ + if [ -d mnt ]; then + umount mnt || true + fi +} + atf_test_case l_flag l_flag_head() { @@ -233,6 +304,7 @@ atf_init_test_cases() { atf_add_test_case F_flag #atf_add_test_case H_flag + atf_add_test_case h_flag #atf_add_test_case L_flag #atf_add_test_case f_flag atf_add_test_case l_flag From nobody Tue Sep 16 13:38:30 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cR2zV6FVjz67GNy; Tue, 16 Sep 2025 13:38: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 4cR2zV5Cbzz3SDm; Tue, 16 Sep 2025 13:38:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758029910; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=J4wUXLQT8sLVCJoEH2uikaMl0Oj+B9U4qROFfUE+Tic=; b=Hy8VlFb/Z3DV3Wmb9rcFDdEml3sHEs82jEtnl2jKNwFqt5kZOtNdT25kZfHjOlAkGCaLYx iUL22S4f4n3yvZ3+N+JC+9fXiUZl1pBu1VHXsz14yIm2MZjxWEq7Yk6vFKOMSJaL+wp6Jk XJNZvhXI4db/2Hub39rA7iUfZGbDcERe/lDdRmS4IjHeL2DXtKDgpDhgzXMkzrveop3P5g w1okqnEG0mXX4GtpjZLfqy24kJ9uRY523MiP7uuzavS5z4jfGsTgvq+7FYa4wlphZWwJer nNYYs793oYnb8WOP2YRtCiBW62XEJr7iV1fO59hbQQdf5iMKGVRKojgnVkt9WA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758029910; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=J4wUXLQT8sLVCJoEH2uikaMl0Oj+B9U4qROFfUE+Tic=; b=WA55T9dxEzCidFMYzGqbwHl8pQUfN3REOMMtcRoGLToUvGaKO+gMYVf4idaQIusmyrohdc 7eNe36PaCBK1Q308TcE9OBi0wGn6JBoxNkg2clEDRTkmfuWUPzMJlue71OYUrAB68kpV+L c3IgVv8dL+AaxDau4f3Ix7sSJm+6vpaFd0BePlXweTRYqFdvvhY9XTUn01qOcHvPRKGdQF RopezqAnn5FxAZGgFhAAWjLHVPsY36R5O9tgU2X+B1GNmGSzdCn0FLtMI621JiMhBlQPDr 98dpuzL82EkvhiqjnAj/4saRpGibToBnbCIMRWMcjZgKBBtP5265hEvU8QB9gA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758029910; a=rsa-sha256; cv=none; b=SM4yPOPj442OdQ1EVpJUnm16KtUPRGR/1eRChvGKmZXozwNc9mvbZsjNTEH1DDYzNCSbdp gJc09eu9Q2nRjS1EWdZvULd1R/GSTMqDdDG0Az7ZwdTRj+m+Yku+d8Lp+k5ABv7sNqF6jg 1CPmQ1XX+SrfL/LXjcgZEMWZXcdQEYThwZ0ubc8SG4jHaMaWK7aXL0/G+dz5v3/UCrRulS T4jqxoy4hTrYAKbexTqRYIipqAH+eQsURx4PENFUlDNFaaNI0HVBXlPFQH/y9M+gwOz+5r DwVM8/oiNxjlS3rrxJaWFumLJYagoPiX79US/fn+TsWvTognZdJqDQe4Qq4n9A== 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 4cR2zV4VQJzjYR; Tue, 16 Sep 2025 13:38: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 58GDcUAL026132; Tue, 16 Sep 2025 13:38:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58GDcUo4026129; Tue, 16 Sep 2025 13:38:30 GMT (envelope-from git) Date: Tue, 16 Sep 2025 13:38:30 GMT Message-Id: <202509161338.58GDcUo4026129@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 9b8224b950fb - main - cp: Drop test helper List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9b8224b950fb74c8674d257a5a4795baa759c35b Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=9b8224b950fb74c8674d257a5a4795baa759c35b commit 9b8224b950fb74c8674d257a5a4795baa759c35b Author: Dag-Erling Smørgrav AuthorDate: 2025-09-16 13:38:03 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-09-16 13:38:26 +0000 cp: Drop test helper Now that stat(1) can report whether a file is sparse, we no longer need a helper program for our tests. Sponsored by: Klara, Inc. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D52482 --- ObsoleteFiles.inc | 3 ++ bin/cp/tests/Makefile | 2 -- bin/cp/tests/cp_test.sh | 2 +- bin/cp/tests/sparse.c | 73 ------------------------------------------------- 4 files changed, 4 insertions(+), 76 deletions(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index 02a727d631bd..ae83035b5de5 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -51,6 +51,9 @@ # xargs -n1 | sort | uniq -d; # done +# 20250911: This tool is no longer needed +OLD_FILES+=usr/tests/bin/cp/sparse + # 20250826: Remove a misspelled manual OLD_FILES+=usr/share/man/man3/sysdecode_syscallnames.3.gz diff --git a/bin/cp/tests/Makefile b/bin/cp/tests/Makefile index 3fa9ae8f0685..a1917ada8fbf 100644 --- a/bin/cp/tests/Makefile +++ b/bin/cp/tests/Makefile @@ -1,7 +1,5 @@ PACKAGE= tests ATF_TESTS_SH= cp_test -PROGS+= sparse -BINDIR= ${TESTSDIR} .include diff --git a/bin/cp/tests/cp_test.sh b/bin/cp/tests/cp_test.sh index 999993bfad67..fdf50d042f0b 100755 --- a/bin/cp/tests/cp_test.sh +++ b/bin/cp/tests/cp_test.sh @@ -384,7 +384,7 @@ samefile_body() file_is_sparse() { - atf_check ${0%/*}/sparse "$1" + atf_check -o match:"^[0-9]+-[0-9]" stat -h "$1" } files_are_equal() diff --git a/bin/cp/tests/sparse.c b/bin/cp/tests/sparse.c deleted file mode 100644 index 78957581a56c..000000000000 --- a/bin/cp/tests/sparse.c +++ /dev/null @@ -1,73 +0,0 @@ -/*- - * Copyright (c) 2023 Klara, Inc. - * - * SPDX-License-Identifier: BSD-2-Clause - */ - -#include -#include -#include -#include -#include -#include -#include - -static bool verbose; - -/* - * Returns true if the file named by its argument is sparse, i.e. if - * seeking to SEEK_HOLE returns a different value than seeking to - * SEEK_END. - */ -static bool -sparse(const char *filename) -{ - off_t hole, end; - int fd; - - if ((fd = open(filename, O_RDONLY)) < 0 || - (hole = lseek(fd, 0, SEEK_HOLE)) < 0 || - (end = lseek(fd, 0, SEEK_END)) < 0) - err(1, "%s", filename); - close(fd); - if (end > hole) { - if (verbose) - printf("%s: hole at %zu\n", filename, (size_t)hole); - return (true); - } - return (false); -} - -static void -usage(void) -{ - - fprintf(stderr, "usage: sparse [-v] file [...]\n"); - exit(EX_USAGE); -} - -int -main(int argc, char *argv[]) -{ - int opt, rv; - - while ((opt = getopt(argc, argv, "v")) != -1) { - switch (opt) { - case 'v': - verbose = true; - break; - default: - usage(); - break; - } - } - argc -= optind; - argv += optind; - if (argc == 0) - usage(); - rv = EXIT_SUCCESS; - while (argc-- > 0) - if (!sparse(*argv++)) - rv = EXIT_FAILURE; - exit(rv); -} From nobody Tue Sep 16 13:43:29 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cR35N3rnDz67H49 for ; Tue, 16 Sep 2025 13:43:36 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-qk1-x734.google.com (mail-qk1-x734.google.com [IPv6:2607:f8b0:4864:20::734]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cR35N0kq0z3T9F for ; Tue, 16 Sep 2025 13:43:36 +0000 (UTC) (envelope-from markjdb@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-qk1-x734.google.com with SMTP id af79cd13be357-816ac9f9507so739354185a.1 for ; Tue, 16 Sep 2025 06:43:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1758030213; x=1758635013; darn=freebsd.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:sender :from:to:cc:subject:date:message-id:reply-to; bh=1NoSAlNI8YvxEyU7Vb1APLTEzk71xOhqza1RNENuPAI=; b=VsbOLfRlh9Gs4tC7tFWUShOolBUHq3gf4nXAJeeB8wv/XwlJrIdZhSZ4Thia3Y5sQC 0EoEJWxBstvxHZ+pclmiTKepg8YHY4lj1HrF0jKP73fuxAD2/teokvq4sZSZcS6Yj3QW D3Cbz45qR5Ytsbzuvh/Gx1fxhOjGvR57duh8FfAlhSLUHUQ2NkONwmkizD586nHr0+vr AViHPRtUCY6+OnWuX2Ms7qm9vjyQnEojQ1cXY/eerKGdsWSdUw6uGfLWNRiwBMyQY+c1 7t8Pn++4F2SY5KHz/xYkxEJQBRwvTauY2zXqjfAgP1wzHFEMGtIA5gNUt+GKb9AUNvOF c1iw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1758030213; x=1758635013; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:sender :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=1NoSAlNI8YvxEyU7Vb1APLTEzk71xOhqza1RNENuPAI=; b=qMRFtBRJNXxPiS1mjp0QXM8rAPo8fiPLlHumm3nAqsaKr9Iht7XXf51koGVNV02g8z ybyYkOGV/RVBDdPkB/b5ZHMgcc4FUoPF2gByuBztAtyPHzLQWSGySRAe6+LsudkBaZpf Do+3ZK2tl8Xm/egJrW3s3SFFWbTqUfG+eCtDx6FCnCvcCAmh3qcohSUpPbz4HninCT+H 1qIfGxermYXxF4pMHhbnuvhUZ1qGVYqj6nyvzdftsDR8pPpXUVR4H0s+NWWaPSeypuKQ V2s0dcmMVhN+GIP1SssbL9WNP3trtioHuYT1Xb441PPvI7XI15QaZzUWs+AmzMnuwiQO R/mA== X-Forwarded-Encrypted: i=1; AJvYcCUbRO1vA2kShKq8WhSm5XJs8PtnMgYT5jLf1o5wha/vb7uW4N4/iXqRoLj/g7+j569zlFug8ARxslgRwEm5yIXkI3PBwQ==@freebsd.org X-Gm-Message-State: AOJu0Yx+e79Aj0s1KHkNUXfFYB336BTf9NOAXyOm0awKGgnCQZP9gpeW aFByUFilp7sQVbfxtZj18lfTzRfvkElQx9tlSOy++3DJ0JM3KmhGLbUZ X-Gm-Gg: ASbGncto1oAw1QN35hy4pVRm7OMq0MRFKBigiTG6lVzgSdGXvQ2KvY32aLsihE/UX/B JB5cXtbnQFC8RZGe3Sxva3BIxzovBwfEijfir69IlFIInmZOvCVD93l5RJn8a814xIYtROSY32G dHd28jPQED7OndqcXex7Pi06mqPho924XL9B0AaGOpf8P3ijan4Gmo3y0TntMVczwoH57SY9LZE 6epS524LUXB5sA7gH6TLHjwN1fFpwcVarGIo0nZjbG6DIc5W8r98XWCj8F43fEIpwYgQk4lYOVK ahXRs1xAlVa4RX9H+B3sMCsqMUiDX5NkVPyM7zS82BWbOXI+05t7NDmQyQIGzt2P3U+108HXJKw 8qa2+tYbNjje/ofgAoNwy28kA5kNjzv78vVM8 X-Google-Smtp-Source: AGHT+IEfzhpWlZIIiVaTku034CoEC8He1bzL8cz30hs3PU2J66ghWct0OLNKUZOXmSbHjosGtFMSnw== X-Received: by 2002:a05:620a:444d:b0:804:4a23:38e0 with SMTP id af79cd13be357-82b9c180d5emr233296685a.4.1758030213078; Tue, 16 Sep 2025 06:43:33 -0700 (PDT) Received: from nuc (192-0-220-237.cpe.teksavvy.com. [192.0.220.237]) by smtp.gmail.com with ESMTPSA id af79cd13be357-820cf8c8b87sm962649385a.68.2025.09.16.06.43.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Sep 2025 06:43:32 -0700 (PDT) Date: Tue, 16 Sep 2025 09:43:29 -0400 From: Mark Johnston To: Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?= Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: b2f5dc591ef2 - main - src.opts.mk: Remove REPRODUCIBLE_BUILD from the default list Message-ID: References: <202509081922.588JM1NX027953@gitrepo.freebsd.org> <86tt12fs58.fsf@ltc.des.dev> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <86tt12fs58.fsf@ltc.des.dev> X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4cR35N0kq0z3T9F On Tue, Sep 16, 2025 at 03:23:15PM +0200, Dag-Erling Smrgrav wrote: > Mark Johnston writes: > > 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. > > > > Reported by: cperciva > > Fixes: 4f81c42fbd76 ("share/mk: Substitute reproducible prefixes in dwarf info") > > MFC after: 3 days > > Sponsored by: The FreeBSD Foundation > > Sponsored by: Klara, Inc. > > You forgot to regenerate src.conf.5. I didn't change the default, just where it was defined. Regenerating src.conf.5 results in no changes. From nobody Tue Sep 16 13:45:10 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cR37B68T8z67GqQ; Tue, 16 Sep 2025 13:45:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cR37B5VsKz3Tnn; Tue, 16 Sep 2025 13:45:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758030310; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LuNWn5MGT2KhKI3o/Qr5b1arMSAPU4cvOCslgUDL4Rg=; b=blTW5JTw8tqh6tXEh4cWFK1YoWibBOUEJlq5fs3M+XMwHXLjXDGh7Z4l+25cKi79WM09+E emA67Zo8PnYuZHlJXFQEYtNf4qk/EEpdRqamXdoyU+LVWuusNR+q7UhwJzdKYZUw3BKjnX YNIfib6AEC2G44CTaDyRJaKIgejtPCqw0ipw+2ZGQNyIr8uqNMUKCIqCladjIkuXeCbZKk f7Msukn4rRK1FdoKJNry4Nh0hpaamUZS+x0RWXYGcWQEFlAzFenOMKOeLyr6IvnbxmgTbz xRzr35KVQiC6AQIjXYNqIQYAAOp2OyV0jbGIposnlNKXxyQhIyTBN6feOE+LWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758030310; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LuNWn5MGT2KhKI3o/Qr5b1arMSAPU4cvOCslgUDL4Rg=; b=bIZiqDpRfrMWqWNqYj0d+Q7FGAxpSkedglWlOWOSIf+ecawBDjczAB/dQVGUacYACd6PXB RSR8dYybtVd5SdP9HwgQUeRiFLlHO+QoEJPDn3ZMzvZmZBfaMvwaAIbuLasacB6RjLF1sp 82pO+YoR84gC6YY+CoQiEMTgEityVoGTgDWpubUzcdBlRJAnv8nyHZv9FhcSM4DlzJFeee Tkla9SsbzmNC4qgQTGuaKd0IoQf9eH3hmPhPd2j3yW2rb37KPX5UXH1VGgewTHKDZaK06V Kdpc1ZBwtO/uBddjINhkb3bYB6sCzr+hjQLPbKsFWREr2PT0YbCwmxePnWDGdA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758030310; a=rsa-sha256; cv=none; b=DDxPy+WJMD6nNTiHRrjXOsc2+mXV/ArZWx9Ax8Gxh7gqgLeepgxUAO/ZZrVQXjX3naSDX9 C1la/Dz/uPzZYrvRB7W4IN9ycWiV7zMzS9C6XeJkrL2ghyM0yxZpnsfGf/Tn/LvfpDNhy9 rs00XExA/0KgEjxwFnXdeQg8L5V8Dr+4fUPWP5NTDrdTtblukcez1WXTzrgwgZPVE6NF4g LN1MHi0dd1h+FKKenUbMM4tYtXN+HSCl00gqXEOQ1jgzY+AQ6YwvM4Rlg0M0XxtoiX+v1G dJ6Nybn5V0A7nkwQZ1mmaoB6JD++wrzwsxan6vW2UtvUiBGbKAcqQ9eW0692zA== 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 4cR37B51w6zkMj; Tue, 16 Sep 2025 13:45: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 58GDjAAa043582; Tue, 16 Sep 2025 13:45:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58GDjAid043579; Tue, 16 Sep 2025 13:45:10 GMT (envelope-from git) Date: Tue, 16 Sep 2025 13:45:10 GMT Message-Id: <202509161345.58GDjAid043579@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 1c3ca0c733a4 - main - Revert "jail: Optionally allow audit session state to be configured in a jail" List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1c3ca0c733a4e4ba550cedfa8019260fb0cf5707 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=1c3ca0c733a4e4ba550cedfa8019260fb0cf5707 commit 1c3ca0c733a4e4ba550cedfa8019260fb0cf5707 Author: Mark Johnston AuthorDate: 2025-09-16 13:43:47 +0000 Commit: Mark Johnston CommitDate: 2025-09-16 13:44:58 +0000 Revert "jail: Optionally allow audit session state to be configured in a jail" Changing audit system calls to return EPERM instead of ENOSYS when invoked from a jail breaks some userspace applications. Revert for now until a more complete change is reviewed. This reverts commit 246d7e9fc23928be22db38220f5439f5cdee5264. PR: 289645 --- sys/kern/kern_jail.c | 13 +------------ sys/security/audit/audit_syscalls.c | 12 ++++++++++++ sys/sys/jail.h | 3 +-- usr.sbin/jail/jail.8 | 19 ++++--------------- usr.sbin/jail/tests/jail_basic_test.sh | 20 -------------------- 5 files changed, 18 insertions(+), 49 deletions(-) diff --git a/sys/kern/kern_jail.c b/sys/kern/kern_jail.c index 3697d95fe0e5..a75ba89d2a7e 100644 --- a/sys/kern/kern_jail.c +++ b/sys/kern/kern_jail.c @@ -243,9 +243,6 @@ static struct bool_flags pr_flag_allow[NBBY * NBPW] = { {"allow.unprivileged_parent_tampering", "allow.nounprivileged_parent_tampering", PR_ALLOW_UNPRIV_PARENT_TAMPER}, -#ifdef AUDIT - {"allow.setaudit", "allow.nosetaudit", PR_ALLOW_SETAUDIT}, -#endif }; static unsigned pr_allow_all = PR_ALLOW_ALL_STATIC; const size_t pr_flag_allow_size = sizeof(pr_flag_allow); @@ -4292,6 +4289,7 @@ prison_priv_check(struct ucred *cred, int priv) */ case PRIV_KTRACE: +#if 0 /* * Allow jailed processes to configure audit identity and * submit audit records (login, etc). In the future we may @@ -4300,11 +4298,6 @@ prison_priv_check(struct ucred *cred, int priv) */ case PRIV_AUDIT_GETAUDIT: case PRIV_AUDIT_SETAUDIT: - if (cred->cr_prison->pr_allow & PR_ALLOW_SETAUDIT) - return (0); - else - return (EPERM); -#if 0 case PRIV_AUDIT_SUBMIT: #endif @@ -5041,10 +5034,6 @@ SYSCTL_JAIL_PARAM(_allow, settime, CTLTYPE_INT | CTLFLAG_RW, "B", "Jail may set system time"); SYSCTL_JAIL_PARAM(_allow, routing, CTLTYPE_INT | CTLFLAG_RW, "B", "Jail may modify routing table"); -#ifdef AUDIT -SYSCTL_JAIL_PARAM(_allow, setaudit, CTLTYPE_INT | CTLFLAG_RW, - "B", "Jail may set and get audit session state"); -#endif SYSCTL_JAIL_PARAM_SUBNODE(allow, mount, "Jail mount/unmount permission flags"); SYSCTL_JAIL_PARAM(_allow_mount, , CTLTYPE_INT | CTLFLAG_RW, diff --git a/sys/security/audit/audit_syscalls.c b/sys/security/audit/audit_syscalls.c index 262f2c1ae1e3..40b2fb3d1c9f 100644 --- a/sys/security/audit/audit_syscalls.c +++ b/sys/security/audit/audit_syscalls.c @@ -592,6 +592,8 @@ sys_getauid(struct thread *td, struct getauid_args *uap) { int error; + if (jailed(td->td_ucred)) + return (ENOSYS); error = priv_check(td, PRIV_AUDIT_GETAUDIT); if (error) return (error); @@ -607,6 +609,8 @@ sys_setauid(struct thread *td, struct setauid_args *uap) au_id_t id; int error; + if (jailed(td->td_ucred)) + return (ENOSYS); error = copyin(uap->auid, &id, sizeof(id)); if (error) return (error); @@ -646,6 +650,8 @@ sys_getaudit(struct thread *td, struct getaudit_args *uap) int error; cred = td->td_ucred; + if (jailed(cred)) + return (ENOSYS); error = priv_check(td, PRIV_AUDIT_GETAUDIT); if (error) return (error); @@ -668,6 +674,8 @@ sys_setaudit(struct thread *td, struct setaudit_args *uap) struct auditinfo ai; int error; + if (jailed(td->td_ucred)) + return (ENOSYS); error = copyin(uap->auditinfo, &ai, sizeof(ai)); if (error) return (error); @@ -707,6 +715,8 @@ sys_getaudit_addr(struct thread *td, struct getaudit_addr_args *uap) { int error; + if (jailed(td->td_ucred)) + return (ENOSYS); if (uap->length < sizeof(*uap->auditinfo_addr)) return (EOVERFLOW); error = priv_check(td, PRIV_AUDIT_GETAUDIT); @@ -724,6 +734,8 @@ sys_setaudit_addr(struct thread *td, struct setaudit_addr_args *uap) struct auditinfo_addr aia; int error; + if (jailed(td->td_ucred)) + return (ENOSYS); error = copyin(uap->auditinfo_addr, &aia, sizeof(aia)); if (error) return (error); diff --git a/sys/sys/jail.h b/sys/sys/jail.h index e6a13e6719dd..e12e8c3178c9 100644 --- a/sys/sys/jail.h +++ b/sys/sys/jail.h @@ -271,7 +271,6 @@ struct prison_racct { #define PR_ALLOW_SETTIME 0x00100000 #define PR_ALLOW_ROUTING 0x00200000 #define PR_ALLOW_UNPRIV_PARENT_TAMPER 0x00400000 -#define PR_ALLOW_SETAUDIT 0x00800000 /* * PR_ALLOW_PRISON0 are the allow flags that we apply by default to prison0, @@ -279,7 +278,7 @@ struct prison_racct { * build time. PR_ALLOW_ALL_STATIC should contain any bit above that we expect * to be used on the system, while PR_ALLOW_PRISON0 will be some subset of that. */ -#define PR_ALLOW_ALL_STATIC 0x00ff87ff +#define PR_ALLOW_ALL_STATIC 0x007f87ff #define PR_ALLOW_PRISON0 \ (PR_ALLOW_ALL_STATIC & ~(PR_ALLOW_UNPRIV_PARENT_TAMPER)) diff --git a/usr.sbin/jail/jail.8 b/usr.sbin/jail/jail.8 index d44b7f66a64e..421aa9babb4c 100644 --- a/usr.sbin/jail/jail.8 +++ b/usr.sbin/jail/jail.8 @@ -23,7 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd September 15, 2025 +.Dd August 7, 2025 .Dt JAIL 8 .Os .Sh NAME @@ -702,15 +702,15 @@ The super-user will be disabled automatically if its parent system has it disabled. The super-user is enabled by default. .It Va allow.extattr -Allow privileged processes in the jail to manipulate filesystem extended +Allow privileged process in the jail to manipulate filesystem extended attributes in the system namespace. .It Va allow.adjtime -Allow privileged processes in the jail to slowly adjusting global operating system +Allow privileged process in the jail to slowly adjusting global operating system time. For example through utilities like .Xr ntpd 8 . .It Va allow.settime -Allow privileged processes in the jail to set global operating system data +Allow privileged process in the jail to set global operating system data and time. For example through utilities like .Xr date 1 . @@ -719,17 +719,6 @@ This permission includes also .It Va allow.routing Allow privileged process in the non-VNET jail to modify the system routing table. -.It Va allow.setaudit -Allow privileged processes in the jail to set -.Xr audit 4 -session state using -.Xr setaudit 2 -and related system calls. -This is useful, for example, for allowing a jailed -.Xr sshd 8 -to set the audit user ID for an authenticated session. -However, it gives jailed processes the ability to modify or disable audit -session state, so should be configured with care. .El .El .Pp diff --git a/usr.sbin/jail/tests/jail_basic_test.sh b/usr.sbin/jail/tests/jail_basic_test.sh index c781eed78756..6802da7b049a 100755 --- a/usr.sbin/jail/tests/jail_basic_test.sh +++ b/usr.sbin/jail/tests/jail_basic_test.sh @@ -306,25 +306,6 @@ param_consistency_cleanup() fi } -atf_test_case "setaudit" -setaudit_head() -{ - atf_set descr 'Test that setaudit works in a jail when configured with allow.setaudit' - atf_set require.user root - atf_set require.progs setaudit -} - -setaudit_body() -{ - # Try to modify the audit mask within a jail without - # allow.setaudit configured. - atf_check -s not-exit:0 -o empty -e not-empty jail -c name=setaudit_jail \ - command=setaudit -m fr ls / - # The command should succeed if allow.setaudit is configured. - atf_check -s exit:0 -o ignore -e empty jail -c name=setaudit_jail \ - allow.setaudit command=setaudit -m fr ls / -} - atf_init_test_cases() { atf_add_test_case "basic" @@ -333,5 +314,4 @@ atf_init_test_cases() atf_add_test_case "commands" atf_add_test_case "jid_name_set" atf_add_test_case "param_consistency" - atf_add_test_case "setaudit" } From nobody Tue Sep 16 14:11:08 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cR3j85SCmz67Kh8; Tue, 16 Sep 2025 14:11:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cR3j84WJkz3c05; Tue, 16 Sep 2025 14:11:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758031868; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Sk7OlB7M0QoS6+OJ0UPXnysPeIjS0GQgeZb7+BgBPcM=; b=nBXqlncdTeyD93JIZO4FQeyPatp4e3FIYQ7Cfl2v+vp5oHJIZuMBZpvIYziBO4nU5lvyTB Xu6hHZEZoXZ2Ibu/Tp5S6XMQc42Bx4kzBW5XYeu8bxgOoEOFFRDoRjtro9DLqnf5deJG6M 1b7UFOWBmxz6JkvEtEgynkPCIWiKMQIM0EGDJtFNVZ7ZtPT2JMoNXXHHBlAohcX0CW7SxH 54C9fO1jR2eoZpRJguKNFhPppqk/UNJKNywl3Krhm8SMe0tD/7Q6SAMnTGHOE93J00tUCW PrDHpBgELn9IstsJ7B59IYc37UeejercMBU6nZ+BeZwSnjjZ0eaqTWEq4sHcww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758031868; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Sk7OlB7M0QoS6+OJ0UPXnysPeIjS0GQgeZb7+BgBPcM=; b=cWWRMCxWib4BlfYNrJPssRfw0JuUDd06oPjXJAmh1c5OdUvgXKqlS25V2Dd3bzd1f4/YQz HReF1sRq/B0xYW6xk7iMrLNJo/JUXBr0XAEkiXEp1nHM8jZAOpwKjgwHrRVb/fIEHWQJqX fc4rreQmMMpXEEPsVP/F016TzAAPjiEBzT0zK3U/SaqJQi9ntCL1udNh7uhOoyMJkMGsnT Sqejs2KfZdjQwhZcieMllJ3gRePqMyIcNumcFWNYcber+2P6HUwv+ncmPc25V+EvvcLeHT 9QHoL11Utn3E3SWjZWSf11Opjqdx6ESYbcI6y/mmRAvsq2nCITCnV3HF+9yjqw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758031868; a=rsa-sha256; cv=none; b=eFlVlIaltN3tDc7hdkdr+fR7LdhiN2zKDo33u4cpE3dL+uWtPwjA3JmAGYTq4OOHRnjmwe UTvqeOKhhATWtjQW5ctOKxJi2Im8GpQFRKxbc2xZ/vBsA6wYZC+vQMW6Oi9GDbpi6suOtl 5oBNS0WjWwtVqV6FYZ5VDCxC+3OY0JZwGCY/l/GcAAIbNzUT2Rzk7vZQJEixJt1z52tIO/ VVBcsfP49hGkboxjK1zcIfhHJEttsOpAUs09bLgi7EqJQSLLr2xxzrS4bmg9g9gCoGfUdv EKEN916ztjeWAaACwGgdEHGMJ2142OnB6sb7SS3gEhLn6YkLxbw+/OGwF3Tdmg== 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 4cR3j841TYzl5x; Tue, 16 Sep 2025 14:11:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58GEB8A7095233; Tue, 16 Sep 2025 14:11:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58GEB8H8095230; Tue, 16 Sep 2025 14:11:08 GMT (envelope-from git) Date: Tue, 16 Sep 2025 14:11:08 GMT Message-Id: <202509161411.58GEB8H8095230@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: a7340d559ee9 - main - MODULE_PNP_INFO.9: tweak list indent List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a7340d559ee942c21ea1a037d1d60a7859dd873b Auto-Submitted: auto-generated The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=a7340d559ee942c21ea1a037d1d60a7859dd873b commit a7340d559ee942c21ea1a037d1d60a7859dd873b Author: Mitchell Horne AuthorDate: 2025-09-05 16:14:07 +0000 Commit: Mitchell Horne CommitDate: 2025-09-16 14:11:02 +0000 MODULE_PNP_INFO.9: tweak list indent So that it renders as intended. MFC after: 3 days Sponsored by: The FreeBSD Foundation --- share/man/man9/MODULE_PNP_INFO.9 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/man/man9/MODULE_PNP_INFO.9 b/share/man/man9/MODULE_PNP_INFO.9 index 529afd70096d..b1cc935b1aca 100644 --- a/share/man/man9/MODULE_PNP_INFO.9 +++ b/share/man/man9/MODULE_PNP_INFO.9 @@ -65,7 +65,7 @@ The second name is encoded by appending a forward slash and the second name after the first.) .Pp Types are one of the following: -.Bl -tag -width U16 +.Bl -tag -width indent .It Dq Vt U8 .Vt uint8_t element. From nobody Tue Sep 16 15:37:28 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cR5cm4ljfz67T99; Tue, 16 Sep 2025 15:37: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 4cR5cm42B8z3rlB; Tue, 16 Sep 2025 15:37:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758037048; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6HALETDzudEznqI/lx+aUFDG1siB5Sorq4aRk3HEIro=; b=u216YgYk0vOrov7dYymS/9c0v+Lp5v7T+5yLLw+FyA7qYsCaBKloyrqoAxnFFMbSR6JXiQ 0PiPwctoBtDO3CgjD2Ixhl+C9Pz1JYnwggSTdEai4/MlQNreAUGWFe2HIG5ZgO1krd/M1u 10WiM0J26FnKgSThkG2CSg7I9nmmnDA2blGoCW651RQqj/2Ag0kMUTZtnAtYycMVL+Szum mQzeaddz6ka2M6f1+rdODqbldptpgVMEjqg8TJAVfiA8BKwMZvABr4tkEbF/4QwxF6mihm 7extitcDgy5zmEp7B/+oev/CWfSa2pnmwTOshQ+7n6NTsh9LcAwb6CmFkSHsPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758037048; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6HALETDzudEznqI/lx+aUFDG1siB5Sorq4aRk3HEIro=; b=ox/9+45B6mrLqMtoD3GZc/wcJgu6G3Df7lo8yfNDqW7MdfQuJJD0szTdpoLKySrPXsE9t7 pPVL9Ex2pKVBv685olffqY4tl9y3GBG28zfP0wyUHpROLLBahGnGtU1aFqeWEbmUA6ZyjS TgIpbe2jn9hm2tgq4/WAT8SdBsXgVug5uOOVx0m+IBz+W9lGLUktSHUWE0gXlH9FM63gms D7CY7OBT6D8WNWQZWk5kQO0ewQPr6NqZW/2AUWcJenJBoAUB17Esbabt6PiQAC1cGRpk6G YWli6mZ574n0n3HlGUqEQuXcyLclwPn6cbpv2X81h/FfFgXv7xMgPRE1KoHD1A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758037048; a=rsa-sha256; cv=none; b=yeupMnkYHCBiabEK7fu93pBsQ2fnq0nQtuCu6EehzyEVjTw+Klop0udXekLU/oDGMaQMfP jJIXvggsB9Xpx8KGo6dzkvWepZU/oo/zc5Nimu/N9nDUJS0LpH7q5/hXPV+kvYg+epGyx1 HIEAPFhA9Z42GlmuCqhpKs84x+080T+7f/AydM7/K29Hd3x0szjZHwYCknaNZRVVMv0TWy IhWz3fuqVcUcCi9AUoYzLdNCZ1SQP3CdecOpKn97jf3/1V/DjcAHhL5IQ8iVVGnBGj6pnV KZ0Hr9JBL9cJVeHQ1OOkpu/7dOBnC76ezw79SULDMVid0s8X2oOY5o99vit7LA== 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 4cR5cm3JMKznDF; Tue, 16 Sep 2025 15:37: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 58GFbSn5052553; Tue, 16 Sep 2025 15:37:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58GFbSjp052550; Tue, 16 Sep 2025 15:37:28 GMT (envelope-from git) Date: Tue, 16 Sep 2025 15:37:28 GMT Message-Id: <202509161537.58GFbSjp052550@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: 67f3c0d6a575 - main - dtraceall: Enable kinst for aarch64 and riscv as well List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 67f3c0d6a575f74a013974b4d4860a36e4fcc8ab Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=67f3c0d6a575f74a013974b4d4860a36e4fcc8ab commit 67f3c0d6a575f74a013974b4d4860a36e4fcc8ab Author: Christos Margiolis AuthorDate: 2025-09-16 15:37:19 +0000 Commit: Christos Margiolis CommitDate: 2025-09-16 15:37:19 +0000 dtraceall: Enable kinst for aarch64 and riscv as well aarch64 and riscv are supported since 2023 so it should be safe to enable it by default. MFC after: 2 weeks Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D52575 --- sys/modules/dtrace/dtraceall/dtraceall.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/modules/dtrace/dtraceall/dtraceall.c b/sys/modules/dtrace/dtraceall/dtraceall.c index 851d33a7e518..1978b9ead362 100644 --- a/sys/modules/dtrace/dtraceall/dtraceall.c +++ b/sys/modules/dtrace/dtraceall/dtraceall.c @@ -74,11 +74,11 @@ MODULE_DEPEND(dtraceall, dtnfscl, 1, 1, 1); defined(__i386__) || defined(__powerpc__) || defined(__riscv) MODULE_DEPEND(dtraceall, fbt, 1, 1, 1); #endif -#if defined(__amd64__) || defined(__i386__) || defined(__powerpc__) -MODULE_DEPEND(dtraceall, fasttrap, 1, 1, 1); -#if defined(__amd64__) +#if defined(__amd64__) || defined(__aarch64__) || defined(__riscv) MODULE_DEPEND(dtraceall, kinst, 1, 1, 1); #endif +#if defined(__amd64__) || defined(__i386__) || defined(__powerpc__) +MODULE_DEPEND(dtraceall, fasttrap, 1, 1, 1); #endif MODULE_DEPEND(dtraceall, sdt, 1, 1, 1); MODULE_DEPEND(dtraceall, systrace, 1, 1, 1); From nobody Tue Sep 16 15:48:38 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cR5sf6qLbz67Tlb; Tue, 16 Sep 2025 15:48: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 4cR5sf6Dpgz3sxv; Tue, 16 Sep 2025 15:48:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758037718; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5u2x8Q+D5pmL9NX7nXU+Bg4Gs/lkNMByAjWHfOaBrho=; b=k0q75uZQnjOkGfr7CUVAfCa2CwaQeRIs9Z/w5GGNuVnZq44vvOQaGjrcQ1/IqOecAi6V1h TC7HtZMxTg0mb0lqCBLkxi9VjG4Bl/pHaic4Hh5A8Z4DOJhRE2WEblN/tpF3maf3evyjDq XALYLjSeNCZzFE6Ke2BqwkBkReliMM9EDFQVJ2J/BfwT1gh8MHdK3cm8TiG4n9nsdl93vF gaUeBhDFO/8+Z4NjreT13G23Uml0P1QIC+q5UWfcr0qZTW4CLlyXWJimyvq9qd+t/jXnzj +GrFWp91pyJUmFw+sWL4dITYXbQnMgpUsMuHNPJIshFU7YuQ3uVva1gENAQFSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758037718; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5u2x8Q+D5pmL9NX7nXU+Bg4Gs/lkNMByAjWHfOaBrho=; b=d3o+WWeyNus4fydfGXFxqJsAGwjnok1UwJJJ7/OZIEFdK6l7lxJESC8nhRqyeybHNfjWmT a0s2qWc/AzLV0f8xVOGPDH8V1ue9D3HfXf6RwW2mpdldpwrPAtLrpPbOiQa3P/SideFnLg JDwxOHSF3P8aZhBTpVT+IQFMoBuvYNH2eZ48FplslXDus291Gi1sxKYe63K5qvTmGQkwWB 40lMJXhuEp0UdSQaGp2wAmeFMER8ExHFcJb+CR1hSSoiDRHfosPoLR08gi2ZNYoMj5Jg1L 5cj0GKFGNRf349Eq+rFgtxl1m/VM/f33JrcQh3VYKobt+RAltyeJZJiIG3kMcw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758037718; a=rsa-sha256; cv=none; b=gQf3lb8gBAI8EdppdxbRD0JNGhWtgPYbVnHh40Y4PzRy7C8UrEMw7GVk+cSMrjq2TxLrzs 9ytzvEtR+YRfIVrE9aOFvnY6vyntFx9dCSxlkNPkA0Kci9bugNs4vsf9BA8gvm4OOVdFq7 nuiBSTsquD0GYuSSdk+aFfHSGz0Lxy33kj9ibazTYo4+uYiYuDJg2FWlzqN/348+aEOmgt nHCWTM5EuzOpQNBu0it9209F6OK0DbcdoXQv/Q9EsnzmmsW7Qy8M308Rl9S1xoo7NZXilf R0cIxrK06ZuaPng+Rp3aTHDjBPRdKxAfOZ/41htPKc+FYgp2uwl0bqUfXI54Eg== 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 4cR5sf5mc0znTD; Tue, 16 Sep 2025 15:48: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 58GFmcoE072029; Tue, 16 Sep 2025 15:48:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58GFmch7072026; Tue, 16 Sep 2025 15:48:38 GMT (envelope-from git) Date: Tue, 16 Sep 2025 15:48:38 GMT Message-Id: <202509161548.58GFmch7072026@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 4be491e1b9b3 - main - jail: Optionally allow audit session state to be configured in a jail List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4be491e1b9b3b650494208eb61511f4a45c7db3f Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=4be491e1b9b3b650494208eb61511f4a45c7db3f commit 4be491e1b9b3b650494208eb61511f4a45c7db3f Author: Mark Johnston AuthorDate: 2025-09-15 17:23:50 +0000 Commit: Mark Johnston CommitDate: 2025-09-16 15:48:25 +0000 jail: Optionally allow audit session state to be configured in a jail Currently it is impossible for a privileged, jailed process to set audit session state. This can result in suprising audit event misattribution. For example, suppose a user ssh'es into a jail and restarts a service; normally, sshd sets audit state such that events generated by the SSH session are attributed to the newly authenticated user, but in a jail, the corresponding setaudit(2) call fails, so events are attributed to the user who had started sshd in the jail (typically the user who had started the jail itself by some means). While this behaviour is reasonable, administrators might want to trust the jailed sshd to reset audit state, such that the authenticated user appears in audit logs. Add a jail knob to enable this. Add a simple regression test. This is a reapplication of commit 246d7e9fc23928 following a revert. The audit system calls must preserve the old behaviour of returning ENOSYS if the system call is disallowed within a jail, as some applications depend on that behaviour. Reviewed by: kevans, jamie (previous version) MFC after: 1 week Sponsored by: Modirum MDPay Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D51719 Differential Revision: https://reviews.freebsd.org/D52572 --- sys/kern/kern_jail.c | 13 +++++++++- sys/security/audit/audit_syscalls.c | 47 +++++++++++++++++++++------------- sys/sys/jail.h | 3 ++- usr.sbin/jail/jail.8 | 19 +++++++++++--- usr.sbin/jail/tests/jail_basic_test.sh | 20 +++++++++++++++ 5 files changed, 78 insertions(+), 24 deletions(-) diff --git a/sys/kern/kern_jail.c b/sys/kern/kern_jail.c index a75ba89d2a7e..3697d95fe0e5 100644 --- a/sys/kern/kern_jail.c +++ b/sys/kern/kern_jail.c @@ -243,6 +243,9 @@ static struct bool_flags pr_flag_allow[NBBY * NBPW] = { {"allow.unprivileged_parent_tampering", "allow.nounprivileged_parent_tampering", PR_ALLOW_UNPRIV_PARENT_TAMPER}, +#ifdef AUDIT + {"allow.setaudit", "allow.nosetaudit", PR_ALLOW_SETAUDIT}, +#endif }; static unsigned pr_allow_all = PR_ALLOW_ALL_STATIC; const size_t pr_flag_allow_size = sizeof(pr_flag_allow); @@ -4289,7 +4292,6 @@ prison_priv_check(struct ucred *cred, int priv) */ case PRIV_KTRACE: -#if 0 /* * Allow jailed processes to configure audit identity and * submit audit records (login, etc). In the future we may @@ -4298,6 +4300,11 @@ prison_priv_check(struct ucred *cred, int priv) */ case PRIV_AUDIT_GETAUDIT: case PRIV_AUDIT_SETAUDIT: + if (cred->cr_prison->pr_allow & PR_ALLOW_SETAUDIT) + return (0); + else + return (EPERM); +#if 0 case PRIV_AUDIT_SUBMIT: #endif @@ -5034,6 +5041,10 @@ SYSCTL_JAIL_PARAM(_allow, settime, CTLTYPE_INT | CTLFLAG_RW, "B", "Jail may set system time"); SYSCTL_JAIL_PARAM(_allow, routing, CTLTYPE_INT | CTLFLAG_RW, "B", "Jail may modify routing table"); +#ifdef AUDIT +SYSCTL_JAIL_PARAM(_allow, setaudit, CTLTYPE_INT | CTLFLAG_RW, + "B", "Jail may set and get audit session state"); +#endif SYSCTL_JAIL_PARAM_SUBNODE(allow, mount, "Jail mount/unmount permission flags"); SYSCTL_JAIL_PARAM(_allow_mount, , CTLTYPE_INT | CTLFLAG_RW, diff --git a/sys/security/audit/audit_syscalls.c b/sys/security/audit/audit_syscalls.c index 40b2fb3d1c9f..f50c627b7515 100644 --- a/sys/security/audit/audit_syscalls.c +++ b/sys/security/audit/audit_syscalls.c @@ -54,6 +54,29 @@ #ifdef AUDIT +static int +audit_priv_check_cred(struct ucred *cred, int priv) +{ + int error; + + error = priv_check_cred(cred, priv); + if (error == EPERM && jailed(cred)) { + /* + * The audit system calls historically returned ENOSYS when + * invoked from within a jail, and some userspace applications + * handle that case specially. Thus, convert the error here. + */ + error = ENOSYS; + } + return (error); +} + +static int +audit_priv_check(struct thread *td, int priv) +{ + return (audit_priv_check_cred(td->td_ucred, priv)); +} + /* * System call to allow a user space application to submit a BSM audit record * to the kernel for inclusion in the audit log. This function does little @@ -592,9 +615,7 @@ sys_getauid(struct thread *td, struct getauid_args *uap) { int error; - if (jailed(td->td_ucred)) - return (ENOSYS); - error = priv_check(td, PRIV_AUDIT_GETAUDIT); + error = audit_priv_check(td, PRIV_AUDIT_GETAUDIT); if (error) return (error); return (copyout(&td->td_ucred->cr_audit.ai_auid, uap->auid, @@ -609,8 +630,6 @@ sys_setauid(struct thread *td, struct setauid_args *uap) au_id_t id; int error; - if (jailed(td->td_ucred)) - return (ENOSYS); error = copyin(uap->auid, &id, sizeof(id)); if (error) return (error); @@ -624,7 +643,7 @@ sys_setauid(struct thread *td, struct setauid_args *uap) if (error) goto fail; #endif - error = priv_check_cred(oldcred, PRIV_AUDIT_SETAUDIT); + error = audit_priv_check_cred(oldcred, PRIV_AUDIT_SETAUDIT); if (error) goto fail; newcred->cr_audit.ai_auid = id; @@ -650,9 +669,7 @@ sys_getaudit(struct thread *td, struct getaudit_args *uap) int error; cred = td->td_ucred; - if (jailed(cred)) - return (ENOSYS); - error = priv_check(td, PRIV_AUDIT_GETAUDIT); + error = audit_priv_check(td, PRIV_AUDIT_GETAUDIT); if (error) return (error); if (cred->cr_audit.ai_termid.at_type == AU_IPv6) @@ -674,8 +691,6 @@ sys_setaudit(struct thread *td, struct setaudit_args *uap) struct auditinfo ai; int error; - if (jailed(td->td_ucred)) - return (ENOSYS); error = copyin(uap->auditinfo, &ai, sizeof(ai)); if (error) return (error); @@ -689,7 +704,7 @@ sys_setaudit(struct thread *td, struct setaudit_args *uap) if (error) goto fail; #endif - error = priv_check_cred(oldcred, PRIV_AUDIT_SETAUDIT); + error = audit_priv_check_cred(oldcred, PRIV_AUDIT_SETAUDIT); if (error) goto fail; bzero(&newcred->cr_audit, sizeof(newcred->cr_audit)); @@ -715,11 +730,9 @@ sys_getaudit_addr(struct thread *td, struct getaudit_addr_args *uap) { int error; - if (jailed(td->td_ucred)) - return (ENOSYS); if (uap->length < sizeof(*uap->auditinfo_addr)) return (EOVERFLOW); - error = priv_check(td, PRIV_AUDIT_GETAUDIT); + error = audit_priv_check(td, PRIV_AUDIT_GETAUDIT); if (error) return (error); return (copyout(&td->td_ucred->cr_audit, uap->auditinfo_addr, @@ -734,8 +747,6 @@ sys_setaudit_addr(struct thread *td, struct setaudit_addr_args *uap) struct auditinfo_addr aia; int error; - if (jailed(td->td_ucred)) - return (ENOSYS); error = copyin(uap->auditinfo_addr, &aia, sizeof(aia)); if (error) return (error); @@ -752,7 +763,7 @@ sys_setaudit_addr(struct thread *td, struct setaudit_addr_args *uap) if (error) goto fail; #endif - error = priv_check_cred(oldcred, PRIV_AUDIT_SETAUDIT); + error = audit_priv_check_cred(oldcred, PRIV_AUDIT_SETAUDIT); if (error) goto fail; newcred->cr_audit = aia; diff --git a/sys/sys/jail.h b/sys/sys/jail.h index e12e8c3178c9..e6a13e6719dd 100644 --- a/sys/sys/jail.h +++ b/sys/sys/jail.h @@ -271,6 +271,7 @@ struct prison_racct { #define PR_ALLOW_SETTIME 0x00100000 #define PR_ALLOW_ROUTING 0x00200000 #define PR_ALLOW_UNPRIV_PARENT_TAMPER 0x00400000 +#define PR_ALLOW_SETAUDIT 0x00800000 /* * PR_ALLOW_PRISON0 are the allow flags that we apply by default to prison0, @@ -278,7 +279,7 @@ struct prison_racct { * build time. PR_ALLOW_ALL_STATIC should contain any bit above that we expect * to be used on the system, while PR_ALLOW_PRISON0 will be some subset of that. */ -#define PR_ALLOW_ALL_STATIC 0x007f87ff +#define PR_ALLOW_ALL_STATIC 0x00ff87ff #define PR_ALLOW_PRISON0 \ (PR_ALLOW_ALL_STATIC & ~(PR_ALLOW_UNPRIV_PARENT_TAMPER)) diff --git a/usr.sbin/jail/jail.8 b/usr.sbin/jail/jail.8 index 421aa9babb4c..d44b7f66a64e 100644 --- a/usr.sbin/jail/jail.8 +++ b/usr.sbin/jail/jail.8 @@ -23,7 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd August 7, 2025 +.Dd September 15, 2025 .Dt JAIL 8 .Os .Sh NAME @@ -702,15 +702,15 @@ The super-user will be disabled automatically if its parent system has it disabled. The super-user is enabled by default. .It Va allow.extattr -Allow privileged process in the jail to manipulate filesystem extended +Allow privileged processes in the jail to manipulate filesystem extended attributes in the system namespace. .It Va allow.adjtime -Allow privileged process in the jail to slowly adjusting global operating system +Allow privileged processes in the jail to slowly adjusting global operating system time. For example through utilities like .Xr ntpd 8 . .It Va allow.settime -Allow privileged process in the jail to set global operating system data +Allow privileged processes in the jail to set global operating system data and time. For example through utilities like .Xr date 1 . @@ -719,6 +719,17 @@ This permission includes also .It Va allow.routing Allow privileged process in the non-VNET jail to modify the system routing table. +.It Va allow.setaudit +Allow privileged processes in the jail to set +.Xr audit 4 +session state using +.Xr setaudit 2 +and related system calls. +This is useful, for example, for allowing a jailed +.Xr sshd 8 +to set the audit user ID for an authenticated session. +However, it gives jailed processes the ability to modify or disable audit +session state, so should be configured with care. .El .El .Pp diff --git a/usr.sbin/jail/tests/jail_basic_test.sh b/usr.sbin/jail/tests/jail_basic_test.sh index 6802da7b049a..c781eed78756 100755 --- a/usr.sbin/jail/tests/jail_basic_test.sh +++ b/usr.sbin/jail/tests/jail_basic_test.sh @@ -306,6 +306,25 @@ param_consistency_cleanup() fi } +atf_test_case "setaudit" +setaudit_head() +{ + atf_set descr 'Test that setaudit works in a jail when configured with allow.setaudit' + atf_set require.user root + atf_set require.progs setaudit +} + +setaudit_body() +{ + # Try to modify the audit mask within a jail without + # allow.setaudit configured. + atf_check -s not-exit:0 -o empty -e not-empty jail -c name=setaudit_jail \ + command=setaudit -m fr ls / + # The command should succeed if allow.setaudit is configured. + atf_check -s exit:0 -o ignore -e empty jail -c name=setaudit_jail \ + allow.setaudit command=setaudit -m fr ls / +} + atf_init_test_cases() { atf_add_test_case "basic" @@ -314,4 +333,5 @@ atf_init_test_cases() atf_add_test_case "commands" atf_add_test_case "jid_name_set" atf_add_test_case "param_consistency" + atf_add_test_case "setaudit" } From nobody Tue Sep 16 16:00:29 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cR67K2zCbz67Vgj; Tue, 16 Sep 2025 16:00: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 4cR67K20Bnz3thD; Tue, 16 Sep 2025 16:00:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758038429; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=enO+HFjDzBwDMPW9t0DZGuWWwUgIyKRR7Nd/OjL3vAU=; b=DFl21TVMGtCmB6bXnAx7WoqSJ9vPAVx/Y/bVaAg+ZXMtB2t7o2j1NA3v6jTaUV7RUrVBsG vAgLK+2BrkUDzaFH4u9dbq+TX28GR8jhQhZ2qgyGga5IMPZkiJ+1WIr/9fL6YyVDHfeM8y dhoPcvXAytX1facE/dAqWWQ/CsZOXZhteWlEGE5Oaq6NrqWmgrdRqJJPho6Zp8uHpOkpiM ojlgsagYF2h0AQebW0q75nfcw8TmlW85YkweFsBVk5IomMKZOGEKPKjCVV9ENafA/QLSWl aY0E988esPa9++VguWlBalPDDDz9OtLQy5PUktEDKKveqMyVOyRp96sh5VwrYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758038429; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=enO+HFjDzBwDMPW9t0DZGuWWwUgIyKRR7Nd/OjL3vAU=; b=r+Bx1kkRfXcYycth68F0wcf89Yo7HEnShBzJ+fJURYhFzYux6jRRgsW+TGX3UG+QTBFYG8 FiAdfSn3h414fWNZG0IwBtNyR+ixT1qzaBD346aDfx4hoh7aHseaGLvJ2MlBh1BGEJ31p/ cvA9BQz6CkmcO3aouWreLMW7kjUvpqLQ2Tg/vDQ9X9FbG0lRqnycYXJDw2mMKGMAn538jX ywQEZEsEoMGno0QK7ZNuT/07rmEXAfiSSCMSq78pG0n+0QtsS9f18a3/jYLSLhIS99vFSw Yg0VRqUKqV/uaoiARZzz2Hlf7nY3zM5uSguakMrQTAc3+/xW4/oX8WHDTj8Abg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758038429; a=rsa-sha256; cv=none; b=inZLPF6GfDLfoUVACJZWF1+jPDH7eQNtZBkbFoXPVw0LDzvx9zNWIypUT/2i1svn7GX/Ou gAPaaJKUmI2SC3OvizL3QQdneR+9Zzd6ME3j6BoNRwELXjiLegpuqwr5DRuRTwCYA4SNCd DGr+dm++smoDDw2qDN5pQt/k4XCxc8X0YSsA4ohaCGQC/2djHMkqUe9W19rdekCcLPLyfm jhGcoMz6GCYmMCZP28zLgzk1RQ35sEAY0gOoFSH0v6Qa1yK8BQbNtrc/QkFURI8Ga9ABId Dsni3phlWj5Im0Burq9aBhLDttmY7c3tMIRrmW89zv6wJi9fhKKpFcMkZVJpzQ== 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 4cR67K1WMgznRJ; Tue, 16 Sep 2025 16:00: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 58GG0TEs001386; Tue, 16 Sep 2025 16:00:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58GG0T4R001383; Tue, 16 Sep 2025 16:00:29 GMT (envelope-from git) Date: Tue, 16 Sep 2025 16:00:29 GMT Message-Id: <202509161600.58GG0T4R001383@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Zhenlei Huang Subject: git: 0418e6690e91 - main - ipfw: Teach ipfw that EtherIP is an upper layer protocol List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0418e6690e91aa6c38dd9af9da43c4c5a9dc1cd2 Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=0418e6690e91aa6c38dd9af9da43c4c5a9dc1cd2 commit 0418e6690e91aa6c38dd9af9da43c4c5a9dc1cd2 Author: Zhenlei Huang AuthorDate: 2025-09-16 15:58:24 +0000 Commit: Zhenlei Huang CommitDate: 2025-09-16 15:58:24 +0000 ipfw: Teach ipfw that EtherIP is an upper layer protocol so that we do not discard EtherIP packets ( over IPv6 network ) when net.inet6.ip6.fw.deny_unknown_exthdrs is set to 1 ( which is the default value ). PR: 227450 Reviewed by: ae, #network MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D52566 --- sys/netpfil/ipfw/ip_fw2.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sys/netpfil/ipfw/ip_fw2.c b/sys/netpfil/ipfw/ip_fw2.c index 3f810533b7fc..b59d8d08bf80 100644 --- a/sys/netpfil/ipfw/ip_fw2.c +++ b/sys/netpfil/ipfw/ip_fw2.c @@ -67,6 +67,7 @@ #include #include #include +#include #include #include @@ -1757,6 +1758,12 @@ do { \ PULLUP_TO(hlen, ulp, struct ip); break; + case IPPROTO_ETHERIP: /* RFC 3378 */ + PULLUP_LEN(hlen, ulp, + sizeof(struct etherip_header) + + sizeof(struct ether_header)); + break; + case IPPROTO_PFSYNC: PULLUP_TO(hlen, ulp, struct pfsync_header); break; From nobody Tue Sep 16 16:05:34 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cR6FB4pVvz67W08; Tue, 16 Sep 2025 16:05: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 4cR6FB4B1Xz3vPL; Tue, 16 Sep 2025 16:05:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758038734; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KCEY6CMUeWlFoF94Cna2c9/Vv3MNifG5Fljj2gIBUUs=; b=V06nEyBhiT+CnnS38i5JZM6AqfSvDtKPhMfJ3CQNk228L+z5z+7D3jCeKM3i1GStIsIS8q 4mEf/1CT+1klFz9f9F4wExDHTR/L5iTZbunkGb1ACvsVSLaXGpSaB06NUmjRLNKIQM/GQk TPLXkd/es3EqS+A1rr6RArVM35gQlPE8bGCtLvaYZ0lBR3dmaZoR+G1+u3xH/JrskcjeO7 pTbFHvTjnvrRYB7HTnHbEDkaGyQRwHVlZmINW9BHiAUrak4t5hRFA3Qdf3ZzRdESHpYbVK jPN49JevQAXvJOB+h5Vxa/zg+O5lVdQnhOBtyHCZslLoCmq866WUA3KLK0Ps9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758038734; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KCEY6CMUeWlFoF94Cna2c9/Vv3MNifG5Fljj2gIBUUs=; b=eTcAq5L4N1zl7jnkdNq+/Kqn2K9DVKgS0dVpBzi07JVVUz8azheMBJczN7AQyGvIIrLwRY voytRBd8IEbPVkv9LeTNDHcixUhD8Q5DjveK7A2j1TGcCQgvpDbop6z5tRIkck6F88VcNa VoGwI6uGDrOPQ9OqZACB7YAEUA/toX9DdYUK5XdWOr3FfgHzg/dMW/DyP+wSJYE/gkojIT yPrdn3lINLFBWjCbVYh2x25XpEcYHx4mfZqjcR743vpdDIAWzHEG5ivN2XK8PM33nC8hHm Xcu1Pf4BRgN3LEiAGdfCmdz4tZL7bjwdDdIkiwXLqzQF/26U1HLfCu6WbTJhPg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758038734; a=rsa-sha256; cv=none; b=XRk4Pc8/Y3bk+2VaQ7/qkIi03h4CTCzZzyqvyw02MZdDVXJBrdT6h7q2dx7Th6SvoiEoK9 nCUzoCV9D/zbVxhlItM27mdKW5nzxkFK5vZyYGCpmHRXm/WjSmlmYOAiO9EMcKQKoqFg0/ zMEqhv5hkPF0kr69VX47w0FyN+HudJhItGFH7CtFVCcrJ17BRZ3PscYmaN21md7SgUd7Um hjo0jLcQVIKZwDrxESOhH0TALWOWsHj2V1ACSj0/+uEwMhhYRA3Br9vTnh4scGcfGjLB0C yjbIbsj/y+k8rBfkorpw9AKfjtDOZMrOO6BMSsGCgTugm39EOVSaBrMN3MDa3g== 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 4cR6FB2xpMzngq; Tue, 16 Sep 2025 16:05: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 58GG5YtF009514; Tue, 16 Sep 2025 16:05:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58GG5Y8I009511; Tue, 16 Sep 2025 16:05:34 GMT (envelope-from git) Date: Tue, 16 Sep 2025 16:05:34 GMT Message-Id: <202509161605.58GG5Y8I009511@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 22cce201da76 - main - vm/vm_fault.c: update and split comments for vm_fault() and vm_fault_trap() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 22cce201da76a1916be5c993201f0478f3048292 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=22cce201da76a1916be5c993201f0478f3048292 commit 22cce201da76a1916be5c993201f0478f3048292 Author: Konstantin Belousov AuthorDate: 2025-09-16 03:41:55 +0000 Commit: Konstantin Belousov CommitDate: 2025-09-16 16:05:24 +0000 vm/vm_fault.c: update and split comments for vm_fault() and vm_fault_trap() Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differrential revision: https://reviews.freebsd.org/D52567 --- sys/vm/vm_fault.c | 42 ++++++++++++++++++++++++++++++------------ 1 file changed, 30 insertions(+), 12 deletions(-) diff --git a/sys/vm/vm_fault.c b/sys/vm/vm_fault.c index 524aed2be2ff..2e150b368d71 100644 --- a/sys/vm/vm_fault.c +++ b/sys/vm/vm_fault.c @@ -708,21 +708,18 @@ _Static_assert(UCODE_PAGEFLT == T_PAGEFLT, "T_PAGEFLT"); #endif /* - * vm_fault_trap: + * vm_fault_trap: * - * Handle a page fault occurring at the given address, - * requiring the given permissions, in the map specified. - * If successful, the page is inserted into the - * associated physical map. + * Helper for the page fault trap handlers, wrapping vm_fault(). + * Issues ktrace(2) tracepoints for the faults. * - * NOTE: the given address should be truncated to the - * proper page address. + * If a fault cannot be handled successfully by satisfying the + * required mapping, and the faulted instruction cannot be restarted, + * the signal number and si_code values are returned for trapsignal() + * to deliver. * - * KERN_SUCCESS is returned if the page fault is handled; otherwise, - * a standard error specifying why the fault is fatal is returned. - * - * The map in question must be referenced, and remains so. - * Caller may hold no locks. + * Returns Mach error codes, but callers should only check for + * KERN_SUCCESS. */ int vm_fault_trap(vm_map_t map, vm_offset_t vaddr, vm_prot_t fault_type, @@ -1626,6 +1623,27 @@ vm_fault_object(struct faultstate *fs, int *behindp, int *aheadp) return (res); } +/* + * vm_fault: + * + * Handle a page fault occurring at the given address, requiring the + * given permissions, in the map specified. If successful, the page + * is inserted into the associated physical map, and optionally + * referenced and returned in *m_hold. + * + * The given address should be truncated to the proper page address. + * + * KERN_SUCCESS is returned if the page fault is handled; otherwise, a + * Mach error specifying why the fault is fatal is returned. + * + * The map in question must be alive, either being the map for current + * process, or the owner process hold count incremented to prevent + * exit(). + * + * If the thread private TDP_NOFAULTING flag is set, any fault results + * in immediate protection failure. Otherwise the fault is processed, + * and caller may hold no locks. + */ int vm_fault(vm_map_t map, vm_offset_t vaddr, vm_prot_t fault_type, int fault_flags, vm_page_t *m_hold) From nobody Tue Sep 16 16:10:03 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cR6LM2cSdz67WqB; Tue, 16 Sep 2025 16:10:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cR6LM23m8z3vpS; Tue, 16 Sep 2025 16:10:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758039003; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uyujhfx7C++/4nOgQZBVsCcxPILkQ6UAYnBKb2Fm7Cs=; b=tlsT+xcubPpSP/ZXGAvPcxtx6xlR9EeoDSYKBecyQFjgiVont/sDQRxMSYk8Rk2kUc3uxj 4HcUI3VuRhHTo2CX23iE6IS6/p0N2F0A+LCBw8r8UeWJC5rmGTgtrwguS8LPH6npLpp6aX WL18PT0TzgfGWIguz3F4H/Ei8VioTf/JQCGXQRtbbiBBl6a9/Mb8Zaf+V5oDAKw9/075vU yvrtjsrqjp8sIDzu8vcp4+erw7/tTGziyj1A23rMPl0d9Caxie1kxC+u0LVukUcUZnUeIH d2HT2qnP5aoD6iXfdiL5wbGGyfo+HAlGeoVPrDsS/YGyFs8knLzhE6/C6Uaq5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758039003; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uyujhfx7C++/4nOgQZBVsCcxPILkQ6UAYnBKb2Fm7Cs=; b=ni9BLa5KlqaAOpkcL+38bT23tyjDreD3qe/UZGZvcFlhubqZpAanfYPJptCIHuX5KFPPqE 2W4ULHzv8J3GhZlBOB74Cxv71JuEYVDc2FZvMY6q+YPQ4L6Z9xRgd06MJSH+DIcVWUQfyp kBGQ1WmmtKINJLAJaFL/QmzZy0Wn5QvFhMjuSvd1FQz1Qzgjau84gEzN8Nwbt1aQyNP9XI m9vrwofMVwmnrwppns7EFi7R3Vuj7iwh+v3vy+LtnXTM155EkPLBLGsDk0ZSUO0Zf/3Gqb IQ9hx25X5yjJQfvGrSGCM3GyJk6cZyluG0LtYFq3MsEvlqqB1HbXOmboyrEjwQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758039003; a=rsa-sha256; cv=none; b=Hw4bXgCTWh2v4RMNkIoadF2pUqTgmjXhQQknLxRP1C+eNPsO5KpjMWttZkzROYRBWY6gAx KFEX0JFVBjLjMuedw9lULQ80Lc0jgACXQls2jlD9R2cVySYsNOyNgWQfStqj9jzQuuVlay m8a9ofKwSshpCrer3R4smfv8u0miNdcdCtm/eScbJvyfw0Xr4gDjOZh4/QC27yV73QzwVT I+oGU3Dlq6ERQ5MGfiWeXmKQ49LyAabJDo7LGyUbfShkv8E08/nO5S9mBxPUHYeCj89jNG GaPEcFzMmb960YMplo4u+6bkxhYTMVwFizmvxyYJxP1ZXpN26MdW84uTR7w2gA== 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 4cR6LM1Z8cznkL; Tue, 16 Sep 2025 16:10:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58GGA3eP013199; Tue, 16 Sep 2025 16:10:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58GGA3Xe013194; Tue, 16 Sep 2025 16:10:03 GMT (envelope-from git) Date: Tue, 16 Sep 2025 16:10:03 GMT Message-Id: <202509161610.58GGA3Xe013194@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 5eb917426e0a - main - release: Enable installing packages as a non-root user List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5eb917426e0aab1e82c7b0e7239724d18bae206a Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=5eb917426e0aab1e82c7b0e7239724d18bae206a commit 5eb917426e0aab1e82c7b0e7239724d18bae206a Author: Mark Johnston AuthorDate: 2025-09-16 16:05:06 +0000 Commit: Mark Johnston CommitDate: 2025-09-16 16:09:55 +0000 release: Enable installing packages as a non-root user Provide variables, PKG_REPOS_DIR and PKG_REPO_NAME, to allow the user to configure the source package repository. Configure pkg to emit added files to a metalog which gets concatenated with the main metalog immediately before we build the root filesystem. Reviewed by: cperciva, emaste MFC after: 3 days Sponsored by: The FreeBSD Foundation Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D52453 --- release/Makefile.vm | 6 ++++++ release/tools/vmimage.subr | 35 ++++++++++++++++++++++++++--------- share/man/man7/release.7 | 15 ++++++++++++++- 3 files changed, 46 insertions(+), 10 deletions(-) diff --git a/release/Makefile.vm b/release/Makefile.vm index 8375650cd9aa..25c37ade1121 100644 --- a/release/Makefile.vm +++ b/release/Makefile.vm @@ -138,6 +138,9 @@ cw-${_CW:tl}-${_FS}-${_FMT}: ${QEMUTGT} EC2BASEIMG=${.OBJDIR}/${EC2-BASE${_FS:tu}${_FMT:tu}IMAGE} \ ${WITHOUT_QEMU:DWITHOUT_QEMU=true} \ ${NO_ROOT:DNO_ROOT=true} \ + PKG_CMD=${PKG_CMD:Upkg} \ + PKG_REPOS_DIR=${PKG_REPOS_DIR:U${.OBJDIR}/${.TARGET}/etc/pkg} \ + PKG_REPO_NAME=${PKG_REPO_NAME:UFreeBSD-ports} \ PKG_INSTALL_EPOCH=${PKG_INSTALL_EPOCH:U${GITEPOCH}} \ ${.CURDIR}/scripts/mk-vmimage.sh \ -C ${.CURDIR}/tools/vmimage.subr -d ${.OBJDIR}/${.TARGET} \ @@ -191,6 +194,9 @@ vm-image: ${QEMUTGT} QEMUSTATIC=${QEMUSTATIC} \ ${WITHOUT_QEMU:DWITHOUT_QEMU=true} \ ${NO_ROOT:DNO_ROOT=true} \ + PKG_CMD=${PKG_CMD:Upkg} \ + PKG_REPOS_DIR=${PKG_REPOS_DIR:U${.OBJDIR}/${.TARGET}-${FORMAT}-${FS}/etc/pkg} \ + PKG_REPO_NAME=${PKG_REPO_NAME:UFreeBSD-ports} \ PKG_INSTALL_EPOCH=${PKG_INSTALL_EPOCH:U${GITEPOCH}} \ ${.CURDIR}/scripts/mk-vmimage.sh \ -C ${.CURDIR}/tools/vmimage.subr \ diff --git a/release/tools/vmimage.subr b/release/tools/vmimage.subr index 41f889a1e665..b3187efd6526 100644 --- a/release/tools/vmimage.subr +++ b/release/tools/vmimage.subr @@ -163,19 +163,32 @@ vm_extra_enable_services() { } vm_extra_install_packages() { - if [ -n "${WITHOUT_QEMU}" ]; then - return 0 - fi - if [ -z "${VM_EXTRA_PACKAGES}" ]; then return 0 fi - chroot ${DESTDIR} ${EMULATOR} env ASSUME_ALWAYS_YES=yes \ - /usr/sbin/pkg bootstrap -y - for p in ${VM_EXTRA_PACKAGES}; do + if [ -n "${NO_ROOT}" ]; then + for pkg in ${VM_EXTRA_PACKAGES}; do + INSTALL_AS_USER=yes \ + ${PKG_CMD} \ + -o METALOG=${DESTDIR}/METALOG.pkg \ + -o REPOS_DIR=${PKG_REPOS_DIR} \ + -o PKG_DBDIR=${DESTDIR}/var/db/pkg \ + -r ${DESTDIR} \ + install -y -r ${PKG_REPO_NAME} $pkg + done + metalog_add_data ./var/db/pkg/local.sqlite + else + if [ -n "${WITHOUT_QEMU}" ]; then + return 0 + fi + chroot ${DESTDIR} ${EMULATOR} env ASSUME_ALWAYS_YES=yes \ - /usr/sbin/pkg install -y ${p} - done + /usr/sbin/pkg bootstrap -y + for p in ${VM_EXTRA_PACKAGES}; do + chroot ${DESTDIR} ${EMULATOR} env ASSUME_ALWAYS_YES=yes \ + /usr/sbin/pkg install -y ${p} + done + fi return 0 } @@ -219,6 +232,10 @@ vm_extra_pkg_rmcache() { buildfs() { local md tmppool + if [ -f ${DESTDIR}/METALOG.pkg ]; then + cat ${DESTDIR}/METALOG.pkg >> ${DESTDIR}/METALOG + fi + case "${VMFS}" in ufs) cd ${DESTDIR} && ${MAKEFS} ${MAKEFSARGS} -o label=rootfs -o version=2 -o softupdates=1 \ diff --git a/share/man/man7/release.7 b/share/man/man7/release.7 index 36c14afe0bf1..05f80374926f 100644 --- a/share/man/man7/release.7 +++ b/share/man/man7/release.7 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd May 20, 2025 +.Dd September 11, 2025 .Dt RELEASE 7 .Os .Sh NAME @@ -286,6 +286,19 @@ is expected to exist by alternative means. Include base system packages for use with .Xr pkg 8 on the install media, instead of legacy tarball distribution sets. +.It Va PKG_CMD +A path to the +.Xr pkg 8 +executable to use when installing packages in release images as a non-root user. +.It Va PKG_REPOS_DIR +An optional path to a directory containing +.Xr pkg 8 +repository configuration files. +These configuration files will be used when installing packages in release +images as a non-root user. +.It Va PKG_REPO_NAME +The name of the repository configuration to use when installing packages in +release images as a non-root user. .El .Sh EMBEDDED BUILDS The following From nobody Tue Sep 16 17:04:17 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cR7Xy4TTsz67dD5; Tue, 16 Sep 2025 17:04: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 4cR7Xy3C35z47LG; Tue, 16 Sep 2025 17:04:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758042258; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dUjAiOLoXp8XCsv0iF2CPEwOz0tE1Kb0/iIMQbMf/uU=; b=xaS7jaDMmqRRJOK6TdRLdFpOHbuA5kSC9lczlYv7zz1s5LWPsg0UCopN3J0KMnWHk+gJ4e Ka362asvotp+KYLhm3XMCrDW/rinU5wI0dnI5P0iZ1bKY+kR7JYGCI3EQj8QbH6/te6T1Y sZbl6hIXmKp4zEO/5AEWd9txuzNqS7kMoI/LF3y7Z2ZH5J3p4h9p8K7HpNDhz4HUHEU629 0kTSn97KQABfDTT3EuXu9qj8j8HRRXtgkpWSyYfkpnMlifZf5UVDsgShw5sFlKYUbsSXgq TnkP+b3US14b6S8I7ncImNfIi2dXqS3Tv1DRjMIAQunIbWrpS0n+QGlmAIhQNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758042258; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dUjAiOLoXp8XCsv0iF2CPEwOz0tE1Kb0/iIMQbMf/uU=; b=jaivu5N9isphK7nxUKIjq8GFJn49iAJ78AykZzYNPqtl1NHiaZNxOxUJQ/W8M0lszn75Fq fbfzkGI/VcZbcRTN8Btn8JW1GTAlRA7SkBiHbej4EpjncCsB+FpBi6uHXXuL+zxVmwgfIH iMeCnSseWpZK/j2ZNzH715b7QRjLgeS6gb69FpVKNrmXcgjxRMofTJIYTmP4SFBabk1rEq bccpXKkFThbFYyN4bBiOTe7u2AuRzoYp4IxlPQxhGIlbM5SKzQwKzY2Ef4N/iwFOl2tnyv e4cFv7rj3miNtf6pHsso9z4z/+8HBgFIB1h/kh1dkGYyjrwqSMADoffXQVYmXg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758042258; a=rsa-sha256; cv=none; b=ZfcbThoMgJtCewE18gX1q6cw2EQRl9TtkZ+GlBOUzkTIiY6GDq/huA7hxWpOFeLo2/vUBS gasvK1+KhzmfBbrq2WRo8k2S10uOLM77LjeGz0bkSZ9PsJQVK8EEpkqorEU7CuVDkKrBvh DWMlUlmn4llY2JUJAGIe65j7X2t1msHC89aBPeAnXt9dwYZUOQBnJlyTxQeXVDp9DcNKJq Hxvzo/dVagaYOtxW1iFusD4WmpeQU57FlsTehGI2/lI6zr9w/Lz9tfOWBAJOhfpRN4f5Ir fAUdB2/DN2UHtpvuX/0Xt6q15XoZhkkGDEkAHsd1LYt0f8NBIc/Q1OBjW/mwyQ== 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 4cR7Xy0b8hzqJ3; Tue, 16 Sep 2025 17:04: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 58GH4HXC022625; Tue, 16 Sep 2025 17:04:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58GH4Hg1022622; Tue, 16 Sep 2025 17:04:17 GMT (envelope-from git) Date: Tue, 16 Sep 2025 17:04:17 GMT Message-Id: <202509161704.58GH4Hg1022622@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 87a78d9618ab - main - packages: remove src from base set List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 87a78d9618ab5430b12dd5c54ec61fcaeb8f0655 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=87a78d9618ab5430b12dd5c54ec61fcaeb8f0655 commit 87a78d9618ab5430b12dd5c54ec61fcaeb8f0655 Author: Isaac Freund AuthorDate: 2025-09-16 15:01:00 +0000 Commit: Ed Maste CommitDate: 2025-09-16 17:02:50 +0000 packages: remove src from base set The FreeBSD-src package is the largest single pkgbase package at 158M currently. Remove it and FreeBSD-src-sys (87M) from the base set as they are not useful to all users. Reviewed by: emaste, ivy Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D52573 --- release/packages/sets/src.ucl | 5 +++++ release/packages/ucl/src-all.ucl | 4 ++++ release/packages/ucl/src-sys-all.ucl | 4 ++++ 3 files changed, 13 insertions(+) diff --git a/release/packages/sets/src.ucl b/release/packages/sets/src.ucl new file mode 100644 index 000000000000..eada5dbde641 --- /dev/null +++ b/release/packages/sets/src.ucl @@ -0,0 +1,5 @@ +comment = "System source code" + +desc = < To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 36edc5014f63 - main - packages: remove tests from base set List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 36edc5014f633c1f00031f5fc5a291f8cdd46d83 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=36edc5014f633c1f00031f5fc5a291f8cdd46d83 commit 36edc5014f633c1f00031f5fc5a291f8cdd46d83 Author: Isaac Freund AuthorDate: 2025-09-16 15:01:09 +0000 Commit: Ed Maste CommitDate: 2025-09-16 17:02:50 +0000 packages: remove tests from base set Create a new tests package set to hold the tests, which are not useful to all users and don't belong in the base set. Reviewed by: emaste, ivy Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D52574 --- release/packages/generate-ucl.lua | 4 ++++ release/packages/sets/tests.ucl | 5 +++++ release/packages/ucl/tests-all.ucl | 4 ++++ 3 files changed, 13 insertions(+) diff --git a/release/packages/generate-ucl.lua b/release/packages/generate-ucl.lua index 47f0a0e9a6a9..211766067952 100755 --- a/release/packages/generate-ucl.lua +++ b/release/packages/generate-ucl.lua @@ -191,6 +191,10 @@ elseif pkgname:match("%-lib32$") then -- support or you don't. elseif pkgname:match("%-dev$") or pkgname:match("^lib.*%-man$") then set = "devel" +-- Don't separate tests and tests-dbg into 2 sets, if the user wants tests +-- they should be able to debug failures. +elseif set == "tests" then + set = set -- If this is a -dbg package, it goes in -dbg, which means the user can -- install debug symbols only for the sets they have installed. elseif pkgname:match("%-dbg$") then diff --git a/release/packages/sets/tests.ucl b/release/packages/sets/tests.ucl new file mode 100644 index 000000000000..88426a54a807 --- /dev/null +++ b/release/packages/sets/tests.ucl @@ -0,0 +1,5 @@ +comment = "System test suite" + +desc = < To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jilles Tjoelker Subject: git: 779812d66989 - main - init: Use root's home directory in single-user mode List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jilles X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 779812d66989a9c3aaed09e4573400fc137f92b0 Auto-Submitted: auto-generated The branch main has been updated by jilles: URL: https://cgit.FreeBSD.org/src/commit/?id=779812d66989a9c3aaed09e4573400fc137f92b0 commit 779812d66989a9c3aaed09e4573400fc137f92b0 Author: Jilles Tjoelker AuthorDate: 2025-09-14 21:53:34 +0000 Commit: Jilles Tjoelker CommitDate: 2025-09-16 20:36:41 +0000 init: Use root's home directory in single-user mode When starting single-user mode, use the home directory from user root as current directory and for the HOME environment variable. If the directory does not exist, set HOME=/. Also adjust /root/.profile to stop setting HOME, since it should always have been set now. This is intended to keep shell startup files working in single-user mode after /.profile has been removed. Reviewed by: emaste, ivy, kevans MFC after: 1 week Relnotes: yes Differential Revision: https://reviews.freebsd.org/D52527 --- bin/sh/dot.profile | 2 -- sbin/init/init.c | 14 +++++++++++--- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/bin/sh/dot.profile b/bin/sh/dot.profile index d27a2ae2fdbe..cba9bcf18ad9 100644 --- a/bin/sh/dot.profile +++ b/bin/sh/dot.profile @@ -1,6 +1,4 @@ # -HOME=/root -export HOME PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:~/bin export PATH TERM=${TERM:-xterm} diff --git a/sbin/init/init.c b/sbin/init/init.c index b345c8fa219a..d28501053c7f 100644 --- a/sbin/init/init.c +++ b/sbin/init/init.c @@ -851,9 +851,9 @@ single_user(void) const char *shell; char *argv[2]; struct timeval tv, tn; + struct passwd *pp; #ifdef SECURE struct ttyent *typ; - struct passwd *pp; static const char banner[] = "Enter root password, or ^D to go multi-user\n"; char *clear, *password; @@ -885,6 +885,7 @@ single_user(void) */ open_console(); + pp = getpwnam("root"); #ifdef SECURE /* * Check the root password. @@ -892,7 +893,6 @@ single_user(void) * it's the only tty that can be 'off' and 'secure'. */ typ = getttynam("console"); - pp = getpwnam("root"); if (typ && (typ->ty_status & TTY_SECURE) == 0 && pp && *pp->pw_passwd) { write_stderr(banner); @@ -909,7 +909,6 @@ single_user(void) } } endttyent(); - endpwent(); #endif /* SECURE */ #ifdef DEBUGSHELL @@ -930,6 +929,15 @@ single_user(void) } #endif /* DEBUGSHELL */ + if (pp != NULL && pp->pw_dir != NULL && *pp->pw_dir != '\0' && + chdir(pp->pw_dir) == 0) { + setenv("HOME", pp->pw_dir, 1); + } else { + chdir("/"); + setenv("HOME", "/", 1); + } + endpwent(); + /* * Unblock signals. * We catch all the interesting ones, From nobody Tue Sep 16 20:50:54 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cRDZR1nBYz68332; Tue, 16 Sep 2025 20:50:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cRDZQ69JLz3Vck; Tue, 16 Sep 2025 20:50:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758055854; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IR6HVpQjUtKn8fFh12dH/c/w7rKLkni+UUskqc3GSYk=; b=pNOdOPF7LZ6MOYHolSLuxnl6/8Swh4Fn4S/FDt8Xlw6xr4RFnEkZugdMSyZfLYgBNP3yf4 c3tChwAhH4TaAOaAMBY83XU58TAN0Nen82iXXkIQuQkUvTyXcLv6jGiztNH9wHQIGllWoD AGpBfpWFl+9MMEBqWoiTrhlETI102oeZHbzoUJQSDgoy3Ck5rYIt5UzagxwSJy3dWOB2R6 ece1pfVUW5HWyee6AuG8JlbXq3ZuJIOGfDwxCr6/qQcMENsn5odNPovLFCdZy382usVnpz BvykVF75N9Icfykx7s3+rJyU1iCHETNYJsVoeSVUH1/v97MChkb9LNGHen4P2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758055854; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IR6HVpQjUtKn8fFh12dH/c/w7rKLkni+UUskqc3GSYk=; b=WC1xx04qgQxyuVR4XTyWbc3DZb4Ef6GlMm0klXM7OPgftNOlqbBp4dcpIqtyD3YZHdsp9v 3tBfHGjRA/KkKilup/+/pgJzRpOFkzJ2yzc6nQqiOkZmHwdmmICSgsaYE3zzKWFSRwap2/ /GkyXsliUuvzOmEKx8ex2HM9RRssNew6i+AEvkn6UcYPRBZYSRUPZ/5uG9OeVuG5mStgn9 25wepQCSfdfouN8o3Q42dWdkxP6VYzAaOroPE5FozfNZN54VfljWncpWUW5p3NTf5ZVelw Tl40up9JMX1g0DVD9gXSxqe8XhdvsVyXEqSwEO5jaTkHLK+ihDevmGi0owFW6Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758055854; a=rsa-sha256; cv=none; b=P6iHsVEkb44sqI9d1oQ5bnOrDF+7+bKjAzctr2IOcGGAJKTCmL1a2najIwZJkeTuh0xOsl dAomhp7eMatnoGTmo6Fd3C1pTF22OXmo0OEPLs5NzM7ryIjgljm/AxUbyjm7n582CSQ1az SpASZny2RT0pg7DBr8bGRUXOG1yiS//H5tgws+heRSLE+nF19EsryIOqv7sXZG6ynn/O1o ZAQBeltqeqfEvcAs1keFyo5SkJznlA/eTJCDNbrqFwnyUmthKMAXAhfgGzxzkEQGsBQTns Qb4lVlVgJrQndRz6Rs4mpbJI2xvviWfA4Dkshmu2cDxcRe7fLLLR7j9lBFOldg== 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 4cRDZQ5bGkzwpX; Tue, 16 Sep 2025 20:50: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 58GKos2w046383; Tue, 16 Sep 2025 20:50:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58GKosdh046380; Tue, 16 Sep 2025 20:50:54 GMT (envelope-from git) Date: Tue, 16 Sep 2025 20:50:54 GMT Message-Id: <202509162050.58GKosdh046380@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: f1995d6fc13f - main - release: Prepare GCE cloudware images for building as non-root List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f1995d6fc13fa4a36f83cea3b90f27bce2aca4d9 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=f1995d6fc13fa4a36f83cea3b90f27bce2aca4d9 commit f1995d6fc13fa4a36f83cea3b90f27bce2aca4d9 Author: Mark Johnston AuthorDate: 2025-09-16 16:54:11 +0000 Commit: Mark Johnston CommitDate: 2025-09-16 20:50:33 +0000 release: Prepare GCE cloudware images for building as non-root - Avoid mounting devfs just to list packages and fetch distfiles. - Add metalog entries. Reviewed by: cperciva, emaste MFC after: 3 days Sponsored by: The FreeBSD Foundation Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D52455 --- release/tools/gce.conf | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/release/tools/gce.conf b/release/tools/gce.conf index dc56be30c7ca..a7ccfc27a75c 100644 --- a/release/tools/gce.conf +++ b/release/tools/gce.conf @@ -21,6 +21,7 @@ vm_extra_install_base() { echo 'search google.internal' > ${DESTDIR}/etc/resolv.conf echo 'nameserver 169.254.169.254' >> ${DESTDIR}/etc/resolv.conf echo 'nameserver 8.8.8.8' >> ${DESTDIR}/etc/resolv.conf + metalog_add ./etc/resolv.conf } vm_extra_pre_umount() { @@ -94,25 +95,18 @@ EOF # ports.txz distributions to the target virtual machine disk image # and fetch the sources for the third-party software installed on # the image. - if [ ! -c "${DESTDIR}/dev/null" ]; then - DEVFSISOURS=1 - mkdir -p ${DESTDIR}/dev - mount -t devfs devfs ${DESTDIR}/dev - fi if [ -e "${DESTDIR}/../ftp/src.txz" ]; then tar fxJ ${DESTDIR}/../ftp/src.txz -C ${DESTDIR} fi if [ -e "${DESTDIR}/../ftp/ports.txz" ]; then tar fxJ ${DESTDIR}/../ftp/ports.txz -C ${DESTDIR} - _INSTALLED_PACKAGES=$(chroot ${DESTDIR} pkg info -o -q -a) + _INSTALLED_PACKAGES=$(pkg -r ${DESTDIR} info -o -q -a) for PACKAGE in ${_INSTALLED_PACKAGES}; do - chroot ${DESTDIR} \ - make -C /usr/ports/${PACKAGE} fetch + make -C ${DESTDIR}/usr/ports/${PACKAGE} fetch \ + DISTDIR=${DESTDIR}/usr/ports/distfiles + done fi - if [ "$DEVFSISOURS" = "1" ]; then - umount_loop ${DESTDIR}/dev - fi ## XXX: Verify this is needed. I do not see this requirement ## in the docs, and it impairs the ability to boot-test a copy @@ -128,6 +122,5 @@ vm_emulation_cleanup() { if [ -n "${QEMUSTATIC}" ]; then rm -f ${DESTDIR}/${EMULATOR} fi - umount_loop ${DESTDIR}/dev return 0 } From nobody Tue Sep 16 20:50:51 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cRDZM52mKz683Jx; Tue, 16 Sep 2025 20:50: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 4cRDZM3CTpz3VXM; Tue, 16 Sep 2025 20:50:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758055851; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=o5On6EG8twFjQvGWGUu37bP9jq87Mkg4ke0EZcEOy1k=; b=ErV6zxgTFC55XJCG8WyhYnNdwkC22tY0PB1BKOpw8SK0yawXGZKCd61D9179VTCLKTZOAf HHE8wDO60UbCkQR4ZXc+swgnaN5/5gPfqGWOCoCLjNl//RO8c94PCCBxnF8MLHHP0L3yAP /2g0iKWVwJ0p0CZEKgFQABFNnok71ZPCT6f/9lNnToLkXA/0/KRNY/2dlwvuiJGDE/9bBo OKRYIgCZW1ipHN+SoxYREXqeoQkw0c/8hDj2+Up/Z6JDiHZbzJGWkBRz8vW7wIspNI6h/0 x7wooFYedFuuK5scVuzhk9ixuMPN63sRh0Go5+nrGyKntP/E3/NEu6DiHymb+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758055851; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=o5On6EG8twFjQvGWGUu37bP9jq87Mkg4ke0EZcEOy1k=; b=LG2i6w+EmjkVgOSIHN2ABlkF6nIIPJHmjw7Eql9cVs79rxSGxPjOo1WCAeb6qPZuBApxUh NeHxPre6cmqz3bfBeeolPZiF3P+ChrFB87iMbFN0MrSVkwS/QcpJ4ROAZSMaZ4oBXb06Gk NsnEk6c/CcON53Z9pmiIme3oPWQrkEJ+V6iEDaisWEFxRyXwozRvqr+5LIzmZssj3RAhF/ oncaqVHDZOKkwdmYS6v5vU3TUQ2NyzSefiASP2kKiI9GLW1piLmNhtyLGxKIds3NFgfLBZ 7FEX++HS4V5HakvCJ3E+HoG4BBQW6r/iqsAtszZ7eEF3E7cknDIwYny+BnVRBA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758055851; a=rsa-sha256; cv=none; b=EUKp/t8TlYmxXhHEL3mpif384pxPgDfMG16zZUuLs522SS6JtFSIPnLXHViX/oyYibOv4W YBFvTjPIA+XigJDQjVUwq5gK01ulb6YSTGKr5G2FGmeDFV3yDx+YaM92Ze4lgxJUYXXv5B V0088+S6G/KOY79nIee1UAzW+5622pnKZYtbcE1SPVGGk7CFsT9rhG1oTIHbK9DgoSke1l zmSamZXhQP4YlX9Ei6j7R2e9h0+G9/k3tucMqSFeTJiapQ1hckdlYq/jKmciX6MJW1FFK5 XRr/ZZy9CnLMl4CaZ6viaDYkob3hHX660VMLTVJZhB8/4dQi7tzlkcP28HRDDA== 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 4cRDZM2VjdzwWf; Tue, 16 Sep 2025 20:50: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 58GKopdc046272; Tue, 16 Sep 2025 20:50:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58GKopOR046269; Tue, 16 Sep 2025 20:50:51 GMT (envelope-from git) Date: Tue, 16 Sep 2025 20:50:51 GMT Message-Id: <202509162050.58GKopOR046269@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: bab6b01bcfea - main - release: Make azure cloudware images buildable as non-root List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bab6b01bcfead662b8b10dc52a18beeb42794505 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=bab6b01bcfead662b8b10dc52a18beeb42794505 commit bab6b01bcfead662b8b10dc52a18beeb42794505 Author: Mark Johnston AuthorDate: 2025-09-16 16:53:13 +0000 Commit: Mark Johnston CommitDate: 2025-09-16 20:50:33 +0000 release: Make azure cloudware images buildable as non-root - Don't chroot to uninstall pkg since we don't install pkg in the first place. - Use pw -R instead of chrooting. - Add metalog entries. Reviewed by: cperciva, emaste MFC after: 3 days Sponsored by: The FreeBSD Foundation Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D52451 --- release/tools/azure.conf | 34 ++++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/release/tools/azure.conf b/release/tools/azure.conf index e13b63067fee..7975e1db0822 100644 --- a/release/tools/azure.conf +++ b/release/tools/azure.conf @@ -19,20 +19,25 @@ export NOSWAP=YES export VM_BOOTPARTSOFFSET=1M vm_extra_pre_umount() { - mount -t devfs devfs ${DESTDIR}/dev - - # The firstboot_pkgs rc.d script will download the repository - # catalogue and install or update pkg when the instance first - # launches, so these files would just be replaced anyway; removing - # them from the image allows it to boot faster. - chroot ${DESTDIR} ${EMULATOR} env ASSUME_ALWAYS_YES=yes \ - /usr/sbin/pkg delete -f -y pkg - rm -r ${DESTDIR}/var/db/pkg/repos/FreeBSD-ports - rm -r ${DESTDIR}/var/db/pkg/repos/FreeBSD-ports-kmods - - chroot ${DESTDIR} ${EMULATOR} pw usermod root -h - - - umount ${DESTDIR}/dev + # Remove the pkg package and repo databases as they will likely + # be out of date by the time the image is used. In unprivileged + # builds this is unnecessary as pkg will not be installed to + # begin with. + if [ -z "${NO_ROOT}" ]; then + mount -t devfs devfs ${DESTDIR}/dev + + # The firstboot_pkgs rc.d script will download the repository + # catalogue and install or update pkg when the instance first + # launches, so these files would just be replaced anyway; removing + # them from the image allows it to boot faster. + chroot ${DESTDIR} ${EMULATOR} env ASSUME_ALWAYS_YES=yes \ + /usr/sbin/pkg delete -f -y pkg + umount ${DESTDIR}/dev + rm -r ${DESTDIR}/var/db/pkg/repos/FreeBSD-ports + rm -r ${DESTDIR}/var/db/pkg/repos/FreeBSD-ports-kmods + fi + + pw -R ${DESTDIR} usermod root -h - cat << EOF >> ${DESTDIR}/etc/rc.conf ifconfig_hn0="SYNCDHCP" @@ -51,6 +56,7 @@ boot_serial="YES" mlx4en_load="YES" mlx5en_load="YES" EOF + metalog_add_data ./boot/loader.conf return 0 } From nobody Tue Sep 16 20:50:52 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cRDZN5h7rz682xT; Tue, 16 Sep 2025 20:50: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 4cRDZN44kxz3VTY; Tue, 16 Sep 2025 20:50:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758055852; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lt2yq2ZWFORBpFk5zp8JbmAK5qtENQ/CPVyt8XAvMdQ=; b=tUzJ0yAX/s31qhU1piXGFIBExCmBHIj8fTbxzHehEPwI/vE4rVnSUIHmO/aCb5vxqObmAc rb5SudSSTSVZtlriKLs9FO4UnMScmow+Nh7UEXM4rnQXvWyeOuNtMdI4ZDcANWcjcqZL4M wDehPzguGqZo+WHidqp9q69+FEejKrWW5ts/INh6QQnZ7IlTwFdscN+hlriS5CIsazV1ru ackB0Aopqu7X5+wUL2AFmK41/9Sbyqyj5G0YlFlH7ORgGyFLkF8Zx0zChK0woP9g0t4hQa HwgXhAlX6L121LLkYgh45Of6p1VmtsRpGrfDjL5ki1BJKqS+W8Rl/2w8KYvkug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758055852; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lt2yq2ZWFORBpFk5zp8JbmAK5qtENQ/CPVyt8XAvMdQ=; b=hHgXsbIG5nNEN1uV5ESufcfOzWsmnDWkGpVQX48q/xzZd1QzY9fyGsLe8oz6DhY7ghqjT3 a7kMlO+Hj9wVL0pgNlsmZs90E73hYByZY2jtOGEYnHPOfl3DHsqN5dEfRwk3PB802tb/dY WFvpV+Vgh57mLrrmNowDli0wQhrGy4f/D6H5GNUee4Xu2vQKiy2sV2gjpaCxYVz9mw9Q3k JyTyJEE/1bzSTy9gcbzoyKYWmRrRu7xymo2V+WA33AdQELoCk5/8P3KJqfBYA2Z9GPx8+r S/0xrNQdtVYXUayUqADXaidIV8DdzRcmQDk5X7OUWA9ck/zaayep/1GeYhksiA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758055852; a=rsa-sha256; cv=none; b=eDVRxbIzfzBT1cApo+kxb80NuOz89o2Actjsno9WjvmHFkSfysF7MbAm9DvfhGH9fIZuWQ 0a9nBKefwohu4OrHiZ/x/R2kMW+bYy0r06y5M9mCWZShDjdDV9bh7yIq4A15FeqNLZkJP6 8sbh0xDH0ERt47fRMPsYwwGLsPJWRQuMY8JxfW+sRNXEiJKw8j12j7D4RE4A+p5pWPVVZt 8zbkvK3jdRfKUhLDYDqFroAIIRKlKWTTEgg9Z59bbkzINDklHRSoZr1sP6xrYpUxxyVF0G vE+d4tWGH4HcO2Xh16hlY5VrqOiIwpm5hP+7/DhUb+4afkYWblyiVJiSkoQUng== 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 4cRDZN3hCczwpW; Tue, 16 Sep 2025 20:50:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58GKoqq0046307; Tue, 16 Sep 2025 20:50:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58GKoqwA046304; Tue, 16 Sep 2025 20:50:52 GMT (envelope-from git) Date: Tue, 16 Sep 2025 20:50:52 GMT Message-Id: <202509162050.58GKoqwA046304@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 8027de008d9f - main - release: Prepare EC2 cloudware images to be buildable as non-root List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8027de008d9f3c5cd5509d586f14846abd0f3db2 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=8027de008d9f3c5cd5509d586f14846abd0f3db2 commit 8027de008d9f3c5cd5509d586f14846abd0f3db2 Author: Mark Johnston AuthorDate: 2025-09-16 16:53:35 +0000 Commit: Mark Johnston CommitDate: 2025-09-16 20:50:33 +0000 release: Prepare EC2 cloudware images to be buildable as non-root - Avoid chrooting to uninstall pkg, as it will not be installed in the first place when in non-root mode. - Add metalog entries. Reviewed by: cperciva MFC after: 3 days Sponsored by: The FreeBSD Foundation Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D52452 --- release/tools/ec2-base.conf | 1 + release/tools/ec2-builder.conf | 5 +++++ release/tools/ec2-cloud-init.conf | 1 + release/tools/ec2-small.conf | 1 + release/tools/ec2.conf | 31 ++++++++++++++++++++----------- 5 files changed, 28 insertions(+), 11 deletions(-) diff --git a/release/tools/ec2-base.conf b/release/tools/ec2-base.conf index 3ed20474a4e8..b6354db3d9d1 100644 --- a/release/tools/ec2-base.conf +++ b/release/tools/ec2-base.conf @@ -28,6 +28,7 @@ vm_extra_pre_umount() { # be "new" disks; there is no "previous boot" when they might have # been seen and used already. touch ${DESTDIR}/var/db/ec2_ephemeral_diskseen + metalog_add_data ./var/db/ec2_ephemeral_diskseen # Configuration common to all EC2 AMIs ec2_common diff --git a/release/tools/ec2-builder.conf b/release/tools/ec2-builder.conf index 7927fc13a74d..993dffc565eb 100644 --- a/release/tools/ec2-builder.conf +++ b/release/tools/ec2-builder.conf @@ -28,6 +28,7 @@ vm_extra_pre_umount() { # be "new" disks; there is no "previous boot" when they might have # been seen and used already. touch ${DESTDIR}/var/db/ec2_ephemeral_diskseen + metalog_add_data ./var/db/ec2_ephemeral_diskseen # Configuration common to all EC2 AMIs ec2_common @@ -37,21 +38,25 @@ vm_extra_pre_umount() { # Grab a copy of the ec2-base disk image, and compress it zstd < ${EC2BASEIMG} > ${DESTDIR}/image.zst + metalog_add_data ./image.zst # Disable fortune so we don't have extra noise at login chmod a-x ${DESTDIR}/usr/bin/fortune # Install the AMI-building script install -m 755 ${WORLDDIR}/release/tools/mkami.sh ${DESTDIR}/bin/mkami + metalog_add_data ./bin/mkami 0755 # Install an /etc/rc which juggles disks around for us install -m 755 ${WORLDDIR}/release/tools/rc.amibuilder ${DESTDIR}/etc + metalog_add_data ./etc/rc.amibuilder 0755 # We want to mount from the UFS disk and juggle disks first cat >> ${DESTDIR}/boot/loader.conf <<-EOF vfs.root.mountfrom="ufs:/dev/gpt/rootfs" init_script="/etc/rc.amibuilder" EOF + metalog_add_data ./boot/loader.conf return 0 } diff --git a/release/tools/ec2-cloud-init.conf b/release/tools/ec2-cloud-init.conf index 048202e252f6..2a15ae5c57d8 100644 --- a/release/tools/ec2-cloud-init.conf +++ b/release/tools/ec2-cloud-init.conf @@ -27,6 +27,7 @@ vm_extra_pre_umount() { doas: - permit nopass ec2-user EOF + metalog_add_data ./usr/local/etc/cloud/cloud.cfg.d/98_ec2.cfg return 0 } diff --git a/release/tools/ec2-small.conf b/release/tools/ec2-small.conf index 858836717f5a..e2a348d6ba8f 100644 --- a/release/tools/ec2-small.conf +++ b/release/tools/ec2-small.conf @@ -33,6 +33,7 @@ vm_extra_pre_umount() { # be "new" disks; there is no "previous boot" when they might have # been seen and used already. touch ${DESTDIR}/var/db/ec2_ephemeral_diskseen + metalog_add_data ./var/db/ec2_ephemeral_diskseen # Configuration common to all EC2 AMIs ec2_common diff --git a/release/tools/ec2.conf b/release/tools/ec2.conf index 704a8f3f0073..335db6cca93a 100644 --- a/release/tools/ec2.conf +++ b/release/tools/ec2.conf @@ -22,17 +22,27 @@ export NOSWAP=YES ec2_common() { # Delete the pkg package and the repo database; they will likely be - # long out of date before the EC2 instance is launched. - mount -t devfs devfs ${DESTDIR}/dev - chroot ${DESTDIR} ${EMULATOR} env ASSUME_ALWAYS_YES=yes \ - /usr/sbin/pkg delete -f -y pkg - umount ${DESTDIR}/dev - rm -r ${DESTDIR}/var/db/pkg/repos/FreeBSD-ports - rm -r ${DESTDIR}/var/db/pkg/repos/FreeBSD-ports-kmods + # long out of date before the EC2 instance is launched. In + # unprivileged builds this is unnecessary as pkg will not be + # installed to begin with. + if [ -z "${NO_ROOT}" ]; then + mount -t devfs devfs ${DESTDIR}/dev + chroot ${DESTDIR} ${EMULATOR} env ASSUME_ALWAYS_YES=yes \ + /usr/sbin/pkg delete -f -y pkg + umount ${DESTDIR}/dev + rm -r ${DESTDIR}/var/db/pkg/repos/FreeBSD-ports + rm -r ${DESTDIR}/var/db/pkg/repos/FreeBSD-ports-kmods + fi # Turn off IPv6 Duplicate Address Detection; the EC2 networking # configuration makes it unnecessary. echo 'net.inet6.ip6.dad_count=0' >> ${DESTDIR}/etc/sysctl.conf + metalog_add_data ./etc/sysctl.conf + + # Tell gptboot not to wait 3 seconds for a keypress which will + # never arrive. + printf -- "-n\n" > ${DESTDIR}/boot.config + metalog_add_data ./boot.config # Booting quickly is more important than giving users a chance to # access the boot loader via the serial port. @@ -43,10 +53,6 @@ ec2_common() { # default 2048 bytes of entropy; ask for 64 bytes instead. echo 'entropy_efi_seed_size="64"' >> ${DESTDIR}/boot/loader.conf - # Tell gptboot not to wait 3 seconds for a keypress which will - # never arrive. - printf -- "-n\n" > ${DESTDIR}/boot.config - # The emulated keyboard attached to EC2 instances is inaccessible to # users, and there is no mouse attached at all; disable to keyboard # and the keyboard controller (to which the mouse would attach, if @@ -93,6 +99,7 @@ ec2_common() { # by pressing the "Attention button" a second time, but in the EC2 # environment this delay serves no purpose. echo 'hw.pci.pcie_hp_detach_timeout="0"' >> ${DESTDIR}/boot/loader.conf + metalog_add_data ./boot/loader.conf # Disable KbdInteractiveAuthentication according to EC2 requirements. sed -i '' -e \ @@ -127,6 +134,7 @@ REGION=`fetch -qo- http://169.254.169.254/latest/meta-data/placement/availabilit echo "-nfsv4,minorversion=1,oneopenown ${FS}.efs.${REGION}.amazonaws.com:/" EOF chmod 755 ${DESTDIR}/etc/autofs/special_efs + metalog_add_data ./etc/autofs/special_efs 0755 return 0 } @@ -154,6 +162,7 @@ ec2_base_networking () { /usr/local/sbin/dhclient -6 -nw -N -cf /dev/null $1 EOF chmod 755 ${DESTDIR}/usr/local/libexec/rtsold-M + metalog_add_data ./usr/local/libexec/rtsold-M 0755 return 0 } From nobody Tue Sep 16 20:50:53 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cRDZQ29gtz6835N; Tue, 16 Sep 2025 20:50: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 4cRDZP4m0cz3VZb; Tue, 16 Sep 2025 20:50:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758055853; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rKmbSSzcCiADa3FkzHr8psdMWCGkwVQSjEHXzkobXv8=; b=BhYBo+Ju2MYepfQREChB4XqejVotz1f0B4LsVmDApCYntldl+BqzHmyX6AlVrCzE/HepjT 6i4r1PE7rDBBbmoBCKeo21wlbApRG71RZLlpgJV6wfo7qtEoZH1iLJWjMxHNu3QJCZQm3O c6pSvpYobPqRLX8ZKJHH0HiCbCBcL7J1kMpthPWk1xUTQH1mKX8GQ+dNHWTxFEu7JEKSp3 XeL/YDXW7be0W+r+ikInaXpZNmIqPu0GPsw2WAZe5sLNRGhR9pUXuXAnUbYcMV6ERTB6m+ wCEmJHz+B2/4PSVNBZ6vNUfq9zsHqMunTYMZIrDTGBLcu5LC99MX6393sEyp3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758055853; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rKmbSSzcCiADa3FkzHr8psdMWCGkwVQSjEHXzkobXv8=; b=DV0kJ5+m0yBCOx/DyY9P9/0aOSsTeEZR00nn2GvB0AQ1sN6kGzQRVt6wQrhjWk5zJWOlVj +XmRQ5OKluBbYSRSSN+HTrWvh9h0goRANwdgk+oP9l7HSAyE+X4p8qyZQprWAY7lsEjpiR iGcMMUEWBO241sbnkMQ9GYTMXCFgnQ/JGlnIfqQTnaJvtNRInB+KFw2Fp/8oBgvWYfR9hF AL6vJi2+cRsmRIcC3Oq5L5KaqQ3DYXlG5Iud9ydz0kxAfNCdb7gv1rl/voV8xSGHnfEL6R I8NoTU8OdpcIYcFJg6ECW6ouUatNGv3AanNuYvdyqASK68sIF6js2WFUfFRlbw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758055853; a=rsa-sha256; cv=none; b=IZiPHxkW2sQwXhmiOse6dqeVE4+PLW3uNnl9mhC40KS4fqfKHR9ggMUgR4QhlC/83ZGBiU rlD/7/b2A17+sVj+wxurTH8kpFx/VjwpT6HDF+TmNfEEdLEotS4E52uF/Y2pnIkHS2illN bMYUlvMyLaZEQheNKDajGqz2lcc2QUpQbMn3nOS3SP9sKc9cdh4jdHlOo2grT8LvFqHD4B yIAu/MEoM3F0hvObnXJDWQaNKur0UNnNeTB0x4UPNOTyXb/bEGXyFqdMODEf+Q8nyL7jW8 lA2GnxGyQChspdKshTErSzM3YXeajTH97JeTw4N2q1ye0gnccU1PGpPD0OFaSA== 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 4cRDZP4KdMzx0x; Tue, 16 Sep 2025 20:50: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 58GKorT2046349; Tue, 16 Sep 2025 20:50:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58GKorEs046346; Tue, 16 Sep 2025 20:50:53 GMT (envelope-from git) Date: Tue, 16 Sep 2025 20:50:53 GMT Message-Id: <202509162050.58GKorEs046346@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 8f5791873a30 - main - release: Prepare oracle cloudware images for non-root builds List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8f5791873a30122f72266cc44309933118d7fe36 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=8f5791873a30122f72266cc44309933118d7fe36 commit 8f5791873a30122f72266cc44309933118d7fe36 Author: Mark Johnston AuthorDate: 2025-09-16 16:53:56 +0000 Commit: Mark Johnston CommitDate: 2025-09-16 20:50:33 +0000 release: Prepare oracle cloudware images for non-root builds - Add metalog entries. - Remove a stray entry in the package list. Reviewed by: cperciva, emaste MFC after: 3 days Sponsored by: The FreeBSD Foundation Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D52454 --- release/tools/oracle.conf | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/release/tools/oracle.conf b/release/tools/oracle.conf index 688820be9cbe..ebda3b3d6e61 100644 --- a/release/tools/oracle.conf +++ b/release/tools/oracle.conf @@ -55,6 +55,7 @@ EOF xz_load="YES" zfs_load="YES" EOF + metalog_add_data ./boot/loader.conf cat <<-'EOF' >> ${DESTDIR}/etc/ssh/sshd_config # S11 Configure the SSH service to prevent password-based login @@ -82,10 +83,11 @@ EOF network: renderers: ['freebsd'] EOF + metalog_add_data ./usr/local/etc/cloud/cloud.cfg.d/98_oracle.cfg # Use Oracle Cloud Infrastructure NTP server sed -i '' -E -e 's/^pool.*iburst/server 169.254.169.254 iburst/' \ - ${DESTDIR}/etc/ntp.conf + ${DESTDIR}/etc/ntp.conf return 0 } From nobody Tue Sep 16 20:50:55 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cRDZS1r4Jz6835W; Tue, 16 Sep 2025 20:50:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cRDZS0TX8z3Vcn; Tue, 16 Sep 2025 20:50:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758055856; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=G9fIwXjPI4X4j53hGWeruqRk4r/r7ViDPFl1Jf3GEdE=; b=VkS/gR/YBxSrMbMTHR8w1j/B1AlMOOPWVIvbYDJa0l4r1BLITEeN2f3G6r91MedIYn0+9i Wo/AoV7kxbbyc2jsCetYPrkzTX0NWuBpgM2H3HkGVkFhfgc2jDKyDofDRoPd18a91zp5/4 PemmrVpPHU1do7Z3VZNtDzJwqD84X7pzu9SAUi82Q0kRFaCqE2b8FBkm8xwpfZOQck2+xP EDiYG2rEu2MeXPp046gJJv9ZGY7sHKPbz+r9bpU7xV128jFNjiqyQIz24Nm8J7r0AsuvGx mSKCA/R9MobtsiF2CA+mEPHIUAwZspzj4xsfFp4zQj9dEor4qFBdO16heotKqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758055856; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=G9fIwXjPI4X4j53hGWeruqRk4r/r7ViDPFl1Jf3GEdE=; b=EP8CUH2+GXEfu6xN+mvRwBYXvo/irYF6fq4khA502R7z1DcLgJofS4ziBGfcI4f1n/xBie M2kWtvMpejCVbKvEV5gGEUDDlERibLDA5ExX2MeRYTIdwpNHsLvzSKiX7pXR2WUxOUwVaR upncLN0Fo7pWb8bnuau1BlrJTJLKsrJt5S91RKQByJ1Wy9Gb/QZnkop393Ez/tudbb5JpR v8NzD6dbpP3MdwTa2LlalXTq2FeUTEiW/49CZD9q10jC6c2AfHWH+UMZ/9bK/bFmDh014F cYVYP2x7fSNAYB/ekx7jCeBOLdCmiEjIn+OCJPFo4Z7CN4CWYIVHrKuMvdI1Nw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758055856; a=rsa-sha256; cv=none; b=Vzsjq+CARDVQs0D91Q9JkGRA+3tYgvCtbrxB+VVWWB+sTT+FKHV4l9IcaVryd46Y+hhaar n3mJBnY4FdQAP3hXI0dC7WZCt+xrs109748NlFMwpiiOs7gHJ8uz1XR4ACMLBkCVRF32vP Kd2nl6b1qy9lFbd/R6+/QUnSejeqnMlIDa6n07yb8ydw6AOm4u8MYEFb1ULGM5SIuW2Ta7 Y9oIOHC16ElZ8Nu5lFe6aYUAQSZXkQ9/w0uv3HoIqFNQ2YZTPCsA62jXDhJgelCbBWJzmp 5q3BsrZTZGNhnz42ClFPVBG0Z3br7gcbnkgX/u0dm5Ccci9yBBa54P/SW9uLog== 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 4cRDZR6s80zwmQ; Tue, 16 Sep 2025 20:50:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58GKotjL046420; Tue, 16 Sep 2025 20:50:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58GKotof046417; Tue, 16 Sep 2025 20:50:55 GMT (envelope-from git) Date: Tue, 16 Sep 2025 20:50:55 GMT Message-Id: <202509162050.58GKotof046417@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 135cb071e068 - main - release: Prepare Vagrant cloudware images for building as non-root List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 135cb071e0683ea947c308a2de404d1185558ea6 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=135cb071e0683ea947c308a2de404d1185558ea6 commit 135cb071e0683ea947c308a2de404d1185558ea6 Author: Mark Johnston AuthorDate: 2025-09-16 16:54:25 +0000 Commit: Mark Johnston CommitDate: 2025-09-16 20:50:33 +0000 release: Prepare Vagrant cloudware images for building as non-root Add metalog entries for various files. This is a bit incomplete as pw(8) doesn't yet have support for emitting metalog entries, which we need since it's used here to create an interactive user. Reviewed by: emaste MFC after: 3 days Sponsored by: The FreeBSD Foundation Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D52456 --- release/tools/vagrant.conf | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/release/tools/vagrant.conf b/release/tools/vagrant.conf index 506174d0ea16..7ab0e1238693 100644 --- a/release/tools/vagrant.conf +++ b/release/tools/vagrant.conf @@ -47,19 +47,22 @@ vagrant_common () { -c 'Vagrant User' -d '/home/vagrant' -s '/bin/csh' # Change root's password to vagrant - echo 'vagrant' | /usr/sbin/pw -R ${DESTDIR} \ - usermod root -h 0 + echo 'vagrant' | /usr/sbin/pw -R ${DESTDIR} usermod root -h 0 # Configure sudo to allow the vagrant user echo 'vagrant ALL=(ALL:ALL) NOPASSWD: ALL' >> ${DESTDIR}/usr/local/etc/sudoers # Configure the vagrant ssh keys mkdir ${DESTDIR}/home/vagrant/.ssh - chmod 700 ${DESTDIR}/home/vagrant/.ssh + echo "ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA6NF8iallvQVp22WDkTkyrtvp9eWW6A8YVr+kz4TjGYe7gHzIw+niNltGEFHzD8+v1I2YJ6oXevct1YeS0o9HZyN1Q9qgCgzUFtdOKLv6IedplqoPkcmF0aYet2PkEDo3MlTBckFXPITAMzF8dJSIFo9D8HfdOV0IAdx4O7PtixWKn5y2hMNG0zQPyUecp4pzC6kivAIhyfHilFR61RGL+GPXQ2MWZWFYbAGjyiYJnAmCP3NOTd0jMZEnDkbUvxhMmBYSdETk1rRgm+R4LOzFUGaHqHDLKLX+FIPKcF96hrucXzcWyLbIbEgE98OHlnVYCzRdK8jlqm8tehUc9c9WhQ== vagrant insecure public key" > ${DESTDIR}/home/vagrant/.ssh/authorized_keys echo "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIN1YdxBpNlzxDqfJyw/QKow1F+wvG9hXGoqiysfJOn5Y vagrant insecure public key" >> ${DESTDIR}/home/vagrant/.ssh/authorized_keys - chown -R 1001 ${DESTDIR}/home/vagrant/.ssh chmod 600 ${DESTDIR}/home/vagrant/.ssh/authorized_keys + metalog_add_data ./home/vagrant/.ssh/authorized_keys 0600 + + chmod 700 ${DESTDIR}/home/vagrant/.ssh + chown -R 1001 ${DESTDIR}/home/vagrant/.ssh + echo "./home/vagrant/.ssh type=dir uid=1001 gid=1001 mode=0700" >> METALOG # Reboot quickly, Don't wait at the panic screen echo 'debug.trace_on_panic=1' >> ${DESTDIR}/etc/sysctl.conf @@ -68,6 +71,7 @@ vagrant_common () { # The console is not interactive, so we might as well boot quickly. echo 'autoboot_delay="-1"' >> ${DESTDIR}/boot/loader.conf + metalog_add_data ./boot/loader.conf # The first time the VM boots, the installed "first boot" scripts # should be allowed to run: From nobody Tue Sep 16 21:35:08 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cRFYS4nZzz6867j; Tue, 16 Sep 2025 21:35:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cRFYS3y1Qz3cLk; Tue, 16 Sep 2025 21:35:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758058508; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bKszHXa26KEjHkJdQrEOj5WZAB3cwniQvKre6ceRo7k=; b=Ebx46YN28rkC+BLdPUsDoo/Zy3YSPiHh7E8iW1rxtiKGvN10AzzUCGu0jhaYcD1Gclxzf0 Kh5vIkUH/iH0H5RpUm/VUqTlGMo9ekRLrN68KOAAOls85DYVUGffYtRM1fKb35v+x0eRoN Ip1B9vkcTNchnQg6/qpB+WneRrPV2pebmeeF3KJBTsLBd4gH2Wl7hYM9LeYN+FYWwP6nmr iMXhqqG26o9vUuNQVJjfKxYAz8rKJJ0HshsBon4xdMjJPOYcChKTu5IRxotOp92ST+80uG p9S6Z9k1lkHk0Pr7Sc7G1mBGeIoy8SiuEFcV/Hg63agfbtW0fkbTW2nk/bSayw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758058508; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bKszHXa26KEjHkJdQrEOj5WZAB3cwniQvKre6ceRo7k=; b=KPQWXAYc2MfWyhha0HEMPSEIqOXTFgEDcmb3h+LKWSGB0BdWR+kxZs5C2Fzq8CifGd8i+Q Aioq+WYJFz/Zel2e/xEBf3wI8d+1Tfec/Y/yu6MCD2FOwke9CogTqrBsZcThr4CsA6ceSY JiEm5kUnGhcTnJjN53xip7w+HDCsnSXnLhCYdRZs2zEdG7Fa3fefBCckbFmSZy3aC2euQD AjE/Duh6Egtjx2ESoXSVfzGorvPM12q1DzV1nU5QlHWdNSStNTjK/AFAzIOCrWWA8kn2eM fvPKAxk/tn7i9mDqnnMIAQO4XF/4K9vOuyOWSxX1ySnVjjgJg1edgnl8Eutllg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758058508; a=rsa-sha256; cv=none; b=Ls2us5jtRL5lr+QYLGxbYx2Oq8kA9ohy3QJkUqZoqnynbdQj1FdXuOfIabYH8AeXM18Kva /DB+uMNoi98x4mIGLetGoSfJj2MUhpwjcJAQVyEe/DluNo+w1wg5XfBi496PJAou4/2RFK kxwKbYEL6kJmS2m7Vs1bXUSDI0ZPAa06wpEwgJaItqPTJ9eVLMeKvfrNEVvjmLXPcPguCd IH1VhtJAPFoTxsGjOYRCfqSpSJpTZt2UzUTQ6Ur3XcN0gxgOJBQxd0wD73cR00RLSqo/fU UZ2f8H82544OnUXWIa0CeaxWa0POIJVMK+ra0JWaNQZQ69bY5WA2SrhH1wfqGw== 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 4cRFYS3950zxxB; Tue, 16 Sep 2025 21:35:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58GLZ8rc029591; Tue, 16 Sep 2025 21:35:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58GLZ8BZ029588; Tue, 16 Sep 2025 21:35:08 GMT (envelope-from git) Date: Tue, 16 Sep 2025 21:35:08 GMT Message-Id: <202509162135.58GLZ8BZ029588@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: 1bb72d3d6eee - main - tcp: improve compilation of cc and their helper modules List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1bb72d3d6eee50232b6d6acbc201f9aaac93e2b5 Auto-Submitted: auto-generated The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=1bb72d3d6eee50232b6d6acbc201f9aaac93e2b5 commit 1bb72d3d6eee50232b6d6acbc201f9aaac93e2b5 Author: Michael Tuexen AuthorDate: 2025-09-16 21:30:40 +0000 Commit: Michael Tuexen CommitDate: 2025-09-16 21:30:40 +0000 tcp: improve compilation of cc and their helper modules * Allow the congestion control modules CDG, CHD, HD, and vegas also to be compiled into the kernel for IPv6 only kernel configs. * Compile the helper module h_ertt for round trip time estimation only into the kernel, if one of the congestion control module using it (one of CDG, CDH, HD, or vegas) is also compiled into the kernel. Please note the second point implies that TCP TSO is done whenever possible as long as none of the congestion control modules CDG, CHD, HD, or vegas is loaded or compiled into the kernel. Reviewed by: cc MFC after: 3 days Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D52547 --- sys/conf/files | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/sys/conf/files b/sys/conf/files index 9661bafea8f9..db05a1424f00 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -4369,15 +4369,23 @@ netinet/cc/cc.c optional cc_newreno inet | cc_vegas inet | \ cc_chd inet | cc_cdg inet | cc_newreno inet6 | cc_vegas inet6 | \ cc_htcp inet6 | cc_hd inet6 |cc_dctcp inet6 | cc_cubic inet6 | \ cc_chd inet6 | cc_cdg inet6 -netinet/cc/cc_cdg.c optional inet cc_cdg tcp_hhook -netinet/cc/cc_chd.c optional inet cc_chd tcp_hhook +netinet/cc/cc_cdg.c optional inet cc_cdg tcp_hhook | \ + inet6 cc_cdg tcp_hhook +netinet/cc/cc_chd.c optional inet cc_chd tcp_hhook | \ + inet6 cc_chd tcp_hhook netinet/cc/cc_cubic.c optional inet cc_cubic | inet6 cc_cubic netinet/cc/cc_dctcp.c optional inet cc_dctcp | inet6 cc_dctcp -netinet/cc/cc_hd.c optional inet cc_hd tcp_hhook +netinet/cc/cc_hd.c optional inet cc_hd tcp_hhook | \ + inet6 cc_hd tcp_hhook netinet/cc/cc_htcp.c optional inet cc_htcp | inet6 cc_htcp netinet/cc/cc_newreno.c optional inet cc_newreno | inet6 cc_newreno -netinet/cc/cc_vegas.c optional inet cc_vegas tcp_hhook -netinet/khelp/h_ertt.c optional inet tcp_hhook +netinet/cc/cc_vegas.c optional inet cc_vegas tcp_hhook | \ + inet6 cc_vegas tcp_hhook +netinet/khelp/h_ertt.c optional inet tcp_hhook cc_cdg | \ + inet tcp_hhook cc_chd | inet tcp_hhook cc_hd | \ + inet tcp_hhook cc_vegas | inet6 tcp_hhook cc_cdg | \ + inet6 tcp_hhook cc_chd | inet6 tcp_hhook cc_hd | \ + inet6 tcp_hhook cc_vegas netinet/sctp_asconf.c optional inet sctp | inet6 sctp netinet/sctp_auth.c optional inet sctp | inet6 sctp netinet/sctp_bsd_addr.c optional inet sctp | inet6 sctp From nobody Tue Sep 16 21:44:00 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cRFlj1B7fz6872k; Tue, 16 Sep 2025 21:44: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 4cRFlj0HtSz3cqp; Tue, 16 Sep 2025 21:44:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758059041; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9qsqxeoXk1XI+dXczrKdzeNeXE5b8ngAk6nhOXbZdaU=; b=VIRsL+wbypIMOIYIovraFdhlIsReeqoUOhtWCpkyUNQc+zvgxdaBHjl2l7bUSHUC0cIM5/ g3Rk2FIFQHG9KFGXPKHN5JetyjYWYegRBGxbsAm+tl3Xna3I55F8b/5nWNC+P75Fw8h3Ht HtyXZnJCWWfXuv8r7DMyyWOSexmpy+DtjdaAsOBpjYRibjTQ84LEuQHPDKTp6LJNpvsO03 7UdIyVDvIjpYf9zoRoLJPwFP5vzz5rNyfHGXCAkKRZ3n5qo8rKQUIUJgT84WDPbpTX55CO Zg/1y7Pq7tkm14FB9rEesP+5++ZYHROli5vVUomxHl+vqDT3T0BqWa8kdELdzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758059041; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9qsqxeoXk1XI+dXczrKdzeNeXE5b8ngAk6nhOXbZdaU=; b=VqxnvXY3H0GrRSAjEdHa4rqQBakxmAVYNybgKvse7aTfXGIF/qboirSh2InLHN2cxTFKhk ryijyqFZUDG2BJ0zlFm7qzuWq+z8c1DwWNIqeyJ55ueoGKZob8jU1Zmf3Bk7rbu1G11XpH SNSyqqC699JOCjW6lRbYOnaQ7WhZlgAcUWPTAzwHzDiQa6o4lrshTXb+lg3d3dujOlYVdS 7Gl+SRfRCndqIlYm3XsVm0EW+IgoeKyMQBKeI3kqoXhhGwc+1ZNUyL3WC4KM0A4ZhEsSp3 6DoA9heF3a9E9MWlO2hmw8Gld5i/sNSwmDxvT+l3tIF0VCDp3Zy8nIkesdn0ug== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758059041; a=rsa-sha256; cv=none; b=kIf+ngsoWdJs1+oDgWWBgwpEk9Uo29UAGpOx3GSB7R1GUMH8Ck1egsIJEipBl1QQ1wS+05 aThGMqOengS4mOkieJvhzaZq8CahpWuWcwk64hIWSo9aQApAefv84w2uw2Mh7go6oYYrbX 79uWPYcna/OjKkfyRcCD7LTNwdO3AkRfuVD1WkFoQreYTziTz1mz29WCcA/e9xJ+JtJnaD YNacOYzk8zqqAvEpJJqjB+KIpkLXUzeejcazBelfScQr1RwYUGss+QfqowN9EnCHs3wFAi 95QYwXTwMqwGdc53zysk3jOJ1unkql78RY5OEldTrb67pVZK7Gc1yxdn9QK8yg== 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 4cRFlh6r0Wzxxq; Tue, 16 Sep 2025 21:44: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 58GLi0Vb048345; Tue, 16 Sep 2025 21:44:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58GLi0Kg048342; Tue, 16 Sep 2025 21:44:00 GMT (envelope-from git) Date: Tue, 16 Sep 2025 21:44:00 GMT Message-Id: <202509162144.58GLi0Kg048342@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: 5da388d93917 - main - vtnet: deprecate loader tunable fixup_needs_csum List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5da388d93917f5fa74022960cc65452592f71539 Auto-Submitted: auto-generated The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=5da388d93917f5fa74022960cc65452592f71539 commit 5da388d93917f5fa74022960cc65452592f71539 Author: Timo Völker AuthorDate: 2025-09-16 21:37:45 +0000 Commit: Michael Tuexen CommitDate: 2025-09-16 21:37:45 +0000 vtnet: deprecate loader tunable fixup_needs_csum If this tunable is enabled and vtnet receives a packet with VIRTIO_NET_HDR_F_NEEDS_CSUM set, vtnet computes the TCP/UDP checksum and writes it in the checksum field. This was somewhat useful when vtnet pretended that such a packet has a correct checksum and set the mbuf flag CSUM_DATA_VALID. But this is not the case anymore. Reviewed by: tuexen MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D52546 --- share/man/man4/vtnet.4 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/share/man/man4/vtnet.4 b/share/man/man4/vtnet.4 index 1df79da5f42e..0594ca70e99a 100644 --- a/share/man/man4/vtnet.4 +++ b/share/man/man4/vtnet.4 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd September 8, 2025 +.Dd September 16, 2025 .Dt VTNET 4 .Os .Sh NAME @@ -84,6 +84,8 @@ field of the structure .Vt struct virtio_net_hdr . It also marks the checksum as being correct in the mbuf packet header. The default value is 0. +This tunable is deprecated and will be removed in +.Fx 16 . .It Va hw.vtnet.tso_disable .It Va hw.vtnet. Ns Ar X Ns Va .tso_disable This tunable disables TCP segmentation offloading. From nobody Tue Sep 16 23:11:55 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cRHj82nnYz67mb8; Tue, 16 Sep 2025 23:11:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cRHj75PMLz3rYZ; Tue, 16 Sep 2025 23:11:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758064315; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dLbekfPsqF9Osr3Tol1UBHLVHWJcyxZBVB15uNX+akQ=; b=SNMyPRLWqfEUlzKnZ5YW0jL2/OTKTLu/QYEUNXy9rof4ctm4FDl8JtgmYeWWWrmcNKifuG dMM9JalbLNA06CSgrG6MycHEOB835Cn66+TGu5DPAvDaggV+ZjI1D8WR16yv58I+UiNyHy JKpua27qCrE7rqGjphOObXpCYkl54T2iMMNU3UeYx6f1lNtYMA6AQN2drnmfiq43AwEDFD AsGngIUqQba25HZt5O9+v07NyAXKEBwsTCOnmRkmF2h44yPUSNtT+U/CgJ/8StwkDCYjx8 Xh//+0ye4pdJ1V3Nl1K+WQPnLv4F9o4DlkcISrg9mK7xj9WCVJZZg+2b6nh39g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758064315; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dLbekfPsqF9Osr3Tol1UBHLVHWJcyxZBVB15uNX+akQ=; b=rd5lWQXF4gEAERp9ikr+6Vz3+bld7owin/YsBqBAJVGeMy9QPCXO8cKDqZmD/y2tsXM21N ViQi6Duo6+FQL5zGuXqZZHt+Dz1Fr9ZyB0mlUGCFaiX5Qtl73fcYiJUYd8yutlEDZRvO06 PZeOH8gDFNwHkWAiIIQgoB6tgtTZ+RanLtVvDSzHJHbSi7njmwPxjnpTc08JrWlVf2A1ba 5+ksb+5Kr5v6TrNSTVqJIzFU5c3WeGzlLMBL0SkQ8f4CJ2oHfZ2dsxmW0qhrpG9D0UEWyQ nokycaqe8yUu0hDnuoqS24SUKCXsMSih8385AXcKkpJcE67bZOLXtzyXgxRy1w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758064315; a=rsa-sha256; cv=none; b=L32LdIzk1b96ZZHqfycWDT+4P/7a2OGvFioHSz7t402m5iJFn4838feEblk3jOHC8p3siL tXnjl7LxSV8iBJdI7Vn6KMaW7d+q5THYS6+TiKYb4fK1PRQq+RUNzASQUWdaFo05eUsxC1 aNXSdWRafC/4x/rW9dPDGY/VwNeZiuZnLDcrgnPSWu20JaISed+XDfwUS9VnFBeBoxnt/+ 2SfZ6uQLeoIy3oSEaqJVtcjezsqM8U8G6K+dAgogenN0YRzdbvYWb6ATekTDIAAqUlZXuy nk2XGmTN9HMojkqvLFDjKgD3NwzIwABp5NRC7/zDI/ERplwXgTucetrbrdbs2w== 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 4cRHj73W0xz11Qx; Tue, 16 Sep 2025 23:11:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58GNBtLf013555; Tue, 16 Sep 2025 23:11:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58GNBtiH013552; Tue, 16 Sep 2025 23:11:55 GMT (envelope-from git) Date: Tue, 16 Sep 2025 23:11:55 GMT Message-Id: <202509162311.58GNBtiH013552@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Enji Cooper Subject: git: d18058b7b850 - main - crypto/openssl: apply polish to new vendor import process List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d18058b7b850c78f2ca1be746ab411c0bed5acc9 Auto-Submitted: auto-generated The branch main has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=d18058b7b850c78f2ca1be746ab411c0bed5acc9 commit d18058b7b850c78f2ca1be746ab411c0bed5acc9 Author: Enji Cooper AuthorDate: 2025-08-22 00:19:25 +0000 Commit: Enji Cooper CommitDate: 2025-09-16 23:11:48 +0000 crypto/openssl: apply polish to new vendor import process This change does the following 2 things: - Makes the build more repeatable by isolating the environment. This prevents bmake from leaking variables into gmake and makes the overall process a bit more robust. - Add debug printouts to make the process more straightforward to the reader and whoever is executing doing the current vendor import. MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D52420 --- crypto/openssl/BSDmakefile | 73 ++++++++++++++++++++++++++++------------------ 1 file changed, 45 insertions(+), 28 deletions(-) diff --git a/crypto/openssl/BSDmakefile b/crypto/openssl/BSDmakefile index bd2bfe0ea033..514c87ae3a8e 100644 --- a/crypto/openssl/BSDmakefile +++ b/crypto/openssl/BSDmakefile @@ -12,8 +12,10 @@ LCRYPTO_SRC= ${SRCTOP}/crypto/openssl LCRYPTO_DOC= ${LCRYPTO_SRC}/doc CAT?= /bin/cat +GMAKE?= gmake MV?= /bin/mv PERL?= perl +SETENVI= /usr/bin/env -i BN_CONF_H= include/crypto/bn_conf.h BN_CONF_H_ORIG= ${BN_CONF_H}.orig @@ -23,8 +25,11 @@ CONFIGURATION_H_ORIG= ${CONFIGURATION_H}.orig .PHONY: configure patch all .ORDER: configure patch all +LOCALBASE= /usr/local +WRK_ENV= PATH=${LOCALBASE}/bin:/bin:/usr/bin + configure: - @cd ${.CURDIR} && \ + @(cd ${.CURDIR} && ${SETENVI} \ ${PERL} ./Configure \ disable-aria \ disable-egd \ @@ -37,34 +42,45 @@ configure: enable-ktls \ enable-sctp \ --openssldir=etc \ - --prefix=/usr - @cd ${.CURDIR} && gmake configdata.pm - @cd ${LCRYPTO_SRC} && ${PERL} \ - ${LCRYPTO_SRC}/freebsd/dump_version_from_configdata.pl > \ - ${SRCTOP}/secure/lib/libcrypto/Makefile.version + --prefix=/usr) + @echo "Building configdata.pm for later use." + @(cd ${.CURDIR} && \ + ${SETENVI} ${WRK_ENV} ${GMAKE} -j ${.MAKE.JOBS} configdata.pm) -all: patch - # Passing `-j ${.MAKE.JOBS}` doesn't work here for some reason. - @cd ${.CURDIR} && gmake build_all_generated + @echo "Populating Makefile.version with release information" + @(cd ${LCRYPTO_SRC} && ${SETENVI} ${WRK_ENV} ${PERL} \ + ${LCRYPTO_SRC}/freebsd/dump_version_from_configdata.pl > \ + ${SRCTOP}/secure/lib/libcrypto/Makefile.version) - # Clean the pkgconfig files: - # 1. Fix --prefix (not sure why configure --prefix isn't honored properly). +all: patch + @echo "==> Building generated files (headers, manpages, etc)" + @(cd ${.CURDIR} && \ + ${SETENVI} ${WRK_ENV} ${GMAKE} -j ${.MAKE.JOBS} build_all_generated) + + # 1. Fix --prefix. + # a. Not sure why --prefix isn't honored properly, even though it's + # passed to Configure; the files might be getting rebuilt + # post-Configure, somehow. # 2. Remove duplicate path in CFLAGS. # 3. Remove duplicate path in includedir(s). + @echo "==> Fixing pkgconfig files" @find . -name \*.pc -print -exec sed -i '' -E \ -e 's,^prefix=.+,prefix=/usr,' \ -e 's,[[:space:]]+(\-I)?\$\{prefix\}/\./include[[:space:]]*,,g' \ {} + - @cd ${SRCTOP}/secure/lib/libcrypto && \ - ${MAKE} cleanasm && \ - ${MAKE} buildasm + @echo "==> Cleaning / rebuilding ASM" + @(cd ${SRCTOP}/secure/lib/libcrypto && \ + ${SETENVI} ${WRK_ENV} ${MAKE} cleanasm && \ + ${SETENVI} ${WRK_ENV} ${MAKE} buildasm) + @echo "==> Syncing manpages (section 1)" @rsync -a --delete \ --exclude 'Makefile*' --exclude '*.1' \ ${LCRYPTO_DOC}/man/ \ ${SRCTOP}/secure/lib/libcrypto/man + @echo "==> Syncing manpages (sections {3,5,7})" @rsync -a --delete \ --exclude 'Makefile*' --exclude '*.[357]' \ ${LCRYPTO_DOC}/man/man1/ \ @@ -75,25 +91,26 @@ all: patch # depending on the host architecture. patch: configure # Spam arch-specific overrides to config files. + @echo "==> Patching headers" + @(cd ${.CURDIR} && ${SETENVI} ${WRK_ENV} ${GMAKE} ${BN_CONF_H} && \ + ${MV} ${BN_CONF_H} ${BN_CONF_H_ORIG} && \ + ${CAT} ${BN_CONF_H}.orig \ + ${LCRYPTO_SRC}/freebsd/${BN_CONF_H} >> \ + ${BN_CONF_H}) - @cd ${.CURDIR} && gmake ${BN_CONF_H} && \ - ${MV} ${BN_CONF_H} ${BN_CONF_H_ORIG} && \ - ${CAT} ${BN_CONF_H}.orig \ - ${LCRYPTO_SRC}/freebsd/${BN_CONF_H} >> \ - ${BN_CONF_H} - - @cd ${.CURDIR} && \ - ${MV} ${CONFIGURATION_H} ${CONFIGURATION_H_ORIG} && \ - ${CAT} ${CONFIGURATION_H_ORIG} \ - ${LCRYPTO_SRC}/freebsd/${CONFIGURATION_H} >> \ - ${CONFIGURATION_H} + @(cd ${.CURDIR} && \ + ${MV} ${CONFIGURATION_H} ${CONFIGURATION_H_ORIG} && \ + ${CAT} ${CONFIGURATION_H_ORIG} \ + ${LCRYPTO_SRC}/freebsd/${CONFIGURATION_H} >> \ + ${CONFIGURATION_H}) clean: .PHONY - @cd ${.CURDIR} && rm -f ${BN_CONF_H_ORIG} ${CONFIGURATION_H_ORIG} + @(cd ${.CURDIR} && rm -f ${BN_CONF_H_ORIG} ${CONFIGURATION_H_ORIG}) - @cd ${SRCTOP}/secure/lib/libcrypto && ${MAKE} cleanasm + @(cd ${SRCTOP}/secure/lib/libcrypto && \ + ${SETENVI} ${WRK_ENV} ${MAKE} cleanasm) - -@cd ${.CURDIR} && gmake ${.TARGET} + -@(cd ${.CURDIR} && ${GMAKE} ${.TARGET}) .include From nobody Wed Sep 17 00:30:37 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cRKRx5MXwz67sn9; Wed, 17 Sep 2025 00:30: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 4cRKRx4lKmz45bv; Wed, 17 Sep 2025 00:30:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758069037; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eMG3VORSaEysI+IxUltq02jbNJQsgl/qIXCS3E+bw78=; b=LdXBwOuX9MWHKEPM+fgkevcxb1wwMqJNmHWtgnBd5weI31R1pm7WYrrzwRbcYkTXVGKRyU G42bZb6mOuNt4U6TSvsxBM+Wt8tGSjcbkbwD9dKdpagw1NetXArgge6MK1lwY8aDl4ejk8 x9ZwvcwmQ+dLcnQxA23kYduiOPOvg5vfczlHyMm/yxpDaj3Z43vWgnlrplQEF/xXMqdN3T sNZ4faodSv7HkWPge+On0ZTtFNvbGhcPsPFz1uBKFGornaieWl1eBalrz/CMdlIaRUJTeo 11c+owkXUBu8Ikv8ODwjSm0cqAiSmO7OR4UnsXpeOa8fyrZ9UVYsmjJMbUKaig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758069037; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eMG3VORSaEysI+IxUltq02jbNJQsgl/qIXCS3E+bw78=; b=nbAwKS82z86yU/SunAyuWhYOwael7GZLnlDZ6HSXRV4DWRwV9sr0zDlp7ifPAseWrkqRMa Bc2TSog8HdPXuv1jEj87dBDSVs+ojJvqqNruy6HBNL5hB1LnwwBnBckBw950KduXndl0fL OiAi743FfcRix8q+054WkshcXgqAqX+v8vDmQ7y6vgHLbPX/rtHAp5RakPpmJX9qWdfBLc Kx3xCvhU1bSZG2D4jrAExrUnrxUJWLlupjl01qDovZWWEj9P7Tjamz8NOnJ5Wb2Wha4Rgo OasMrL1kw7coDfhrhuihPPg4C3iWqdRhpVUBVIlWO5VQAQwIbsuY/n8HEJUFIw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758069037; a=rsa-sha256; cv=none; b=uln878pUXiqPRvP+Q3AcPz0y3fOnPvFREb+GSRw4aalHIbUZ1nKzdDdMdw5JgDASV7KcTN GdFTVSugEWEJ4Lv8S/nZVIyZTTZpkqwywxocg2BtT09x7ksefru5IbQGOYsdUBLAEf2qgZ k+GIsJWTinyraMnzNFb8Oq3iYE6vAHRNDLAYP8m8pCneTlEs0e/K+6QqUEuFIL8pojN1uj MJYBmiq9QhY59tnTJXz+TGvbHw2c3enbvSM9BQ2buwbYi44125j+mcGZ/9XGRGHzo8cdd3 PG/8t4lrjvQcKEh0TorrWj5/77qty0I3r11w5ldov+PE9OcigVzRr9tsPzWdfg== 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 4cRKRx4LjWz13C3; Wed, 17 Sep 2025 00:30: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 58H0UbrM058279; Wed, 17 Sep 2025 00:30:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58H0UbC3058276; Wed, 17 Sep 2025 00:30:37 GMT (envelope-from git) Date: Wed, 17 Sep 2025 00:30:37 GMT Message-Id: <202509170030.58H0UbC3058276@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jose Luis Duran Subject: git: dea1dd669054 - main - pf tests: Add python3 as a dependency List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: dea1dd66905462e3b65688928dc4016eeae4ce80 Auto-Submitted: auto-generated The branch main has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=dea1dd66905462e3b65688928dc4016eeae4ce80 commit dea1dd66905462e3b65688928dc4016eeae4ce80 Author: Jose Luis Duran AuthorDate: 2025-09-17 00:26:49 +0000 Commit: Jose Luis Duran CommitDate: 2025-09-17 00:26:49 +0000 pf tests: Add python3 as a dependency These tests use pft_ping.py, which requires python3 and Scapy. Reviewed by: ngie Approved by: emaste (mentor) Fixes: 65c318630123 ("pf: Add prefer-ipv6-nexthop option for route-to pools") MFC after: 10 days Differential Revision: https://reviews.freebsd.org/D52589 --- tests/sys/netpfil/pf/route_to.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tests/sys/netpfil/pf/route_to.sh b/tests/sys/netpfil/pf/route_to.sh index 872de0dcbb91..13b60c8f80bc 100644 --- a/tests/sys/netpfil/pf/route_to.sh +++ b/tests/sys/netpfil/pf/route_to.sh @@ -968,6 +968,7 @@ table_loop_head() { atf_set descr 'Check that iterating over tables poperly loops' atf_set require.user root + atf_set require.progs python3 scapy } table_loop_body() @@ -1032,6 +1033,7 @@ roundrobin_head() { atf_set descr 'multiple gateways of mixed AF, including prefixes and tables, for IPv6 packets' atf_set require.user root + atf_set require.progs python3 scapy } roundrobin_body() @@ -1094,6 +1096,7 @@ random_table_head() { atf_set descr 'Pool with random flag and a table for IPv6' atf_set require.user root + atf_set require.progs python3 scapy } random_table_body() @@ -1131,6 +1134,7 @@ random_prefix_head() { atf_set descr 'Pool with random flag and a table for IPv4' atf_set require.user root + atf_set require.progs python3 scapy } random_prefix_body() @@ -1167,6 +1171,7 @@ prefer_ipv6_nexthop_single_ipv4_head() { atf_set descr 'prefer-ipv6-nexthop option for a single IPv4 gateway' atf_set require.user root + atf_set require.progs python3 scapy } prefer_ipv6_nexthop_single_ipv4_body() @@ -1219,6 +1224,7 @@ prefer_ipv6_nexthop_single_ipv6_head() { atf_set descr 'prefer-ipv6-nexthop option for a single IPv6 gateway' atf_set require.user root + atf_set require.progs python3 scapy } prefer_ipv6_nexthop_single_ipv6_body() @@ -1269,6 +1275,7 @@ prefer_ipv6_nexthop_mixed_af_roundrobin_ipv4_head() { atf_set descr 'prefer-ipv6-nexthop option for multiple gateways of mixed AF with prefixes and tables, round robin selection, for IPv4 packets' atf_set require.user root + atf_set require.progs python3 scapy } prefer_ipv6_nexthop_mixed_af_roundrobin_ipv4_body() @@ -1337,6 +1344,7 @@ prefer_ipv6_nexthop_mixed_af_roundrobin_ipv6_head() { atf_set descr 'prefer-ipv6-nexthop option for multiple gateways of mixed AF with prefixes and tables, round-robin selection, for IPv6 packets' atf_set require.user root + atf_set require.progs python3 scapy } prefer_ipv6_nexthop_mixed_af_roundrobin_ipv6_body() @@ -1407,6 +1415,7 @@ prefer_ipv6_nexthop_mixed_af_random_table_ipv4_head() { atf_set descr 'prefer-ipv6-nexthop option for a mixed-af table with random selection for IPv4 packets' atf_set require.user root + atf_set require.progs python3 scapy } prefer_ipv6_nexthop_mixed_af_random_table_ipv4_body() @@ -1444,6 +1453,7 @@ prefer_ipv6_nexthop_ipv4_random_table_ipv4_head() { atf_set descr 'prefer-ipv6-nexthop option for an IPv4-only table with random selection for IPv4 packets' atf_set require.user root + atf_set require.progs python3 scapy } prefer_ipv6_nexthop_ipv4_random_table_ipv4_body() @@ -1479,6 +1489,7 @@ prefer_ipv6_nexthop_ipv4_random_table_ipv6_head() { atf_set descr 'prefer-ipv6-nexthop option for an IPv4-only table with random selection for IPv6 packets' atf_set require.user root + atf_set require.progs python3 scapy } prefer_ipv6_nexthop_ipv4_random_table_ipv6_body() @@ -1516,6 +1527,7 @@ prefer_ipv6_nexthop_ipv6_random_prefix_ipv4_head() { atf_set descr 'prefer-ipv6-nexthop option for an IPv6 prefix with random selection for IPv4 packets' atf_set require.user root + atf_set require.progs python3 scapy } prefer_ipv6_nexthop_ipv6_random_prefix_ipv4_body() @@ -1544,6 +1556,7 @@ prefer_ipv6_nexthop_ipv6_random_prefix_ipv6_head() { atf_set descr 'prefer-ipv6-nexthop option for an IPv6 prefix with random selection for IPv6 packets' atf_set require.user root + atf_set require.progs python3 scapy } prefer_ipv6_nexthop_ipv6_random_prefix_ipv6_body() @@ -1572,6 +1585,7 @@ prefer_ipv6_nexthop_ipv4_random_prefix_ipv4_head() { atf_set descr 'prefer-ipv6-nexthop option for an IPv4 prefix with random selection for IPv4 packets' atf_set require.user root + atf_set require.progs python3 scapy } prefer_ipv6_nexthop_ipv4_random_prefix_ipv4_body() @@ -1600,6 +1614,7 @@ prefer_ipv6_nexthop_ipv4_random_prefix_ipv6_head() { atf_set descr 'prefer-ipv6-nexthop option for an IPv4 prefix with random selection for IPv6 packets' atf_set require.user root + atf_set require.progs python3 scapy } prefer_ipv6_nexthop_ipv4_random_prefix_ipv6_body() From nobody Wed Sep 17 05:32:00 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cRS8645Szz68HD6 for ; Wed, 17 Sep 2025 05:32:22 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic306-19.consmr.mail.gq1.yahoo.com (sonic306-19.consmr.mail.gq1.yahoo.com [98.137.68.82]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4cRS862Hhbz3gw1 for ; Wed, 17 Sep 2025 05:32:22 +0000 (UTC) (envelope-from marklmi@yahoo.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=yahoo.com header.s=s2048 header.b="SYEO/QFh"; dmarc=pass (policy=reject) header.from=yahoo.com; spf=pass (mx1.freebsd.org: domain of marklmi@yahoo.com designates 98.137.68.82 as permitted sender) smtp.mailfrom=marklmi@yahoo.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1758087136; bh=h/HSvK9MD8poosT0OPtYwEt+yposHAlUmkLVUPcpDD4=; h=From:Subject:Date:To:References:From:Subject:Reply-To; b=SYEO/QFhvQSrsU5dkm4nMyEqf02QxA+JZ29nIU57xb5MyNrkPvu26VpuQL9qmgsOnD3Selt61QRn20gvrSRqonmFoNd+mlLwvo4xqND7Gj61eHlwLeZb07WQlodhQD3XHrOMkQrxLOHaavigefSagCQcv7UpE3wG6rPkvFsiDUYlF00uUsR8dDjMAY6cNDqTwYBw1zV1PD7LC4Yvdd/UwzokhXq8lwNrqwZ4EvzEL9OmUa0jR/g4o2/hQbiGjVuxeq8d+swd2UBg8N8cgxUQkPae2sXrdfvonGcO/iRrhUEENUrV3joVb6LCR+CAAOKqEKcGjJt6P87ka1d8Tc+SRA== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1758087136; bh=x9Z35K3+lq1ul11DRHORfFa6YekRfE1NAWvzMSjHsrd=; h=X-Sonic-MF:From:Subject:Date:To:From:Subject; b=WuDcOXwpgMoiwfSjcc5bVB2fg7yvGkPaqwPiBv/4dK1pD4hfWnagXBdePipBPR12EKczioqahRlmZvoEXA8O5QKFx1OMBx1nUHFLZpGMWZaAIQqJonaYE76qj0c6OLeCs4tb4BZM4fwrYYmkA+E9KJTZViB6b0PeHrU81h4XFdxXVXxf3nKsneLUrySfZB28+9eoEnt2fxhNx2XGcQXCzEIa1FDW5VR6iXvGq8+mA6C0/rbsHjxJtenbcbexYeCA86mOm+b4l8P9JO6912DHwg8kNIM8nD2b5Q8eGvoTEIQDXoOVby9iGArwk0qFW9JeaA01JqiTZrxM8GiIWTTVMQ== X-YMail-OSG: WFGDStsVM1nNT2bPBiMENCUjmdXMkuJq2kyOsIChu80qUbcEP4gX5faVLGF4S89 FqbWQryUHAAVfDcNepsAhJGEczgnK5F3cyoLmy1Tw9jSDjluSgLLMcm1dLws0WIX2UyEQKDvr3Su PQeqjz8aV.6aaqvYeAsbV9fTtTipzEcbHcvCoC.A8rPnwLK9rH6wbpkL5w3oVurOYlhB4sQESqh_ us5EAU_R2_BUAAHG.hp0k9glmRBrDsP.Gg4qWjKof6afqzxuKe5lRiKhLHR0V6T756zTElGNxNwL SU.VdJvdNjVM5jMOl1BoaXDJf_ExJq9ItrpCfn7FA.PDrqIOAcADht43AdV6XL6KGS_tWxKI4tsh Pr4a3DIqv9jCBqt3eqwUEgiVS69dpIJuIt_w97RND2qnJNJakutgYbSer2PjomFqErtbuD0D.4up 3KM3IdQsr6CrFAL2yKpaJLNgUPfmmvAjEOCahiz8WfpxsL2wOXvTt3GRSeLHQL7.IW66qH89Iwmc OzlyrbOxxTqj4jbajdN0wfpQoyKZ4QLmQMcB_rEphSu5ZDgQzvEzIdSYN5x8UvosZQl0CSgWPHWC xBAHeSjlYXRlGWsqZaCKamVRFcDf0hwvcoWkHtQrO7amqek0FsLigb2I52VpHRBU9QpXmRSeBGRi U9lk6tubtEH1poBzK2OsQnfTPxCZYKY4a7OQO83sdEQvUf.UpbUClMBhXfIfuLoTtNuZj3TKzkK2 GovsRKAG1u4IYw9G_vU7pvanzaSQM3A4vAZ5xyDQm41abkRl9IsCCxzijQv1M_8KF_XOUUvWxNty cg_w7VWvysQSCASSqc.yIPkiIGBG_kNQWzqaD44X4f7aDG10nSFBDBkOaT5Mb8oj6UuZCvrI3u9y YgrhUNa1UL7k3y56A2UxAJp7jzGCJA4ZR2vkZMSWsglRqZbmCTgnVF1_sA41HntdTPDbnNDHVZ_j t84UWay_m2pLbY9M6XiahCEqTgMxLd3joMNYEAYBG3QOImTIUeB9.PWfm.HW0V_A0dvSQwO4KPKb 5Jj4_sAo5eOYQDBXR_f_ybTJXz6i6wH2fG2VUhvl_z7Sjn0EmJ0esRqpvmsgc4bLsMdtD.11VE44 zO8T4mQkLMIBNM2b_uRwg5X5KWtXHcCIJsVCXrKxXz0JqA6Y1cm5NVc0zuUbReHXmJNXstqqwE7d YFILAsDPvX3QCfMyAb_TLHnXdV_kgskoXLY9OVL5UD6eUWOmVQGNqdObY0Dhs70_dnkW6K9Uvn63 HfiJHPOt3WOCa8RXE7Qep3VI8J_O1yKIouRTBdGr2hDRRoTY9ikeZbcSuB39astI13UG2xg5lwe1 b5L5gUsg4NvDGbmvwBV31BS_UVrrVF5u5JRXVlszrcm8jdVKq7XlIhvOSxny7ObAMDnNSS0GAQN6 r87hFf.TEYqhkuvQz0v81gKrrz4TtbVwWis_uJWoTzdddChwqSZEuCdS4KsX196jKLjHgo64Pcsi Iazddi0I.XKe_3xqIwPmnAsD_8M7XWhN8RTpnTiADl77bBjaKtNT9DFuAiU1.qqb7PXAR1lj5E.t 9adDguklpjDHqseSaStHWrgjFOAnjBw_Tdqy2st8O0He.QlvFVLuaRDKMzqe9WHS8HJRisW._.ZX 3yTJIcR9PsTp.IBp0UAcCWYIuLOYBjcHmtJ2c1uXPiJKyqZqcFbCusQi26lXdANYisXiluizcJgY EX9ORjwCEHjAJh6vt8GoH57IgGrAv9SjaKLCNJ1QFkaW3XYCKPsDmk.gwm4JEhqORWcDbSv6gzZv 9xaivcHdHV36iJB572DtplsAVchCCGg9sm5DeSfexUdAJJlbMlggw0CEUrpWIjSLoT4K_x496E5Y _lVQ.eYAGcLIURg52yYHA3M7IwL07yDXV_fIt8S4xKXrKiDaky7ztM6QgNXo96y2_WmsV8OLgmbR ntPJsx41CL1SXlhbUdIjqjyrl7vmpQP7FRK19AYJvbjMrU.aHZWLjVBAPa8KfA8_qFroYaWXhzKc ppg_uCeky6_0Eoh6fJZ.E8fsS7EHj44AHCQiE7NPtD5mwDIJM.4FbrlZ7ZSfaK4n4y1hHnVPLD_6 Ewggx06kpAPP1f7g65PZK8zOML.tk.EvWb0C5uq2yeaTvxY4jOpoZ1UtGLMM1S2dM7T_1wqB2jSM p2o5n_SosxxnFs5NSag6_Inlm5SV8ftDaZ7U6ZZtpajOWpVpY5o04qhMiCt.hWFpUaOGL0wIcIF8 tW8hlMPxr4fVjrxDQ7T.kmTd649oyk1kir3En56bHqlg30g-- X-Sonic-MF: X-Sonic-ID: 1a28170e-60bb-492c-8971-47130db92a29 Received: from sonic.gate.mail.ne1.yahoo.com by sonic306.consmr.mail.gq1.yahoo.com with HTTP; Wed, 17 Sep 2025 05:32:16 +0000 Received: by hermes--production-gq1-6f9f7cb74b-qdz6k (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID c6ee5969e805403b17158dfd6e28a7bb; Wed, 17 Sep 2025 05:32:10 +0000 (UTC) From: Mark Millard Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3826.700.81\)) Subject: Re: git: e779891327b1 - main - sys/power: Sleep type reporting by PM backends Message-Id: <6DF1A387-06ED-482F-8FCB-66CA6373B04D@yahoo.com> Date: Tue, 16 Sep 2025 22:32:00 -0700 To: Cy Schubert , dev-commits-src-main@freebsd.org, "obiwac@freebsd.org" X-Mailer: Apple Mail (2.3826.700.81) References: <6DF1A387-06ED-482F-8FCB-66CA6373B04D.ref@yahoo.com> X-Spamd-Bar: --- X-Spamd-Result: default: False [-4.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.998]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; TO_DN_EQ_ADDR_SOME(0.00)[]; ARC_NA(0.00)[]; TO_DN_SOME(0.00)[]; MIME_TRACE(0.00)[0:+]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim]; FREEMAIL_FROM(0.00)[yahoo.com]; DKIM_TRACE(0.00)[yahoo.com:+]; FROM_HAS_DN(0.00)[]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; MLMMJ_DEST(0.00)[dev-commits-src-main@freebsd.org]; APPLE_MAILER_COMMON(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RWL_MAILSPIKE_POSSIBLE(0.00)[98.137.68.82:from]; RCVD_IN_DNSWL_NONE(0.00)[98.137.68.82:from] X-Rspamd-Queue-Id: 4cRS862Hhbz3gw1 Cy Schubert wrote on Date: Tue, 16 Sep 2025 05:02:39 UTC : > In message <202509142159.58ELx5Rg054606@gitrepo.freebsd.org>, Aymeric = Wibo writ > es: > > The branch main has been updated by obiwac: > > > > URL: = https://cgit.FreeBSD.org/src/commit/?id=3De779891327b1d9b9ab10ba482e59f498= > > 790505a7 > > > > commit e779891327b1d9b9ab10ba482e59f498790505a7 > > Author: Aymeric Wibo > > AuthorDate: 2025-09-14 21:58:13 +0000 > > Commit: Aymeric Wibo > > CommitDate: 2025-09-14 21:58:15 +0000 > > > > sys/power: Sleep type reporting by PM backends > >=20 > > Allow PM backends to report supported sleep types when registering > > through `power_pm_register`. Expose this information through > > `kern.power.supported_stype` sysctl, and set defaults for > > `power_standby/suspend/hibernate_stype` based on this. > >=20 > > Implement this in ACPI PM backend. > >=20 > > Reviewed by: mckusick (mentor), markj > > Approved by: mckusick (mentor), markj > > Sponsored by: The FreeBSD Foundation > > Differential Revision: https://reviews.freebsd.org/D52044 > > --- > . . . > >=20 > > >=20 > One of this series of ACPI commits has broken power management on my = machines. > One of which managed to capture a dump from a kernel panic after = poweroff(8) > was issued. This is mostly a "me too" with poorer quality data collection. The context here is an AMD 7950X3D based desktop system, using the builtin video for the console, no video card present. The crash was too late for the USB keyboard to work, I had to plug in a PS2 keyboard. But it was also, apparently, too late for a dump to then work. It was from a "shutdown -r now" just after a pkgbase'd upgrade of the world. (Previous reboot was for updating the kernel, so the below does identify the kernel that was in operation.) The pkgbase materials (old and new) were from official distributions. # uname -apKU FreeBSD 7950X3D-ZFS 16.0-CURRENT FreeBSD 16.0-CURRENT = main-n280397-5da388d93917 GENERIC-NODEBUG amd64 amd64 1600000 1600000 Expect "typos" and such from the conversion to text from the cell phone image: QUOTE Fatal trap 12: page fault while in kernel mode cpuid =3D 0; apic id =3D 00 fault virtual address=3D 0x88 fault code=3D supervisor read data, page not present instruction pointer=3D0x20:0xffffffff80bb7464 stack pointer=3D0x28:0xfffffe027d40dab0 frame pointer=3D0x28:0xfffffe027d40dab0 code segment=3Dbase Ox0, limit Oxfffff, type Ox1b =3D DPL 0, pres 1, long 1, def32 0, gran 1 processor eflags=3D interrupt enabled, resume, IOPL =3D 0 current process=3D 1 (init) rdi: 0000000000000000 rsi: ffffffff804be800 rdx: fffffe827d40dbb0 rcx: 0000000000000000 r8: 0000000000000075 r9: 0000000000000000 rax: 0000000000000005 rbx: fffff8010b33d440 rbp: fffffe027d40dab0 r10: cacacacacacacaca r11: 000000005f42535f r12: fffff8010b33d440 r13: 0000000000000000 r14: 0866966600000005 r15: 0000000066860009 trap number=3D 12 panic: page fault cpuid =3D 0 time =3D 1758083117 KDB: stack backtrace: db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame = 0xfffffe027d40d800 vpanic() at vpanic+0x136/frame 0xfffffe027d40d930 panic() at panic+0x43/frame 0xfffffe027d40d990 trap_pfault() at trap_pfault+0x3c9/frame 0xfffffe027d40d9e0 calltrap() at calltrap+0x8/frame 0xfffffe027d40d9e0 -- trap 0xc, rip =3D 0xffffffff80bb7464, rsp =3D 0xfffffe027d40dab0, rbp = =3D 0xfffffe027d40dab0 =E2=80=94-- device_get_softc() at device_get_softc+0x4/frame 0xfffffe027d40dab0 acpi_wake_prep() at acpi_wake_prep+0x65/frame 0xfffffe027d4adbf0 AcpiNsWalkNamespace() at AcpiNsWalkNamespace+0x10b/frame = 0xfffffe027d40dc50 AcpiWalkNamespace() at AcpiWalkNamespace+=C4=90x95/frame = 0xfffffe027d40dcb0 acpi_shutdoun() at acpi_shutdoun+0x64/frame 0xfffffe027d40dce0 bus_generic_shutdoun() at bus_generic_shutdown+0x16/frame = 0xfffffe027d40dd00 bus_generic_shutdoun() at bus_generic_shutdown+0x16/frame = 0xfffffe027d40dd20 root_bus_module_handler() at root_bus_module_handler+0x126/frame = =C2=A9xfffffe027d40dd40 module_shutdown() at module_shutdown+0x6c/frame 0xfffffe027d40dd60 kern_reboot() at kern_reboot+0x6b7/frame 0xfffffe027d40ddb0=20 sys_rebooto at sys_reboot+0x413/frame 0xfffffe027d40de00 amd64_syscall() at amd64_syscal1+0x126/frame @xfffffe027d40df30 fast_syscall_common() at fast_syscall_common+0xf8/frame = 0xfffffe027d40df30 -- syscall (55, FreeBSD ELF64, reboot), rip =3D 0x2941ba, rsp =3D = 0x8210f0aca, rbp =3D 0x8210f0bb0 -=3D- END QUOTE (kgdb) disass device_get_softc Dump of assembler code for function device_get_softc: 0xffffffff80bb7460 <+0>: push %rbp 0xffffffff80bb7461 <+1>: mov %rsp,%rbp 0xffffffff80bb7464 <+4>: mov 0x88(%rdi),%rax 0xffffffff80bb746b <+11>: pop %rbp 0xffffffff80bb746c <+12>: ret End of assembler dump. Given "fault virtual address=3D 0x88": %rdi=3D=3D0, matching the register value listing. Dump of assembler code for function acpi_wake_prep: 0xffffffff804c45e0 <+0>: push %rbp 0xffffffff804c45e1 <+1>: mov %rsp,%rbp 0xffffffff804c45e4 <+4>: push %r15 0xffffffff804c45e6 <+6>: push %r14 0xffffffff804c45e8 <+8>: push %r13 0xffffffff804c45ea <+10>: push %r12 0xffffffff804c45ec <+12>: push %rbx 0xffffffff804c45ed <+13>: sub $0x108,%rsp 0xffffffff804c45f4 <+20>: mov %rdi,%rbx 0xffffffff804c45f7 <+23>: mov (%rdx),%r14d 0xffffffff804c45fa <+26>: cmpb $0x0,0x14fde37(%rip) # = 0xffffffff819c2438 0xffffffff804c4601 <+33>: je 0xffffffff804c46c4 = 0xffffffff804c4607 <+39>: lea -0x128(%rbp),%rsi 0xffffffff804c460e <+46>: mov %rbx,%rdi 0xffffffff804c4611 <+49>: call 0xffffffff804c0210 = 0xffffffff804c4616 <+54>: test %eax,%eax 0xffffffff804c4618 <+56>: jne 0xffffffff804c49d9 = 0xffffffff804c461e <+62>: movq $0x0,-0x40(%rbp) 0xffffffff804c4626 <+70>: lea -0x40(%rbp),%rdx 0xffffffff804c462a <+74>: mov %rbx,%rdi 0xffffffff804c462d <+77>: mov $0xffffffff804be800,%rsi 0xffffffff804c4634 <+84>: call 0xffffffff80402530 0xffffffff804c4639 <+89>: mov -0x40(%rbp),%r15 0xffffffff804c463d <+93>: mov %r15,%rdi 0xffffffff804c4640 <+96>: call 0xffffffff80bb7460 = . . . =3D=3D=3D Mark Millard marklmi at yahoo.com From nobody Wed Sep 17 08:30:48 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cRX6F0Z0Bz68Tck for ; Wed, 17 Sep 2025 08:31:01 +0000 (UTC) (envelope-from eduardo@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cRX6D5GNdz40Wh for ; Wed, 17 Sep 2025 08:31:00 +0000 (UTC) (envelope-from eduardo@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758097860; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=dAxT0EaRNGzMeijCkTl3GNDYbXF2pkGhpUq9UzJY+Q8=; b=ioeDHlbD+3Z/pwQkWc30uUdK3jLD1oYoMGwBM5usp+gRWSFboIJjtH1BIZGz8JjkY+ejJK 3IxWaNoGBhkym9rTfCAkGNcUsSlXNcJH4DtYr7FoW++c/iGYI0IccCh41V8h2ibSw08u5i Nxt8j5Ssj+j4YZVIHZL4FvV8vuH8ALam7idYRdijtgJi6Q8RjvffwJaj4xXRUISShsbmHO t5f1nwh8tHtsTgGXW+VecHXs7OcGITBB2+cpOIwHHmaYHfIF4SN8rapQhEb//cPe2VX6t8 l9h4EuoY+goFdOEdip7wlW5pD/vJwd4e7QxEODF40e1StniAwnV62UCpElpR/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758097860; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=dAxT0EaRNGzMeijCkTl3GNDYbXF2pkGhpUq9UzJY+Q8=; b=avcpczJUsgSS7GYOG0J829gNB5lRvRPzAE2yzAoDpao5yxic+ZeBHr6jqALl8GA8gC3lgP +xa4BrocH4U8ym22nARVB3cz04JV2xTnLRnozRMYr9jA4e0NzXYDw76q/V3aSqFE27Y34e 640IttvYXoAN3JOwFkOYwTY5r/XXUkytLoLQq2xo2aXFACmlZ/NCNwcqep6NWmDLHWlWwS 1bI2F9vprlclSIYOHwE6t8FQ4H7CI8/vRBjc3gDBOCsNbPZV6R5rcvPS1ZjhfkqGsfKmy0 fEOnrk58LQZwi38WsPu0JGscy/le0w8EU2IUIHqsTfS4eeGABhHFe9Zv3GjhTw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758097860; a=rsa-sha256; cv=none; b=eeX5d00ii7GdCB3vu7bVInN+L8vuF7d0jslZLnK+PgkTXbMSEeYfEgBRQVTjVTYIt7uYgO 7HIwLdXI26yCjla3gtOeTaU8wzUPOmxOruR3ampqu3sjcsavp3ky+KOmI2JoLjVeOOcfWS 3V12ky91VrCo3PBcvPmd2T02m0v7KFmNKxThahtkfI3nSnSLFHB3YJqhjYWWpciVOa+OhV rVZnglDXips09cdAQguip6R/YiZhk0fk/V1yP/mx2YHuZ+ULWdYzgwapKWnNk1pAX4MBPl iYLPy5oo6BgA793mooeMmT/aJOo7S1R5VYUoTlV4YI35EHUq7K/Zu61+n20rcw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from mail-qt1-f171.google.com (mail-qt1-f171.google.com [209.85.160.171]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) (Authenticated sender: eduardo) by smtp.freebsd.org (Postfix) with ESMTPSA id 4cRX6D4T9sz13X5 for ; Wed, 17 Sep 2025 08:31:00 +0000 (UTC) (envelope-from eduardo@freebsd.org) Received: by mail-qt1-f171.google.com with SMTP id d75a77b69052e-4b7a69fb918so1542151cf.1 for ; Wed, 17 Sep 2025 01:31:00 -0700 (PDT) X-Forwarded-Encrypted: i=1; AJvYcCWWBcklmHgfvANeezhgXeHyCX83sz9TSVRrs/5Av9MfHDtzwbIU5vRghX3RnNm/zDUYnc40nnZqx/GLoXb33GwpklbWCw==@freebsd.org X-Gm-Message-State: AOJu0YzvqbgJhsOOPZSgHmeETL0Nfo/A7L9WNN6kGJDJEIAK0Bv/q1BZ B+tZUJ0FAM3s61LNkUyAEs5uooszc05KBVkJoyF7SWFqyKgEV67rXdcgv77kcyd8s87zMKD6R+S 6kk20diIWsznQUovCRASMhL29FR3vJ1U= X-Google-Smtp-Source: AGHT+IEnuqepwjj2KcOZtjCiHR4/mNUY13g7X9gZtCxo4XT03h6R2+nfZPcp+2XsDozqqiUFJGwB3i4LOVFpjwoDBiM= X-Received: by 2002:a05:622a:28d:b0:4b5:d5d7:ffc7 with SMTP id d75a77b69052e-4ba6c4c69a0mr10120691cf.13.1758097859839; Wed, 17 Sep 2025 01:30:59 -0700 (PDT) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 References: <6DF1A387-06ED-482F-8FCB-66CA6373B04D.ref@yahoo.com> <6DF1A387-06ED-482F-8FCB-66CA6373B04D@yahoo.com> In-Reply-To: <6DF1A387-06ED-482F-8FCB-66CA6373B04D@yahoo.com> From: Nuno Teixeira Date: Wed, 17 Sep 2025 09:30:48 +0100 X-Gmail-Original-Message-ID: X-Gm-Features: AS18NWAYMsBr8PP8esV5cCnV6rA2eokOm7bm5HYxEYoCA2b4_UeqRUejbARsoeQ Message-ID: Subject: Re: git: e779891327b1 - main - sys/power: Sleep type reporting by PM backends To: Mark Millard Cc: Cy Schubert , dev-commits-src-main@freebsd.org, "obiwac@freebsd.org" Content-Type: multipart/alternative; boundary="0000000000006a9081063efb0e9f" --0000000000006a9081063efb0e9f Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hello Mark, I see that crash too on upgrade from yesterday 2025-09-16 on reboot. I used bectl to put me back to latest working main, 2025-09-06. Thanks, Mark Millard escreveu (quarta, 17/09/2025 =C3=A0(s) 06:= 32): > Cy Schubert wrote on > Date: Tue, 16 Sep 2025 05:02:39 UTC : > > > In message <202509142159.58ELx5Rg054606@gitrepo.freebsd.org>, Aymeric > Wibo writ > > es: > > > The branch main has been updated by obiwac: > > > > > > URL: > https://cgit.FreeBSD.org/src/commit/?id=3De779891327b1d9b9ab10ba482e59f49= 8 > > > 790505a7 > > > > > > commit e779891327b1d9b9ab10ba482e59f498790505a7 > > > Author: Aymeric Wibo > > > AuthorDate: 2025-09-14 21:58:13 +0000 > > > Commit: Aymeric Wibo > > > CommitDate: 2025-09-14 21:58:15 +0000 > > > > > > sys/power: Sleep type reporting by PM backends > > > > > > Allow PM backends to report supported sleep types when registering > > > through `power_pm_register`. Expose this information through > > > `kern.power.supported_stype` sysctl, and set defaults for > > > `power_standby/suspend/hibernate_stype` based on this. > > > > > > Implement this in ACPI PM backend. > > > > > > Reviewed by: mckusick (mentor), markj > > > Approved by: mckusick (mentor), markj > > > Sponsored by: The FreeBSD Foundation > > > Differential Revision: https://reviews.freebsd.org/D52044 > > > --- > > . . . > > > > > > > > > > One of this series of ACPI commits has broken power management on my > machines. > > One of which managed to capture a dump from a kernel panic after > poweroff(8) > > was issued. > > This is mostly a "me too" with poorer quality > data collection. The context here is an AMD > 7950X3D based desktop system, using the builtin > video for the console, no video card present. > The crash was too late for the USB keyboard to > work, I had to plug in a PS2 keyboard. But it > was also, apparently, too late for a dump to > then work. > > It was from a "shutdown -r now" just after a > pkgbase'd upgrade of the world. (Previous reboot > was for updating the kernel, so the below does > identify the kernel that was in operation.) > The pkgbase materials (old and new) were from > official distributions. > > # uname -apKU > FreeBSD 7950X3D-ZFS 16.0-CURRENT FreeBSD 16.0-CURRENT > main-n280397-5da388d93917 GENERIC-NODEBUG amd64 amd64 1600000 1600000 > > Expect "typos" and such from the conversion to > text from the cell phone image: > > QUOTE > Fatal trap 12: page fault while in kernel mode > cpuid =3D 0; apic id =3D 00 > fault virtual address=3D 0x88 > fault code=3D supervisor read data, page not present > instruction pointer=3D0x20:0xffffffff80bb7464 > stack pointer=3D0x28:0xfffffe027d40dab0 > frame pointer=3D0x28:0xfffffe027d40dab0 > code segment=3Dbase Ox0, limit Oxfffff, type Ox1b > =3D DPL 0, pres 1, long 1, def32 0, gran 1 > processor eflags=3D interrupt enabled, resume, IOPL =3D 0 > current process=3D 1 (init) > rdi: 0000000000000000 rsi: ffffffff804be800 rdx: fffffe827d40dbb0 > rcx: 0000000000000000 r8: 0000000000000075 r9: 0000000000000000 > rax: 0000000000000005 rbx: fffff8010b33d440 rbp: fffffe027d40dab0 > r10: cacacacacacacaca r11: 000000005f42535f r12: fffff8010b33d440 > r13: 0000000000000000 r14: 0866966600000005 r15: 0000000066860009 > trap number=3D 12 > panic: page fault > cpuid =3D 0 > time =3D 1758083117 > KDB: stack backtrace: > db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame > 0xfffffe027d40d800 > vpanic() at vpanic+0x136/frame 0xfffffe027d40d930 > panic() at panic+0x43/frame 0xfffffe027d40d990 > trap_pfault() at trap_pfault+0x3c9/frame 0xfffffe027d40d9e0 > calltrap() at calltrap+0x8/frame 0xfffffe027d40d9e0 > -- trap 0xc, rip =3D 0xffffffff80bb7464, rsp =3D 0xfffffe027d40dab0, rbp = =3D > 0xfffffe027d40dab0 =E2=80=94-- > device_get_softc() at device_get_softc+0x4/frame 0xfffffe027d40dab0 > acpi_wake_prep() at acpi_wake_prep+0x65/frame 0xfffffe027d4adbf0 > AcpiNsWalkNamespace() at AcpiNsWalkNamespace+0x10b/frame 0xfffffe027d40dc= 50 > AcpiWalkNamespace() at AcpiWalkNamespace+=C4=90x95/frame 0xfffffe027d40dc= b0 > acpi_shutdoun() at acpi_shutdoun+0x64/frame 0xfffffe027d40dce0 > bus_generic_shutdoun() at bus_generic_shutdown+0x16/frame > 0xfffffe027d40dd00 > bus_generic_shutdoun() at bus_generic_shutdown+0x16/frame > 0xfffffe027d40dd20 > root_bus_module_handler() at root_bus_module_handler+0x126/frame > =C2=A9xfffffe027d40dd40 > module_shutdown() at module_shutdown+0x6c/frame 0xfffffe027d40dd60 > kern_reboot() at kern_reboot+0x6b7/frame 0xfffffe027d40ddb0 > sys_rebooto at sys_reboot+0x413/frame 0xfffffe027d40de00 > amd64_syscall() at amd64_syscal1+0x126/frame @xfffffe027d40df30 > fast_syscall_common() at fast_syscall_common+0xf8/frame 0xfffffe027d40df3= 0 > -- syscall (55, FreeBSD ELF64, reboot), rip =3D 0x2941ba, rsp =3D 0x8210f= 0aca, > rbp =3D 0x8210f0bb0 -=3D- > END QUOTE > > (kgdb) disass device_get_softc > Dump of assembler code for function device_get_softc: > 0xffffffff80bb7460 <+0>: push %rbp > 0xffffffff80bb7461 <+1>: mov %rsp,%rbp > 0xffffffff80bb7464 <+4>: mov 0x88(%rdi),%rax > 0xffffffff80bb746b <+11>: pop %rbp > 0xffffffff80bb746c <+12>: ret > End of assembler dump. > > Given "fault virtual address=3D 0x88": %rdi=3D=3D0, matching > the register value listing. > > Dump of assembler code for function acpi_wake_prep: > 0xffffffff804c45e0 <+0>: push %rbp > 0xffffffff804c45e1 <+1>: mov %rsp,%rbp > 0xffffffff804c45e4 <+4>: push %r15 > 0xffffffff804c45e6 <+6>: push %r14 > 0xffffffff804c45e8 <+8>: push %r13 > 0xffffffff804c45ea <+10>: push %r12 > 0xffffffff804c45ec <+12>: push %rbx > 0xffffffff804c45ed <+13>: sub $0x108,%rsp > 0xffffffff804c45f4 <+20>: mov %rdi,%rbx > 0xffffffff804c45f7 <+23>: mov (%rdx),%r14d > 0xffffffff804c45fa <+26>: cmpb $0x0,0x14fde37(%rip) # > 0xffffffff819c2438 > 0xffffffff804c4601 <+33>: je 0xffffffff804c46c4 > > 0xffffffff804c4607 <+39>: lea -0x128(%rbp),%rsi > 0xffffffff804c460e <+46>: mov %rbx,%rdi > 0xffffffff804c4611 <+49>: call 0xffffffff804c0210 > 0xffffffff804c4616 <+54>: test %eax,%eax > 0xffffffff804c4618 <+56>: jne 0xffffffff804c49d9 > > 0xffffffff804c461e <+62>: movq $0x0,-0x40(%rbp) > 0xffffffff804c4626 <+70>: lea -0x40(%rbp),%rdx > 0xffffffff804c462a <+74>: mov %rbx,%rdi > 0xffffffff804c462d <+77>: mov $0xffffffff804be800,%rsi > 0xffffffff804c4634 <+84>: call 0xffffffff80402530 > 0xffffffff804c4639 <+89>: mov -0x40(%rbp),%r15 > 0xffffffff804c463d <+93>: mov %r15,%rdi > 0xffffffff804c4640 <+96>: call 0xffffffff80bb7460 > > . . . > > > =3D=3D=3D > Mark Millard > marklmi at yahoo.com > > > --=20 Nuno Teixeira FreeBSD UNIX: Web: https://FreeBSD.org --0000000000006a9081063efb0e9f Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello Mark,

I see that crash too on= upgrade from yesterday 2025-09-16 on reboot.
I used bectl to= put me back to latest working main, 2025-09-06.

T= hanks,

Mark Millard <marklmi@yahoo.com> escreveu (quarta, 17/09/2025 =C3=A0(= s) 06:32):
Cy Sc= hubert <Cy.Schubert_at_cschubert.com> wrote on
Date: Tue, 16 Sep 2025 05:02:39 UTC :

> In message <202509142159.58ELx5Rg054606@gitrepo.freebsd.o= rg>, Aymeric Wibo writ
> es:
> > The branch main has been updated by obiwac:
> >
> > URL: https://cgi= t.FreeBSD.org/src/commit/?id=3De779891327b1d9b9ab10ba482e59f498
> > 790505a7
> >
> > commit e779891327b1d9b9ab10ba482e59f498790505a7
> > Author: Aymeric Wibo <obiwac@FreeBSD.org>
> > AuthorDate: 2025-09-14 21:58:13 +0000
> > Commit: Aymeric Wibo <obiwac@FreeBSD.org>
> > CommitDate: 2025-09-14 21:58:15 +0000
> >
> > sys/power: Sleep type reporting by PM backends
> >
> > Allow PM backends to report supported sleep types when registerin= g
> > through `power_pm_register`. Expose this information through
> > `kern.power.supported_stype` sysctl, and set defaults for
> > `power_standby/suspend/hibernate_stype` based on this.
> >
> > Implement this in ACPI PM backend.
> >
> > Reviewed by: mckusick (mentor), markj
> > Approved by: mckusick (mentor), markj
> > Sponsored by: The FreeBSD Foundation
> > Differential Revision: https://reviews.freebsd.org/D5204= 4
> > ---
> . . .
> >
> >
>
> One of this series of ACPI commits has broken power management on my m= achines.
> One of which managed to capture a dump from a kernel panic after power= off(8)
> was issued.

This is mostly a "me too" with poorer quality
data collection. The context here is an AMD
7950X3D based desktop system, using the builtin
video for the console, no video card present.
The crash was too late for the USB keyboard to
work, I had to plug in a PS2 keyboard. But it
was also, apparently, too late for a dump to
then work.

It was from a "shutdown -r now" just after a
pkgbase'd upgrade of the world. (Previous reboot
was for updating the kernel, so the below does
identify the kernel that was in operation.)
The pkgbase materials (old and new) were from
official distributions.

# uname -apKU
FreeBSD 7950X3D-ZFS 16.0-CURRENT FreeBSD 16.0-CURRENT main-n280397-5da388d9= 3917 GENERIC-NODEBUG amd64 amd64 1600000 1600000

Expect "typos" and such from the conversion to
text from the cell phone image:

QUOTE
Fatal trap 12: page fault while in kernel mode
cpuid =3D 0; apic id =3D 00
fault virtual address=3D 0x88
fault code=3D supervisor read data, page not present
instruction pointer=3D0x20:0xffffffff80bb7464
stack pointer=3D0x28:0xfffffe027d40dab0
frame pointer=3D0x28:0xfffffe027d40dab0
code segment=3Dbase Ox0, limit Oxfffff, type Ox1b
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =3D DPL 0, pres 1, long 1, def32 = 0, gran 1
processor eflags=3D interrupt enabled, resume, IOPL =3D 0
current process=3D 1 (init)
rdi: 0000000000000000 rsi: ffffffff804be800 rdx: fffffe827d40dbb0
rcx: 0000000000000000=C2=A0 r8: 0000000000000075=C2=A0 r9: 0000000000000000=
rax: 0000000000000005 rbx: fffff8010b33d440 rbp: fffffe027d40dab0
r10: cacacacacacacaca r11: 000000005f42535f r12: fffff8010b33d440
r13: 0000000000000000 r14: 0866966600000005 r15: 0000000066860009
trap number=3D 12
panic: page fault
cpuid =3D 0
time =3D 1758083117
KDB: stack backtrace:
db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe027d40d= 800
vpanic() at vpanic+0x136/frame 0xfffffe027d40d930
panic() at panic+0x43/frame 0xfffffe027d40d990
trap_pfault() at trap_pfault+0x3c9/frame 0xfffffe027d40d9e0
calltrap() at calltrap+0x8/frame 0xfffffe027d40d9e0
-- trap 0xc, rip =3D 0xffffffff80bb7464, rsp =3D 0xfffffe027d40dab0, rbp = =3D 0xfffffe027d40dab0 =E2=80=94--
device_get_softc() at device_get_softc+0x4/frame 0xfffffe027d40dab0
acpi_wake_prep() at acpi_wake_prep+0x65/frame 0xfffffe027d4adbf0
AcpiNsWalkNamespace() at AcpiNsWalkNamespace+0x10b/frame 0xfffffe027d40dc50=
AcpiWalkNamespace() at AcpiWalkNamespace+=C4=90x95/frame 0xfffffe027d40dcb0=
acpi_shutdoun() at acpi_shutdoun+0x64/frame 0xfffffe027d40dce0
bus_generic_shutdoun() at bus_generic_shutdown+0x16/frame 0xfffffe027d40dd0= 0
bus_generic_shutdoun() at bus_generic_shutdown+0x16/frame 0xfffffe027d40dd2= 0
root_bus_module_handler() at root_bus_module_handler+0x126/frame =C2=A9xfff= ffe027d40dd40
module_shutdown() at module_shutdown+0x6c/frame 0xfffffe027d40dd60
kern_reboot() at kern_reboot+0x6b7/frame 0xfffffe027d40ddb0
sys_rebooto at sys_reboot+0x413/frame 0xfffffe027d40de00
amd64_syscall() at amd64_syscal1+0x126/frame @xfffffe027d40df30
fast_syscall_common() at fast_syscall_common+0xf8/frame 0xfffffe027d40df30<= br> -- syscall (55, FreeBSD ELF64, reboot), rip =3D 0x2941ba, rsp =3D 0x8210f0a= ca, rbp =3D 0x8210f0bb0 -=3D-
END QUOTE

(kgdb) disass device_get_softc
Dump of assembler code for function device_get_softc:
=C2=A0 =C2=A00xffffffff80bb7460 <+0>:=C2=A0 =C2=A0 =C2=A0push=C2=A0 = =C2=A0%rbp
=C2=A0 =C2=A00xffffffff80bb7461 <+1>:=C2=A0 =C2=A0 =C2=A0mov=C2=A0 = =C2=A0 %rsp,%rbp
=C2=A0 =C2=A00xffffffff80bb7464 <+4>:=C2=A0 =C2=A0 =C2=A0mov=C2=A0 = =C2=A0 0x88(%rdi),%rax
=C2=A0 =C2=A00xffffffff80bb746b <+11>:=C2=A0 =C2=A0 pop=C2=A0 =C2=A0 = %rbp
=C2=A0 =C2=A00xffffffff80bb746c <+12>:=C2=A0 =C2=A0 ret
End of assembler dump.

Given "fault virtual address=3D 0x88": %rdi=3D=3D0, matching
the register value listing.

Dump of assembler code for function acpi_wake_prep:
=C2=A0 =C2=A00xffffffff804c45e0 <+0>:=C2=A0 =C2=A0 =C2=A0push=C2=A0 = =C2=A0%rbp
=C2=A0 =C2=A00xffffffff804c45e1 <+1>:=C2=A0 =C2=A0 =C2=A0mov=C2=A0 = =C2=A0 %rsp,%rbp
=C2=A0 =C2=A00xffffffff804c45e4 <+4>:=C2=A0 =C2=A0 =C2=A0push=C2=A0 = =C2=A0%r15
=C2=A0 =C2=A00xffffffff804c45e6 <+6>:=C2=A0 =C2=A0 =C2=A0push=C2=A0 = =C2=A0%r14
=C2=A0 =C2=A00xffffffff804c45e8 <+8>:=C2=A0 =C2=A0 =C2=A0push=C2=A0 = =C2=A0%r13
=C2=A0 =C2=A00xffffffff804c45ea <+10>:=C2=A0 =C2=A0 push=C2=A0 =C2=A0= %r12
=C2=A0 =C2=A00xffffffff804c45ec <+12>:=C2=A0 =C2=A0 push=C2=A0 =C2=A0= %rbx
=C2=A0 =C2=A00xffffffff804c45ed <+13>:=C2=A0 =C2=A0 sub=C2=A0 =C2=A0 = $0x108,%rsp
=C2=A0 =C2=A00xffffffff804c45f4 <+20>:=C2=A0 =C2=A0 mov=C2=A0 =C2=A0 = %rdi,%rbx
=C2=A0 =C2=A00xffffffff804c45f7 <+23>:=C2=A0 =C2=A0 mov=C2=A0 =C2=A0 = (%rdx),%r14d
=C2=A0 =C2=A00xffffffff804c45fa <+26>:=C2=A0 =C2=A0 cmpb=C2=A0 =C2=A0= $0x0,0x14fde37(%rip)=C2=A0 =C2=A0 =C2=A0 =C2=A0 # 0xffffffff819c2438 <Ac= piGbl_SystemAwakeAndRunning>
=C2=A0 =C2=A00xffffffff804c4601 <+33>:=C2=A0 =C2=A0 je=C2=A0 =C2=A0 = =C2=A00xffffffff804c46c4 <acpi_wake_prep+228>
=C2=A0 =C2=A00xffffffff804c4607 <+39>:=C2=A0 =C2=A0 lea=C2=A0 =C2=A0 = -0x128(%rbp),%rsi
=C2=A0 =C2=A00xffffffff804c460e <+46>:=C2=A0 =C2=A0 mov=C2=A0 =C2=A0 = %rbx,%rdi
=C2=A0 =C2=A00xffffffff804c4611 <+49>:=C2=A0 =C2=A0 call=C2=A0 =C2=A0= 0xffffffff804c0210 <acpi_parse_prw>
=C2=A0 =C2=A00xffffffff804c4616 <+54>:=C2=A0 =C2=A0 test=C2=A0 =C2=A0= %eax,%eax
=C2=A0 =C2=A00xffffffff804c4618 <+56>:=C2=A0 =C2=A0 jne=C2=A0 =C2=A0 = 0xffffffff804c49d9 <acpi_wake_prep+1017>
=C2=A0 =C2=A00xffffffff804c461e <+62>:=C2=A0 =C2=A0 movq=C2=A0 =C2=A0= $0x0,-0x40(%rbp)
=C2=A0 =C2=A00xffffffff804c4626 <+70>:=C2=A0 =C2=A0 lea=C2=A0 =C2=A0 = -0x40(%rbp),%rdx
=C2=A0 =C2=A00xffffffff804c462a <+74>:=C2=A0 =C2=A0 mov=C2=A0 =C2=A0 = %rbx,%rdi
=C2=A0 =C2=A00xffffffff804c462d <+77>:=C2=A0 =C2=A0 mov=C2=A0 =C2=A0 = $0xffffffff804be800,%rsi
=C2=A0 =C2=A00xffffffff804c4634 <+84>:=C2=A0 =C2=A0 call=C2=A0 =C2=A0= 0xffffffff80402530 <AcpiGetData>
=C2=A0 =C2=A00xffffffff804c4639 <+89>:=C2=A0 =C2=A0 mov=C2=A0 =C2=A0 = -0x40(%rbp),%r15
=C2=A0 =C2=A00xffffffff804c463d <+93>:=C2=A0 =C2=A0 mov=C2=A0 =C2=A0 = %r15,%rdi
=C2=A0 =C2=A00xffffffff804c4640 <+96>:=C2=A0 =C2=A0 call=C2=A0 =C2=A0= 0xffffffff80bb7460 <device_get_softc>
. . .


=3D=3D=3D
Mark Millard
marklmi at yahoo.com




--
Nuno Teixeira
=
FreeBSD UNIX:=C2=A0 <eduardo@FreeBSD.org>=C2=A0 =C2=A0Web:=C2=A0 https://Fr= eeBSD.org
--0000000000006a9081063efb0e9f-- From nobody Wed Sep 17 09:15:20 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cRY5c3Wh6z68XF4 for ; Wed, 17 Sep 2025 09:15:32 +0000 (UTC) (envelope-from eduardo@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cRY5c19HCz44r9 for ; Wed, 17 Sep 2025 09:15:32 +0000 (UTC) (envelope-from eduardo@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758100532; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=o0H85h62G9nAKEnq/c2hVYQbUAiRHhg5GO2xb0VNm8w=; b=Rwks6U5NY0E/3Npax8S1w6HF1TS1Hy8G+MUEo6jGeXXQQ+s+FVHP0bv09tYKH/8HWUU4fd cNLqtTZ2sd3Drbcrr+OPk20Bg9jSqB7eV5CVb1+Wn0Vp/T6CiLOusGjTQE7vfeTmi4Lxlk oHQDl9q/sw13kq5KUb1vEfMBi7gjqzEMbj83kKjoqTT1S8yL4OzfIvhVX3MchoaWjEqEVM A72bvPvEbRHMUt2R3tkEcxkCdFqPIS6gFt4qPh546l60R046/ZEWu24JNMPk7VTQ0+oAr5 rs2eBi6WnKc6Q4OU21OQKHQvUAojmWGeXPcnC2kMWmYlzpKTAlL2c301ajbM5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758100532; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=o0H85h62G9nAKEnq/c2hVYQbUAiRHhg5GO2xb0VNm8w=; b=CsyGa1NFolrZZEfItsmTPkchcMH3R3RqkxeXVjD3oLkaQRQPr/6WwxicKqq+LnTCzKNG2w YOxld4ECgLO5Gk8ndPAU4UsMsPg+AYg2eRKQHgSgtpVqG6nalDYTHYmKYllQwNHDEA7emI br9Yrfb8hR30XwcgQnt8ctPaQve8O3F8XGX7VB/DhgQL4ukYxGvAWvFbHj+IrYQ3H8hMJh vh9Z8BCOgzb+ukDdgEkvpBFLF/2H6FcGpfUi1eiv/zta1WITURbsR+0eUP96a6lPwAIm6c IWamKo6kySTgExOU55EmwHhN7z1GfyEiR+Y0DFBua6ZvNI0iKzLpUd4fQ6FK2w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758100532; a=rsa-sha256; cv=none; b=Q8Dj+V7WMO14sAQgRdmKjW9xGg8tNdAcBXmU6y85kCi9m6aPKe5VcxbAupm2W8xwA1pbT3 WZxlnzU58wBXYYMDbzOXqJ1ITLMC9RBDCO9DA78YLWkVEo0z1Z9ohWubv4ypUE8g3g0NqB pb8CvmNyokZGe17g8gPzWVCmXHi9Lx9En3lzIvtp4murc7l+yAVJnjivOBgn9fq/38bAP2 GfS7I0vWK+j25mxvpJTq+tVSR2ENr5ZfBv8UTb3pt7QTlZ06hN371v1vsTDcjPPb+w+8yj qxag/HPUSyymtxA+2hDdaPLNMVWplefDSNC3lciJoynJ3hj/k+ic+4HMyJUTfQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from mail-qv1-f49.google.com (mail-qv1-f49.google.com [209.85.219.49]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) (Authenticated sender: eduardo) by smtp.freebsd.org (Postfix) with ESMTPSA id 4cRY5b6Vqjz13wk for ; Wed, 17 Sep 2025 09:15:31 +0000 (UTC) (envelope-from eduardo@freebsd.org) Received: by mail-qv1-f49.google.com with SMTP id 6a1803df08f44-78f5d692d09so9186d6.3 for ; Wed, 17 Sep 2025 02:15:31 -0700 (PDT) X-Forwarded-Encrypted: i=1; AJvYcCWT09OE6unjTx0K8aEVUVH1iR6AtDo1l0hEev/yKmb3pO7tGLvWIYLzoYCXHov/mQEiWEc9bIDNaEjrbpi32/G0lxfQFA==@freebsd.org X-Gm-Message-State: AOJu0Yz+JHLYzmX9DIbt/xDSL/4tHamynUSrxHUbH10TaLtJe3wca/lo Q+9rKaG/m+BqmJDVmHmb7mpfFeA205wtjYjF7Ie9Ds1oIS8Xx4fTJ1hDjuON4e9AqTygKtUY7Nu TErRtm6mVd6cC16xmFzSe1BbxDPDLxu0= X-Google-Smtp-Source: AGHT+IG13M7jQnVToRFUUP3+M6NxwluXFIWP1ChGOSL6BZG0pG6qD+FV7ATicRegDnHxS9Ut0rDh4q3RX7e2GR3zX6g= X-Received: by 2002:ac8:7e8c:0:b0:4b7:94f1:7722 with SMTP id d75a77b69052e-4ba60c82cd6mr11394171cf.0.1758100531311; Wed, 17 Sep 2025 02:15:31 -0700 (PDT) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 References: <202509142159.58ELx5Rg054606@gitrepo.freebsd.org> <20250916050239.4BB672D5@slippy.cwsent.com> In-Reply-To: <20250916050239.4BB672D5@slippy.cwsent.com> From: Nuno Teixeira Date: Wed, 17 Sep 2025 10:15:20 +0100 X-Gmail-Original-Message-ID: X-Gm-Features: AS18NWBkt-Y3o1WyTD4nOBmEqcSG1CJesuiUXfYDjNz_uzsgDSKm836BsZyPo8E Message-ID: Subject: Re: git: e779891327b1 - main - sys/power: Sleep type reporting by PM backends To: Cy Schubert Cc: Aymeric Wibo , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="000000000000a5fb86063efbad41" --000000000000a5fb86063efbad41 Content-Type: text/plain; charset="UTF-8" Hello Cy, One of this series of ACPI commits has broken power management on my > machines. > One of which managed to capture a dump from a kernel panic after > poweroff(8) > was issued. > I can confirm same crash on reboot on a Intel laptop, after upgrading from main 2025-09-06 -> 2025-09-16. Thanks, --000000000000a5fb86063efbad41 Content-Type: text/html; charset="UTF-8"

Hello Cy,

One of this series of ACPI commits has broken power management on my machines.
One of which managed to capture a dump from a kernel panic after poweroff(8)
was issued.

I can confirm same crash on reboot on a Intel laptop, after upgrading from main 2025-09-06 -> 2025-09-16.

Thanks,
--000000000000a5fb86063efbad41-- From nobody Wed Sep 17 12:18:51 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cRd973PPHz67HmS; Wed, 17 Sep 2025 12:18: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 4cRd972YpQz3V3D; Wed, 17 Sep 2025 12:18:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758111531; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=G8EelqplSGRm0IJezBpJfh2BCM7FOgvMkKyQ9JIcJb0=; b=Hc58rZUh0yu+s49oR4pPS0OEHBhGRPkZNaZQVoDgb6jDundgvKQAaY0tc5FuvLHBIu1b9n bn/pU7PZMyJdw6NNGwFpcyCoqK8Tt5BYVhY8KffXb14aUnFVLqH03CYe2LangK4eQa5sjn zPUs0os9OGg2/ecFjlopDUH7FmzyUhuGK7KcZy1tDkC6dg0h9WruMF33BsDd8MowkcE2YN qT3/kwncc4KSNoo2PgtGgIM2UeOCOYWzQOaUbzkMn7t2b0jOw7POX6fznIz4dr8s+Pkgcy 2dLBKYssymngVUX+9BDXjk40UIt5Z5UVRbJfat7+9JCs9xy+k4P5AiNTAwGYRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758111531; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=G8EelqplSGRm0IJezBpJfh2BCM7FOgvMkKyQ9JIcJb0=; b=N7iOeIpVN+HxKyyYWFRPszPVYUwl3Pk/Afbrbf72yNQLEGJ2mW3JnK+xsv4Q1OYcIGSVEb r8IvaMqCDwH8E/Fd03by4995RflRtg/rvSUOnOiwAdIQVYiYhXfaUgSv3xLXSLaytkhyrC IOy5Ykx73QvHLtqN+VL5A+wxfsb+/6inoLXSR403WTwGUicl1aDYThr0VU4g6ezL9tzyct jLGtjNAkbdCGDvxA/Fm3HoN1HfO1ORcJU65UueJ0Cr4VJbP6EIO0f1oacoE53NYmuJmQdE +bODmfA89RQYSCwFOQzNtaq2Mg3yMX9LHnBz5SJC1MLNBA7GUU8qDZz0Fnmuzg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758111531; a=rsa-sha256; cv=none; b=ZSti1xjRGBgneKXp8Hh++eTfRMPvDzauOAoiyJVQhvW/pWnTJi1zvi15V1nPz3BLHXM7oW Eze0PJkX4PZO+Yw8iNcQ2PTO3dHnOU593WM42F9/N6fBt8mvdqhwYsObgAaC6Jj/sZRiOb am+44Of2Yyph2bryWvbjl4+UUGHt5ziL/b2I+mtFdjkzZoC6BFCSLlb3Gu0DDtLwh6evTn 5b6E+npskL9uPinK8b2hbExqTfFpPobI2wlpCG9B9Gt365BboFsT8rb58Tnhim7UZxFzK3 gONNWeDH4B4RiLIq7QUKbflDtJmIMmgoR/8YO2ltiN5jH2WS63+pWhvOW8IL1A== 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 4cRd9725JPz8wP; Wed, 17 Sep 2025 12:18: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 58HCIpRj085300; Wed, 17 Sep 2025 12:18:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58HCIpGA085297; Wed, 17 Sep 2025 12:18:51 GMT (envelope-from git) Date: Wed, 17 Sep 2025 12:18:51 GMT Message-Id: <202509171218.58HCIpGA085297@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: 580d2d429598 - main - libc: compat.h: Remove a superfluous blank line at end List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 580d2d429598e6eb3549f9ea7490d10e19904f7c Auto-Submitted: auto-generated The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=580d2d429598e6eb3549f9ea7490d10e19904f7c commit 580d2d429598e6eb3549f9ea7490d10e19904f7c Author: Olivier Certner AuthorDate: 2025-09-15 16:54:23 +0000 Commit: Olivier Certner CommitDate: 2025-09-17 12:15:54 +0000 libc: compat.h: Remove a superfluous blank line at end No functional change (intended). MFC after: 5 days Sponsored by: The FreeBSD Foundation --- lib/libc/include/compat.h | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/libc/include/compat.h b/lib/libc/include/compat.h index 97f22607ddd7..630ffe7daae3 100644 --- a/lib/libc/include/compat.h +++ b/lib/libc/include/compat.h @@ -80,4 +80,3 @@ __sym_compat(setgroups, freebsd14_setgroups, FBSD_1.0); #undef __weak_reference #endif /* __LIBC_COMPAT_H__ */ - From nobody Wed Sep 17 12:18:52 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cRd985tFNz67HMh; Wed, 17 Sep 2025 12:18: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 4cRd983W2hz3VN9; Wed, 17 Sep 2025 12:18:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758111532; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WD1hlqbrTboPPgKAKMMMHGhYP90O62vdp+cEVJVt4vI=; b=Lshb5VdetzudgxfYkXM95VRXawpRpjjtBjVdhCxPB/t/XY/XsweP4VdR5r79NE5BZgmUkT NpfAQwpiwbgBRBhK+BJg8TbVsG12GT3CZg5mnx1vz5ie8oeb+vsTBDIkigp1OH9BRYbA+s zKt2foBrPFukWs4AweUvIt58KSUp/E9/a1ffLT/0QoAXu6s1MG+XORbTq9djvs7wbXPl9U 6nofKgHAB+tSjtnOTl+eRNqHIQhyEwkpCZd9jrK4q2M+MZZREhSpqK/yruXAlLzwLdy6LV BD/eKq6RkZ7GiLcrg2gIvIr6ELXcJ7c07tJNKWD6mWYTkxu2yTlEkNIe8OH+Vg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758111532; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WD1hlqbrTboPPgKAKMMMHGhYP90O62vdp+cEVJVt4vI=; b=uoAijrZTvsl7rKTC+RpWad006tiyIXIErkm2pxI2ADGgqlf+IkczMRrOHg7srqaanKe/GG JvuhXf4aoozSBFwNP66g9HAf7E+6wWODy+Z5cJbwTkhGgs9m5u+d1Q81qd7qjxglVabmar zY4aJaGNMZiaIQE2eoeDyiLmWFcdzTYLSfjh9TODoL5nByIu3f1C8vuQhdig6DTJO0E14Y Ezdj0GMCQ02jDBTE/NIVeWu7mVt4Tm9Rp/tlMC6/1OsuvwNZTjPlb0dCD6b2HMFLF/GPxJ cJ8dI3yEMDDNLBygtmMInqq52r3i1C0q/PBXJ6qCJcEdCT+DUliydr7x6f6ywg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758111532; a=rsa-sha256; cv=none; b=x7ERsHtXmBbMKHeca6CNOuy+R0Z7F9jpiPxdMf58151TOx8MphqSTlHekpL1yayF8Vd1V8 YQwt0M0zHP9HABcC9me8mY6cFOFjgfOZNiMEe20mQe4g37cl3WtMMvvfpaKDJ48Icotmkn gcowQaOcsn8c7kfgfmxjEqpb3m46O1o6gMkAa/55czLMkqFjSQav2SLrOCbaTuXxCiooYS 1chWReDdiegVpveFTtDNsZT/zU1YnBqUus9is9yzmffQk1fyPNNhUng9WcPITMi4NINHQn kWYMb9+Xyxw5sBGYtpl8nKsWmhP20vdf/0WBMFWPnlRROuOcbhNV4Hhiiytcfw== 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 4cRd9830Pfz9hK; Wed, 17 Sep 2025 12:18: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 58HCIqlw085343; Wed, 17 Sep 2025 12:18:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58HCIqZ2085340; Wed, 17 Sep 2025 12:18:52 GMT (envelope-from git) Date: Wed, 17 Sep 2025 12:18:52 GMT Message-Id: <202509171218.58HCIqZ2085340@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: e4cc7f993057 - main - dtrace: Fix effective GID shown by 'curpsinfo' List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e4cc7f9930573daeb7f1056d008e424aa4c3fd33 Auto-Submitted: auto-generated The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=e4cc7f9930573daeb7f1056d008e424aa4c3fd33 commit e4cc7f9930573daeb7f1056d008e424aa4c3fd33 Author: Olivier Certner AuthorDate: 2025-08-28 13:46:18 +0000 Commit: Olivier Certner CommitDate: 2025-09-17 12:16:00 +0000 dtrace: Fix effective GID shown by 'curpsinfo' Reviewed by: emaste Fixes: be1f7435ef218b1d ("kern: start tracking cr_gid outside of cr_groups[]") MFC after: 5 days MFC to: stable/15 Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D52274 --- cddl/lib/libdtrace/psinfo.d | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cddl/lib/libdtrace/psinfo.d b/cddl/lib/libdtrace/psinfo.d index c0cd5b121064..8dc27e812965 100644 --- a/cddl/lib/libdtrace/psinfo.d +++ b/cddl/lib/libdtrace/psinfo.d @@ -55,7 +55,7 @@ translator psinfo_t < struct proc *T > { pr_uid = T->p_ucred->cr_ruid; pr_euid = T->p_ucred->cr_uid; pr_gid = T->p_ucred->cr_rgid; - pr_egid = T->p_ucred->cr_groups[0]; + pr_egid = T->p_ucred->cr_gid; pr_addr = 0; pr_psargs = (T->p_args == 0) ? "" : memstr(T->p_args->ar_args, ' ', T->p_args->ar_length); From nobody Wed Sep 17 12:18:53 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cRd9B0TQrz67Hpp; Wed, 17 Sep 2025 12:18: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 4cRd994glNz3V1W; Wed, 17 Sep 2025 12:18:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758111533; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aH6da3mA+o1QaJlKkJHv1zaJzIcKs+UMKbPGmHleVls=; b=gC8Igdt4kqecQxTO3AcWlVGjRE1xhlXkdbwgfQIOBRxbFdW1rSJaoFeJhrEGgXVoex918+ 55M7Bi9jqgngvOPDL3EobTkkvvh4gimCNCcjPEqaZF45tUVzj/GUfe4iESKWIjdrJJ6Zdm eAe1pShl0VSmlE0bV4t3BIZ37rSwiv4p+HrllwLpwFDtMQoWgXSs3F/HKaEJmucOD6qxbP e7yejUVvUxOQuwFPQeBwcCDFp2diyZgonUsFH5ByxVGzV7KcFWIy0z70249++0Uzma4SYD bpB3Vd+AJUwbPV6drbzOcxf8oPKdzbrzUIl53vRNhONkJ53kbdfNJYgQibW7kA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758111533; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aH6da3mA+o1QaJlKkJHv1zaJzIcKs+UMKbPGmHleVls=; b=l6B46kCQUxG8OLHgTk4mKUbk9F52Y/UDfEADJlDszFTSzPpWfFd7eBPrtdAj967vmBRGWt +PzBQkguGkMHBqF6WnZK6zYd/L076hStgFczt1dSf6XeS1UDXCRLCR8DqoGsF1TipaFew+ OB0hx5gdEL2MIdruhMCbIGBbaVwnE7re5UDFIZrdokKzb66xdFETSLT5kpBJYC0g/8CFL7 mzakrs7u0V5T1MJn9s54qvRGRHlz6/MJZMSqmBpeWKobQMQFetamwFjqXQ3Q/YHQC93Fbl 03XDTg8xiSLj2K8jEbYhfPSAFN+cDs9pnJxbm8FOMQYIk7KH4rnwmwBOYytPMg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758111533; a=rsa-sha256; cv=none; b=Gqi0qXOP0/jx1RZmvXzDe9RH4YIMRU/zuBEw7a+Za6QhSIftOkMECr3GxpfCtBvPIfbEOn 91WIhdSawp3zOWrJ7JcGQEGZFX8cYR9SO7aIJTQgZHhfzg7Fds5skK/que9U8/0f+Cru9j qqUji+bFFbNzyvUogUKt35fH9FN9Fftc7600R2FRzHy5tO0hthOQ53u4Yduu7zC4r8bdX9 Vu5gsooIzd0t/tylU3sFlggpMxzcazuMIVnXu5uXRrOsaLkd85y+QLJmzmrp3dWLmuMMpz CBN7TuJFXHvAsGwsOn8ma/uJxUBd0j2dbLv3srvzEHTD9rLTPTosE8DUruPN+A== 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 4cRd994GP5z9hL; Wed, 17 Sep 2025 12:18: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 58HCIrQt085382; Wed, 17 Sep 2025 12:18:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58HCIrSn085379; Wed, 17 Sep 2025 12:18:53 GMT (envelope-from git) Date: Wed, 17 Sep 2025 12:18:53 GMT Message-Id: <202509171218.58HCIrSn085379@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: 11cbb7d122ac - main - libprocstat: procstat_getgroups_kvm(): Output again the effective GID List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 11cbb7d122ac0219c214ad52c4d6f7cbb9d60ac1 Auto-Submitted: auto-generated The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=11cbb7d122ac0219c214ad52c4d6f7cbb9d60ac1 commit 11cbb7d122ac0219c214ad52c4d6f7cbb9d60ac1 Author: Olivier Certner AuthorDate: 2025-08-28 14:49:07 +0000 Commit: Olivier Certner CommitDate: 2025-09-17 12:16:00 +0000 libprocstat: procstat_getgroups_kvm(): Output again the effective GID In particular, fixes 'procstat -s -M' (for processes with more than 16 groups). Reviewed by: kib Fixes: be1f7435ef218b1d ("kern: start tracking cr_gid outside of cr_groups[]") MFC after: 5 days MFC to: stable/15 Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D52275 --- lib/libprocstat/libprocstat.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/libprocstat/libprocstat.c b/lib/libprocstat/libprocstat.c index 1651cbc6820f..df77cabcd36b 100644 --- a/lib/libprocstat/libprocstat.c +++ b/lib/libprocstat/libprocstat.c @@ -1973,6 +1973,7 @@ procstat_getgroups_kvm(kvm_t *kd, struct kinfo_proc *kp, unsigned int *cntp) struct ucred ucred; gid_t *groups; size_t len; + unsigned int ngroups; assert(kd != NULL); assert(kp != NULL); @@ -1990,19 +1991,22 @@ procstat_getgroups_kvm(kvm_t *kd, struct kinfo_proc *kp, unsigned int *cntp) proc.p_ucred, kp->ki_pid); return (NULL); } - len = ucred.cr_ngroups * sizeof(gid_t); + ngroups = 1 + ucred.cr_ngroups; + len = ngroups * sizeof(gid_t); groups = malloc(len); if (groups == NULL) { warn("malloc(%zu)", len); return (NULL); } - if (!kvm_read_all(kd, (unsigned long)ucred.cr_groups, groups, len)) { + groups[0] = ucred.cr_gid; + if (!kvm_read_all(kd, (unsigned long)ucred.cr_groups, groups + 1, + len - sizeof(gid_t))) { warnx("can't read groups at %p for pid %d", ucred.cr_groups, kp->ki_pid); free(groups); return (NULL); } - *cntp = ucred.cr_ngroups; + *cntp = ngroups; return (groups); } From nobody Wed Sep 17 12:18:54 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cRd9C1mHwz67HhW; Wed, 17 Sep 2025 12:18:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cRd9B69Qrz3V3k; Wed, 17 Sep 2025 12:18:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758111534; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3cF6ymYqE9a1Xsg1HE66tI6gN45wwh9XoqQ4Xz3XJTc=; b=wWQnBwNCtUQcJygXbUu/61+QYAcoLZ7jqEwCT63W2ZJAotSDtB/2rvE0686f0Mo2cimyT2 FQpncJvZCuVg98fQu0GEdGUcm3HD/BjI0lVFwDhFwo2ctJZD8kdGLqPpliqwTGlvEbwWTC xYY1RAd6EHnukuvJrU52Nz3xHgDtIv7q0XsEolNvfhsoyO6HsH2YP7k1LhELu3eJ8ipg0q LtWE6w8G65EH/xHLIb+g2t5k3of+aGTufpSFtXXPvU/kTgwqjA+fHS2pQJSzFUXDsIuMcO mjmaFewEaHobJM5wT+YhWTC0rQyw3giSpEWUD4mS32kS+oOjGWgb1A/JsengBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758111534; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3cF6ymYqE9a1Xsg1HE66tI6gN45wwh9XoqQ4Xz3XJTc=; b=uXQAqGI7GlAy2XfT28Xixm1Cm51nDmrJ75Cj7DeBPkGSmgUehZlIusytV3v0Qcl+4MpEsS kB7AVBpjBxXGFyLpq0B3GjWsQgjcbUfiSjzjygya0aLJ4ap21ccNyreQqNdv8Ix54jJH78 wcjVrIFDF03wAu5ONkd9k/9ie/5JtYSuSCqI4Ezd3cAIvJBsocV1jAtnQ64AypjBgOCTU/ 3Sgh6YpIQTlMRZMXDBTuNxmKrH82Q5AfFBVXd2KeBUIJTVtlUKoJmqf2SbB1E6zXDwkDhv 3lqFvQk6m4mCWaBF+sCrwVYKYAsicDMipCN4FqRfywptBFWisksEVFhSebdDkw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758111534; a=rsa-sha256; cv=none; b=chb3l8pZgLi8FPUX1PXGji/XEo1dMeqNwMi5IcE5VOKVRlRzNrAi7SuMv0EPwwmycmISbo gpX/In0XilQXaC0/IDEHxRvpzkoofzA6TSFtFLTUQCoWKxldXMkxZg/6jf3kBR30vfsPuD CZJvTq4HssxjhBy68g+w+E+lBcSG8S7fQeagsWblraW6bZtwqeOJBAvucJfmNInnWGZQqf yAGfdpVoySdXDxj/6YVegSZH22NZtNHrUuf1u9rfo5m/DqnPAMTXSJ/po8bZ4prpyQ4f7u B4PwzqAyTJYzP02R0754qLsFny0kdr7FtHDZ6ADf45kC16JWeML3CR8/H61ysQ== 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 4cRd9B4vSMz8wQ; Wed, 17 Sep 2025 12:18: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 58HCIsUX085416; Wed, 17 Sep 2025 12:18:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58HCIs8O085413; Wed, 17 Sep 2025 12:18:54 GMT (envelope-from git) Date: Wed, 17 Sep 2025 12:18:54 GMT Message-Id: <202509171218.58HCIs8O085413@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: c5e920e49c0c - main - unix: SCM_CREDS: Restore passing the effective GID List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c5e920e49c0cf068da3962688cc60ab514ea1252 Auto-Submitted: auto-generated The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=c5e920e49c0cf068da3962688cc60ab514ea1252 commit c5e920e49c0cf068da3962688cc60ab514ea1252 Author: Olivier Certner AuthorDate: 2025-08-26 17:01:03 +0000 Commit: Olivier Certner CommitDate: 2025-09-17 12:16:00 +0000 unix: SCM_CREDS: Restore passing the effective GID cmcred_groups[0] in 'struct cmsgcred' must be the effective GID. Note that the code in unp_addsockcred() filling up 'struct sockcred'/'struct sockcred2' (LOCAL_CREDS/LOCAL_CREDS_PERSISTENT options) was in fact "wrong" before 'cr_gid' was moved out of cr_groups[], in the sense that it would transmit the effective GID twice, both separately as 'sc_egid' and as the first element of 'sc_groups'. It is now exact, so is left unchanged, which causes a difference in output (the effective GID is no more in 'sc_groups', unless it is also a supplementary group) that is unlikely to affect applications in practice. Reviewed by: glebius Fixes: be1f7435ef218b1d ("kern: start tracking cr_gid outside of cr_groups[]") MFC after: 5 days MFC to: stable/15 Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D52262 --- sys/kern/uipc_usrreq.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c index 6138e543fae7..340d84666459 100644 --- a/sys/kern/uipc_usrreq.c +++ b/sys/kern/uipc_usrreq.c @@ -3667,11 +3667,14 @@ unp_internalize(struct mbuf *control, struct mchain *mc, struct thread *td) cmcred->cmcred_uid = td->td_ucred->cr_ruid; cmcred->cmcred_gid = td->td_ucred->cr_rgid; cmcred->cmcred_euid = td->td_ucred->cr_uid; - cmcred->cmcred_ngroups = MIN(td->td_ucred->cr_ngroups, + _Static_assert(CMGROUP_MAX >= 1, + "Room needed for the effective GID."); + cmcred->cmcred_ngroups = MIN(td->td_ucred->cr_ngroups + 1, CMGROUP_MAX); - for (i = 0; i < cmcred->cmcred_ngroups; i++) + cmcred->cmcred_groups[0] = td->td_ucred->cr_gid; + for (i = 1; i < cmcred->cmcred_ngroups; i++) cmcred->cmcred_groups[i] = - td->td_ucred->cr_groups[i]; + td->td_ucred->cr_groups[i - 1]; break; case SCM_RIGHTS: From nobody Wed Sep 17 12:18:55 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cRd9D23fcz67HMp; Wed, 17 Sep 2025 12:18:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cRd9C6YCNz3VG0; Wed, 17 Sep 2025 12:18:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758111535; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=F3WP15UudDvkVRhB9maTj1fkiTZNbikL+QsNm0gvzp0=; b=AUjVY2w05CMtJMuAyHlzQ3tlqASZzoamcf+CdhWfgw58mzpg0M33vLPqhiqu8rPe2ERdso yO7kNR4eCveSf6qe4+CEfGWdS+ztXti+LpoBZ/CiJJYIfzPqqX4MLW4ZCu1s+nz2aGXsEY vAiC1YBXXLpOHFDXaCm3U8FW+3uAK2rZoifEk3U3Y+eUx3RTJPkXvgY3XIRU6PGPwL31fb g8MZvo0HNBK+sQWZMB33NaqGaZMSgCJ5t/BK401UAGoPwf0d+dp5/ThAfnVJ3+8cKf6zYd BdETdBY4fY7QSYFnqVdFcIa7skrr9dEdL3GllgY4seaL+QdKQV1VRUHU8PuXfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758111535; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=F3WP15UudDvkVRhB9maTj1fkiTZNbikL+QsNm0gvzp0=; b=JDEwIV8RSF/2l5aTZdbLg2+hKixFGMbZL4WjlUChFcpSNjC6tYq0eHuD4PKIiZKnUrIKty Uk/xrUZ4tSfbdZIugZGGqF0tEV8lrHCjooCTN1QQPIsmTOxIUdSHYau+vlRjpXzRN5E+A1 WYk0ryCMF8aA3Av7/EPNQ48zCKV9nMnT3LEp4rppR4UfbBf1Yo0t0mo+hydwLcYaSiEFSp HlL39MPI0iUDo55q2NGi0RR1jWUJOTjKQWiWWx/77TWRynVPUUEaLRYkFnTs7uem6TIGG0 wmUMYB5P/Chvdfz2sSfZ5JEtvRPPXgxoBxqbIaU9stMlr44qXeO1H7YAXaE8rA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758111535; a=rsa-sha256; cv=none; b=LPQyzCph48+2jW7Zuj7XppCOXmiEb3wXtxVmy0XJC+mMIxU0WpXBFvdf8f1jtUTlnQs6En pY9b8iTrnFd3/6aXrmmJhRhxLwWbgBOrTJdrQ0xfpvsgA/JBt1NjAUBqn39MWu9XuVZfGo XmQoT0/03r2seGo0tlEHg+OWQ6Qu2JYMvcZ/tmnj6XaD52xf9umamDQpX8UClzxEnotVhi X+MusElYzBEk2hZUZJ9N6y5o0NsggwrQya3K7NiyiWDWv/I5UpVz9j0k9/+/X9RkJZKQ8O 7BWdMPsrlVTihDf5M2zRTU1QePTOZP2eVZapryiFmMKppea+seIXTNn/+4PQLA== 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 4cRd9C68c0z9jx; Wed, 17 Sep 2025 12:18:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58HCItbA085451; Wed, 17 Sep 2025 12:18:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58HCItZU085448; Wed, 17 Sep 2025 12:18:55 GMT (envelope-from git) Date: Wed, 17 Sep 2025 12:18:55 GMT Message-Id: <202509171218.58HCItZU085448@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: d22592cd6fd2 - main - fuse: Fix GID when sending FUSE_INTERRUPT to a FUSE daemon List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d22592cd6fd2d39432add376dad460a66488a846 Auto-Submitted: auto-generated The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=d22592cd6fd2d39432add376dad460a66488a846 commit d22592cd6fd2d39432add376dad460a66488a846 Author: Olivier Certner AuthorDate: 2025-08-26 12:39:16 +0000 Commit: Olivier Certner CommitDate: 2025-09-17 12:16:01 +0000 fuse: Fix GID when sending FUSE_INTERRUPT to a FUSE daemon Due to the partial-only changes of commit 46c07316f906 ("kern: adopt the cr_gid macro for cr_groups[0] more widely"), subsequent commit be1f7435ef218b1d ("kern: start tracking cr_gid outside of cr_groups[]") caused a mismatch between filling cr_groups[0] in 'reused_creds' in fuse_interrupt_send() and reading 'cr_gid' from it in fuse_setup_ihead(), with the consequence that the kernel would send a FUSE_INTERRUPT message to the FUSE deamon with an uninitialized GID in its header (which, besides being wrong, would disclose 4 bytes from its stack). Fixes: be1f7435ef218b1d ("kern: start tracking cr_gid outside of cr_groups[]") MFC after: 5 days MFC to: stable/15 Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D52255 --- sys/fs/fuse/fuse_ipc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sys/fs/fuse/fuse_ipc.c b/sys/fs/fuse/fuse_ipc.c index a751c09159ff..7f754ab7f1d4 100644 --- a/sys/fs/fuse/fuse_ipc.c +++ b/sys/fs/fuse/fuse_ipc.c @@ -193,7 +193,6 @@ fuse_interrupt_send(struct fuse_ticket *otick, int err) struct fuse_data *data = otick->tk_data; struct fuse_ticket *tick, *xtick; struct ucred reused_creds; - gid_t reused_groups[1]; if (otick->irq_unique == 0) { /* @@ -237,8 +236,7 @@ fuse_interrupt_send(struct fuse_ticket *otick, int err) */ ftick_hdr = fticket_in_header(otick); reused_creds.cr_uid = ftick_hdr->uid; - reused_groups[0] = ftick_hdr->gid; - reused_creds.cr_groups = reused_groups; + reused_creds.cr_gid = ftick_hdr->gid; fdisp_init(&fdi, sizeof(*fii)); fdisp_make_pid(&fdi, FUSE_INTERRUPT, data, ftick_hdr->nodeid, ftick_hdr->pid, &reused_creds); From nobody Wed Sep 17 12:18:56 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cRd9F4TWHz67Hcd; Wed, 17 Sep 2025 12:18: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 4cRd9F0fL9z3VLg; Wed, 17 Sep 2025 12:18:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758111537; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=U3YccrcxqXmIK9tgvg/TXyV5HghQsNGmHJZF3nXAwWA=; b=Yon3ubBu9bynOzY1v/P1g9fgcyzAGhGWLvZgQV1cGAi1BDJDZb8ymsSuajEYrqYdDgkQTa gJ2FPvrPzeSaLvOPi8jEJrxoi/Z408Z82EmT1nzb1N9TucnxVHVgDsrfi8be6P9g1R1Rx0 hw/n2XYQC2Xf8fyUceijxngOvewLBWOR3NTffktfJJFaouGqImoDHmGg5p3meeh2iXypWz CvY3l9qmSbc5EZPDtO+++OGZ20I3V5KIMUskiY+8hhb6YHm8C32Ipk0hAplN4w+jX3HYm6 z9bP1AySmJclYmInMh6WiP+BJV9XYx6lQ0UkoBWuh0cWinuQGsmKDoV2xPhsdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758111537; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=U3YccrcxqXmIK9tgvg/TXyV5HghQsNGmHJZF3nXAwWA=; b=xbuoas4j53Jzyh5GgRVHKP182vdjZLQ9q/R2NKLDAUrL23cJbMvQ89cKca+oOzaPlPjCie JDn/qdXWTnmgPK9nRtMzx77k1I/WmrrJ23k8xvX1whAUpgV9ZUGm/mby0D3NdoH5QroCns y+t/9jf/NIcpUJOYvRodAoxp4je236N/qiJwc/F+2IvmKEmq24I7a7MOj17G+X71A0KTLP X6fRNG3AuQvFRDp9Jus8Lae4K/bIYbWa4gq5qa/Ar/JoVDY5CV27YDTfWNy4muD+val82+ d2giQDsb+MHHnkpgeBAy6YTsfmXNY80AHb5VZ/E1a057jIXPOI/Rbt8DosvFXQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758111537; a=rsa-sha256; cv=none; b=cV9XmeAJjHwQ9UC3LtWiKw0kfKLYPVy6GWBihmi/46oIEryE8q7LEEt8+D0ebyOvHeS/Gm ABU0Jmdh9GILo4OJ+ussk+WxpKe0nqDc/dTWnv1nDFBXJUJ4DcZPXYj8Tyg7HL01/7kci2 d2oC2aGsnKHWzeGnSY5KL7LKHqi6lS2Q0F/xfLe7uV+FYhWh4pXzaKz0HeAjbNmK5AChCm XhF3liYUnra4cIYXxXsPQNLGPMx9Y0BM0AyWWKdZgIw2/tpjG4Ol/Tw2etWy+QMu0qaqtw +d6wsQ1aGBU7RO9XR5MfNrMU+Q9nTCaqduX9gajPkqp0ur3W9DxSNxcJAZinqw== 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 4cRd9F00Y8z9G4; Wed, 17 Sep 2025 12:18:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58HCIuJN085486; Wed, 17 Sep 2025 12:18:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58HCIuad085483; Wed, 17 Sep 2025 12:18:56 GMT (envelope-from git) Date: Wed, 17 Sep 2025 12:18:56 GMT Message-Id: <202509171218.58HCIuad085483@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: 5fa6ca8b8aff - main - nfsd: nfsd_excred(): Remove an obsolete comment List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5fa6ca8b8affc8d948687c4ede7aeed297ae2dc0 Auto-Submitted: auto-generated The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=5fa6ca8b8affc8d948687c4ede7aeed297ae2dc0 commit 5fa6ca8b8affc8d948687c4ede7aeed297ae2dc0 Author: Olivier Certner AuthorDate: 2025-08-27 13:40:42 +0000 Commit: Olivier Certner CommitDate: 2025-09-17 12:16:01 +0000 nfsd: nfsd_excred(): Remove an obsolete comment This comment has been obsoleted by commit be1f7435ef21 ("kern: start tracking cr_gid outside of cr_groups[]."). No functional change. MFC after: 5 days MFC to: stable/15 Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D52264 --- sys/fs/nfsserver/nfs_nfsdport.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/sys/fs/nfsserver/nfs_nfsdport.c b/sys/fs/nfsserver/nfs_nfsdport.c index 7040c4afb797..5ba86314ead1 100644 --- a/sys/fs/nfsserver/nfs_nfsdport.c +++ b/sys/fs/nfsserver/nfs_nfsdport.c @@ -3478,11 +3478,6 @@ nfsd_excred(struct nfsrv_descript *nd, struct nfsexstuff *exp, (nd->nd_flag & ND_AUTHNONE) != 0) { nd->nd_cred->cr_uid = credanon->cr_uid; nd->nd_cred->cr_gid = credanon->cr_gid; - /* - * 'credanon' is already a 'struct ucred' that was built - * internally with calls to crsetgroups_and_egid(), so - * we don't need a fallback here. - */ crsetgroups(nd->nd_cred, credanon->cr_ngroups, credanon->cr_groups); } else if ((nd->nd_flag & ND_GSS) == 0) { From nobody Wed Sep 17 12:18:58 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cRd9G4LQzz67Hhg; Wed, 17 Sep 2025 12:18: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 4cRd9G1JvQz3VPb; Wed, 17 Sep 2025 12:18:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758111538; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=F7C+2P9AFIQjj5xwwfSmeDQ5qpe3OZY7JruBXQ6zqEE=; b=VFMxrrn5QlaFPZaSBZw84KPODZelGXXviNwEG4fhOTKYCn7x33+iMEik+qxfVMUoLAnxp4 /sEoL8Iy7KUZSOZz567Z0Qtn/QTTTnGAV85Sa3mYYHm5djQ/8aX10MP+Wvy2RT3HWFeb32 x2nty1u7MLV3Cbj29/2+9zFjX32GcQWnPewuuKFeC17J26nJuatyncCN8uaC3LW+Kqm01+ JJ/GiCHYw5u6DTRgYMENvWW5iL6eO+JL0VxCtJe9BtEXkpyQInV+8PBmTrjHF8iTdnns99 ZNTAT8wroIdJs84tBsw6MzFlicYzcEEWH9kxPcYamLyxE1GGWjGMGNsMCBP0xw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758111538; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=F7C+2P9AFIQjj5xwwfSmeDQ5qpe3OZY7JruBXQ6zqEE=; b=XMElTIyri8LSMa90OZ44PQPgHJ7WLaGp7O23CcRJpzHYIBNaldVjL9kmhAGstp0sVfr1BO pSiquqj9ExZsnUbx8FwHkoIziV62GAkGI8nM/njMFZnY978WH110YvYtp6E+Uv/YZeKlsQ FLYkMSHZr8ZXUrXvS6XtuSjXDSNK2TcX9vxQ66RrXOXqXtc4/cpR/ILWTXiUlFx6A1u58x Q8Auyz2zZIkEx481TIRjX8G/E/3sMecKcLmw0XPSdriSJT3P8LCqfEPaxUR9yyI5c7p+rv sWZHprT/2ux2Ok6xRPGmxvi6G7mrMSbryIwQ+sLkwU4qdlvYg1P7XElQ3AEWvA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758111538; a=rsa-sha256; cv=none; b=cRZaIYRXofm8iS5LTwYlzTpBvdvDvdH9eV1dBG4ovxkInHmJ/hPK4YhMuxW7OBrvciPCyy LqnDk7Zh+0FM16K0J6hlDKduR93xkr0h/0onl/VNbx/RDr7TeWnPdUsC6d1KJl5acZ2F17 eWhT9sFtaiWNCZEEuEh8M7WC4zUHwLjZxMgCX0UcZHWz5SCvZow7UIirl+xtxduyDAf7xG 6GSolK6XVVe1oPWzNIm8MQcOBkwBRYcXK74DQU2bhCB0tP4TnsKQlmg6waN/+Mdw0Wno+c z/lwJosxYnowLjafgSymCUNDveJ5FgEvOeKlP4XVclXPxoUZ+MM0JuU064SKBQ== 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 4cRd9G0wG7z8wR; Wed, 17 Sep 2025 12:18: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 58HCIwkf085520; Wed, 17 Sep 2025 12:18:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58HCIwMx085517; Wed, 17 Sep 2025 12:18:58 GMT (envelope-from git) Date: Wed, 17 Sep 2025 12:18:58 GMT Message-Id: <202509171218.58HCIwMx085517@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: a61e7b5c98f8 - main - cred: 'kern.ngroups' tunable: Rework the comment on the initial value List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a61e7b5c98f840b4a7777d718218d0f63569c52a Auto-Submitted: auto-generated The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=a61e7b5c98f840b4a7777d718218d0f63569c52a commit a61e7b5c98f840b4a7777d718218d0f63569c52a Author: Olivier Certner AuthorDate: 2025-08-27 13:50:59 +0000 Commit: Olivier Certner CommitDate: 2025-09-17 12:16:01 +0000 cred: 'kern.ngroups' tunable: Rework the comment on the initial value Remove the parts about the effective GID being stored as the first element of the groups array, as this is generally not the case now after commit be1f7435ef21 ("kern: start tracking cr_gid outside of cr_groups[]") (some credentials export structures still have the old layout, and need to do the 'ngroups_max + 1' computation, but given the computation needed to obtain a size in bytes, this detail is not really important here). Remove the part about 32-bit machines, avoiding another modification when support for them is removed. No functional change. MFC after: 5 days MFC to: stable/15 Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D52265 --- sys/kern/subr_param.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/sys/kern/subr_param.c b/sys/kern/subr_param.c index 471640c290a7..a67e5fa6cbff 100644 --- a/sys/kern/subr_param.c +++ b/sys/kern/subr_param.c @@ -235,14 +235,11 @@ init_param1(void) * specification for , paragraph "Runtime Increasable * Values"). * - * On the other hand, INT_MAX would result in an overflow for the common - * 'ngroups_max + 1' computation (to obtain the size of the internal - * groups array, its first element being reserved for the effective - * GID). Also, the number of allocated bytes for the group array must - * not overflow on 32-bit machines. For all these reasons, we limit the - * number of supplementary groups to some very high number that we - * expect will never be reached in all practical uses and ensures we - * avoid the problems just exposed, even if 'gid_t' was to be enlarged + * On the other hand, a too high value would result in an overflow when + * computing the number of bytes to allocate for the groups array. We + * thus limit the number of supplementary groups to some very high + * number that we expect will never be reached in all practical uses, + * avoiding the problem just exposed even if 'gid_t' were to be enlarged * by a magnitude. */ ngroups_max = NGROUPS_MAX; From nobody Wed Sep 17 12:18:59 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cRd9H5Vjrz67Hjq; Wed, 17 Sep 2025 12:18: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 4cRd9H2NmBz3VYr; Wed, 17 Sep 2025 12:18:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758111539; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Mlml3Kw6TPQDgNasxCSXuZ1fuWjkgs0e4UO0VZ1TbyU=; b=MjgUd6mlJnaIh2QyUjtUCV4Dvq8bd6Y8kXfked55x9l1LmEaAGQycCj21UD3uQchL+HLgi 2OLxsjg2ZSF4bkwssiZm9ZCETHQ23LSqtexmqiqH57F0jh58Hrv1iKKtY/3gty8rKSUx8f /+BnzzhIFechkFlyW45/7RFxabr6O98UUFxMqvRilwos0wHqLQcUeav1Bv1u3XuN86PsT7 IdgvnHWhRw6HpoOQ6SVapCyqibAuAPrLQfteiTTDaDVmcQ1IGUGh41EyYS9bz9GVWBDecs pHoVDzGpm5zh/jbP3VSvWjf89SGnJPMbNHzvNMcOfvEC9MuHrxNt6M7WdXL5FA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758111539; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Mlml3Kw6TPQDgNasxCSXuZ1fuWjkgs0e4UO0VZ1TbyU=; b=ylMSwJToPmh+uPfu5+TE4GU8vztDfq0fDDW7q/TuLx6G2A3CsizXQs2qxF966z3IzVRr8y 7qREtJCOyo8dHkIJyFycwxa2axi1imw0W1PQhmkKtmVqL9fwKz9GLQCd0HbGwOWnLTISnw g914QWOcAfkhForq5QFbDyMvGYz2zTSJT+/FaBAlziRYBAzCTX55Y8mZw+EcKSn93sft1Z XocwMyoSx3JeHt+BAIK84NphXVd+72srRq82q+hMUmkm5OwKOByso5sXAwvw1Om2R/x6vQ chLF5KDPco/BvWI2tG1/Tp2V2RFVWfc653G+Vxl/Q1+RRiLapIqZwvqBDuvTYg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758111539; a=rsa-sha256; cv=none; b=juQ1uOGZmlPQvw3CS6LJM+UjNXR6k9tisKNRDCn14TqaEzI/RPVyxx8Ow9NaafudOrSOfc r3yGTnBzsSfFmEOJcKuWn28kTvlWPq6SPrxwEoRRNuaCagbDgz5tyh1za9r2pR4z1otuEh ROZNTGcr9146iKHIN9pl7Az2QSrBwiaOGUwBMMEiKfHS4M/SYsoOFaopfcKxCoPDtTNEfI CTDakxpCkHPzhwkNIfpN0U1ZCED3tNwQdpTlCG7J1MIePfJstgpTREuQ2KR01NTY4dmQzf bCxrXhNu1U3Qk/Fxs3MB2ceHd5fxzzEFqZgO3+++hgA2DqH1wAmGZTaL2UIgrA== 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 4cRd9H1yQCz9Lp; Wed, 17 Sep 2025 12:18: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 58HCIxYS085560; Wed, 17 Sep 2025 12:18:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58HCIxWI085557; Wed, 17 Sep 2025 12:18:59 GMT (envelope-from git) Date: Wed, 17 Sep 2025 12:18:59 GMT Message-Id: <202509171218.58HCIxWI085557@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: 9397b2ef741c - main - cred: Update some comments after 'cr_gid' is no more cr_groups[0] List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9397b2ef741c57c8b2f0fdf796cc86267ecf2213 Auto-Submitted: auto-generated The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=9397b2ef741c57c8b2f0fdf796cc86267ecf2213 commit 9397b2ef741c57c8b2f0fdf796cc86267ecf2213 Author: Olivier Certner AuthorDate: 2025-08-27 14:07:03 +0000 Commit: Olivier Certner CommitDate: 2025-09-17 12:16:01 +0000 cred: Update some comments after 'cr_gid' is no more cr_groups[0] While here, fix style of some already-updated comments. Fixes: be1f7435ef218b1d ("kern: start tracking cr_gid outside of cr_groups[]") MFC after: 5 days MFC to: stable/15 Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D52266 --- sys/kern/kern_prot.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index 0ca42d640767..3333a168a754 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -1803,12 +1803,6 @@ groupmember(gid_t gid, const struct ucred *cred) bool realgroupmember(gid_t gid, const struct ucred *cred) { - /* - * Although the equality test on 'cr_rgid' below doesn't access - * 'cr_groups', we check for the latter's length here as we assume that, - * if 'cr_ngroups' is 0, the passed 'struct ucred' is invalid, and - * 'cr_rgid' may not have been filled. - */ groups_check_positive_len(cred->cr_ngroups); if (gid == cred->cr_rgid) @@ -2921,8 +2915,8 @@ crextend(struct ucred *cr, int n) * Normalizes a set of groups to be applied to a 'struct ucred'. * * Normalization ensures that the supplementary groups are sorted in ascending - * order and do not contain duplicates. This allows group_is_supplementary - * to do a binary search. + * order and do not contain duplicates. This allows group_is_supplementary() to + * do a binary search. */ static void groups_normalize(int *ngrp, gid_t *groups) @@ -2985,9 +2979,9 @@ crsetgroups_internal(struct ucred *cr, int ngrp, const gid_t *groups) * Copy groups in to a credential after expanding it if required. * * May sleep in order to allocate memory (except if, e.g., crextend() was called - * before with 'ngrp' or greater). Truncates the list to ngroups_max if + * before with 'ngrp' or greater). Truncates the list to 'ngroups_max' if * it is too large. Array 'groups' doesn't need to be sorted. 'ngrp' must be - * strictly positive. + * positive. */ void crsetgroups(struct ucred *cr, int ngrp, const gid_t *groups) @@ -3018,8 +3012,8 @@ crsetgroups(struct ucred *cr, int ngrp, const gid_t *groups) * Same as crsetgroups() but sets the effective GID as well. * * This function ensures that an effective GID is always present in credentials. - * An empty array will only set the effective GID to the default_egid, while a - * non-empty array will peel off groups[0] to set as the effective GID and use + * An empty array will only set the effective GID to 'default_egid', while + * a non-empty array will peel off groups[0] to set as the effective GID and use * the remainder, if any, as supplementary groups. */ void From nobody Wed Sep 17 12:19:00 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cRd9J6D3Jz67Hq0; Wed, 17 Sep 2025 12:19: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 4cRd9J3hGZz3VpH; Wed, 17 Sep 2025 12:19:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758111540; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vWCOIrvzffqPyP+DjJyHGnhBfHbmFoC7DIGGFgAVka4=; b=dlVVtXGnYpCnrRpLEvz+YZS77XtXKTFDT0cINTpga4saF2u95hNoDgUY+h2t9Pyj++eHFk X2WHbXbgrALpGQ0569GRsFdbKnum8p6ZitLhPg3kXzZweIYIcXaDMpUICDgQZrv6ZrvYy+ 72BNGmK0cq61MSzb5OM0UwYG642RY9MVoa4qfl/sjfilZrFZ0dtLtHEICArDUqKBun5muH zyUbrYvRfN6eKf897JTpCr5EknhdBT0f4UrQ0uJ0yNXjcYI2FzYkYFeVmrosQ4HQlGVh4K sXHGT8+WmNDCfuRl463G8wikIHUEMYeGCSq6UatkWVMZo+D5M6jOi7qMFSOLJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758111540; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vWCOIrvzffqPyP+DjJyHGnhBfHbmFoC7DIGGFgAVka4=; b=ORgfcVAxqfoMPMzpp20KQzR2ca0qKVkHR+c3N8z/0ywYELdJ4XMv2jgcfRENEhIgEO9p47 ZfrPwQUOKkL/InKeud71GHGoxAfp53qK8HJvcdr/+9pSmGizCyJ8ruaolmb/YvV1fadhJg XgPzGPNfhx7i7CXPmo567xfiEoetNNgqktXJ8JpLWmZe5ZjxplsGJdZyyL5tC8xQxyn4PT wmc9xceyMNC0eCISMZg3pMs728PWFf0QbzVxRURLXsOYLMYHVYlKE5L3u0zb0pnklUDTHq +M0dHR3M1doyMFl9TR8ymdSnUFYrTF/88j5t63OiOvH9mXpuwpqHovTzAM5a1Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758111540; a=rsa-sha256; cv=none; b=qzxL+uJ1mdExAtgMyREGQBKKVIc+J0NnRMH5lJOONqOKLMy/F+HjUYba6dToZX4FTNpkg/ P1xuSrwwbU6N7B1RXfhYDad4Gl/WAVZHY1shDq6U+WfkqRF0a5xnZgjNL47Lcc4EhswBO8 iYSraXqScLijE3jt5kQ7G0856w3QZn9ZjaBjHomXKDR+6t9Xlp3ZXMSGEy4IAKxbIfabVT n26sRCia73hONu5lO0wxBRqKv1EhN10eLLk4RM6hMwHwz+EqQm/w5Oa0V9iqsGLAuhIKdJ s+9bPSp5MHuBqRGo/ymsT3jOcCViCO9MrhxMgIjmtJUAsVIcf+Hng9uBtqejpA== 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 4cRd9J33j1z8yl; Wed, 17 Sep 2025 12:19: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 58HCJ0Kr085601; Wed, 17 Sep 2025 12:19:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58HCJ0vl085598; Wed, 17 Sep 2025 12:19:00 GMT (envelope-from git) Date: Wed, 17 Sep 2025 12:19:00 GMT Message-Id: <202509171219.58HCJ0vl085598@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: 30193fce433c - main - cred: Remove obsolete comment after getgroups() not returning the eGID List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 30193fce433cdad465904b6efe3814bf234ea74e Auto-Submitted: auto-generated The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=30193fce433cdad465904b6efe3814bf234ea74e commit 30193fce433cdad465904b6efe3814bf234ea74e Author: Olivier Certner AuthorDate: 2025-08-29 16:35:56 +0000 Commit: Olivier Certner CommitDate: 2025-09-17 12:16:02 +0000 cred: Remove obsolete comment after getgroups() not returning the eGID No functional change. Fixes: 9da2fe96ff2e ("kern: fix setgroups(2) and getgroups(2) to match other platforms") MFC after: 5 days MFC to: stable/15 Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D52267 --- sys/kern/kern_prot.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index 3333a168a754..591994e92e7d 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -291,11 +291,6 @@ sys_getgid(struct thread *td, struct getgid_args *uap) return (0); } -/* - * Get effective group ID. The "egid" is groups[0], and could be obtained - * via getgroups. This syscall exists because it is somewhat painful to do - * correctly in a library function. - */ #ifndef _SYS_SYSPROTO_H_ struct getegid_args { int dummy; From nobody Wed Sep 17 12:19:01 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cRd9K6Rtsz67HkW; Wed, 17 Sep 2025 12:19: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 4cRd9K4PHbz3VZV; Wed, 17 Sep 2025 12:19:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758111541; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=i5NOZCmyjCRVCP+YjQ/8UfXa2pso0Zyj3uQIn82n0Ck=; b=qA4J2gBNdUFpyOfNvfZcJ2fog8ibg0N5433KxRDEslVMxaJTX41xk9aLfBB68QkJhk1IZx VCTI6JuoFOf0YYpE1zxP2y2dDMEQdvku2is5eyEvwUwUS4d4t0sVTa2HuDf8+A81JQ9zCO jieOFZKKNcVxxfBAxtxOSZSJDhsmmP879Fkoq2brWXiIbn+C9BqVAeLyFgSayvNsOvsJYt UUhuk5qBdLdkPVhQYPPxdGB/+MMOopH0BYhhArJ4qsENmjnGuKpqMjXWHgOtxBnF9OGY4p BX3XlPp6u6Sgip0Mm85BDB4NyvE1ZS3w86bLSKQDNfwLd6mPA0YDQ78xnOGDlw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758111541; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=i5NOZCmyjCRVCP+YjQ/8UfXa2pso0Zyj3uQIn82n0Ck=; b=jtYHvKn1ctEJHCR+AFg1/ZTuT/qXwdloyI9eSLwhwhXfDf0/pMCT0mbK8J98/9WHOqw0kx 0oJjr3AobOSSf478UNqQgIjH61lLZOhkwVucsRmp1Vh26xjwxucZrN6oKxYSJXB5Hbgjod sm2DZmS5LyzGfPJ8Yns3N7Mkjp4sel6hPwt526fmn2eoDLSzaisf84hkF2ShwscENH2XFW NWtpt6DiNNape2uJhI4xzmJJvJuq/VsVL7qaJNLLMq+pTS1L2CEd/WEa3HfE3/MXRxaV2t nZztF5Yawn09Lh5dTL1iGL3ukTIbebzVCdjGhDdsmtSJJHRIKC4V3rPzwLtRzQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758111541; a=rsa-sha256; cv=none; b=uuWBmDpxSiaaIWjgTe1yMpKRpMp6khwgmqIWMxnagvg4WWaOM77rmZ9hrouQOIE/wcctUW i4Kd5N4mMUG4I2Ylhh/ucsT05ObJQX6cMXluFIEbB7YyDtlD0gA7bnrKXrHrd8tJpY1Sdw wgb0O5uYRLfsBOFXVtFqcEjVWd0ewKvs8tKvbMar4EkSqBcdBXc+mKo4X8U0tz3GtKMs5V kLCIhvcywmq4Xw4mm6hC9pGYUcQ2fGBsMkmLx2wvmVilq21ElSQksxp8RQO5wyrypUo0yU Am4PIOuOnKwThPuKo63SKpqdYt7/nI0zOhN/hxJGKbSWZm/BcgTn1hN1ZCPdzw== 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 4cRd9K3l2Tz9hM; Wed, 17 Sep 2025 12:19: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 58HCJ1cw085635; Wed, 17 Sep 2025 12:19:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58HCJ1BT085632; Wed, 17 Sep 2025 12:19:01 GMT (envelope-from git) Date: Wed, 17 Sep 2025 12:19:01 GMT Message-Id: <202509171219.58HCJ1BT085632@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: fa1cbb02d120 - main - cred: Restore proper checking of effective groups in some security policies List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fa1cbb02d12055db0584882d586658be643f0949 Auto-Submitted: auto-generated The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=fa1cbb02d12055db0584882d586658be643f0949 commit fa1cbb02d12055db0584882d586658be643f0949 Author: Olivier Certner AuthorDate: 2025-08-27 14:28:15 +0000 Commit: Olivier Certner CommitDate: 2025-09-17 12:16:02 +0000 cred: Restore proper checking of effective groups in some security policies The removal of 'cr_gid' from cr_groups[] as cr_groups[0] made cr_canseeothergids() skip considering the subject's first supplementary group, causing the 'security.bsd.see_other_gids' policy to be too restrictive, and cr_xids_subset() miss a check on the effective GID, relaxing the "can debug" and "can export KTLS keys" checks. Fix these policies. Fixes: be1f7435ef218b1d ("kern: start tracking cr_gid outside of cr_groups[]") MFC after: 5 days MFC to: stable/15 Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D52268 --- sys/kern/kern_prot.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index 591994e92e7d..6485254d300d 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -1889,7 +1889,7 @@ cr_canseeothergids(struct ucred *u1, struct ucred *u2) if (realgroupmember(u1->cr_rgid, u2)) return (0); - for (int i = 1; i < u1->cr_ngroups; i++) + for (int i = 0; i < u1->cr_ngroups; i++) if (realgroupmember(u1->cr_groups[i], u2)) return (0); @@ -2265,6 +2265,7 @@ cr_xids_subset(struct ucred *active_cred, struct ucred *obj_cred) } } grpsubset = grpsubset && + groupmember(obj_cred->cr_gid, active_cred) && groupmember(obj_cred->cr_rgid, active_cred) && groupmember(obj_cred->cr_svgid, active_cred); From nobody Wed Sep 17 12:19:02 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cRd9M11slz67Hkc; Wed, 17 Sep 2025 12:19:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cRd9L5Vdjz3Vcb; Wed, 17 Sep 2025 12:19:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758111542; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/PyDjLi9ezqN+IE5K322iZOoZI4KFDr8D+XN12gQP0k=; b=SZVIro5WYE806neuSgj2Ex/uij1BkSB0I8w9HffNyD3t5Iur+9C9DnOAeArH+wZgNOWU0v HZ/GkRlsk/bHmnHwSrA9QbYuZgWEBKPdtVMVrI8C6cwzSAheTWvVOb5KTk+Mqe8cS+1uhb gN44lVVLzYYphQjO1RL8d9+g87by0b1Sj0vM4lNqh+Y1XSqeIyjIfJzY9ZuXM3mhFeMAPH iQzpwAgKSDqbx9iEbHcoErYDOKqCLoMlx8LZ/aoapYwn6S71F8Y4MXVViGTD4lG09y7Ypw cErxZ3036FfMolceSaMk6wHdvwED7pEpwPx5OxJYvoMuCexvNt/ljQb05+n+pw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758111542; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/PyDjLi9ezqN+IE5K322iZOoZI4KFDr8D+XN12gQP0k=; b=wF8xxX1XbnDWolTulhe807XRVt5Q2g9b7syXI/rs46OgLx+QIeUun2O6zPqhm0D7KQjLxu A38oGyc8DCopy7kxBmXj6BtUvHoyGpvQyJFBWaFP8D60te+LRGuQRJgpiWNdHL4CZv2feZ v+xGRjw8UGKPNlIqNh3VbYpnyJxv3WD0ur+nSWqtxJv22P/drjo9hGAM+i5RYVFijlVC9D eMTyefUhtPxq2+i92w1rM9skpSw8o0qBVfQXqTYpH0DXX25vTif4NL48QP7kfPXFdA1Rbh bb2j39vUoozrtf9s8uCF5p03yO48eeB0OVbHmC2CErVKg0s423/01XCoLy78Hg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758111542; a=rsa-sha256; cv=none; b=m25Wwh1vzTj1km82W2nZ3MiAscwiH0foE2Yg6YLPytTso5UMny6XJT05YkHg9YszDayTvQ c76o03hdNd8LDxlGtv3NoZplW/URJV/hu3gbKfiMxVHHgiWt3FR1Yz1I604jQcGb755SjZ XjIZGgwyTl/X63COI83uaKPxgikEiCAB8m9vDSQEJ1b1wZoDz71dDisgxqv/hoRDRZz+2Y 6PcgQtLD5s6+7CFJzTTISUp3rgMD5AKE1bjjs90HchAX1lU7TGa9agL2vRy6x1HTVWS6dk vTyF9ZYA+BPIX8jxs0pNepp6H6WV0JibvzWuJEwwZ7Zq7MfXdXOqhSQNRcfiQA== 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 4cRd9L4hGjz8wS; Wed, 17 Sep 2025 12:19: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 58HCJ2In085673; Wed, 17 Sep 2025 12:19:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58HCJ2XU085669; Wed, 17 Sep 2025 12:19:02 GMT (envelope-from git) Date: Wed, 17 Sep 2025 12:19:02 GMT Message-Id: <202509171219.58HCJ2XU085669@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: 0abeb8d8d8df - main - cred: 'struct ucred': Rework comment on 'cr_gid'/cr_groups[] List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0abeb8d8d8df1842b0c2d2276c958b0150579a1c Auto-Submitted: auto-generated The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=0abeb8d8d8df1842b0c2d2276c958b0150579a1c commit 0abeb8d8d8df1842b0c2d2276c958b0150579a1c Author: Olivier Certner AuthorDate: 2025-08-27 14:33:24 +0000 Commit: Olivier Certner CommitDate: 2025-09-17 12:16:02 +0000 cred: 'struct ucred': Rework comment on 'cr_gid'/cr_groups[] Make it more straightforward for consumers. Also, recommend using cr_sgroups[] for supplementary groups, as this can generally alleviate index problems and will help us spot and change consumers if/when 'struct ucred' is evolved incompatibly (and cr_sgroups[] suppressed). MFC after: 5 days MFC to: stable/15 Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D52269 --- sys/sys/ucred.h | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/sys/sys/ucred.h b/sys/sys/ucred.h index 9c1d8545af34..254f58841993 100644 --- a/sys/sys/ucred.h +++ b/sys/sys/ucred.h @@ -112,15 +112,21 @@ struct xucred { short cr_ngroups; /* number of groups (incl. cr_gid). */ union { /* - * Special little hack to avoid needing a cr_gid macro, which - * would cause problems if one were to use it with struct ucred - * which also has a cr_groups member. + * The effective GID has been the first element of cr_groups[] + * for historical reasons. It should be accessed using the + * 'cr_gid' identifier. Supplementary groups should be accessed + * using cr_sgroups[]. Note that 'cr_ngroups' currently + * includes the effective GID. + * + * XXXOC: On the next API change (requires versioning), please + * replace this union with a true unaliased field 'cr_gid' and + * make sure that cr_groups[]/'cr_ngroups' only account for + * supplementary groups. */ struct { gid_t cr_gid; /* effective group id */ gid_t cr_sgroups[XU_NGROUPS - 1]; }; - gid_t cr_groups[XU_NGROUPS]; /* groups */ }; union { From nobody Wed Sep 17 12:19:03 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cRd9N1gD0z67Hk5; Wed, 17 Sep 2025 12:19:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cRd9M5pP9z3VTm; Wed, 17 Sep 2025 12:19:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758111543; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZKeppte6CTIakUWG4HFaTCo4vr6N7z6KnARJ3xM+zbw=; b=nYG5eg/T1p/2ZXwg4tHA3c7h6mDxkBQ1tuHphu8KWg7iQPSGbAzxbYECZLWB0uuL7AoDsq c4jmpxNBXzS8h79pGbF+HGpIiEoT2hIUIEl0Dj2cIqf3xI+lH1joYjjLCCUlfbpDJomfmT xtZPHGR7g59OOniwQzHUkbMPeuSY1XXjZhcpAhU1/kQMpbJwCOdliN5kBgIBXLRtiH7AM7 8p2Wu9CxDeCYKa8I6zx1VXxlmfn4UQq4AQJ97EojpnVQ246z9GwnCLXi/d5XcXiagm+Xkq g1AuCWX5Dj0nMQWy/376oSQpEyO+wYWDYRr6fvK8RwxFb8bAGuy95cDGrCEBBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758111543; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZKeppte6CTIakUWG4HFaTCo4vr6N7z6KnARJ3xM+zbw=; b=kcw3KUcsWw0yvtXGew0nMNxS68LUAFO2VBto6uMncof479Orn69AEU3FoYLG+Chqhnyuuk aGUCQZhkncSHA1dp1goAKkC/V9cx91r6IeVRS4iSarxNcPlOci4QU3fS8SKTn75ahy/By6 UugQ1CEZ2XHHbCcVNRfrES2sRt4Sq74WgcMHTdFae0f9J8ro8+siAZpKNCfszNi96bv66C hTl3fO+aIn/VO7B0Yh+pWPIehhxtzuI/4OXyTmBl9LmtA7AYQM9vBNVOPmBjwVuDmHszcS ky3OCowidaHBTycbGFH2FJEoqf8WvBb44gIOp0L6q8w9y5sKd5r9bQM2rKKO8A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758111543; a=rsa-sha256; cv=none; b=bOqONhBP/yrVz3stMF0gS+O//zhAe77TlvHktfpkcmlmwAAHtoqRfrI1GZEEOA1/BkkWaa wa4FLOWOqI6KKIDSO2c5/pBg4GGxwST4ZjF5QoU0jATZavHrFvmRGalbY4OF++IshYkdln Ijsxrg3ivXbhkFwXHcr0TOyzKQ4YhnRfiGpk4X3AvNmZGSp+oB1huueskviT29SD/foBjH ffcFk7AAfQAnxX6SpPh5ltXlU+sjRuFVtmyDkqDggqmW1Lf8cxjoH5xnchzKRgh/ew+uVG 7A203DES+vwIHW2Fwlrl1skw4w3R+OD6jFB4nqStAEIga6zDYaqpdpVXSt5Tjw== 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 4cRd9M5HHhz8ym; Wed, 17 Sep 2025 12:19:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58HCJ3ZE085715; Wed, 17 Sep 2025 12:19:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58HCJ3Ki085712; Wed, 17 Sep 2025 12:19:03 GMT (envelope-from git) Date: Wed, 17 Sep 2025 12:19:03 GMT Message-Id: <202509171219.58HCJ3Ki085712@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: ab7186a48634 - main - MAC/bsdextended: Restore matching subjects' effective GID List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ab7186a486347216fde099498471cf847828565c Auto-Submitted: auto-generated The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=ab7186a486347216fde099498471cf847828565c commit ab7186a486347216fde099498471cf847828565c Author: Olivier Certner AuthorDate: 2025-08-27 14:56:21 +0000 Commit: Olivier Certner CommitDate: 2025-09-17 12:16:03 +0000 MAC/bsdextended: Restore matching subjects' effective GID Fixes: be1f7435ef218b1d ("kern: start tracking cr_gid outside of cr_groups[]") MFC after: 5 days MFC to: stable/15 Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D52270 --- sys/security/mac_bsdextended/mac_bsdextended.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/security/mac_bsdextended/mac_bsdextended.c b/sys/security/mac_bsdextended/mac_bsdextended.c index 8a6549214380..bf95c008e2f2 100644 --- a/sys/security/mac_bsdextended/mac_bsdextended.c +++ b/sys/security/mac_bsdextended/mac_bsdextended.c @@ -246,7 +246,9 @@ ugidfw_rulecheck(struct mac_bsdextended_rule *rule, } if (rule->mbr_subject.mbs_flags & MBS_GID_DEFINED) { - match = ((cred->cr_rgid <= rule->mbr_subject.mbs_gid_max && + match = ((cred->cr_gid <= rule->mbr_subject.mbs_gid_max && + cred->cr_gid >= rule->mbr_subject.mbs_gid_min) || + (cred->cr_rgid <= rule->mbr_subject.mbs_gid_max && cred->cr_rgid >= rule->mbr_subject.mbs_gid_min) || (cred->cr_svgid <= rule->mbr_subject.mbs_gid_max && cred->cr_svgid >= rule->mbr_subject.mbs_gid_min)); From nobody Wed Sep 17 12:19:04 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cRd9P3Xqgz67HYC; Wed, 17 Sep 2025 12:19:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cRd9N6hRvz3VV7; Wed, 17 Sep 2025 12:19:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758111544; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4QbtC8363H0wcUtBXMX/X9aoCgTYnMIcfsbPtsP5zRo=; b=S4wODkSRP2j6gcA80Uo7y+dm2VqX0cMDRzVgdtzzZzw4pvISDxl7YojhSPpNjnAVzU7/Tm L4GNIaO4vPu1vwWxSKtTS+B3h636X1FrjvWrs8hYkgWUs07q4NWvY32JeQEjN9OHogG4VN BP16Ln5HjNVdLv0CgmUg8/XBH7eP3uab7yTSyQL7v2uYSadoTM553ULBpnCRA1i/lnWBMb nM65eVsN/P+/lmwraMJ+6JRfe3jVSwoI1scmGF+11nBWUpGA89e6YR5Uz+0u4GES5xx1Kx bG+ZcypP52AUtb+Tj05cKmyTX1jM1JxlvMvzqnZhhHr8LfzFmiSKPCAmElX/xA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758111544; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4QbtC8363H0wcUtBXMX/X9aoCgTYnMIcfsbPtsP5zRo=; b=ebF0czRQEbgWK0t7pLoc5zlAkIwrXXZeKl+vCwANqStDJz5l7hcoRJ3uiQVul7m9Y6NEA2 7BMXSITnwqu0qUrCTLqWwZbc3QXdRO/ERdzxTcVU4TQCFq/V99pRyUqGCS+vXzpKle+IPy m1+dMXebNMiBB9dBASSlQczpBHA2+Wvdz7+87Vk7vAniLXIqyazAs54zZeMdof+nkCZ6gI vEMgDhkvFTtaYXFEVlH5hQzOmnpaD5VDYcp/vCjf17uRfpII69rGSGCHD1v7XhpGlSDGrx rU4LgDRLKQzaVrrMXN5ZSHVespqctN0OPT11ZQDqOoX43NnNdwOhCVP+bhAWQw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758111544; a=rsa-sha256; cv=none; b=QRxcrSiHzV4pSM+r3cHCAKWYeYR4F7BlOjSSWpx7B1Mo6hOZNxVSd8DHdmnzT00pwUn1mu e445w6gbn9jzmvFmgEk+R84CgX5024Kjod64/br2/BpLzer7X79eWB2SNKf+Lwi42rgpO4 X4BeSHmtcXL9K1WXP7fZbXaZOfG4mLQtaFOqXvAfdHxEuH7cF+C8YbSx/Ogiq36iOYnybL HXMHHQ89iOAtmhPNbYSnGj0/EokQjO9xAyczy5TWu6DGounsGNZ4h1LkvMBYKG6RsIqXVf V3zGaopXEb/kkvnSRRE5PtdeRrCuE/dMBLX1gEFkosc7cHB3xHpw4NhF0Rplkw== 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 4cRd9N6Drhz8yn; Wed, 17 Sep 2025 12:19: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 58HCJ4ck085754; Wed, 17 Sep 2025 12:19:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58HCJ46s085751; Wed, 17 Sep 2025 12:19:04 GMT (envelope-from git) Date: Wed, 17 Sep 2025 12:19:04 GMT Message-Id: <202509171219.58HCJ46s085751@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: d39756f23fe2 - main - MAC/do: Restore matching the first supplementary group List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d39756f23fe223d14ff00b1392ba39e94d5eadbc Auto-Submitted: auto-generated The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=d39756f23fe223d14ff00b1392ba39e94d5eadbc commit d39756f23fe223d14ff00b1392ba39e94d5eadbc Author: Olivier Certner AuthorDate: 2025-08-27 15:22:26 +0000 Commit: Olivier Certner CommitDate: 2025-09-17 12:16:03 +0000 MAC/do: Restore matching the first supplementary group As 'cr_gid' was in fact stored in cr_groups[0], rule_grant_supplementary_groups() would loop only on further elements of cr_groups[]. Now that cr_groups[0] is not 'cr_gid' anymore, but some supplementary group, take it into account. Fixes: be1f7435ef218b1d ("kern: start tracking cr_gid outside of cr_groups[]") MFC after: 5 days MFC to: stable/15 Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D52271 --- sys/security/mac_do/mac_do.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/security/mac_do/mac_do.c b/sys/security/mac_do/mac_do.c index 7a5ac2e01f75..6f3e63d06198 100644 --- a/sys/security/mac_do/mac_do.c +++ b/sys/security/mac_do/mac_do.c @@ -1650,7 +1650,7 @@ rule_grant_supplementary_groups(const struct rule *const rule, const bool current_has_supp = (gid_flags & MDF_CURRENT) != 0 && (gid_flags & MDF_SUPP_MASK) != 0; id_nb_t rule_idx = 0; - int old_idx = 1, new_idx = 1; + int old_idx = 0, new_idx = 0; if ((gid_flags & MDF_ANY_SUPP) != 0 && (gid_flags & MDF_MAY_REJ_SUPP) == 0) From nobody Wed Sep 17 12:19:05 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cRd9Q0xPYz67Hkl; Wed, 17 Sep 2025 12:19:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cRd9Q08Vwz3Vkb; Wed, 17 Sep 2025 12:19:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758111546; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cAghK0+HcRNoaVtvwc5F/57nLOemNvnMRWc4vqlQG98=; b=ZUOpaW/V/8xFG/gDc9u3vs+UeaKwTMHpN4ldDG13W6PJe++wXwh+pxkioTQqYO791MlrfV Py0JYyBTaXTLcTy1wV3XWCfQcv4RBpyMJGNjucNJGGZGfEZK0jAr4oAsdZwooDYiJr13Vp RxGhMoFFIpI1dkcSRttDvnqqY3D/BjDsA5LiS9kAqr9ScZ6FmbSyuvxKD6BtKQ5RlBeGZc 4adRnSvJwTXz94J1obwTvoW0bRTLlv+Fmsg1V6Eck/NbVgwe2J9Ifn+1CJQtJRH1DUsuB4 HPlpNIfqkzLMoG/0UlNCYpwcGeNvl29iJ0DDk1mHRbU0osMMR/oWdo4LUBYvxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758111546; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cAghK0+HcRNoaVtvwc5F/57nLOemNvnMRWc4vqlQG98=; b=QjmrdFpkGBQVKXrPTq8OqOVSAf/D9aa9zSTWEvFVtGUcFyIAkWmBDreEwwiC5zIMeK5yEf c+eUrYYxisH4ceyZLw2KWwxZluWcLuvOs4xsPTae70UII+mbNppbSzCHG7G0iLZM3S9AXD Wiqos3a9/nAdmJzUlBLEB+zUwegpqD6a+fVZPl1ZbVksrMYOYijFbpJ4NHOHwpsSApIhtA tEO010oWmWfZqWb2B6dFrtnASTEPR2j6YAgXZRhef5ZoLQDLxpT7SIx9CoOft9Xb1W7S3/ +1aDjqMzGcavrTRKIe2j8umGCbXa5Q+ORRPNkLDKZurXRcKQCWKcA4bO+C8W8w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758111546; a=rsa-sha256; cv=none; b=hT96nsg0meaCK3mUPB+nLwveE+wWXGlbfa5iejlkV2W7Ia+57jWr7VzxYiHkHUjWgjV3ik bLTGPJm4wdXeQsBnm5hl7YGN1Y+rYHp9yyc70U3ES5BKHqNbvVCK7/u4kebw+wFoPx8HAD JJBMtrvY/OLCv4yhJYBdIQglx59V87p2+8zyDCR41xeFf0c0Jtno4rivFdzaw7yOLXyW+J z+6iS1VrAS9vcDLyWVgolPjFHD3lbbLM+SrDRY73bUosFSrKZM6Ay6wo5h4fTEg/ymgL7I gIWOjKWNZcUp6PziZgl/KVvzouE52pt3asvB1PDrHIAwn9aAnkUB7jS7tclHgg== 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 4cRd9P6rzvz9G5; Wed, 17 Sep 2025 12:19:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58HCJ5G4085787; Wed, 17 Sep 2025 12:19:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58HCJ5g1085784; Wed, 17 Sep 2025 12:19:05 GMT (envelope-from git) Date: Wed, 17 Sep 2025 12:19:05 GMT Message-Id: <202509171219.58HCJ5g1085784@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: f75d0dc53392 - main - cr_canseeothergids(): Make the logic easier to grasp List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f75d0dc533923345c653dcdcd5ebd1e53377a7c5 Auto-Submitted: auto-generated The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=f75d0dc533923345c653dcdcd5ebd1e53377a7c5 commit f75d0dc533923345c653dcdcd5ebd1e53377a7c5 Author: Olivier Certner AuthorDate: 2025-08-27 16:53:14 +0000 Commit: Olivier Certner CommitDate: 2025-09-17 12:16:03 +0000 cr_canseeothergids(): Make the logic easier to grasp Invert the initial test on whether the policy is in force so that, if there are no restrictions, the function bails out early, allowing to de-indent the rest of the code and have it finish with a non-zero (deny) 'return'. No functional change (intended). MFC after: 5 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D52272 --- sys/kern/kern_prot.c | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index 6485254d300d..a4c5bcc52529 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -1885,19 +1885,22 @@ SYSCTL_INT(_security_bsd, OID_AUTO, see_other_gids, CTLFLAG_RW, static int cr_canseeothergids(struct ucred *u1, struct ucred *u2) { - if (!see_other_gids) { - if (realgroupmember(u1->cr_rgid, u2)) - return (0); + if (see_other_gids) + return (0); - for (int i = 0; i < u1->cr_ngroups; i++) - if (realgroupmember(u1->cr_groups[i], u2)) - return (0); + /* Restriction in force. */ - if (priv_check_cred(u1, PRIV_SEEOTHERGIDS) != 0) - return (ESRCH); - } + if (realgroupmember(u1->cr_rgid, u2)) + return (0); - return (0); + for (int i = 0; i < u1->cr_ngroups; i++) + if (realgroupmember(u1->cr_groups[i], u2)) + return (0); + + if (priv_check_cred(u1, PRIV_SEEOTHERGIDS) == 0) + return (0); + + return (ESRCH); } /* From nobody Wed Sep 17 12:19:07 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cRd9R4wrtz67Hn0; Wed, 17 Sep 2025 12:19:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cRd9R1SCzz3VVP; Wed, 17 Sep 2025 12:19:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758111547; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=o7CAb+ogG+3H7yztK1f86DJeBD3UUUveqIOvrGHZg+E=; b=bfOkE6LAt8FP+tw30iyKtOtpgx/w1vtP8YafwamwqAG3EzHJROEchPSFLhyFYbtn0nnP+/ 9czE9HgETzymP3TIGt8JBSw1jIzObrLI5yzraQTIyU0HLRm7i0jtH/r1und0eAiZtRgxoo P7O51btH4t0X1vcgGn2SvQc60y1PjoUIIX0wuV9QIk4qhg4lyy502IhmpDD40MpbBGdlXi TlkM7QHumyhr4XZFgaTVfDVSgwzsAKrYL2GGlUFwdBa0Gsn3AVn376fitzlkuMQpyzEngd H9La/6Mbo0cmwIheOWw74HzYNih4YTw6clL5jeolJAdQSUBzxK06SAHR3fCL3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758111547; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=o7CAb+ogG+3H7yztK1f86DJeBD3UUUveqIOvrGHZg+E=; b=urX4h5LsHsVvUY5e3769lt+i8vx6tN4ngFBtQLOXElqF6X4plbjo1hXCpDJ7d28foLJWG6 gkN5U7HAdbjsWbsj+bVcz5tS3/Aw8f0hI+I6/8sydyLmuH30A4q0GexN2CnHi/GNbxXLf9 I9Ozpd6FZjFWAr1GCc8LRNRseX7vK12DmjirN2OZbbl5kRv9a46/2+AaJw2qaxuLTz7Y/S 6m4CehX9VH7QPGm+htSpQ+i9eH2dxPiQF7utvrI+1a9dh07vvvTbFRa6PPdIa8aGXU1C9F qkDItTfjjXfHkHzzaec31vTAh08yZ2nwwpZvUPuf+4u7QgsCGdrGGgM6/ArZ0g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758111547; a=rsa-sha256; cv=none; b=yDiTRvAxyCCDuQUxNZXytH7IcKnVYr8sHo51+glOQdhwmgOk3KjEFzeT0JsjLDutEOYZTV fi3EoMeZgogTmgEg0T90d0AEakjAdQS1VwKE5iEvSFRThiIELMJhYayY6sp3SETmzcsTju R1RpNzzBMX2ly8Hjvg0VG2/Eozdt8cneNSf/uD7N7xWxD9b5ZxYRLqFTeDDUPBBEaZCkak FC45vxzSHgBA8hwU/Q0sYB4+IE4O7d+FtquhYaxs9GyPgh5IN/Auo4C146wpxwgCyg6n6I dREVqYcHr4E+Ff5FNHjBBDW7QUOHUmBImdgB0PuZiwHWnGhAjde5glt4puKHdg== 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 4cRd9R10Dsz9hN; Wed, 17 Sep 2025 12:19:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58HCJ7d2085820; Wed, 17 Sep 2025 12:19:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58HCJ7qn085817; Wed, 17 Sep 2025 12:19:07 GMT (envelope-from git) Date: Wed, 17 Sep 2025 12:19:07 GMT Message-Id: <202509171219.58HCJ7qn085817@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: a207833f4fed - main - linux: Simplify further getgroups() after 'cr_gid' not in cr_groups[] List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a207833f4fed5431cac853c082fa34dc8f33cba6 Auto-Submitted: auto-generated The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=a207833f4fed5431cac853c082fa34dc8f33cba6 commit a207833f4fed5431cac853c082fa34dc8f33cba6 Author: Olivier Certner AuthorDate: 2025-08-28 15:29:33 +0000 Commit: Olivier Certner CommitDate: 2025-09-17 12:16:04 +0000 linux: Simplify further getgroups() after 'cr_gid' not in cr_groups[] No functional change (intended). While here, fix/improve style a bit and in setgroups(). MFC after: 5 days MFC to: stable/15 Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D52276 --- sys/compat/linux/linux_misc.c | 36 ++++++++++++++++-------------------- sys/compat/linux/linux_uid16.c | 36 ++++++++++++++++-------------------- 2 files changed, 32 insertions(+), 40 deletions(-) diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c index 5e32353c6b8e..755eae057406 100644 --- a/sys/compat/linux/linux_misc.c +++ b/sys/compat/linux/linux_misc.c @@ -1028,18 +1028,19 @@ linux_nice(struct thread *td, struct linux_nice_args *args) int linux_setgroups(struct thread *td, struct linux_setgroups_args *args) { + const int ngrp = args->gidsetsize; struct ucred *newcred, *oldcred; l_gid_t *linux_gidset; - int ngrp, error; + int error; struct proc *p; - ngrp = args->gidsetsize; if (ngrp < 0 || ngrp >= ngroups_max) return (EINVAL); linux_gidset = malloc(ngrp * sizeof(*linux_gidset), M_LINUX, M_WAITOK); error = copyin(args->grouplist, linux_gidset, ngrp * sizeof(l_gid_t)); if (error) goto out; + newcred = crget(); crextend(newcred, ngrp); p = td->td_proc; @@ -1071,34 +1072,29 @@ out: int linux_getgroups(struct thread *td, struct linux_getgroups_args *args) { - struct ucred *cred; + const struct ucred *const cred = td->td_ucred; l_gid_t *linux_gidset; - gid_t *bsd_gidset; - int bsd_gidsetsz, ngrp, error; + int ngrp, error; - cred = td->td_ucred; - bsd_gidset = cred->cr_groups; - bsd_gidsetsz = cred->cr_ngroups; + ngrp = args->gidsetsize; - if ((ngrp = args->gidsetsize) == 0) { - td->td_retval[0] = bsd_gidsetsz; + if (ngrp == 0) { + td->td_retval[0] = cred->cr_ngroups; return (0); } - - if (ngrp < bsd_gidsetsz) + if (ngrp < cred->cr_ngroups) return (EINVAL); - ngrp = 0; - linux_gidset = malloc(bsd_gidsetsz * sizeof(*linux_gidset), - M_LINUX, M_WAITOK); - while (ngrp < bsd_gidsetsz) { - linux_gidset[ngrp] = bsd_gidset[ngrp]; - ngrp++; - } + ngrp = cred->cr_ngroups; + + linux_gidset = malloc(ngrp * sizeof(*linux_gidset), M_LINUX, M_WAITOK); + for (int i = 0; i < ngrp; ++i) + linux_gidset[i] = cred->cr_groups[i]; error = copyout(linux_gidset, args->grouplist, ngrp * sizeof(l_gid_t)); free(linux_gidset, M_LINUX); - if (error) + + if (error != 0) return (error); td->td_retval[0] = ngrp; diff --git a/sys/compat/linux/linux_uid16.c b/sys/compat/linux/linux_uid16.c index 1d9a19916412..07430f5b399b 100644 --- a/sys/compat/linux/linux_uid16.c +++ b/sys/compat/linux/linux_uid16.c @@ -85,12 +85,12 @@ linux_lchown16(struct thread *td, struct linux_lchown16_args *args) int linux_setgroups16(struct thread *td, struct linux_setgroups16_args *args) { + const int ngrp = args->gidsetsize; struct ucred *newcred, *oldcred; l_gid16_t *linux_gidset; - int ngrp, error; + int error; struct proc *p; - ngrp = args->gidsetsize; if (ngrp < 0 || ngrp >= ngroups_max) return (EINVAL); linux_gidset = malloc(ngrp * sizeof(*linux_gidset), M_LINUX, M_WAITOK); @@ -100,6 +100,7 @@ linux_setgroups16(struct thread *td, struct linux_setgroups16_args *args) free(linux_gidset, M_LINUX); return (error); } + newcred = crget(); p = td->td_proc; PROC_LOCK(p); @@ -133,34 +134,29 @@ out: int linux_getgroups16(struct thread *td, struct linux_getgroups16_args *args) { - struct ucred *cred; + const struct ucred *const cred = td->td_ucred; l_gid16_t *linux_gidset; - gid_t *bsd_gidset; - int bsd_gidsetsz, ngrp, error; + int ngrp, error; - cred = td->td_ucred; - bsd_gidset = cred->cr_groups; - bsd_gidsetsz = cred->cr_ngroups; + ngrp = args->gidsetsize; - if ((ngrp = args->gidsetsize) == 0) { - td->td_retval[0] = bsd_gidsetsz; + if (ngrp == 0) { + td->td_retval[0] = cred->cr_ngroups; return (0); } - - if (ngrp < bsd_gidsetsz) + if (ngrp < cred->cr_ngroups) return (EINVAL); - ngrp = 0; - linux_gidset = malloc(bsd_gidsetsz * sizeof(*linux_gidset), - M_LINUX, M_WAITOK); - while (ngrp < bsd_gidsetsz) { - linux_gidset[ngrp] = bsd_gidset[ngrp]; - ngrp++; - } + ngrp = cred->cr_ngroups; + + linux_gidset = malloc(ngrp * sizeof(*linux_gidset), M_LINUX, M_WAITOK); + for (int i = 0; i < ngrp; ++i) + linux_gidset[i] = cred->cr_groups[i]; error = copyout(linux_gidset, args->gidset, ngrp * sizeof(l_gid16_t)); free(linux_gidset, M_LINUX); - if (error) { + + if (error != 0) { LIN_SDT_PROBE1(uid16, linux_getgroups16, copyout_error, error); return (error); } From nobody Wed Sep 17 12:19:08 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cRd9S5M1rz67HkF; Wed, 17 Sep 2025 12:19:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cRd9S2DTrz3Vrh; Wed, 17 Sep 2025 12:19:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758111548; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=g+8ZM7+z4UGZ0z7HOu7C87IvlIyYzBWY/qwIEuNCEVM=; b=U9ILsUf/kCzl+gbhyQ45s3qmowCQaDh45sapuySgWM0OKgQWkVc1XWOCnsDBN/mBFoox90 VOy/Rf4FixjdTlI80bBj5ZpXZbqpcxbYNOnZJzSyc6g5e+tNvcY9gRmq1JsS/Cj/MAQjYx Je2/mnaNZfh547NkG6ZKLsNppoJJTdh+cvqB63veOiCcgpHiCWG8dYCxfu6tt07cRzLcBO XeN4Ka3mhYG8WioMq9ibYnlb2/u7NN1jEjVX9ky+tVi2BBk16rHV79KQDurhWztzIRKdCD YUvOqPk5vaTof84ZKWTN75JJMvChG54u4MZavrV2GOXUhevPX9REq0Wk/8QbXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758111548; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=g+8ZM7+z4UGZ0z7HOu7C87IvlIyYzBWY/qwIEuNCEVM=; b=JQuFvospFhoIEmSEiqQFmYOaPozFmXVpKBmmWX8GrB4ooxD7nshj0GtX7ZZtAPOptt5OMG VlC4suqxG667qeMSdpkoa4ghJHEc/Y/AMTH7eVQw8SNM8jP92W6qWLQAlH6MWsnM2B8Bjp gu30U8WzyZ/3C3Uauz3aqPSXbi2GH6IhZ0f8A+yj/InNPTJKMSTTl3caaecq/O7SLPO5KM ebX0VMd0PgTKNR3G5KKhpXk1/U7kjxWka4OFO8BinwmMytBtILt0fDfSu8wej2Ui442nWK 1RCD3lrnIwRAYvYCxhFhIlW/+t5TeyKda2UTYCZf4UinMO2U4UqtgxzP1g+WTw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758111548; a=rsa-sha256; cv=none; b=c0Oke3dJ8zkbCoBcmQG9mksOkHx2qGZnw4AALppeMt2cVDErxialY58YE6Opmu71/P34DE WS50pc8XCIOo4TWpDWL4sCCl0fbcS+PB63B8LiEhJIh60n1POAd2nEEalBY2Tkm2nlmJnB Pi/8Q/RFDcxcu1wgcVCwxO4PYTwxDZvYt5W96LVw2BinfC4PsYmlXXZtb3zU6h/egvHqn1 lg5NIUm5Zcg6OUDM1J4ywW6eG95m5S3M4vWAm86asuzKEGC/qSb/mGeBQkmZvgbMT4BPI/ aRz5mBuug2jiLrsJ4cQI+IfuBpoab7+JiFu+SmyJapF+MGstQWBYnv/Y6/vECA== 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 4cRd9S1fqkz8yp; Wed, 17 Sep 2025 12:19:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58HCJ8qa085853; Wed, 17 Sep 2025 12:19:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58HCJ8Ow085850; Wed, 17 Sep 2025 12:19:08 GMT (envelope-from git) Date: Wed, 17 Sep 2025 12:19:08 GMT Message-Id: <202509171219.58HCJ8Ow085850@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: bbdea7c9f4ae - main - linux: setgroups(): Fix the group number's upper limit List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bbdea7c9f4aeae26b35f842382df0203fcda24a5 Auto-Submitted: auto-generated The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=bbdea7c9f4aeae26b35f842382df0203fcda24a5 commit bbdea7c9f4aeae26b35f842382df0203fcda24a5 Author: Olivier Certner AuthorDate: 2025-08-28 16:58:53 +0000 Commit: Olivier Certner CommitDate: 2025-09-17 12:16:04 +0000 linux: setgroups(): Fix the group number's upper limit 'ngroups_max' is the maximum number of supplementary groups the system will accept, and this has not changed. Fixes: 9da2fe96ff2e ("kern: fix setgroups(2) and getgroups(2) to match other platforms") MFC after: 5 days MFC to: stable/15 Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D52277 --- sys/compat/linux/linux_misc.c | 2 +- sys/compat/linux/linux_uid16.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c index 755eae057406..fb86de6e7302 100644 --- a/sys/compat/linux/linux_misc.c +++ b/sys/compat/linux/linux_misc.c @@ -1034,7 +1034,7 @@ linux_setgroups(struct thread *td, struct linux_setgroups_args *args) int error; struct proc *p; - if (ngrp < 0 || ngrp >= ngroups_max) + if (ngrp < 0 || ngrp > ngroups_max) return (EINVAL); linux_gidset = malloc(ngrp * sizeof(*linux_gidset), M_LINUX, M_WAITOK); error = copyin(args->grouplist, linux_gidset, ngrp * sizeof(l_gid_t)); diff --git a/sys/compat/linux/linux_uid16.c b/sys/compat/linux/linux_uid16.c index 07430f5b399b..dd681f971746 100644 --- a/sys/compat/linux/linux_uid16.c +++ b/sys/compat/linux/linux_uid16.c @@ -91,7 +91,7 @@ linux_setgroups16(struct thread *td, struct linux_setgroups16_args *args) int error; struct proc *p; - if (ngrp < 0 || ngrp >= ngroups_max) + if (ngrp < 0 || ngrp > ngroups_max) return (EINVAL); linux_gidset = malloc(ngrp * sizeof(*linux_gidset), M_LINUX, M_WAITOK); error = copyin(args->gidset, linux_gidset, ngrp * sizeof(l_gid16_t)); From nobody Wed Sep 17 12:19:09 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cRd9T6MqMz67Hl3; Wed, 17 Sep 2025 12:19:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cRd9T3Sbtz3Vdt; Wed, 17 Sep 2025 12:19:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758111549; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vLg0ANXy9KTRAw4l5YoIz6EYh7USzf8XhKDplkgqfUI=; b=UAeC8W5Rx0Etsttnuc+51kxctjeGvX0GprhkDFC5/BmxnMUSNa22jsFcrP+3uDh6arjL3f d6Sf6LjfLJbhKoKFgrZwdBE7UFz9sMg8kkPt5WU8ipl/sXk7cgjurlEHP3xh9WpiW6WIlr 4rl2pggJWV6vHxdOjf0PjdAeJIo2HPcA7zP7TjraJBk9zWiXPGqkxAdwqNxbpA62ta8Kpl /qVXCzavJJ7M5rdoEIoFC/ksuIb2lMsSQgzSlHYvsilvteBLINyze2dPmPD19oApKQJmFh TMzillAYOGgGg6Vi/j3/3ohHIuJBqZHaXuAictT9nnmiQQ7zcIegTy/YRFkQ1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758111549; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vLg0ANXy9KTRAw4l5YoIz6EYh7USzf8XhKDplkgqfUI=; b=AjeCHyubd6T+v+35rVMWfTSgYaYy37SkxfyHyj8kU82tyLKMtF8O0D/IA47L/jyu8S2kJ3 UhNXyLffjMlC1kbsmr5a3TDllpjDnX9BNcc2IN4ChavsO2ICJe0g6S5LIVajHeQ4OgJGRv r52OWqkKXZtI9FAEcOlHjyHdya1+95QuzdzSwKmTQDTzUsoRyUudDJZjQ0ASpDgB1tOvfr CaYDh1LgjU+yyPCvJl9CNWyv02cQZ3WVhlsd62aS3jd7N/7Hjt/r7aQ+xNilXrzsoXE763 5xtiEMKPYz7pk6qrEUlwg9J+w0OZCnSQ7uomPBooDDHXksJSEDlyimLtu3qWlw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758111549; a=rsa-sha256; cv=none; b=N4ASfc3puxsAYlHaWAkjIeXRD5pgFJedsMqDIzLAtdcLVJXKzUa/D6faLzTerhSHDvd7H5 sV5vhS46dnADqowrFiwHW/ZM97YsU6Z/M36YQZoMBRA61EcCW/Ppf17L7XXg729qZb2doK 1oiAB+CVfJI/HHdaNBTf5DVN++CNsu1bH6s7pTFoz2dQJGFmJ6JVBbSXugz8d/x6642CNm X+QPm3E/yZgs3uN3zRLj0kddBe4TOt1JMI/b1Gt5UN+IGNrBvNHDP0QdbhJ1Z3HEohfEvu 0PAVcTu7Jv5VHejwKdM8QzDjZ5Z8jWi6sW2pCy5Z5B2Hu8Ty6j/rk2btpp46Vg== 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 4cRd9T2zVzz8yq; Wed, 17 Sep 2025 12:19:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58HCJ9Pd085885; Wed, 17 Sep 2025 12:19:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58HCJ9eO085882; Wed, 17 Sep 2025 12:19:09 GMT (envelope-from git) Date: Wed, 17 Sep 2025 12:19:09 GMT Message-Id: <202509171219.58HCJ9eO085882@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: b7a87d7c0dd1 - main - linux: setgroups(): Avoid allocation under the process lock List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b7a87d7c0dd19016e82f5d33f2c5ec90479c31fe Auto-Submitted: auto-generated The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=b7a87d7c0dd19016e82f5d33f2c5ec90479c31fe commit b7a87d7c0dd19016e82f5d33f2c5ec90479c31fe Author: Olivier Certner AuthorDate: 2025-08-28 15:47:38 +0000 Commit: Olivier Certner CommitDate: 2025-09-17 12:16:04 +0000 linux: setgroups(): Avoid allocation under the process lock This was missed in commit 838d9858251e ("Rework the credential code to support larger values of NGROUPS (...)"). No functional change (intended). MFC after: 5 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D52278 --- sys/compat/linux/linux_misc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c index fb86de6e7302..0925ffb64480 100644 --- a/sys/compat/linux/linux_misc.c +++ b/sys/compat/linux/linux_misc.c @@ -1045,8 +1045,7 @@ linux_setgroups(struct thread *td, struct linux_setgroups_args *args) crextend(newcred, ngrp); p = td->td_proc; PROC_LOCK(p); - oldcred = p->p_ucred; - crcopy(newcred, oldcred); + oldcred = crcopysafe(p, newcred); if ((error = priv_check_cred(oldcred, PRIV_CRED_SETGROUPS)) != 0) { PROC_UNLOCK(p); From nobody Wed Sep 17 12:19:10 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cRd9W1FpNz67Hn9; Wed, 17 Sep 2025 12:19: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 4cRd9V4Zmjz3W1P; Wed, 17 Sep 2025 12:19:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758111550; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JoWA9LS9i4hQ6/DdMoLGyFjIP5WHLUEveviNtOrLJVc=; b=KqjxYCpwCz0XX77uTtWRhykr4oWbDpAm4ev9K9cCzIN/avQujT3CEt7+shjwn+lJSPToe/ StD7Ymoe4x5WtrKTLmPZGH1dW9uUcWpz38X2i856LL9JhquX411Q5V4wIxUKFLRizqqk5n Yq0toEc5+QqU/sM6c0dYrAYcxq00V2eLjBf1IUVLdGpIyLY8uaYWorIrYQzClLjlg9Rpil Vh5XJGiFe4SkuKzlImRehgYUel9ujtT9DIwFdFQC1funmhxpe0TaOcq1btHFMrFfMPJ3Gi RNYofQSeM5o/J2cpX0kDN/CLCO2YHdAh+ceYNALOOsqu/7FdEvGszTj/UCHLCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758111550; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JoWA9LS9i4hQ6/DdMoLGyFjIP5WHLUEveviNtOrLJVc=; b=ROo46mpPweGG5+tRkL0x+Wd1x68zyizIekAYw+eC1QleirfMv1VaeifloX50iJOTTzeHcf lDgQdjfRYvvgA/dwz+1l1P6Ef0Cfyaz9eAMF1IVtLT11F7C2r2M/psz+569VS8/vbki/mk UkXtdJB/urgFBVAh25H3uFQ31kFbu2StY31oFITKas1znVH+/iBcssE9HcV7g/eAT7pnBr s5CNPeyDVdJWn03he63Yk0gCUDRZedHZuO1HNhaaeZs/OPHEjXRy6z+d/251lodmqh+ZCF fhvPjHNpOlcsaqBIO9bx31DtbthOJYeySfKLxLPDbx87tiyx0L1G+DzZ1zv/NQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758111550; a=rsa-sha256; cv=none; b=UXay9GinYj6wvlgtLHMLKvQYf3w3YZug773ZEb5CWbnazWOmaTnqeoOknwShlC0NYDZ6tL l8bzF0YxiPkFHGRDbSZkF5/v7xN9aIsOFpwjyFs6/VulKcpP5BvrOZ/QX6DG2hFnUGEpf6 STigrv81dz06tGoO2YMKrdw8CwLFCa6kRcQkn5S8qoQv/hDE3W7fsTvfT7J/7dgfc289lI HyP8YfRrDhJrx2U9hW//OMg2KdgbkSiuMmmog/uxpxJI0NV8ZmwzM9exiZNjuFVgVuLT8i dCRdO1NoDWWAAfQq494b4xpTW5e3004iN7l5gnCHuTmMbNCVPj8wc8Nuoa9MmA== 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 4cRd9V42cJz9Lq; Wed, 17 Sep 2025 12:19: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 58HCJAwq085925; Wed, 17 Sep 2025 12:19:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58HCJAdv085922; Wed, 17 Sep 2025 12:19:10 GMT (envelope-from git) Date: Wed, 17 Sep 2025 12:19:10 GMT Message-Id: <202509171219.58HCJAdv085922@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: b1326edddb30 - main - linux: setgroups16(): Pre-extend the groups array List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b1326edddb302a28fc9418ab60df6210513cc07c Auto-Submitted: auto-generated The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=b1326edddb302a28fc9418ab60df6210513cc07c commit b1326edddb302a28fc9418ab60df6210513cc07c Author: Olivier Certner AuthorDate: 2025-08-28 16:27:30 +0000 Commit: Olivier Certner CommitDate: 2025-09-17 12:16:05 +0000 linux: setgroups16(): Pre-extend the groups array For the size we know we will need in the end. No functional change (intended). MFC after: 5 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D52279 --- sys/compat/linux/linux_uid16.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/compat/linux/linux_uid16.c b/sys/compat/linux/linux_uid16.c index dd681f971746..8ac093e004d0 100644 --- a/sys/compat/linux/linux_uid16.c +++ b/sys/compat/linux/linux_uid16.c @@ -102,6 +102,7 @@ linux_setgroups16(struct thread *td, struct linux_setgroups16_args *args) } newcred = crget(); + crextend(newcred, ngrp); p = td->td_proc; PROC_LOCK(p); oldcred = crcopysafe(p, newcred); From nobody Wed Sep 17 12:19:12 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cRd9Y1X9cz67Hl7; Wed, 17 Sep 2025 12:19: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 4cRd9X6sC3z3W3s; Wed, 17 Sep 2025 12:19:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758111553; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BFbND0ROnMWoODz6bd8YdVPma3aJ3Ia2L06mWr0wwt0=; b=pLp7XQnZfhgIFQ+YgyqUoVnFBS/5xs+RMjSoV/6dV8ubgzvvtVCyxKpRIGE62ET+lqQPdO OmhW/MUqTddMyb/VPZ5Kp3uO+qND5YCMm1AjJDbdd3mPrFD6jO6RUu6YHtkMQ0HvloBYOy 7IxUQMvWKcjXsaqkyCx47iAfxCCNxBy0+QbEHNQR+B6482PB+AaSXN2CvIgfhHQo+8Ws2U 2w7IDQn2CK/HU1TrxHPjHEM7quRFeM7o9qZn9FpIHBZ+NN+/CjoGo0JjS+geQUBUVgIaDY BnoKkttpg3y2LDwMVB8qJ2c0hPZ6uJnckYnC1wMwi44+b5ZrIRMDI+GwdA5sRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758111553; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BFbND0ROnMWoODz6bd8YdVPma3aJ3Ia2L06mWr0wwt0=; b=EZdskRPxxA7iRVQ46oS+tFppg+AVAqwK1ytVz9CQ8+uzxOT+2f0GZTvCI+ILgVaVl5eZx7 mpO2hwILN+RZs5fIW2gQIjudHa0+5MTW+j9yT92EoiZAm7jW46N9ZJkTiLtu/vSOrzg77c 1qV+Jn058QgoJcmA6YuCeEZshwBoxtHxhuQ5IslYDLLH1qFbz1t+YMVGdc7NaIKDJxY+72 1cMGDIap0j8oZvA71T1F5w97DFzE/ckTohZkD8+1BleDnq/jePwPtx2cF7cPdiVCeyjhCH l4GcHXzv3umCyXUIcnYCsUGvQcZXQhpLWPouuQLqBqx3MtUgzmqZaburTlardg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758111553; a=rsa-sha256; cv=none; b=Zn2qqe0WM/ndCTFB+EJGrE0LDw+ZixXEXmNO+cYJZDxptVUfNyczAQFNYEhLixQ2gXtWT1 dFbV/lx7HJ4xdV1HTMGxhBYkc4M8L/xckBNO5rs8kufwlr+aCDVbWrATL9YLW9gpbhsZte 6kfEArP902spTs+7oYmoHo8cHbq2uW2/OkxxV03RUyNm9avnQN1SXLQ/NttJF8tiwSp7Bf SBZpKdJ8eGybVxC3BvoTWoSPqpCKaZAi8htAXSSSBMbPYX2IfHwsYQqM6uH2vtyPf07ZFX /krVDAoM65XcKmxA+sUqLMxhsa37AW8Xx052hnevQp0tva6FBFTS2d/tV8vqwA== 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 4cRd9X5tF3z9jy; Wed, 17 Sep 2025 12:19: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 58HCJCrg085989; Wed, 17 Sep 2025 12:19:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58HCJCsr085986; Wed, 17 Sep 2025 12:19:12 GMT (envelope-from git) Date: Wed, 17 Sep 2025 12:19:12 GMT Message-Id: <202509171219.58HCJCsr085986@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: 59049f4b47ea - main - hastd: Remove some now useless assertion List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 59049f4b47ea8924ffae7c3c7b9e8c00a79285e0 Auto-Submitted: auto-generated The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=59049f4b47ea8924ffae7c3c7b9e8c00a79285e0 commit 59049f4b47ea8924ffae7c3c7b9e8c00a79285e0 Author: Olivier Certner AuthorDate: 2025-08-29 08:21:38 +0000 Commit: Olivier Certner CommitDate: 2025-09-17 12:16:05 +0000 hastd: Remove some now useless assertion It is in fact redundant with the previous one, as the set of supplementary groups is expected to be empty. MFC after: 5 days MFC to: stable/15 Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D52281 --- sbin/hastd/subr.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/sbin/hastd/subr.c b/sbin/hastd/subr.c index add1280e960b..084ea50dae7c 100644 --- a/sbin/hastd/subr.c +++ b/sbin/hastd/subr.c @@ -156,7 +156,6 @@ drop_privs(const struct hast_resource *res) struct passwd *pw; uid_t ruid, euid, suid; gid_t rgid, egid, sgid; - gid_t gidset[1]; bool capsicum, jailed; /* @@ -285,7 +284,6 @@ drop_privs(const struct hast_resource *res) PJDLOG_VERIFY(egid == pw->pw_gid); PJDLOG_VERIFY(sgid == pw->pw_gid); PJDLOG_VERIFY(getgroups(0, NULL) == 0); - PJDLOG_VERIFY(getgroups(1, gidset) == 0); pjdlog_debug(1, "Privileges successfully dropped using %s%s+setgid+setuid.", From nobody Wed Sep 17 12:19:11 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cRd9X0zbpz67HsY; Wed, 17 Sep 2025 12:19:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cRd9W5XpGz3W60; Wed, 17 Sep 2025 12:19:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758111551; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EGsqyloQozuUdMOCFGGBKlvpbY944sDuUAZzGYMowCE=; b=mnUHZ8DmBjTiUF+YWmG9blCxE4hZ74xtMrpPMc1PkHvmG9gKdKRac4d8NAGkEJBwARvz1q P81+Ww/YK/0bMHwtsLgFeOYV+JiSyLmfqdZDh6HxxxKp13Qs46+IlqxYccWFK114szgLWK 7piDkGENgG96N3W48duCw39Nu1aCyolFUVDXfDdWZvhRRfClTTkARtm7oQfYazBwm3mFgj uL9JlvH+25/IR3s9rMaOwNIBsp2FswMdhVJXuvpnqDIQ0AUYQ7wDvuorG57N2/MRwW2l93 vQ0i3ZzyRa3klJiXokRqF1b6ednOL4VT+nrcto2mo5oD/sgOd9fDLYg0C382ag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758111551; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EGsqyloQozuUdMOCFGGBKlvpbY944sDuUAZzGYMowCE=; b=JQwpq/TZAlLhUxniCQ3iyC0DtDNtt3uw4rXCTzmMO0TyLxWn4SUUpm/S2i2612G9xcBxA/ 13TejpLZgsj8+uXnkyovnPOT+SpaUh7YoaC3VNY/O3fNlJEhvqrYPKysrFpP0HnpN2Pier HVNH9Xba0jG2SqFZmdTmcCXcQKjtVAvRqnAulIveSeam3E6YXC4cwjpvDqVjhPvC27LGE0 KKJg8U/aRuq+wRXjZPOXE5Ww78xdec9sL+z2VQ+eV7uav9MGmQJagwim6HE0Tf6UiaYx4D 6D2Cwn8eYaaSq05lGa/gURGeYZy406vwoDTiqxEL2e4QiMnuCjfZmTAwR50+ig== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758111551; a=rsa-sha256; cv=none; b=oRWUgyh9ZXsZa4U811GJeOTY94LqgdtqcdLwQVFT6s4G/PVuBlDh1bEMu1+5uZ7BtZGQqE 2iSibbKgDcFMdCZufIaWi0PbbI1TWDd/mSlF4rPVcg4I/imcF4bOP0RCnMEsZXeZzyZHHN wy+ZQPk0HrhUZCVLtX+9empSdi2+uDdOkFVNmRKGu55bDSkMO9mThztX/Z7aQ4EooQHwhb Sg1HwfiTpmD28cQFov9ZoFVaiys+36oH8KL+qnGRq9Giu4vESbNVVBpJ37Z4kvGSRzYQZT IP7FUitI1DBDNRo/D4qFlcjrHK0PId7gvAIm2kydJ88WwtaQG4PGjxwrW7O65A== 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 4cRd9W4lNsz9Lr; Wed, 17 Sep 2025 12:19: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 58HCJBR7085957; Wed, 17 Sep 2025 12:19:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58HCJBun085954; Wed, 17 Sep 2025 12:19:11 GMT (envelope-from git) Date: Wed, 17 Sep 2025 12:19:11 GMT Message-Id: <202509171219.58HCJBun085954@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: 10b789d7e148 - main - linux: getsockopt(): Simplify exporting groups a bit List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 10b789d7e14862c77f77f07e8af84d73d73012c6 Auto-Submitted: auto-generated The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=10b789d7e14862c77f77f07e8af84d73d73012c6 commit 10b789d7e14862c77f77f07e8af84d73d73012c6 Author: Olivier Certner AuthorDate: 2025-08-29 08:26:59 +0000 Commit: Olivier Certner CommitDate: 2025-09-17 12:16:05 +0000 linux: getsockopt(): Simplify exporting groups a bit No functional change (intended). Go through conversion to a 'l_gid_t' before copying out in order to cope with differing group types (except for not representable values, of course). This is what is done, e.g., for getgroups() in 'linux_misc.c'. As Linux's group type is the same as ours on all architectures, we could as well just stop bothering and copy out our memory representation, eliminating the loop here. Whatever the choice, though, it has to be consistent here and there. Introduce 'out' of type 'l_gid_t' to avoid performing "by hand" array arithmetics when copying out. MFC after: 5 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D52280 --- sys/compat/linux/linux_socket.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sys/compat/linux/linux_socket.c b/sys/compat/linux/linux_socket.c index 539d153431c4..0e07b0a60ced 100644 --- a/sys/compat/linux/linux_socket.c +++ b/sys/compat/linux/linux_socket.c @@ -2179,6 +2179,7 @@ static int linux_getsockopt_so_peergroups(struct thread *td, struct linux_getsockopt_args *args) { + l_gid_t *out = PTRIN(args->optval); struct xucred xu; socklen_t xulen, len; int error, i; @@ -2197,13 +2198,12 @@ linux_getsockopt_so_peergroups(struct thread *td, return (error); } - /* - * "- 1" to skip the primary group. - */ + /* "- 1" to skip the primary group. */ for (i = 0; i < xu.cr_ngroups - 1; i++) { - error = copyout(xu.cr_groups + i + 1, - (void *)(args->optval + i * sizeof(l_gid_t)), - sizeof(l_gid_t)); + /* Copy to cope with a possible type discrepancy. */ + const l_gid_t g = xu.cr_groups[i + 1]; + + error = copyout(&g, out + i, sizeof(l_gid_t)); if (error != 0) return (error); } From nobody Wed Sep 17 12:19:13 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cRd9Z3gmdz67Hdy; Wed, 17 Sep 2025 12:19:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cRd9Z0Q2jz3Vt9; Wed, 17 Sep 2025 12:19:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758111554; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7TVqo877zx5suwP1K9ZqbuKhIevoCu++ddLAMR9S2Hc=; b=mfCOvPNhGVKWLeEAxdM+WKteRQ+S6z7XCb9KBv50PVj6Iv7StQucQfcJf8yqOQdLxP4FOL zXSotAMn3+cAzyQhkYr5r388lN1KejfPGQwHLy+Dw8vxR2VOly0YLHGE4YdWw28BHDn9Sm tRNJTMFVSnt0FK5R9q/KX0j/NUvheFdkO/g5ViiXh8GG4b8T62cFC/W+yV/MZA3W8972xG wBeYM08KbOsaCb6SIhBkPF7jC7cf01hzT62QXhLWoEdUy/1TWPpOD9A/45REzNVceW9G2L oaAuPu802fZP7iN58zdXHZ/HUaPWjb5PRyHnysuUrNMKRXzw8WPTRwqdUBMZKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758111554; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7TVqo877zx5suwP1K9ZqbuKhIevoCu++ddLAMR9S2Hc=; b=fmrUmzdSMMWzjwlJXVMo4kMYLZObII2EtSltkBfPccvJr7b+wzDCHu2euxULg6mVi3KJP3 3lbnDuc2VYFNYSK7XNcuNKWjsUCSKOiDbhSKuwUKDlnp4dZO+v5UEX9DGXXNaGjfToRAkp Vu9BTQDyEjif65ojwv1BHbVqRSpvWeM6c9xOUKSDkWBRrGW8fc4sIDD/c2E/TU8RHnDgfN f32MdSXwOGqF/CoPJA1cmz8G4vuByiO4K1Yio/gjNQXRGCdKwGnHZBdiWFZ66Ir1cXRZ53 R858ygtTrg1rPFUNEVO0p65m1t4Du3B/0+SM6P/dZobXINmRfhQRK22aqUu+pQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758111554; a=rsa-sha256; cv=none; b=e0RGGDo6XRCg9GnJEngoSkKtREnowEukI2UphVlsPsmV85/H6PIRMM5pfxpMmlecITG/iC iTo8346p8RKBJxIvYuSekJbqwzJ2rvaLZ5A8ivywLW09tZPnydqTV7SAenIa2GKsmSTCWX 3CMg0BrAI4LcVJkWaW4XuaIbc2BJUlfOitA+TJ/85p2iy6VeR6qzLNgQpGrlR7TC8IIG4e 0SjKjoeXCMedykPDSxQ7PcC0q6nkAsWdkiw9oUjVjiWBl11DYNBG3qNcvu1RCWcKj9YyYd DjdR2qJBC1By3Kr2EV8mY470H1idAanKbIxA3DiaGSlQOTXShVHPEvyGPdp9Qg== 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 4cRd9Y74w7z9hP; Wed, 17 Sep 2025 12:19: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 58HCJD7F086021; Wed, 17 Sep 2025 12:19:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58HCJDsX086018; Wed, 17 Sep 2025 12:19:13 GMT (envelope-from git) Date: Wed, 17 Sep 2025 12:19:13 GMT Message-Id: <202509171219.58HCJDsX086018@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: 696cfb27ca4e - main - syscalls: Old setgroups(2)/getgroups(2): Remove superfluous STD type List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 696cfb27ca4e60ebd49c45355a8a9c4945f84f98 Auto-Submitted: auto-generated The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=696cfb27ca4e60ebd49c45355a8a9c4945f84f98 commit 696cfb27ca4e60ebd49c45355a8a9c4945f84f98 Author: Olivier Certner AuthorDate: 2025-09-12 12:27:43 +0000 Commit: Olivier Certner CommitDate: 2025-09-17 12:16:06 +0000 syscalls: Old setgroups(2)/getgroups(2): Remove superfluous STD type An examination of the scripts under 'sys/tools/syscalls' indicates that keeping STD as a type in the presence of COMPATxx does not make any difference, and regenerating system call files with STD removed does indeed not show any difference. Moreover, this practice is inconsistent with the rest of the file. Thus, remove the superfluous STD type for the two above-mentioned system calls. While here, re-order the remaining types for getgroups() to be consistent with other such occurences (COMPATxx before CAPENABLED). Reviewed by: kevans, emaste MFC after: 5 days MFC to: stable/15 Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D52499 --- sys/kern/syscalls.master | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/kern/syscalls.master b/sys/kern/syscalls.master index 911f9093824b..967af1f5313c 100644 --- a/sys/kern/syscalls.master +++ b/sys/kern/syscalls.master @@ -552,13 +552,13 @@ _Out_writes_bytes_(len/PAGE_SIZE) char *vec ); } -79 AUE_GETGROUPS STD|CAPENABLED|COMPAT14 { +79 AUE_GETGROUPS COMPAT14|CAPENABLED { int getgroups( int gidsetsize, _Out_writes_opt_(gidsetsize) gid_t *gidset ); } -80 AUE_SETGROUPS STD|COMPAT14 { +80 AUE_SETGROUPS COMPAT14 { int setgroups( int gidsetsize, _In_reads_(gidsetsize) const gid_t *gidset From nobody Wed Sep 17 12:19:16 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cRd9c5BjBz67Hsh; Wed, 17 Sep 2025 12:19:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cRd9c2TFqz3Vyr; Wed, 17 Sep 2025 12:19:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758111556; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qcBbuHgzZRET/YtftAoERB2dRdsOlhdN6okMRzBSAsE=; b=QrYizEhm4uhWL2YO3zevNAhoV3xS2fO3xJft0V+m959Lm0+TyWSq49plmjf16f6eGJgAro J1nGrrT9XUi9/zCmxHLaRKWbRFrAfiuaVquT/vLniQILLh7ya1XVgF4R7fTvey4EcuvUSh +lwT0laCsmFXSFDRK9vz7Ar6MPsRyQ+/+1TcdQHgAOitsTF4+eaS1EGJsWfXuHFGiuQdWL 4fLoD5l0l8R80ECaClkwSpZplpeyff5fmd16q/daLnUr3IogcIuAP48EUmBWSKV13CYpZ5 81+FHkMfEMs1GJ4LpyEcagp4trkT2KQALcTITYdD3bRzPy4jZmhS5f9QBOBl3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758111556; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qcBbuHgzZRET/YtftAoERB2dRdsOlhdN6okMRzBSAsE=; b=WTEI0mL9X0p2Rly5S+t66xpN8DLKeWUOeFjPcTgQeDBkgKFKpp2Mkcx8Ddraaeknzbgf/u vlRfYanjWc5F4tHeXwp8TEt67iierS7+XQoBPMrhsryCdsd5RhGuh4trrefhxGZfsJNv6l 7xlfKdeS+1Kuk8I3lMDsI+B4itzSSbRXi7BdqffdTKyYvhY8FaWdUVRD4QNSWA8UnnJgJW 97ufv6wOcIRFZCXXljkjajkoliNeDh23NVpJ3mENy/ImvOhb/BjIXEB3JHnf9n2WeeQNQm sG2SUmk3VTZGRuWtJdjQ1ASAfzbcvt7Q489pvN5uJ0F+ez6qAMb5lTrAUXkhMw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758111556; a=rsa-sha256; cv=none; b=E+IGoiAgIvViy27XSUkFPIbSh1mCMjDZBPeVsdGS6GxjhKlY49afYswwQl9pbtGDg7xMHz IUiW8+YB763Ct9C0xWcPyTZVEI9YMq5c2D70B39h0Gf7wQ0C8LdtJR8oYWKYtisvM70ut6 blI52I7xmOWdOsFBnW+JVXdzqPcyAmQHC1SCgeQktxd8D/lVVI0Rm7bzVqKFNH1eLNqAmg V57d/+LoG13YfXjj8a3Y2TdwTmhgrp+tPT7ZovDIqSMITsbB50vmdhmwcCpibEh4gzSYqx pfVTWSRExFoVohhC5aVpHtLjBEqfsEtPyOC50rTNtr+FjhJnSl7FbTn7MxJncA== 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 4cRd9c236Mz9Ls; Wed, 17 Sep 2025 12:19:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58HCJGB3086092; Wed, 17 Sep 2025 12:19:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58HCJGuA086088; Wed, 17 Sep 2025 12:19:16 GMT (envelope-from git) Date: Wed, 17 Sep 2025 12:19:16 GMT Message-Id: <202509171219.58HCJGuA086088@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: 9dc1ac869196 - main - initgroups(3): Add a pre-FreeBSD-15-compatible version List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9dc1ac8691966480ff8bd9c37dd405b981b41dd5 Auto-Submitted: auto-generated The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=9dc1ac8691966480ff8bd9c37dd405b981b41dd5 commit 9dc1ac8691966480ff8bd9c37dd405b981b41dd5 Author: Olivier Certner AuthorDate: 2025-08-29 14:19:33 +0000 Commit: Olivier Certner CommitDate: 2025-09-17 12:16:06 +0000 initgroups(3): Add a pre-FreeBSD-15-compatible version After commit 9da2fe96ff2e ("kern: fix setgroups(2) and getgroups(2) to match other platforms"), initgroups() does not set the effective GID anymore and uses all passed groups as the supplementary group list. This effectively breaks backwards compatibility with programs/libraries compiled on a FreeBSD 14 or earlier system. Restore compatibility by creating a new version of the 'initgroups' symbol that designates the current implementation and providing a pre-FreeBSD-15-compatible version under the symbol's previously exported version. The new version calls the new setgroups(2) system call, while the compatible one calls the original one (called freebsd14_setgroups()). Update the manual page with some history and comparison with other current open-source systems. Add a "SECURITY CONSIDERATIONS" section highlighting some security properties of this approach and the reasons we adopt it. While here, revamp the manual page, in particular to use the exact POSIX terminology where possible. Note for MFC to stable/14: Only the manual page update is to be MFCed, and the text changed to reflect the old behavior and inform readers of the new upcoming behavior in 15. Reviewed by: kib Fixes: 9da2fe96ff2e ("kern: fix setgroups(2) and getgroups(2) to match other platforms") MFC after: 5 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D52282 --- lib/libc/gen/Symbol.map | 2 +- lib/libc/gen/gen-compat.h | 2 + lib/libc/gen/initgroups.3 | 101 +++++++++++++++++++++++++++++++++++++++------- lib/libc/gen/initgroups.c | 44 +++++++++++++++----- 4 files changed, 124 insertions(+), 25 deletions(-) diff --git a/lib/libc/gen/Symbol.map b/lib/libc/gen/Symbol.map index 26f638568efc..494b65bc5cc1 100644 --- a/lib/libc/gen/Symbol.map +++ b/lib/libc/gen/Symbol.map @@ -193,7 +193,6 @@ FBSD_1.0 { __isinff; __isinfl; isatty; - initgroups; jrand48; lcong48; ldexp; @@ -462,6 +461,7 @@ FBSD_1.8 { fdscandir_b; fts_open_b; glob_b; + initgroups; inotify_add_watch; inotify_init; inotify_init1; diff --git a/lib/libc/gen/gen-compat.h b/lib/libc/gen/gen-compat.h index 08e80ede6b6e..dac8f54b45a2 100644 --- a/lib/libc/gen/gen-compat.h +++ b/lib/libc/gen/gen-compat.h @@ -52,4 +52,6 @@ int freebsd11_getmntinfo(struct freebsd11_statfs **, int); char *freebsd11_devname(__uint32_t dev, __mode_t type); char *freebsd11_devname_r(__uint32_t dev, __mode_t type, char *buf, int len); +int freebsd14_setgroups(int gidsize, const __gid_t *gidset); + #endif /* _GEN_COMPAT_H_ */ diff --git a/lib/libc/gen/initgroups.3 b/lib/libc/gen/initgroups.3 index 03bd07494fc9..4f538fb180ec 100644 --- a/lib/libc/gen/initgroups.3 +++ b/lib/libc/gen/initgroups.3 @@ -1,5 +1,13 @@ +.\"- +.\" SPDX-License-Identifier: BSD-3-Clause +.\" .\" Copyright (c) 1983, 1991, 1993 .\" The Regents of the University of California. All rights reserved. +.\" Copyright (c) 2025 The FreeBSD Foundation +.\" +.\" Portions of this documentation were written by Olivier Certner +.\" at Kumacom SARL under sponsorship from the FreeBSD +.\" Foundation. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -25,12 +33,12 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd October 26, 2014 +.Dd September 17, 2025 .Dt INITGROUPS 3 .Os .Sh NAME .Nm initgroups -.Nd initialize group access list +.Nd initialize supplementary groups as per the group database .Sh LIBRARY .Lb libc .Sh SYNOPSIS @@ -40,19 +48,18 @@ .Sh DESCRIPTION The .Fn initgroups -function -uses the -.Xr getgrouplist 3 -function to calculate the group access list for the user -specified in +function initializes the current process' supplementary groups as prescribed by +its arguments and the system's group database. +.Pp +It first uses the +.Fn getgrouplist +function to compute a list of groups containing the passed +.Fa basegid , +which typically is the user's initial numerical group ID from the password +database, and the supplementary groups in the group database for the user named .Fa name . -This group list is then setup for the current process using -.Xr setgroups 2 . -The -.Fa basegid -is automatically included in the groups list. -Typically this value is given as -the group number from the password file. +It then installs this list as the current process' supplementary groups using +.Fn setgroups . .Sh RETURN VALUES .Rv -std initgroups .Sh ERRORS @@ -60,7 +67,7 @@ The .Fn initgroups function may fail and set .Va errno -for any of the errors specified for the library function +to any of the errors specified for the library function .Xr setgroups 2 . It may also return: .Bl -tag -width Er @@ -77,3 +84,67 @@ The .Fn initgroups function appeared in .Bx 4.2 . +.Pp +The +.Fn initgroups +function changed semantics in +.Fx 15 , +following that of +.Xr setgroups 2 +in the same release. +Before that, it would also set the effective group ID to +.Fa basegid , +and would not include the latter in the supplementary groups except before +.Fx 8 . +Its current behavior in these respects is known to be compatible with that of +the following systems up to the specified versions that are current at time of +this writing: +.Bl -dash -width "-" -compact +.It +Linux (up to 6.6) with the GNU libc (up to 2.42) +.It +.Nx 1.1 and greater (up to 10) +.It +.Ox (up to 7.7) +.It +Systems based on illumos (up to August 2025 sources) +.El +.Sh SECURITY CONSIDERATIONS +As +.Fa basegid +is typically the user's initial numerical group ID, to which the current +process' effective group ID is generally initialized, processes using functions +to change their effective group ID +.Pq via Xr setgid 2 or similar +or that are spawned from executables with the set-group-ID mode bit set will not +be able to relinquish the access rights deriving from being a member of +.Fa basegid , +as these functions do not change the supplementary groups. +.Pp +This behavior is generally desirable in order to paper over the difference of +treatment between the effective group and supplementary ones in this situation, +as they are all in the end indiscriminately used in traditional UNIX +discretionary access checks. +It blends well with the practice of allocating each user its own private group, +as processes launched from a set-group-ID executable keep the same user and +consistently stay also in the same user's group. +Finally, it was also chosen for compatibility with other systems +.Po +see the +.Sx HISTORY +section +.Pc . +.Pp +This convention of including +.Fa basegid +in the supplementary groups is however only enforced by the +.Fn initgroups +function, and not by the +.Xr setgroups 2 +system call, so applications expressly wanting to include in the supplementary +groups only those specified by the group database can themselves call +.Fn getgrouplist +and then +.Fn setgroups +on the result with the first element skipped +.Pq see Xr getgrouplist 3 . diff --git a/lib/libc/gen/initgroups.c b/lib/libc/gen/initgroups.c index 55f17a94fa8e..a1a7d92250e2 100644 --- a/lib/libc/gen/initgroups.c +++ b/lib/libc/gen/initgroups.c @@ -3,6 +3,11 @@ * * Copyright (c) 1983, 1993 * The Regents of the University of California. All rights reserved. + * Copyright (c) 2025 The FreeBSD Foundation + * + * Portions of this software were developed by Olivier Certner + * at Kumacom SARL under sponsorship from the FreeBSD + * Foundation. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -29,22 +34,28 @@ * SUCH DAMAGE. */ -#include +/* For __sym_compat(). */ +#include #include #include #include -int -initgroups(const char *uname, gid_t agroup) +/* For freebsd14_setgroups(). */ +#include "gen-compat.h" + +static int +initgroups_impl(const char *uname, gid_t agroup, + int (*setgroups)(int, const gid_t *)) { - int ngroups, ret; - long ngroups_max; gid_t *groups; + long ngroups_max; + int ngroups, ret; /* - * Provide space for one group more than possible to allow - * setgroups to fail and set errno. + * Provide space for one group more than possible to allow setgroups() + * to fail and set 'errno' in case we get back more than {NGROUPS_MAX} + + * 1 groups. */ ngroups_max = sysconf(_SC_NGROUPS_MAX) + 2; groups = malloc(sizeof(*groups) * ngroups_max); @@ -52,8 +63,23 @@ initgroups(const char *uname, gid_t agroup) return (-1); /* malloc() set 'errno'. */ ngroups = (int)ngroups_max; - getgrouplist(uname, agroup, groups, &ngroups); - ret = setgroups(ngroups, groups); + (void)getgrouplist(uname, agroup, groups, &ngroups); + ret = (*setgroups)(ngroups, groups); + free(groups); return (ret); /* setgroups() set 'errno'. */ } + +int +initgroups(const char *uname, gid_t agroup) +{ + return (initgroups_impl(uname, agroup, setgroups)); +} + +int +freebsd14_initgroups(const char *uname, gid_t agroup) +{ + return (initgroups_impl(uname, agroup, freebsd14_setgroups)); +} + +__sym_compat(initgroups, freebsd14_initgroups, FBSD_1.0); From nobody Wed Sep 17 12:19:15 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cRd9b60PZz67Hwg; Wed, 17 Sep 2025 12:19: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 4cRd9b1Wllz3W98; Wed, 17 Sep 2025 12:19:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758111555; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1wpl+NUW4cCp3kpMmoIGsBE2uXCXCSy04aKH4xNAnww=; b=LlRBrme24hJH6Tk9WPd4QjotxToC3bv5ZzNZ6kZaXYWSZ9HLZ0BMKUSAErhAGU41kcOLyr DtYOu0ei4x7IGNM5Z97smNqOU3UAUHZS75lq5odwzcznsrEu/p53rwfBFYw/pcR+1Sf6u+ NiZpmelMz6VV+8mrsIa2ml4S8ynKvJGfH5Xl9UZXzHiVCgFI3Sn4tneHj5PSRetwKi37ZN S2ybwNVy34zR9ZL6c4vnCTkEzYP/89Wo9dzk1EjYcq+qmIaovesDKNRCfTsZO44RTo9gk3 So0ebadpkQzJINX5E1zTItySGYZwYpp03BHfA3xGPeLFwjIL0ComYHFIJFMGEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758111555; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1wpl+NUW4cCp3kpMmoIGsBE2uXCXCSy04aKH4xNAnww=; b=GqTbyDlJUFB/p2GcNfjlNwnveVterawn9/qOg80WW2w1Byo05fmQqEsWGNRsszg0LTt5Nc ImSqsBEHCRQISWcPVPOqDt2UrQrAzIwQ+I44JcV81t87XWHoZuUb8HsnQy580h6LCfcOE6 DO4cM7W6yMGxvVsSMj5mm13nsflHeQYCFzWKk/+82qbz1D4tAUYQcGvcjIkXdY9fc3WzMP 4xSeH5YY2oRd9i1XiZnO7Jf4+VhTtA8uWwCk5FbLaF6fDfcxv3oWltGMiUZfIfUGxB9m9i usaisveKm3Pv2DXG5okRcEXMjAEgkzwz7YIzClz0pVt87E7T0X/pRTV2aNubmQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758111555; a=rsa-sha256; cv=none; b=rqdbfE+Ymdg2VhmZoyVY2M0d33Ag856G4NdT1+HJLew/tPOHODK6GYc5RPUh8xcbFCwL7n RS1rU7+Ow499BhGh8yJTn78LIJfSjEL97wx5w0Sg+tQg23ukP6bYXds7+CgT9Bu0qJK0Z8 mqImiQesnq/DhBbmO5uctnq0pirUaAZucFBwuj+Buob4ZL8S6Esgu//2iTXQji+yliMpYU XlbxKEc4QaY55jXgPW/lnKirrUbt61eMPV05WkXrMvD1FlMp7Q4i4Luqg4BL1N76KUzYbo UlgZs7PXr3x+kTYR62kxar3hPlKlXQlZgIQptlMXBl+/xDUmoCQjTGJ5MhO8yQ== 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 4cRd9b10n1z9G6; Wed, 17 Sep 2025 12:19: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 58HCJF2e086053; Wed, 17 Sep 2025 12:19:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58HCJF90086050; Wed, 17 Sep 2025 12:19:15 GMT (envelope-from git) Date: Wed, 17 Sep 2025 12:19:15 GMT Message-Id: <202509171219.58HCJF90086050@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: 0b018cfd81d8 - main - initgroups(3): Fix return value on allocation failure List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0b018cfd81d8fdd64af3fe94c6989a82c0d3afa9 Auto-Submitted: auto-generated The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=0b018cfd81d8fdd64af3fe94c6989a82c0d3afa9 commit 0b018cfd81d8fdd64af3fe94c6989a82c0d3afa9 Author: Olivier Certner AuthorDate: 2025-09-16 15:52:20 +0000 Commit: Olivier Certner CommitDate: 2025-09-17 12:16:06 +0000 initgroups(3): Fix return value on allocation failure We must not return ENOMEM, but rather -1 with 'errno' set to ENOMEM, as described in the manual page and as other implementations are doing. A malloc() failure actually already sets ENOMEM for us. Add comments indicating which function set 'errno' each time we return. While here, improve style and remove useless headers. Reviewed by: kib, emaste Fixes: 54404cfb13d4 ("In preparation for raising NGROUPS and NGROUPS_MAX, ...") MFC after: 5 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D52580 --- lib/libc/gen/initgroups.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/lib/libc/gen/initgroups.c b/lib/libc/gen/initgroups.c index b6697dd7ed8f..55f17a94fa8e 100644 --- a/lib/libc/gen/initgroups.c +++ b/lib/libc/gen/initgroups.c @@ -31,11 +31,7 @@ #include -#include "namespace.h" -#include -#include "un-namespace.h" #include -#include #include #include @@ -51,12 +47,13 @@ initgroups(const char *uname, gid_t agroup) * setgroups to fail and set errno. */ ngroups_max = sysconf(_SC_NGROUPS_MAX) + 2; - if ((groups = malloc(sizeof(*groups) * ngroups_max)) == NULL) - return (ENOMEM); + groups = malloc(sizeof(*groups) * ngroups_max); + if (groups == NULL) + return (-1); /* malloc() set 'errno'. */ ngroups = (int)ngroups_max; getgrouplist(uname, agroup, groups, &ngroups); ret = setgroups(ngroups, groups); free(groups); - return (ret); + return (ret); /* setgroups() set 'errno'. */ } From nobody Wed Sep 17 12:19:17 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cRd9f25Ftz67Hwv; Wed, 17 Sep 2025 12:19: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 4cRd9d3bm0z3W07; Wed, 17 Sep 2025 12:19:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758111557; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=w7qiQRjTMl5Qoqas796/9+iypYsP/ygYByK8gcgv0N4=; b=wU2S67zRW8SAkYwjgRorzSPp503TuOkektJA+Ni+CNLFykfeqA2Tdtd5P5Oaqqlr+qhVTY FClRmfzSf30J2yvvm7TyVTochTcms0GpzSVsb9LZo5HZ4zY7XIvlNitXucgFXTxOthiwJg Td8yfvm76IUWEiXckOME+Mv0/Ygx/k1Ak/sBP0AW60qvmUStfVW6NAfBgvntj5ekVFFP/9 3MwN7V1OVM8rXImN5kpQ9O6Q10HF5XtY9+ZxiC0+l/I242vLXyYMYu+NfIS2XKMhjgHL0b akNp/9MNP5mS/FqgC3NMFgctlbZkXDNkb78tufSa+JYAvxlt9gGAPAM1ZARpcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758111557; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=w7qiQRjTMl5Qoqas796/9+iypYsP/ygYByK8gcgv0N4=; b=H6cqOJxZcO4GFtb3E1tHoP+0jmkzDSqQzHNwJBPSUy+Gstbw+WqeV5ih98ND91VdgItx9p 0aG0YyvnhvMN5B7W06g2Buu+e7oxbk8tW9xOcVlxtTRIIoVUUsPbBLyP6h1oJv5GVdOPfE Epa9HXXoss1+4s3WS4dY2H1cZGR0N5er4kE60U40zpKuRvYlodeYGbP2bLZj35mYFWtDK5 o/jH5TPhinD67dpv2IO7lXm0LN2st+nTRctGl64WXMeyj6haJg3wrROLoRUunLtq2OoIRP 5B9w0K9A0ozID5523S93e9jj9izmciQmBqmM1UjPkMN2yFrXtY904Oe1/hAFiQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758111557; a=rsa-sha256; cv=none; b=mM8CGMRijXUU3dgmb1MncISszT7eD482M4nSQqLCWP+RvJgdpRQgfInHI2PshUu+6iIMi3 qu6ef6otfjE91LcNLmFBduy6JfuvNb922PDSQcP8pM2jB7va9zfhDVPFyCzhk2hzxS/Hwt mq16o5o3lF1TV7/T3WMzMFYX6AE3boqVDf7O4tvdH7n7jWhDvwurE2chT15Q6C4GI2qwY1 IFXwxc2qD4LgyBjV3bNKTX7tpwnByINGMceSU7Nm6u97noFiT2bTUAI71HuwobaDrODNZG QDg+an8XGkpEKTa9KWpy0KNvrM8pYKaqelI6PTnoctsaE4aHogAvxDYjVLBgxw== 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 4cRd9d2kgqz9Jj; Wed, 17 Sep 2025 12:19: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 58HCJHpv086124; Wed, 17 Sep 2025 12:19:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58HCJHHb086121; Wed, 17 Sep 2025 12:19:17 GMT (envelope-from git) Date: Wed, 17 Sep 2025 12:19:17 GMT Message-Id: <202509171219.58HCJHHb086121@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: 9294eb44eecb - main - getgrouplist.3: Rework, use more appropriate terminology List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9294eb44eecb71f573f29ff84ce1bd3aa93c077c Auto-Submitted: auto-generated The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=9294eb44eecb71f573f29ff84ce1bd3aa93c077c commit 9294eb44eecb71f573f29ff84ce1bd3aa93c077c Author: Olivier Certner AuthorDate: 2025-08-29 14:53:52 +0000 Commit: Olivier Certner CommitDate: 2025-09-17 12:16:07 +0000 getgrouplist.3: Rework, use more appropriate terminology Bring up to date with NSS by substituting "file" with "database". Describe more precisely which database is accessed, i.e., only the group database, which value should be used and where it lands in the result. Prefer a terminology referring to POSIX terms, i.e., use "effective group list" instead of "group access list". Reviewed by: gbe MFC after: 5 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D52283 --- lib/libc/gen/getgrouplist.3 | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/lib/libc/gen/getgrouplist.3 b/lib/libc/gen/getgrouplist.3 index e9a980f99751..e3939fc2481a 100644 --- a/lib/libc/gen/getgrouplist.3 +++ b/lib/libc/gen/getgrouplist.3 @@ -1,5 +1,13 @@ +.\"- +.\" SPDX-License-Identifier: BSD-3-Clause +.\" .\" Copyright (c) 1991, 1993 .\" The Regents of the University of California. All rights reserved. +.\" Copyright (c) 2025 The FreeBSD Foundation +.\" +.\" Portions of this documentation were written by Olivier Certner +.\" at Kumacom SARL under sponsorship from the FreeBSD +.\" Foundation. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -25,12 +33,12 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd October 26, 2014 +.Dd August 29, 2025 .Dt GETGROUPLIST 3 .Os .Sh NAME .Nm getgrouplist -.Nd calculate group access list +.Nd produce a user's effective group list .Sh LIBRARY .Lb libc .Sh SYNOPSIS @@ -40,16 +48,16 @@ .Sh DESCRIPTION The .Fn getgrouplist -function reads through the group file and calculates -the group access list for the user specified in -.Fa name . -The +function reads through the group database to retrieve the supplementary groups +for the user specified in +.Fa name , +and returns the effective group list, whose first group is the value of +.Fa basegid +and the others are the retrieved supplementary groups. .Fa basegid -is automatically included in the groups list. -Typically this value is given as -the group number from the password file. +typically is the user's group number from the password database. .Pp -The resulting group list is returned in the array pointed to by +The effective group list is returned in the array pointed to by .Fa groups . The caller specifies the size of the .Fa groups @@ -70,6 +78,7 @@ Here, the group array will be filled with as many groups as will fit. group membership list .El .Sh SEE ALSO +.Xr setcred 2 , .Xr setgroups 2 , .Xr initgroups 3 .Sh HISTORY From nobody Wed Sep 17 12:19:18 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cRd9g27Twz67Hnk; Wed, 17 Sep 2025 12:19: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 4cRd9f4HXXz3WGF; Wed, 17 Sep 2025 12:19:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758111558; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bfmwp3DTh9Gcp7JnoXlAiUogyYF+a4u2zEbWbItomvc=; b=knotl7VJuyUlCTXLFe6rsJN3DTi9WpnnWLUqYTMBOIQAICva0PuQsm+vXxBvOraZ/NJ2Z1 CRC4VFAEl4t0e1qJlKh0sHr3Ql1+Ylvu0H6U5/GO9JnBJA+XkEJTqj0jvTLHBcKPlqD8Mp vcis2qmBpbTl0HlN5Tg2GJ24fQEhemFuxhWnyQVoYv/36WhJZHt0JNxeyBolFEB45Lrgn8 LS2GeoFOvm5wkkRj6qfoqyRONlyo1RALytsKYa0YlL/4gUTsvVqt0OHGOCraHOnwD+IDVS Ek7EWPiMUw/crVjHICiRBNioihFTtA1AkyqsXgup8t7r7M+kTklRl0ptV9u2oA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758111558; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bfmwp3DTh9Gcp7JnoXlAiUogyYF+a4u2zEbWbItomvc=; b=YB14YWBr+1uBhohluG0Nhn0N8reA8ULRVHsPFM0098NSvE8fygu+cYft0XJeVnWXx5Ea3S RPq9DxL1V3uEeREtUUDd8c/c6bLp0ypwuC0fO3fkJvVqQ80A5PaZaRilPp71MwslMvc47X Q7yxvxXfdwtlOqR7RF58eKt3LV+x6WIogH/lThEK/zjOuV7/lBpGK2ALlyWd1aMK0zXS/M GcAD/PvgXd4YqlGcImJDASyXa2CgqKma9nmRgwn3qSdwy1T5WbBFm0Njc40d3MnzReUdP/ 2RzXGk46eboZPDbTAhmwaKRrWjfvn5uZByLLFMPLmn0KEpRFgCGKYZGegEWkuA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758111558; a=rsa-sha256; cv=none; b=V0uUkx3QUerDspBYgmXTOUBhkII9/26swX5JNsoulssgOmgF1jfRi/I07gEeX6XvwBaWnr /VjKEez3zkozSIigAecQgoifjTZ5QJrgFUMn+NgbvICZAeNWmJ9gWeAxfyhbaTVfk++tsv YLkweuMTTZ14hyNSPbYftESHD/YfIIGE8d4za+7ANsviKlPYEH0rH1BqfN7JYhe6P+sClV jpH1Um3ddEGuxAzdhLI8RoAq/uVQuKCt5tiJqOHtTXutSdm8XzIOGd5ifclzLcGDbcMZZw k9A9xLSVdH9kkZsuQlOEGsoNHzdAPiEusW8AZEC15lmfnWjikp62XJDbWY0VTQ== 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 4cRd9f3YLmz9Jk; Wed, 17 Sep 2025 12:19: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 58HCJI8T086158; Wed, 17 Sep 2025 12:19:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58HCJI1N086154; Wed, 17 Sep 2025 12:19:18 GMT (envelope-from git) Date: Wed, 17 Sep 2025 12:19:18 GMT Message-Id: <202509171219.58HCJI1N086154@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: 6d22cd6b5f8b - main - setgroups.2: Add SECURITY CONSIDERATIONS, fix the groups limit, rework List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6d22cd6b5f8b5604f1fe9e70930b1506f990e31e Auto-Submitted: auto-generated The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=6d22cd6b5f8b5604f1fe9e70930b1506f990e31e commit 6d22cd6b5f8b5604f1fe9e70930b1506f990e31e Author: Olivier Certner AuthorDate: 2025-08-29 15:10:22 +0000 Commit: Olivier Certner CommitDate: 2025-09-17 12:16:07 +0000 setgroups.2: Add SECURITY CONSIDERATIONS, fix the groups limit, rework Add a new SECURITY CONSIDERATIONS section describing in details what the new behavior is after commit 9da2fe96ff2e ("kern: fix setgroups(2) and getgroups(2) to match other platforms"), what setgroups(2) does not do anymore, and how programs using it are affected. Fix the groups limit after commit 9da2fe96ff2e ("kern: fix setgroups(2) and getgroups(2) to match other platforms"). Prefer a terminology referring to POSIX terms, i.e., use "effective group list" instead of "group access list". While here, fix some style. Note for MFC to stable/14: The content will have to be revised as the new behavior is not in place. The latter should still be mentioned as upcoming in 15. Fixes: 9da2fe96ff2e ("kern: fix setgroups(2) and getgroups(2) to match other platforms") MFC after: 5 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D52284 --- lib/libsys/setgroups.2 | 99 ++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 83 insertions(+), 16 deletions(-) diff --git a/lib/libsys/setgroups.2 b/lib/libsys/setgroups.2 index 451f63ba1266..0ec99507cfb0 100644 --- a/lib/libsys/setgroups.2 +++ b/lib/libsys/setgroups.2 @@ -1,5 +1,13 @@ +.\"- +.\" SPDX-License-Identifier: BSD-3-Clause +.\" .\" Copyright (c) 1983, 1991, 1993, 1994 .\" The Regents of the University of California. All rights reserved. +.\" Copyright (c) 2025 The FreeBSD Foundation +.\" +.\" Portions of this documentation were written by Olivier Certner +.\" at Kumacom SARL under sponsorship from the FreeBSD +.\" Foundation. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -25,12 +33,12 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd August 1, 2025 +.Dd September 17, 2025 .Dt SETGROUPS 2 .Os .Sh NAME .Nm setgroups -.Nd set group access list +.Nd set the calling process' supplementary groups .Sh LIBRARY .Lb libc .Sh SYNOPSIS @@ -41,21 +49,21 @@ .Sh DESCRIPTION The .Fn setgroups -system call -sets the supplementary group list of the current user process -according to the array -.Fa gidset . +system call sets the calling process' supplementary groups according to the +.Fa gidset +array. The .Fa ngroups -argument -indicates the number of entries in the array and must be no -more than +argument indicates the number of entries in the array and must be no more than .Dv {NGROUPS_MAX} . +.Pp The .Fa ngroups -argument may be set to 0 to clear the supplementary group list. +argument may be set to zero to clear all supplementary groups, in which case +.Fa gidset +is ignored. .Pp -Only the super-user may set a new supplementary group list. +Only the super-user may install a new supplementary groups set. .Sh RETURN VALUES .Rv -std setgroups .Sh ERRORS @@ -69,16 +77,16 @@ The caller is not the super-user. The number specified in the .Fa ngroups argument is larger than the -.Dv {NGROUPS_MAX}+1 +.Dv {NGROUPS_MAX} limit. .It Bq Er EFAULT -The address specified for +Part of the groups array starting at .Fa gidset -is outside the process -address space. +is outside the process address space. .El .Sh SEE ALSO .Xr getgroups 2 , +.Xr setcred 2 , .Xr initgroups 3 .Sh HISTORY The @@ -92,4 +100,63 @@ the .Fn setgroups system call would set the effective group ID for the process to the first element of -.Fa gidset . +.Fa gidset , +and only the other elements as supplementary groups. +Despite treating the first element as the effective group ID to set, it accepted +an empty +.Fa gidset +.Po +.Fa ngroups +being zero +.Pc +as a stance requiring to drop all supplementary groups, leaving the effective +group ID unchanged. +.Sh SECURITY CONSIDERATIONS +The +.Fn setgroups +system call sets the process' supplementary groups to those contained in the +.Fa gidset +array. +In particular, as evoked in +.Sx HISTORY , +it does not anymore treat the first element of +.Fa gidset +separately. +Formerly, it would set it as the effective group ID while only the others were +used as supplementary groups. +.Pp +Programs solely relying on +.Fn setgroups +to change the effective group ID must be modified, e.g., to also call +.Xr setegid 2 +or to instead use +.Xr setcred 2 , +else they will unwillingly keep their effective group ID. +.Pp +Programs using +.Fn setgroups +with the effective group ID as the first element of array +.Fa gidset +and not duplicating it in the rest of the array, which includes those using +.Fn initgroups , +now insert this group ID in the supplementary groups set. +This is in general desirable, as explained in the +.Xr initgroups 3 +manual page, and has the consequence that subsequent process' effective group +ID's changes do not remove membership of the original effective group ID, since +these changes do not affect the supplementary groups. +Applications that expressly do not want that must be modified to stop passing +the effective group ID as the first element to +.Fn setgroups . +.Pp +To clear all the calling process' supplementary groups, always use the statement +.Bd -literal -offset indent +setgroups(0, NULL); +.Ed +.Pp +which works also on older FreeBSD version +.Po +see the +.Sx HISTORY +section +.Pc . From nobody Wed Sep 17 12:19:19 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cRd9g5w5Dz67HZ1; Wed, 17 Sep 2025 12:19: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 4cRd9g56nkz3WJ8; Wed, 17 Sep 2025 12:19:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758111559; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4VfLVyAJi29/xOo6J6m8obfFP3DFqS3aGFfa0OspLTQ=; b=MyG1KVHfr8yikCgboGsDlw7narx/BJcghpYp5/s8O/UtrtN1hL2d2VQioBCrCMm1lVBtJt vPZHSPE6+53ktGHKWXTXyiG+Qf48Jh8oIwlYTR/IGFQqEjEfyzkhIdpXA6vZ20UiebdNU7 EaPhxo0qxElhzm9T3WXiYA9+mPCx/MdRtX5CZJ26JFsgtOnLHX6VnrwRVXKq0DmcRncBy3 XFFhh6aYc1E3f0MGmFkUXsB8AsPzsySFJykA9sDKimB3VtnWRROl/XNpsCFp97RUB5V0dr zkcnSKKRbWI0AB/84o/kWxJhZ/TFjb2W0WBSqTazUGXv/eNQ4yJariUFpxSsjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758111559; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4VfLVyAJi29/xOo6J6m8obfFP3DFqS3aGFfa0OspLTQ=; b=vMe7ULstI5koADtpNfq7CrUrG+O2Mfudgg804Gf9XeAnbSCwgc+LEZGNZyPewaxuJRcpVr X835j1rkIyiO9J3EswJpH2FAkbKqDKqpLoQ4vfiRp/3d3myXc2VsoHifGrQSJiLyOXiwJS MJREKOAEzUSY9JGBiWPn1QkIdjgG9dEsb+X827iLyVeZ22twooYAJgUgkVzFIF1j03kdiu Rjc14LLUipZ4PF0kqk3ZnwaweaWBPufPbWfKP58SvVvxlaAwDx+g6K045+IsQZohlt8lCD OMqBmTafzntblKtp00w/4hCEtzdT8jLavlcJzqlP0sStE5Dk0Y9QBtrvLJJyDQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758111559; a=rsa-sha256; cv=none; b=OD4y96OnwdrbEbGfI+xAnsvH+GadXMhzZdD2kRbTeHSujrYaF9OUu7wwh0a6Ses48nMzD+ MGHOKyvs/AivHOa8WyAR3JS/S03t6maW694EsARa6tw0iDi+0vRv2CYQqeZirLO7YLdWco PfxEvc4bw/C2qoAjeTaCJ++gQjLxsffysa4ett7cZ2atHZBsieWXN7a8oFrb4ckKNGX6L8 78ctAGXYf75BqMWIwqQz7jMngGOCk+LnZU+4gydj7zfMDlFXYEnUbyjaMNCsbqMwAiarLi CYMCHJ+b01Mmr7DVKLLIe4Zy8nl5jHu6skMmnLSvsnHYTW+ms9yOAyiJjnsP9A== 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 4cRd9g4dVZz9hQ; Wed, 17 Sep 2025 12:19: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 58HCJJ4C086191; Wed, 17 Sep 2025 12:19:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58HCJJOh086188; Wed, 17 Sep 2025 12:19:19 GMT (envelope-from git) Date: Wed, 17 Sep 2025 12:19:19 GMT Message-Id: <202509171219.58HCJJOh086188@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: 66b54c48b2ae - main - setcred.2: Remove now obsolete mention of setgroups(2)'s different behavior List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 66b54c48b2ae1c1759134cad5daa6fc27b679918 Auto-Submitted: auto-generated The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=66b54c48b2ae1c1759134cad5daa6fc27b679918 commit 66b54c48b2ae1c1759134cad5daa6fc27b679918 Author: Olivier Certner AuthorDate: 2025-08-29 15:12:59 +0000 Commit: Olivier Certner CommitDate: 2025-09-17 12:16:07 +0000 setcred.2: Remove now obsolete mention of setgroups(2)'s different behavior Reviewed by: gbe Fixes: 9da2fe96ff2e ("kern: fix setgroups(2) and getgroups(2) to match other platforms") MFC after: 5 days MFC to: stable/15 Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D52285 --- lib/libsys/setcred.2 | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/lib/libsys/setcred.2 b/lib/libsys/setcred.2 index 86f61ddfdb30..f5d1f15b631b 100644 --- a/lib/libsys/setcred.2 +++ b/lib/libsys/setcred.2 @@ -6,7 +6,7 @@ .\" This documentation was written by Olivier Certner .\" at Kumacom SARL under sponsorship from the FreeBSD Foundation. .\" -.Dd December 19, 2024 +.Dd August 29, 2025 .Dt SETCRED 2 .Os .Sh NAME @@ -119,11 +119,6 @@ It must be less than or equal to An array of IDs to set the supplementary groups to, if flag .Dv SETCREDF_SUPP_GROUPS is specified. -Note that all groups in this array will be set as supplementary groups only, in -contrast to -.Xr setgroups 2 -which treats the first element specially as the new effective group, not adding -it to supplementary groups. .It Fa sc_label A pointer to a valid MAC label structure, e.g., built with the .Xr mac_from_text 3 From nobody Wed Sep 17 12:19:20 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cRd9j0zJTz67HlY; Wed, 17 Sep 2025 12:19:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cRd9h6HhFz3W7V; Wed, 17 Sep 2025 12:19:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758111560; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PoIYu/seOYm/edXC8Hv+X4tEgI+BoR5gQY3XBItZRMs=; b=B58xU3mVNIsGw9MLZH4qZdIpbLfayVvJPw+MygoN7UXoVA1LximVuGI6Jwqfo4ghNhmuht IXivK0jwUS6N41mEcu4pYWmE/KdfJ/k9AC5OoYSy80mLrZC4R34MS6ctibWvLb9wmQ9943 n4GII1WHILRzDkdIWTiboV/RGB28NwLsK9wpIVwMgoTNOor2TNs1Brz7sLkeB+J8XmlFGT 7L7XkGV6nzvD3BS9Tqrxu3zy8j8chkcjigEZN3H65J0QxXh1uPH+2Zi6yxuro6bQrt0fXm 1V7Hv8Kosb68y48GaZXUIg2bjmh5F1tc6926YGfyeMH8H8ag25iHr7+s5xefxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758111560; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PoIYu/seOYm/edXC8Hv+X4tEgI+BoR5gQY3XBItZRMs=; b=Sb2wJcGRN0q0pWjwx9wj3NfMPjJfWHpewpasHKw97iHANFYx5tzo6j2xEAD8ktU9BFZjBs Vh8FR1NK8Fe+2tzKc/3ZhTorDmzKcHRmbWqygXzw4su7RyVEBhlSxgPPCBwquzYkgNDHlG 1d3L+JTOBNimwDCgfVr1vvkzagJpQ9k/3/kifIkbgiDYLAeoAAj2zSMbuUSAzSFPUCC75F aasn9D7aHbZcoVJNrejFj+LfeRfdCy65j2ov2uYuNdAvDXsgM10rGypFQ4Wb9dYJMB86uy 6JeO5y3tJjCCl+cpl0zB+EAJ6bMawGNRzykRi1ZetZLg5bvxVR0YmCDRiuTcFg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758111560; a=rsa-sha256; cv=none; b=fcuno5i8yViXdIXYT3zJomSTLCG1uEQYtBLPCloX9FqCUU2Gb67FoGiOZnJ5zRGFkg0A2C 1DA/P7sCRJmUAiO7OggB/BCKUscRJ+gA18t7+jBPAJ4EzA/hzv9hp9coy84Z91i3IVK9Kb 0wW5Pi/lDf/sVKPXLPzQGNpmrYBhNztbOwz7Qs0CBK5hv0Mgy4+0bediu3adennz4nambj eOpJBFeYm+Jwkz408YSZPrJJBzhTO7+8pPnduVLmIJqbL1N5XRvU+5eJwuQhgm3OGIPSeD n/8t5Bf+oRPuY1MeikHls4BEH580p1+inyDyXt7b4/PiXP3zlGvE8Skm3d1Wtg== 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 4cRd9h5r5Pz9k0; Wed, 17 Sep 2025 12:19:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58HCJKN5086224; Wed, 17 Sep 2025 12:19:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58HCJKhn086221; Wed, 17 Sep 2025 12:19:20 GMT (envelope-from git) Date: Wed, 17 Sep 2025 12:19:20 GMT Message-Id: <202509171219.58HCJKhn086221@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: 4be38acc826f - main - getgroups.2: Clarify, mention ascending order, add SECURITY CONSIDERATIONS List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4be38acc826f260e4c7d3ebbb9de534db449782e Auto-Submitted: auto-generated The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=4be38acc826f260e4c7d3ebbb9de534db449782e commit 4be38acc826f260e4c7d3ebbb9de534db449782e Author: Olivier Certner AuthorDate: 2025-08-29 22:43:10 +0000 Commit: Olivier Certner CommitDate: 2025-09-17 12:16:08 +0000 getgroups.2: Clarify, mention ascending order, add SECURITY CONSIDERATIONS Clarify and be more precise about the behavior of getgroups(2), in particular with respect to 'gidsetlen'. Prefer a terminology referring to POSIX terms, i.e., use "supplementary groups" instead of "group access list". Say that getgroups(2) reports the supplementary groups in strictly ascending order and returns the cardinal of the set they form (and mention this has been the case since FreeBSD 14.3). Add a new SECURITY CONSIDERATIONS section contrasting the new behavior after commit 9da2fe96ff2e ("kern: fix setgroups(2) and getgroups(2) to match other platforms") with the historical one. While here, fix some style. Note for MFC to stable/14: The content will have to be revised as the new behavior is not in place. The latter should be mentioned as upcoming in 15. Reviewed by: gbe (older version) MFC after: 5 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D52286 --- lib/libsys/getgroups.2 | 94 +++++++++++++++++++++++++++++++++++++------------- 1 file changed, 70 insertions(+), 24 deletions(-) diff --git a/lib/libsys/getgroups.2 b/lib/libsys/getgroups.2 index 37c8fbad7215..4881a65d532e 100644 --- a/lib/libsys/getgroups.2 +++ b/lib/libsys/getgroups.2 @@ -1,5 +1,13 @@ +.\"- +.\" SPDX-License-Identifier: BSD-3-Clause +.\" .\" Copyright (c) 1983, 1991, 1993 .\" The Regents of the University of California. All rights reserved. +.\" Copyright (c) 2025 The FreeBSD Foundation +.\" +.\" Portions of this documentation were written by Olivier Certner +.\" at Kumacom SARL under sponsorship from the FreeBSD +.\" Foundation. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -25,12 +33,12 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd August 1, 2025 +.Dd September 17, 2025 .Dt GETGROUPS 2 .Os .Sh NAME .Nm getgroups -.Nd get group access list +.Nd get the calling process' supplementary groups .Sh LIBRARY .Lb libc .Sh SYNOPSIS @@ -40,36 +48,39 @@ .Sh DESCRIPTION The .Fn getgroups -system call -gets the current supplementary groups of the user process and stores it in the -array -.Fa gidset . -The +system call gets the calling process' supplementary groups and stores them in +the +.Fa gidset +array in strictly ascending order. +The value of .Fa gidsetlen -argument -indicates the number of entries that may be placed in +indicates the maximum number of entries that may be placed in .Fa gidset . -The -.Fn getgroups -system call -returns the actual number of groups returned in -.Fa gidset . -As many as {NGROUPS_MAX} values may be returned. +.Pp If .Fa gidsetlen is zero, .Fn getgroups -returns the number of supplementary group IDs associated with -the calling process without modifying the array pointed to by +returns the cardinal of the calling process' supplementary groups set and +ignores argument .Fa gidset . .Pp +No more than +.Dv {NGROUPS_MAX} +values may ever be returned. The value of .Dv {NGROUPS_MAX} should be obtained using .Xr sysconf 3 to avoid hard-coding it into the executable. .Sh RETURN VALUES -A successful call returns the number of groups in the group set. +On success, the +.Fn getgroups +system call returns the cardinal of the supplementary groups set. +It always succeeds if argument +.Fa gidsetlen +is zero. +.Pp A value of -1 indicates that an error occurred, and the error code is stored in the global variable .Va errno . @@ -81,12 +92,12 @@ are: .It Bq Er EINVAL The argument .Fa gidsetlen -is smaller than the number of groups in the group set. +is smaller than the number of supplementary groups +.Pq but not zero . .It Bq Er EFAULT -The argument +An invalid address was encountered while reading from the .Fa gidset -specifies -an invalid address. +array. .El .Sh SEE ALSO .Xr setgroups 2 , @@ -96,16 +107,51 @@ an invalid address. The .Fn getgroups system call conforms to -.St -p1003.1-2008 . +.St -p1003.1-2008 +with the additional properties that supplementary groups are reported in +strictly ascending order and the returned size coincides with the cardinal of +the set. .Sh HISTORY The .Fn getgroups system call appeared in .Bx 4.2 . .Pp +Since +.Fx 14.3 , +the +.Fn getgroups +system call has treated the supplementary groups as a set, reporting them in +strictly ascending order and returning the cardinal of the set. +.Pp Before .Fx 15.0 , the .Fn getgroups -system call always returned the effective group ID for the process as the first +system call would additionally return the effective group ID as the first element of the array, before the supplementary groups. +.Sh SECURITY CONSIDERATIONS +The +.Fn getgroups +system call gets the supplementary groups set in the +.Fa gidset +array. +In particular, as evoked in +.Sx HISTORY , +it does not anymore retrieve the effective GID in the first slot of +.Fa gidset . +Programs should not make any assumption about which group is placed in the first +slot of +.Fa gidset +other than it being the supplementary group with smallest GID. +.Pp +The effective GID is present in the supplementary groups set if and only if it +was explicitly set as a supplementary group. +The function +.Fn initgroups +enforces that, while the +.Fn setgroups +system call does not. +Please consult the +.Xr initgroups 3 +manual page for the rationale. From nobody Wed Sep 17 12:19:21 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cRd9l1gnwz67HZC; Wed, 17 Sep 2025 12:19: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 4cRd9j72f3z3WH6; Wed, 17 Sep 2025 12:19:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758111562; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gFhuQ5gDrHEXSwDnmILdSEZ2fHvjgnPfFSTDC5OpEGI=; b=Wz2ABbE7/BB7ye+95E0MVCLc2BuUlz+Bd43Z8jdr92DjlqUDR+ON+jmPN4XCT0JX8xpV+3 SXf0uji74wjXWCrwfFNb4qnBrwlDLI0CpYiqDjcm3t6lDS6tKSqMkaDB/G6JorBgLHKBAe o7kwdWRdLh74Xd3xwqojxXDOtR5NhACvX0sGWYY7/9++q9ox7CwbWTfvdf+8Bw6V/YDX2k y9GqTmnExVhPHWmocSABbdjpmXq4Vtn5fy9w3Pql3wxCbSc+1Cjyd25QhM1j1xqIV2ePUI Yo6PvaSGsE4Im9uuj6MhPR7mL1pWD/22FHgZITZeWfLMbOpLHeG7apm9MCOYpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758111562; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gFhuQ5gDrHEXSwDnmILdSEZ2fHvjgnPfFSTDC5OpEGI=; b=dxKzzhtMoBjZREqa//Hg9y+y0TmvxWol+ITVOxh7DQ6KTnhVE1eIyR6aOVB2lH5fsCxGtr uM3oOjxSTjtb0zmmNHWJvQjhg2JoQasZLXJxPVU+ZNqciOzwFNpvL1wIoQs6WydEKsCGiR Mf5koNKqIT1JPxSBWt9wx2LpE0qPzvdDSx8frbmQwBV/kQRH5LaJtT3UNJgfo3xem+wX3X RO7o/Bcma3uy53ZjPT7xjXwKHqtT6pY/JlllyRcnUbmFajn3bGFemEAbd8shJA40EPcjPq LUJ8hZzfcdPpdLf7hsWSyhJWnFgn80ZmECMgNDmWIp11cOUns0xYI36Gj/bFCg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758111562; a=rsa-sha256; cv=none; b=e3GCv7peS5IyTaNGWH3WKeM692gXqOv8y4fA7LE/lgsUdWLaKql6VydJZIsjFVi1QPCbPQ MSGF8lB6aLP12e4+7FtYstjA+tGOHN66d7g9pVtFVpUMtINDaKyuxVmIcEGH/s7qbgb16O 8uW5PQviy8lDXw0qKgm2KpBZlLQrOhuvAxekG0lqwEooNKKFmlY9E5aHgBNXJkksCfHvHk nyCd4Ublp7fmprmbQsdLDl9Ml1vaKeOajuvCTBi2i8gDz49GyfzqNcJWnovVEtftis/Sda QYjzUJZ2W5BOmC/D7s2UsaGfkRvhIT5qnwo6uLISFAzuuW4bUl2F63Ele+ti2g== 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 4cRd9j6VQrz9G7; Wed, 17 Sep 2025 12:19: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 58HCJLXx086263; Wed, 17 Sep 2025 12:19:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58HCJLoC086260; Wed, 17 Sep 2025 12:19:21 GMT (envelope-from git) Date: Wed, 17 Sep 2025 12:19:21 GMT Message-Id: <202509171219.58HCJLoC086260@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: 313d769e995c - main - group.5: Add a reference to setcred(2) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 313d769e995c4fa4c5e3ae2470af16a8fbeaa3c1 Auto-Submitted: auto-generated The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=313d769e995c4fa4c5e3ae2470af16a8fbeaa3c1 commit 313d769e995c4fa4c5e3ae2470af16a8fbeaa3c1 Author: Olivier Certner AuthorDate: 2025-08-29 15:13:17 +0000 Commit: Olivier Certner CommitDate: 2025-09-17 12:16:08 +0000 group.5: Add a reference to setcred(2) Reviewed by: gbe MFC after: 5 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D52287 --- share/man/man5/group.5 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/share/man/man5/group.5 b/share/man/man5/group.5 index 044164a3c955..8f7c59c59d52 100644 --- a/share/man/man5/group.5 +++ b/share/man/man5/group.5 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd February 8, 2013 +.Dd August 29, 2025 .Dt GROUP 5 .Os .Sh NAME @@ -145,6 +145,7 @@ may still have this limit. .Sh SEE ALSO .Xr newgrp 1 , .Xr passwd 1 , +.Xr setcred 2 , .Xr setgroups 2 , .Xr crypt 3 , .Xr getgrent 3 , From nobody Wed Sep 17 12:19:24 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cRd9m49Qzz67HfM; Wed, 17 Sep 2025 12:19: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 4cRd9m1cnlz3WM8; Wed, 17 Sep 2025 12:19:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758111564; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yfktoQ9WbHYmYHa75BUnJvacqhayFIcz5rl7d1Plvpk=; b=SY1Dhy1v58GDD/cvolvQhb0s8HnLtlWuP8/Wanrjyum0+hzqjApLG7udLCQB1U2VHm3SWq 2rVwvyq1XFmfKXfxvDEUHCA0/Dhw0/icphS5ktQqphumJFd1Pze3IsXbdtNHMNhqKHpOvO PasQwDfBCmK3h4aTdFSvREDk9gXEOI8LFMw1OVDOGwa+lhIM0qrzI3OKhclHqUyO0X7xt/ tjuEtXokkjieOTag4Xh4UJuMbMVIbqzbcrLGObaLo5/9d9KF496mQxmL5kGQn8bBxVIEP5 KxA49T2NnijKuUSRseOdJ3r9QZ8J28z9J+N11IG0JuySu3w6z8xY3I0Lo/DVAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758111564; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yfktoQ9WbHYmYHa75BUnJvacqhayFIcz5rl7d1Plvpk=; b=I4MtC1WPnAh+jqCPtIbjiaX2m1mf08jhIWivOogrv7j0epCY90178/O+LVGt+I54tQIvQF X7TelwiL31mm2wrxFihxEIVHMkiblj1A3Km+xuvBLlFOE0zA5/+gVbkUCfg3OpCpob5d7M QVgfHqA35MQAUss5MMjjJmpLoNAGCeSm7PexgHKgp1bAwSsU9FQTLoSrAKjlJBEegBGxgt tK2+D9ZRXb4jOFrNZroDYmSzKcCZ7IeBogydSESC776ljKMDSy1lpfqgIM5SU8Sn3rkPI7 weY6nhvrMWRjY5nobwB0KfIWYvOEioKzFXSPuy3GxFFFozWwK6orW+zuNEiFfA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758111564; a=rsa-sha256; cv=none; b=sQ58PDPAy4Md4NAFaPPiLjAq8HyfCsmib9CLYN4tWz6tiAN5S9Q7R4Z97+lQ8Je5ZnQKFi /rsX0YbZ3JlqKQarukhWccAXx2kTk33FSvxBeGRKVoJIUAAWhXexVwwSXGXTNJLlUI1cwU NvVkSdOgnu67WB6H4r7DB7Wh8MIJyJFfR0TitIXxSDW/mvVZcrqyjjTtj0XLKH1cOlAPAu 6cM8wn0nQL2HdsxsU6pHZjQwFyh1eqAQWrclF4bYWjNRsXOpRzlPeM6Zgyb4QshVrGKIPe xBoDDDXU4eJkDhd90ZOz0PG9eg5faVFB4scU83x7BNA6lUVJ12suyglt3i1Z6g== 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 4cRd9m19YTz9Lv; Wed, 17 Sep 2025 12:19: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 58HCJOYp086329; Wed, 17 Sep 2025 12:19:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58HCJOHY086326; Wed, 17 Sep 2025 12:19:24 GMT (envelope-from git) Date: Wed, 17 Sep 2025 12:19:24 GMT Message-Id: <202509171219.58HCJOHY086326@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: ff7252cdafbd - main - tools/regression/priv: Don't call setgroups() with the effective GID List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ff7252cdafbd9dab104a5e7b33b8bb84117a8789 Auto-Submitted: auto-generated The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=ff7252cdafbd9dab104a5e7b33b8bb84117a8789 commit ff7252cdafbd9dab104a5e7b33b8bb84117a8789 Author: Olivier Certner AuthorDate: 2025-08-29 17:00:07 +0000 Commit: Olivier Certner CommitDate: 2025-09-17 12:16:08 +0000 tools/regression/priv: Don't call setgroups() with the effective GID The 'setgroups(0, NULL);' stance works the same on all versions of FreeBSD, getting rid of all supplementary groups. The replaced code would force the effective GID to also be a supplementary group. Fixes: 9da2fe96ff2e ("kern: fix setgroups(2) and getgroups(2) to match other platforms") MFC after: 5 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D52289 --- tools/regression/priv/main.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tools/regression/priv/main.c b/tools/regression/priv/main.c index dbcb5759f6b9..979e6ed65284 100644 --- a/tools/regression/priv/main.c +++ b/tools/regression/priv/main.c @@ -423,12 +423,10 @@ setup_file(const char *test, char *fpathp, uid_t uid, gid_t gid, mode_t mode) static void set_creds(const char *test, uid_t uid, gid_t gid) { - gid_t gids[1] = { gid }; - if (setgid(gid) < 0) err(-1, "test %s: setegid(%d)", test, gid); - if (setgroups(sizeof(gids)/sizeof(gid_t), gids) < 0) - err(-1, "test %s: setgroups(%d)", test, gid); + if (setgroups(0, NULL) < 0) + err(-1, "test %s: setgroups(NULL)", test); if (setuid(uid) < 0) err(-1, "test %s: seteuid(%d)", test, uid); } From nobody Wed Sep 17 12:19:22 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cRd9l4s65z67Hp5; Wed, 17 Sep 2025 12:19: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 4cRd9l0kBgz3WDZ; Wed, 17 Sep 2025 12:19:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758111563; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EkiVm8zqhAFk2iBKhB8cwDkE+NoSMfDYs7Q0h+iio3M=; b=BMds/5PPWs9rDjU9uih/MsnewoU+EFmk4aEOuN+KmtWX1gKzdnAK/cqu7EH1V9Wdq+G2cg ekqDtNkmATucF7R0c5TVdgRR4OlB/+xUGDDt8WrXCn9YHaDn60V5HdWSW8pY8aNsIWg7ex vET724d2knucceAgkJ/kSZl2cmPc2ABQn8PLs9UEUujdMIvc0yo6kYcNpF+qHlhto1T+tq bI1hXGmeK2G67D1ZLKHYgvdPo8n6Nk05C+q2FfxToHdw5nLrvhj+P/HCXO1m8SMphTvNuH F5eWDERcY8w875fl4poJSaW5gGCoaxAHZk7QWkjjWSoHGAGTAcg1Ea1R4i+wcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758111563; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EkiVm8zqhAFk2iBKhB8cwDkE+NoSMfDYs7Q0h+iio3M=; b=gSkRXzYDge4YCchBs0d96aaHSwwrCVrcAStessT/iOoYDA4b6bDWDNOom4C673VLi4zsnO /2iKrtKrSNLszPrDxVmH09H72wHiGf/G3nprFAvPTWoy4f1mOUcj9RUzof9lAfmFHEHSBQ GAhzY6P5dxhh8jRxjFfQkg4HU/MikoKA2UoLZNHTieFItR+8FoSvIJA737fwNqtjl6vliy xEEeFenhdOGZxNsGPAupOhX7D2nNbn2YP9Qsxj+wM6J1394OghfuPCm73wqoMglXlsz21o xoI3cmTIKr4OAmBK5YC9OPSsfw83E0GzZBpv7yccZg17L+269tBpprZsf0aHvw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758111563; a=rsa-sha256; cv=none; b=FH6L2j1X7OXdwmpcoz1xi08+B/IrTFgPIVBKqn8o8RjQz1MB40W2mjWSE1pg3xcMfi55Yp rehzPEMmtXdqekHkSgV9qHauwaZ/HnLDnzzRu8+f5KPMz2r3mp4pOlrTLmGN/imUrab9eW S2EGJ6P9NVOV0MIwIB2IYjJ9JMV9Qei39CYGdjs5UZycHhwZzxUcJaJ3X4r/6HWmPBbP6d XpPouWzHf5JPIxMvGNUrMSVyu1Qz3FR29h1ElD8JW2AEsv4rkQRfzNgAlPn8HJGA/+l6lT o/bRN2X5wVBuEIQ0Bb1MrRpl3s5kMrnxj+HfFvcmPfwsJImesJwhNKR6lNOofQ== 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 4cRd9l09LHz9Lt; Wed, 17 Sep 2025 12:19: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 58HCJM2e086296; Wed, 17 Sep 2025 12:19:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58HCJMEM086293; Wed, 17 Sep 2025 12:19:22 GMT (envelope-from git) Date: Wed, 17 Sep 2025 12:19:22 GMT Message-Id: <202509171219.58HCJMEM086293@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: 6b26d0a335b6 - main - ucred.9: crsetgroups_and_egid(): Clarify differences with crsetgroups() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6b26d0a335b6222744e2778753086e16389b6029 Auto-Submitted: auto-generated The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=6b26d0a335b6222744e2778753086e16389b6029 commit 6b26d0a335b6222744e2778753086e16389b6029 Author: Olivier Certner AuthorDate: 2025-08-29 15:17:36 +0000 Commit: Olivier Certner CommitDate: 2025-09-17 12:16:08 +0000 ucred.9: crsetgroups_and_egid(): Clarify differences with crsetgroups() MFC after: 5 days MFC to: stable/15 Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D52288 --- share/man/man9/ucred.9 | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/share/man/man9/ucred.9 b/share/man/man9/ucred.9 index 38759bddb5b0..453df386ff18 100644 --- a/share/man/man9/ucred.9 +++ b/share/man/man9/ucred.9 @@ -24,7 +24,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH .\" DAMAGE. .\" -.Dd July 29, 2025 +.Dd August 29, 2025 .Dt UCRED 9 .Os .Sh NAME @@ -113,28 +113,26 @@ The actual copying is performed by .Pp The .Fn crsetgroups -and -.Fn crsetgroups_and_egid -functions set the +function sets the .Va cr_groups and .Va cr_ngroups -variables and allocates space as needed. -They also truncate the group list to the current maximum number of -groups. -No other mechanism should be used to modify the -.Va cr_groups -array. -Note that +variables representing the supplementary groups, allocating space as needed. +It also truncates the group list to the current maximum number of groups. +The .Fn crsetgroups_and_egid -will interpret the first element of +function is similar, but interprets separately the first group of .Va groups -as the new effective GID and the rest of the array as the supplementary groups, -and +as the effective GID to set, only setting the subsequent groups as supplementary +ones. +It will use .Va default_egid -will be used as the new effective GID only if +as the new effective GID if .Va groups is empty. +No other mechanism should be used to modify the +.Va cr_groups +array. .Pp The .Fn cru2x From nobody Wed Sep 17 12:19:25 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cRd9n5JqWz67Ht5; Wed, 17 Sep 2025 12:19: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 4cRd9n2h8Yz3WKZ; Wed, 17 Sep 2025 12:19:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758111565; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gQoMVt+EfjnUmLlQ094mb2B1v/UBlIvjbxL/T8mTODA=; b=DmPt+Djw1qoggcu5GjBvzJvvBM0G9JrPq5HzIOQKOkqbRxFnCiRIngtL6wq8WLAfQKFBwh 3SC5B0oJrSwzP1C8TzIxPi+wnwHeW6C3+Xfgy06up/GMLVLZJNNp+ogwro89Cn6e5DIkDh DCu6s0k/lMlR+QL7ewB++ualZlBcUcf+LePwEPtrO3PNU8EZU5eQZ84+BKtrZR1zy/7k3+ 63ojqVj3lbfDCxb7SLuZFZQNqI4QKKer07jV/NoKZkSpp1cAExPqL1SUuW+hn9o/czHvIP Jr284C3TFWT+JZ+QXiZ6l5hXVy9kia4I5A+7gX9XVOkeun3KkkNnbaSwKi4gJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758111565; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gQoMVt+EfjnUmLlQ094mb2B1v/UBlIvjbxL/T8mTODA=; b=yICnfwSicVNWRgWkJVgNtqoUpwsxAvk3LaZ5r5XxLScovGmQOh19es3AaIDXlIVTHr2shc uev2n1n7vkChl0QU6eDF1035mH3+Q9JNm9lJyDgHqCpPAbjs762NVatwGzl8BupfeXPayP ROiiekbXASQwC+e3FDYasUbZhgNRm6h5N2+EDm5Q3RhGOgOk6eb/3HPapXIcZ+2Ldw8UsD T/z7AUzSNC4fGd/8/YhKlPMnZB5VzCh6eG92TRym9clm7DclyhBIqzxqBG0roYYpS1QLBe tlNAP50TJ3bin2LjmUbgBO1QsPGO1noT64KYY2Q1qKu0AX6tuTvvi11G5MmOfQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758111565; a=rsa-sha256; cv=none; b=ahEVzihxnYlc0148qSMm7qdvqumgcWgEiDT5rwWrR//IrnQh+e+t2iF/tT8sUW3InzrWPU x+0bOCaFCtp5KZLCKzqMg8iTbHT1SRjc5oD5SIQosdeVv/pzVyc4JH3PQVhhRsN56qAir1 54/fPz2DBOJ92tGPPDqgVzJYP+iqZfQbMHNGBNRD3RBGwNryDzy8dPjDCkW71OlRrRAz3T C7lpgkMQOwR+B+X0DzivtnarQTMbJnaC8szWKXviQXY8tgStBrrSwswgKnwUdVKSaJMTQM nT90q7/dVaTtUceVxvw+7k5JZzJK1Ng+2RjKS63AnifJdtJ5vhbwAqcfKLCqZw== 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 4cRd9n2GsZz8wT; Wed, 17 Sep 2025 12:19: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 58HCJPUl086362; Wed, 17 Sep 2025 12:19:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58HCJPLe086359; Wed, 17 Sep 2025 12:19:25 GMT (envelope-from git) Date: Wed, 17 Sep 2025 12:19:25 GMT Message-Id: <202509171219.58HCJPLe086359@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: de4832289625 - main - stress2: Fix removal of supplementary groups List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: de4832289625f3c1cea4200d8eb7b4c753b90648 Auto-Submitted: auto-generated The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=de4832289625f3c1cea4200d8eb7b4c753b90648 commit de4832289625f3c1cea4200d8eb7b4c753b90648 Author: Olivier Certner AuthorDate: 2025-08-29 17:01:27 +0000 Commit: Olivier Certner CommitDate: 2025-09-17 12:16:09 +0000 stress2: Fix removal of supplementary groups To this end, call setgroups(0, NULL) instead of passing the effective GID. This stance is fully compatible with older versions of FreeBSD. Fixes: 9da2fe96ff2e ("kern: fix setgroups(2) and getgroups(2) to match other platforms") MFC after: 5 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D52290 --- tools/test/stress2/misc/fdatasync.sh | 2 +- tools/test/stress2/misc/fdatasync2.sh | 2 +- tools/test/stress2/misc/fifo2.sh | 2 +- tools/test/stress2/misc/ftruncate.sh | 2 +- tools/test/stress2/misc/ftruncate2.sh | 2 +- tools/test/stress2/misc/kevent7.sh | 2 +- tools/test/stress2/misc/killpg.sh | 2 +- tools/test/stress2/misc/killpg2.sh | 2 +- tools/test/stress2/misc/killpg3.sh | 2 +- tools/test/stress2/misc/maxproc.sh | 2 +- tools/test/stress2/misc/mlockall3.sh | 2 +- tools/test/stress2/misc/mlockall7.sh | 2 +- tools/test/stress2/misc/mountu.sh | 2 +- tools/test/stress2/misc/msync.sh | 2 +- tools/test/stress2/misc/pread.sh | 2 +- tools/test/stress2/misc/sched.sh | 2 +- tools/test/stress2/misc/sigreturn3.sh | 2 +- tools/test/stress2/misc/sigreturn4.sh | 2 +- tools/test/stress2/misc/syscall4.sh | 2 +- tools/test/stress2/misc/tmpfs16.sh | 2 +- 20 files changed, 20 insertions(+), 20 deletions(-) diff --git a/tools/test/stress2/misc/fdatasync.sh b/tools/test/stress2/misc/fdatasync.sh index f17e2826ad94..9abd31e5bd94 100755 --- a/tools/test/stress2/misc/fdatasync.sh +++ b/tools/test/stress2/misc/fdatasync.sh @@ -178,7 +178,7 @@ main(int argc, char **argv) if ((pw = getpwnam("nobody")) == NULL) err(1, "failed to resolve nobody"); - if (setgroups(1, &pw->pw_gid) || + if (setgroups(0, NULL) || setegid(pw->pw_gid) || setgid(pw->pw_gid) || seteuid(pw->pw_uid) || setuid(pw->pw_uid)) err(1, "Can't drop privileges to \"nobody\""); diff --git a/tools/test/stress2/misc/fdatasync2.sh b/tools/test/stress2/misc/fdatasync2.sh index 6011eba53698..42ade0cedbd3 100755 --- a/tools/test/stress2/misc/fdatasync2.sh +++ b/tools/test/stress2/misc/fdatasync2.sh @@ -177,7 +177,7 @@ main(int argc, char **argv) if ((pw = getpwnam("nobody")) == NULL) err(1, "failed to resolve nobody"); - if (setgroups(1, &pw->pw_gid) || + if (setgroups(0, NULL) || setegid(pw->pw_gid) || setgid(pw->pw_gid) || seteuid(pw->pw_uid) || setuid(pw->pw_uid)) err(1, "Can't drop privileges to \"nobody\""); diff --git a/tools/test/stress2/misc/fifo2.sh b/tools/test/stress2/misc/fifo2.sh index 4a7b986931d9..e84506cbfb01 100755 --- a/tools/test/stress2/misc/fifo2.sh +++ b/tools/test/stress2/misc/fifo2.sh @@ -167,7 +167,7 @@ main(void) if ((pw = getpwnam("nobody")) == NULL) err(1, "no such user: nobody"); - if (setgroups(1, &pw->pw_gid) || + if (setgroups(0, NULL) || setegid(pw->pw_gid) || setgid(pw->pw_gid) || seteuid(pw->pw_uid) || setuid(pw->pw_uid)) err(1, "Can't drop privileges to \"nobody\""); diff --git a/tools/test/stress2/misc/ftruncate.sh b/tools/test/stress2/misc/ftruncate.sh index ddec85b6745a..f9aa1869756f 100755 --- a/tools/test/stress2/misc/ftruncate.sh +++ b/tools/test/stress2/misc/ftruncate.sh @@ -170,7 +170,7 @@ main(int argc, char **argv) if ((pw = getpwnam("nobody")) == NULL) err(1, "failed to resolve nobody"); - if (setgroups(1, &pw->pw_gid) || + if (setgroups(0, NULL) || setegid(pw->pw_gid) || setgid(pw->pw_gid) || seteuid(pw->pw_uid) || setuid(pw->pw_uid)) err(1, "Can't drop privileges to \"nobody\""); diff --git a/tools/test/stress2/misc/ftruncate2.sh b/tools/test/stress2/misc/ftruncate2.sh index 35db3a4c5f8d..94d9b6ca810f 100755 --- a/tools/test/stress2/misc/ftruncate2.sh +++ b/tools/test/stress2/misc/ftruncate2.sh @@ -185,7 +185,7 @@ main(int argc, char **argv) if ((pw = getpwnam("nobody")) == NULL) err(1, "failed to resolve nobody"); - if (setgroups(1, &pw->pw_gid) || + if (setgroups(0, NULL) || setegid(pw->pw_gid) || setgid(pw->pw_gid) || seteuid(pw->pw_uid) || setuid(pw->pw_uid)) err(1, "Can't drop privileges to \"nobody\""); diff --git a/tools/test/stress2/misc/kevent7.sh b/tools/test/stress2/misc/kevent7.sh index 8b58c35551f7..4c7718c6ae5f 100755 --- a/tools/test/stress2/misc/kevent7.sh +++ b/tools/test/stress2/misc/kevent7.sh @@ -236,7 +236,7 @@ main(void) if ((pw = getpwnam("nobody")) == NULL) err(1, "no such user: nobody"); - if (setgroups(1, &pw->pw_gid) || + if (setgroups(0, NULL) || setegid(pw->pw_gid) || setgid(pw->pw_gid) || seteuid(pw->pw_uid) || setuid(pw->pw_uid)) err(1, "Can't drop privileges to \"nobody\""); diff --git a/tools/test/stress2/misc/killpg.sh b/tools/test/stress2/misc/killpg.sh index c6af55a3d593..ea99f5e0d0fd 100755 --- a/tools/test/stress2/misc/killpg.sh +++ b/tools/test/stress2/misc/killpg.sh @@ -113,7 +113,7 @@ killer(void) if ((pw = getpwnam("nobody")) == NULL) err(1, "no such user: nobody"); - if (setgroups(1, &pw->pw_gid) || + if (setgroups(0, NULL) || setegid(pw->pw_gid) || setgid(pw->pw_gid) || seteuid(pw->pw_uid) || setuid(pw->pw_uid)) err(1, "Can't drop privileges to \"nobody\""); diff --git a/tools/test/stress2/misc/killpg2.sh b/tools/test/stress2/misc/killpg2.sh index 5e986f059637..cf186d686dfd 100755 --- a/tools/test/stress2/misc/killpg2.sh +++ b/tools/test/stress2/misc/killpg2.sh @@ -77,7 +77,7 @@ looper(void) if ((pw = getpwnam("TUSER")) == NULL) err(1, "no such user: TUSER"); - if (setgroups(1, &pw->pw_gid) || + if (setgroups(0, NULL) || setegid(pw->pw_gid) || setgid(pw->pw_gid) || seteuid(pw->pw_uid) || setuid(pw->pw_uid)) err(1, "Can't drop privileges to \"TUSER\""); diff --git a/tools/test/stress2/misc/killpg3.sh b/tools/test/stress2/misc/killpg3.sh index 304b3e320f2f..4fcb4fa7a643 100755 --- a/tools/test/stress2/misc/killpg3.sh +++ b/tools/test/stress2/misc/killpg3.sh @@ -109,7 +109,7 @@ looper(void) if ((pw = getpwnam("TUSER")) == NULL) err(1, "no such user: TUSER"); - if (setgroups(1, &pw->pw_gid) || + if (setgroups(0, NULL) || setegid(pw->pw_gid) || setgid(pw->pw_gid) || seteuid(pw->pw_uid) || setuid(pw->pw_uid)) err(1, "Can't drop privileges to \"TUSER\""); diff --git a/tools/test/stress2/misc/maxproc.sh b/tools/test/stress2/misc/maxproc.sh index 0574def8a605..3241e275375e 100755 --- a/tools/test/stress2/misc/maxproc.sh +++ b/tools/test/stress2/misc/maxproc.sh @@ -103,7 +103,7 @@ t1(int priv) err(1, "no such user: nobody"); if (priv == 0) { - if (setgroups(1, &pw->pw_gid) || + if (setgroups(0, NULL) || setegid(pw->pw_gid) || setgid(pw->pw_gid) || seteuid(pw->pw_uid) || setuid(pw->pw_uid)) err(1, "Can't drop privileges to \"nobody\""); diff --git a/tools/test/stress2/misc/mlockall3.sh b/tools/test/stress2/misc/mlockall3.sh index 0ff1e24eaa7f..aa53e75166a5 100755 --- a/tools/test/stress2/misc/mlockall3.sh +++ b/tools/test/stress2/misc/mlockall3.sh @@ -130,7 +130,7 @@ main(void) if ((pw = getpwnam("nobody")) == NULL) err(1, "no such user: nobody"); - if (setgroups(1, &pw->pw_gid) || + if (setgroups(0, NULL) || setegid(pw->pw_gid) || setgid(pw->pw_gid) || seteuid(pw->pw_uid) || setuid(pw->pw_uid)) err(1, "Can't drop privileges to \"nobody\""); diff --git a/tools/test/stress2/misc/mlockall7.sh b/tools/test/stress2/misc/mlockall7.sh index 987e312f19e7..5a927043cb56 100755 --- a/tools/test/stress2/misc/mlockall7.sh +++ b/tools/test/stress2/misc/mlockall7.sh @@ -179,7 +179,7 @@ testing(unsigned long maxl) maxlock = maxl; if ((pw = getpwnam("nobody")) == NULL) err(1, "failed to resolve nobody"); - if (setgroups(1, &pw->pw_gid) || + if (setgroups(0, NULL) || setegid(pw->pw_gid) || setgid(pw->pw_gid) || seteuid(pw->pw_uid) || setuid(pw->pw_uid)) err(1, "Can't drop privileges to \"nobody\""); diff --git a/tools/test/stress2/misc/mountu.sh b/tools/test/stress2/misc/mountu.sh index abd3c744d160..95043e634ef1 100755 --- a/tools/test/stress2/misc/mountu.sh +++ b/tools/test/stress2/misc/mountu.sh @@ -241,7 +241,7 @@ main(int argc __unused, char **argv) if ((pw = getpwnam("nobody")) == NULL) err(1, "no such user: nobody"); - if (setgroups(1, &pw->pw_gid) || + if (setgroups(0, NULL) || setegid(pw->pw_gid) || setgid(pw->pw_gid) || seteuid(pw->pw_uid) || setuid(pw->pw_uid)) err(1, "Can't drop privileges to \"nobody\""); diff --git a/tools/test/stress2/misc/msync.sh b/tools/test/stress2/misc/msync.sh index 326c7e723774..df05875afb45 100755 --- a/tools/test/stress2/misc/msync.sh +++ b/tools/test/stress2/misc/msync.sh @@ -166,7 +166,7 @@ main(void) if ((pw = getpwnam("nobody")) == NULL) err(1, "no such user: nobody"); - if (setgroups(1, &pw->pw_gid) || + if (setgroups(0, NULL) || setegid(pw->pw_gid) || setgid(pw->pw_gid) || seteuid(pw->pw_uid) || setuid(pw->pw_uid)) err(1, "Can't drop privileges to \"nobody\""); diff --git a/tools/test/stress2/misc/pread.sh b/tools/test/stress2/misc/pread.sh index 24ee2efb696a..985d3f643df1 100755 --- a/tools/test/stress2/misc/pread.sh +++ b/tools/test/stress2/misc/pread.sh @@ -170,7 +170,7 @@ main(int argc __unused, char **argv) if ((pw = getpwnam("nobody")) == NULL) err(1, "no such user: nobody"); - if (setgroups(1, &pw->pw_gid) || + if (setgroups(0, NULL) || setegid(pw->pw_gid) || setgid(pw->pw_gid) || seteuid(pw->pw_uid) || setuid(pw->pw_uid)) err(1, "Can't drop privileges to \"nobody\""); diff --git a/tools/test/stress2/misc/sched.sh b/tools/test/stress2/misc/sched.sh index 1a1db70eb38a..8b33d7b16094 100755 --- a/tools/test/stress2/misc/sched.sh +++ b/tools/test/stress2/misc/sched.sh @@ -107,7 +107,7 @@ work(void) if ((pw = getpwnam("nobody")) == NULL) err(1, "no such user: nobody"); - if (setgroups(1, &pw->pw_gid) || + if (setgroups(0, NULL) || setegid(pw->pw_gid) || setgid(pw->pw_gid) || seteuid(pw->pw_uid) || setuid(pw->pw_uid)) err(1, "Can't drop privileges to \"nobody\""); diff --git a/tools/test/stress2/misc/sigreturn3.sh b/tools/test/stress2/misc/sigreturn3.sh index a2d865b73847..6795c4fd0846 100755 --- a/tools/test/stress2/misc/sigreturn3.sh +++ b/tools/test/stress2/misc/sigreturn3.sh @@ -121,7 +121,7 @@ main(int argc, char **argv) fprintf(stderr, "Running syscall4 as root for %s.\n", argv[1]); else { - if (setgroups(1, &pw->pw_gid) || + if (setgroups(0, NULL) || setegid(pw->pw_gid) || setgid(pw->pw_gid) || seteuid(pw->pw_uid) || setuid(pw->pw_uid)) err(1, "Can't drop privileges to \"nobody\""); diff --git a/tools/test/stress2/misc/sigreturn4.sh b/tools/test/stress2/misc/sigreturn4.sh index c77140de0518..90ee16777e03 100755 --- a/tools/test/stress2/misc/sigreturn4.sh +++ b/tools/test/stress2/misc/sigreturn4.sh @@ -147,7 +147,7 @@ main(int argc, char **argv) fprintf(stderr, "Running sigreturn4 as root for %s.\n", argv[1]); else { - if (setgroups(1, &pw->pw_gid) || + if (setgroups(0, NULL) || setegid(pw->pw_gid) || setgid(pw->pw_gid) || seteuid(pw->pw_uid) || setuid(pw->pw_uid)) err(1, "Can't drop privileges to \"nobody\""); diff --git a/tools/test/stress2/misc/syscall4.sh b/tools/test/stress2/misc/syscall4.sh index 3937d45c0303..92150c782ac1 100755 --- a/tools/test/stress2/misc/syscall4.sh +++ b/tools/test/stress2/misc/syscall4.sh @@ -318,7 +318,7 @@ main(int argc, char **argv) fprintf(stderr, "Running syscall4 as root for %s.\n", argv[1]); else { - if (setgroups(1, &pw->pw_gid) || + if (setgroups(0, NULL) || setegid(pw->pw_gid) || setgid(pw->pw_gid) || seteuid(pw->pw_uid) || setuid(pw->pw_uid)) err(1, "Can't drop privileges to \"nobody\""); diff --git a/tools/test/stress2/misc/tmpfs16.sh b/tools/test/stress2/misc/tmpfs16.sh index 8cc3c3596a4e..683817ce6497 100755 --- a/tools/test/stress2/misc/tmpfs16.sh +++ b/tools/test/stress2/misc/tmpfs16.sh @@ -181,7 +181,7 @@ main(int argc, char **argv) if ((pw = getpwnam("nobody")) == NULL) err(1, "failed to resolve nobody"); - if (setgroups(1, &pw->pw_gid) || + if (setgroups(0, NULL) || setegid(pw->pw_gid) || setgid(pw->pw_gid) || seteuid(pw->pw_uid) || setuid(pw->pw_uid)) err(1, "Can't drop privileges to \"nobody\""); From nobody Wed Sep 17 14:12:38 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cRghQ6xzpz67SNr; Wed, 17 Sep 2025 14: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 4cRghQ69mNz41pY; Wed, 17 Sep 2025 14: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=1758118358; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=adN4EcbRP++RJPJ0lTv7GEj9u9JPQU931+EuU+hfF0g=; b=CTJ/FGehMsQA7MO73SQIoHf6mnFcjFtrtgmohQ0eiQFpMeWTqWtCPcyH4YvdOLGguW7i8F dCf/v4IoKJz+2ifGYAXWSsiqWK34g0vZE2vgruziW0qjtkNCGynCOqhCfdhM8HQro+9vVM uHEbuizdAvgyN1fN4RXGaC1M+voKr16PvmpmQSmoTbuO4Khkdf0t60FrvtPocUnTJC/UiE BssN7ZeB+bWTnMY4g9kmtJXIMQ6Vf5S0TlUq5+gdqcYaOLPzsObdpt/TA++JLBdz1INJsU osjVt7u3HgDVKCTmpuUK5vT8NsXl/2SJGgBKVTvwONAh5Mx0WgGjkuN4JQ6fsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758118358; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=adN4EcbRP++RJPJ0lTv7GEj9u9JPQU931+EuU+hfF0g=; b=gn2fgP4UXZ/mwQ7J92AQcRf7BjrUqw7pYBPggPt8sFTdeabkVYVq5jBlQv1esKBtdMVVD/ Isg3wzxtBpqsnwExBZRL74yuaFie+/fQbhbOr0TMdz70G687JXT4JNS4HLFgAR+xBaPrJ5 z72w6loYcGvlW2OUc9JP6XdL5zxJ24WhkHee2hEraWfs5WbTyDyFOgDzQIWY+8DwF1/+Oe I0yO6sfWOZdG3b3IjV0Li3PAG9yA+K9YV90itVOhmdllTWOqIxh10XjbDHkwBcvFSqjeQQ Kj6HisS0sR9jy7E5Gaxi8qmmH8biNeZBfyDgJxehBkD3lN1NexakpAPahIYkvw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758118358; a=rsa-sha256; cv=none; b=EyQ4Ow/3Bzx2538j4pODLFPraq9NLKOljJbyB3AOdjm2xorEnbQE3J8Jh18Q/H682hnGhr +ptfP5baDFpnsu+F0pbcdAyCXCt9Z9f5oNYj6CvLtPeltfcbAoNzcaMc2jTZr98AsKJ26A WnJrf2lVIE45HGYd+zmdhdAX4Oebi8ze0Cqu0P11/axKnyI1tau/KvSE3fHxRMjkVw15eK l36cQCMZ+3MqtCt60AlCiQ0ElY12N1frK0T1AZ15IHkqMxCwtuaya5PXy7xGiFj7uug5xI lCELDnkzPpHg8A5u0NCjblX0yLls5FmQhVctLO35EK6BNyINSe88Ti2XD0ZDiA== 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 4cRghQ5Tc8zTJ2; Wed, 17 Sep 2025 14: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 58HECc8j009143; Wed, 17 Sep 2025 14: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 58HECcKD009140; Wed, 17 Sep 2025 14:12:38 GMT (envelope-from git) Date: Wed, 17 Sep 2025 14:12:38 GMT Message-Id: <202509171412.58HECcKD009140@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: 3d14cc82d7a8 - main - sdp(3): Change bdaddr parameter type in sdp_register_service() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3d14cc82d7a8c11cd164a6ba668d20b939c576fe Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=3d14cc82d7a8c11cd164a6ba668d20b939c576fe commit 3d14cc82d7a8c11cd164a6ba668d20b939c576fe Author: Christos Margiolis AuthorDate: 2025-09-17 14:12:03 +0000 Commit: Christos Margiolis CommitDate: 2025-09-17 14:12:03 +0000 sdp(3): Change bdaddr parameter type in sdp_register_service() Fixes compiler error when the caller passes a const bdaddr_t * paramemeter (e.g., NG_HCI_BDADDR_ANY). Sponsored by: The FreeBSD Foundation MFC after: 1 day Reviewed by: markj, emaste Differential Revision: https://reviews.freebsd.org/D52582 --- lib/libsdp/sdp.3 | 4 ++-- lib/libsdp/sdp.h | 2 +- lib/libsdp/service.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/libsdp/sdp.3 b/lib/libsdp/sdp.3 index dcd9077798ea..015f9cd8fb44 100644 --- a/lib/libsdp/sdp.3 +++ b/lib/libsdp/sdp.3 @@ -24,7 +24,7 @@ .\" .\" $Id: sdp.3,v 1.1 2003/09/07 20:34:19 max Exp $ .\" -.Dd April 30, 2018 +.Dd September 16, 2025 .Dt SDP 3 .Os .Sh NAME @@ -87,7 +87,7 @@ .Fn sdp_uuid2desc "uint16_t uuid" .Ft int32_t .Fo sdp_register_service -.Fa "void *xss" "uint16_t uuid" "bdaddr_p const bdaddr" "uint8_t const *data" +.Fa "void *xss" "uint16_t uuid" "const bdaddr_t *bdaddr" "uint8_t const *data" .Fa "uint32_t datalen" "uint32_t *handle" .Fc .Ft int32_t diff --git a/lib/libsdp/sdp.h b/lib/libsdp/sdp.h index faad36aefca6..0c9474a70eff 100644 --- a/lib/libsdp/sdp.h +++ b/lib/libsdp/sdp.h @@ -702,7 +702,7 @@ typedef struct sdp_panu_profile sdp_panu_profile_t; typedef struct sdp_panu_profile * sdp_panu_profile_p; int32_t sdp_register_service (void *xss, uint16_t uuid, - bdaddr_p const bdaddr, uint8_t const *data, + const bdaddr_t *bdaddr, uint8_t const *data, uint32_t datalen, uint32_t *handle); int32_t sdp_unregister_service (void *xss, uint32_t handle); int32_t sdp_change_service (void *xss, uint32_t handle, diff --git a/lib/libsdp/service.c b/lib/libsdp/service.c index 9f07d1ba86ba..2cce6c133600 100644 --- a/lib/libsdp/service.c +++ b/lib/libsdp/service.c @@ -45,7 +45,7 @@ static int32_t sdp_receive_error_pdu(sdp_session_p ss); int32_t -sdp_register_service(void *xss, uint16_t uuid, bdaddr_p const bdaddr, +sdp_register_service(void *xss, uint16_t uuid, const bdaddr_t *bdaddr, uint8_t const *data, uint32_t datalen, uint32_t *handle) { sdp_session_p ss = (sdp_session_p) xss; From nobody Wed Sep 17 14:15:39 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cRglv4Qfxz67ScB; Wed, 17 Sep 2025 14:15: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 4cRglv4C4Wz4485; Wed, 17 Sep 2025 14:15:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758118539; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OPKAj5onG4oumD/QL70yfix6Lq3aV99Lywa8FvvhtEw=; b=wYDx2nLTQ4i7fJwiT/G2aWsc0uCn0wqmyNJ9+HUCCTpte4xNM4Vp8y0bfR1pHPG1k3VqJm 572m1y/D4lQI+QDB3hGMiKi4+PnIM+zTSwnGRWYjyPGOyxTmMp6CBng08aigE2nfvKcuvO fkzzvM7WllJA+FJ9Q9MY5B4Z/WZfXu93rBZ7AZHnCbgFo87klySQ3VvEDCyTuTL6jGMqJO oA834ROnsWPjjTl80TBwEm5O3cYXRMXgJ399ARnMnKRq06SFB2A3NVeppuqvKnLF4/cUev wBCoQG7+SNleptMYjf7xi6tWE9dBxpNlVGQJ6is73MJFubzwP7tqaij6Dq+Tvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758118539; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OPKAj5onG4oumD/QL70yfix6Lq3aV99Lywa8FvvhtEw=; b=FNWTtbF2zC2hQAwn15eUNObsoyATymsjkECROJ7JBCtuddpms2zZVVs/IqtGeBc0m1hv15 Ud0aUwzDbZNMv5iiXmgbjQX8dHAZh8ZZltgR1wqfUz5OnqKuzVNyjXjOZnfIwJwW2YIDIV 88QqcQisHJtMMzYbvd2gWjlsQ0SjStEiMtWzjlDl6uSaIbw3AVB7ryyWztZSOB4+S/K6Ho fve21D06IymWUk1ngMXYgPYOeYsf9G6B3oFuFQyu85vHr23rRMAfaFM9gYe2xWN+7mq0XX MJXhDBEyfO0UHDcoSo8F/FkdX7xhJ7Ml0yHvHHViwS0tHr+8LR4wHqUJIUgE0g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758118539; a=rsa-sha256; cv=none; b=aQlcEcrCwq1P7Lee28o8R3N35svcUKdjwrSCkvU8hnVfzY5Va3zBpJPjGxOsqEidmbloVN +qosTHFWRkq6n44QagJLaK3PzbIlSngd6I5uslbRBEa6vbB7HotzFqsnfo0o2Imua6tF0N cUCAEvgX61FefT+fyYvOxUCoHcNvQz2qqhYZxHRx9kK5KCg0k/Lk5JTd+d/waVtMuS8fsv 9U0j+H5i/i7ZyVAA53MkiL+Le4eFggue8M+rgV0OApogIumqspNLouvAp9ZI9u0msjhh/f tMFWsTJrY5mJg61hy5gh9sJXJZXuqzmZSYLcrfnGiIuNw8jZDbqx+u6p8X/kaA== 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 4cRglv3SPNzTZs; Wed, 17 Sep 2025 14:15: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 58HEFdER010143; Wed, 17 Sep 2025 14:15:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58HEFdN0010140; Wed, 17 Sep 2025 14:15:39 GMT (envelope-from git) Date: Wed, 17 Sep 2025 14:15:39 GMT Message-Id: <202509171415.58HEFdN0010140@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 9dfc5e03da50 - main - pfctl: allow tables to be defined inside anchors List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9dfc5e03da50d12f02c2b481139acf9f089d504f Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=9dfc5e03da50d12f02c2b481139acf9f089d504f commit 9dfc5e03da50d12f02c2b481139acf9f089d504f Author: Kristof Provost AuthorDate: 2025-08-22 11:34:39 +0000 Commit: Kristof Provost CommitDate: 2025-09-17 14:15:13 +0000 pfctl: allow tables to be defined inside anchors This change allows user to define table inside the anchor like that: anchor foo { table { 192.168.1.1 } pass in from to } Without this diff one must either create table in main ruleset (root) or use 'pfctl -a foo -t bar -T add 192.168.1.1' This glitch is hard to notice. Not many human admins try to attach tables to non-global anchors. Deamons which configure pf(4) automatically at run time such as relayd(8) and spamd(8) create tables attached to thair anchors (for example 'relayd/*') but the deamons use way similar to pfctl(8) to add and manage those tables. The reason why I'd like to seal this gap is that my long term goal is to turn global `pfr_ktable` in pf(4) into member of pf_anchor. So each ruleset will get its own tree of tables. feedback and OK bluhm@ Obtained from: OpenBSD, sashan , 30269bc362 Sponsored by: Rubicon Communications, LLC ("Netgate") --- sbin/pfctl/parse.y | 104 ++++++++++++++++++++++++++++++++++++++++++-- sbin/pfctl/pfctl.c | 52 +++++++++++++++++++--- sbin/pfctl/pfctl.h | 41 +++++++++++++++++ sbin/pfctl/pfctl_optimize.c | 3 +- sbin/pfctl/pfctl_parser.h | 12 ++++- sbin/pfctl/pfctl_radix.c | 15 +++++++ sbin/pfctl/pfctl_table.c | 51 +++++++++++++++++----- 7 files changed, 256 insertions(+), 22 deletions(-) diff --git a/sbin/pfctl/parse.y b/sbin/pfctl/parse.y index 46e9f60fe48e..0628b387b4b3 100644 --- a/sbin/pfctl/parse.y +++ b/sbin/pfctl/parse.y @@ -420,6 +420,8 @@ int rt_tableid_max(void); void mv_rules(struct pfctl_ruleset *, struct pfctl_ruleset *); void mv_eth_rules(struct pfctl_eth_ruleset *, struct pfctl_eth_ruleset *); +void mv_tables(struct pfctl *, struct pfr_ktablehead *, + struct pfctl_anchor *, struct pfctl_anchor *); void decide_address_family(struct node_host *, sa_family_t *); void remove_invalid_hosts(struct node_host **, sa_family_t *); int invalid_redirect(struct node_host *, sa_family_t); @@ -949,6 +951,7 @@ anchorname : STRING { pfa_anchorlist : /* empty */ | pfa_anchorlist '\n' + | pfa_anchorlist tabledef '\n' | pfa_anchorlist pfrule '\n' | pfa_anchorlist anchorrule '\n' | pfa_anchorlist include '\n' @@ -974,7 +977,7 @@ pfa_anchor : '{' snprintf(ta, PF_ANCHOR_NAME_SIZE, "_%d", pf->bn); rs = pf_find_or_create_ruleset(ta); if (rs == NULL) - err(1, "pfa_anchor: pf_find_or_create_ruleset"); + err(1, "pfa_anchor: pf_find_or_create_ruleset (%s)", ta); pf->astack[pf->asd] = rs->anchor; pf->anchor = rs->anchor; } '\n' pfa_anchorlist '}' @@ -1026,6 +1029,7 @@ anchorrule : ANCHOR anchorname dir quick interface af proto fromto } mv_rules(&pf->alast->ruleset, &r.anchor->ruleset); + mv_tables(pf, &pfr_ktables, r.anchor, pf->alast); } pf_remove_if_empty_ruleset(&pf->alast->ruleset); pf->alast = r.anchor; @@ -5456,6 +5460,7 @@ process_tabledef(char *name, struct table_opts *opts, int popts) { struct pfr_buffer ab; struct node_tinit *ti; + struct pfr_uktable *ukt; unsigned long maxcount; size_t s = sizeof(maxcount); @@ -5488,9 +5493,23 @@ process_tabledef(char *name, struct table_opts *opts, int popts) else if (pf->opts & PF_OPT_VERBOSE) fprintf(stderr, "%s:%d: skipping duplicate table checks" " for <%s>\n", file->name, yylval.lineno, name); + /* + * postpone definition of non-root tables to moment + * when path is fully resolved. + */ + if (pf->asd > 0) { + ukt = calloc(1, sizeof(struct pfr_uktable)); + if (ukt == NULL) { + DBGPRINT( + "%s:%d: not enough memory for <%s>\n", file->name, + yylval.lineno, name); + goto _error; + } + } else + ukt = NULL; if (!(pf->opts & PF_OPT_NOACTION) && pfctl_define_table(name, opts->flags, opts->init_addr, - pf->anchor->path, &ab, pf->anchor->ruleset.tticket)) { + pf->anchor->path, &ab, pf->anchor->ruleset.tticket, ukt)) { if (sysctlbyname("net.pf.request_maxcount", &maxcount, &s, NULL, 0) == -1) @@ -5506,6 +5525,28 @@ process_tabledef(char *name, struct table_opts *opts, int popts) goto _error; } + + if (ukt != NULL) { + ukt->pfrukt_init_addr = opts->init_addr; + if (RB_INSERT(pfr_ktablehead, &pfr_ktables, + &ukt->pfrukt_kt) != NULL) { + /* + * I think this should not happen, because + * pfctl_define_table() above does the same check + * effectively. + */ + DBGPRINT( + "%s:%d table %s already exists in %s\n", + file->name, yylval.lineno, + ukt->pfrukt_name, pf->anchor->path); + free(ukt); + goto _error; + } + DBGPRINT("%s %s@%s inserted to tree\n", + __func__, ukt->pfrukt_name, pf->anchor->path); + } else + DBGPRINT("%s ukt is null\n", __func__); + pf->tdirty = 1; pfr_buf_clear(&ab); return (0); @@ -7276,6 +7317,61 @@ mv_eth_rules(struct pfctl_eth_ruleset *src, struct pfctl_eth_ruleset *dst) src->anchor->match = 0; } +void +mv_tables(struct pfctl *pf, struct pfr_ktablehead *ktables, + struct pfctl_anchor *a, struct pfctl_anchor *alast) +{ + struct pfr_ktable *kt, *kt_safe; + char new_path[PF_ANCHOR_MAXPATH]; + char *path_cut; + int sz; + struct pfr_uktable *ukt; + SLIST_HEAD(, pfr_uktable) ukt_list; + + /* + * Here we need to rename anchor path from temporal names such as + * _1/_2/foo to _1/bar/foo etc. + * + * This also means we need to remove and insert table to ktables + * tree as anchor path is being updated. + */ + SLIST_INIT(&ukt_list); + DBGPRINT("%s [ %s ] (%s)\n", __func__, a->path, alast->path); + RB_FOREACH_SAFE(kt, pfr_ktablehead, ktables, kt_safe) { + path_cut = strstr(kt->pfrkt_anchor, alast->path); + if (path_cut != NULL) { + path_cut += strlen(alast->path); + if (*path_cut) + sz = snprintf(new_path, sizeof (new_path), + "%s%s", a->path, path_cut); + else + sz = snprintf(new_path, sizeof (new_path), + "%s", a->path); + if (sz >= sizeof (new_path)) + errx(1, "new path is too long for %s@%s\n", + kt->pfrkt_name, kt->pfrkt_anchor); + + DBGPRINT("%s %s@%s -> %s@%s\n", __func__, + kt->pfrkt_name, kt->pfrkt_anchor, + kt->pfrkt_name, new_path); + RB_REMOVE(pfr_ktablehead, ktables, kt); + strlcpy(kt->pfrkt_anchor, new_path, + sizeof(kt->pfrkt_anchor)); + SLIST_INSERT_HEAD(&ukt_list, (struct pfr_uktable *)kt, + pfrukt_entry); + } + } + + while ((ukt = SLIST_FIRST(&ukt_list)) != NULL) { + SLIST_REMOVE_HEAD(&ukt_list, pfrukt_entry); + if (RB_INSERT(pfr_ktablehead, ktables, + (struct pfr_ktable *)ukt) != NULL) + errx(1, "%s@%s exists already\n", + ukt->pfrukt_name, + ukt->pfrukt_anchor); + } +} + void decide_address_family(struct node_host *n, sa_family_t *af) { @@ -7485,7 +7581,7 @@ parseport(char *port, struct range *r, int extensions) } int -pfctl_load_anchors(int dev, struct pfctl *pf, struct pfr_buffer *trans) +pfctl_load_anchors(int dev, struct pfctl *pf) { struct loadanchors *la; @@ -7494,7 +7590,7 @@ pfctl_load_anchors(int dev, struct pfctl *pf, struct pfr_buffer *trans) fprintf(stderr, "\nLoading anchor %s from %s\n", la->anchorname, la->filename); if (pfctl_rules(dev, la->filename, pf->opts, pf->optimize, - la->anchorname, trans) == -1) + la->anchorname, pf->trans) == -1) return (-1); } diff --git a/sbin/pfctl/pfctl.c b/sbin/pfctl/pfctl.c index 2c12387ee388..601b7651e40b 100644 --- a/sbin/pfctl/pfctl.c +++ b/sbin/pfctl/pfctl.c @@ -2065,6 +2065,41 @@ pfctl_load_eth_rule(struct pfctl *pf, char *path, struct pfctl_eth_rule *r, return (0); } +static int +pfctl_load_tables(struct pfctl *pf, char *path, struct pfctl_anchor *a, + int rs_num) +{ + struct pfr_ktable *kt, *ktw; + struct pfr_uktable *ukt; + char anchor_path[PF_ANCHOR_MAXPATH]; + int e; + + RB_FOREACH_SAFE(kt, pfr_ktablehead, &pfr_ktables, ktw) { + if (strcmp(kt->pfrkt_anchor, a->path) != 0) + continue; + + if (path != NULL && *path) { + strlcpy(anchor_path, kt->pfrkt_anchor, + sizeof(anchor_path)); + snprintf(kt->pfrkt_anchor, PF_ANCHOR_MAXPATH, "%s/%s", + path, anchor_path); + } + ukt = (struct pfr_uktable *)kt; + e = pfr_ina_define(&ukt->pfrukt_t, ukt->pfrukt_addrs.pfrb_caddr, + ukt->pfrukt_addrs.pfrb_size, NULL, NULL, + pf->anchor->ruleset.tticket, + ukt->pfrukt_init_addr ? PFR_FLAG_ADDRSTOO : 0); + if (e != 0) + err(1, "%s pfr_ina_define() %s@%s", __func__, + kt->pfrkt_name, kt->pfrkt_anchor); + RB_REMOVE(pfr_ktablehead, &pfr_ktables, kt); + pfr_buf_clear(&ukt->pfrukt_addrs); + free(ukt); + } + + return (0); +} + int pfctl_load_ruleset(struct pfctl *pf, char *path, struct pfctl_ruleset *rs, int rs_num, int depth) @@ -2113,6 +2148,8 @@ pfctl_load_ruleset(struct pfctl *pf, char *path, struct pfctl_ruleset *rs, if ((error = pfctl_load_ruleset(pf, path, &r->anchor->ruleset, rs_num, depth + 1))) goto error; + if ((error = pfctl_load_tables(pf, path, r->anchor, rs_num))) + goto error; } else if (pf->opts & PF_OPT_VERBOSE) printf("\n"); free(r); @@ -2135,15 +2172,17 @@ pfctl_load_rule(struct pfctl *pf, char *path, struct pfctl_rule *r, int depth) { u_int8_t rs_num = pf_get_ruleset_number(r->action); char *name; - u_int32_t ticket; char anchor[PF_ANCHOR_NAME_SIZE]; int len = strlen(path); int error; bool was_present; /* set up anchor before adding to path for anchor_call */ - if ((pf->opts & PF_OPT_NOACTION) == 0) - ticket = pfctl_get_ticket(pf->trans, rs_num, path); + if ((pf->opts & PF_OPT_NOACTION) == 0) { + if (pf->trans == NULL) + errx(1, "pfctl_load_rule: no transaction"); + pf->anchor->ruleset.tticket = pfctl_get_ticket(pf->trans, rs_num, path); + } if (strlcpy(anchor, path, sizeof(anchor)) >= sizeof(anchor)) errx(1, "pfctl_load_rule: strlcpy"); @@ -2175,7 +2214,7 @@ pfctl_load_rule(struct pfctl *pf, char *path, struct pfctl_rule *r, int depth) return (1); if (pfctl_add_pool(pf, &r->route, PF_RT)) return (1); - error = pfctl_add_rule_h(pf->h, r, anchor, name, ticket, + error = pfctl_add_rule_h(pf->h, r, anchor, name, pf->anchor->ruleset.tticket, pf->paddr.ticket); switch (error) { case 0: @@ -2245,6 +2284,8 @@ pfctl_rules(int dev, char *filename, int opts, int optimize, RB_INIT(&pf_anchors); memset(&pf_main_anchor, 0, sizeof(pf_main_anchor)); pf_init_ruleset(&pf_main_anchor.ruleset); + memset(&pf, 0, sizeof(pf)); + memset(&trs, 0, sizeof(trs)); pf_main_anchor.ruleset.anchor = &pf_main_anchor; memset(&pf_eth_main_anchor, 0, sizeof(pf_eth_main_anchor)); @@ -2254,6 +2295,7 @@ pfctl_rules(int dev, char *filename, int opts, int optimize, if (trans == NULL) { bzero(&buf, sizeof(buf)); buf.pfrb_type = PFRB_TRANS; + pf.trans = &buf; t = &buf; osize = 0; } else { @@ -2364,7 +2406,7 @@ pfctl_rules(int dev, char *filename, int opts, int optimize, if (trans == NULL) { /* process "load anchor" directives */ - if (pfctl_load_anchors(dev, &pf, t) == -1) + if (pfctl_load_anchors(dev, &pf) == -1) ERRX("load anchors"); if ((opts & PF_OPT_NOACTION) == 0) { diff --git a/sbin/pfctl/pfctl.h b/sbin/pfctl/pfctl.h index 37e06e93dde6..136f51ea08f9 100644 --- a/sbin/pfctl/pfctl.h +++ b/sbin/pfctl/pfctl.h @@ -36,6 +36,12 @@ #include +#ifdef PFCTL_DEBUG +#define DBGPRINT(...) fprintf(stderr, __VA_ARGS__) +#else +#define DBGPRINT(...) (void)(0) +#endif + extern struct pfctl_handle *pfh; struct pfctl; @@ -55,6 +61,41 @@ struct pfr_buffer { (var) != NULL; \ (var) = pfr_buf_next((buf), (var))) +RB_HEAD(pfr_ktablehead, pfr_ktable); +struct pfr_ktable { + struct pfr_tstats pfrkt_ts; + RB_ENTRY(pfr_ktable) pfrkt_tree; + SLIST_ENTRY(pfr_ktable) pfrkt_workq; + struct radix_node_head *pfrkt_ip4; + struct radix_node_head *pfrkt_ip6; + struct pfr_ktable *pfrkt_shadow; + struct pfr_ktable *pfrkt_root; + struct pf_kruleset *pfrkt_rs; + long pfrkt_larg; + int pfrkt_nflags; +}; +#define pfrkt_t pfrkt_ts.pfrts_t +#define pfrkt_name pfrkt_t.pfrt_name +#define pfrkt_anchor pfrkt_t.pfrt_anchor +#define pfrkt_ruleset pfrkt_t.pfrt_ruleset +#define pfrkt_flags pfrkt_t.pfrt_flags +#define pfrkt_cnt pfrkt_kts.pfrkts_cnt +#define pfrkt_refcnt pfrkt_kts.pfrkts_refcnt +#define pfrkt_tzero pfrkt_kts.pfrkts_tzero + +struct pfr_uktable { + struct pfr_ktable pfrukt_kt; + struct pfr_buffer pfrukt_addrs; + int pfrukt_init_addr; + SLIST_ENTRY(pfr_uktable) pfrukt_entry; +}; + +#define pfrukt_t pfrukt_kt.pfrkt_ts.pfrts_t +#define pfrukt_name pfrukt_kt.pfrkt_t.pfrt_name +#define pfrukt_anchor pfrukt_kt.pfrkt_t.pfrt_anchor + +extern struct pfr_ktablehead pfr_ktables; + struct pfr_anchoritem { SLIST_ENTRY(pfr_anchoritem) pfra_sle; char *pfra_anchorname; diff --git a/sbin/pfctl/pfctl_optimize.c b/sbin/pfctl/pfctl_optimize.c index 1d2a60555f19..2d16bbd22b39 100644 --- a/sbin/pfctl/pfctl_optimize.c +++ b/sbin/pfctl/pfctl_optimize.c @@ -1331,7 +1331,8 @@ again: if (pfctl_define_table(tbl->pt_name, PFR_TFLAG_CONST, 1, - pf->astack[0]->path, tbl->pt_buf, pf->astack[0]->ruleset.tticket)) { + pf->astack[0]->path, tbl->pt_buf, pf->astack[0]->ruleset.tticket, + NULL)) { warn("failed to create table %s in %s", tbl->pt_name, pf->astack[0]->name); return (1); diff --git a/sbin/pfctl/pfctl_parser.h b/sbin/pfctl/pfctl_parser.h index 58d3abc36691..e96ff0195e03 100644 --- a/sbin/pfctl/pfctl_parser.h +++ b/sbin/pfctl/pfctl_parser.h @@ -36,6 +36,8 @@ #include +#include + #define PF_OSFP_FILE "/etc/pf.os" #define PF_OPT_DISABLE 0x00001 @@ -90,6 +92,7 @@ struct pfctl { struct pfioc_queue *pqueue; struct pfr_buffer *trans; struct pfctl_anchor *anchor, *alast; + struct pfr_ktablehead pfr_ktlast; int eth_nr; struct pfctl_eth_anchor *eanchor, *ealast; struct pfctl_eth_anchor *eastack[PFCTL_ANCHOR_STACK_DEPTH]; @@ -277,6 +280,8 @@ struct pf_opt_rule { TAILQ_HEAD(pf_opt_queue, pf_opt_rule); +struct pfr_uktable; + void copy_satopfaddr(struct pf_addr *, struct sockaddr *); int pfctl_rules(int, char *, int, int, char *, struct pfr_buffer *); @@ -303,7 +308,7 @@ int pfctl_cfg_syncookies(struct pfctl *, uint8_t, struct pfctl_watermarks *); int parse_config(char *, struct pfctl *); int parse_flags(char *); -int pfctl_load_anchors(int, struct pfctl *, struct pfr_buffer *); +int pfctl_load_anchors(int, struct pfctl *); void print_pool(struct pfctl_pool *, u_int16_t, u_int16_t, int); void print_src_node(struct pfctl_src_node *, int); @@ -324,7 +329,7 @@ void print_queue(const struct pf_altq *, unsigned, struct node_queue_bw *, int, struct node_queue_opt *); int pfctl_define_table(char *, int, int, const char *, struct pfr_buffer *, - u_int32_t); + u_int32_t, struct pfr_uktable *); void pfctl_clear_fingerprints(int, int); int pfctl_file_fingerprints(int, int, const char *); @@ -380,5 +385,8 @@ struct node_host *host(const char *, int); int append_addr(struct pfr_buffer *, char *, int, int); int append_addr_host(struct pfr_buffer *, struct node_host *, int, int); +int pfr_ktable_compare(struct pfr_ktable *, + struct pfr_ktable *); +RB_PROTOTYPE(pfr_ktablehead, pfr_ktable, pfrkt_tree, pfr_ktable_compare); #endif /* _PFCTL_PARSER_H_ */ diff --git a/sbin/pfctl/pfctl_radix.c b/sbin/pfctl/pfctl_radix.c index 398c5e998330..98f907738d95 100644 --- a/sbin/pfctl/pfctl_radix.c +++ b/sbin/pfctl/pfctl_radix.c @@ -48,6 +48,7 @@ #include #include "pfctl.h" +#include "pfctl_parser.h" #define BUF_SIZE 256 @@ -55,6 +56,19 @@ extern int dev; static int pfr_next_token(char buf[BUF_SIZE], FILE *); +struct pfr_ktablehead pfr_ktables = { 0 }; +RB_GENERATE(pfr_ktablehead, pfr_ktable, pfrkt_tree, pfr_ktable_compare); + +int +pfr_ktable_compare(struct pfr_ktable *p, struct pfr_ktable *q) +{ + int d; + + if ((d = strncmp(p->pfrkt_name, q->pfrkt_name, PF_TABLE_NAME_SIZE))) + return (d); + return (strcmp(p->pfrkt_anchor, q->pfrkt_anchor)); +} + static void pfr_report_error(struct pfr_table *tbl, struct pfioc_table *io, const char *err) @@ -256,6 +270,7 @@ pfr_ina_define(struct pfr_table *tbl, struct pfr_addr *addr, int size, struct pfioc_table io; if (tbl == NULL || size < 0 || (size && addr == NULL)) { + DBGPRINT("%s %p %d %p\n", __func__, tbl, size, addr); errno = EINVAL; return (-1); } diff --git a/sbin/pfctl/pfctl_table.c b/sbin/pfctl/pfctl_table.c index 745ab84b3159..4955e1791fd7 100644 --- a/sbin/pfctl/pfctl_table.c +++ b/sbin/pfctl/pfctl_table.c @@ -570,19 +570,50 @@ print_astats(struct pfr_astats *as, int dns) int pfctl_define_table(char *name, int flags, int addrs, const char *anchor, - struct pfr_buffer *ab, u_int32_t ticket) + struct pfr_buffer *ab, u_int32_t ticket, struct pfr_uktable *ukt) { - struct pfr_table tbl; + struct pfr_table tbl_buf; + struct pfr_table *tbl; + + if (ukt == NULL) { + bzero(&tbl_buf, sizeof(tbl_buf)); + tbl = &tbl_buf; + } else { + if (ab->pfrb_size != 0) { + /* + * copy IP addresses which come with table from + * temporal buffer to buffer attached to table. + */ + ukt->pfrukt_addrs = *ab; + ab->pfrb_size = 0; + ab->pfrb_msize = 0; + ab->pfrb_caddr = NULL; + } else + memset(&ukt->pfrukt_addrs, 0, + sizeof(struct pfr_buffer)); + + tbl = &ukt->pfrukt_t; + } - bzero(&tbl, sizeof(tbl)); - if (strlcpy(tbl.pfrt_name, name, sizeof(tbl.pfrt_name)) >= - sizeof(tbl.pfrt_name) || strlcpy(tbl.pfrt_anchor, anchor, - sizeof(tbl.pfrt_anchor)) >= sizeof(tbl.pfrt_anchor)) - errx(1, "pfctl_define_table: strlcpy"); - tbl.pfrt_flags = flags; + if (strlcpy(tbl->pfrt_name, name, sizeof(tbl->pfrt_name)) >= + sizeof(tbl->pfrt_name) || + strlcpy(tbl->pfrt_anchor, anchor, sizeof(tbl->pfrt_anchor)) >= + sizeof(tbl->pfrt_anchor)) + errx(1, "%s: strlcpy", __func__); + tbl->pfrt_flags = flags; + DBGPRINT("%s %s@%s [%x]\n", __func__, tbl->pfrt_name, tbl->pfrt_anchor, + tbl->pfrt_flags); + + /* + * non-root anchors processed by parse.y are loaded to kernel later. + * Here we load tables, which are either created for root anchor + * or by 'pfctl -t ... -T ...' command. + */ + if (ukt != NULL) + return (0); - return pfr_ina_define(&tbl, ab->pfrb_caddr, ab->pfrb_size, NULL, - NULL, ticket, addrs ? PFR_FLAG_ADDRSTOO : 0); + return (pfr_ina_define(tbl, ab->pfrb_caddr, ab->pfrb_size, NULL, NULL, + ticket, addrs ? PFR_FLAG_ADDRSTOO : 0)); } void From nobody Wed Sep 17 14:15:40 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cRglw66Ymz67SjQ; Wed, 17 Sep 2025 14:15: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 4cRglw4n3wz448C; Wed, 17 Sep 2025 14:15:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758118540; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7kpNpPo9G5Ln7iEvamLirM3DYLY/WZS03wRq3gDGLYo=; b=MYXTvKozqDd7bQ62gRTHNzuH4CZc0ipm3FMgeRzQqaJKuKTDYjb7PFk5TRQGw0ckrn5rRC Vv9QTvoz07R3FFPFwirhUOlI8lYJHVwvVsszdvyK3VcHAS1u8Z67ZUbYMUN8ihkQQNFX6Q 71fk9EiZwGVMzj10T9IaLWTcA2RC7g2lTW4lyX0qgPSLeD5PYuZyLtAgabetjBWGfm++uq x6YfWy8eQ9mebf7DrF/kPQ3ZMW7W6GQkcWqmkUqjl4nnhunH47YqC0f+Sjn3uLH6I6rTBi Hf/LRceM1n5WP5T+mndJDxOxBnCtoOXHR/InCMEDheCIF1wsAgYOuwuqN1PExw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758118540; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7kpNpPo9G5Ln7iEvamLirM3DYLY/WZS03wRq3gDGLYo=; b=czdT4aoyiZ7rKro+TtIPciLPQBEePwEVdWCyRhacBGTFtrcIIv6ncI9aH3od54oWrzurff 1b3XSA1dIZwpb18Ah9B2jroGxyGrLu9Z1CFg48i0iko5j0wgm5Q1kivLtU+URp/PcDa5Zt Pn5nxq3bO0OMrKw37wlXKGeWvQmtlIhEJvFW1c+XQmyX58Q+eVN+fNMJMjraajC/AgmlQh Z5ziBq0S40E+UvnoI4VpwD0JscslN2UAVRHJc6wdObIyXQZ01JFrLy3dJTGMdt98PjWSpM 81ERdEph/SNfR7CiDlrGqTsHbjceJtHf5s9QcaB1H+wGcKQTwgNLg2g5EMaG/w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758118540; a=rsa-sha256; cv=none; b=Uqyh3O+rec0Jn03M2Epvqo0w2Lis5XXy3vE84sNwB5TVme2wQiALKV0g4FWaRy/0cWTgH/ NM5ZKDgTY78CUcyVwtIBdVLzQI8/fEsrOb+hJVJ+GbaV/qzc2quaG1aI21Z51LgMQnHzYo uQRPNymP2pXr6dolEUj3OSfMhEofQ+GQS5foLwC72GzUT6cCYupjKSqy5USdrvXmHm0FPB M8DQ75/Ek0+qNCcPUp/olsySZvNipzkLAqGsj0AWrEsbpfHZHnbBc6Vz9HVpXpDlXa/HCX tt97+RrVhZUV0cXWgkJlbIaZ94lmJTlTth9kTKANa6CTOBLMNzH6MxgEgdBqPw== 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 4cRglw4GXjzTTJ; Wed, 17 Sep 2025 14:15: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 58HEFekI010177; Wed, 17 Sep 2025 14:15:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58HEFeG2010174; Wed, 17 Sep 2025 14:15:40 GMT (envelope-from git) Date: Wed, 17 Sep 2025 14:15:40 GMT Message-Id: <202509171415.58HEFeG2010174@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 26c373aa367c - main - pf tests: declare a table inside an anchor List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 26c373aa367c71394f0734af368974cafcf878d0 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=26c373aa367c71394f0734af368974cafcf878d0 commit 26c373aa367c71394f0734af368974cafcf878d0 Author: Kristof Provost AuthorDate: 2025-08-22 15:34:29 +0000 Commit: Kristof Provost CommitDate: 2025-09-17 14:15:14 +0000 pf tests: declare a table inside an anchor Sponsored by: Rubicon Communications, LLC ("Netgate") --- tests/sys/netpfil/pf/table.sh | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/tests/sys/netpfil/pf/table.sh b/tests/sys/netpfil/pf/table.sh index 26fc5bf6cda2..69fe12fc9804 100644 --- a/tests/sys/netpfil/pf/table.sh +++ b/tests/sys/netpfil/pf/table.sh @@ -710,6 +710,43 @@ show_recursive_cleanup() pft_cleanup } +atf_test_case "in_anchor" "cleanup" +in_anchor_head() +{ + atf_set descr 'Test declaring tables in anchors' + atf_set require.user root +} + +in_anchor_body() +{ + pft_init + + epair_send=$(vnet_mkepair) + ifconfig ${epair_send}a 192.0.2.1/24 up + + vnet_mkjail alcatraz ${epair_send}b + jexec alcatraz ifconfig ${epair_send}b 192.0.2.2/24 up + + jexec alcatraz pfctl -e + + pft_set_rules alcatraz \ + "block all" \ + "anchor \"foo\" {\n + table counters { 192.0.2.1 }\n + pass in from \n + }\n" + + atf_check -s exit:0 -o ignore ping -c 3 192.0.2.2 + + jexec alcatraz pfctl -sr -a "*" -vv + jexec alcatraz pfctl -sT -a "*" -vv +} + +in_anchor_cleanup() +{ + pft_cleanup +} + atf_init_test_cases() { atf_add_test_case "v4_counters" @@ -727,4 +764,5 @@ atf_init_test_cases() atf_add_test_case "flush" atf_add_test_case "large" atf_add_test_case "show_recursive" + atf_add_test_case "in_anchor" } From nobody Wed Sep 17 14:15:41 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cRglx6Z7lz67SQt; Wed, 17 Sep 2025 14:15: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 4cRglx53Lqz44Jq; Wed, 17 Sep 2025 14:15:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758118541; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GlycE29InmmlL9sx49ZL06zm0ZGXgmoEWn8api7I+xk=; b=lov8VPtB+IydRV4BVTTRsy7Vfv/ptRfGKj+no6ZzP0lkAPn4jr1orDGuzoNqBpavYbePpH 6PqiCGfbP+ldfmYhMGhGBOm7eaXIgw7x60wlp6i0bAwqXhqLXnhAMBc8qQf/vm5OvQ5j/K EGA+2ZI/1Z0hHkJjvGOWftMNagb83sAN+SJ+YtFGc+m5vgDGm3xDHzLec1HEkVsdgkd0SE H1QFJFVKkiOWBN4oPwTDhgfVCn3tp7c7hkMcWM04yXpeNAGxvQ4eFIG6zSy/0qV3QsAoWO EU/tPdOgMfTqqVKJFAsRtq0Mc/7n+W6Bo+N9wWhGOyOx+w4HcpdP78jAiK90Ig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758118541; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GlycE29InmmlL9sx49ZL06zm0ZGXgmoEWn8api7I+xk=; b=P9gFa6FWxeWIyUJKeFqlDqk5rfuh1RY9cvcPEq5sRsVUUTyn0NXxw+1JQwDFEKgrtSFlnt FDt+xVgfTMNK3trB1NOgDVSdHvntgl6A2qno+PXww7+XkR220o+29okIJHUsICyLLuyNcs NLtoFr7Dd9BHw52uoc/VYp+eKF4CSv43cDCL1zAQF8mCF6O9B8tNpjR7q2DCJmEjnxHk2A 4FeaNQmyiE60m6Gbgsz2Z2n8vXCPqO23hd4kXePAR1fbY2YDnR5XYGfPDQWbMzykGMwMI3 phoqlayfJWlJqjVgb5JqqhQub4+ShQ7WdU972rpBaYfY5gxjrMgzO8f266yhAg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758118541; a=rsa-sha256; cv=none; b=o7rtRFwADAMlcZtAhx45P8rexAAqLv1bVFxTPpgExL8gHD1X6hgnl6Zwx6v+yRWn98S0Zw JhW3QS8JacMxa/pMJiHWTlb6csL0AHoc5XG919+zONA3HyqXbZjbnT/2wZlY1E90pvvon4 3MI/L/K0SSLWEUlRTlbXXTCrPprWe9czXicbqKi2cjto9olWDgA5/49beeRGuVhtUisdmy ZvoDsciXsyrHOupUjiKA+POC2OLLUl+wIzO5d4LIZmNVABpnNJ2PDZbRm7FMepsVlhqWnw tI8i1T5zsn70M7T+6LFY7cLmAKMe82gmHLVysvdMwV1eAW1dS0AX8YHleVh1eQ== 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 4cRglx4Y5QzDGY; Wed, 17 Sep 2025 14:15: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 58HEFf1q010218; Wed, 17 Sep 2025 14:15:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58HEFfCI010215; Wed, 17 Sep 2025 14:15:41 GMT (envelope-from git) Date: Wed, 17 Sep 2025 14:15:41 GMT Message-Id: <202509171415.58HEFfCI010215@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 05e99f5d1751 - main - pfctl.8: omit preceding flag from command/modifier lists to get tags List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 05e99f5d175117fb095ee62352903d5157cb1796 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=05e99f5d175117fb095ee62352903d5157cb1796 commit 05e99f5d175117fb095ee62352903d5157cb1796 Author: Kristof Provost AuthorDate: 2025-08-25 09:21:49 +0000 Commit: Kristof Provost CommitDate: 2025-09-17 14:15:14 +0000 pfctl.8: omit preceding flag from command/modifier lists to get tags reads odd to repeat, e.g. -F, when listing all its modifiers. as a consequence, automatic tagging wouldn't work, e.g. no "zero" tag would exist to jump to that -F modifier's definition. also add manual tags for -R and -T as get explained together with -s and -t, respectively, where only the first flag gets tagged. Obtained from: OpenBSD, kn , e08605c7f2 Sponsored by: Rubicon Communications, LLC ("Netgate") --- sbin/pfctl/pfctl.8 | 92 +++++++++++++++++++++++++++--------------------------- 1 file changed, 46 insertions(+), 46 deletions(-) diff --git a/sbin/pfctl/pfctl.8 b/sbin/pfctl/pfctl.8 index 5a74a8fd3444..8e152f90d616 100644 --- a/sbin/pfctl/pfctl.8 +++ b/sbin/pfctl/pfctl.8 @@ -24,7 +24,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd August 5, 2025 +.Dd August 25, 2025 .Dt PFCTL 8 .Os .Sh NAME @@ -211,31 +211,31 @@ Flush the filter parameters specified by .Ar modifier (may be abbreviated): .Pp -.Bl -tag -width xxxxxxxxxxxx -compact -.It Fl F Cm nat +.Bl -tag -width xxxxxxxxx -compact +.It Cm nat Flush the NAT rules. -.It Fl F Cm queue +.It Cm queue Flush the queue rules. -.It Fl F Cm ethernet +.It Cm ethernet Flush the Ethernet filter rules. -.It Fl F Cm rules +.It Cm rules Flush the filter rules. -.It Fl F Cm states +.It Cm states Flush the state table (NAT and filter). -.It Fl F Cm Sources +.It Cm Sources Flush the source tracking table. -.It Fl F Cm info +.It Cm info Flush the filter information (statistics that are not bound to rules). -.It Fl F Cm Tables +.It Cm Tables Flush the tables. -.It Fl F Cm osfp +.It Cm osfp Flush the passive operating system fingerprints. -.It Fl F Cm Reset +.It Cm Reset Reset limits, timeouts and other options back to default settings. See the OPTIONS section in .Xr pf.conf 5 for details. -.It Fl F Cm all +.It Cm all Flush all of the above. .El .Pp @@ -401,13 +401,13 @@ Other rules and options are ignored. .It Fl o Ar level Control the ruleset optimizer, overriding any rule file settings. .Pp -.Bl -tag -width xxxxxxxxxxxx -compact -.It Fl o Cm none +.Bl -tag -width xxxxxxxxx -compact +.It Cm none Disable the ruleset optimizer. -.It Fl o Cm basic +.It Cm basic Enable basic ruleset optimizations. This is the default behaviour. -.It Fl o Cm profile +.It Cm profile Enable basic ruleset optimizations with profiling. .El .Pp @@ -437,10 +437,10 @@ Show the filter parameters specified by .Ar modifier (may be abbreviated): .Pp -.Bl -tag -width xxxxxxxxxxxxx -compact -.It Fl s Cm nat +.Bl -tag -width xxxxxxxxxxx -compact +.It Cm nat Show the currently loaded NAT rules. -.It Fl s Cm queue +.It Cm queue Show the currently loaded queue rules. When used together with .Fl v , @@ -450,13 +450,13 @@ When used together with .Nm will loop and show updated queue statistics every five seconds, including measured bandwidth and packets per second. -.It Fl s Cm ether +.It Cm ether Show the currently loaded Ethernet rules. When used together with .Fl v , the per-rule statistics (number of evaluations, packets, and bytes) are also shown. -.It Fl s Cm rules +.It Cm rules Show the currently loaded filter rules. When used together with .Fl v , @@ -469,7 +469,7 @@ will skip evaluation of rules where possible. Packets passed statefully are counted in the rule that created the state (even though the rule is not evaluated more than once for the entire connection). -.It Fl s Cm Anchors +.It Cm Anchors Show the currently loaded anchors directly attached to the main ruleset. If .Fl a Ar anchor @@ -480,11 +480,11 @@ If .Fl v is specified, all anchors attached under the target anchor will be displayed recursively. -.It Fl s Cm states +.It Cm states Show the contents of the state table. -.It Fl s Cm Sources +.It Cm Sources Show the contents of the source tracking table. -.It Fl s Cm info +.It Cm info Show filter information (statistics and counters). When used together with .Fl v , @@ -492,21 +492,21 @@ source tracking statistics, the firewall's 32-bit hostid number and the main ruleset's MD5 checksum for use with .Xr pfsync 4 are also shown. -.It Fl s Cm Running +.It Cm Running Show the running status and provide a non-zero exit status when disabled. -.It Fl s Cm labels +.It Cm labels Show per-rule statistics (label, evaluations, packets total, bytes total, packets in, bytes in, packets out, bytes out, state creations) of filter rules with labels, useful for accounting. -.It Fl s Cm timeouts +.It Cm timeouts Show the current global timeouts. -.It Fl s Cm memory +.It Cm memory Show the current pool memory hard limits. -.It Fl s Cm Tables +.It Cm Tables Show the list of tables. -.It Fl s Cm osfp +.It Cm osfp Show the list of operating system fingerprints. -.It Fl s Cm Interfaces +.It Cm Interfaces Show the list of interfaces and interface groups available to PF. When used together with .Fl v , @@ -516,7 +516,7 @@ When used together with interface statistics are also shown. .Fl i can be used to select an interface or a group of interfaces. -.It Fl s Cm all +.It Cm all Show all of the above, except for the lists of interfaces and operating system fingerprints. .El @@ -571,38 +571,38 @@ Specify the .Ar table . Commands include: .Pp -.Bl -tag -width "-T expire number" -compact -.It Fl T Cm add +.Bl -tag -width "expire number" -compact +.It Cm add Add one or more addresses to a table. Automatically create a persistent table if it does not exist. -.It Fl T Cm delete +.It Cm delete Delete one or more addresses from a table. -.It Fl T Cm expire Ar number +.It Cm expire Ar number Delete addresses which had their statistics cleared more than .Ar number seconds ago. For entries which have never had their statistics cleared, .Ar number refers to the time they were added to the table. -.It Fl T Cm flush +.It Cm flush Flush all addresses in a table. -.It Fl T Cm kill +.It Cm kill Kill a table. -.It Fl T Cm replace +.It Cm replace Replace the addresses of the table. Automatically create a persistent table if it does not exist. -.It Fl T Cm show +.It Cm show Show the content (addresses) of a table. -.It Fl T Cm test +.It Cm test Test if the given addresses match a table. -.It Fl T Cm zero Op Ar address ... +.It Cm zero Op Ar address ... Clear all the statistics of a table, or only for specified addresses. -.It Fl T Cm reset +.It Cm reset Clear statistics only for addresses with non-zero statistics. Addresses with counter values at zero and their .Dq Cleared timestamp are left untouched. -.It Fl T Cm load +.It Cm load Load only the table definitions from .Xr pf.conf 5 . This is used in conjunction with the From nobody Wed Sep 17 14:15:42 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cRglz09tlz67SfB; Wed, 17 Sep 2025 14:15: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 4cRgly5vXWz44Gr; Wed, 17 Sep 2025 14:15:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758118542; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AcOWyyfhH+4mTrX2T6D7iwtaA01TIn/zhEAA6/QcOdI=; b=UbiqV+iL9535WiSrmnTR4Wurfa4RGHxkDU6gAtY74kMnfUtMWYK94Gg+NS/NpfiSCS0EUn w86eCq/Z0bZtnoZEH6sLLw5nl+K1GFhdH775TBzcQv1T3brZ18+XeHaWSCPoLeAyFl4KUE ZFqAArb+ulG24ffSELpIrRl6ktHckNvHNzbT7RnTBupeBEZG7PKuetgJiw8Nli3VuLG1mZ GDE3OTzC/bZilWR/hT4QOkNzi5U6CKWR1HCtDQfJ5u4TGDEeVWR0qyWURN3vR3O4eU1g5z 3fQqKv3u7LXy0icyaBZzAf/IcLwNMDkVbt5ilOkoeRS+sZ4nrt7AnumJwo8vIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758118542; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AcOWyyfhH+4mTrX2T6D7iwtaA01TIn/zhEAA6/QcOdI=; b=ZhwKaaRAxuqiaBWtg0SlXTmoaX8lvQGqqKKXaIkHUV7mmRZxmPUcnYobkwQHBAdp7ARJL1 zxOMToECagtOKB1dunJti/NZFf9PeMQFL65ijFKMTu3T/1TtJPnW5liTPxZ3/wTylfASBe V4pOpB5qc7fGiMzz1AjS2cXqfwi78fMHrBZLE5f4cnqmosNfbrk+h+qouuxFMlOBAz5KNd 7bZhuLHlZiAFgFltJeg+8oT4UShi1bYH12+yUAtD79zI12GLBvN3/iszF8lCaVWw6SWRdy 3avmnEiVws14/CVX6Q6TIP4WDPQbhuaErWbpJ0yVqqkvdVB79UXMBO6TZRX7gA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758118542; a=rsa-sha256; cv=none; b=RE8WM2J5DZmyvgQHU7x8oG4XEiuXx8aK/fBXG9M37b0lb1wWL+6atajtK50nrh1YTyfRLN SZkwopUwRKP9ygpFlX47d3EoWDZs44LiY4Q4YYfRmjJD9X90ChttKIhxzoSFnmdsUHqF/J jpxhBnATcJFsKFeViCDtTD0N+ku0FO9bqhOvZbLnOeyV2fa2Grqogy22JUWGcDkDdjl6Il 72gt9Sv3ZIhjDZEUK6LbAgm0KBclRxweaCIyjCCPvEpkpoUvt6mAtBLpx1NZBIU4XJggz1 Uqw79hWvMsF0FUZaZzc7wGiv8YvjsZSxJOm+SIgWqepv/hWME2RoXQN6B+TZ9A== 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 4cRgly5WDlzTYQ; Wed, 17 Sep 2025 14:15: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 58HEFgH8010252; Wed, 17 Sep 2025 14:15:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58HEFg3Z010249; Wed, 17 Sep 2025 14:15:42 GMT (envelope-from git) Date: Wed, 17 Sep 2025 14:15:42 GMT Message-Id: <202509171415.58HEFg3Z010249@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 1066515eb521 - main - pf: Count m_gethdr() failures in PFRES_MEMORY counter List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1066515eb5219904c76f6f142e65ccf57eee6c53 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=1066515eb5219904c76f6f142e65ccf57eee6c53 commit 1066515eb5219904c76f6f142e65ccf57eee6c53 Author: Kristof Provost AuthorDate: 2025-08-25 09:36:23 +0000 Commit: Kristof Provost CommitDate: 2025-09-17 14:15:14 +0000 pf: Count m_gethdr() failures in PFRES_MEMORY counter This requires passing the reason pointer down into pf_build_tcp(). ok bluhm@ Obtained from: OpenBSD, sf , 03c532ca70 Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/net/pfvar.h | 9 ++++---- sys/netpfil/pf/pf.c | 49 ++++++++++++++++++++++++++---------------- sys/netpfil/pf/pf_syncookies.c | 8 +++---- 3 files changed, 39 insertions(+), 27 deletions(-) diff --git a/sys/net/pfvar.h b/sys/net/pfvar.h index e0fda082fefe..8b102f198de8 100644 --- a/sys/net/pfvar.h +++ b/sys/net/pfvar.h @@ -2543,22 +2543,23 @@ struct mbuf *pf_build_tcp(const struct pf_krule *, sa_family_t, const struct pf_addr *, const struct pf_addr *, u_int16_t, u_int16_t, u_int32_t, u_int32_t, u_int8_t, u_int16_t, u_int16_t, u_int8_t, int, - u_int16_t, u_int16_t, u_int, int); + u_int16_t, u_int16_t, u_int, int, u_short *); void pf_send_tcp(const struct pf_krule *, sa_family_t, const struct pf_addr *, const struct pf_addr *, u_int16_t, u_int16_t, u_int32_t, u_int32_t, u_int8_t, u_int16_t, u_int16_t, u_int8_t, int, - u_int16_t, u_int16_t, int); + u_int16_t, u_int16_t, int, u_short *); void pf_syncookies_init(void); void pf_syncookies_cleanup(void); int pf_get_syncookies(struct pfioc_nv *); int pf_set_syncookies(struct pfioc_nv *); int pf_synflood_check(struct pf_pdesc *); -void pf_syncookie_send(struct pf_pdesc *); +void pf_syncookie_send(struct pf_pdesc *, u_short *); bool pf_syncookie_check(struct pf_pdesc *); u_int8_t pf_syncookie_validate(struct pf_pdesc *); -struct mbuf * pf_syncookie_recreate_syn(struct pf_pdesc *); +struct mbuf * pf_syncookie_recreate_syn(struct pf_pdesc *, + u_short *); VNET_DECLARE(struct pf_kstatus, pf_status); #define V_pf_status VNET(pf_status) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 5889bb9d68e6..aade1d9ace37 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -2834,7 +2834,7 @@ pf_remove_state(struct pf_kstate *s) s->key[PF_SK_WIRE]->port[0], s->src.seqhi, s->src.seqlo + 1, TH_RST|TH_ACK, 0, 0, 0, M_SKIP_FIREWALL, s->tag, 0, - s->act.rtableid); + s->act.rtableid, NULL); } LIST_REMOVE(s, entry); @@ -4080,7 +4080,7 @@ pf_build_tcp(const struct pf_krule *r, sa_family_t af, u_int16_t sport, u_int16_t dport, u_int32_t seq, u_int32_t ack, u_int8_t tcp_flags, u_int16_t win, u_int16_t mss, u_int8_t ttl, int mbuf_flags, u_int16_t mtag_tag, u_int16_t mtag_flags, u_int sack, - int rtableid) + int rtableid, u_short *reason) { struct mbuf *m; int len, tlen; @@ -4120,13 +4120,16 @@ pf_build_tcp(const struct pf_krule *r, sa_family_t af, } m = m_gethdr(M_NOWAIT, MT_DATA); - if (m == NULL) + if (m == NULL) { + REASON_SET(reason, PFRES_MEMORY); return (NULL); + } #ifdef MAC mac_netinet_firewall_send(m); #endif if ((pf_mtag = pf_get_mtag(m)) == NULL) { + REASON_SET(reason, PFRES_MEMORY); m_freem(m); return (NULL); } @@ -4346,13 +4349,14 @@ pf_send_tcp(const struct pf_krule *r, sa_family_t af, const struct pf_addr *saddr, const struct pf_addr *daddr, u_int16_t sport, u_int16_t dport, u_int32_t seq, u_int32_t ack, u_int8_t tcp_flags, u_int16_t win, u_int16_t mss, u_int8_t ttl, - int mbuf_flags, u_int16_t mtag_tag, u_int16_t mtag_flags, int rtableid) + int mbuf_flags, u_int16_t mtag_tag, u_int16_t mtag_flags, int rtableid, + u_short *reason) { struct pf_send_entry *pfse; struct mbuf *m; m = pf_build_tcp(r, af, saddr, daddr, sport, dport, seq, ack, tcp_flags, - win, mss, ttl, mbuf_flags, mtag_tag, mtag_flags, 0, rtableid); + win, mss, ttl, mbuf_flags, mtag_tag, mtag_flags, 0, rtableid, reason); if (m == NULL) return; @@ -4360,6 +4364,7 @@ pf_send_tcp(const struct pf_krule *r, sa_family_t af, pfse = malloc(sizeof(*pfse), M_PFTEMP, M_NOWAIT); if (pfse == NULL) { m_freem(m); + REASON_SET(reason, PFRES_MEMORY); return; } @@ -4421,9 +4426,10 @@ pf_return(struct pf_krule *r, struct pf_krule *nr, struct pf_pdesc *pd, if (tcp_get_flags(th) & TH_FIN) ack++; pf_send_tcp(r, pd->af, pd->dst, - pd->src, th->th_dport, th->th_sport, - ntohl(th->th_ack), ack, TH_RST|TH_ACK, 0, 0, - r->return_ttl, M_SKIP_FIREWALL, 0, 0, rtableid); + pd->src, th->th_dport, th->th_sport, + ntohl(th->th_ack), ack, TH_RST|TH_ACK, 0, 0, + r->return_ttl, M_SKIP_FIREWALL, 0, 0, rtableid, + reason); } } else if (pd->proto == IPPROTO_SCTP && (r->rule_flag & PFRULE_RETURN)) { @@ -4474,7 +4480,8 @@ pf_icmp_to_bandlim(uint8_t type) static void pf_send_challenge_ack(struct pf_pdesc *pd, struct pf_kstate *s, - struct pf_state_peer *src, struct pf_state_peer *dst) + struct pf_state_peer *src, struct pf_state_peer *dst, + u_short *reason) { /* * We are sending challenge ACK as a response to SYN packet, which @@ -4488,7 +4495,7 @@ pf_send_challenge_ack(struct pf_pdesc *pd, struct pf_kstate *s, pf_send_tcp(s->rule, pd->af, pd->dst, pd->src, pd->hdr.tcp.th_dport, pd->hdr.tcp.th_sport, dst->seqlo, src->seqlo, TH_ACK, 0, 0, s->rule->return_ttl, 0, 0, 0, - s->rule->rtableid); + s->rule->rtableid, reason); } static void @@ -6320,7 +6327,7 @@ pf_create_state(struct pf_krule *r, struct pf_test_ctx *ctx, pf_send_tcp(r, pd->af, pd->dst, pd->src, th->th_dport, th->th_sport, s->src.seqhi, ntohl(th->th_seq) + 1, TH_SYN|TH_ACK, 0, s->src.mss, 0, M_SKIP_FIREWALL, 0, 0, - pd->act.rtableid); + pd->act.rtableid, &ctx->reason); REASON_SET(&ctx->reason, PFRES_SYNPROXY); return (PF_SYNPROXY_DROP); } @@ -6910,7 +6917,7 @@ pf_tcp_track_full(struct pf_kstate *state, struct pf_pdesc *pd, th->th_sport, ntohl(th->th_ack), 0, TH_RST, 0, 0, state->rule->return_ttl, M_SKIP_FIREWALL, - 0, 0, state->act.rtableid); + 0, 0, state->act.rtableid, reason); src->seqlo = 0; src->seqhi = 1; src->max_win = 1; @@ -7035,7 +7042,8 @@ pf_synproxy(struct pf_pdesc *pd, struct pf_kstate *state, u_short *reason) pd->src, th->th_dport, th->th_sport, state->src.seqhi, ntohl(th->th_seq) + 1, TH_SYN|TH_ACK, 0, state->src.mss, 0, - M_SKIP_FIREWALL, 0, 0, state->act.rtableid); + M_SKIP_FIREWALL, 0, 0, state->act.rtableid, + reason); REASON_SET(reason, PFRES_SYNPROXY); return (PF_SYNPROXY_DROP); } else if ((tcp_get_flags(th) & (TH_ACK|TH_RST|TH_FIN)) != TH_ACK || @@ -7068,7 +7076,8 @@ pf_synproxy(struct pf_pdesc *pd, struct pf_kstate *state, u_short *reason) state->dst.seqhi, 0, TH_SYN, 0, state->src.mss, 0, state->orig_kif->pfik_ifp == V_loif ? M_LOOP : 0, - state->tag, 0, state->act.rtableid); + state->tag, 0, state->act.rtableid, + reason); REASON_SET(reason, PFRES_SYNPROXY); return (PF_SYNPROXY_DROP); } else if (((tcp_get_flags(th) & (TH_SYN|TH_ACK)) != @@ -7083,13 +7092,15 @@ pf_synproxy(struct pf_pdesc *pd, struct pf_kstate *state, u_short *reason) pd->src, th->th_dport, th->th_sport, ntohl(th->th_ack), ntohl(th->th_seq) + 1, TH_ACK, state->src.max_win, 0, 0, 0, - state->tag, 0, state->act.rtableid); + state->tag, 0, state->act.rtableid, + reason); pf_send_tcp(state->rule, pd->af, &sk->addr[pd->sidx], &sk->addr[pd->didx], sk->port[pd->sidx], sk->port[pd->didx], state->src.seqhi + 1, state->src.seqlo + 1, TH_ACK, state->dst.max_win, 0, 0, - M_SKIP_FIREWALL, 0, 0, state->act.rtableid); + M_SKIP_FIREWALL, 0, 0, state->act.rtableid, + reason); state->src.seqdiff = state->dst.seqhi - state->src.seqlo; state->dst.seqdiff = state->src.seqhi - @@ -7189,7 +7200,7 @@ pf_test_state(struct pf_kstate **state, struct pf_pdesc *pd, u_short *reason) * ACK enables all parties (firewall and peers) * to get in sync again. */ - pf_send_challenge_ack(pd, *state, src, dst); + pf_send_challenge_ack(pd, *state, src, dst, reason); return (PF_DROP); } } @@ -10899,7 +10910,7 @@ pf_test(sa_family_t af, int dir, int pflags, struct ifnet *ifp, struct mbuf **m0 /* Respond to SYN with a syncookie. */ if ((tcp_get_flags(&pd.hdr.tcp) & (TH_SYN|TH_ACK|TH_RST)) == TH_SYN && pd.dir == PF_IN && pf_synflood_check(&pd)) { - pf_syncookie_send(&pd); + pf_syncookie_send(&pd, &reason); action = PF_DROP; break; } @@ -10923,7 +10934,7 @@ pf_test(sa_family_t af, int dir, int pflags, struct ifnet *ifp, struct mbuf **m0 pd.dir == PF_IN) { struct mbuf *msyn; - msyn = pf_syncookie_recreate_syn(&pd); + msyn = pf_syncookie_recreate_syn(&pd, &reason); if (msyn == NULL) { action = PF_DROP; break; diff --git a/sys/netpfil/pf/pf_syncookies.c b/sys/netpfil/pf/pf_syncookies.c index 4a935bc65767..d11551ffb6ae 100644 --- a/sys/netpfil/pf/pf_syncookies.c +++ b/sys/netpfil/pf/pf_syncookies.c @@ -287,7 +287,7 @@ pf_synflood_check(struct pf_pdesc *pd) } void -pf_syncookie_send(struct pf_pdesc *pd) +pf_syncookie_send(struct pf_pdesc *pd, u_short *reason) { uint16_t mss; uint32_t iss; @@ -297,7 +297,7 @@ pf_syncookie_send(struct pf_pdesc *pd) pf_send_tcp(NULL, pd->af, pd->dst, pd->src, *pd->dport, *pd->sport, iss, ntohl(pd->hdr.tcp.th_seq) + 1, TH_SYN|TH_ACK, 0, mss, 0, M_SKIP_FIREWALL | (pd->m->m_flags & M_LOOP), 0, 0, - pd->act.rtableid); + pd->act.rtableid, reason); counter_u64_add(V_pf_status.lcounters[KLCNT_SYNCOOKIES_SENT], 1); /* XXX Maybe only in adaptive mode? */ atomic_add_64(&V_pf_status.syncookies_inflight[V_pf_syncookie_status.oddeven], @@ -495,7 +495,7 @@ pf_syncookie_generate(struct pf_pdesc *pd, uint16_t mss) } struct mbuf * -pf_syncookie_recreate_syn(struct pf_pdesc *pd) +pf_syncookie_recreate_syn(struct pf_pdesc *pd, u_short *reason) { uint8_t wscale; uint16_t mss; @@ -516,5 +516,5 @@ pf_syncookie_recreate_syn(struct pf_pdesc *pd) return (pf_build_tcp(NULL, pd->af, pd->src, pd->dst, *pd->sport, *pd->dport, seq, 0, TH_SYN, wscale, mss, pd->ttl, (pd->m->m_flags & M_LOOP), 0, PF_MTAG_FLAG_SYNCOOKIE_RECREATED, - cookie.flags.sack_ok, pd->act.rtableid)); + cookie.flags.sack_ok, pd->act.rtableid, reason)); } From nobody Wed Sep 17 14:15:43 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cRgm01g5zz67SQv; Wed, 17 Sep 2025 14:15:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cRglz6yXPz44Mg; Wed, 17 Sep 2025 14:15:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758118544; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1x+KYgFyZweRVUkuoE0cRSLkVqQEKpyCMJ1BrkWsuxM=; b=XABpMy0o2ZSP3tbMy6QsH2rERyn4HDvcnGncbljWWniIQdZ4Da+htC+COmexWhQqucQQop keXNfYG3HRecXcDjk5Y1MiMzrrzlYHMjhS+rJrcd0RMd+E1YrJd4ITpeSoYoPicEk373KA NFUAs0GCKKezwThvrQUymcPLmA0rPAC+RDGoc6917I0hUAnRvZyJef8KTYJpwoZhsnmXla oK6kMCKXtu+lOfrCkswvX6mhb/atblrTX5z9YFc5/8NmLvKiKDkv54jp4ZCPCEMvAev4Tc acYV1vW+DMSJHpoa95sjWK67Y9h4DgMKYooFERplw0771XeZViRI+JummztXkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758118544; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1x+KYgFyZweRVUkuoE0cRSLkVqQEKpyCMJ1BrkWsuxM=; b=FvCbCJ9HImTOmHNfssdH0WugpSx+Y1ayOZnYpuH9kYeiuGnAT2SKWn2BEE2ckCpGyNm3Mj kV7aFhcrN2RLOsQTCGP1RmloduUNMPyiZGsURYeUbBl/iTSdcmweQG1ru4SzUlLZxijj2U f+/6LpDiFGmtPnJE6SWPAfyzYOX6iJxvkcFWspeQLsZybU4CNkWC2EYZE0AQ/HH0uk0Lmw tUmg3WLtu/JnM0Jsd2yTopVSQyZVKkie1TSRQAhWQQSyQP9kdgTifldeQQSyAh1t+N9/+4 aGEiUxO/USdBiZGIPZNGF0JFeAgWORWvtL7qvMSCwpMKSljQG8GnrHfxz/igGQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758118544; a=rsa-sha256; cv=none; b=oYP8TESR4TCCGLnY5PIHElwnY3u+c8jKHrt0d13werIDaOXHj62uL3ARJrzpndVeGtbi4u Bn9noY7kp7Au1yVnZbMVqjtK/dEzVRmIPPjFemYc52u8ky/Ub02I5SmjMNTEABEG+Sa1Rm R4ZyUbfOL60bLejZS79WCyKC92p6Mqc4EgPqJt2EH4+g6vpxL9LRZlreq2IO7oA8fZgVoo G//n1svVKomJomI0562U1B/J7ZFUgG+JihZuEC8nYkaJJxx5SguyMLAR7v0PLzoPSXCYx8 RQSaP5nehoG9Vn/ovYA1EBJuZYuGt3gWa9xQKtxOwD710cpGspWNOEuF+GXXDw== 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 4cRglz6TTnzTZt; Wed, 17 Sep 2025 14:15: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 58HEFhvL010285; Wed, 17 Sep 2025 14:15:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58HEFh9g010282; Wed, 17 Sep 2025 14:15:43 GMT (envelope-from git) Date: Wed, 17 Sep 2025 14:15:43 GMT Message-Id: <202509171415.58HEFh9g010282@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 9d9bc7f462bd - main - pf: set limits before rules List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9d9bc7f462bd152d87ab8f1767cad19bab09bf8b Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=9d9bc7f462bd152d87ab8f1767cad19bab09bf8b commit 9d9bc7f462bd152d87ab8f1767cad19bab09bf8b Author: Kristof Provost AuthorDate: 2025-08-25 13:43:10 +0000 Commit: Kristof Provost CommitDate: 2025-09-17 14:15:15 +0000 pf: set limits before rules The current way to adjust pf(4) limits in pf.conf(5) is inconvenient. For example when ruleset uses more than 512 anchors (the current default limit) one would typically add 'set limit anchor 1024' to adjust the limit so the 'pf.conf(5)' gets processed. Unfortunately it does not work because limit gets changed with DIOCXCOMMIT which is too late. The pf.conf(5) fails to load the anchors to transaction, because the old lower limit is still in place. To fix it we must set the limit as soon as we parse 'set limit ...' option. The issue has been reported and fix tested by rafal _dot_ ramocki _von_ eo.pl OK @bluhm Obtained from: OpenBSD, sashan , 85baac7751 Sponsored by: Rubicon Communications, LLC ("Netgate") --- sbin/pfctl/pfctl.c | 60 +++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 57 insertions(+), 3 deletions(-) diff --git a/sbin/pfctl/pfctl.c b/sbin/pfctl/pfctl.c index 601b7651e40b..b29d992b1cda 100644 --- a/sbin/pfctl/pfctl.c +++ b/sbin/pfctl/pfctl.c @@ -110,6 +110,8 @@ int pfctl_show_status(int, int); int pfctl_show_running(int); int pfctl_show_timeouts(int, int); int pfctl_show_limits(int, int); +void pfctl_read_limits(struct pfctl_handle *); +void pfctl_restore_limits(void); void pfctl_debug(int, u_int32_t, int); int pfctl_test_altqsupport(int, int); int pfctl_show_anchors(int, int, char *); @@ -189,6 +191,8 @@ static const struct { { NULL, 0 } }; +static unsigned int limit_curr[PF_LIMIT_MAX]; + struct pf_hint { const char *name; int timeout; @@ -1780,6 +1784,31 @@ pfctl_show_limits(int dev, int opts) return (0); } +void +pfctl_read_limits(struct pfctl_handle *h) +{ + int i; + + for (i = 0; pf_limits[i].name; i++) { + if (pfctl_get_limit(h, i, &limit_curr[i])) + err(1, "DIOCGETLIMIT"); + } +} + +void +pfctl_restore_limits(void) +{ + int i; + + if (pfh == NULL) + return; + + for (i = 0; pf_limits[i].name; i++) { + if (pfctl_set_limit(pfh, i, limit_curr[i])) + warn("DIOCSETLIMIT (%s)", pf_limits[i].name); + } +} + void pfctl_show_creators(int opts) { @@ -2487,8 +2516,14 @@ pfctl_init_options(struct pfctl *pf) pf->limit[PF_LIMIT_STATES] = PFSTATE_HIWAT; pf->limit[PF_LIMIT_FRAGS] = PFFRAG_FRENT_HIWAT; - pf->limit[PF_LIMIT_SRC_NODES] = PFSNODE_HIWAT; - pf->limit[PF_LIMIT_TABLE_ENTRIES] = PFR_KENTRY_HIWAT; + + pf->limit[PF_LIMIT_SRC_NODES] = (limit_curr[PF_LIMIT_SRC_NODES] == 0) ? + PFSNODE_HIWAT : limit_curr[PF_LIMIT_SRC_NODES]; + pf->limit[PF_LIMIT_TABLE_ENTRIES] = + (limit_curr[PF_LIMIT_TABLE_ENTRIES] == 0) ? + PFR_KENTRY_HIWAT : limit_curr[PF_LIMIT_TABLE_ENTRIES]; + pf->limit[PF_LIMIT_ANCHORS] = (limit_curr[PF_LIMIT_ANCHORS] == 0) ? + PF_ANCHOR_HIWAT : limit_curr[PF_LIMIT_ANCHORS]; pf->debug = PF_DEBUG_URGENT; pf->reassemble = 0; @@ -2589,6 +2624,9 @@ pfctl_apply_limit(struct pfctl *pf, const char *opt, unsigned int limit) if (pf->opts & PF_OPT_VERBOSE) printf("set limit %s %d\n", opt, limit); + if ((pf->opts & PF_OPT_NOACTION) == 0) + pfctl_load_options(pf); + return (0); } @@ -3452,6 +3490,11 @@ main(int argc, char *argv[]) if (pfh == NULL) err(1, "Failed to open netlink"); + if ((opts & PF_OPT_NOACTION) == 0) { + pfctl_read_limits(pfh); + atexit(pfctl_restore_limits); + } + if (opts & PF_OPT_DISABLE) if (pfctl_disable(dev, opts)) exit_val = 1; @@ -3695,7 +3738,18 @@ main(int argc, char *argv[]) } } - exit(exit_val); + /* + * prevent pfctl_restore_limits() exit handler from restoring + * pf(4) options settings on successful exit. + */ + if (exit_val == 0) { + close(dev); + dev = -1; + pfctl_close(pfh); + pfh = NULL; + } + + return (exit_val); } char * From nobody Wed Sep 17 14:15:46 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cRgm240Gtz67SZF; Wed, 17 Sep 2025 14:15: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 4cRgm21vvTz44YX; Wed, 17 Sep 2025 14:15:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758118546; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1ARxn3zjXhPQ+q8Kqa6rQKgbZl/rhxzHl0MZR1hcxWQ=; b=OcF788h226kCzeRae7zVotnUfHXcTVNuGzwCkAbeM7uTnSjljGbDarhD20RHJeyesSugLq RAy+3rLWL324W3J76/Rz7ZN5b/oBCDQxd4ehLBp5QC0iDW7wijZcvPfCYZP5extdvYnrJK yHUtnI5XNwkaEDjDs03Xgk7+cYjYGvB8YcIRP2wXiT7QEpjw1jhFA7RSC+frwTHO7XQbBe x/BuMTlEpocOgn4DQzkRBFz4ZBNIQqmzkmixN4pA2KLdQP1/mAH0WszkpVXF/72KVw89a4 McqRKpJ4u9q2RLVG2XVuiOaf/VWJE06WzF1y8wpriKQoh5VtbfY+K7EPv6zJmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758118546; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1ARxn3zjXhPQ+q8Kqa6rQKgbZl/rhxzHl0MZR1hcxWQ=; b=ukKbDICj4qpOIu1ApmDR0pu4995a+P/cuR8Ey6JjrGfFzUG5iF3IMHxRbdOjPkYSNNqDNm hAoxG++fyz5VKt6f5FlpaiQUj0nTCsUngZjg1IX4WC78yjkdZFr18fXbdyN4K6VVH+u/N2 NU1es6bpVOPXmDqa1iDTdB8YI4Wzn3bfhHlV1mM6kL08HJNw/9D+68QwzTtCrr2eR9eO+a nXV0DBywkhsTnwdYvIfPX79ZnSjwKU5ECQZyuAVj/e56fCWfmY4AkbTWICG7pZ5WJ6ENEc 8D+bKyKwvCiNMk0+AKY6LNaUaIcq1eUCciUcC1riJpF27GYghRuxc8FXo3fxXQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758118546; a=rsa-sha256; cv=none; b=pUFuibj/EaMhF+Ao2XQ6JR9kS4tifMPPi1VO61O1CXjLIUHA9EAI5fgOmdeJbIISeRliCD ixOHrnFQFkJHc0QPHZ5+pbXpHA9yLeSV7h2Ff1zfB5ycnGOCEB6FP4TV8/4tOV274PTyZR pdAyR5gVPfB9u//Sv66CyOvUjt2n5lXp5jiPkdxIa7r9EsyAwm6AM3p4Wa2+aO2Q4Gw82X r65hXyO7/p2sPDIqg4WuzfNX4BOQjAeNHJjr/d4MIvU14ajdMY9Rflb2qjHZwsHJWfQXiO dxRnGHsspC9yIKYp3qdZIa1HeCnhZT0yVUo8Wt8nZKGMGOU9ocCDFobPFIkYhQ== 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 4cRgm20wYZzTJ3; Wed, 17 Sep 2025 14:15: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 58HEFkPb010358; Wed, 17 Sep 2025 14:15:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58HEFkFC010352; Wed, 17 Sep 2025 14:15:46 GMT (envelope-from git) Date: Wed, 17 Sep 2025 14:15:46 GMT Message-Id: <202509171415.58HEFkFC010352@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: fc63421de9f6 - main - pf: allows TCP RST packets in the backwards window if ACK matches List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fc63421de9f69ed67aad7bae29712fca2f570693 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=fc63421de9f69ed67aad7bae29712fca2f570693 commit fc63421de9f69ed67aad7bae29712fca2f570693 Author: Kristof Provost AuthorDate: 2025-08-25 13:49:22 +0000 Commit: Kristof Provost CommitDate: 2025-09-17 14:15:15 +0000 pf: allows TCP RST packets in the backwards window if ACK matches TCP reset packets are generated for the sequence numbers that have been acknowledged. Our pf(4) is quite strict regarding sequence numbers of reset packets to avoid evil connection drops. It expected exact match and did not allow a sequence window for resets. As pf tracks neither gaps in the sequence space nor the acknowledged data, it does not know where exactly the reset is expected by the TCP stack. Problem was that legit reset packets before a gap but not at the highest sequence numbers were blocked by pf. Solution is to fix pf_tcp_track_full(). Now it allows sequence number windows if the packet has ACK+RST flags set and the acknowlege number matches perfectly. This still prevents reset number guessing by an attacker. Curiously the TCP stack behaves correctly and accepts only resets before the gap. pf only allowed resets after the final data. So any reset was ignored by the system. When the other side processed the challenge ACK, the situation could be fixed. bug reported and fix tested by Lucas Aubard with Johan Mazel, Gilles Guette and Pierre Chifflier; OK sashan@ Obtained from: OpenBSD, bluhm , 12e4c257ea Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/netpfil/pf/pf.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index aade1d9ace37..2705df61a1f7 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -6775,8 +6775,12 @@ pf_tcp_track_full(struct pf_kstate *state, struct pf_pdesc *pd, (ackskew <= (MAXACKWINDOW << sws)) && /* Acking not more than one window forward */ ((tcp_get_flags(th) & TH_RST) == 0 || orig_seq == src->seqlo || - (orig_seq == src->seqlo + 1) || (orig_seq + 1 == src->seqlo))) { + (orig_seq == src->seqlo + 1) || (orig_seq + 1 == src->seqlo) || /* Require an exact/+1 sequence match on resets when possible */ + (SEQ_GEQ(orig_seq, src->seqlo - (dst->max_win << dws)) && + SEQ_LEQ(orig_seq, src->seqlo + 1) && ackskew == 0 && + (th->th_flags & (TH_ACK|TH_RST)) == (TH_ACK|TH_RST)))) { + /* Allow resets to match sequence window if ack is perfect match */ if (dst->scrub || src->scrub) { if (pf_normalize_tcp_stateful(pd, reason, th, From nobody Wed Sep 17 14:15:44 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cRgm13lSkz67Sq5; Wed, 17 Sep 2025 14:15: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 4cRgm10t7Lz44Sf; Wed, 17 Sep 2025 14:15:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758118545; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lC6nlhrL9wRGtem5cPBTKiM28r2y8YVOV2FMsrJIMK8=; b=T02pX1ILGp4ZOfFCdOhy2TesiUWZRm4V9zPqCcaAI1x+JsNIKzQjJhKPK1Z7Qv5ZO2NOiM ZJX7+G1N+fafQFzbtCSenyBCWpl/ZKPZ4lL2g3XrjcwyJoCuWyWAf/UjUF/ENzA9VfcCEf T63NRC8hielSNunEH6bHs3h8zvZ9qQXe57uyF1jI+ig1C94Xpb+yXvn1KHB11Vwh1g5VXV G4hNGZ00/dqaIR/IQLpoV+lQfUE6KnrsXpqAliCLPEVRDI4qpmzTWxQnlXjV8Ffl5Pb44o 08wm+nDC43VErWrCph2fmp4bYVqFtcHhNIWsfM81l8cgBUijblRdI8NzWyxKHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758118545; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lC6nlhrL9wRGtem5cPBTKiM28r2y8YVOV2FMsrJIMK8=; b=cbdbpID1xKjwAisTU2HrSeUDYYH1cH5WbbwiQ5p+fHvVp9DL/qD5Pyc/ZqSWRaoKBzgm7F fR0gFMwAMlRVWbpyl69FDrlMsBCAsFICgYE1O1VQR7ZxML5a2Na4bDMf7GIVIXzZoZAea0 SSowOqwu5SErVa4kMjWlghWO36meT7KNDt0b1TwKAwgY0YXvZSHoSmXWcLidp9HmAcFU+s HqRieMmT3tkB99KaVHKpdt2SoZ/CtnpUuDoQabtZaV3hPjU46aKpLua6uTInLv1YWZFgup 9SCUY9aT4zoP1pu25QhjGXskSweGRlzGeaUI3PBOlehqrb9BG/tL09p4rtD+Uw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758118545; a=rsa-sha256; cv=none; b=N4K5eJRTt1yz9AKRGXBZ7CcJ+VNrSb5jsV4xC/vrOLJ8/UkzBw0zxCnuCXAX4beyIxHhnW O3Cjqr7VDCUz3cQDldGlnPo4WDX4wYgZ7Y7MZi/qnn7hqqOYbT5492yT989HT/hmNck8Oo Hydcl55G66nk3DpFKfmEz0+Nn6JLuKi9li4iP0wnokSUOCUQ7py92/c1r/pIoiUwlKZyEG QPHiVBg0Qt8+s6s9I20NFOUjQ673VDSvPLVNymY2Ij5VmVLwLCg7dTiCPZAnzPeVzjnDZC /z8j/3EX5mOFO2cYKmAg4H6zfyFN3rjMSa5jb/A1FwhkFrtGPMTr7+StCKAkEg== 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 4cRgm10LRXzDGZ; Wed, 17 Sep 2025 14:15: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 58HEFirn010318; Wed, 17 Sep 2025 14:15:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58HEFi4n010315; Wed, 17 Sep 2025 14:15:44 GMT (envelope-from git) Date: Wed, 17 Sep 2025 14:15:44 GMT Message-Id: <202509171415.58HEFi4n010315@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 7eb30b26aa12 - main - pf tests: test set limit List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7eb30b26aa12cf1b80b6a784ccbd0b6f648f4529 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=7eb30b26aa12cf1b80b6a784ccbd0b6f648f4529 commit 7eb30b26aa12cf1b80b6a784ccbd0b6f648f4529 Author: Kristof Provost AuthorDate: 2025-08-25 13:44:11 +0000 Commit: Kristof Provost CommitDate: 2025-09-17 14:15:15 +0000 pf tests: test set limit Verify that 'set limit anchors' now has the expected effect. Sponsored by: Rubicon Communications, LLC ("Netgate") --- tests/sys/netpfil/pf/limits.sh | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/tests/sys/netpfil/pf/limits.sh b/tests/sys/netpfil/pf/limits.sh index 69f0b6af2ccf..a0d6b891ee19 100644 --- a/tests/sys/netpfil/pf/limits.sh +++ b/tests/sys/netpfil/pf/limits.sh @@ -112,8 +112,43 @@ zero_cleanup() pft_cleanup } +atf_test_case "anchors" "cleanup" +anchors_head() +{ + atf_set descr 'Test increasing maximum number of anchors' + atf_set require.user root +} + +anchors_body() +{ + pft_init + + vnet_mkjail alcatraz + + jexec alcatraz pfctl -e + + pft_set_rules alcatraz \ + "set limit anchors 1" + + pft_set_rules alcatraz \ + "set limit anchors 2" \ + "pass" \ + "anchor \"foo\" {\n + pass in\n + }" \ + "anchor \"bar\" {\n + pass out\n + }" +} + +anchors_cleanup() +{ + pft_cleanup +} + atf_init_test_cases() { atf_add_test_case "basic" atf_add_test_case "zero" + atf_add_test_case "anchors" } From nobody Wed Sep 17 14:15:47 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cRgm40Y61z67ScM; Wed, 17 Sep 2025 14:15: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 4cRgm3220cz44T9; Wed, 17 Sep 2025 14:15:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758118547; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=k9DpblS3SvO5nhBpRR7L9kkWujj/bQbYy7HjSzWKpyQ=; b=TGpiUpnzQOnHTSGBevCSe2zF5Y8C8LzdWwpvNZwfNm/ZGu4lBFpsIQ7DzSDCaevqw7sSMZ HKXL4Lnb7qTsGboxMf06PFV9d+zCeztMc+FO4+9y8mZvSz2H/fdUuyQ/Z5/QWFg3Oyp70P i66RM0aheK2eLrXIeDoYdvGNGUnVo5IsDlgGXJ8KHG8gmCbttRuWL4uugC35Qq3IpHwIJl 0fO9JrjhoemsqhkJIuMqCRntY1xSM8eRvumh0HuQukOzHGLHKQ01ggUuVNl9GlW5i8tpP4 OZ/5E2xE0vi1vytYU/UHW8dmRaGaF0EfLAHNbKTw0apGE0qmDpg2GI1XbOxrEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758118547; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=k9DpblS3SvO5nhBpRR7L9kkWujj/bQbYy7HjSzWKpyQ=; b=b2zHaP/r/19vjZmuLu/0HD4JBAtH/k6AZ97orP0vWfq6H7lSWP83f6WcQoUMp2OoggDndh JgZZ0vmOl47NkGnlm1q9yfKw3vEMfBFWWx5LSIfYJS/gkC6BcxzHKZQZLXIMsve3fWpPI1 PXXmSa8hodATcCWDHNZ5kamAdKbg11b8YGvdbGfzEBiqkzDDMiDco0V9vBhTv4rmJrxcT2 SsGXEgbeuHBbAQJptqJ3ffuoCUpkFywIiV8KHMDEPI3/StCWsjvq5j+9DMI4QgYVvCD4LD eXLRdrGxuxEVSEW0756YBiE3k19zMV0MPdNKbOq+IBfvZt+2zdYL+mcRakKbAw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758118547; a=rsa-sha256; cv=none; b=fQrFtZQwv5SQPWDSRDmjQo47o/fbdO4Iwo9TJW+wq1fm/+3xEt3lUg7rF1uQpStwmmMiyK Ge72HdChPFJv+9XIAW5cy7AIR6/fcSuRcUsPqxQu5ofzendCywVwfYzvftVegq3W1D0V8o GXKZ1Bh+YJ/SykkFXh6LK85V9fuunx5uMWhN1iFZksoz2oIPozqvSyM6C1VslDQ0G8c4p5 zDEMgMCoHEpyS6muVq8/PUsLLbGwDibWyRnPZNBAJJjvtgoK+GU8VSGnLsYbPfe8IKYZXe ID4er7DirQHxsd1PgcNF2bA1HAfyYVuHbAklrnvFqNvizIyxZFb30gUp0wetWg== 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 4cRgm31c8DzDY1; Wed, 17 Sep 2025 14:15: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 58HEFllP010395; Wed, 17 Sep 2025 14:15:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58HEFleU010392; Wed, 17 Sep 2025 14:15:47 GMT (envelope-from git) Date: Wed, 17 Sep 2025 14:15:47 GMT Message-Id: <202509171415.58HEFleU010392@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: c016bd00294d - main - pfctl.8: -z honours -a (reset rule stats per anchor) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c016bd00294df7be6b3b3dbc661ac7b952831475 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=c016bd00294df7be6b3b3dbc661ac7b952831475 commit c016bd00294df7be6b3b3dbc661ac7b952831475 Author: Kristof Provost AuthorDate: 2025-08-25 14:46:33 +0000 Commit: Kristof Provost CommitDate: 2025-09-17 14:15:15 +0000 pfctl.8: -z honours -a (reset rule stats per anchor) OK sashan henning deraadt Obtained from: OpenBSD, kn , 1ddc001403 Sponsored by: Rubicon Communications, LLC ("Netgate") --- sbin/pfctl/pfctl.8 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sbin/pfctl/pfctl.8 b/sbin/pfctl/pfctl.8 index 8e152f90d616..f1a2bbef6236 100644 --- a/sbin/pfctl/pfctl.8 +++ b/sbin/pfctl/pfctl.8 @@ -115,8 +115,9 @@ Apply flags .Fl f , .Fl F , .Fl s , +.Fl T , and -.Fl T +.Fl z only to the rules in the specified .Ar anchor . In addition to the main ruleset, From nobody Wed Sep 17 14:15:48 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cRgm46klPz67SND; Wed, 17 Sep 2025 14:15: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 4cRgm42mwCz44LP; Wed, 17 Sep 2025 14:15:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758118548; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eAJnzUyVC/Wuhw1YWabZMvhhmDMbdH6qcaLIagnWnrc=; b=vMjc0eESjt9abH/pfu3EpV01Ht1qSTRMdQSeaZGjDMz1zyRrIXYk6A/rVj6urfip4duSO0 kga1tc0xYxrRmEgbJSdh5X+uMLyP14V7bC1CuTPg658akU5r1XS6raGQVPNU3w8+3lbrf4 f+M0UtYGetfnG0faJwolKGqNJv9kSBjnZ5YNfdcypN/tqDPicXvaWGUdzOFIYJ+46xrC8K qA3NZg3gEaexBJmcou7/tZtZTHyZT2ZhH41D1gWDyfOGbs+9HHkD0NeUM+8CHdSH0COVvi LmVw+Q4IVTgZmZXHEI8C5Ebz73y1YqhMGyEpBoRmCCkvjFvgW7S+uqpU7cS66w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758118548; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eAJnzUyVC/Wuhw1YWabZMvhhmDMbdH6qcaLIagnWnrc=; b=RUtqAxoR6F77F3kVkjeKQNsl/LcRW3l0/Vo2JTM04YNugMHzn+Og0EMyGvg+DPkwlY4gti pCzWv1AMDWfso2Ofvw+C6DkpIHpW7tfPt1TiXU0nI44TFOwdEimCdF0TqxSqvzkGyRv5UT vF7UroQ4bxfCNACDbDpV+ZtrNTIoRdRRtxmrvA+4Cj9x+C+iYaxh3OdFQkMGKf2PYLrch6 A6QMT2kp7UwrrU5mAL9TJoYhlArh0yjfnf+cxs2OkkwCKbnPRGG6c+yR51n66/YzX+lbs+ R/jsSMyUL60oS3/Fr+aW14CtTA2i63JXpqP/xbt5D7kgbqr3pP94vTa/x+DOTA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758118548; a=rsa-sha256; cv=none; b=Zayo/YkeiLwAACm6FJEYhmohRnGGKLG+xOhOidsz4eMNPAblWLQfiEinWr9R4pEuoEt9Ob VHr8ZgP2o3bHxQL/pN7xE3Mn9cbaVG1D6OX0gNpuiw0wMmmVu3S4lgJUKhUZn7IMCDnmeB 6aNXiCcade8sQOAln8WdVfPeCJ2J1CVuO+QAzmonJi60XEdQhd7WKWb3fhwAFDTZ/lOnvS shc4gjLPdmumQIbVRKYqIXbslzE2XNfXkvRBbo9BstBLTklR/lWZSyu8D9bdHh1PdvpE2P jZp1At6X7N5zN9Ud7I93AE5Yco56MsSE3Ofl460VrmnpK/b/x/iwpt67D8DwMg== 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 4cRgm42D3fzTJ4; Wed, 17 Sep 2025 14:15: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 58HEFmGt010430; Wed, 17 Sep 2025 14:15:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58HEFmp5010427; Wed, 17 Sep 2025 14:15:48 GMT (envelope-from git) Date: Wed, 17 Sep 2025 14:15:48 GMT Message-Id: <202509171415.58HEFmp5010427@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 3c3322d7ee97 - main - pf.conf.5: rephrase macro section List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3c3322d7ee974673f6b8f7a490153f3558e71118 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=3c3322d7ee974673f6b8f7a490153f3558e71118 commit 3c3322d7ee974673f6b8f7a490153f3558e71118 Author: Kristof Provost AuthorDate: 2025-08-25 15:08:36 +0000 Commit: Kristof Provost CommitDate: 2025-09-17 14:15:16 +0000 pf.conf.5: rephrase macro section In the manual pages for configuration files based on parse.y, describe the syntax of both defining and using macros, rather than exclusively relying on examples, which some of the pages do not even provide. In those pages containing tables of content, also clarify that the "Macros" section contains *definitions* of variables. Both changes were already committed to vm.conf(5) earlier. OK florian@, and deraadt also requests keeping these manuals in sync. Obtained from: OpenBSD, schwarze , 20aba01e82 Sponsored by: Rubicon Communications, LLC ("Netgate") --- share/man/man5/pf.conf.5 | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/share/man/man5/pf.conf.5 b/share/man/man5/pf.conf.5 index edaa160dddf2..02114b3eaf3c 100644 --- a/share/man/man5/pf.conf.5 +++ b/share/man/man5/pf.conf.5 @@ -27,7 +27,7 @@ .\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd August 20, 2025 +.Dd August 25, 2025 .Dt PF.CONF 5 .Os .Sh NAME @@ -92,14 +92,20 @@ keyword, for example: include "/etc/pf/sub.filter.conf" .Ed .Sh MACROS -Macros can be defined that will later be expanded in context. -Macro names must start with a letter, and may contain letters, digits -and underscores. -Macro names may not be reserved words (for example +A macro is defined with a command of the form +.Ar name Ns = Ns Ar value . +The macro +.Ar name +can contain letters, digits, and underscores and cannot be a reserved word +(for example, .Ar pass , .Ar in , +or .Ar out ) . -Macros are not expanded inside quotes. +Within unquoted arguments, the string +.Pf $ Ar name +is later expanded to +.Ar value . Ranges of network addresses used in macros that will be expanded in lists later on must be quoted with additional simple quotes. .Pp From nobody Wed Sep 17 14:15:49 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cRgm570v6z67Sq9; Wed, 17 Sep 2025 14:15: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 4cRgm53J2nz44TX; Wed, 17 Sep 2025 14:15:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758118549; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ftiUiGcyP83PHIERnw6tNsYeB76Wd7gILboepUDAPpk=; b=BIjYt8yuRnozEDqRr7v+8yByZVuQdRp8SP6W2vlPcJmTVjwiw9L3HeYZKXehm4HGUnE/qF 0IiKJ5XJFgQnjr9pIieVuPBNjKCX1FjOvjh5JGa3jxdVuOXe8i9g8Fuj6lckDqIV3582B7 G367RAx/BucA3QYEonugzDtJEQ18UQgtZmKC+oromzAY5vvJTxH41KY5MDIeezOozpd2RZ 7vtEa/GIYS+Xo2x7aJIWmG0p+8JnsMXctXj+tEssSD539mZHlbuiGJYcwASEAmUDbGufx5 P0ISXEul4S8Xs2sLsK1gE6xEhEw9xM2tY0cQzhJ68HPYW4DBiAlH2NAmAaXViw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758118549; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ftiUiGcyP83PHIERnw6tNsYeB76Wd7gILboepUDAPpk=; b=e7O2heb2MvwN8K78h0lUK1lbRN2vn2vCnnw6Wmq11eI6ZfMY3TyYD8lYE+cG+uMeisFkle mbRDQXzQkMiVE1PL9ifYuSydr86hX/+cgYUZuc+AdFfSAkdvTWyURGwDOwy1mr+Ha8xVXX u1pDw/fYaYi3PZscLUCJcim6l/K6YdlY0/S40mYpkRKt4qyO0VUEs8g78rt5Fi9xSHIrLm eMhcRtWu1zoV9DkY1gppMGC+IRU7PaTJn6KlO9iF/uqPUFfpyhr0O4GwsAtQf0DDt3EQy2 V2O791I29ciB3oNVeTHtT5f7gfgki1fNRgltHsFI6CRXi9Cc2FkMd74U7qBhbg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758118549; a=rsa-sha256; cv=none; b=fYSLxf/HP0s7r8V/Sf4igPh8WMTRJJNfurl0AwVHSFn8ZcKnZRvOvbJOeV0uQ7Ttqah/IW AGRM7Gfjooru8lUJIMezJcUw76EPMdpaxnpIZiwvn1S5LpXXz9KL5VRSBYke0SlbiWC9o3 2odo9Kv7H7v81Ucj59tupekPd7wOdKkyOShpkOgz0i9xPmWhpCZhtKhNxqyuf9ijFrghux geyyApYFVpuv/HrYUJj6MK1iVpIZSzv0qVosFDeD93rIHtJUlSnbS+Y9UnYd2xR8duzP+M WNHjXHvKTDljPERP0bkHrU1KWTfk8Jte3tL6g85/HKODdOlNtMMDoOpucVfD4A== 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 4cRgm52tsZzTJ5; Wed, 17 Sep 2025 14:15: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 58HEFnjS010464; Wed, 17 Sep 2025 14:15:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58HEFnUQ010461; Wed, 17 Sep 2025 14:15:49 GMT (envelope-from git) Date: Wed, 17 Sep 2025 14:15:49 GMT Message-Id: <202509171415.58HEFnUQ010461@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: e63534edbcd0 - main - pf: fix rules_counter:keepcounters test List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e63534edbcd050215bc109cd89a31ba30c5ea850 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=e63534edbcd050215bc109cd89a31ba30c5ea850 commit e63534edbcd050215bc109cd89a31ba30c5ea850 Author: Kristof Provost AuthorDate: 2025-09-17 08:12:11 +0000 Commit: Kristof Provost CommitDate: 2025-09-17 14:15:16 +0000 pf: fix rules_counter:keepcounters test The previous pf_krule_global leak fix was a bit too aggressive and cleaned up the inactive tree pointer before we needed it to preserve counters. Only clean up anchors that are entirely unused. Clean up pf_main_ruleset on pf shutdown. PR: 289299 MFC after: 1 week Fixes: 275ff85b25 ("pf: fix struct pf_krule_global leak") Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/netpfil/pf/pf_ioctl.c | 5 +++++ sys/netpfil/pf/pf_ruleset.c | 12 ++++++------ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/sys/netpfil/pf/pf_ioctl.c b/sys/netpfil/pf/pf_ioctl.c index 5bfbb2c83f0e..bd506c092da2 100644 --- a/sys/netpfil/pf/pf_ioctl.c +++ b/sys/netpfil/pf/pf_ioctl.c @@ -6551,6 +6551,11 @@ shutdown_pf(void) pf_kill_srcnodes(NULL); + for (int i = 0; i < PF_RULESET_MAX; i++) { + pf_rule_tree_free(pf_main_ruleset.rules[i].active.tree); + pf_rule_tree_free(pf_main_ruleset.rules[i].inactive.tree); + } + /* status does not use malloced mem so no need to cleanup */ /* fingerprints and interfaces have their own cleanup code */ } while(0); diff --git a/sys/netpfil/pf/pf_ruleset.c b/sys/netpfil/pf/pf_ruleset.c index 1711e690f6bb..4e16eaa76f9d 100644 --- a/sys/netpfil/pf/pf_ruleset.c +++ b/sys/netpfil/pf/pf_ruleset.c @@ -336,12 +336,6 @@ pf_remove_if_empty_kruleset(struct pf_kruleset *ruleset) int i; while (ruleset != NULL) { - for (int i = 0; i < PF_RULESET_MAX; i++) { - pf_rule_tree_free(ruleset->rules[i].active.tree); - ruleset->rules[i].active.tree = NULL; - pf_rule_tree_free(ruleset->rules[i].inactive.tree); - ruleset->rules[i].inactive.tree = NULL; - } if (ruleset == &pf_main_ruleset || !RB_EMPTY(&ruleset->anchor->children) || ruleset->anchor->refcnt > 0 || ruleset->tables > 0 || @@ -352,6 +346,12 @@ pf_remove_if_empty_kruleset(struct pf_kruleset *ruleset) !TAILQ_EMPTY(ruleset->rules[i].inactive.ptr) || ruleset->rules[i].inactive.open) return; + for (int i = 0; i < PF_RULESET_MAX; i++) { + pf_rule_tree_free(ruleset->rules[i].active.tree); + ruleset->rules[i].active.tree = NULL; + pf_rule_tree_free(ruleset->rules[i].inactive.tree); + ruleset->rules[i].inactive.tree = NULL; + } RB_REMOVE(pf_kanchor_global, &V_pf_anchors, ruleset->anchor); if ((parent = ruleset->anchor->parent) != NULL) RB_REMOVE(pf_kanchor_node, &parent->children, From nobody Wed Sep 17 14:20:21 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cRgsL1Pvxz67T8C; Wed, 17 Sep 2025 14:20: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 4cRgsL0JTjz47Xv; Wed, 17 Sep 2025 14:20:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758118822; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2qGuQCDBpZF/UD7xmpzTdtZKR/rfPlArgfAKVcRL20Y=; b=o4LcAHj/STiRiILKxOkbhQI5Nz/uE7867O5jNS4GVBTnDgULcdc+JHR1iYl3xCm72++MEu 1LVgrsoNIO4mQlWj6nC0cPtm1aCWyTeMaTN691ZNoIzLQrIgbr3urDZbRtb2yZzvEFgt/G g+UZnbnXwL5YJ9JFuABN7j4zemK+dJN0HcfiT8jkHHqKZ8MzUAcOYMfS9s406GKZY9zVVo 7FEHR6AEXUkdgZmUpFhHNsSsJRvGoVg+HHterDpuPSbWpL2QVnDUV2sOfGGZPT7dwTG4vo O2BoHCCoAqR32dt2XscCunbMgA1oPSROV6Zw2+EfBfWnY/1L4tfKTnzIdsFKng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758118822; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2qGuQCDBpZF/UD7xmpzTdtZKR/rfPlArgfAKVcRL20Y=; b=ZZuC+0C+v+uBp6T9f6zNRT+xZDfriZk05xL9Og6orDBg/7GszSFHSY5fLQZHUjqZFpSFIH BrH99OLdKNpflF93jkYykbVSQ8IOFCUS3aiaDONVp+uTEmqe+SVdos1xylZ9wk0hCJUu3a +mLWpfwjz0630iC38bat85Ef0AopLyGFseg+9vdVKjlIsT86pF8m8UAWgKjZokltaBD2Jt 3Wdu7xG9BHdasNMRX5Jm+N3YI06kF6e87ZIWjr7SYNvxKASznSoLp3MsDG1tTMFMD3Wq2o h3KHvu4/gbXTY4g6McOk58eDNWusLteR5GrHKSG4KS8HvUG+I+vw9BnE00kD/Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758118822; a=rsa-sha256; cv=none; b=eSiH5SQHeZ1rl00Eo7ZO3MjaHSkRgQK9Xl8DeOPKZESPlMpeH/xWV/KkqJ9YxpN+qtRu2v wjvaqU1lUCr7Cpf3CPA+BveyKmN/nyiZB1meG7LODE0M1y7NJKOz4TD2SWK/PYHH8sFdST lJy0jp7o635sPhgjjXwVA+GyMfbCBUqnSmV7309xrN8OfL9LGxL03xOYU1zVRMHwlOkgZ4 +rdwz3qjVXESBXWWx3n6oAe6xQOUFc7p3DvWHY+U/a4p6wIVFR8lVgKT2/QNoahV3saEEO xksqPAELATEEor44y+Hm33x0QkFDE5D3zT0kmE5mI9in/9Yb1Jeu5r1qzsD5bA== 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 4cRgsK6VfWzDGc; Wed, 17 Sep 2025 14:20: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 58HEKLc6020910; Wed, 17 Sep 2025 14:20:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58HEKL19020907; Wed, 17 Sep 2025 14:20:21 GMT (envelope-from git) Date: Wed, 17 Sep 2025 14:20:21 GMT Message-Id: <202509171420.58HEKL19020907@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ahmad Khalifa Subject: git: 2b0f8c6907b9 - main - rk_tsadc: use tsadc_temp_to_raw for shutdown_temp List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: vexeduxr X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2b0f8c6907b96a8e150a1250e56d25a7a5d202d8 Auto-Submitted: auto-generated The branch main has been updated by vexeduxr: URL: https://cgit.FreeBSD.org/src/commit/?id=2b0f8c6907b96a8e150a1250e56d25a7a5d202d8 commit 2b0f8c6907b96a8e150a1250e56d25a7a5d202d8 Author: Evgenii Ivanov AuthorDate: 2025-09-17 14:07:26 +0000 Commit: Ahmad Khalifa CommitDate: 2025-09-17 14:16:36 +0000 rk_tsadc: use tsadc_temp_to_raw for shutdown_temp Use tsadc_temp_to_raw instead of tsadc_raw_to_temp, otherwise rk3566/68 get stuck in a kernel reboot cycle. https://forums.freebsd.org/threads/running-freebsd-on-radxa-rock-3c-rk3566-board.89389/post-624890 Submitted by: covacat Reviewed by: mmel MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D52309 --- sys/arm64/rockchip/rk_tsadc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/arm64/rockchip/rk_tsadc.c b/sys/arm64/rockchip/rk_tsadc.c index e6cbad36f697..d83b09480a0c 100644 --- a/sys/arm64/rockchip/rk_tsadc.c +++ b/sys/arm64/rockchip/rk_tsadc.c @@ -484,7 +484,7 @@ tsadc_init_tsensor(struct tsadc_softc *sc, struct tsensor *sensor) WR4(sc, TSADC_INT_EN, val); /* Shutdown temperature */ - val = tsadc_raw_to_temp(sc, sc->shutdown_temp); + val = tsadc_temp_to_raw(sc, sc->shutdown_temp); WR4(sc, TSADC_COMP_SHUT(sensor->channel), val); val = RD4(sc, TSADC_AUTO_CON); val |= TSADC_AUTO_SRC_EN(sensor->channel); From nobody Wed Sep 17 15:01:23 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cRhmj67mkz67XJr; Wed, 17 Sep 2025 15:01:25 +0000 (UTC) (envelope-from des@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cRhmj2vCwz3N3L; Wed, 17 Sep 2025 15:01:25 +0000 (UTC) (envelope-from des@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758121285; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=tKlnl4xlZmQ9st2GpLWsoIp3TfJ6apZDNCXZBgsctzk=; b=WoobLF7jxPoSFwedJzSR3EBXG4UlfXOefUSb2u2BSE3xevEhr31ulLZdXaeY3BvUEawB07 VnObDMYUbVcBWkARULFzXKuYUNT0XvXamCALlPjp6Va6ji92MLthGsBQaTLQ57xqcnPOK1 OCsoyqZxiEK/q5953SCRtqjd1lNKS0EDDKY69vMDwtN6KdY2on+e+NelGbnbOoTg5I22uh pqHOwGpCkXBQJBdFDs901SGznWuCL5gqgTEMXjuPz5hPLllieJnnbz1Hv83YTCL+O9JQ/3 4lZhSkuB6D4/KyZWHIySCAd5B7qARskXhx9o8gjKO2AoI5r+4yiKEG0/0THKMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758121285; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=tKlnl4xlZmQ9st2GpLWsoIp3TfJ6apZDNCXZBgsctzk=; b=sa9tARPInUkbaCXfH5i9NnP3NQwICTyvt2yfT0swFERHdjfbB5m9bx27VEaLHX5fqUpFxD YoqepllD+jT7Lh68DlYL1AiVoxHHlCEHTpOzrmDYSM/X4V/ox91OlzoV23mFE0kQp+5WHb Rmkqw66RRNZvPDswF7QbDh8T/bkcIFPk1L6hfWK5w5box7H1UQyFwryYvxQ1G29C6y0tVW hoRwJKNt2TnWoDrTJjAR45xuUmH80alavGBGdmb8/swp7zOO2wRBqd4/blLeH69uIghpia Ei3BgRMqk/Z3kUGgz8zXBCxa7w0OgfJQxNa3n3DMTGWGPXdIaFCdnU2xUI92NA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758121285; a=rsa-sha256; cv=none; b=Mlw5fQihC2Z5otOzHeyMievW1FRaOQ9osH6Sd3l/vQIONH88pLbAyS/AKXzZMm0UeglwSR k9nAbKbYaD+0H/FXQersTgFU4OTQ14OGGwIH3YCiHAbqcLojEAPA/X7Jw9x/hAR+T7I0LJ EJNI8ViT+w43yc277LfFamdSVsBKrYCJ5NNc4HKltcsVAdggg0pnhDpVadUPsbGZfoVgAM kQermVWd04ri/NM6jvzR03FnB1qlaZwD1w1ZnAmkSA0uTN8gZ1GPi6cHkrmAq6BNlecycs 1z07m3zGhkMgeJO3bI9ZC4bojQMs6ZlT904e/BpS90bMmqFpqUQTsD2H3/GSXQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from ltc.des.dev (88-177-82-251.subs.proxad.net [88.177.82.251]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: des) by smtp.freebsd.org (Postfix) with ESMTPSA id 4cRhmj1SgDz1C4n; Wed, 17 Sep 2025 15:01:25 +0000 (UTC) (envelope-from des@freebsd.org) Received: by ltc.des.dev (Postfix, from userid 1001) id 812D388583; Wed, 17 Sep 2025 17:01:23 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Mark Johnston Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: b2f5dc591ef2 - main - src.opts.mk: Remove REPRODUCIBLE_BUILD from the default list In-Reply-To: (Mark Johnston's message of "Tue, 16 Sep 2025 09:43:29 -0400") References: <202509081922.588JM1NX027953@gitrepo.freebsd.org> <86tt12fs58.fsf@ltc.des.dev> User-Agent: Gnus/5.13 (Gnus v5.13) Date: Wed, 17 Sep 2025 17:01:23 +0200 Message-ID: <86plbpf7i4.fsf@ltc.des.dev> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mark Johnston writes: > Dag-Erling Sm=C3=B8rgrav writes: > > You forgot to regenerate src.conf.5. > I didn't change the default, just where it was defined. Regenerating > src.conf.5 results in no changes. Sorry, I didn't check main, but it does make a difference in stable/15: diff --git a/share/man/man5/src.conf.5 b/share/man/man5/src.conf.5 index d251bf0cd9e7..34be396b8e01 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 September 17, 2025 .Dt SRC.CONF 5 .Os .Sh NAME @@ -1548,10 +1548,10 @@ Do not apply the Relocation Read-Only (RELRO) vulne= rability mitigation. See also the .Va BIND_NOW option. -.It Va WITH_REPRODUCIBLE_BUILD -Exclude build metadata (such as the build time, user, or host) -from the kernel, boot loaders, and uname output, so that builds produce -bit-for-bit identical output. +.It Va WITHOUT_REPRODUCIBLE_BUILD +Include build metadata (such as the build time, user, and host) +in the kernel, boot loaders, and uname output. +Successive builds will not be bit-for-bit identical. .It Va WITHOUT_RESCUE Do not build .Xr rescue 8 . DES --=20 Dag-Erling Sm=C3=B8rgrav - des@FreeBSD.org From nobody Wed Sep 17 15:07:37 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cRhvy6hpNz67Xpq for ; Wed, 17 Sep 2025 15:07:42 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-qt1-x82f.google.com (mail-qt1-x82f.google.com [IPv6:2607:f8b0:4864:20::82f]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cRhvy4lNgz3P6S for ; Wed, 17 Sep 2025 15:07:42 +0000 (UTC) (envelope-from markjdb@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-qt1-x82f.google.com with SMTP id d75a77b69052e-4b79773a389so39252041cf.1 for ; Wed, 17 Sep 2025 08:07:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1758121661; x=1758726461; darn=freebsd.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:sender :from:to:cc:subject:date:message-id:reply-to; bh=0wn9/xxLTctLhq0OPwKnow9cDLyDaz+yiTCKrWGd62E=; b=OBu37fzZ6AtAAl3WMpRNUbPwwZwmHKMSTu3OA1ffnSTI805LXD642Y4/7gBGkvJ0N7 KTh912Jcszf/Wf/2bJ806JlP0YqFUxtKvoFgeYm442E2wFQ4FAbLRCeOpyVfw61OrQzr x0c1CNGsIE4O0IackgZ08vH6Oersvrv3qx8rutiFXKkfswTdFNxl97eywIehH/fblH/a 7ULEUo9LjlkYTzyHgobHO21nGH5NXsBHrev5JAQAndzAHLCkri/crV3q7EKugpALTDGY CwtvQIFjKnlyJKMKiHFxfJMBn6Z2U9aaExSZFUQlU/ExH/iP5pxGjedOqFrK+u75z5id ognQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1758121661; x=1758726461; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:sender :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=0wn9/xxLTctLhq0OPwKnow9cDLyDaz+yiTCKrWGd62E=; b=SsDEkQTq7LVFC9JLFqS5qM0+dMlKwdodvIOVKIDOJK1RYXYlM6QofgjKWW/A9pF8/G 4jSenn1IlGdRHx059pj9KyD7OFJmfT+tsXoi2+veRdQJZiQhJ4KeiDOHpFfR7bmEZx0l P4++EIvqgTPpTToisuZDRcXjcneUAoLW8nDLbY5o+k176uKxLcIodcdZlQv9OJTDGsEd BRHInV7vBna6mhLcgmJVixLAwLcdcVyV13BE45G1D7maaSxfHh4wlhSB6eR0+XBTqKir pDtf1mdWDHSTDjtr1L6xQ2tCKjklv25micxTxt/B/bIHsTZnLHOBHOw220rh05uDW7rj YCWA== X-Forwarded-Encrypted: i=1; AJvYcCU4N4UrUW7uMfNoUE3YsDiyx2G1oUWBaty3VsZfsH7B78bv3S752D/Njjf1fpNTCz3PFTNsTIIipJUKh0ItopAyljbyDQ==@freebsd.org X-Gm-Message-State: AOJu0YxhOUuEZvGuot9MmtK8q+HjVwupxZ35ZiIJgUGdEVH4Srhcz8nf xkX4B6RJIgspT3hIvM1f6kHPl92Tnla/14YP79ln1gaeFxoZu9bAsAzg X-Gm-Gg: ASbGncvhi4XUUeyfS6sLwxCmpVrXgoIr/s2KxePLedD+83hGu6L5h9cLoH+3miX5bTf G/dcanoxkc2c0mbZ9iaMEzpWw9IpcO/9SCBvrwJ0SinSI7wIgVjN1sFdMmLUcTRdWUM9WY9jL2a /O8LNihndBvqE5g3elPb2uJXLc/ay056imBLpnMf6kIrazOkQ12F8l/GVEDKMODUlyhpkfHb0xO 5CaKcAniCXTkw3SFoRSxReeDUJfWgRWhoOBDRAxarcLDh5hk/OVuXBnGS1HGg+UAaMj5a/VjSJr LdFqABwd3rq4LNYn66N58C/CjQxxp0JrkEZtQ9ckmFNnaLbCvzrbR49mxFEIglNJYad16mIuWto Yi6KNdGmHlpbTQMp4oFPLRzQETo0b0GVTAs1J X-Google-Smtp-Source: AGHT+IFoAxZKPQ/GIWadh3IF6AJWsrFuig7Q4Or97Y77+ap97+nSKWDRGFnwR1Urcv+C+GowJ+GRUA== X-Received: by 2002:a05:622a:1393:b0:4b7:9b01:ba3f with SMTP id d75a77b69052e-4ba6a201c46mr28108631cf.45.1758121660371; Wed, 17 Sep 2025 08:07:40 -0700 (PDT) Received: from nuc (192-0-220-237.cpe.teksavvy.com. [192.0.220.237]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-4b639dab2ecsm100783101cf.30.2025.09.17.08.07.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Sep 2025 08:07:39 -0700 (PDT) Date: Wed, 17 Sep 2025 11:07:37 -0400 From: Mark Johnston To: Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?= Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: b2f5dc591ef2 - main - src.opts.mk: Remove REPRODUCIBLE_BUILD from the default list Message-ID: References: <202509081922.588JM1NX027953@gitrepo.freebsd.org> <86tt12fs58.fsf@ltc.des.dev> <86plbpf7i4.fsf@ltc.des.dev> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <86plbpf7i4.fsf@ltc.des.dev> X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4cRhvy4lNgz3P6S On Wed, Sep 17, 2025 at 05:01:23PM +0200, Dag-Erling Smrgrav wrote: > Mark Johnston writes: > > Dag-Erling Smrgrav writes: > > > You forgot to regenerate src.conf.5. > > I didn't change the default, just where it was defined. Regenerating > > src.conf.5 results in no changes. > > Sorry, I didn't check main, but it does make a difference in stable/15: This was addressed by Ed already in commit f9d8f808b23fb9f4ee257e0ed78ddc4fa6882967. From nobody Wed Sep 17 15:39:30 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cRjcg1h1jz67bVQ; Wed, 17 Sep 2025 15:39:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cRjcg0kKZz3Wjj; Wed, 17 Sep 2025 15:39:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758123571; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kbN+J9NgQoalz5f/07AAf5G/hyMMGNhFBELoal4p7kE=; b=evdnap3a9o7ycm5TcqI3uzWvNiXcVH24o5xdsrufDstmQh9H1c3X1ayTJunHaDIIMi8hsf j1h43dJ3gU3EnY4tB4ewUM1sziUtWyCVPEhbb6dtS8LPISYueyvu5teaEuaaRRmuNL0H8S ZYwO7qjhMScxiIIAGJMTl5G+k/XyGeXtnVwVrXqcDGnyoi4jjEsPkGG7dpJGxsCu6j/vGO JYoi7YKbXnVHya7uG1qULHk7vFF/eyn+R2kCTKvk3WszzSQzYm5GOsiIUf4qIp7vPxcwip U95d+VZSCQMVpcbNPzzG5W2+bIwQEH4F9zSHdjkrqYzibb/osXQq+LLGQHe5rA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758123571; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kbN+J9NgQoalz5f/07AAf5G/hyMMGNhFBELoal4p7kE=; b=JgGq/I4kbL2ZBOnzgTN8fchanxONUgP6DynnldT9i82T+BIZWUzwUnAjUNtXihEmJr8d6n aT5mrewroDsWaF4cWre5LsLTFCGHHJOObkMJGwCLHHce7AFTINZsO8VyoEq2baFgvwqgde zu39FXH5orEs1xwqsOOHZNOVbJ3JMkld6kP4pyTyvbUKZ27IaPswsv3itziUoZeXFKSDoT UfhMCY4zD2nGBWHmX/UDPvWh+8Ww8IToEbTuPoY8tgQGxcJjtF7Vn40XWB7tb1pera+bVI qx14gT1LpuDgFwJLfxzL5d9tl0fyqAvmzUP9//3rTJ9SI/eVho4ew7ZoqYKtiA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758123571; a=rsa-sha256; cv=none; b=Tmqot6UJCba9dc6T1CT3OwMV5quTrVdPWr0zBKGgQg7sU2LKqgUMplrF7bIoNqnjCnsWgH rXPGzWWqOAvTJ5BmoR4Tw4KOImH+K+/LzwFbR0cg/jnkp9IpgqNEomKbqwx6y/qSuJBuFL 3KDnBxFBewObESLrKPcZc6TMUA/iUsj2pSpCB3YTXJeYQN0KnQGzBFVM9D4RmWjoBlQluV EQJZ2/yVFQU3ZUnbjL+jKa5NFgrY1RRY+f0vhBBfJFWexzwF4Cx/0j5y2S4OsYHi+WyBWh IcOtXt8A4VtSNtyMCbc7HfpSJZWyq5d32VZWfdRDqunnDSjxj/7+cJmuE4F+KA== 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 4cRjcg039bzXZy; Wed, 17 Sep 2025 15:39:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58HFdUd5062076; Wed, 17 Sep 2025 15:39:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58HFdUA9062073; Wed, 17 Sep 2025 15:39:30 GMT (envelope-from git) Date: Wed, 17 Sep 2025 15:39:30 GMT Message-Id: <202509171539.58HFdUA9062073@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Ziaee Subject: git: 3049b2f5115b - main - vnet.9: Rename vnet.9/vimage.9 to VNET.9/VIMAGE.9 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ziaee X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3049b2f5115b3b4aed202274e866f360fa2560d1 Auto-Submitted: auto-generated The branch main has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=3049b2f5115b3b4aed202274e866f360fa2560d1 commit 3049b2f5115b3b4aed202274e866f360fa2560d1 Author: Quentin Thébault AuthorDate: 2025-09-16 02:38:18 +0000 Commit: Alexander Ziaee CommitDate: 2025-09-17 15:31:37 +0000 vnet.9: Rename vnet.9/vimage.9 to VNET.9/VIMAGE.9 Fix crossreferences to VNET(9) by correcting it's capitalization. MFC after: 3 days Reviewed by: enji, ziaee Closes: https://github.com/freebsd/freebsd-src/pull/1848 --- contrib/kyua/doc/kyuafile.5.in | 2 +- share/man/man9/Makefile | 4 ++-- share/man/man9/{vnet.9 => VNET.9} | 0 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/contrib/kyua/doc/kyuafile.5.in b/contrib/kyua/doc/kyuafile.5.in index 43f00816d407..a9106e95d790 100644 --- a/contrib/kyua/doc/kyuafile.5.in +++ b/contrib/kyua/doc/kyuafile.5.in @@ -485,7 +485,7 @@ plain_test_program{name='the_test', .Ss FreeBSD jail execution environment The following example configures the test to be run within a temporary jail with -.Xr vnet 9 +.Xr VNET 9 support and the permission to create raw sockets: .Bd -literal -offset indent syntax(2) diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile index 30f41073bcbf..fe764e7c4ed7 100644 --- a/share/man/man9/Makefile +++ b/share/man/man9/Makefile @@ -417,7 +417,7 @@ MAN= accept_filter.9 \ vn_deallocate.9 \ vn_fullpath.9 \ vn_isdisk.9 \ - vnet.9 \ + VNET.9 \ vnode.9 \ vnode_pager_setsize.9 \ vnode_pager_purge_range.9 \ @@ -2474,7 +2474,7 @@ MLINKS+=VOP_OPENCLOSE.9 VOP_CLOSE.9 \ MLINKS+=VOP_RDWR.9 VOP_READ.9 \ VOP_RDWR.9 VOP_WRITE.9 MLINKS+=VOP_REMOVE.9 VOP_RMDIR.9 -MLINKS+=vnet.9 vimage.9 +MLINKS+=VNET.9 VIMAGE.9 MLINKS+=vref.9 VREF.9 \ vref.9 vrefl.9 MLINKS+=vrele.9 vput.9 \ diff --git a/share/man/man9/vnet.9 b/share/man/man9/VNET.9 similarity index 100% rename from share/man/man9/vnet.9 rename to share/man/man9/VNET.9 From nobody Wed Sep 17 15:58:31 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cRk2c0Y80z67cbG; Wed, 17 Sep 2025 15:58: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 4cRk2b6yYmz3bXt; Wed, 17 Sep 2025 15:58:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758124712; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LGdUwJ8Wo2yxeyTkB0gi59rS+CRLYnr6qJUX2+qCoPk=; b=jeOXP4PZ/KoMSnQZdcIvvQ7tM5tgi1UFVyqJrN1BsXf92sYKFMLnifBttXJu9epVP2Jf56 Ch6lZYXanWYMUDdJz4Sc+Peq62T07E/z/oWM47G8YHf2NW1oUrzKOlooNjvWgULV7LVNFu CNp7F2Mghsrl62A37zKEG529FOF3rCh3u1GWZVnsYkDZgjwyKU6GZABI0Y9JFhRVyiSQ7g 6I1eyk0vpATH8o/jhdKPq/SVHhbNQW31r6536eTToCDaa7rojgiK4R4ozSA3Gmz9115FPg zEYbsYtZlI5qdwAfuguYfGNknnS2c9fqgjqyK5mgtQkc70r9kXbi8/Pd1SbGKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758124712; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LGdUwJ8Wo2yxeyTkB0gi59rS+CRLYnr6qJUX2+qCoPk=; b=m25gPDIV+t5+kYLpGp7YpBXeO5jUnIZc0RDmtN1wlnqZGQGCP5EKVYCTlN+WBfsNtdzXjJ /VbZV6lidST+XJc4AWMzbwLcgrwT+fv+FUqNpAuoN9HXB2oazrl6aWtuebqMwF0eWwjBTn x+S3V2xlAoX6O23vD0tCCyat1zt1i0Nu7/+T3qMTCqBDoot9HpamNnM0LyzutXjFj7Ff/H xoDw3nA74Bn7LSTZpmCXF/Q3NABQc4rRdQItkvvI6sJhFOaFP9H3tHbee4F8bA3aLByq95 CL/T3cgrwXO1voDPoBD4MmaMg79xLQ0UopTFpqa2/ej5vbYV2yBSJZ49yLD91A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758124712; a=rsa-sha256; cv=none; b=I4xuUVVhhEHAQ/fNgi+lB1uzlMt06mSRmTv7xR6MIKVhaFgwIKx3nptrT8FKxRi0J5CKLi 4ScR1TlbbFAxwmlxZNmMySVA6ydtVPwWKDCbiZjAnWywSMl+ymebkUHH0tviAovhxERDUT O5sTRcJDgK0YQZlkJbhZB2+9RlgVnD8zouRg7JbrCX63KRFadDhsSrF6Yi+TEuVwrsiTSA RJYhhChmN7RLUgPwnuX6nbY0gQ6s1YqqkF46lYdbkh4tQSXyzMpQV6BrJpSSN6+DS0AhbR mY9lTdcOxO4mtdxXPeJlH9K2N9fTcV/sR4W72FZtLddxqdBzrSDKB+8LGlPcyw== 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 4cRk2b65MmzYmk; Wed, 17 Sep 2025 15:58: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 58HFwVXg098832; Wed, 17 Sep 2025 15:58:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58HFwV8R098829; Wed, 17 Sep 2025 15:58:31 GMT (envelope-from git) Date: Wed, 17 Sep 2025 15:58:31 GMT Message-Id: <202509171558.58HFwV8R098829@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Ziaee Subject: git: 08d41d8803d9 - main - ObsoleteFiles: Remove the miscapitalized vnet.9 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ziaee X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 08d41d8803d9dd49b709518e8f2ce292b59e9828 Auto-Submitted: auto-generated The branch main has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=08d41d8803d9dd49b709518e8f2ce292b59e9828 commit 08d41d8803d9dd49b709518e8f2ce292b59e9828 Author: Alexander Ziaee AuthorDate: 2025-09-17 15:54:13 +0000 Commit: Alexander Ziaee CommitDate: 2025-09-17 15:54:13 +0000 ObsoleteFiles: Remove the miscapitalized vnet.9 MFC after: 3 days Fixes: 3049b2f5115b (vnet.9: Rename vnet.9/vimage.9) --- ObsoleteFiles.inc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index ae83035b5de5..76e2027d9af2 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -51,6 +51,9 @@ # xargs -n1 | sort | uniq -d; # done +# 20250917: Remove a miscapitalized manual +OLD_FILES+=usr/share/man/man9/vnet.9.gz + # 20250911: This tool is no longer needed OLD_FILES+=usr/tests/bin/cp/sparse From nobody Wed Sep 17 16:50:20 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cRlBN2rp0z67j6b; Wed, 17 Sep 2025 16:50:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cRlBN2FDSz3h0H; Wed, 17 Sep 2025 16:50:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758127820; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fVIUpQmdxIMWrOQfeR9t9ppMCeKHWtUlTrg1OF5KJwA=; b=oBJt9zOJmlfnSODfZA0nGNoHmNCBboQ8nO8cwrQRpOLo8rzLX+VuCMm38wq69yDBaTHWXm O/Z4OkX83lqmEUoK6KDatmCAdzhRXPE+u8FEs8MgoWxs8Ao9mOIT28JH2UbL3aIL6gIbcN 2Nx42T0IEZBqXWLe60wOLgoy6RAz7u9ihdIWk+KRKnevns2aswz4xSP2oFVN2lOn2uPWBT Z+v1d791/0Mpl8HdSVy5RaSArl/WRJpA6HyxGnyR7/gH31344K4TL1i5vPH4noQ7OK0hQY Fiyf6yt3GSulqnvR9UYwbmYCVFAAKlpApt6pRigvDVulURSsoWjbjVpb6PSoUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758127820; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fVIUpQmdxIMWrOQfeR9t9ppMCeKHWtUlTrg1OF5KJwA=; b=eJI3YMqQ+LI2+/QobqYAyyQ52LixXIuLmjPaJ4yToh9O96HrGudl8BFJbYnuBIlGRcjdvg pEGDu+Wl/gNg2wM9fVDCGbX3ne5ddzQ2ybn2VN8OS9JlJa7qcmmUVXZKQuK2ZxaXd4KbrB awXwMCMpG7vB2h5RfHuOKkqdMquYZOUEEqHlgp+DmPBlbNTWHIaAhmtxVQuTTKKazxLF7A S/KrfGnxgxr2L6xzqu75qdeDFVydIQ/mHvACI4Cw/97kc3tyDN1lKH905ouM56iDvG6JaH WsWs32VCHPxft1hDDZSZkBiMfEn1TlNgvb/VkGRUfpJQ7A7D14wQes3pJeoImA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758127820; a=rsa-sha256; cv=none; b=Nz/IgRuO8bUPLvq5pbUPYRzbSfxnSGz2jYfmFK8lnY2L1GAprfsnQ24Jy0u3OwNyA3Bcd8 L10TiE3D16rjxv+ztPrSMEncjxq2oZsyoKPDQY0C9he8sFub1n6Wj/Gcoy5CCk6Ys8SSOi S8KMwyCU8pPXkMohezuBMTT6eCS3Vy30bhpMscvAbrcrq4C4KoG5q5Bhj2WdhfiF36hQY6 M3iWaIEedHfRnMGkzOr3FdLQJ4HtzDKjfpA+wohFUl3ol0NxNFLKnlhP9cNu2xkx02wLMs Z6SxZWhe5CQWA3ItM3pC/jJSAcLYff3g+uTZ2nVbPkrK7j1loBIOVNlD/aGgAg== 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 4cRlBN1ddbzbGq; Wed, 17 Sep 2025 16:50:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58HGoKWB003068; Wed, 17 Sep 2025 16:50:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58HGoKrr003065; Wed, 17 Sep 2025 16:50:20 GMT (envelope-from git) Date: Wed, 17 Sep 2025 16:50:20 GMT Message-Id: <202509171650.58HGoKrr003065@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Zhenlei Huang Subject: git: 2d85bc89294b - main - witness: Record the first acquired file and line for recursable locks List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2d85bc89294baa04daf509e81ec3880bff79cc10 Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=2d85bc89294baa04daf509e81ec3880bff79cc10 commit 2d85bc89294baa04daf509e81ec3880bff79cc10 Author: Zhenlei Huang AuthorDate: 2025-09-17 16:48:54 +0000 Commit: Zhenlei Huang CommitDate: 2025-09-17 16:48:54 +0000 witness: Record the first acquired file and line for recursable locks and the last acquired file and line to witness object. For recursable locks, unfortunately current implementation records only the recurse count and the last acquired file and line, but does not restore the previous acquired file and line on unlock. Hence it is possible to report false acquired file and line, and that may mislead developers and make the report by users a little harder to analyse. Since subsequent recurse locks do not affect how witness order check, record the first acquired file and line so that the logic is much clear. Reported by: bz Reviewed by: kib (previous version), markj See also: https://lists.freebsd.org/archives/freebsd-current/2025-June/007944.html MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D52496 --- sys/kern/subr_witness.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/sys/kern/subr_witness.c b/sys/kern/subr_witness.c index a65c3ca128d9..c937f6a82757 100644 --- a/sys/kern/subr_witness.c +++ b/sys/kern/subr_witness.c @@ -1515,6 +1515,10 @@ witness_lock(struct lock_object *lock, int flags, const char *file, int line) else lock_list = PCPU_PTR(spinlocks); + /* Update per-witness last file and line acquire. */ + w->w_file = file; + w->w_line = line; + /* Check to see if we are recursing on a lock we already own. */ instance = find_instance(*lock_list, lock); if (instance != NULL) { @@ -1522,15 +1526,9 @@ witness_lock(struct lock_object *lock, int flags, const char *file, int line) CTR4(KTR_WITNESS, "%s: pid %d recursed on %s r=%d", __func__, td->td_proc->p_pid, lock->lo_name, instance->li_flags & LI_RECURSEMASK); - instance->li_file = file; - instance->li_line = line; return; } - /* Update per-witness last file and line acquire. */ - w->w_file = file; - w->w_line = line; - /* Find the next open lock instance in the list and fill it. */ lle = *lock_list; if (lle == NULL || lle->ll_count == LOCK_NCHILDREN) { From nobody Wed Sep 17 18:38:57 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cRnbn3mhTz67rTF; Wed, 17 Sep 2025 18:39:01 +0000 (UTC) (envelope-from flo@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cRnbn361mz3wcQ; Wed, 17 Sep 2025 18:39:01 +0000 (UTC) (envelope-from flo@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758134341; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=AfrcE9xm1KOzEoURRkilib3cgY0wQr/M/h359r8WI/A=; b=KGhXBVK8CpKOtrOGbYaWGkLLsh+zrc1imIPvZELn0xiW6eZm9PPLfUgbgraTFAqSGK6bAo iRtMtso3ME8eD7q7ALq0IgWQI+189SpA0+zO+pMCw6RLTG675Dnh8Bso6rmSobVTn1mmQM aQcGGG4zuewwbMB7eP0R4V+y9Z1MbVtlmVgruagZa/YQ7Cd2NqBLjetinECrZTHcoXNm6k bUYhUvg5BSVQB/Z8L28Zv8db+DIj1xc2agKbZ+q60kboeNzGVfB8issZEXKRNnezpjzBN7 bZnGKSkCI+B2vUCqYxZt65OE7fOErgcGXTVLfUdHNDgr6Z0e5s+lnhWFqKCQzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758134341; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=AfrcE9xm1KOzEoURRkilib3cgY0wQr/M/h359r8WI/A=; b=nMHJy5hYZAuLb0TBBnllfjmASkuY3rbrEZ5bauIMdLOMn3F2W1KdrL5dGntZKX4ildpMA4 4AxOKu/7TvTU7SnHxftLQKbtGXiKDHpnV9f6d5CZPD1P/F7hZTOEESGZDsOmfSNtIJL8JP 51+6x74xarsTclDI4CYG4Wk/oAsPFSgaAcFavPNEbZCGPhzAJzysvKpOeC3OGXv8e97nmr JZ7pbzgpAhnW2+z3abWh0W3Hb9WTX5GPQygrUWm9RtGQ/BRE4Jt5cKptmRbv2XUCKK50t+ n4I3H5/6c1JSX2Bg19WStgAal7VotL22yXLeA1Y2rElNuawMvV5vTXl8SghmMg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758134341; a=rsa-sha256; cv=none; b=x/WAAjSCOGjqPk6ls2iHX8eqUn01tFStLz7PXHFxZvQk1zbwpu5QOYMBpcBKtYNUNZQXVZ 55R+KMZMBxIh/CFe9RwT94xn2ezugum/tHAD1Eq2kdDc59RzhRL+MVPQSJ14WttGUcXu0g cqZ7o3GqUTfL8S/erg504iH6RsUArM9VqZjEoO2htixVg3vP9hl3TcnXUg/BJl2PnBgVw7 ZRjpt2dya8B+FQA8cBqhfvPwQHR8aixKBHb9FJB/5Tnv1B4BkUR5hFpxkX3/OHGtUJgt9u kYTs5Klnu9vD8b7L3pkG5hrX/mb/PeA36sbBJWcQocPcTXpWsDRmaN8q9Hhrag== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from [IPV6:2a0d:3344:15ac:6900::19e7] (unknown [IPv6:2a0d:3344:15ac:6900::19e7]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: flo/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4cRnbm5PKyz3F6; Wed, 17 Sep 2025 18:39:00 +0000 (UTC) (envelope-from flo@FreeBSD.org) Message-ID: <4fd761a0-b7ba-45b6-8e9e-e6b696a241a0@FreeBSD.org> Date: Wed, 17 Sep 2025 20:38:57 +0200 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 9d9bc7f462bd - main - pf: set limits before rules Content-Language: en-US To: Kristof Provost , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202509171415.58HEFh9g010282@gitrepo.freebsd.org> From: Florian Smeets Autocrypt: addr=flo@FreeBSD.org; keydata= xsFNBFpyBwsBEADLq0c46orEtbMn4SptX+VJxR1wB4YwaErZme1bqF4nZHIhlRNET22HsHdQ doagaB4uACq0Rj5kHcu614ZnnNkLPyCxWQATx+cbdiFO4/hfT8tAvKnBtiy3awKJ5uGCNO2E zJwXW6KwdDA8XPRySqN8m1yPl+dW0Cls+/vO/QL/6+YLMupmEpSvFxRzAZTQuKyX4+xl+dYI d24JiPd1yfCuDNOY3+OZ3QBMT00u/699N8lUWRtiTwaQMwAOww8r/26YM6/SgcgFuLH2E/CV plY0sDvfoISlAj8agxdomNXfPjCMQ6w5yGZmA+huFpPCVBTi3on/SWgbQO7dLVpN4BNPuScP osCb/dsOg0S74zCClsIU3gdUGh9rwJY00/Ebid6V0R3c1Czwbg8LQedzlGDuXYXmzp6W2ujg r1cqbUD6lUWikUv2IMdCbb8MxYhHLi3GYUs5Xpi+W7vM6T45KbuMr7O/1SjtcGOlNeDvGNgj cDk20fOgPPZ+M6i9vX5Q2oI9HoYaeTiYNwILkBLVP/L40kTo5EkiQOt4OW6BMbylqXPOaQMW uGVbmhCJQpbx8Vo80s2yiBBVWkLkWQIcIm3KZlLldJqKEFpQBWLBE1eFFqboYgAWzFn73CaV 5tihobijMmmOV3a8cI1fI4kREyl3g+8bW+O0u3m3tuzVOpDpjwARAQABzSBGbG9yaWFuIFNt ZWV0cyA8ZmxvQEZyZWVCU0Qub3JnPsLBlAQTAQoAPgIbAwULCQgHAwUVCgkICwUWAwIBAAIe AQIXgBYhBOyzaLh5CL+2kU1yae9bpNzVqfPABQJlmq1gBQkO64zlAAoJEO9bpNzVqfPAU3YQ ALit2AZO3MDHjKG7qT/43hSOnN3BoxRgRFz63N+bFR+tJlTE7k0SA8iephy97UKbf55wfQB4 v07q7kp1VckuJvorsU0ygCA2AnjNPRnGG3VyRfaJKBp22sGICDiMVe/c/SvCy/877A/tFVZj Z2rxTWNlT6i3In3YFae48OxCL8FfUFF+37tGmwj5PWi3lIpOKeuZLW0KHebXKCqpzIRcnjHO E7moQILrFsXvmay9JVYclNrDNIaePWuVlFNgFYMsF9+ixn3f7lTgprIyljS2F1fxpcBIR/Kj JFsjXl73IyZr3PxCBq8mpCi6ukD/58UFCvB9VRXUkAqm8k0eoBe61RlRoXrZlSmIq8qT0K97 tqFLpFVRylHnZEsjhxI6Drox+910LyF9rAZDS1GgDpyAd2qE7AgijcpFjpeYB480ZGgnRtEp 3v8MbGNhne7Og07hT1yB9DUoiM9gLxapLSujp2X6QWRONaLvv0Kz7BuCOHbMaol4YpjABd/4 3i5jnAsTBkBm6jsmEPhK69Vxsrkqs7E7OZOBnVdCR5HGZNq6Nss+dRXFHxGTyk+98ADLWl6M tQxZE8jYyxPzow5wNgkOoGrpTgQp0lDefI9pQhZFW77HZaBbbaffBAfISXWONmut7GVjb0oN xhW/OA/oQSiWYIP7c4JOWZ+apAZQtqNxYCWbzsFNBFpyBwsBEADR6zpub8nSv4o9c5A8i2c2 6IJOc4zIeqAK93B+KBmyRzy5chWUwlQWFMA+JIejVdbCrmTnl/2soMlYNUci7pZ87HOmI1zi MZaoakMBiPJPLLACKTEn9Nve/NQjRdhwuNgqyXh7VzTjQzTo7DLqMc4Gvcy0AoeIy05RP01C aOilQAVgVUbU1Ydme+6SrTe49jTxQR76eytFh31fk2J5bII4VANAAmZ1HR0tmEcwYQs80Hpb ncQc+eEvcW1KtZn2X1cfAGwBlxds8aOvJ77wACZ+PB4gUt3TIQhmCQ3WXY2ukHVBT4npopzs cJFMwqpisZvgI+1ErntUm2WaicZjCNXheDq5PwSSSO+GfxZyYGEeFJBIg9yfylKHEAiB93Wg dfvwl5YffSG+wD/kBripN75zR4e1QatxPlQIjOS1NAZoFvnHUTx5IsDO7A2tlZ1d1ar1e0Jq DCpxxc1AejZ/LhPompKeSfNT6+vJAzqu5C1t1JxpoNT1Km7Jwmk4piW9yQGFszlv/QmHD5Ww HSKovsB+zDqHi/jwPfQN5Fv/PNaxpnjmBc867DVS7XmvgCX17aeCzeYDlSDyKaLwjUlV1xCo Je2uL41Bs1Qc6x+z80/pOF1BEMDQgAnxmcRBMbZ8tfW477pmdK7/gBAB77Fkilx1FScyDY6n fVIqGhGyhgD5TwARAQABwsF8BBgBCgAmAhsMFiEE7LNouHkIv7aRTXJp71uk3NWp88AFAmWa rWAFCQ7rjOUACgkQ71uk3NWp88AgbBAAtHmL+mDSRzHYBgG9thI9cDr7M86uvtrAz1xjE8gl DEzqu+/XHNcg3KyoIjDzuipoPrpt73lLv+k67sfLY8YcaCq0WfP5BfJXOZcdpKzxQyaKI5h5 RDQsjEzpSESdDO2YCQypA9KRMJtI/VIJqxZglOp/Vh4aaF1t5Bi2NDNyAMHs8kToNRn56W51 72Lp9sJh9zrpA6DhJLhSWCc9tlzUWQUIdv0Y7Z5U5epfRuWTjYGSSc4kmve2eVBLIN+RMrRH kyVXIoj9AVwVoGMBPtHEYejBImOdV/oanW1EN0VNbQDAuRxhgrUfZR4KQY9GU7QcV5zn1zVh w0JLMIEqxFB9Q0TnMewTSXb482DM7cL6I3iYDoEjPkQOoYP3t9Y6bfF9h02LjVK5xNZ2qJ2r KNxGjV2BNk0NLfRBncVkX6BJWeQ1KBTEymd/8rD0vQprG9Uzqzth77sZoW6/983y1yMlsuer a6qqdH37m310/Gr3TQTCcGY3D8T27MUcLZXtw+MrbctKg8xe4CjHePODrQRrVuAuEIbHlOcs iQVw9UriY2SqHYsKgbVlIDdSZH3qbRrpLpQfjcJlQvWK4b2I1wQ69BDOjreN5IOYxhXRzgIX 86nrZ3CioiVFVBw4PoKMXo2pjbDavPMXZ8dUA7A6rmQPFHQ3S4HfIgxsh005YKJD2Zc= In-Reply-To: <202509171415.58HEFh9g010282@gitrepo.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 17.09.25 16:15, Kristof Provost wrote: > The branch main has been updated by kp: > > URL: https://cgit.FreeBSD.org/src/commit/?id=9d9bc7f462bd152d87ab8f1767cad19bab09bf8b > > commit 9d9bc7f462bd152d87ab8f1767cad19bab09bf8b > Author: Kristof Provost > AuthorDate: 2025-08-25 13:43:10 +0000 > Commit: Kristof Provost > CommitDate: 2025-09-17 14:15:15 +0000 > > pf: set limits before rules > Nice, I ran into this issue recently that the ruleset would not load on boot because we load large tables. I set a higher PFR_KENTRY_HIWAT as a workaround. Are you planning to merge this to stable/15? Maybe get this into 15.0? Thanks Florian From nobody Wed Sep 17 18:58:46 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cRp2l6W7kz67t3F; Wed, 17 Sep 2025 18:58:55 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cRp2l615nz412N; Wed, 17 Sep 2025 18:58:55 +0000 (UTC) (envelope-from kp@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758135535; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=HhTqykRNumS8O70ogjC25dZ3dOhb8VNljI3mw0rIJP0=; b=R19UX6tZsYmg2cPbo9bHYNOjs2KM5+Ux24WkmfVrc0BJSiXz2gGglNhcrM/fXpOjXlh1WI SxXd61Q/axgwtVhSCUrD1M5zQOBD9VaM3Xt5w6YTDP4SnTysw2G6vKvGoKQ/MSz5aW8ClK kjvS790jL+QUAB1+zEnyBiqi8U8oEgajakWE2EBzxcGG4qQDDjTuFYNvy4XEM6XxJJ96jW /YkqbK2ZI4t4IkBiaz1mGsY52Nkt0lOKakRTQyHrzrp7hdgtAwkmT+vh6VoqNThaMQ2Say joKxek1+iDuU2/gQIiHOGO9nzR1sNUZjE33FKAJiGOkr+DKGDWyhQ/xAT4Kinw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758135535; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=HhTqykRNumS8O70ogjC25dZ3dOhb8VNljI3mw0rIJP0=; b=FURKoBnXQ0QYo7VOo+x7AEvzEchDq7RQ5TD+6j/DdZN8Qxq7cJ+V1pBrAFXjniR7tliC6D JXlrWpifrQoS0ZMLx5eSK5SNK2zmRTkhujn+/iYio0c6/HI3lK1slrm8nr9UMt2KLMi6N6 Lm/rF9NK/hsXd9mo0MQezwoinIg5oArlzu6NnOR6RYcJXAkrVOvTohbJlyac4OcUnG3r2J vhE/VF3PO34Y9h/n4ZrvbKnJ2sd1QjDFkW5ZoW36BPAfu14r1G0IeLrGKHD45bu5V3hTsn OwkY/QIW5Ne93YFBMo2qkWGrqRxC5AJjTqnJov1qJfz3wYLOEuJBL//sYIo+xg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758135535; a=rsa-sha256; cv=none; b=t0vDtKYz7mXYwmGky7frvC+r9sXgaRfaaro6eShJq3teU18yuaze1ljHAhAdYbm7pghV8U 2lbSAzPdfZI44zpDTuMACpW6Ep5uEYO1naEaX8NhnbMm+7QS+XFl3pdFMUh8vabsY1vifF Uur6lKg9dBzQQxFkabco6L9/jS8XcISGveWrTGFT7FRG9b09Zp02x0qDog1WVvwS4Q2VIj qPtqpxRbXZ6lFVFuh+I9rPIrP8ID99Iz+5VfK0oMRBtTPkM87j18NqL/bsuuYtXjiF+paz ZnJyTSpeKiMZnUAtgw25cWaUeVolcuLSsOwKDy62q2lzcKrpm2mWo7nT0sx0gg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from venus.codepro.be (venus.codepro.be [5.9.86.228]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mx1.codepro.be", Issuer "R11" (verified OK)) (Authenticated sender: kp) by smtp.freebsd.org (Postfix) with ESMTPSA id 4cRp2l4f3gz3FS; Wed, 17 Sep 2025 18:58:55 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: by venus.codepro.be (Postfix, authenticated sender kp) id E6D313FFE9; Wed, 17 Sep 2025 20:58:52 +0200 (CEST) From: Kristof Provost To: Florian Smeets Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 9d9bc7f462bd - main - pf: set limits before rules Date: Wed, 17 Sep 2025 20:58:46 +0200 X-Mailer: MailMate (2.0r6272) Message-ID: In-Reply-To: <4fd761a0-b7ba-45b6-8e9e-e6b696a241a0@FreeBSD.org> References: <202509171415.58HEFh9g010282@gitrepo.freebsd.org> <4fd761a0-b7ba-45b6-8e9e-e6b696a241a0@FreeBSD.org> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="=_MailMate_167B5297-EE7A-4906-AC78-1BE99182FDCB_=" --=_MailMate_167B5297-EE7A-4906-AC78-1BE99182FDCB_= Content-Type: text/plain; charset=UTF-8; format=flowed; markup=markdown Content-Transfer-Encoding: quoted-printable On 17 Sep 2025, at 20:38, Florian Smeets wrote: > On 17.09.25 16:15, Kristof Provost wrote: >> The branch main has been updated by kp: >> >> URL: = >> https://cgit.FreeBSD.org/src/commit/?id=3D9d9bc7f462bd152d87ab8f1767ca= d19bab09bf8b >> >> commit 9d9bc7f462bd152d87ab8f1767cad19bab09bf8b >> Author: Kristof Provost >> AuthorDate: 2025-08-25 13:43:10 +0000 >> Commit: Kristof Provost >> CommitDate: 2025-09-17 14:15:15 +0000 >> >> pf: set limits before rules >> > > Nice, I ran into this issue recently that the ruleset would not load = > on boot because we load large tables. > > I set a higher PFR_KENTRY_HIWAT as a workaround. > > Are you planning to merge this to stable/15? Maybe get this into 15.0? > I have no plans to MFC this, no. There=E2=80=99s a fairly large series of patches that to lesser or greate= r = extent build on each other making MFC-ing more effort and higher risk = than it=E2=80=99d otherwise be. I=E2=80=99m certainly not MFC-ing changes other than clear bug fixes to = stable/15 at this point in the release cycle. Colin doesn=E2=80=99t need = more = headaches. =E2=80=94 Kristof --=_MailMate_167B5297-EE7A-4906-AC78-1BE99182FDCB_= Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

On 17 Sep 2025, at 20:38, Florian Smeets wrote:

On 17.09.25 16:15, Kristof Provost wrote:

The branch main has been updated by kp:

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

commit 9d9bc7f462bd152d87ab8f1767cad19bab09bf8b
Author: Kristof Provost kp@FreeBSD.= org
AuthorDate: 2025-08-25 13:43:10 +0000
Commit: Kristof Provost kp@FreeBSD.= org
CommitDate: 2025-09-17 14:15:15 +0000

 p=
f: set limits before rules

Nice, I ran into this issue recently that the ruleset wou= ld not load on boot because we load large tables.

I set a higher PFR_KENTRY_HIWAT as a workaround.

Are you planning to merge this to stable/15? Maybe get th= is into 15.0?

I have no plans to MFC this, no.

There=E2=80=99s a fairly large series of patches that to = lesser or greater extent build on each other making MFC-ing more effort a= nd higher risk than it=E2=80=99d otherwise be.
I=E2=80=99m certainly not MFC-ing changes other than clear bug fixes to s= table/15 at this point in the release cycle. Colin doesn=E2=80=99t need m= ore headaches.

=E2=80=94
Kristof

--=_MailMate_167B5297-EE7A-4906-AC78-1BE99182FDCB_=-- From nobody Wed Sep 17 20:32:40 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cRr6w4wJPz682HX; Wed, 17 Sep 2025 20: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 4cRr6w4JYGz3D75; Wed, 17 Sep 2025 20: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=1758141160; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LzhoueesvvBw2tRLN6AIpsvI3+ptlJBTmog7H7za8BY=; b=w90VJntEaG21zGVeD0SxgXe4OkYO/ljgOVRHVd0mvhchR4TLoTTwvZJSg1BerLrZE9QVRb wFY0iKdGmi2S3pELvIg3YDd/0u2iMff2ApORn3s16RGvfI4MFSl9xEzyefUEUfzHErn3mH RGMYg4XmaadGjTcG+GwXXTqPUmVk234ohZ3pTy5OMD9ZzrBRfXQFrvFWzD44uEj0j+q+Jt lMX6OY+VnbjETHnCmMo+vRg4pILnavthZBNu+VU4sc6VXtfB9UHRQ7KithOK5fRaXV5TTF EQo7CD/bbb38d6gOaIk62fNOcluLybUn7Zp4uI3KaLoavOT0n6+FclPEIpSBuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758141160; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LzhoueesvvBw2tRLN6AIpsvI3+ptlJBTmog7H7za8BY=; b=WWmjfhAi8Uke/pEPjjul4ooVkAI0N/xQOynDQAKaXKXgRQLj/3tA0NEqGUDrCzFTSN82t1 1ekcz/pGE0fhOzD9aH+2TAulpFgN3lOrjjCPRKtCb1NtSCE2tGjdkeDNv4o5lpmm/QNu85 izxp+ML6hr9DlC/8lmnHNWDiv9MMoTVR+axDXyjudz85+ZmvtnbMhTfZ9t8rfQOAfxU+wu 2sdTwmiiz4EyxkThyDdMmSKB13YxOqkHpaFY+ZicZiTOXrG008LbXPVhgQp3iKsU53X87E nAiZir/shmN9ED8LZgRSRIxY/1XbUWbRkAGKQYnAbBcXtpQTTDxnCX51dNYEDQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758141160; a=rsa-sha256; cv=none; b=i8Dz4ymblTjh3ZaiwDJCJ82e/NEYeiJVq6oaSTyyC5U94n9iOuJ38YpxCKpoUK7S/5yn11 7sv+myBy7HEGXxCPUlaVlwZ2T018/V+VJ29YvNEou63c7PYLre3BcNTIthXrBLnGrqK0/3 I5yu85G/mL7aWmJdaRhY2SsvyXIJkrcJNl1yYvnBOiZDxOOCkCGagV3jRL9uJv/SZRWKxv nJYpi1BEvmTkgNK3WqndqqdbPZ8SohCLvELBV1LcqPGoGp0ZscpZah9OllwZYFKVuWZzms WWxotTcAdba4O3IMLx3chOYQ/5jjdERQUP/b2yNLi6mykWuyjuiqwldyk8R2Fw== 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 4cRr6w3vm2zhKf; Wed, 17 Sep 2025 20: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 58HKWe5G028139; Wed, 17 Sep 2025 20: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 58HKWecn028136; Wed, 17 Sep 2025 20:32:40 GMT (envelope-from git) Date: Wed, 17 Sep 2025 20:32:40 GMT Message-Id: <202509172032.58HKWecn028136@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: 9b7bddfd082d - main - packages: Add minimal-jail set List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9b7bddfd082d1df2b4c97e7ec974d1d67e98a1de Auto-Submitted: auto-generated The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=9b7bddfd082d1df2b4c97e7ec974d1d67e98a1de commit 9b7bddfd082d1df2b4c97e7ec974d1d67e98a1de Author: Lexi Winter AuthorDate: 2025-09-17 20:11:20 +0000 Commit: Lexi Winter CommitDate: 2025-09-17 20:11:20 +0000 packages: Add minimal-jail set This is minimal, but without bootloader, hardware and networking support that's typically not required in jails. This requires extending the 'set' annotation to be a comma-separated list, so that packages can be in multiple sets. MFC after: 3 seconds Reviewed by: bapt Differential Revision: https://reviews.freebsd.org/D52591 --- release/packages/create-sets.sh | 10 ++++++---- release/packages/generate-ucl.lua | 31 ++++++++++++++++++------------ release/packages/sets/minimal-jail-dbg.ucl | 6 ++++++ release/packages/sets/minimal-jail.ucl | 6 ++++++ release/packages/ucl/at-all.ucl | 2 +- release/packages/ucl/caroot-all.ucl | 2 +- release/packages/ucl/certctl-all.ucl | 2 +- release/packages/ucl/clibs-all.ucl | 2 +- release/packages/ucl/cron-all.ucl | 2 +- release/packages/ucl/fetch-all.ucl | 2 +- release/packages/ucl/inetd-all.ucl | 2 +- release/packages/ucl/locales-all.ucl | 2 +- release/packages/ucl/newsyslog-all.ucl | 2 +- release/packages/ucl/periodic-all.ucl | 2 +- release/packages/ucl/pkg-bootstrap-all.ucl | 2 +- release/packages/ucl/rc-all.ucl | 2 +- release/packages/ucl/runtime-all.ucl | 2 +- release/packages/ucl/syslogd-all.ucl | 2 +- release/packages/ucl/utilities-all.ucl | 2 +- release/packages/ucl/vi-all.ucl | 2 +- release/packages/ucl/zoneinfo-all.ucl | 2 +- 21 files changed, 54 insertions(+), 33 deletions(-) diff --git a/release/packages/create-sets.sh b/release/packages/create-sets.sh index 6c034834672e..8c564ecfeb92 100755 --- a/release/packages/create-sets.sh +++ b/release/packages/create-sets.sh @@ -25,10 +25,12 @@ for pkg in "$repodir"/*.pkg; do set -- $(pkg query -F "$pkg" '%At %n %Av' | grep '^set ') pkgname="$2" - set="$3" - SETS="$SETS $set" - setvar="$(echo "$set" | tr - _)" - eval PKGS_${setvar}=\"\$PKGS_${setvar} $pkgname\" + sets="$(echo "$3" | tr , ' ')" + for set in $sets; do + SETS="$SETS $set" + setvar="$(echo "$set" | tr - _)" + eval PKGS_${setvar}=\"\$PKGS_${setvar} $pkgname\" + done done for set in $(echo $SETS | tr ' ' '\n' | sort | uniq); do diff --git a/release/packages/generate-ucl.lua b/release/packages/generate-ucl.lua index 211766067952..ea3743894740 100755 --- a/release/packages/generate-ucl.lua +++ b/release/packages/generate-ucl.lua @@ -166,12 +166,14 @@ if add_gen_dep(pkgname, pkggenname) then end -- --- Handle the 'set' annotation. +-- Handle the 'set' annotation, a comma-separated list of sets which this +-- package should be placed in. If it's not specified, the package goes +-- in the default set which is base. -- -- Ensure we have an annotations table to work with. obj["annotations"] = obj["annotations"] or {} -- If no set is provided, use the default set which is "base". -set = obj["annotations"]["set"] or "base" +sets = obj["annotations"]["set"] or "base" -- For subpackages, we may need to rewrite the set name. This is done a little -- differently from the normal pkg suffix processing, because we don't need sets -- to be as a granular as the base packages. @@ -181,27 +183,32 @@ set = obj["annotations"]["set"] or "base" -- However, lib32 debug symbols still go into their own package since they're -- quite large. if pkgname:match("%-dbg%-lib32$") then - set = "lib32-dbg" + sets = "lib32-dbg" elseif pkgname:match("%-lib32$") then - set = "lib32" + sets = "lib32" -- If this is a -dev package, put it in a single set called "devel" which -- contains all development files. Also include lib*-man packages, which -- contain manpages for libraries. Having a separate -dev for every -- set is not necessary, because generally you either want development -- support or you don't. elseif pkgname:match("%-dev$") or pkgname:match("^lib.*%-man$") then - set = "devel" + sets = "devel" -- Don't separate tests and tests-dbg into 2 sets, if the user wants tests -- they should be able to debug failures. -elseif set == "tests" then - set = set --- If this is a -dbg package, it goes in -dbg, which means the user can --- install debug symbols only for the sets they have installed. +elseif sets == "tests" then + sets = sets +-- If this is a -dbg package, put it in the -dbg subpackage of each set, +-- which means the user can install debug symbols only for the sets they +-- have installed. elseif pkgname:match("%-dbg$") then - set = set .. "-dbg" + local newsets = {} + for set in sets:gmatch("[^,]+") do + newsets[#newsets + 1] = set .. "-dbg" + end + sets = table.concat(newsets, ",") end --- Put our new set back into the package. -obj["annotations"]["set"] = set +-- Put our new sets back into the package. +obj["annotations"]["set"] = sets -- If PKG_NAME_PREFIX is provided, rewrite the names of dependency packages. -- We can't do this in UCL since variable substitution doesn't work in array diff --git a/release/packages/sets/minimal-jail-dbg.ucl b/release/packages/sets/minimal-jail-dbg.ucl new file mode 100644 index 000000000000..3f7df227d3a9 --- /dev/null +++ b/release/packages/sets/minimal-jail-dbg.ucl @@ -0,0 +1,6 @@ +comment = "Basic multi-user jail debugging symbols (metapackage)" + +desc = < To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: 9537aa02f404 - main - packages: Mark all sets as vital List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9537aa02f40454ba8243e8c877695876d3e4c150 Auto-Submitted: auto-generated The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=9537aa02f40454ba8243e8c877695876d3e4c150 commit 9537aa02f40454ba8243e8c877695876d3e4c150 Author: Lexi Winter AuthorDate: 2025-09-17 20:12:21 +0000 Commit: Lexi Winter CommitDate: 2025-09-17 20:14:18 +0000 packages: Mark all sets as vital At least "minimal" must be vital, because it's required for a functional system. For example, we might create new packages in the future which are required for the multi-user system and are part of the minimal set, so it's important that users don't remove set-minimal to ensure they get those new packages. For the other sets, it's debatable whether they should be vital or not, but let's start out with the assumption that if the user installed a set, they should have to have to explicit request it be removed. This means if, for example, they install set-devel, then remove lldb, pkg won't remove set-devel and cause the next "pkg autoremove" to remove everything else that was in set-devel. We might want to adjust this later (or possibly adjust the behaviour of pkg(8) itself) based on user feedback. While here, fix a typo in the description of the devel set. Suggested by: bapt MFC after: 3 seconds Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D52562 --- release/packages/sets/base.ucl | 2 ++ release/packages/sets/devel-dbg.ucl | 2 +- release/packages/sets/devel.ucl | 4 +++- release/packages/sets/lib32.ucl | 2 ++ release/packages/sets/minimal-jail.ucl | 2 ++ release/packages/sets/minimal.ucl | 2 ++ release/packages/sets/src.ucl | 2 ++ release/packages/sets/tests.ucl | 2 ++ 8 files changed, 16 insertions(+), 2 deletions(-) diff --git a/release/packages/sets/base.ucl b/release/packages/sets/base.ucl index 42dd2095f808..2d94ff4f4f2e 100644 --- a/release/packages/sets/base.ucl +++ b/release/packages/sets/base.ucl @@ -1,5 +1,7 @@ comment = "Base system (metapackage)" +vital = true + desc = < To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: a2783fb75401 - main - packages: Move kernel-man to the minimal set List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a2783fb75401c85f5ae815a1349fbad8e7ab7b3c Auto-Submitted: auto-generated The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=a2783fb75401c85f5ae815a1349fbad8e7ab7b3c commit a2783fb75401c85f5ae815a1349fbad8e7ab7b3c Author: Lexi Winter AuthorDate: 2025-09-17 20:13:04 +0000 Commit: Lexi Winter CommitDate: 2025-09-17 20:14:18 +0000 packages: Move kernel-man to the minimal set Currently this is in the "kernels" set, which doesn't make sense because it's not a kernel. Move it to the "minimal" set, on the basis that minimal already includes a bunch of manpages, and a user who installs with minimal expects that e.g. "man ix" will work. MFC after: 3 seconds Reported by: des Reviewed by: bapt Differential Revision: https://reviews.freebsd.org/D52560 --- release/packages/ucl/kernel-man.ucl | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/release/packages/ucl/kernel-man.ucl b/release/packages/ucl/kernel-man.ucl index 9d70baf2c3af..e4c376379fe3 100644 --- a/release/packages/ucl/kernel-man.ucl +++ b/release/packages/ucl/kernel-man.ucl @@ -1,5 +1,10 @@ comment = "Kernel manual pages" + desc = <; Wed, 17 Sep 2025 20:38:07 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pl1-x62e.google.com (mail-pl1-x62e.google.com [IPv6:2607:f8b0:4864:20::62e]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cRrFC1wChz3FRw for ; Wed, 17 Sep 2025 20:38:07 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-pl1-x62e.google.com with SMTP id d9443c01a7336-2445806df50so2125075ad.1 for ; Wed, 17 Sep 2025 13:38:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1758141481; x=1758746281; darn=freebsd.org; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=f3TOhOmbVcoqy8ppro6HcNbPTeB0T20UkHF+7tFnYuk=; b=jubKNfsmpD7xFIlvNlGybZ50oVT1RdqpzdyCSzbnhoTuJnDKWyuSJj/Yf8m0NSk+Kx 3eNltReqm/k0FRckA7W/arOqyD9Xgh4aQ62gZlauG5AMhOFpHJ2YFFBpaCkklBjPK3n3 oCkpgkmC5e6KiiSsBYxDcCfHMPgtfwnSy4TC7UvNA8nqRZE3Tn3trwC6MhUvn4J4gf2e 8DYQ1aeeseAZdBWHIkIAbMiEeunjYKU4AYSviX7NMfRN1DeyKDXYmvn/s2driU9FT0Wc B8AFojWXaXV2F2uoOBEw3uuW99DGjJLb12iBCqRhqogzOfr0Uqipk2MgoYmNmeQF5CRl m4uA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1758141481; x=1758746281; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=f3TOhOmbVcoqy8ppro6HcNbPTeB0T20UkHF+7tFnYuk=; b=V+Vc527ymwPdcwhXq7Cc0WbmHJQJcoqUILWwYq+1Y03atrfYcq/PmNQ/R/gzL18sUb KC7ZEBr8lndLnfuTE/wauDsoKO34tkwQ4Mqbt6KFLp0ikkBBLnG743pDyzEs0lgKe3VD i+oFbeY+HQ1z4s3/BKhYFWnNG2AzLMcypslnizJyvOo4VflBGCWMN71JFM52f0iffamt 3CgHYTeFwkzGl5dVoDdZK2bxgZ6rB7bTjAHSimkmPR7u7FPpBoqNA2eW/sXVh330e8Vx +70O3StaKKOL5BQCQRMTaW/tR31O9zReL6kwqqYD+reb763KzEBS5Vn1ecBQXwol5Ig+ vRRg== X-Forwarded-Encrypted: i=1; AJvYcCWaMcc3Ay12sdmKY+kIKGmbk7oePzLMviw/FAzRiCa6RxdeIEniqFHB14tyTKI6aotHjSPQL8TKavqCPtqEmeWSYlPnAw==@freebsd.org X-Gm-Message-State: AOJu0Ywxg4Nxylcy7DlPQlWWkCWkemTj8WLa64J9UQ02P+W/mmp+MgAg QXdsLF/r49XX/tPIpxdbwrHWD0B04+xdJ0F7fJZR0RCoi7ehIMiwBvIjhamFHJA/ X-Gm-Gg: ASbGncsoUGNo3CrK7WiwLJab17VqvZxzYUMmsvpdfYjW8I9dVmYaT6Df7p4K95hb6m6 OpAT/cA4TbHj68WAztOzFDE5qDiMv2uK4CiJ5rKTxWw3VD/Qi1SZNXTB2xIMv4AGl9R1RtevRzh jZv8ZNnEszCTBPEXE7RMH0mAhq95a9jz2lssVG/TNV6rLLfMWh8151Cau4PBvniGyBNNzCZPimt R0/0i0JFKare75ObdT635xE7leSRG9EzKezRzwROyoKY1F1rzqQtXbrGAzChzq3eHYRVYyHYIQG NoStA6sKzlHS/hn+hAQu5knGN5P7pu1hiPEhnYjR0rS3kS8d7td6AmbdBgRbtWKu56FbjWQqxex CcvZwLMfkjXiRNhfb2UP8wjNv1vikGoFMtKUdNrKFbnM= X-Google-Smtp-Source: AGHT+IGphT5Hnxeek6gqMcmhhnnK7Mo1hpr41aUkrKZknFZfY5MJDj6zs0Vc3LPfF8IVyjWxGuvj6g== X-Received: by 2002:a17:902:ef0f:b0:24c:965a:f97e with SMTP id d9443c01a7336-26811ba541dmr49779705ad.2.1758141480999; Wed, 17 Sep 2025 13:38:00 -0700 (PDT) Received: from smtpclient.apple ([185.153.179.181]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-269802df74asm4276415ad.94.2025.09.17.13.38.00 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 17 Sep 2025 13:38:00 -0700 (PDT) Content-Type: text/plain; charset=utf-8 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3826.700.81\)) Subject: Re: git: 9537aa02f404 - main - packages: Mark all sets as vital From: "Enji Cooper (yaneurabeya)" In-Reply-To: <202509172032.58HKWfxp028171@gitrepo.freebsd.org> Date: Wed, 17 Sep 2025 13:37:49 -0700 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: References: <202509172032.58HKWfxp028171@gitrepo.freebsd.org> To: Lexi Winter X-Mailer: Apple Mail (2.3826.700.81) X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4cRrFC1wChz3FRw > On Sep 17, 2025, at 1:32=E2=80=AFPM, Lexi Winter = wrote: >=20 > The branch main has been updated by ivy: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3D9537aa02f40454ba8243e8c877695876= d3e4c150 >=20 > commit 9537aa02f40454ba8243e8c877695876d3e4c150 > Author: Lexi Winter > AuthorDate: 2025-09-17 20:12:21 +0000 > Commit: Lexi Winter > CommitDate: 2025-09-17 20:14:18 +0000 =E2=80=A6 > diff --git a/release/packages/sets/src.ucl = b/release/packages/sets/src.ucl > index eada5dbde641..7ab94eb420df 100644 > --- a/release/packages/sets/src.ucl > +++ b/release/packages/sets/src.ucl > @@ -1,5 +1,7 @@ > comment =3D "System source code" >=20 > +vital =3D yes > + > desc =3D < This metapackage installs source code for the base system and kernel. > EOD > diff --git a/release/packages/sets/tests.ucl = b/release/packages/sets/tests.ucl > index 88426a54a807..07b463fb7d69 100644 > --- a/release/packages/sets/tests.ucl > +++ b/release/packages/sets/tests.ucl > @@ -1,5 +1,7 @@ > comment =3D "System test suite" >=20 > +vital =3D yes > + > desc =3D < This metapackage installs the system test suite. > EOD Hi Lexi! I actually wouldn=E2=80=99t consider `src` or `tests` to be = vital (many users don=E2=80=99t install them on their systems). Is there = a reason why they should be considered vital that I=E2=80=99m not aware = of? I=E2=80=99ve not been paying a ton of attention to work being done = in the pkg-base space, so I might have missed some important points. Thank you! -Enji= From nobody Wed Sep 17 20:48:27 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cRrTG3mCCz683Hj; Wed, 17 Sep 2025 20:48:34 +0000 (UTC) (envelope-from ivy@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cRrTG3Czdz3GSH; Wed, 17 Sep 2025 20:48:34 +0000 (UTC) (envelope-from ivy@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758142114; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=tOYLYKZ0YqbAW9ep2bkVWe52EKPXTcNeL9ttiYcWE5k=; b=IJOmrluocJ26CsxIVmZlMCP8DxJQuYTGjta/xmcj8AMdWcOx2RCKHVn1Gh8dpoxm4tOq3f gRKv2hTb6Nf5K1Y8/earPruTxYjkpOH/WCZ1R6Swza1JoC/utpaa0FFbbHJzYlq93jnwD0 FFC6zl52QvVyYYXZhHGo2FMw5sVnuM9PrSkb82cNzVdK2kLZq3IuE8IeaspWdOd3Y3sMvH bFXVku6vlJAgYcpdFa80Acg79PlNEJ7mPrxZh9TCzuYp5A13x8xR6BuNCrUdzAEoBr6zZz wERKIMvUbaLmAQbm5uI55DsHZPaD08DABIQCTYFPMVyK6T27eYXymLgjO+vIPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758142114; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=tOYLYKZ0YqbAW9ep2bkVWe52EKPXTcNeL9ttiYcWE5k=; b=ZDcjvp5aqDwu/TaAuyYpd+oLNtQkWViLGGzCXAkqusS0tzG2F9KzNwv2/6RjFcR7ROoMBm 1XLNxSU38Fk/X8zJSd+Vukmbb4uoxW/y1RkfwJusDhIYRO3CoRxntJl82DnAj+rJDEo4Zh vmeYDoEIYf00jMMB+wUV+l3LwTU0GXocwBR48NW2q1GeWUfLXsaBb4ll5fXNav2Y14JvQC VhWTxFhVMhngBf4527qzervGXX87Xm9jrURYY4pAVjq8yQCRc7vIRrki3iEFpUHqUp737c /RIGR0ggjebD4MxSvPpYVRkTDAVUs8MpU5fCyu5VQE3PiWYGiasUeF9gM6eDZA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758142114; a=rsa-sha256; cv=none; b=AsjjItvhXQhiYIkGbDRMMEec3bpuKTvFYZdXufy08GFsXJD1wpfD7tv7pFAFT1Veps2kLC WgqUqmJTXGQFKLzyW0UkBmmfHKrJ5C2m6DjaPV8clro9j5DJgPmtZDJDKpNzzKr4W8wPS5 FID3KD4ZdHlNCiuTHAC12I8jXtZjWQuN6vDOBvtXZfD8qQJN+9xlTjGOGyPMH1kuIA5WWJ QeCLCW1UVm0TTTkvfg8LxTQ79qgFGfUtoB5478AwBOLKhie4nQ7CPqHZyWJwOlKwUw/bcb Cy1mY7LBFzwmu01Zm9B9Htx5S1hpfhaozRccuveRJVwjhRJr8tOb1IDc0r7RZw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from amaryllis.le-fay.org (amaryllis.le-fay.org [IPv6:2a00:1098:6b:400::9]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: ivy/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4cRrTF6KCSz4yl; Wed, 17 Sep 2025 20:48:33 +0000 (UTC) (envelope-from ivy@freebsd.org) Date: Wed, 17 Sep 2025 21:48:27 +0100 From: Lexi Winter To: "Enji Cooper (yaneurabeya)" Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Subject: Re: git: 9537aa02f404 - main - packages: Mark all sets as vital Message-ID: Mail-Followup-To: "Enji Cooper (yaneurabeya)" , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" References: <202509172032.58HKWfxp028171@gitrepo.freebsd.org> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="Bc92YJQSj8SFyY8D" Content-Disposition: inline In-Reply-To: --Bc92YJQSj8SFyY8D Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Enji Cooper (yaneurabeya) wrote in : > On Sep 17, 2025, at 1:32=E2=80=AFPM, Lexi Winter wrote: > > packages: Mark all sets as vital > > I actually wouldn=E2=80=99t consider `src` or `tests` to be vital (many > users don=E2=80=99t install them on their systems). Is there a reason > why they should be considered vital that I=E2=80=99m not aware of? I=E2= =80=99ve > not been paying a ton of attention to work being done in the > pkg-base space, so I might have missed some important points. "vital" doesn't mean they have to be installed, it only means that once they are installed, they can only be removed explicitly (using -f): # pkg remove freebsd-set-tests Checking integrity... done (0 conflicting) The following package(s) are locked or vital and may not be removed: FreeBSD-set-tests originally i only marked "minimal" and "base" as vital, but based on review feedback, we decided to mark all the sets as vital for now. the reason is to avoid something like this: # pkg install freebsd-set-devel # pkg remove freebsd-lldb # this also removes freebsd-set-devel ... 6 months later ... # pkg autoremove (now all the other packages installed by freebsd-set-devel are also removed.) marking the sets as vital means that users have to explicitly opt-in to removing the set if they remove a dependency of the set, which avoids this exciting behaviour. there is a pkg(8) issue that means this doesn't work quite as well as it should do: https://github.com/freebsd/pkg/issues/2517, however, i still feel this is better than the alternative. --Bc92YJQSj8SFyY8D Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQSyjTg96lp3RifySyn1nT63mIK/YAUCaMselwAKCRD1nT63mIK/ YPdJAQDBRdXunLGF/S7gdBiV/XNSnobevl4Hqp1Y1R6JobVu5AD/YJjPm59sgEka trIC2qtMmNcI21Azdg4Ohz4+EYRIJwU= =3Lrd -----END PGP SIGNATURE----- --Bc92YJQSj8SFyY8D-- From nobody Wed Sep 17 20:50:14 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cRrX90mSCz683CH; Wed, 17 Sep 2025 20:51:05 +0000 (UTC) (envelope-from madpilot@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cRrX86ML9z3GvJ; Wed, 17 Sep 2025 20:51:04 +0000 (UTC) (envelope-from madpilot@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758142264; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=mzSjqgZvSE4IVLkDWFRFow24GrEJ4LTdNvEVt+KJriY=; b=WTDy8pq2RtMYX2KeLUFM+kWCSah8wloV9N+ntH/jhJWGRX2wflGOo/zobqXImHX8l8tmje KWR5hIv/eIRDat3Lkchd/hyCoJeznlajVaPfXBLU9B3bfBXU/O933AoBKlGSt1FpqQ/vsQ JVCqqcUQIH2zBsPp2eQT+R0HubxVvNFZNc4IfC8x8lu9/zbOzVJeHpcSFiqK8/QzzhWIIa pSQvf9xfRjuHKiHltFLkcDbqh/oEcP89pByBp1Ah+rfxtZZ+/clUQq929iUuOm6X/SDyt5 nUiHd+Ib4lXsjDDRnepjdob7e9HvS6l7jzOQyTGNo8EfKy6Tv9/eQ8Y1qFRQWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758142264; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=mzSjqgZvSE4IVLkDWFRFow24GrEJ4LTdNvEVt+KJriY=; b=CrqNcuJNeCR8hG1V2E5aqSIARHd2YJqj2IQxxelVVtppQWaRBhaVrXGp3pGy3H0qKbyb9t Aq1WuAd1tC2LW8k/f+rDNytTanKUK3Av0q2PWSJiVGqwyotMdBsaEoUSlBmnQmUES5C7a/ ZCwR109vd4XNX3d2MyZAuxbua2ULsKcnCKgX0hdqwUY182n76p0COK6VrIX3XZj6/PadIw awV4tgXDlMukoloaGAOACf7Sn3ahee19ynoxJ0DP3HaAyrgd4L/6/9g0pPar0erlR1m+AO gnW4PeSdYpKMcAV2sUJuRkyBpxmxJC2i9LbhmhNl6XvDUExCUHMtjpq+hKvIng== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758142264; a=rsa-sha256; cv=none; b=J01uFo63iGkHAhUZGC6UXrFdJbmfn3VUa61yv6QG91nTdkwuv/QfpWZBSd0FA/sqyZxnN/ lbThDHeVMar/O58fX7S2WNxZoOg08PeTbitPClHWcjI9So8MDlYxfPAv5CQLa3b7eN+aZv I18bP12FjS6TLO8waHzkuk53S2vjdhB0i2RGW8ncVPOuG0cxBzb409l2SOpRNs1N5YU0Eo to31Eb5/E7+f79nQGBmBBiY7VxHreTvF7GffNIReCQ+OCAR6/qxTxoUKfQc+7NNyIN0/cd wWzIDZrQraDgq5Vtd3grES3qV6pB86DwEFeQ6NZvMAbwjwRRfx7uPPd+dbgGsA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from [IPV6:2a01:e11:2002:4280:ab9b:8bf1:ec36:413a] (unknown [IPv6:2a01:e11:2002:4280:ab9b:8bf1:ec36:413a]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: madpilot/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4cRrX80tQJz6Nd; Wed, 17 Sep 2025 20:51:04 +0000 (UTC) (envelope-from madpilot@FreeBSD.org) Message-ID: <47a0213b-010e-47e4-8285-dcf426f59c08@FreeBSD.org> Date: Wed, 17 Sep 2025 22:50:14 +0200 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: e779891327b1 - main - sys/power: Sleep type reporting by PM backends To: Nuno Teixeira , Cy Schubert Cc: Aymeric Wibo , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202509142159.58ELx5Rg054606@gitrepo.freebsd.org> <20250916050239.4BB672D5@slippy.cwsent.com> Content-Language: en-US From: Guido Falsi Autocrypt: addr=madpilot@FreeBSD.org; keydata= xsBNBE+G+l0BCADi/WBQ0aRJfnE7LBPsM0G3m/m3Yx7OPu4iYFvS84xawmRHtCNjWIntsxuX fptkmEo3Rsw816WUrek8dxoUAYdHd+EcpBcnnDzfDH5LW/TZ4gbrFezrHPdRp7wdxi23GN80 qPwHEwXuF0X4Wy5V0OO8B6VT/nA0ADYnBDhXS52HGIJ/GCUjgqJn+phDTdCFLvrSFdmgx4Wl c0W5Z1p5cmDF9l8L/hc959AeyNf7I9dXnjekGM9gVv7UDUYzCifR3U8T0fnfdMmS8NeI9NC+ wuREpRO4lKOkTnj9TtQJRiptlhcHQiAlG1cFqs7EQo57Tqq6cxD1FycZJLuC32bGbgalABEB AAHNIkd1aWRvIEZhbHNpIDxtYWRwaWxvdEBGcmVlQlNELm9yZz7CwHgEEwECACIFAk+G+3MC GwMGCwkIBwMCBhUIAgkKCwQWAgMBAh4BAheAAAoJEBrmhg5Wy9KT2uIIAIrawQ89TnqEhi2C OEQAhx3uqWZuNoS6NyiSgsRCmtSnT2GOgH4Ucbr/I37SkV1B3K6HkoL6lwN8Gjf5KOgLqmTi E1W3RTwS7l8PSvdnjM9i7g351R4mTijtxawB/JcQf/Kge3Yqr1V4g6H+wQXHUStmHThbupuN trzRphvR/e5ekT0FTyVfPmpcbm68i2bwZnKUex/TNIECBykYh8b+SYMLhENf2ayRjCIWS2Ad 7tnTKhMtnS5jtW6qjBy4RoTpQD6oR1xIgkTRlQ49roVCUfdHb+Y/kh+U9G1IcoNy4vkg9IfP dwpSfnP+a8j0AZ1hMnOLZ1fYoQrs+4gVLy8Fs7TOwU0EUxB7QQEQAKFhrDceoPdK/IHDSmoj 6SQYisvM7VdhcleS7E9DoEAVt7yMbf6HbbMVTTY6ckvwTWQssywLBXNVqxgc4WLJjzfUhgef +WE75M3+WFYlOVQLGZY/zEVgma1raYnOHNAOzeHLDmEXjbZP6vGAeDyBbGfQPpE7qGYZ7ube T3XwQO+PklcCrvOPj2ZPcAxGNS2xVU/LzONqCrJqLMJSIcCdsbiSP4G5PnDFHtMokaTY6OEr 8OEQfOAerhcHUa/z7Uu8YtmaqKH+QGkE/WEgaRqSiTnv0JOTD+DxehaqvoKPPZ++2NpCZMHB 2i6A/xifmQwEiIjEXtcueBRzkNUQkxhqZyS13SrhocL9ydtaVPBzZatAEjUDDEJmAMLVFs45 qfyhMiNapHJo2n3MW/E5omqCvEkDdWX/en3P7CK2TemeaDghMsgkNKax/z0wNo5UZCkOPOz0 xpNiUilOVbkuezZZNg65741qee2lfXhQIaZ66yT7hphc/N/z3PIAtLeze4u1VR2EXAuZ2sWA dlKCNTlJMsaU/x70BV11Wd/ypnVzM68dfdQIIAj1iMFAD/lXGlEUmKXg5Ov2VQDlTntQoanC YrAg+8CttPzjrydgLZFq3hrtQmfc0se5yv1WHS69+BsUOG09RvvawUDZxUjW19kyeN9THaNR gow3kSuArUp6zSmJABEBAAHCwF8EGAEIAAkFAlMQe0ECGwwACgkQGuaGDlbL0pMN5wgA4bCk X/qwEVC06ToeR6C2putmSWQMgpDaqrv65Hubo+QGmg2P4ewTYQQ4g6oYWS03qHxqVVWhKz7F jfrV+dH8qbCLfSgIcvdBha7ayGZVrsiuMLKGbw36fcmkZPpSDOfHcP0XH8Z+u9CWj0xUkTxA lZ/7i6gYSUpG2JWNtdmE/X8VVEyXusCLwy0K0BI60A/4dRTIX3C4QKrJ3ZbUXegz70ynjHf+ lQMZ9IZKASoRMuS5FozPQh6abvmwZEPdf5I9riUElzvHrqJ8Bx0t3Pujdoth+yNHpnBxrtO8 LkQdrQ58P0SwcaIX33T2U9pG8bhu5YVR88FQ8OQ0cEsPBpDncg== In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 9/17/25 11:15, Nuno Teixeira wrote: > > Hello Cy, > > One of this series of ACPI commits has broken power management on my > machines. > One of which managed to capture a dump from a kernel panic after > poweroff(8) > was issued. > > > I can confirm same crash on reboot on a Intel laptop, after upgrading > from main 2025-09-06 -> 2025-09-16. > Hi, A me too. Just noticed this while investigating why my machines with head (laptop and two desktops) were not switching off anymore. So looks like I'm also experiencing this. All machines behave the same, the almost turns off, monitor turns off, but power light stays on. I'm testing reverting commits to see if it goes back to working. -- Guido Falsi From nobody Wed Sep 17 21:17:25 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cRs6Z1Vnnz6851X; Wed, 17 Sep 2025 21:17: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 4cRs6Z0pg2z3MsF; Wed, 17 Sep 2025 21:17:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758143846; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DiFHSSBspET7u/Ut+346bRI9iKorAS5nU/1lFFFPqDM=; b=f7EkhORbL83eIuPrKZo/xGtbodiWHywO0PpZvANA+M7kktCbkIF6H33u1SxrPODi5l8AcA szMbq+CdnpyysnRJJVgMxFX7j91M2mvWc2NaY/W9xOhx0TsRSNIloxtvRzdhuhFANtIWA1 sTYOfCkEkjYrIV8DdkYBrrDbfYPr22sDWpwnakhs6LEsjMtAx5ucUns71orCNS6lwUCpMa ovRsGZ57UAOYKoXtFj7MNPrhtyGtDR8f1oO2hpIk9LLdUrRa2x7qSlt+zGJvVR/mDPQtcy CZMK7vAOaa3GyR1hhjbvyoKMOw7h4wRzVwqZqrQ2nKR/X4NTgd8AHRmhy8Zo3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758143846; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DiFHSSBspET7u/Ut+346bRI9iKorAS5nU/1lFFFPqDM=; b=rWM1IF2xn66ZqXi/FofF2Z+QfOMoTyX1OxxRuIF1luTDkYRznxYJkqVpt18ohr7LMujEMb +L7krG1lVoUfUhg6fbNNlcIjM4rxwtvZWpDwWuX2EvEDxJCdgbG6Nr8sNR169pqBArxn+C thMeq2vw6FHaPK0sEEAd/nZWWMOsAzSknlTb64PgaYHBLwsi/57E+RMjovAjK9wgaqjJ/F NYIWYfNvG+8yH7K4BLxt0MCn1lYaaz1AQaYeQOr6NEYzOHhfudp0azr8VPrInBoijlGFue 7sC4Vbv0hh06iDIfDi7ZxPZMWogaZTTgva1buPROfdirPOS9yt5d+wDcFkoy7g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758143846; a=rsa-sha256; cv=none; b=J+VPyv/p06e2CcrtNrtZms1yo40xb17DwJX7p0CpGqTYqSneEdPm/nVJCiEzxn1kA0CMPA 40XYuuh2DxkDXaWk9GZZxLaVBGD0B0ELbYnMSOLbF49QMRiLTDAwEmszdg5XRtQWa6Hi1Z 3aKYMDuHwJTiEqBl6dec9nf+P48cegkbR0yCTVKQg17eXonnqAo4mMLivoEZZxoZAVYPUF devTXUkiq+ti+u+tXXRVDFjDInb9vsoZchR9eSbbDWYPH/bve33XZBmGoXacCOENP35Um7 CfNfdCabaAX0wLDT7bD8rgaJ3QkplKEA67pPjXShgOODA76WdF9yR9MaVQVegA== 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 4cRs6Z04DPzk7L; Wed, 17 Sep 2025 21:17: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 58HLHPrK005347; Wed, 17 Sep 2025 21:17:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58HLHPHP005344; Wed, 17 Sep 2025 21:17:25 GMT (envelope-from git) Date: Wed, 17 Sep 2025 21:17:25 GMT Message-Id: <202509172117.58HLHPHP005344@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dave Cottlehuber Subject: git: 728ec0c094ce - main - release: Add images for almost all packages, with & without toolchain List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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/main X-Git-Reftype: branch X-Git-Commit: 728ec0c094ce473ae17ebd1adb05f0959bf3a68e Auto-Submitted: auto-generated The branch main has been updated by dch: URL: https://cgit.FreeBSD.org/src/commit/?id=728ec0c094ce473ae17ebd1adb05f0959bf3a68e commit 728ec0c094ce473ae17ebd1adb05f0959bf3a68e Author: Dave Cottlehuber AuthorDate: 2025-09-17 21:16:37 +0000 Commit: Dave Cottlehuber CommitDate: 2025-09-17 21:16:37 +0000 release: Add images for almost all packages, with & without toolchain Contains almost everything of use in a container except: - *lib32 - *dev - *dbg - *src - anything expecting hardware such as device config tools Differential Revision: https://reviews.freebsd.org/D51471 Reviewed by: dfr, emaste Approved by: cperciva MFC after: 1 day Sponsored by: SkunkWerks, GmbH --- release/Makefile.oci | 8 ++-- release/scripts/make-oci-image.sh | 2 +- release/tools/oci-image-notoolchain.conf | 68 ++++++++++++++++++++++++++++++++ release/tools/oci-image-toolchain.conf | 16 ++++++++ 4 files changed, 90 insertions(+), 4 deletions(-) diff --git a/release/Makefile.oci b/release/Makefile.oci index a6f998002f92..16c475937d15 100644 --- a/release/Makefile.oci +++ b/release/Makefile.oci @@ -3,7 +3,7 @@ # .if defined(WITH_OCIIMAGES) && !empty(WITH_OCIIMAGES) -OCI_IMAGES= static dynamic runtime +OCI_IMAGES= static dynamic runtime notoolchain toolchain .endif oci-install: @@ -16,8 +16,10 @@ oci-install: OCI_TARGETS= OCI_DEPS_static= -OCI_DEPS_dynamic= container-image-static.txz -OCI_DEPS_runtime= container-image-dynamic.txz +OCI_DEPS_dynamic=container-image-static.txz +OCI_DEPS_runtime=container-image-dynamic.txz +OCI_DEPS_notoolchain=container-image-runtime.txz +OCI_DEPS_toolchain=container-image-notoolchain.txz .for _IMG in ${OCI_IMAGES} OCI_TARGETS+= container-image-${_IMG}.txz diff --git a/release/scripts/make-oci-image.sh b/release/scripts/make-oci-image.sh index 8a620e9d8973..6e5ad69741f7 100644 --- a/release/scripts/make-oci-image.sh +++ b/release/scripts/make-oci-image.sh @@ -47,7 +47,7 @@ install_packages() { # metadata for what was installed). This trims more than 40Mb from the # resulting image. env IGNORE_OSVERSION=yes ABI=${abi} pkg --rootdir ${rootdir} --repo-conf-dir ${workdir}/repos \ - install -yq "$@" || exit $? + install -yq -g "$@" || exit $? rm -rf ${rootdir}/var/db/pkg/repos } diff --git a/release/tools/oci-image-notoolchain.conf b/release/tools/oci-image-notoolchain.conf new file mode 100644 index 000000000000..e251281a7357 --- /dev/null +++ b/release/tools/oci-image-notoolchain.conf @@ -0,0 +1,68 @@ +#! /bin/sh + +# Build OCI container image with almost all packages suitable for jails, excluding compiler + +OCI_BASE_IMAGE=runtime + +oci_image_build() { + set_cmd ${workdir} /bin/sh + install_packages ${abi} ${workdir} \ + FreeBSD-acct \ + FreeBSD-at \ + FreeBSD-audit \ + FreeBSD-autofs \ + FreeBSD-blocklist \ + FreeBSD-bsnmp \ + FreeBSD-caroot \ + FreeBSD-certctl \ + FreeBSD-clibs \ + FreeBSD-console-tools \ + FreeBSD-cron \ + FreeBSD-csh \ + FreeBSD-dma \ + FreeBSD-ee \ + FreeBSD-fd \ + FreeBSD-fetch \ + FreeBSD-ftp \ + FreeBSD-ftpd \ + FreeBSD-inetd \ + FreeBSD-ipf \ + FreeBSD-ipfw \ + FreeBSD-iscsi \ + FreeBSD-jail \ + FreeBSD-kerberos \ + FreeBSD-kerberos-lib \ + FreeBSD-libarchive \ + FreeBSD-libcompiler_rt-dev \ + FreeBSD-libexecinfo \ + FreeBSD-libucl \ + FreeBSD-locales \ + FreeBSD-lp \ + FreeBSD-mtree \ + FreeBSD-natd \ + FreeBSD-netmap \ + FreeBSD-newsyslog \ + FreeBSD-nfs \ + FreeBSD-nuageinit \ + FreeBSD-openssl \ + FreeBSD-periodic \ + FreeBSD-pf \ + FreeBSD-pkg-bootstrap \ + FreeBSD-quotacheck \ + FreeBSD-rc \ + FreeBSD-rcmds \ + FreeBSD-rescue \ + FreeBSD-resolvconf \ + FreeBSD-runtime \ + FreeBSD-ssh \ + FreeBSD-syslogd \ + FreeBSD-tcpd \ + FreeBSD-telnet \ + FreeBSD-ufs \ + FreeBSD-unbound \ + FreeBSD-utilities \ + FreeBSD-vi \ + FreeBSD-yp \ + FreeBSD-zfs \ + FreeBSD-zoneinfo +} diff --git a/release/tools/oci-image-toolchain.conf b/release/tools/oci-image-toolchain.conf new file mode 100644 index 000000000000..b3b7eed8e8d1 --- /dev/null +++ b/release/tools/oci-image-toolchain.conf @@ -0,0 +1,16 @@ +#! /bin/sh + +# Build Open Container Initiative (OCI) container image with almost all of FreeBSD base.txz + +OCI_BASE_IMAGE=notoolchain + +oci_image_build() { + set_cmd ${workdir} /bin/sh + install_packages ${abi} ${workdir} \ + FreeBSD-clang \ + FreeBSD-ctf-tools \ + FreeBSD-lld \ + FreeBSD-lldb \ + FreeBSD-toolchain \ + FreeBSD-*-dev +} From nobody Wed Sep 17 21:38:05 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cRsZP4mQQz686x9; Wed, 17 Sep 2025 21:38: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 4cRsZP4Fjrz3Rw1; Wed, 17 Sep 2025 21:38:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758145085; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Lxwp+/Qd375hf3RQCIiyE/dSzR9UBnGX4fHz8gGhGw4=; b=xSUcfgRu0zO7T3OVBPifoAK3ElEVVWvbLGAiKn+dIka9joeg5RZWzqr9ZNT5yiI2qAlNKQ PV+o3fqQppVMRSOE2HIiTaiLfUrWje0S0R02JNqBH4hCpKae/+rLDNtKms5WUcvZ/A56sp t2ccpKwf3f8tjrWOcJz8/7baFc8gXu/VHlyMINpy9dylCzsAlz6v9hws6ao2eKvvHU8jZo QeVEB1HnfZoUFsRx+OL+tIJoGdu5b6zFG63FBpQ6HW/RFKhYsmIZlpWOdcDpz3g+qdMsmT 3YvguDVmXS+qRceQvoXiekas2ZJEWPsm78jkNE75xh3FQcshlurVluVy/KJNdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758145085; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Lxwp+/Qd375hf3RQCIiyE/dSzR9UBnGX4fHz8gGhGw4=; b=sI2n3DeMAbmMt8h8HQZnBO+IUTvOcxRREH02iFgVkyVxMLoA7cQ0PLTKh/+LtvKiKcGsi9 Sx3toukRsdLuzdhrDnsCaCnnmoILlf5X1NXeEVY8H+m3SgVe32r1qDSuUY0zLC8K/y7v+1 lVqbJ+pOmNK7itlMEEIiZxx4w6ixgnf8n8OsOPUzsWlHV7bBS5t3eaJnd2Bbtubdem+Stq sg1OJkz8/RowHIj1PVqROwQLb/v8SMbD4J9pONXw8oDix8SjJZb9TgpJhWFIC61MoUcie8 ZRSwMekJsYIFB8Klz3z5TNi9/q69tcUgxM7YM4qqxPtQB4IVU+SOJDIaV46ZXg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758145085; a=rsa-sha256; cv=none; b=bF3CC0guclaw/nnc7T5ngGGR/0HljJkGij+WzDE7QzaAazsEw9TVhp5Lmqvv7D5/8x3+0y g/0+Q/MGMARqsvnGuQOv8/LGyULX2lTxDQSP6n5SF1lGT2LFOXQjedCFKmQGLgpd5DkWeh T6BExPDBnZU/3cSFG0wBuQUMZk4varqbK6uSML2Bcb1+nVaDyeziLxSqgHkkRDQ9/V+cXx Z06YKP5RZYBDmGRm+9W/yNqNPTxGMqphvPcNmA5qC4swRbQje9LeOXJ3447f1PSPFuR2JS OyJabucxMmHlJ3ikCLTJ870MaKs5Dkj851xM2hM0Wrzac4lY8O4Z551FjBlRBg== 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 4cRsZP3YhTzk6W; Wed, 17 Sep 2025 21:38:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58HLc5Bv042811; Wed, 17 Sep 2025 21:38:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58HLc5VS042808; Wed, 17 Sep 2025 21:38:05 GMT (envelope-from git) Date: Wed, 17 Sep 2025 21:38:05 GMT Message-Id: <202509172138.58HLc5VS042808@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Bryan Drewery Subject: git: cddb9806b50b - main - syslogd: Make some code more clear. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bdrewery X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cddb9806b50b49722140d7b30c09643376feeaed Auto-Submitted: auto-generated The branch main has been updated by bdrewery: URL: https://cgit.FreeBSD.org/src/commit/?id=cddb9806b50b49722140d7b30c09643376feeaed commit cddb9806b50b49722140d7b30c09643376feeaed Author: Bryan Drewery AuthorDate: 2025-09-17 21:23:19 +0000 Commit: Bryan Drewery CommitDate: 2025-09-17 21:28:18 +0000 syslogd: Make some code more clear. This moves some math to where it logically makes more sense for skipping over the ": " separator in the message formatted "app[PID]: MSG". No functional change. Fixes: 18bcf5a0 ("Restore local kernel "prog" filtering") Sponsored by: Dell Inc. --- usr.sbin/syslogd/syslogd.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c index 81bbbbe66be8..e06464c0e749 100644 --- a/usr.sbin/syslogd/syslogd.c +++ b/usr.sbin/syslogd/syslogd.c @@ -1185,13 +1185,15 @@ parsemsg_rfc3164_app_name_procid(char **msg, const char **app_name, /* Split strings from input. */ app_name_begin[app_name_length] = '\0'; - m += app_name_length + 1; + m += app_name_length; if (procid_begin != NULL) { procid_begin[procid_length] = '\0'; + /* Skip "[PID]". */ m += procid_length + 2; } - *msg = m + 1; + /* Skip separator ": ". */ + *msg = m + 2; *app_name = app_name_begin; *procid = procid_begin; return; From nobody Wed Sep 17 22:08:32 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cRtFZ4yQzz688cL; Wed, 17 Sep 2025 22:08:34 +0000 (UTC) (envelope-from madpilot@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cRtFZ3yyCz3YRY; Wed, 17 Sep 2025 22:08:34 +0000 (UTC) (envelope-from madpilot@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758146914; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=Fnv1sIYeHsuHBMnJes3U187PXl+g4glLWhnb2xhaIpM=; b=l8f4fhKwxIivVYBns7YoGtnHB4U02fwGLO/zvyuynJCHjleF0V3QZokViaqXXkYeG28q6S EAjA9dWzLGZ65NXyhTn60kNC8sEJntgdDm9L3joI1//eK/20DDmBFbooS+LAnmZizVo/Fd HcOpbVS1bhl3DYDT1ghmVX3CVJb+SFIXwyk3clcyzsvBG16SZqcRKWZGzRCYRbNvSgWNy7 Wo/gfZ8d+D/1j8NIunHLBXajbvLLb15PqoyMS0n4i29uXDC/cMiNlWwqr3pwLJHKzw23qL bvdxHboxeqVv0TaUjPlFqhwvN0yfA+T8fU2A5aqjG/B0biO0HdvwpwPJC1bVyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758146914; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=Fnv1sIYeHsuHBMnJes3U187PXl+g4glLWhnb2xhaIpM=; b=tbc8mAx3jO1MQ0kvLbn0SWsJXA6ADeuRJlN8OYK8YOV8nqvAqpTCnsv3xwQuhP6tP+2NX5 m5Y0m5hJGYZkRBPOcvl41jcXsWhPGYmP/k4n+QfgF+PMWvSNN+bic2Lwu86qFNDhooHIa/ XUy7kyFN+QXqk5jfafHMsh5C3Sra+YE1Wlb73v5XwG15fUR54lgELXHjWT/HfhWnCjxwS2 yYP733qF5nLppJ8RHo3OypFg/vGIBGiDrN4+RobRk5bu7WZeXu9orBV/E/IeDIsQp4KY1m FTj4wwNxJYV1JdZW367jz5/uUxQv0+PyPuKEFjAAmfY0zJ48lBT1VqKZ+xWaxg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758146914; a=rsa-sha256; cv=none; b=kBPic/B39zMQ+pXRrMsZdIJsdln0qf7vcRdXoM4PaMW8Zq0WezgtvDE/SYJ4Iy1GexfhzU 0QMnrq3KJMejK+8+5WH8iTg3fSHAr+QG3SxdQ1owQdvJbrfItWw3iLkvZ1Vfo50YFaKko0 OXaamrn6lVjUNPPHcKViGSDFEYEKWMRn4WIWArIEME8T7tmB7IgI90b3B519k7mblmjLYv m+oDAP7YojIy+Q1tIzjMDJH2Oi1PWkkEuo/rIOurJVZCCGCRfxvK30wv2nf7xqLA9lVrTE ccLsxtu35oHfy7U3tfUB9ZTkHh8Tzp+wIdFIl206VkT0syYjA24WaC3kKSegJg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from [IPV6:2a01:e11:2002:4280:ab9b:8bf1:ec36:413a] (unknown [IPv6:2a01:e11:2002:4280:ab9b:8bf1:ec36:413a]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: madpilot/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4cRtFY5T6Mz7wf; Wed, 17 Sep 2025 22:08:33 +0000 (UTC) (envelope-from madpilot@FreeBSD.org) Message-ID: <9dc5eff9-3612-4bb8-be96-637bb4257a5f@FreeBSD.org> Date: Thu, 18 Sep 2025 00:08:32 +0200 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: e779891327b1 - main - sys/power: Sleep type reporting by PM backends From: Guido Falsi To: Nuno Teixeira , Cy Schubert Cc: Aymeric Wibo , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202509142159.58ELx5Rg054606@gitrepo.freebsd.org> <20250916050239.4BB672D5@slippy.cwsent.com> <47a0213b-010e-47e4-8285-dcf426f59c08@FreeBSD.org> Content-Language: en-US Autocrypt: addr=madpilot@FreeBSD.org; keydata= xsBNBE+G+l0BCADi/WBQ0aRJfnE7LBPsM0G3m/m3Yx7OPu4iYFvS84xawmRHtCNjWIntsxuX fptkmEo3Rsw816WUrek8dxoUAYdHd+EcpBcnnDzfDH5LW/TZ4gbrFezrHPdRp7wdxi23GN80 qPwHEwXuF0X4Wy5V0OO8B6VT/nA0ADYnBDhXS52HGIJ/GCUjgqJn+phDTdCFLvrSFdmgx4Wl c0W5Z1p5cmDF9l8L/hc959AeyNf7I9dXnjekGM9gVv7UDUYzCifR3U8T0fnfdMmS8NeI9NC+ wuREpRO4lKOkTnj9TtQJRiptlhcHQiAlG1cFqs7EQo57Tqq6cxD1FycZJLuC32bGbgalABEB AAHNIkd1aWRvIEZhbHNpIDxtYWRwaWxvdEBGcmVlQlNELm9yZz7CwHgEEwECACIFAk+G+3MC GwMGCwkIBwMCBhUIAgkKCwQWAgMBAh4BAheAAAoJEBrmhg5Wy9KT2uIIAIrawQ89TnqEhi2C OEQAhx3uqWZuNoS6NyiSgsRCmtSnT2GOgH4Ucbr/I37SkV1B3K6HkoL6lwN8Gjf5KOgLqmTi E1W3RTwS7l8PSvdnjM9i7g351R4mTijtxawB/JcQf/Kge3Yqr1V4g6H+wQXHUStmHThbupuN trzRphvR/e5ekT0FTyVfPmpcbm68i2bwZnKUex/TNIECBykYh8b+SYMLhENf2ayRjCIWS2Ad 7tnTKhMtnS5jtW6qjBy4RoTpQD6oR1xIgkTRlQ49roVCUfdHb+Y/kh+U9G1IcoNy4vkg9IfP dwpSfnP+a8j0AZ1hMnOLZ1fYoQrs+4gVLy8Fs7TOwU0EUxB7QQEQAKFhrDceoPdK/IHDSmoj 6SQYisvM7VdhcleS7E9DoEAVt7yMbf6HbbMVTTY6ckvwTWQssywLBXNVqxgc4WLJjzfUhgef +WE75M3+WFYlOVQLGZY/zEVgma1raYnOHNAOzeHLDmEXjbZP6vGAeDyBbGfQPpE7qGYZ7ube T3XwQO+PklcCrvOPj2ZPcAxGNS2xVU/LzONqCrJqLMJSIcCdsbiSP4G5PnDFHtMokaTY6OEr 8OEQfOAerhcHUa/z7Uu8YtmaqKH+QGkE/WEgaRqSiTnv0JOTD+DxehaqvoKPPZ++2NpCZMHB 2i6A/xifmQwEiIjEXtcueBRzkNUQkxhqZyS13SrhocL9ydtaVPBzZatAEjUDDEJmAMLVFs45 qfyhMiNapHJo2n3MW/E5omqCvEkDdWX/en3P7CK2TemeaDghMsgkNKax/z0wNo5UZCkOPOz0 xpNiUilOVbkuezZZNg65741qee2lfXhQIaZ66yT7hphc/N/z3PIAtLeze4u1VR2EXAuZ2sWA dlKCNTlJMsaU/x70BV11Wd/ypnVzM68dfdQIIAj1iMFAD/lXGlEUmKXg5Ov2VQDlTntQoanC YrAg+8CttPzjrydgLZFq3hrtQmfc0se5yv1WHS69+BsUOG09RvvawUDZxUjW19kyeN9THaNR gow3kSuArUp6zSmJABEBAAHCwF8EGAEIAAkFAlMQe0ECGwwACgkQGuaGDlbL0pMN5wgA4bCk X/qwEVC06ToeR6C2putmSWQMgpDaqrv65Hubo+QGmg2P4ewTYQQ4g6oYWS03qHxqVVWhKz7F jfrV+dH8qbCLfSgIcvdBha7ayGZVrsiuMLKGbw36fcmkZPpSDOfHcP0XH8Z+u9CWj0xUkTxA lZ/7i6gYSUpG2JWNtdmE/X8VVEyXusCLwy0K0BI60A/4dRTIX3C4QKrJ3ZbUXegz70ynjHf+ lQMZ9IZKASoRMuS5FozPQh6abvmwZEPdf5I9riUElzvHrqJ8Bx0t3Pujdoth+yNHpnBxrtO8 LkQdrQ58P0SwcaIX33T2U9pG8bhu5YVR88FQ8OQ0cEsPBpDncg== In-Reply-To: <47a0213b-010e-47e4-8285-dcf426f59c08@FreeBSD.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 9/17/25 22:50, Guido Falsi wrote: > On 9/17/25 11:15, Nuno Teixeira wrote: >> >> Hello Cy, >> >>     One of this series of ACPI commits has broken power management on my >>     machines. >>     One of which managed to capture a dump from a kernel panic after >>     poweroff(8) >>     was issued. >> >> >> I can confirm same crash on reboot on a Intel laptop, after upgrading >> from main 2025-09-06 -> 2025-09-16. >> > > Hi, > > A me too. > > Just noticed this while investigating why my machines with head (laptop > and two desktops) were not switching off anymore. > > So looks like I'm also experiencing this. > > All machines behave the same, the almost turns off, monitor turns off, > but power light stays on. > > I'm testing reverting commits to see if it goes back to working. > I can confirm reverting this commit and the previous one "fixes" it. -- Guido Falsi From nobody Wed Sep 17 22:39:24 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cRtx84N5yz68Byp; Wed, 17 Sep 2025 22:39: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 4cRtx83Wnwz3ctw; Wed, 17 Sep 2025 22:39:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758148764; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=05ggCgrSCh0Ho3ty3cICYuP9HiOOjLdqGBOHpbO5GeY=; b=Kc+RIi6ORnQ89XiS+2LQ/Fm9pG5CRztXQuIHzc+BMGJVcFoH+Ru6a0U//jpzEV6z87przW HgP65aGDBiD3ukrVHHOn4Vl9GK+PqcGktHoeEjwub4hehxS5uv1go2Wg78E1YaMxcCyw5v BBD3Fu8wmMaJ+Y/uUTJNpzsus0lWpTkAyn+ps3dWZQgIPfNjK8pdyAMwGni/I7o2Wib1Yh q6vF/Tn/ehHiHLuW6YsbMv+J4b+UuE/JU74NYVAtnjvvtJQ/Zp18vqEjQVgSMU2JyoYpK6 BvJy58TZWVNqRThqoMME/oGzKt9X6FG6RwtoDmSWPXM0Tx2asqT9+AqjFeR25g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758148764; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=05ggCgrSCh0Ho3ty3cICYuP9HiOOjLdqGBOHpbO5GeY=; b=XkZ+jXkny5WSz1NwVU0CcqYoPSnlMLlZLHEIGC1EU1DuVGEuD++1waI/1QgAbZJ4AxO1T2 LbsGyZpRTXErWZZTRgc6aKD8NbI8W7uGbK+PWB7AiUzszoqtnDOIjnnPls2riseYrL7DrP hDYyZIU+pIiiJwKEbx8+XOc2dZBSmq3IJ8hQcYidp/c4R2bpzk1ijoA9czauHoINN5uC9a VadJ/+DiD4Aji24jaVcwxvF9FoYbBXMAm+KDFLv1E7kxZXRXtW3o3x+SwnWN55DXC7+dTK gNx1qYwft5i3bVDn0qj2j7GxOsl9n2yIx1l4XNZ/LllU7ddBrv2O6jWf08iljQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758148764; a=rsa-sha256; cv=none; b=MFo6QgfccOD4lxUkxGdRE6AjjQJweqZWRLO4kDhnUM6isrl61I60G1lPa9vsu+kWgXO38M zarRKhoJpI4PlimWi2WYTWeak56/5/8mgO4wwEKPz3fes0BmJuTYHDW8jL0dkzoGYKjCIc lxBtXf31YpbxXmV4LVR9Ji02Mjc1KDSBUe90lCFEiREixm5PScRd1KJDqXDQlaJpl3jow5 vrRVU7YvDFs579bTcrghfFvrIPYC8v6PbHqZLZtUiTDKhGaJA2Sbd5YuO3fegDgPGRcmf/ f151YZ+6RWZ1O38U5PSgvPZaGFrOiIryJEmnwTX19aPlPUyferG3P0DZj2dFTQ== 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 4cRtx82cxmzlFD; Wed, 17 Sep 2025 22:39: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 58HMdOx9055927; Wed, 17 Sep 2025 22:39:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58HMdOK9055924; Wed, 17 Sep 2025 22:39:24 GMT (envelope-from git) Date: Wed, 17 Sep 2025 22:39:24 GMT Message-Id: <202509172239.58HMdOK9055924@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Colin Percival Subject: git: 6b5adf33873a - main - Include a pkg package in the pkgbase repo List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6b5adf33873a309523dc4e585ff08d70bb6c6f2f Auto-Submitted: auto-generated The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=6b5adf33873a309523dc4e585ff08d70bb6c6f2f commit 6b5adf33873a309523dc4e585ff08d70bb6c6f2f Author: Colin Percival AuthorDate: 2025-09-17 22:34:25 +0000 Commit: Colin Percival CommitDate: 2025-09-17 22:34:25 +0000 Include a pkg package in the pkgbase repo It is essential that users be able to install the FreeBSD base system from release media and have all the bits needed to update the FreeBSD base system without touching the ports tree or pkg.freebsd.org. To that end, resurrect (and heavily rewrite) the make-pkg-package.sh script and hook it into the create-packages target; if /usr/ports exists when building pkgbase packages, we'll also (cross)build pkg and include it in the repository. Scripting for actually installing this package as part of the FreeBSD installation process to come later, but I wanted this in the tree in time to test it in this week's snapshots. MFC after: 1 day Sponsored by: https://www.patreon.com/cperciva --- Makefile.inc1 | 6 ++++-- release/scripts/make-pkg-package.sh | 28 ++++++++++++---------------- 2 files changed, 16 insertions(+), 18 deletions(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index 97a0b00cc517..65631c2e8eb8 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -2039,12 +2039,14 @@ update-packages: .PHONY ${_+_}${MAKE} -C ${.CURDIR} ${PKGMAKEARGS} real-update-packages package-pkg: .PHONY +.if exists(${PORTSDIR}) rm -rf /tmp/ports.${TARGET} || : - env ${WMAKEENV:Q} SRCDIR=${.CURDIR} PORTSDIR=${PORTSDIR} REVISION=${_REVISION} \ + env ${WMAKEENV} SRCDIR=${.CURDIR} PORTSDIR=${PORTSDIR} REVISION=${_REVISION} \ PKG_CMD=${PKG_CMD} PKG_VERSION=${PKG_VERSION} REPODIR=${REPODIR} \ WSTAGEDIR=${WSTAGEDIR} \ OSVERSION="${SRCRELDATE}" \ sh ${.CURDIR}/release/scripts/make-pkg-package.sh +.endif real-packages: stage-packages create-packages sign-packages .PHONY @@ -2127,7 +2129,7 @@ create-packages-source: _pkgbootstrap _repodir .PHONY SOURCE_DATE_EPOCH=${SOURCE_DATE_EPOCH} \ create-source-packages -create-packages: .PHONY create-packages-world create-packages-kernel create-packages-source create-packages-sets +create-packages: .PHONY create-packages-world create-packages-kernel create-packages-source package-pkg create-packages-sets create-source-src-package: _pkgbootstrap .PHONY rm -f ${SSTAGEDIR}/src.plist 2>/dev/null || : diff --git a/release/scripts/make-pkg-package.sh b/release/scripts/make-pkg-package.sh index 68172c47f326..a0ac0fc16305 100755 --- a/release/scripts/make-pkg-package.sh +++ b/release/scripts/make-pkg-package.sh @@ -1,26 +1,22 @@ #!/bin/sh -# -# -# Simulate the build environment. -eval $(make -C ${SRCDIR} TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} buildenvvars) +# Simulate the build environment. Note that we need to unset some variables +# which are set in the src tree since they have different (unwanted) effects +# in the ports tree. +SRC_PKG_VERSION=${PKG_VERSION} +PKG_ABI=$(${PKG_CMD} -o ABI_FILE=${WSTAGEDIR}/bin/sh config ABI) +unset PKG_VERSION +unset MAKEFLAGS +unset PKGBASE export WRKDIRPREFIX=/tmp/ports.${TARGET} -export WSTAGEDIR=${WSTAGEDIR} -export REPODIR=${REPODIR} -export PKG_CMD=${PKG_CMD} -export PKG_VERSION=${PKG_VERSION} -export OSVERSION=${OSVERSION} export WRKDIR=$(make -C ${PORTSDIR}/ports-mgmt/pkg -V WRKDIR) make -C ${PORTSDIR}/ports-mgmt/pkg TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ CONFIGURE_ARGS="--host=$(uname -m)-portbld-freebsd${REVISION}" \ - stage create-manifest + BATCH=YES stage create-manifest -${PKG_CMD} -o ABI_FILE=${WSTAGEDIR}/bin/sh \ - create -v -m ${WRKDIR}/.metadir/ \ +${PKG_CMD} -o ABI=${PKG_ABI} \ + create -v -m ${WRKDIR}/.metadir.pkg/ \ -r ${WRKDIR}/stage \ -p ${WRKDIR}/.PLIST.mktmp \ - -o ${REPODIR}/$(${PKG_CMD} -o ABI_FILE=${WSTAGEDIR}/bin/sh config ABI)/${PKG_VERSION} -mkdir -p ${REPODIR}/$(${PKG_CMD} -o ABI_FILE=${WSTAGEDIR}/bin/sh config ABI)/${PKG_VERSION}/Latest/ -cd ${REPODIR}/$(${PKG_CMD} -o ABI_FILE=${WSTAGEDIR}/bin/sh config ABI)/${PKG_VERSION}/Latest/ && \ - ln -s ../pkg-*.txz + -o ${REPODIR}/${PKG_ABI}/${SRC_PKG_VERSION} From nobody Wed Sep 17 22:43:49 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cRv2F73SKz68CLM; Wed, 17 Sep 2025 22:43: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 4cRv2F5wF3z3dlk; Wed, 17 Sep 2025 22:43:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758149029; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/qgZsBQrFKdqeKOlhb1ngNoW551+YJA6xkf1k6jtu5w=; b=bcDUNB0xpZ9qvQkSERp7Yd6YseOc0Qtm5LkHfX55spu3nTu6NVyhRy7WBwGOBWIXjmitL3 lEDPnwn+ArL5kwbd6ozdtxEV19Mlw78voz83R7aCGI4kTWj4bS8/7Mr7/pnytS8jvq3kO+ +bCT8cSLuHafVqeqbmKcFu3lCKH5FKMbkomZAxGN9d7SVz8BywJJZMlOw5s4J2ws7uiw/X Es7AO8guKyxZiztyZfGM0U+pClNGXLALt1LEuVKDTrZzT6DFL2UQ0obJKdxVP4dJfZfjOz VUs6UqrZnro7K2hUB61kEB7nV+IFgOT2WLjYYhMGocG/d9y8SD//NHnviLpeZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758149029; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/qgZsBQrFKdqeKOlhb1ngNoW551+YJA6xkf1k6jtu5w=; b=kYE15reHaqMqxp8XOBIImGKfaGhpAhYDMkFTpm3CfSwaKQezj/w19sceKISrxnzs+cHt2z +Z9qdEdeysN+ilyKqhB2scP//Hu6hqoiKk9kYl9rrT85LkUh9WUkKZ/L3hgEBEQkaXM4rU 19D5PelDJR+Y8Cklczh6SV1oGztSbq5+ddQkC8312jmxqZDNvpSE7dkP03rS4J4zzZzLHp JOkphnRFX3og6zoa59VvyyjankzfkSqIF3qAVBAd/Wyqxs6TXvIi5UYOU8jNE1KdbcvEJO BLjjieis4HWDbC9i/fr4a2PrDwG7/jpGJcVG23uzQgqZihcRgksdxZUgcj4P5A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758149029; a=rsa-sha256; cv=none; b=IPeqSQDbVkK+Ok8XGUoWkyDd/xXCTluRzhru3FDVxhI1zDwzzkl0PLtBu53XstIqMWwicd Ofi1kzLplArntiHaKtHO6hDjI0z4nF9wTydr0Z0Gi80dhMAWslFp8eT8w0uCI+ekSh5SpN gF4uNdDvPMpIzru6HeiPMa15DNitXaJL0dn6MJS+tndQVQ99EXdSbHRIHqzU7lwVH1O2bi 5/eDd2P0tz4FqnmeqstfVvmAVZPcMpKfNmAvCFEygmdP1Z5+5XL9DhuRTjAfx5oi2yYhOC UwowCoETL24EDD/BMl2o8xNBW1PKWDIGX9HsGArMibL941Eg4Z+o0AIo9Skuiw== 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 4cRv2F5G4Vzm1K; Wed, 17 Sep 2025 22:43: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 58HMhn1V073227; Wed, 17 Sep 2025 22:43:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58HMhnnD073224; Wed, 17 Sep 2025 22:43:49 GMT (envelope-from git) Date: Wed, 17 Sep 2025 22:43:49 GMT Message-Id: <202509172243.58HMhnnD073224@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: ea1652bc01c4 - main - vfs: remove a stale comment about unlock + unref relationship in vput List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ea1652bc01c4093eb4a8c6971c69a410883df189 Auto-Submitted: auto-generated The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=ea1652bc01c4093eb4a8c6971c69a410883df189 commit ea1652bc01c4093eb4a8c6971c69a410883df189 Author: Mateusz Guzik AuthorDate: 2025-09-17 22:40:24 +0000 Commit: Mateusz Guzik CommitDate: 2025-09-17 22:43:34 +0000 vfs: remove a stale comment about unlock + unref relationship in vput It does not hold since introduction of vnode state tracking, which validates unlock only happens after the target vnode is sorted out (fully constructed or aborted). See 829f0bcb5fe24bb5 ("vfs: add the concept of vnode state transitions"). --- sys/kern/vfs_subr.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index f86bda2aa6f0..fe299ecc9c56 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -3567,11 +3567,6 @@ enum vput_op { VRELE, VPUT, VUNREF }; * exclusive lock on the vnode, while it is legal to call here with only a * shared lock (or no locks). If locking the vnode in an expected manner fails, * inactive processing gets deferred to the syncer. - * - * XXX Some filesystems pass in an exclusively locked vnode and strongly depend - * on the lock being held all the way until VOP_INACTIVE. This in particular - * happens with UFS which adds half-constructed vnodes to the hash, where they - * can be found by other code. */ static void vput_final(struct vnode *vp, enum vput_op func) From nobody Thu Sep 18 04:25:49 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cS2cs3YnGz67gDp; Thu, 18 Sep 2025 04:25: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 4cS2cs33KQz3GS0; Thu, 18 Sep 2025 04:25:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758169549; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=69iJaI0QSAnU/8RbUGfWcRHanIwEgMCscPOc1+msPRs=; b=bto26Br1DbljQg9Aqu2SH6JWMVpxvi+VOFcBXbFoKra6gTAjJY/hpWqdoqlFWYIpSu5p6u 42dvBwtc+keGhqWPFmDzxx0mYiaMD//SdCqObkwrsoam1NZf+CalOMA9Y/WW541gri2FH6 FBgGtd/ieqU4BTQJXti6/CZaXP0BhZNIJUll+hNf6ucU4uNC2r7LB4uON5ILV8S6WMZYF6 kIsTs364M4SUkqTqAC0BFTTtk0crCWoT4w/lbIqnJZRxtGPC2b1lcDTnOZbYj6W5zesk5B gqBzLZf/QlhZK4Sj+EwRDxfQJWR/9tN1/o99GTbhpwfLPkiOXqgjP0Si0RyKKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758169549; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=69iJaI0QSAnU/8RbUGfWcRHanIwEgMCscPOc1+msPRs=; b=URKgJ/01LfJJ4yI/+pRDuzgrxhTtGvQvmaq37dG3V9jzy9byy2jy/JytRQu53kegfSa65Z OILekdDHqG83O4BWabnq9g3Zb3rzm7cIEyBtK9Y4eiqaMKt300jRzFqZgR7pPb25im65eZ QKeOAm9Usa33bELw9kv1S0co8SxE831fz4FMBXSYUvlVvTUHAr1ZVwtKArGRFweGDDuYeB IaFEEb16Qf1baWYc0nCGvxTfl11WD7lISBm7sLeSYaChfjAIxa861KlzXqigmHbep+F+1j o+2xJbjP/pFpo9rynCtLwYnDI4pU+Ac6Z0GBKbmA70fKgV+7VNy03aDU6fCOag== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758169549; a=rsa-sha256; cv=none; b=uh8MChlq9sK7ShhnfpjPGfSIsQb1K0v/OuCAEY8zFJXtE9E0zvFucbwQdL5x08q0CTbHqq DkcJdOx28U+8n2rA62ADfmvGDk8eeIz4O5Cd7/t/gOGTV0touT7SxPzl03GNsozgSkwJ+h nU2f7HIx5pJLj24ivqP4kqNXWWr+kXYSKyg9BqRRO+oiQLbdtfWAT6UIFDJIaXtBFWkYlj UMpizPN13bIv8DBOzm7JDOUHoJjAGO6kpDuqvxupj6dbKWobIUp/xaI7+jFKow+FQjxePr CbOymqRI5k1hGmxHLLJwreLSTRymANqTzOd2IeGGP8rIhc1TXKhFsTiE5ztvBg== 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 4cS2cs2QDLzwts; Thu, 18 Sep 2025 04:25: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 58I4PnJL013272; Thu, 18 Sep 2025 04:25:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58I4Pn2H013269; Thu, 18 Sep 2025 04:25:49 GMT (envelope-from git) Date: Thu, 18 Sep 2025 04:25:49 GMT Message-Id: <202509180425.58I4Pn2H013269@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Colin Percival Subject: git: 98d74493619e - main - Bootstrap pkg before building a pkg package List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 98d74493619ee0e1587bffed79ce8e9573c3fc8b Auto-Submitted: auto-generated The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=98d74493619ee0e1587bffed79ce8e9573c3fc8b commit 98d74493619ee0e1587bffed79ce8e9573c3fc8b Author: Colin Percival AuthorDate: 2025-09-18 04:22:50 +0000 Commit: Colin Percival CommitDate: 2025-09-18 04:22:50 +0000 Bootstrap pkg before building a pkg package At sufficiently high levels of build parallelism we can try to create the pkg before any of the other pkgbase-creation steps have taken care of the bootstrap. Fixes: 6b5adf33873a ("Include a pkg package in the pkgbase repo") MFC after: 12 hours Sponsored by: https://www.patreon.com/cperciva --- Makefile.inc1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index 65631c2e8eb8..cd0385ea32ac 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -2038,7 +2038,7 @@ packages: .PHONY update-packages: .PHONY ${_+_}${MAKE} -C ${.CURDIR} ${PKGMAKEARGS} real-update-packages -package-pkg: .PHONY +package-pkg: _pkgbootstrap _repodir .PHONY .if exists(${PORTSDIR}) rm -rf /tmp/ports.${TARGET} || : env ${WMAKEENV} SRCDIR=${.CURDIR} PORTSDIR=${PORTSDIR} REVISION=${_REVISION} \ From nobody Thu Sep 18 04:41:53 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cS2zP3B1Vz67grC; Thu, 18 Sep 2025 04:41: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 4cS2zP2BLYz3Gms; Thu, 18 Sep 2025 04:41:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758170513; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fVUrI9bk2fF8RK099BPveDnhHSkCYM+tYlCkQhau+pg=; b=cwTziDHa94pMuM9Rb3xznbC6j3gvmNZhxcx8EDW6/0OyrjSZKILEh0knPhJslwj1oXiFKV XJX/Ur5bQ5LChn/7HbH47akpb1yUN9J44rHVv7mzHKuOKqaVwkO51chcI0PcrTlHf9nOge 7WyLx89/6FV5zbazON/BuU6ruuMDUYjuDZuDDvCuXfl/G4yZmmfrcZHxQYGX1xsZ2kMb/q xRubMJAZ8dQUmO0LDJhoxE4UX0fIZPViPui2eOZJJNtY129zWedIECwmsvjS9i0jkzEdwZ pSqERJcLlwoNr5ZsROFZ3Syhl4OSkhZXGCC97m98VVr1w1zG8rBErslKK3WdMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758170513; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fVUrI9bk2fF8RK099BPveDnhHSkCYM+tYlCkQhau+pg=; b=Yq2KzKCI2lgfZrCa5/vrlOaHoHXme/5MLJaW68fPu1yGgFxcDUEWudfdZggT8iJ35unlc0 8zET0HshgCf0MEomHaTkimgGxoCweE/q+/xKzsuKhlqlpU/+QVwMKCL39lG6yEMEAmQu8r iBUr9vpcKutE0GpL9rhOnRc1r8XhGF7hLHQTjOen5XxT6dkEESwmw3POt5/n6KrjnynjrX LngSz6ug9KeFPqeU7oX0n7HGf0NDav0YSFL3u3LsildvLjBz44pxsyryx5bbPZ+m0iliZj AX4oZj944rnn04fzdybROufm7p65dRUd1AITpw84fZGzBpHaVJZL/z6URVWzNA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758170513; a=rsa-sha256; cv=none; b=sJbrW5mPCY6fxlwbphrqZUWp2owNbymCUYZpUvoo14tUpT3tOuSMzVwbdmnbqe8hAyGWCU 18Z1dL2SOkxAnixkCThj1iH64oPc8ZdlbcV1ytmeZt5gUnPvwEFxejOYdQ6jOLcaI6AU0l WgPJYFDrnXvloMBhKJfs1b6yHuoQKhyinfVHJPepnXbr3EuZRwTaroLx0vK9yP2jJBfQru YZuaYpNMT05XnXP3wSN29XhkitjHjg7YUxeyzYw+J6BrRis8x6nf+o+0qahW4vKzis9AWS cf7IFGwt8LTK6WKVYRGHvMCu8avx5LfUI71S5xBsAVtF3NYNlQtqBUhu77g44Q== 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 4cS2zP1Z8DzwM6; Thu, 18 Sep 2025 04:41: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 58I4frax045498; Thu, 18 Sep 2025 04:41:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58I4frIh045484; Thu, 18 Sep 2025 04:41:53 GMT (envelope-from git) Date: Thu, 18 Sep 2025 04:41:53 GMT Message-Id: <202509180441.58I4frIh045484@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Colin Percival Subject: git: b9afd7f6a5b1 - main - release: Allow powerpc GENERIC64(le)? kernels List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b9afd7f6a5b1cf1a6cbcef7a55aede7e71a0babc Auto-Submitted: auto-generated The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=b9afd7f6a5b1cf1a6cbcef7a55aede7e71a0babc commit b9afd7f6a5b1cf1a6cbcef7a55aede7e71a0babc Author: Colin Percival AuthorDate: 2025-09-15 02:44:07 +0000 Commit: Colin Percival CommitDate: 2025-09-18 04:40:43 +0000 release: Allow powerpc GENERIC64(le)? kernels The pkgbase-stage.lua script asserts that it has exactly one "kernel", but only accepts GENERIC as a "kernel". Use a slightly more permissive regex in order to capture kernels with names which start "GENERIC". Reviwed by: ivy MFC after: 12 hours Sponsored by: https://www.patreon.com/cperciva Differential Revision: https://reviews.freebsd.org/D52544 --- release/scripts/pkgbase-stage.lua | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/release/scripts/pkgbase-stage.lua b/release/scripts/pkgbase-stage.lua index a12ec372d1a9..0cd4cbb5c438 100755 --- a/release/scripts/pkgbase-stage.lua +++ b/release/scripts/pkgbase-stage.lua @@ -50,10 +50,12 @@ local function select_packages(pkg, media, all_libcompats) package ~= "FreeBSD-kernel-man" then -- Kernels other than FreeBSD-kernel-generic are ignored - if package == "FreeBSD-kernel-generic" then - table.insert(components["kernel"], package) - elseif package == "FreeBSD-kernel-generic-dbg" then + -- Note that on powerpc64 and powerpc64le the names are + -- slightly different. + if package:match("^FreeBSD%-kernel%-generic.*%-dbg") then table.insert(components["kernel_dbg"], package) + elseif package:match("^FreeBSD%-kernel%-generic.*") then + table.insert(components["kernel"], package) end elseif package:match(".*%-dbg$") then table.insert(components["base_dbg"], package) From nobody Thu Sep 18 04:41:54 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cS2zQ4ttWz67hXl; Thu, 18 Sep 2025 04:41: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 4cS2zQ2yfVz3HP6; Thu, 18 Sep 2025 04:41:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758170514; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rdo6+ON5x8DLNrBWDRzfLmheYxQxKtm7roD6CL4OuKc=; b=Pi2Ytype2/Tlb5LscwrZn8SG5sv9jpFdYBQRuaWUGdykDUo8Sbkj1cmlblPtw+pW7LRhXR MtyLHhHvMXjCP0232s54y/7/3/M52S1tuAa9pEpwD8KDybWXHGeuxXz57ox5UfqmgNaDBC I/ii2Iw/ibAfTLQbaHxGs0k7leEWboPze2tW0reiM7V/4+cssjl/z/qSF0oKf7K9sXGbDj Vu4mRTzqgI9q7yEOI1d5ZF0F3EQeHhKHaDpvUhDk/5OjIf3WntnSfLsIBLWcc3QzWaDTUS pYG/ordrtyVWIqe0NCxAEwm0TWhWSnn+Q/4iJhO/vbM/7JhQqMZA30Wid4eqfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758170514; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rdo6+ON5x8DLNrBWDRzfLmheYxQxKtm7roD6CL4OuKc=; b=Yv0EHDBRyEN2ap9AuvAHgzcwlUFlvRYRR/difPo3X7uq6BCA5I2TKADbIq5JoRaiIZcweU R0/fQo5DasKb95sWyfTDwzyhLZBZbp6vOJqyUbaqB8Ed1UoHdxfIaSPNyzuV7kF42v+Jq4 goCfGAl5dpeMK/ysZEPC2k/aR+O0Ny1GTPX7DeXxuW7x2QqiILMFlQqHgXfvbMYn4NaD2y cqDoe89+5LbcQfWhd9MC99uaIJcPeICGxEO2jRBwJYdEaT56kKjkywRWWT0K5h38WIiWdy g0WTWXCXg86I+TcnrrSbnH3AMM3uCPcAV7E5hWmXS5I6L14TnT/kxQ9YZ1nYJA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758170514; a=rsa-sha256; cv=none; b=Tv1qnB4tL/OqbeI/oRwq218KaOwcY+YV/XclZaUkJy6CucPM9F8Fq4HwEgj1rB0OZvfwT+ ON2PeK+Pdro5jnHTzNbM2vFKu2A14zRMvkMl9CXlgvzqIYSPVdPIElpj1Ss+MJXy0kVwVI sKm0LAPXgi95TsLZvJ2cEZPuP2sbS37nLv4TwoFNQuQxvBWqSlfx98r+GtYC2JZ9DhsTGY go2tVHkLxHqYH2z1voIrpSFKXDuadQU+O59Y+R/BS5JIl3oPF6CPROrQNyr1NAG1fKIMkW JR+gLOvdmmgDOMubKk7Og3AG7JzYKP3nild8GM2bDsHqn99Tu2AFGfm4LQ8qKQ== 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 4cS2zQ2V2DzwNp; Thu, 18 Sep 2025 04:41: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 58I4fsPv045795; Thu, 18 Sep 2025 04:41:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58I4fsxH045792; Thu, 18 Sep 2025 04:41:54 GMT (envelope-from git) Date: Thu, 18 Sep 2025 04:41:54 GMT Message-Id: <202509180441.58I4fsxH045792@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Colin Percival Subject: git: 35b81af1eee6 - main - release: Make PKGBASE the default List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 35b81af1eee699509bae2bbe12fdc770d9cee40a Auto-Submitted: auto-generated The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=35b81af1eee699509bae2bbe12fdc770d9cee40a commit 35b81af1eee699509bae2bbe12fdc770d9cee40a Author: Colin Percival AuthorDate: 2025-09-15 00:37:20 +0000 Commit: Colin Percival CommitDate: 2025-09-18 04:40:48 +0000 release: Make PKGBASE the default Replace the PKGBASE option by a NOPKGBASE option. Check for both whether the option is defined and whether it is empty, since when running from release.sh we always define NOPKGBASE. MFC after: 12 hours Sponsored by: https://www.patreon.com/cperciva Differential Revision: https://reviews.freebsd.org/D52536 --- release/Makefile | 12 ++++++------ release/release.sh | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/release/Makefile b/release/Makefile index 41bca6dceebc..e48527de160d 100644 --- a/release/Makefile +++ b/release/Makefile @@ -22,7 +22,7 @@ # WORLDDIR: location of src tree -- must have built world and default kernel # (by default, the directory above this one) # NODISTSETS: if set, do not include dist sets or MANIFEST -# PKGBASE: if set, include pkgbase packages rather than dist tarballs in +# NOPKGBASE: if set, include dist tarballs rather than pkgbase packages in # disc1 and dvd1 installation media # PORTSDIR: location of ports tree to distribute (default: /usr/ports) # XTRADIR: xtra-bits-dir argument for /mkisoimages.sh @@ -188,7 +188,7 @@ bootonly: packagesystem dvd: packagesystem .endif -.if defined(PKGBASE) +.if !defined(NOPKGBASE) || empty(NOPKGBASE) PKGBASE_REPO= pkgbase-repo PKG_ABI= $$(${PKG_CMD} -o ABI_FILE=${.TARGET}/usr/bin/uname config ABI) .endif @@ -207,7 +207,7 @@ disc1: ${PKGBASE_REPO} MK_TOOLCHAIN=no \ MK_RESCUE=no MK_DICT=no \ MK_KERNEL_SYMBOLS=no MK_TESTS=no MK_DEBUG_FILES=no) -.if defined(PKGBASE) +.if !defined(NOPKGBASE) || empty(NOPKGBASE) # Create offline pkgbase repo on release media mkdir -p ${.TARGET}/usr/freebsd-packages/repos/ ${.CURDIR}/scripts/pkgbase-stage.lua disc \ @@ -226,7 +226,7 @@ disc1: ${PKGBASE_REPO} echo "./usr/freebsd-dist type=dir uname=root gname=wheel mode=0755" >> ${.TARGET}/METALOG cp MANIFEST ${.TARGET}/usr/freebsd-dist echo "./usr/freebsd-dist/MANIFEST type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG -.if !defined(PKGBASE) +.if defined(NOPKGBASE) && !empty(NOPKGBASE) # Copy distfiles for dist in $$(ls *.txz | grep -v container | grep -vE -- '(${base ${_ALL_libcompats}:L:ts|})-dbg'); do \ cp $${dist} ${.TARGET}/usr/freebsd-dist; \ @@ -303,7 +303,7 @@ dvd: ${PKGBASE_REPO} ( cd ${WORLDDIR} && ${IMAKE} installworld installkernel distribution \ DESTDIR=${.OBJDIR}/${.TARGET} MK_RESCUE=no MK_KERNEL_SYMBOLS=no \ MK_TESTS=no MK_DEBUG_FILES=no) -.if defined(PKGBASE) +.if !defined(NOPKGBASE) || empty(NOPKGBASE) # Create offline pkgbase repo on release media mkdir -p ${.TARGET}/usr/freebsd-packages/repos/ ${.CURDIR}/scripts/pkgbase-stage.lua dvd \ @@ -322,7 +322,7 @@ dvd: ${PKGBASE_REPO} echo "./usr/freebsd-dist type=dir uname=root gname=wheel mode=0755" >> ${.TARGET}/METALOG cp MANIFEST ${.TARGET}/usr/freebsd-dist echo "./usr/freebsd-dist/MANIFEST type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG -.if !defined(PKGBASE) +.if defined(NOPKGBASE) && !empty(NOPKGBASE) # Copy distfiles mkdir -p ${.TARGET}/usr/freebsd-dist for dist in $$(ls *.txz | grep -v container); do \ diff --git a/release/release.sh b/release/release.sh index eed02f0f36d3..f4786685e612 100755 --- a/release/release.sh +++ b/release/release.sh @@ -199,7 +199,7 @@ env_check() { KERNCONF=\"${KERNEL}\" ${CONF_FILES} ${SRCPORTS} \ WITH_DVD=${WITH_DVD} WITH_VMIMAGES=${WITH_VMIMAGES} \ WITH_CLOUDWARE=${WITH_CLOUDWARE} WITH_OCIIMAGES=${WITH_OCIIMAGES} \ - XZ_THREADS=${XZ_THREADS} PKGBASE=${PKGBASE}" + XZ_THREADS=${XZ_THREADS} NOPKGBASE=${NOPKGBASE}" return 0 } # env_check() From nobody Thu Sep 18 04:41:55 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cS2zS3gnRz67hMC; Thu, 18 Sep 2025 04:41:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cS2zR5zhpz3H7d; Thu, 18 Sep 2025 04:41:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758170515; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8YrNtrpbw1qcdVSacANmav0ZoEPIQceYTOpsf7QW++c=; b=HlFBJ3obiaNAlQrFd6O2AQ6+YWIBB22nJo4mLZWFY8acNMBMlT/xJrKHCzIGaQJi8nNGeS w/ED3NXJNmDOtVpYxV00eurO0PSD3ze0pFWZ7gXGoCUBDIzQO/QFJQhf9TnzAmVA8JTi9X 22pfwMD4qw7+FnBG7HGbu3TmCgXatKyj9/x5lntCQjvlhgg2rxAUKwygU16U7XZ6wuqNrl PuW0zVN3sHM4FfzwapYdmO9JVh3T15e91TxPcFGeoKPFYXOSyVpwS/6PGc4seVoiw3AOFz /NVQzkoMiHHYxnaC/6/reMOUXAFGO3c9FzT4+dDd3MmQN56qLdbaEqyrxFxilw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758170515; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8YrNtrpbw1qcdVSacANmav0ZoEPIQceYTOpsf7QW++c=; b=Xg2J7HuOrZ2Tio66k2zqLvrr9vxiuisQmamUau2B3ppLUoaIoel2CtU0ifEeuEPr7z28Zg wV2Eapw3HJoEsEDnJmA5x60Tg+kmvK5UbKxbNmKum33A1N+A4mWeEIA4yOXsMwK9tZvvEy NHyga2nyQ1Y00CD1HW09CZlJaMzMr9AvE1oC6dbDj2ODpNR0xCN0D68fojzt08Tjsq3JP1 JHWvQ8Jf4A7S/oxagxMAFeFEcJUNMk89tGoFe9suC1vGcJQGguAcosZ+sCvN5I8DLpbofJ M0qIB7nLgpEvIeEKmnUWFFEVNCW7jkHIDVaE3x3hp7Cz2PygXNhCypTB/OhQyA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758170515; a=rsa-sha256; cv=none; b=otwYa5waOcrdqPAvszMG9v/+HdIWSb0Bh6l7R0lhB8hc33GeCiyZCKZ7MnFEeawZamcYhb p/xLgmxZMBLfLVw19hxXzyFZUgzUXnzEEzePJ90LrlubQ0BD0UefrK/Dlo7n/nM3otANhP YxH2kW1N0B2nNjlkesgIQCPJIiApoUAxlXBhIFv0OGmG15R+xD6nA7pJS7fj+ghtsUhq0V /qhA75UGN9v22wzZQAKwQUqxo8bbqrFR2BpFCngOut2sgc9HaiL6FMQt+HZnqBaq3z2FjU MRmCGU0Cp45WwgPlBfkAZyDwIcr5JywcviRefX8+NfTvjHa3qHrbLZZlCNbj2g== 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 4cS2zR3TPBzwNq; Thu, 18 Sep 2025 04:41:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58I4fthX045829; Thu, 18 Sep 2025 04:41:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58I4ftxK045826; Thu, 18 Sep 2025 04:41:55 GMT (envelope-from git) Date: Thu, 18 Sep 2025 04:41:55 GMT Message-Id: <202509180441.58I4ftxK045826@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Colin Percival Subject: git: 7c0bc6c703ee - main - release: Always dist sets on dvd1 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7c0bc6c703eeaea737d0dbc21996764967e4dc97 Auto-Submitted: auto-generated The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=7c0bc6c703eeaea737d0dbc21996764967e4dc97 commit 7c0bc6c703eeaea737d0dbc21996764967e4dc97 Author: Colin Percival AuthorDate: 2025-09-15 00:39:42 +0000 Commit: Colin Percival CommitDate: 2025-09-18 04:40:55 +0000 release: Always dist sets on dvd1 In the !NOPKGBASE && !NODISTSETS case, we only want the pkgbase repo on disc1; but we want both packaging formats on dvd in order to allow for offline installs in both methods and also tools which ingest the dist sets from the dvd image. MFC after: 12 hours Sponsored by: https://www.patreon.com/cperciva Differential Revision: https://reviews.freebsd.org/D52537 --- release/Makefile | 2 -- 1 file changed, 2 deletions(-) diff --git a/release/Makefile b/release/Makefile index e48527de160d..bc04a7974744 100644 --- a/release/Makefile +++ b/release/Makefile @@ -322,7 +322,6 @@ dvd: ${PKGBASE_REPO} echo "./usr/freebsd-dist type=dir uname=root gname=wheel mode=0755" >> ${.TARGET}/METALOG cp MANIFEST ${.TARGET}/usr/freebsd-dist echo "./usr/freebsd-dist/MANIFEST type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG -.if defined(NOPKGBASE) && !empty(NOPKGBASE) # Copy distfiles mkdir -p ${.TARGET}/usr/freebsd-dist for dist in $$(ls *.txz | grep -v container); do \ @@ -330,7 +329,6 @@ dvd: ${PKGBASE_REPO} echo "./usr/freebsd-dist/$${dist} type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG; \ done .endif -.endif .if ${.MAKE.OS} == "FreeBSD" && (!defined(NOPKG) || empty(NOPKG)) # Install packages onto release media. ${PKG_INSTALL} pkg || true From nobody Thu Sep 18 04:59:32 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cS3Mq06TRz67jQ1; Thu, 18 Sep 2025 04:59:35 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from omta004.cacentral1.a.cloudfilter.net (omta002.cacentral1.a.cloudfilter.net [3.97.99.33]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cS3Mp4p6tz3JlZ; Thu, 18 Sep 2025 04:59:34 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Authentication-Results: mx1.freebsd.org; none Received: from shw-obgw-4001a.ext.cloudfilter.net ([10.228.9.142]) by cmsmtp with ESMTPS id yrk8umK655Mqyz6k2uiJFU; Thu, 18 Sep 2025 04:59:34 +0000 Received: from spqr.komquats.com ([70.66.136.217]) by cmsmtp with ESMTPSA id z6k0ukCrnWX70z6k1ucQaO; Thu, 18 Sep 2025 04:59:34 +0000 X-Auth-User: cschuber X-Authority-Analysis: v=2.4 cv=d71WygjE c=1 sm=1 tr=0 ts=68cb91b6 a=h7br+8Ma+Xn9xscxy5znUg==:117 a=h7br+8Ma+Xn9xscxy5znUg==:17 a=IkcTkHD0fZMA:10 a=yJojWOMRYYMA:10 a=6I5d2MoRAAAA:8 a=EkcXrb_YAAAA:8 a=YxBL1-UpAAAA:8 a=eENHx-uKDWjIgJi07goA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=LK5xJRSDVpKd5WXXoEvA:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy.cwsent.com [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTP id 9201A50E; Wed, 17 Sep 2025 21:59:32 -0700 (PDT) Received: by slippy.cwsent.com (Postfix, from userid 1000) id 901123CE; Wed, 17 Sep 2025 21:59:32 -0700 (PDT) X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.8+dev Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Guido Falsi cc: Nuno Teixeira , Cy Schubert , Aymeric Wibo , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: e779891327b1 - main - sys/power: Sleep type reporting by PM backends In-reply-to: <9dc5eff9-3612-4bb8-be96-637bb4257a5f@FreeBSD.org> References: <202509142159.58ELx5Rg054606@gitrepo.freebsd.org> <20250916050239.4BB672D5@slippy.cwsent.com> <47a0213b-010e-47e4-8285-dcf426f59c08@FreeBSD.org> <9dc5eff9-3612-4bb8-be96-637bb4257a5f@FreeBSD.org> Comments: In-reply-to Guido Falsi message dated "Thu, 18 Sep 2025 00:08:32 +0200." List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Date: Wed, 17 Sep 2025 21:59:32 -0700 Message-Id: <20250918045932.901123CE@slippy.cwsent.com> X-CMAE-Envelope: MS4xfE0+Ri/Y8D7NtlCxPDbOnMZgLm6/gCLz8u2oIKyUELEZvW35UmqOyH0IgrJm1Ua47OZ362cgke/H2okDdp4B01RslU4xHUdy3oE3Z8rRypl/7AFUgHjk oh46C5Z2QaPrfmMUEjJr/kcsJeb8tYKjLtmclugCPyK8tp8ir42SSZn0N5DopdYMXjXaCeWyjczfYpfeHYsCCX/QX+53yH0qHDc2hgYk0stvm0KsfqpwHEZg OH3aDBq2WXavDDDKUIkOnXiS7/3/2M20RPyUjQn0DeITaPjzFajL4pgRHtTmJh3dbIVaDCCy3/ys8q2lKmQZxyKxOkjHwxxblRVoIYEUGsOKSCAJ9CAA+fd1 9rjrWWCwPVDmo7stJt39RvA1xlToneUI0QgNtbgAmz1RDOqJrks= X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4cS3Mp4p6tz3JlZ In message <9dc5eff9-3612-4bb8-be96-637bb4257a5f@FreeBSD.org>, Guido Falsi writ es: > On 9/17/25 22:50, Guido Falsi wrote: > > On 9/17/25 11:15, Nuno Teixeira wrote: > >> > >> Hello Cy, > >> > >>     One of this series of ACPI commits has broken power management on m > y > >>     machines. > >>     One of which managed to capture a dump from a kernel panic after > >>     poweroff(8) > >>     was issued. > >> > >> > >> I can confirm same crash on reboot on a Intel laptop, after upgrading > >> from main 2025-09-06 -> 2025-09-16. > >> > > > > Hi, > > > > A me too. > > > > Just noticed this while investigating why my machines with head (laptop > > and two desktops) were not switching off anymore. > > > > So looks like I'm also experiencing this. > > > > All machines behave the same, the almost turns off, monitor turns off, > > but power light stays on. > > > > I'm testing reverting commits to see if it goes back to working. > > > > I can confirm reverting this commit and the previous one "fixes" it. > > -- > Guido Falsi The two reviews to fix this breakage don't address the problem completely. I am formally requesting the revert of the four ACPI commits that have caused this regression. Revert them, please. -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org e**(i*pi)+1=0 From nobody Thu Sep 18 06:22:04 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cS5CP2KYhz67pqF for ; Thu, 18 Sep 2025 06:22:25 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic301-20.consmr.mail.gq1.yahoo.com (sonic301-20.consmr.mail.gq1.yahoo.com [98.137.64.146]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4cS5CN3hGLz3QPs for ; Thu, 18 Sep 2025 06:22:24 +0000 (UTC) (envelope-from marklmi@yahoo.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=yahoo.com header.s=s2048 header.b=p6qiozS2; dmarc=pass (policy=reject) header.from=yahoo.com; spf=pass (mx1.freebsd.org: domain of marklmi@yahoo.com designates 98.137.64.146 as permitted sender) smtp.mailfrom=marklmi@yahoo.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1758176538; bh=eZ+uS9MwfLqNHk9GR2Ipych22cmO7VwGMi6keemJ1Mk=; h=From:Subject:Date:Cc:To:References:From:Subject:Reply-To; b=p6qiozS2ZJtUTQVVyKQGrJA0kdYWdGNHDk0zsJ6QxXmqbUAIPI7NM5NW1HBJaz3QJAWMROP7ACl4R6J4tnKRd8mh4RBU/kz8o4g5HbSdeqINeRJ1VGHfqUa4w8xL/ap3dIaeMjkMqnjQG18b8qLvdE8/Wmwk3qVoXS/0572u7G5L03P0tD6AgiDOzbgfC9W1fVg2zeg4eiTT5HfjdMLyTHvOiLrxoYPiWhhWLy0vaxnyPURSWJuqLlcozVQYV07TSrEcF5MRrlUHAyIIs8Il/EoZqjt9IxaZLrXSrpfU/G0fYh/ny3ck8z8LB518/qmaYvn6bSjwswQaZnW02LLCjw== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1758176538; bh=BWAMgZTbUgOVrIYlXo2qSIT5uluRZCe4y7HGMlKzqcu=; h=X-Sonic-MF:From:Subject:Date:To:From:Subject; b=ML8BjWsklqdUD78D4XYE7JaRgTt9dPSBAAIeB3AtbPldwrOoBZoOGnnx1humUWl50iyIV0fP2ruPFDkHgAJN3rcSKifsA4iQhhUeVqQZDj4tkMzUTxvaY2dtE8E5ib0nu/ROLoGlhmaoyjd33SQzXdP95/lB2cO0qSS8xzTikiRGwB8kYqMQx0Ku4qdJ4NxBSqgWYlZAnIyvjOZ4XYhBRQNNnN+xy0ZW6+j3QSHyK4IyeawTfXHlWvqwIwgS7FiRFQJLwweIfFe7Xu2mTgcQyVmZ2MqIgfZzHvDECk/prd8daK+z0tkJK3vDJvTe8ZC4Y8ieftGlLOieZ209BxhQxA== X-YMail-OSG: KQiIjpQVM1m2zIE7oXd86zAiXF4DxfeRrWPuDHlxbsEjvkCdQwcl5J0Z3.yHLn6 .aCr5g6LMdeRynMtHhqoWscBRZFzMwW7kmEDxY3Y6r.enIUNS31zF4_Q7Ps_OZzdBGFTX07wIScW TWHVrZjScsxs6Z8wd0aVenNVNNAY3sDGk8W8AaLMKC7x0CYy8s56vgWPEVRzzKTdOw05csP8o1Kj CgUN8bXCdwPOg4hafIvoasln6Te.pIut1HmdMjwxwt_6sQCOee7CVJEPUi19sPyZ7p_KXeSdRnOW pkZ.P.hJH4CIYt14slgCbwypdBrRhe9mTQayyUE5WGcjkWN0TcCYO7bIres1tvKUhwdmUtSL3tei DFIyCihZTwVly9tpTsVotCg83C1VMi8jNsrms96lMR5VUoX2LT44H.qRpw1jbOX.GtC.FCX0m9.B 0HGrD7A_aLM_QjIeG5W.dgvU4Y5vSvY867FXTonAzL_ha9F922R5VcMCLZSJgXW1nrelFZpimGNi EmKS8daUY2yNjRNrXITvu66eH3qrqLYfBRSd.QHKrzbr035mTxVuZT34djWh6eAMbBJWTKbvKP3a EI.b4OGZ5bHlUQmEU6AnxKjgGDU3ViAYEpu7yJHYoDce_jYGUa0foLlF_4nc7tWyx2VTNAHoNAEi b5BqiVthxot4jBVhWqP8feKZ6mS4Pg5s0dDPl.VBoGlpW2f2LkLhuQDA7xdCfBqTVP.GK3AIvSRI mvxPiAzqzJi.qdSOZizpfCh3y3YUrSaa4YaDgGu1GbWvyEouBqowCOJdgM2BqtbdVDSytv1TUzFQ F6jDZfYBzu1SIp6iFN_c8HYpkNps_GCa269r_9HrnB2sQtMgEb_e0mbU7T5BbQvU5NR93AytcNXr Oodwkj7Zdn3GImtAhrAeODgANpjafb8jOlfp3K.UP4qJEO4ZWvq3OvFH9BE.FSijuUDquDd8Moiq Nbz6KTVCsG_b_.lT2SnOWEYZTXLwWBLnXjU26Ssx.qggDE0c19v1bePSFNoNsZi9KQv6KpEXYaCO YH.NgqkqOS3cvs5y6dxmTPV3zW7fMFJHGRKQTzZ5emy5lN3FUEbSLYpxqvDFGNy21bAQbXLl84yd yF5NP59Pkr3nRD54l0cSblLYPRKu8MdthPMlttaRvSVS0.LyN7oDyATXMwy.YKbJvMiTrBhyHsLK LGVE_Wv7v4b0mwnA5KTtAWL7HvzelFRkT8BRbQg5IrAGNGYy9BPasBMy9fnZDAwxZOnip55.JK9g fB5HXFDbqlJRYLitslEkVsbQ8YXGKc5oLiYT_nzogAJcCLCw6i7ERDhAYQYfNH.58a.v4_lH.Xp_ tCNajLpY2vHCiNLoljQhEaskBYAtGksz6xHQBKs6PIc13GLNUNbjz6k7w43OBrjJWnLVF4qBrpUL WdHPZZ0796mb1s5AmY21_lINRlmbJ2qshNJGb.BF.M143jpgQB5XuL3SAbj8RMmWCoIL9B2vcU82 t0gUKyY9zweynIbUb.pkqqOdgre4lNuHtIf9fwVXm8qg7XG69DxblSpZuvDjRZk9Om_mgH1aPBqU f_RziFHs7o52AfSF2l1_6myHAAtPr_Fz8pUanZIwCaDkqg1zmOgV123_pWggyuqAYOJ0SRh45k6a zgt09PSeDf34G_t3YS.V2FzmafJEkIZK.pfIm6ZKN7v5qKjJUw9Mn8_ozZA_24ySJiFzl_j8yi8f Jt9cpvj7Jx21y4GQBahTtg8KpJrEN9Lw9ZdetHNU_tWkVXA6C2CcR8HjKBqpo_mzQJP7iUa9gIdv T660FKJU6MSh7OToBOGIiDgq1cf.PB08dlP5Lpn7ufIFIj3vHiJfrH7jB.Ep5Ar2_l3HhzEK1GlV fS6qxhfMWM1sczN.BPFdd_MmRHj0qm3TrKbZfmQfd02pO0_UPeglnsO3U2uev9otwxrTjkqsehx0 uY1G202ez2rsBf8ObPde7yaXPjp3DHat0EmIpVRVwget2EPldp2ZHfFNbWfcA1IrUS.7JWzunCXA 4l0AdaAOdKFve1m7iS2LodXTwiqirKE1aOkvccwUpgzQPf.t2TwOpDh_CS6XxvpFLK3Ksm2zOGdo C2EbRK1x1m1WwN9PHlamY5kwkcjih4Y7rCZy_OxqNsdP1YowQYsVuB6OWcSDGNnPsZz6uls3HHLw W2.JUgnHk7DgXvLYgcFQk2z0FLV8SOHP7UZjD85CCjVhd67je.B_m6wTmpn2O_qClAIEIYEhkk.s fKRRyJ7IMstslrXW3gpAdKgZzCz5s4xjXL1YtZwO4s3cxSkEobd7NOFtwpEimeDdgZpPYg7dIPhe i1X85eVcS5rE- X-Sonic-MF: X-Sonic-ID: e8b78184-2fc2-40f0-a447-301f680b6fe3 Received: from sonic.gate.mail.ne1.yahoo.com by sonic301.consmr.mail.gq1.yahoo.com with HTTP; Thu, 18 Sep 2025 06:22:18 +0000 Received: by hermes--production-gq1-6f9f7cb74b-6kpq4 (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 7cfd0fe90a7d8bc7600cd8b7d732fbf4; Thu, 18 Sep 2025 06:22:15 +0000 (UTC) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3826.700.81\)) Subject: Re: git: e779891327b1 - main - sys/power: Sleep type reporting by PM backends Message-Id: <9B381D46-6B9E-4CFF-BD1A-882D6D6F408B@yahoo.com> Date: Wed, 17 Sep 2025 23:22:04 -0700 Cc: "obiwac@freebsd.org" To: Cy Schubert , dev-commits-src-main@freebsd.org X-Mailer: Apple Mail (2.3826.700.81) References: <9B381D46-6B9E-4CFF-BD1A-882D6D6F408B.ref@yahoo.com> X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.97 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.97)[-0.973]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_EQ_ADDR_SOME(0.00)[]; MIME_TRACE(0.00)[0:+]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim]; ARC_NA(0.00)[]; FREEMAIL_FROM(0.00)[yahoo.com]; TO_DN_SOME(0.00)[]; DKIM_TRACE(0.00)[yahoo.com:+]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/20, country:US]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; MLMMJ_DEST(0.00)[dev-commits-src-main@freebsd.org]; APPLE_MAILER_COMMON(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RWL_MAILSPIKE_POSSIBLE(0.00)[98.137.64.146:from]; RCVD_IN_DNSWL_NONE(0.00)[98.137.64.146:from] X-Rspamd-Queue-Id: 4cS5CN3hGLz3QPs Cy Schubert wrote on Date: Thu, 18 Sep 2025 04:59:32 UTC : > In message <9dc5eff9-3612-4bb8-be96-637bb4257a5f@FreeBSD.org>, Guido = Falsi=20 > writ > es: > > On 9/17/25 22:50, Guido Falsi wrote: > > > On 9/17/25 11:15, Nuno Teixeira wrote: > > >> > > >> Hello Cy, > > >> > > >> One of this series of ACPI commits has broken power = management on m > > y > > >> machines. > > >> One of which managed to capture a dump from a kernel panic = after > > >> poweroff(8) > > >> was issued. > > >> > > >> > > >> I can confirm same crash on reboot on a Intel laptop, after = upgrading=20 > > >> from main 2025-09-06 -> 2025-09-16. > > >> > > >=20 > > > Hi, > > >=20 > > > A me too. > > >=20 > > > Just noticed this while investigating why my machines with head = (laptop=20 > > > and two desktops) were not switching off anymore. > > >=20 > > > So looks like I'm also experiencing this. > > >=20 > > > All machines behave the same, the almost turns off, monitor turns = off,=20 > > > but power light stays on. > > >=20 > > > I'm testing reverting commits to see if it goes back to working. > > >=20 > > > > I can confirm reverting this commit and the previous one "fixes" it. > > > > --=20 > > Guido Falsi >=20 > The two reviews to fix this breakage don't address the problem = completely. >=20 > I am formally requesting the revert of the four ACPI commits that have=20= > caused this regression. Revert them, please. The above request was apparently not sent to the Author/Committer of "sys/power: Sleep type reporting by PM backends" ( e779891327b1 ) and related: Aymeric Wibo ( obiwac@FreeBSD.org ) --at least there is no reference to the name or Email address in the above quoted text. So this CC's the author of that and the other commits. My amd64 context is one of those getting the very late crash during "shutdown -r now" or "poweroff". (PS2 keyboard use required, not USB keyboard --but it is too late for dump to work as well.) =3D=3D=3D Mark Millard marklmi at yahoo.com From nobody Thu Sep 18 08:56:53 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cS8dt6F34z682ZW for ; Thu, 18 Sep 2025 08:57:06 +0000 (UTC) (envelope-from obiwac@gmail.com) Received: from mail-ot1-f51.google.com (mail-ot1-f51.google.com [209.85.210.51]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cS8dt4MhQz3mhw for ; Thu, 18 Sep 2025 08:57:06 +0000 (UTC) (envelope-from obiwac@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ot1-f51.google.com with SMTP id 46e09a7af769-751415c488cso690738a34.1 for ; Thu, 18 Sep 2025 01:57:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1758185825; x=1758790625; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=FGmfMobzn3Cxe60Yr15Dnn0g6gGjBQ+zpjU62ciijhU=; b=tSS3jVq9csuPFaT+p4LLLHWWQT3dG0runvllBxTSMZVM/UCeByJxyn5Q8j55Udywn+ 1AQEj0JveBRt8o/yAVgUdMSr/zQrw+KahS6IGWFfdYzD1n5PJQeFEHIaHT5YS8viC+oY c+kp0AtKD15hhexHe1AcMrgIV05XauWSQBJW88lQrcablyQ3pusmgfj+P0sqymEfMwGB dalYn/d4gGEK9vaiLbDlc5bihCMKonTzlgBaFUWNHT1h5LNFczxliu2gOxv8WdC7TYNZ EYpssb0TIM2xa4fOMv000TFZXldV6SF/MPilFHVdy3cDe+uqPpFT/rAMsD/HzflzCe0c wVgw== X-Forwarded-Encrypted: i=1; AJvYcCWE033JOPnKryaVQJoeaOAfcJnQAuINzg+B/Mq2e2pBX5SQI/npfgOx21l3BpdsmsPRPhINUdbXVB4EEwjZavcncbikCA==@freebsd.org X-Gm-Message-State: AOJu0YyNbwKwy6tSkQ9W0NQckp1SjHZIKIcc0OcEfkQJCvmApqf6KSET nH/OCmdpVMv+CXTiVeB/x/s/7sj0g062mHx9N1I6RVQXrQXqYpij5TkB9BP3hK9sGpH9pg== X-Gm-Gg: ASbGnctmaGxWt1CmV9VBYv6PITx2FGKzN1j7LZ/JYMtrGhZK2FTS5vRHMaF3YN77zmd MVya1LMn0EbngUSNrZL6zCmx9L7kMC1GM5XXXJkDT4+qXdNyDh2b5KyU+rei7oWkRK1qhVERgyN QvwwULsYgKVp7aEmBY98a5pGI4pUSeXbkSaJCHftv+vSATugoERl6WyEfHTtraha/TR3LpKfXdO YdU9ffiqU4+CcUio6K7VgG9FPNFkchlDCegDNoS7hgZtTQg+iSkMyi+nJwcJfT81IrQzF2oI3hE gBsTtMmLQ8SatK6LMGvM+IMB0Yg9WgUrwhU22E0EoneRKgqbeNyD8QjRZ7FjvDMQ+Pb2uYqR36g E+yvtBaWcJw1n54guQ+V89QBLB1ZEReVuGIDU938aR9bYK96+5H5B5RyQKEvTbMH0dXOzAp+pSo 5+ X-Google-Smtp-Source: AGHT+IGJiLS565+Fe/1tBlGUsDLNltNLkWJNkyI4A4b8wDWdxU5bDZG83vMs6Y2Cip3M7w0WOezhWA== X-Received: by 2002:a05:6830:3c09:b0:757:1232:764a with SMTP id 46e09a7af769-7631b0e4f2cmr3389299a34.10.1758185825353; Thu, 18 Sep 2025 01:57:05 -0700 (PDT) Received: from mail-oa1-f48.google.com (mail-oa1-f48.google.com. [209.85.160.48]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-769191858ccsm911594a34.6.2025.09.18.01.57.04 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 18 Sep 2025 01:57:04 -0700 (PDT) Received: by mail-oa1-f48.google.com with SMTP id 586e51a60fabf-30cce86052cso501503fac.1 for ; Thu, 18 Sep 2025 01:57:04 -0700 (PDT) X-Forwarded-Encrypted: i=1; AJvYcCUUY/diX1Zwwm3EjxuRlqP+XtGthV8NF6qOIDRsF6cA/0ObrkNisHG0hrumuBYSECtyywQAo20jWpsPI4RF94I/O8/1MQ==@freebsd.org X-Received: by 2002:a05:6870:9e0b:b0:30b:ca9b:a806 with SMTP id 586e51a60fabf-335beedc454mr2651346fac.32.1758185824556; Thu, 18 Sep 2025 01:57:04 -0700 (PDT) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 References: <9B381D46-6B9E-4CFF-BD1A-882D6D6F408B.ref@yahoo.com> <9B381D46-6B9E-4CFF-BD1A-882D6D6F408B@yahoo.com> In-Reply-To: <9B381D46-6B9E-4CFF-BD1A-882D6D6F408B@yahoo.com> From: obiwac Date: Thu, 18 Sep 2025 10:56:53 +0200 X-Gmail-Original-Message-ID: X-Gm-Features: AS18NWAf74_sYE9Zr_3rdlluhf4DM5ViIQVgjWeGd_C2E5F5WJfC2id9cPqTWvQ Message-ID: Subject: Re: git: e779891327b1 - main - sys/power: Sleep type reporting by PM backends To: Mark Millard Cc: Cy Schubert , dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4cS8dt4MhQz3mhw Guido, > The two reviews to fix this breakage don't address the problem completely. > > I am formally requesting the revert of the four ACPI commits that have > caused this regression. Revert them, please. Can you elaborate on how they don't address the problem completely? None of my machines have this issue so I can't really reproduce it, but from the panic logs I've seen D52598 should completely fix that, unless there's yet another issue. > My amd64 context is one of those getting the very late crash > during "shutdown -r now" or "poweroff". (PS2 keyboard use > required, not USB keyboard --but it is too late for dump to > work as well.) Does D52598 fix this for you? On Thu, 18 Sept 2025 at 08:22, Mark Millard wrote: > > Cy Schubert wrote on > Date: Thu, 18 Sep 2025 04:59:32 UTC : > > > In message <9dc5eff9-3612-4bb8-be96-637bb4257a5f@FreeBSD.org>, Guido Falsi > > writ > > es: > > > On 9/17/25 22:50, Guido Falsi wrote: > > > > On 9/17/25 11:15, Nuno Teixeira wrote: > > > >> > > > >> Hello Cy, > > > >> > > > >> One of this series of ACPI commits has broken power management on m > > > y > > > >> machines. > > > >> One of which managed to capture a dump from a kernel panic after > > > >> poweroff(8) > > > >> was issued. > > > >> > > > >> > > > >> I can confirm same crash on reboot on a Intel laptop, after upgrading > > > >> from main 2025-09-06 -> 2025-09-16. > > > >> > > > > > > > > Hi, > > > > > > > > A me too. > > > > > > > > Just noticed this while investigating why my machines with head (laptop > > > > and two desktops) were not switching off anymore. > > > > > > > > So looks like I'm also experiencing this. > > > > > > > > All machines behave the same, the almost turns off, monitor turns off, > > > > but power light stays on. > > > > > > > > I'm testing reverting commits to see if it goes back to working. > > > > > > > > > > I can confirm reverting this commit and the previous one "fixes" it. > > > > > > -- > > > Guido Falsi > > > > The two reviews to fix this breakage don't address the problem completely. > > > > I am formally requesting the revert of the four ACPI commits that have > > caused this regression. Revert them, please. > > The above request was apparently not sent to the Author/Committer > of "sys/power: Sleep type reporting by PM backends" ( e779891327b1 ) > and related: Aymeric Wibo ( obiwac@FreeBSD.org ) --at least there > is no reference to the name or Email address in the above quoted > text. > > So this CC's the author of that and the other commits. > > My amd64 context is one of those getting the very late crash > during "shutdown -r now" or "poweroff". (PS2 keyboard use > required, not USB keyboard --but it is too late for dump to > work as well.) > > === > Mark Millard > marklmi at yahoo.com > From nobody Thu Sep 18 09:26:32 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cS9Hr2KqKz684CP; Thu, 18 Sep 2025 09:26: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 4cS9Hr1jF0z3rhl; Thu, 18 Sep 2025 09:26:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758187592; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kHBOedBsg196l0spi7Bm0qsWciXkP3fHGMeutPunKio=; b=MTN4oDjEF63yoNGh4A7bHVkls8JZdHOfPggQ0MQlzfFnrr/LVw+qshD2km1jD+DdfNP1ew oWd/IuKNRv5R5duCZu7cMvS8cx7pbHW1jtTQJXfYex3UczmkyAjs9UFbZ0WjgvFv239Jff dzfFwpmJE/aTj8ZZaKXiU3zyljncnuJGoTAMlo0jgMr35FoyfrLAkiYuZiexK7pIWp2R7g eOS9bnzsuQHdjDeDNomQ/2RpMHj3y05RePX5brgZiO7Ur+bWZxDj4RlxuWtOV0bs9z17S/ 8O0aJXIRMagQ0da8VJRdPXzIHZ7j4Rqfc9x3Cyveqh2U02qGTewlwZL4B9BPEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758187592; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kHBOedBsg196l0spi7Bm0qsWciXkP3fHGMeutPunKio=; b=sFOu8zx/wRg/yHcEgSUUvjXlzEvU2P2W4HOBeivMbximBWESaMmhVVzU5AQheL9snlpZgt qMTfMR21aH5NMaRJSP8THxt9tU+JS4/5hhc/hpoRx6pWve6TYITzT6X7uUo84Wd562xhg0 83gBOqicPXp1OQkC7CsqJIEbXc3G1TfU128N8osuwwGFn6uK4zmHpPIYE9OPQNujQHRkEM rDOGNC4bRiiHBK8/ULvYOjO2X67ayYe8ZzX+u0EJ4MIAEq2I+22D3uXXDmHnZqHAcQdmUo J5HKgTwCnGkQs3mKZogUYzVhFoXGqd0UJ2chTMkBZcGYNaFWdWLgXfVo+d8Adg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758187592; a=rsa-sha256; cv=none; b=J4AzEqp7d9H5Hto3F9DGRvxPDlOTYaDgDG/urjkY/bPOX8WhsKR/D8kffTMesXiUNrR0vz lVnMefNskraF858+clz+FTWdFCgPKyn1BR6dAzLjH7fw133fGdBiWhhFEmVBBQd6EPxzZq Olt2xfNdAJY3mrcLw4CRkE5QaKc2l1knrrWgpoprYIezkHSG3IXJ1w/pTcpLPLuMjKTmeY awSrsW16k7U4JHNMkoRo4h0oXaX0ycQlHRc/SuisMmDHYkrIvTZ1N3B80+PXUUkWSE3YnE MXJTOZdkDf85rFnfwtCWeJ8pg1HmHPwRJDVN+B/zYlTac6UngOEqDgCXPDg9mw== 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 4cS9Hr1DJ8z15KH; Thu, 18 Sep 2025 09:26: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 58I9QWkw076355; Thu, 18 Sep 2025 09:26:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58I9QW1g076352; Thu, 18 Sep 2025 09:26:32 GMT (envelope-from git) Date: Thu, 18 Sep 2025 09:26:32 GMT Message-Id: <202509180926.58I9QW1g076352@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: 9065390ddc7b - main - packages: Remove the tests-dev package List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9065390ddc7b1ce2613777f6a947200950a5ac71 Auto-Submitted: auto-generated The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=9065390ddc7b1ce2613777f6a947200950a5ac71 commit 9065390ddc7b1ce2613777f6a947200950a5ac71 Author: Lexi Winter AuthorDate: 2025-09-18 09:13:41 +0000 Commit: Lexi Winter CommitDate: 2025-09-18 09:26:12 +0000 packages: Remove the tests-dev package We don't want a tests-dev package, because this means set-devel depends on tests-dev, which transitively depends on tests, which means you can't install set-devel without also getting tests. The only real "dev" files in tests-dev are from ATF (libprivateatf), so move that to its own package and add a dependency from tests. Also move Kyua to its own package, since this might be useful for running tests even when the user doesn't want the whole set of base tests installed. Add a dependency from -tests to both -atf and -kyua, and a dependency on -set-base, since the tests won't work without the full base system installed. The remaining "dev" files in tests are actually test artifacts, not real development libraries. Add a new NO_DEV_PACKAGE option to bsd.lib.mk, which causes dev files to be installed in the base package instead of creating a -dev package, and set this option for everything that installs test libraries. While here, add a slightly more informative description for the tests package. MFC after: 3 seconds Reviewed by: bapt, emaste Differential Revision: https://reviews.freebsd.org/D52597 --- UPDATING | 8 ++++++++ lib/atf/Makefile.inc | 2 ++ lib/atf/libatf-c++/Makefile | 1 - lib/atf/libatf-c++/tests/Makefile | 2 -- lib/atf/libatf-c/Makefile | 1 - lib/atf/libatf-c/tests/Makefile | 2 -- lib/libc/tests/tls/dso/Makefile | 1 + lib/libc/tests/tls_dso/Makefile | 1 + lib/libxo/tests/encoder/Makefile | 1 + libexec/atf/Makefile.inc | 2 ++ libexec/atf/atf-check/Makefile | 1 - libexec/atf/atf-pytest-wrapper/Makefile | 1 - libexec/atf/atf-sh/Makefile | 1 - libexec/rtld-elf/tests/Makefile.inc | 1 + release/packages/ucl/atf-all.ucl | 8 ++++++++ release/packages/ucl/kyua-all.ucl | 20 ++++++++++++++++++++ release/packages/ucl/tests-all.ucl | 27 +++++++++++++++++++++++++-- share/mk/bsd.lib.mk | 11 +++++++++++ share/mk/bsd.test.mk | 3 +++ usr.bin/kyua/Makefile | 2 +- 20 files changed, 84 insertions(+), 12 deletions(-) diff --git a/UPDATING b/UPDATING index 999babfb6d7d..d40818111554 100644 --- a/UPDATING +++ b/UPDATING @@ -27,6 +27,14 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 16.x IS SLOW: world, or to merely disable the most expensive debugging functionality at runtime, run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20250918: + Kyua has been moved to the FreeBSD-kyua package, and ATF has been moved + to the FreeBSD-atf* packages. If you have FreeBSD-tests installed, + these packages will be installed automatically, otherwise you should + manually install them if you need these tools. + + This only affects pkgbase users. + 20250912: If SRCCONF is unset and a file named src.conf is present at the top of the source tree, it will now be used instead of diff --git a/lib/atf/Makefile.inc b/lib/atf/Makefile.inc index f8f329842eb4..bebed0280596 100644 --- a/lib/atf/Makefile.inc +++ b/lib/atf/Makefile.inc @@ -24,6 +24,8 @@ # SUCH DAMAGE. # +PACKAGE= atf +LIB_PACKAGE= CFLAGS+= -DHAVE_CONFIG_H WARNS?= 3 diff --git a/lib/atf/libatf-c++/Makefile b/lib/atf/libatf-c++/Makefile index 985a79b7dc03..4f4f7f12ec05 100644 --- a/lib/atf/libatf-c++/Makefile +++ b/lib/atf/libatf-c++/Makefile @@ -27,7 +27,6 @@ .include .include -PACKAGE= tests LIB_CXX= atf-c++ PRIVATELIB= true SHLIB_MAJOR= 2 diff --git a/lib/atf/libatf-c++/tests/Makefile b/lib/atf/libatf-c++/tests/Makefile index dc052c19df67..839c6902d6b1 100644 --- a/lib/atf/libatf-c++/tests/Makefile +++ b/lib/atf/libatf-c++/tests/Makefile @@ -1,7 +1,5 @@ .include -PACKAGE= tests - TESTS_SUBDIRS= detail ATF= ${SRCTOP}/contrib/atf diff --git a/lib/atf/libatf-c/Makefile b/lib/atf/libatf-c/Makefile index 4cfee2ed824f..c0890abc7640 100644 --- a/lib/atf/libatf-c/Makefile +++ b/lib/atf/libatf-c/Makefile @@ -27,7 +27,6 @@ .include .include -PACKAGE= tests LIB= atf-c PRIVATELIB= true SHLIB_MAJOR= 1 diff --git a/lib/atf/libatf-c/tests/Makefile b/lib/atf/libatf-c/tests/Makefile index c81c18a91f00..5647e7b9fcbe 100644 --- a/lib/atf/libatf-c/tests/Makefile +++ b/lib/atf/libatf-c/tests/Makefile @@ -1,7 +1,5 @@ .include -PACKAGE= tests - TESTS_SUBDIRS= detail ATF= ${SRCTOP}/contrib/atf diff --git a/lib/libc/tests/tls/dso/Makefile b/lib/libc/tests/tls/dso/Makefile index 5efd8b29a6bd..783534ff7aae 100644 --- a/lib/libc/tests/tls/dso/Makefile +++ b/lib/libc/tests/tls/dso/Makefile @@ -6,6 +6,7 @@ SRCS= h_tls_dlopen.c MAN= PACKAGE= tests +NO_DEV_PACKAGE= LIBDIR= ${TESTSBASE}/lib/libc/tls SHLIB_MAJOR= 1 diff --git a/lib/libc/tests/tls_dso/Makefile b/lib/libc/tests/tls_dso/Makefile index 89296c643695..7cb8f98b431e 100644 --- a/lib/libc/tests/tls_dso/Makefile +++ b/lib/libc/tests/tls_dso/Makefile @@ -7,6 +7,7 @@ LIBDIR= ${TESTSBASE}/lib/libc/tls SHLIBDIR= ${TESTSBASE}/lib/libc/tls SHLIB_MAJOR= 1 PACKAGE= tests +NO_DEV_PACKAGE= WITHOUT_STATIC= WITHOUT_PROFILE= diff --git a/lib/libxo/tests/encoder/Makefile b/lib/libxo/tests/encoder/Makefile index 7522328b0818..02634b971ace 100644 --- a/lib/libxo/tests/encoder/Makefile +++ b/lib/libxo/tests/encoder/Makefile @@ -1,4 +1,5 @@ PACKAGE= tests +NO_DEV_PACKAGE= LIBXOSRC= ${SRCTOP}/contrib/libxo diff --git a/libexec/atf/Makefile.inc b/libexec/atf/Makefile.inc index 42c507a6f772..e40827fa0b69 100644 --- a/libexec/atf/Makefile.inc +++ b/libexec/atf/Makefile.inc @@ -24,6 +24,8 @@ # SUCH DAMAGE. # +PACKAGE= atf +LIB_PACKAGE= CFLAGS+= -DHAVE_CONFIG_H WARNS?= 3 diff --git a/libexec/atf/atf-check/Makefile b/libexec/atf/atf-check/Makefile index 87d7a7cfdada..cf598e384c86 100644 --- a/libexec/atf/atf-check/Makefile +++ b/libexec/atf/atf-check/Makefile @@ -30,7 +30,6 @@ ATF= ${SRCTOP}/contrib/atf .PATH: ${ATF}/atf-sh -PACKAGE= tests PROG_CXX= atf-check SRCS= atf-check.cpp MAN= atf-check.1 diff --git a/libexec/atf/atf-pytest-wrapper/Makefile b/libexec/atf/atf-pytest-wrapper/Makefile index 80b5e411ec4e..75b1bc3e1004 100644 --- a/libexec/atf/atf-pytest-wrapper/Makefile +++ b/libexec/atf/atf-pytest-wrapper/Makefile @@ -1,7 +1,6 @@ .include .include -PACKAGE= tests PROG_CXX= atf_pytest_wrapper SRCS= atf_pytest_wrapper.cpp MAN= diff --git a/libexec/atf/atf-sh/Makefile b/libexec/atf/atf-sh/Makefile index 2e821684d8a8..afd848581f36 100644 --- a/libexec/atf/atf-sh/Makefile +++ b/libexec/atf/atf-sh/Makefile @@ -30,7 +30,6 @@ ATF= ${SRCTOP}/contrib/atf .PATH: ${ATF}/atf-sh -PACKAGE= tests PROG_CXX= atf-sh SRCS= atf-sh.cpp MAN= atf-sh.1 atf-sh.3 diff --git a/libexec/rtld-elf/tests/Makefile.inc b/libexec/rtld-elf/tests/Makefile.inc index 01cf83634239..3bd0b8590cdc 100644 --- a/libexec/rtld-elf/tests/Makefile.inc +++ b/libexec/rtld-elf/tests/Makefile.inc @@ -1,2 +1,3 @@ PACKAGE?= tests +NO_DEV_PACKAGE= TESTSDIR?= ${TESTSBASE}/libexec/rtld-elf diff --git a/release/packages/ucl/atf-all.ucl b/release/packages/ucl/atf-all.ucl new file mode 100644 index 000000000000..de8cd55eeb9f --- /dev/null +++ b/release/packages/ucl/atf-all.ucl @@ -0,0 +1,8 @@ +comment = "Automated Testing Framework" + +desc = < .if ${MK_MAN} != "no" && !defined(LIBRARIES_ONLY) diff --git a/share/mk/bsd.test.mk b/share/mk/bsd.test.mk index a2e15c840e02..9f20e5835369 100644 --- a/share/mk/bsd.test.mk +++ b/share/mk/bsd.test.mk @@ -16,6 +16,9 @@ LOCALBASE?= /usr/local TESTSDIR?= ${TESTSBASE}/${RELDIR:H} PACKAGE?= tests +# Prevent creating a -dev package for tests. Sometimes tests include static +# libraries or other artifacts which are not actually "development" files. +NO_DEV_PACKAGE= FILESGROUPS+= ${PACKAGE}FILES ${PACKAGE}FILESPACKAGE= ${PACKAGE} diff --git a/usr.bin/kyua/Makefile b/usr.bin/kyua/Makefile index daefedbf8bca..178a1d083b79 100644 --- a/usr.bin/kyua/Makefile +++ b/usr.bin/kyua/Makefile @@ -10,7 +10,7 @@ KYUA_VERSION= 0.13 KYUA_SRCDIR= ${SRCTOP}/contrib/kyua .PATH: ${KYUA_SRCDIR} -PACKAGE= tests +PACKAGE= kyua PROG_CXX= kyua SRCS= main.cpp LIBADD= lutok sqlite3 util From nobody Thu Sep 18 09:26:33 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cS9Hs2nXxz68496; Thu, 18 Sep 2025 09: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 4cS9Hs20gDz3rsy; Thu, 18 Sep 2025 09: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=1758187593; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7/UaIzRjUohxN/lokxXpG476/zRZfSyDN6zJ0GE1yzc=; b=GBHHAJACAY0uPfygSN0f8MgtOXu2A5+xYeOKIJ+bzHYenm8C54lMNXtnM1+vmeUxi6IGEL AaEnd+w55q8Dc8tgAWnnU9Gd+9FQA7VOz+FlAv3Oxi87yyBz86tgC+VIuVbymrsl/Mg+gI XNDeNn6M8R8CtX2E8vzAPup4iKHvvg0Huru/fEJ0892B630YJrvfcy+dKLEkZ6grLdwQQV TQTkqsCO20x13jq0zSmvU+nokhl1j0yqnq9i5bA36uGXsk2msOTa3CYUSAgf1etpFPPqgV O4FYlZwrdr7myIvYMPXSLLMIxTUmmEsbH0EK8KpkoShDRgCMRT7jJry7oTNZWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758187593; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7/UaIzRjUohxN/lokxXpG476/zRZfSyDN6zJ0GE1yzc=; b=XEUR5WhtKXr/65OpNw3k4/gTi5m0hactemcQYEo38sAONfhHbpSuSIVF5OQl+/wKNWfxSW yIJ41SznfgGFH4tN7rlzv9U/AMTcwe4ZgEHOrFB5GhlSMt3Shx5lpNceZYD5sacYBxfV3P 92T6QXLTzSlqAVm7QmfM1jXxaFLZPCvWji1IAetDR78EzTCVjE6mP10ndQdfZsdBA5/0SJ NpjshLtnxVlmkhrwlgKCJDDjh9dB8amoKqtH2YCCysYZOCcH5PL5hSbcxnayCER11OaUtC LM01BK1fDnlmROWdN2egYXXTsSjCbBLrzUF7h0uCT4KAOmfytc14LXWwwXcI6g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758187593; a=rsa-sha256; cv=none; b=n3CEtFuBmHOr4Mn1Rujbfm2KbDb7bsuHq2Ea3lWCJHMOFntOWdGDZfWY+JQNlFaEaIrXG5 2/uLolbHPdxGj7asVtInmsyGyKi+fglJ7ySuQnv+1ZGQGZpd04ztOv5ywq+jMwZ8zLsNqv uRFNuReJMAIcXDYwBd9Sgqi/x/Imb1Aom1ZjatZYlTjeQSBgR1//4jUUZRryrHzAeQye/O Jvepi4TIAZqvdvmgV+YJyKcx4gGo1VLfTRovjGF9CSBmC/t6Xs/O+lj2WqkRa8l+C1rNMv 33KnptCAbzbKKewtfpKAHbboLPdHZqDQC+IEgB01Awyo+cdl6wc3Ie0sRCAKzg== 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 4cS9Hs1TjHz14kS; Thu, 18 Sep 2025 09: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 58I9QXpU076389; Thu, 18 Sep 2025 09: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 58I9QXXu076386; Thu, 18 Sep 2025 09:26:33 GMT (envelope-from git) Date: Thu, 18 Sep 2025 09:26:33 GMT Message-Id: <202509180926.58I9QXXu076386@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: ea5e50c2985b - main - packages: Add a mandoc package List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ea5e50c2985bea029e7b30ecee773a59fe22cd68 Auto-Submitted: auto-generated The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=ea5e50c2985bea029e7b30ecee773a59fe22cd68 commit ea5e50c2985bea029e7b30ecee773a59fe22cd68 Author: Lexi Winter AuthorDate: 2025-09-18 09:14:45 +0000 Commit: Lexi Winter CommitDate: 2025-09-18 09:26:12 +0000 packages: Add a mandoc package Move mandoc to its own package so users can install it independently of -utilities. Put the package in the minimal set, since we also ship manpages in minimal and "man" is a basic Unix utility. Add a pkg-triggers(5) hook to run makewhatis when new manpages are installed, so that apropos(1) works. This depends on a new pkg(8) feature expected to be in in the upcoming 2.3.2 release; in the mean time, this is a no-op (i.e., having an older pkg doesn't break anything, it just won't run the trigger). MFC after: 3 seconds Reviewed by: bapt Differential Revision: https://reviews.freebsd.org/D52564 --- UPDATING | 4 ++++ release/packages/ucl/mandoc-all.ucl | 11 +++++++++++ usr.bin/man/Makefile | 2 ++ usr.bin/mandoc/Makefile | 6 ++++++ usr.bin/mandoc/mandoc.ucl | 18 ++++++++++++++++++ 5 files changed, 41 insertions(+) diff --git a/UPDATING b/UPDATING index d40818111554..82ae24814e02 100644 --- a/UPDATING +++ b/UPDATING @@ -28,6 +28,10 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 16.x IS SLOW: at runtime, run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) 20250918: + mandoc (including /usr/bin/man) has been moved to a new package, + FreeBSD-mandoc. If you have the minimal set installed, this package + will be installed automatically, otherwise you may want to install it. + Kyua has been moved to the FreeBSD-kyua package, and ATF has been moved to the FreeBSD-atf* packages. If you have FreeBSD-tests installed, these packages will be installed automatically, otherwise you should diff --git a/release/packages/ucl/mandoc-all.ucl b/release/packages/ucl/mandoc-all.ucl new file mode 100644 index 000000000000..9c43e9f7a46c --- /dev/null +++ b/release/packages/ucl/mandoc-all.ucl @@ -0,0 +1,11 @@ +comment = "Online manual page reader" + +desc = < To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Aymeric Wibo Subject: git: 25cddb1dfec6 - main - Revert "acpi: Fix build when `ACPI_DEBUG_OUTPUT` defined" List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: obiwac X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 25cddb1dfec6cfd874961ed08dcc9c76ec533df1 Auto-Submitted: auto-generated The branch main has been updated by obiwac: URL: https://cgit.FreeBSD.org/src/commit/?id=25cddb1dfec6cfd874961ed08dcc9c76ec533df1 commit 25cddb1dfec6cfd874961ed08dcc9c76ec533df1 Author: Aymeric Wibo AuthorDate: 2025-09-18 09:45:12 +0000 Commit: Aymeric Wibo CommitDate: 2025-09-18 09:48:55 +0000 Revert "acpi: Fix build when `ACPI_DEBUG_OUTPUT` defined" This reverts commit 4894f5ba394306a75dbed9ed4377ab0eae75aede. PR: 289634 --- sys/dev/acpica/acpi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c index 175bfe835e6f..702e1ecb5340 100644 --- a/sys/dev/acpica/acpi.c +++ b/sys/dev/acpica/acpi.c @@ -3425,7 +3425,7 @@ acpi_EnterSleepState(struct acpi_softc *sc, enum power_stype stype) enum acpi_sleep_state slp_state; int sleep_result; - ACPI_FUNCTION_TRACE_U32((char *)(uintptr_t)__func__, stype); + ACPI_FUNCTION_TRACE_U32((char *)(uintptr_t)__func__, state); if (stype <= POWER_STYPE_AWAKE || stype >= POWER_STYPE_COUNT) return_ACPI_STATUS (AE_BAD_PARAMETER); @@ -3939,7 +3939,7 @@ acpi_system_eventhandler_sleep(void *arg, enum power_stype stype) struct acpi_softc *sc = (struct acpi_softc *)arg; int ret; - ACPI_FUNCTION_TRACE_U32((char *)(uintptr_t)__func__, stype); + ACPI_FUNCTION_TRACE_U32((char *)(uintptr_t)__func__, state); /* Check if button action is disabled or unknown. */ if (stype == ACPI_STATE_UNKNOWN) From nobody Thu Sep 18 09:49:58 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cS9pv1c3Cz685y1; Thu, 18 Sep 2025 09:49:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cS9pv0mz6z3wLW; Thu, 18 Sep 2025 09:49:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758188999; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=j0wSKxeiIndBBDmG50Dt9DHAlTM2NF7AtU/PnhzCwe0=; b=ns0oSXdpmTKqEJDXQMNG1mmKOTHquptH3+gqkNhGOWzUb04mB0IHgxMQ2KbyS66v5wFaa6 4bdsS3wtMBBelRoQ8nUJQmlmog0cmMj+6qPskXtPNyiImKbgdd1w2Uq9juXe7K2Uhq69Qv iAb6ZPorz32TyfEhsQpyU1pNDAsByt6ZeFNDh6aGSWXFKgA8pKVMfl3cpc0QpNuDVk5Of3 sU6MAQ1dUVg4GbU7mDSRbhCpU1NXkuWvg2NOV9kzrxiqacBMfa2vdbaodlbB8lT9y/RZTY Rpmj3RtcSBRoMClvgjx+9oZiFbHfXQb4y1IBAVHPEuNtSuOnZsPk5wnR+srrlA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758188999; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=j0wSKxeiIndBBDmG50Dt9DHAlTM2NF7AtU/PnhzCwe0=; b=vA9TfkXv1DAXtEZefe3DbHV4l/phbjRvkp72chUwzvZEAf02F3A/XcqDCg7io6xsN8UTmX tSywK43jijYO/nhU2o7IRqXCAs4IZjtgubCcBFPTqtysdIQetF4X6T9Pwk7RrGobL6iDFo CzEgOLV8dMdnhtaig9WMycuweakWXzY4S5TIn9k/I5sQ1gZ1cc/JuhR9VqqYDX+muzQAOq s3NPwxo++CyYvSwld3J9QVcGGgpehWec4u+4AwQqpDBns7+FxCELUuYsq6fIuOu2euIaQD GQ9f1VQmVF6pCK8Sd0bGagx6HlTQ794O3qCKNs0LciD6YMEYBmv7PWLnOritOA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758188999; a=rsa-sha256; cv=none; b=Osxlv60+B03ckaZycD2FCMvnFlFGDuE4FEqZV50RVRbJBwke93wb6OHDbaZnnvnYI3Q82I UaIydV7OhHKQ08+gMTJN+c9TQ9ql4FOGpzk0p40UEEdPg2wvZLHi3FRePRAVXs4thCp8+c auWZz9tCss9XRLfY1LRAsQzoso8RyLXlUj+Jymt9HwFkD6ARphCondy/XaRy9ULgHvUuDm y4HCQkR4vOkHEOaSNQC/7IrxDAAX6o/zXWvRid9k+iiQGClo8IVFjZm2B77IJdotXaVieh voCpOM+U2A1JCR65nS9H10odcuks7wXKhQupsUOB7WuE4czloE9J21Az1bw9bg== 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 4cS9pv04JPz15vx; Thu, 18 Sep 2025 09:49:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58I9nwAD017079; Thu, 18 Sep 2025 09:49:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58I9nwwU017076; Thu, 18 Sep 2025 09:49:58 GMT (envelope-from git) Date: Thu, 18 Sep 2025 09:49:58 GMT Message-Id: <202509180949.58I9nwwU017076@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Aymeric Wibo Subject: git: 87e2b532ec9e - main - Revert "sys/power: Sleep type reporting by PM backends" List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: obiwac X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 87e2b532ec9e9504ac743931ffae528679a1f4c0 Auto-Submitted: auto-generated The branch main has been updated by obiwac: URL: https://cgit.FreeBSD.org/src/commit/?id=87e2b532ec9e9504ac743931ffae528679a1f4c0 commit 87e2b532ec9e9504ac743931ffae528679a1f4c0 Author: Aymeric Wibo AuthorDate: 2025-09-18 09:45:27 +0000 Commit: Aymeric Wibo CommitDate: 2025-09-18 09:49:17 +0000 Revert "sys/power: Sleep type reporting by PM backends" This reverts commit e779891327b1d9b9ab10ba482e59f498790505a7. PR: 289634 --- sys/dev/acpica/acpi.c | 6 ++---- sys/kern/subr_power.c | 46 +++++----------------------------------------- sys/sys/power.h | 3 +-- 3 files changed, 8 insertions(+), 47 deletions(-) diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c index 702e1ecb5340..8dd879a573cc 100644 --- a/sys/dev/acpica/acpi.c +++ b/sys/dev/acpica/acpi.c @@ -734,8 +734,7 @@ acpi_attach(device_t dev) goto out; /* Register ACPI again to pass the correct argument of pm_func. */ - power_pm_register(POWER_PM_TYPE_ACPI, acpi_pm_func, sc, - acpi_supported_stypes); + power_pm_register(POWER_PM_TYPE_ACPI, acpi_pm_func, sc); acpi_platform_osc(dev); @@ -4777,8 +4776,7 @@ acpi_pm_register(void *arg) if (!cold || resource_disabled("acpi", 0)) return; - power_pm_register(POWER_PM_TYPE_ACPI, acpi_pm_func, NULL, - acpi_supported_stypes); + power_pm_register(POWER_PM_TYPE_ACPI, acpi_pm_func, NULL); } SYSINIT(power, SI_SUB_KLD, SI_ORDER_ANY, acpi_pm_register, NULL); diff --git a/sys/kern/subr_power.c b/sys/kern/subr_power.c index 44ad82860649..eb5bd03f5018 100644 --- a/sys/kern/subr_power.c +++ b/sys/kern/subr_power.c @@ -39,14 +39,13 @@ #include #include -enum power_stype power_standby_stype = POWER_STYPE_UNKNOWN; -enum power_stype power_suspend_stype = POWER_STYPE_UNKNOWN; -enum power_stype power_hibernate_stype = POWER_STYPE_UNKNOWN; +enum power_stype power_standby_stype = POWER_STYPE_STANDBY; +enum power_stype power_suspend_stype = POWER_STYPE_SUSPEND_TO_IDLE; +enum power_stype power_hibernate_stype = POWER_STYPE_HIBERNATE; static u_int power_pm_type = POWER_PM_TYPE_NONE; static power_pm_fn_t power_pm_fn = NULL; static void *power_pm_arg = NULL; -static bool power_pm_supported[POWER_STYPE_COUNT] = {0}; static struct task power_pm_task; enum power_stype @@ -71,26 +70,6 @@ power_stype_to_name(enum power_stype stype) return (power_stype_names[stype]); } -static int -sysctl_supported_stypes(SYSCTL_HANDLER_ARGS) -{ - int error; - struct sbuf sb; - enum power_stype stype; - - sbuf_new(&sb, NULL, 32, SBUF_AUTOEXTEND); - for (stype = 0; stype < POWER_STYPE_COUNT; stype++) { - if (power_pm_supported[stype]) - sbuf_printf(&sb, "%s ", power_stype_to_name(stype)); - } - sbuf_trim(&sb); - sbuf_finish(&sb); - error = sysctl_handle_string(oidp, sbuf_data(&sb), sbuf_len(&sb), req); - sbuf_delete(&sb); - - return (error); -} - static int power_sysctl_stype(SYSCTL_HANDLER_ARGS) { @@ -107,8 +86,7 @@ power_sysctl_stype(SYSCTL_HANDLER_ARGS) new_stype = power_name_to_stype(name); if (new_stype == POWER_STYPE_UNKNOWN) return (EINVAL); - if (!power_pm_supported[new_stype]) - return (EOPNOTSUPP); + /* TODO Check to see if the new stype is supported. */ if (new_stype != old_stype) *(enum power_stype *)oidp->oid_arg1 = new_stype; return (0); @@ -117,9 +95,6 @@ power_sysctl_stype(SYSCTL_HANDLER_ARGS) static SYSCTL_NODE(_kern, OID_AUTO, power, CTLFLAG_RW, 0, "Generic power management related sysctls"); -SYSCTL_PROC(_kern_power, OID_AUTO, supported_stype, - CTLTYPE_STRING | CTLFLAG_RD, 0, 0, sysctl_supported_stypes, "A", - "List supported sleep types"); SYSCTL_PROC(_kern_power, OID_AUTO, standby, CTLTYPE_STRING | CTLFLAG_RW, &power_standby_stype, 0, power_sysctl_stype, "A", "Sleep type to enter on standby"); @@ -139,8 +114,7 @@ power_pm_deferred_fn(void *arg, int pending) } int -power_pm_register(u_int pm_type, power_pm_fn_t pm_fn, void *pm_arg, - bool pm_supported[static POWER_STYPE_COUNT]) +power_pm_register(u_int pm_type, power_pm_fn_t pm_fn, void *pm_arg) { int error; @@ -149,16 +123,6 @@ power_pm_register(u_int pm_type, power_pm_fn_t pm_fn, void *pm_arg, power_pm_type = pm_type; power_pm_fn = pm_fn; power_pm_arg = pm_arg; - memcpy(power_pm_supported, pm_supported, - sizeof(power_pm_supported)); - if (power_pm_supported[POWER_STYPE_STANDBY]) - power_standby_stype = POWER_STYPE_STANDBY; - if (power_pm_supported[POWER_STYPE_SUSPEND_TO_IDLE]) - power_suspend_stype = POWER_STYPE_SUSPEND_TO_IDLE; - else if (power_pm_supported[POWER_STYPE_SUSPEND_TO_MEM]) - power_suspend_stype = POWER_STYPE_SUSPEND_TO_MEM; - if (power_pm_supported[POWER_STYPE_HIBERNATE]) - power_hibernate_stype = POWER_STYPE_HIBERNATE; error = 0; TASK_INIT(&power_pm_task, 0, power_pm_deferred_fn, NULL); } else { diff --git a/sys/sys/power.h b/sys/sys/power.h index 33ace400bfd2..44d7fc354423 100644 --- a/sys/sys/power.h +++ b/sys/sys/power.h @@ -91,8 +91,7 @@ extern const char *power_stype_to_name(enum power_stype _stype); typedef int (*power_pm_fn_t)(u_long _cmd, void* _arg, enum power_stype _stype); extern int power_pm_register(u_int _pm_type, power_pm_fn_t _pm_fn, - void *_pm_arg, - bool _pm_supported[static POWER_STYPE_COUNT]); + void *_pm_arg); extern u_int power_pm_get_type(void); extern void power_pm_suspend(int); From nobody Thu Sep 18 09:50:00 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cS9pw5NjJz685y4; Thu, 18 Sep 2025 09:50: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 4cS9pw1bhjz3wLp; Thu, 18 Sep 2025 09:50:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758189000; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=auxZHv5FlXACza9MEPOfvqupJofLGudVWLhMworndbg=; b=hURBNjMxiyir0U6AZefCEyrBBhUlGu7oVAekvFM0vH9MxRXZHgRm2pHUbW+Iar2FaAkGuF vxaSvqKaWTSmZ1C/of8c/wUO6rXAC1ewb/DLmkVL2mI6uwsNsk568sIw0o75/yCoxxFoaP f4v2kWCUPamjxH1FvbgdB4j8nofHU6XvEKaE+P/62MiXLjAqAy32S7c1C8D9NI5ZpDUx6/ p8bjnVvZ//9pyiNDR1dwBwdvLqDKNiuRyGScOL+tT/yCUYQ3k60zWrBrWNlhJ97bf715aL 7TRKnz/u9MniRktKl7WZyYkx0Uqs28MNIsYjiRBoe1RDVoTEHJiXXxhEBYlJ/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758189000; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=auxZHv5FlXACza9MEPOfvqupJofLGudVWLhMworndbg=; b=qx7F2wWp1xr6mvFymDaEQOMrkZ9JzvNvG5grDBaUbCrKnfeSSSYA8I7h+F1uvF6lwtMgMf eZMYyZdZ56xtVPrrB4BQUTd2EWtZR/HmzG/heVPpdWC/p8t7Vpu5HHWirGyhNJXVweWBEg FK5MD/PBmme+Y04JSUbMcY1MoYQcfW+TwXNqa4RG+WNQky9/7OTzaG+GrNQLTqV/zzV5Hy YdU7MJMD0/4ohKaU7eg8YKBdgbyPCZmVuz4qYRTz47hFNwaP2WChCxoFsjE9ROBp/uwHYH 77zTjpOAgprv2YeS6ryE5u/My5SP7F6S9aqipD5xQ/L5fSkwe8B6bqqf16qiQQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758189000; a=rsa-sha256; cv=none; b=xQRkggC9+jBxAL3AP/Tb1I9n8OPoy3j+REecQj1lJ7OJ35ya3brB033CXTgzBMzYn/I0Wo JmJMJyfAnuBHauSHHeprHAcFpAYMRF3lcKtmrVm308Jy4wY5uEmaJgGLZrYPatioAhF35h u8i5uckIkwk1XrqNiN9XM7xqDbwU5n5fZutw5BKRVSzIEik9TKrwe3vripGG0YTsLLb4N/ zOtVv/4Z5wmZM2YlawLyDgowbBHWbbQVbmehYPg2YnsIDvZiUtL9gokLSvZPOLxyEvp3Iw q+OMxLfV+wZgA8frhkWVsh5REvd86Vn2PIROAmH08Xli/cPqsZgprSWdBIyE7w== 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 4cS9pw0q8qz157Q; Thu, 18 Sep 2025 09:50:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58I9o0mb017140; Thu, 18 Sep 2025 09:50:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58I9o0rE017137; Thu, 18 Sep 2025 09:50:00 GMT (envelope-from git) Date: Thu, 18 Sep 2025 09:50:00 GMT Message-Id: <202509180950.58I9o0rE017137@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Aymeric Wibo Subject: git: 506b36c4fdde - main - Revert "acpi: Use sleep types defined in sys/power.h" List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: obiwac X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 506b36c4fdde0b402cc730b41a9d9d20130e1bca Auto-Submitted: auto-generated The branch main has been updated by obiwac: URL: https://cgit.FreeBSD.org/src/commit/?id=506b36c4fdde0b402cc730b41a9d9d20130e1bca commit 506b36c4fdde0b402cc730b41a9d9d20130e1bca Author: Aymeric Wibo AuthorDate: 2025-09-18 09:45:36 +0000 Commit: Aymeric Wibo CommitDate: 2025-09-18 09:49:31 +0000 Revert "acpi: Use sleep types defined in sys/power.h" This reverts commit ce5e22b28ef6caff3ffd228ac188114b08c0da02. PR: 289634 --- sys/dev/acpica/acpi.c | 368 +++++++++++++++++----------------------------- sys/dev/acpica/acpi_lid.c | 4 +- sys/dev/acpica/acpivar.h | 15 +- sys/x86/acpica/acpi_apm.c | 25 ++-- 4 files changed, 158 insertions(+), 254 deletions(-) diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c index 8dd879a573cc..574d3aacbcde 100644 --- a/sys/dev/acpica/acpi.c +++ b/sys/dev/acpica/acpi.c @@ -111,9 +111,8 @@ struct callout acpi_sleep_timer; /* Bitmap of device quirks. */ int acpi_quirks; -/* Supported sleep states and types. */ -static bool acpi_supported_stypes[POWER_STYPE_COUNT]; -static bool acpi_supported_sstates[ACPI_S_STATE_COUNT]; +/* Supported sleep states. */ +static BOOLEAN acpi_sleep_states[ACPI_S_STATE_COUNT]; static void acpi_lookup(void *arg, const char *name, device_t *dev); static int acpi_modevent(struct module *mod, int event, void *junk); @@ -170,27 +169,21 @@ static ACPI_STATUS acpi_probe_child(ACPI_HANDLE handle, UINT32 level, void *context, void **status); static void acpi_sleep_enable(void *arg); static ACPI_STATUS acpi_sleep_disable(struct acpi_softc *sc); -static ACPI_STATUS acpi_EnterSleepState(struct acpi_softc *sc, - enum power_stype stype); +static ACPI_STATUS acpi_EnterSleepState(struct acpi_softc *sc, int state); static void acpi_shutdown_final(void *arg, int howto); static void acpi_enable_fixed_events(struct acpi_softc *sc); static void acpi_resync_clock(struct acpi_softc *sc); -static int acpi_wake_sleep_prep(ACPI_HANDLE handle, - enum power_stype stype); -static int acpi_wake_run_prep(ACPI_HANDLE handle, enum power_stype stype); -static int acpi_wake_prep_walk(enum power_stype stype); +static int acpi_wake_sleep_prep(ACPI_HANDLE handle, int sstate); +static int acpi_wake_run_prep(ACPI_HANDLE handle, int sstate); +static int acpi_wake_prep_walk(int sstate); static int acpi_wake_sysctl_walk(device_t dev); static int acpi_wake_set_sysctl(SYSCTL_HANDLER_ARGS); +static void acpi_system_eventhandler_sleep(void *arg, int state); +static void acpi_system_eventhandler_wakeup(void *arg, int state); +static int acpi_sname2sstate(const char *sname); +static const char *acpi_sstate2sname(int sstate); static int acpi_supported_sleep_state_sysctl(SYSCTL_HANDLER_ARGS); -static void acpi_system_eventhandler_sleep(void *arg, - enum power_stype stype); -static void acpi_system_eventhandler_wakeup(void *arg, - enum power_stype stype); -static enum power_stype acpi_sstate_to_stype(int sstate); -static int acpi_sname_to_sstate(const char *sname); -static const char *acpi_sstate_to_sname(int sstate); static int acpi_sleep_state_sysctl(SYSCTL_HANDLER_ARGS); -static int acpi_stype_sysctl(SYSCTL_HANDLER_ARGS); static int acpi_debug_objects_sysctl(SYSCTL_HANDLER_ARGS); static int acpi_stype_to_sstate(struct acpi_softc *sc, enum power_stype stype); static int acpi_pm_func(u_long cmd, void *arg, enum power_stype stype); @@ -484,7 +477,6 @@ acpi_attach(device_t dev) UINT32 flags; UINT8 TypeA, TypeB; char *env; - enum power_stype stype; ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); @@ -597,30 +589,31 @@ acpi_attach(device_t dev) SYSCTL_ADD_PROC(&sc->acpi_sysctl_ctx, SYSCTL_CHILDREN(sc->acpi_sysctl_tree), OID_AUTO, "power_button_state", CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_MPSAFE, - &sc->acpi_power_button_stype, 0, acpi_stype_sysctl, "A", + &sc->acpi_power_button_sx, 0, acpi_sleep_state_sysctl, "A", "Power button ACPI sleep state."); SYSCTL_ADD_PROC(&sc->acpi_sysctl_ctx, SYSCTL_CHILDREN(sc->acpi_sysctl_tree), OID_AUTO, "sleep_button_state", CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_MPSAFE, - &sc->acpi_sleep_button_stype, 0, acpi_stype_sysctl, "A", + &sc->acpi_sleep_button_sx, 0, acpi_sleep_state_sysctl, "A", "Sleep button ACPI sleep state."); SYSCTL_ADD_PROC(&sc->acpi_sysctl_ctx, SYSCTL_CHILDREN(sc->acpi_sysctl_tree), OID_AUTO, "lid_switch_state", CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_MPSAFE, - &sc->acpi_lid_switch_stype, 0, acpi_stype_sysctl, "A", - "Lid ACPI sleep state. Set to s2idle or s2mem if you want to suspend " - "your laptop when close the lid."); + &sc->acpi_lid_switch_sx, 0, acpi_sleep_state_sysctl, "A", + "Lid ACPI sleep state. Set to S3 if you want to suspend your laptop when close the Lid."); SYSCTL_ADD_PROC(&sc->acpi_sysctl_ctx, SYSCTL_CHILDREN(sc->acpi_sysctl_tree), OID_AUTO, "standby_state", CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_MPSAFE, - &sc->acpi_standby_sx, 0, acpi_sleep_state_sysctl, "A", - "ACPI Sx state to use when going standby (S1 or S2)."); + &sc->acpi_standby_sx, 0, acpi_sleep_state_sysctl, "A", ""); + SYSCTL_ADD_PROC(&sc->acpi_sysctl_ctx, SYSCTL_CHILDREN(sc->acpi_sysctl_tree), + OID_AUTO, "suspend_state", + CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_MPSAFE, + &sc->acpi_suspend_sx, 0, acpi_sleep_state_sysctl, "A", ""); SYSCTL_ADD_INT(&sc->acpi_sysctl_ctx, SYSCTL_CHILDREN(sc->acpi_sysctl_tree), OID_AUTO, "sleep_delay", CTLFLAG_RW, &sc->acpi_sleep_delay, 0, "sleep delay in seconds"); SYSCTL_ADD_INT(&sc->acpi_sysctl_ctx, SYSCTL_CHILDREN(sc->acpi_sysctl_tree), - OID_AUTO, "s4bios", CTLFLAG_RW, &sc->acpi_s4bios, 0, - "Use S4BIOS when hibernating."); + OID_AUTO, "s4bios", CTLFLAG_RW, &sc->acpi_s4bios, 0, "S4BIOS mode"); SYSCTL_ADD_INT(&sc->acpi_sysctl_ctx, SYSCTL_CHILDREN(sc->acpi_sysctl_tree), OID_AUTO, "verbose", CTLFLAG_RW, &sc->acpi_verbose, 0, "verbose mode"); SYSCTL_ADD_INT(&sc->acpi_sysctl_ctx, SYSCTL_CHILDREN(sc->acpi_sysctl_tree), @@ -666,38 +659,31 @@ acpi_attach(device_t dev) sc->acpi_s4bios = 1; #endif - /* - * Probe all supported ACPI sleep states. Awake (S0) is always supported. - */ - acpi_supported_sstates[ACPI_STATE_S0] = TRUE; - acpi_supported_stypes[POWER_STYPE_AWAKE] = true; - for (state = ACPI_STATE_S1; state <= ACPI_STATE_S5; state++) + /* Probe all supported sleep states. */ + acpi_sleep_states[ACPI_STATE_S0] = TRUE; + for (state = ACPI_STATE_S1; state < ACPI_S_STATE_COUNT; state++) if (ACPI_SUCCESS(AcpiEvaluateObject(ACPI_ROOT_OBJECT, __DECONST(char *, AcpiGbl_SleepStateNames[state]), NULL, NULL)) && - ACPI_SUCCESS(AcpiGetSleepTypeData(state, &TypeA, &TypeB))) { - acpi_supported_sstates[state] = TRUE; - acpi_supported_stypes[acpi_sstate_to_stype(state)] = true; - } + ACPI_SUCCESS(AcpiGetSleepTypeData(state, &TypeA, &TypeB))) + acpi_sleep_states[state] = TRUE; /* - * Dispatch the default sleep type to devices. The lid switch is set + * Dispatch the default sleep state to devices. The lid switch is set * to UNKNOWN by default to avoid surprising users. */ - sc->acpi_power_button_stype = acpi_supported_stypes[POWER_STYPE_POWEROFF] ? - POWER_STYPE_POWEROFF : POWER_STYPE_UNKNOWN; - sc->acpi_lid_switch_stype = POWER_STYPE_UNKNOWN; - - sc->acpi_standby_sx = ACPI_STATE_UNKNOWN; - if (acpi_supported_sstates[ACPI_STATE_S1]) - sc->acpi_standby_sx = ACPI_STATE_S1; - else if (acpi_supported_sstates[ACPI_STATE_S2]) - sc->acpi_standby_sx = ACPI_STATE_S2; - - /* Pick the first valid sleep type for the sleep button default. */ - sc->acpi_sleep_button_stype = POWER_STYPE_UNKNOWN; - for (stype = POWER_STYPE_STANDBY; stype <= POWER_STYPE_HIBERNATE; stype++) - if (acpi_supported_stypes[stype]) { - sc->acpi_sleep_button_stype = stype; + sc->acpi_power_button_sx = acpi_sleep_states[ACPI_STATE_S5] ? + ACPI_STATE_S5 : ACPI_STATE_UNKNOWN; + sc->acpi_lid_switch_sx = ACPI_STATE_UNKNOWN; + sc->acpi_standby_sx = acpi_sleep_states[ACPI_STATE_S1] ? + ACPI_STATE_S1 : ACPI_STATE_UNKNOWN; + sc->acpi_suspend_sx = acpi_sleep_states[ACPI_STATE_S3] ? + ACPI_STATE_S3 : ACPI_STATE_UNKNOWN; + + /* Pick the first valid sleep state for the sleep button default. */ + sc->acpi_sleep_button_sx = ACPI_STATE_UNKNOWN; + for (state = ACPI_STATE_S1; state <= ACPI_STATE_S4; state++) + if (acpi_sleep_states[state]) { + sc->acpi_sleep_button_sx = state; break; } @@ -722,7 +708,7 @@ acpi_attach(device_t dev) /* Flag our initial states. */ sc->acpi_enabled = TRUE; - sc->acpi_stype = POWER_STYPE_AWAKE; + sc->acpi_sstate = ACPI_STATE_S0; sc->acpi_sleep_disabled = TRUE; /* Create the control device */ @@ -782,36 +768,6 @@ acpi_stype_to_sstate(struct acpi_softc *sc, enum power_stype stype) return (ACPI_STATE_UNKNOWN); } -/* - * XXX It would be nice if we didn't need this function, but we'd need - * acpi_EnterSleepState and acpi_ReqSleepState to take in actual ACPI S-states, - * which won't be possible at the moment because suspend-to-idle (which is not - * an ACPI S-state nor maps to one) will be implemented here. - * - * In the future, we should make generic a lot of the logic in these functions - * to enable suspend-to-idle on non-ACPI builds, and then make - * acpi_EnterSleepState and acpi_ReqSleepState truly take in ACPI S-states - * again. - */ -static enum power_stype -acpi_sstate_to_stype(int sstate) -{ - switch (sstate) { - case ACPI_STATE_S0: - return (POWER_STYPE_AWAKE); - case ACPI_STATE_S1: - case ACPI_STATE_S2: - return (POWER_STYPE_STANDBY); - case ACPI_STATE_S3: - return (POWER_STYPE_SUSPEND_TO_MEM); - case ACPI_STATE_S4: - return (POWER_STYPE_HIBERNATE); - case ACPI_STATE_S5: - return (POWER_STYPE_POWEROFF); - } - return (POWER_STYPE_UNKNOWN); -} - static void acpi_set_power_children(device_t dev, int state) { @@ -2107,7 +2063,7 @@ acpi_device_pwr_for_sleep(device_t bus, device_t dev, int *dstate) * Note illegal _S0D is evaluated because some systems expect this. */ sc = device_get_softc(bus); - snprintf(sxd, sizeof(sxd), "_S%dD", acpi_stype_to_sstate(sc, sc->acpi_stype)); + snprintf(sxd, sizeof(sxd), "_S%dD", sc->acpi_sstate); status = acpi_GetInteger(handle, sxd, dstate); if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) { device_printf(dev, "failed to get %s on %s: %s\n", sxd, @@ -3205,9 +3161,9 @@ acpi_sleep_force_task(void *context) { struct acpi_softc *sc = (struct acpi_softc *)context; - if (ACPI_FAILURE(acpi_EnterSleepState(sc, sc->acpi_next_stype))) - device_printf(sc->acpi_dev, "force sleep state %s failed\n", - power_stype_to_name(sc->acpi_next_stype)); + if (ACPI_FAILURE(acpi_EnterSleepState(sc, sc->acpi_next_sstate))) + device_printf(sc->acpi_dev, "force sleep state S%d failed\n", + sc->acpi_next_sstate); } static void @@ -3234,24 +3190,24 @@ acpi_sleep_force(void *arg) * acks are in. */ int -acpi_ReqSleepState(struct acpi_softc *sc, enum power_stype stype) +acpi_ReqSleepState(struct acpi_softc *sc, int state) { #if defined(__amd64__) || defined(__i386__) struct apm_clone_data *clone; ACPI_STATUS status; - if (stype < POWER_STYPE_AWAKE || stype >= POWER_STYPE_COUNT) + if (state < ACPI_STATE_S1 || state > ACPI_S_STATES_MAX) return (EINVAL); - if (!acpi_supported_stypes[stype]) + if (!acpi_sleep_states[state]) return (EOPNOTSUPP); /* * If a reboot/shutdown/suspend request is already in progress or * suspend is blocked due to an upcoming shutdown, just return. */ - if (rebooting || sc->acpi_next_stype != POWER_STYPE_AWAKE || - suspend_blocked) + if (rebooting || sc->acpi_next_sstate != 0 || suspend_blocked) { return (0); + } /* Wait until sleep is enabled. */ while (sc->acpi_sleep_disabled) { @@ -3260,12 +3216,12 @@ acpi_ReqSleepState(struct acpi_softc *sc, enum power_stype stype) ACPI_LOCK(acpi); - sc->acpi_next_stype = stype; + sc->acpi_next_sstate = state; /* S5 (soft-off) should be entered directly with no waiting. */ - if (stype == POWER_STYPE_POWEROFF) { + if (state == ACPI_STATE_S5) { ACPI_UNLOCK(acpi); - status = acpi_EnterSleepState(sc, stype); + status = acpi_EnterSleepState(sc, state); return (ACPI_SUCCESS(status) ? 0 : ENXIO); } @@ -3281,7 +3237,7 @@ acpi_ReqSleepState(struct acpi_softc *sc, enum power_stype stype) /* If devd(8) is not running, immediately enter the sleep state. */ if (!devctl_process_running()) { ACPI_UNLOCK(acpi); - status = acpi_EnterSleepState(sc, stype); + status = acpi_EnterSleepState(sc, state); return (ACPI_SUCCESS(status) ? 0 : ENXIO); } @@ -3296,7 +3252,7 @@ acpi_ReqSleepState(struct acpi_softc *sc, enum power_stype stype) ACPI_UNLOCK(acpi); /* Now notify devd(8) also. */ - acpi_UserNotify("Suspend", ACPI_ROOT_OBJECT, stype); + acpi_UserNotify("Suspend", ACPI_ROOT_OBJECT, state); return (0); #else @@ -3319,17 +3275,17 @@ acpi_AckSleepState(struct apm_clone_data *clone, int error) struct acpi_softc *sc; int ret, sleeping; - /* If no pending sleep type, return an error. */ + /* If no pending sleep state, return an error. */ ACPI_LOCK(acpi); sc = clone->acpi_sc; - if (sc->acpi_next_stype == POWER_STYPE_AWAKE) { + if (sc->acpi_next_sstate == 0) { ACPI_UNLOCK(acpi); return (ENXIO); } /* Caller wants to abort suspend process. */ if (error) { - sc->acpi_next_stype = POWER_STYPE_AWAKE; + sc->acpi_next_sstate = 0; callout_stop(&sc->susp_force_to); device_printf(sc->acpi_dev, "listener on %s cancelled the pending suspend\n", @@ -3359,7 +3315,7 @@ acpi_AckSleepState(struct apm_clone_data *clone, int error) ACPI_UNLOCK(acpi); ret = 0; if (sleeping) { - if (ACPI_FAILURE(acpi_EnterSleepState(sc, sc->acpi_next_stype))) + if (ACPI_FAILURE(acpi_EnterSleepState(sc, sc->acpi_next_sstate))) ret = ENODEV; } return (ret); @@ -3416,7 +3372,7 @@ enum acpi_sleep_state { * Currently we support S1-S5 but S4 is only S4BIOS */ static ACPI_STATUS -acpi_EnterSleepState(struct acpi_softc *sc, enum power_stype stype) +acpi_EnterSleepState(struct acpi_softc *sc, int state) { register_t intr; ACPI_STATUS status; @@ -3426,11 +3382,11 @@ acpi_EnterSleepState(struct acpi_softc *sc, enum power_stype stype) ACPI_FUNCTION_TRACE_U32((char *)(uintptr_t)__func__, state); - if (stype <= POWER_STYPE_AWAKE || stype >= POWER_STYPE_COUNT) + if (state < ACPI_STATE_S1 || state > ACPI_S_STATES_MAX) return_ACPI_STATUS (AE_BAD_PARAMETER); - if (!acpi_supported_stypes[stype]) { - device_printf(sc->acpi_dev, "Sleep type %s not supported on this " - "platform\n", power_stype_to_name(stype)); + if (!acpi_sleep_states[state]) { + device_printf(sc->acpi_dev, "Sleep state S%d not supported by BIOS\n", + state); return (AE_SUPPORT); } @@ -3442,7 +3398,7 @@ acpi_EnterSleepState(struct acpi_softc *sc, enum power_stype stype) return (status); } - if (stype == POWER_STYPE_POWEROFF) { + if (state == ACPI_STATE_S5) { /* * Shut down cleanly and power off. This will call us back through the * shutdown handlers. @@ -3470,16 +3426,16 @@ acpi_EnterSleepState(struct acpi_softc *sc, enum power_stype stype) #endif /* - * Be sure to hold bus topology lock across DEVICE_SUSPEND/RESUME. + * Be sure to hold Giant across DEVICE_SUSPEND/RESUME */ bus_topo_lock(); slp_state = ACPI_SS_NONE; - sc->acpi_stype = stype; + sc->acpi_sstate = state; /* Enable any GPEs as appropriate and requested by the user. */ - acpi_wake_prep_walk(stype); + acpi_wake_prep_walk(state); slp_state = ACPI_SS_GPE_SET; /* @@ -3496,7 +3452,7 @@ acpi_EnterSleepState(struct acpi_softc *sc, enum power_stype stype) } slp_state = ACPI_SS_DEV_SUSPEND; - status = AcpiEnterSleepStatePrep(stype); + status = AcpiEnterSleepStatePrep(state); if (ACPI_FAILURE(status)) { device_printf(sc->acpi_dev, "AcpiEnterSleepStatePrep failed - %s\n", AcpiFormatException(status)); @@ -3509,9 +3465,9 @@ acpi_EnterSleepState(struct acpi_softc *sc, enum power_stype stype) suspendclock(); intr = intr_disable(); - if (stype != POWER_STYPE_STANDBY) { - sleep_result = acpi_sleep_machdep(sc, stype); - acpi_wakeup_machdep(sc, stype, sleep_result, 0); + if (state != ACPI_STATE_S1) { + sleep_result = acpi_sleep_machdep(sc, state); + acpi_wakeup_machdep(sc, state, sleep_result, 0); /* * XXX According to ACPI specification SCI_EN bit should be restored @@ -3522,10 +3478,10 @@ acpi_EnterSleepState(struct acpi_softc *sc, enum power_stype stype) * This hack is picked up from Linux, which claims that it follows * Windows behavior. */ - if (sleep_result == 1 && stype != POWER_STYPE_HIBERNATE) + if (sleep_result == 1 && state != ACPI_STATE_S4) AcpiWriteBitRegister(ACPI_BITREG_SCI_ENABLE, ACPI_ENABLE_EVENT); - if (sleep_result == 1 && stype == POWER_STYPE_SUSPEND_TO_MEM) { + if (sleep_result == 1 && state == ACPI_STATE_S3) { /* * Prevent mis-interpretation of the wakeup by power button * as a request for power off. @@ -3551,20 +3507,20 @@ acpi_EnterSleepState(struct acpi_softc *sc, enum power_stype stype) intr_restore(intr); /* call acpi_wakeup_machdep() again with interrupt enabled */ - acpi_wakeup_machdep(sc, stype, sleep_result, 1); + acpi_wakeup_machdep(sc, state, sleep_result, 1); - AcpiLeaveSleepStatePrep(stype); + AcpiLeaveSleepStatePrep(state); if (sleep_result == -1) goto backout; - /* Re-enable ACPI hardware on wakeup from hibernate. */ - if (stype == POWER_STYPE_HIBERNATE) + /* Re-enable ACPI hardware on wakeup from sleep state 4. */ + if (state == ACPI_STATE_S4) AcpiEnable(); } else { - status = AcpiEnterSleepState(stype); + status = AcpiEnterSleepState(state); intr_restore(intr); - AcpiLeaveSleepStatePrep(stype); + AcpiLeaveSleepStatePrep(state); if (ACPI_FAILURE(status)) { device_printf(sc->acpi_dev, "AcpiEnterSleepState failed - %s\n", AcpiFormatException(status)); @@ -3581,13 +3537,13 @@ backout: if (slp_state >= ACPI_SS_SLP_PREP) resumeclock(); if (slp_state >= ACPI_SS_GPE_SET) { - acpi_wake_prep_walk(stype); - sc->acpi_stype = POWER_STYPE_AWAKE; + acpi_wake_prep_walk(state); + sc->acpi_sstate = ACPI_STATE_S0; } if (slp_state >= ACPI_SS_DEV_SUSPEND) DEVICE_RESUME(root_bus); if (slp_state >= ACPI_SS_SLP_PREP) - AcpiLeaveSleepState(stype); + AcpiLeaveSleepState(state); if (slp_state >= ACPI_SS_SLEPT) { #if defined(__i386__) || defined(__amd64__) /* NB: we are still using ACPI timecounter at this point. */ @@ -3596,7 +3552,7 @@ backout: acpi_resync_clock(sc); acpi_enable_fixed_events(sc); } - sc->acpi_next_stype = POWER_STYPE_AWAKE; + sc->acpi_next_sstate = 0; bus_topo_unlock(); @@ -3622,7 +3578,7 @@ backout: /* Run /etc/rc.resume after we are back. */ if (devctl_process_running()) - acpi_UserNotify("Resume", ACPI_ROOT_OBJECT, stype); + acpi_UserNotify("Resume", ACPI_ROOT_OBJECT, state); return_ACPI_STATUS (status); } @@ -3673,21 +3629,16 @@ acpi_wake_set_enable(device_t dev, int enable) } static int -acpi_wake_sleep_prep(ACPI_HANDLE handle, enum power_stype stype) +acpi_wake_sleep_prep(ACPI_HANDLE handle, int sstate) { - int sstate; struct acpi_prw_data prw; device_t dev; - struct acpi_softc *sc; /* Check that this is a wake-capable device and get its GPE. */ if (acpi_parse_prw(handle, &prw) != 0) return (ENXIO); dev = acpi_get_device(handle); - sc = device_get_softc(dev); - sstate = acpi_stype_to_sstate(sc, stype); - /* * The destination sleep state must be less than (i.e., higher power) * or equal to the value specified by _PRW. If this GPE cannot be @@ -3698,26 +3649,24 @@ acpi_wake_sleep_prep(ACPI_HANDLE handle, enum power_stype stype) if (sstate > prw.lowest_wake) { AcpiSetGpeWakeMask(prw.gpe_handle, prw.gpe_bit, ACPI_GPE_DISABLE); if (bootverbose) - device_printf(dev, "wake_prep disabled wake for %s (%s)\n", - acpi_name(handle), power_stype_to_name(stype)); + device_printf(dev, "wake_prep disabled wake for %s (S%d)\n", + acpi_name(handle), sstate); } else if (dev && (acpi_get_flags(dev) & ACPI_FLAG_WAKE_ENABLED) != 0) { acpi_pwr_wake_enable(handle, 1); acpi_SetInteger(handle, "_PSW", 1); if (bootverbose) - device_printf(dev, "wake_prep enabled for %s (%s)\n", - acpi_name(handle), power_stype_to_name(stype)); + device_printf(dev, "wake_prep enabled for %s (S%d)\n", + acpi_name(handle), sstate); } return (0); } static int -acpi_wake_run_prep(ACPI_HANDLE handle, enum power_stype stype) +acpi_wake_run_prep(ACPI_HANDLE handle, int sstate) { - int sstate; struct acpi_prw_data prw; device_t dev; - struct acpi_softc *sc; /* * Check that this is a wake-capable device and get its GPE. Return @@ -3729,9 +3678,6 @@ acpi_wake_run_prep(ACPI_HANDLE handle, enum power_stype stype) if (dev == NULL || (acpi_get_flags(dev) & ACPI_FLAG_WAKE_ENABLED) == 0) return (0); - sc = device_get_softc(dev); - sstate = acpi_stype_to_sstate(sc, stype); - /* * If this GPE couldn't be enabled for the previous sleep state, it was * disabled before going to sleep so re-enable it. If it was enabled, @@ -3755,26 +3701,26 @@ acpi_wake_run_prep(ACPI_HANDLE handle, enum power_stype stype) static ACPI_STATUS acpi_wake_prep(ACPI_HANDLE handle, UINT32 level, void *context, void **status) { - enum power_stype stype; + int sstate; /* If suspending, run the sleep prep function, otherwise wake. */ - stype = *(enum power_stype *)context; + sstate = *(int *)context; if (AcpiGbl_SystemAwakeAndRunning) - acpi_wake_sleep_prep(handle, stype); + acpi_wake_sleep_prep(handle, sstate); else - acpi_wake_run_prep(handle, stype); + acpi_wake_run_prep(handle, sstate); return (AE_OK); } /* Walk the tree rooted at acpi0 to prep devices for suspend/resume. */ static int -acpi_wake_prep_walk(enum power_stype stype) +acpi_wake_prep_walk(int sstate) { ACPI_HANDLE sb_handle; if (ACPI_SUCCESS(AcpiGetHandle(ACPI_ROOT_OBJECT, "\\_SB_", &sb_handle))) AcpiWalkNamespace(ACPI_TYPE_DEVICE, sb_handle, 100, - acpi_wake_prep, NULL, &stype, NULL); + acpi_wake_prep, NULL, &sstate, NULL); return (0); } @@ -3933,7 +3879,7 @@ out: /* System Event Handlers (registered by EVENTHANDLER_REGISTER) */ static void -acpi_system_eventhandler_sleep(void *arg, enum power_stype stype) +acpi_system_eventhandler_sleep(void *arg, int state) { struct acpi_softc *sc = (struct acpi_softc *)arg; int ret; @@ -3941,27 +3887,23 @@ acpi_system_eventhandler_sleep(void *arg, enum power_stype stype) ACPI_FUNCTION_TRACE_U32((char *)(uintptr_t)__func__, state); /* Check if button action is disabled or unknown. */ - if (stype == ACPI_STATE_UNKNOWN) + if (state == ACPI_STATE_UNKNOWN) return; - /* - * Request that the system prepare to enter the given suspend state. We can - * totally pass an ACPI S-state to an enum power_stype. - */ - ret = acpi_ReqSleepState(sc, stype); + /* Request that the system prepare to enter the given suspend state. */ + ret = acpi_ReqSleepState(sc, state); if (ret != 0) device_printf(sc->acpi_dev, - "request to enter state %s failed (err %d)\n", - power_stype_to_name(stype), ret); + "request to enter state S%d failed (err %d)\n", state, ret); return_VOID; } static void -acpi_system_eventhandler_wakeup(void *arg, enum power_stype stype) +acpi_system_eventhandler_wakeup(void *arg, int state) { - ACPI_FUNCTION_TRACE_U32((char *)(uintptr_t)__func__, stype); + ACPI_FUNCTION_TRACE_U32((char *)(uintptr_t)__func__, state); /* Currently, nothing to do for wakeup. */ @@ -3975,14 +3917,14 @@ static void acpi_invoke_sleep_eventhandler(void *context) { - EVENTHANDLER_INVOKE(acpi_sleep_event, *(enum power_stype *)context); + EVENTHANDLER_INVOKE(acpi_sleep_event, *(int *)context); } static void acpi_invoke_wake_eventhandler(void *context) { - EVENTHANDLER_INVOKE(acpi_wakeup_event, *(enum power_stype *)context); + EVENTHANDLER_INVOKE(acpi_wakeup_event, *(int *)context); } UINT32 @@ -3998,7 +3940,7 @@ acpi_event_power_button_sleep(void *context) #if defined(__amd64__) || defined(__i386__) if (ACPI_FAILURE(AcpiOsExecute(OSL_NOTIFY_HANDLER, - acpi_invoke_sleep_eventhandler, &sc->acpi_power_button_stype))) + acpi_invoke_sleep_eventhandler, &sc->acpi_power_button_sx))) return_VALUE (ACPI_INTERRUPT_NOT_HANDLED); #else shutdown_nice(RB_POWEROFF); @@ -4015,7 +3957,7 @@ acpi_event_power_button_wake(void *context) ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); if (ACPI_FAILURE(AcpiOsExecute(OSL_NOTIFY_HANDLER, - acpi_invoke_wake_eventhandler, &sc->acpi_power_button_stype))) + acpi_invoke_wake_eventhandler, &sc->acpi_power_button_sx))) return_VALUE (ACPI_INTERRUPT_NOT_HANDLED); return_VALUE (ACPI_INTERRUPT_HANDLED); } @@ -4028,7 +3970,7 @@ acpi_event_sleep_button_sleep(void *context) ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); if (ACPI_FAILURE(AcpiOsExecute(OSL_NOTIFY_HANDLER, - acpi_invoke_sleep_eventhandler, &sc->acpi_sleep_button_stype))) + acpi_invoke_sleep_eventhandler, &sc->acpi_sleep_button_sx))) return_VALUE (ACPI_INTERRUPT_NOT_HANDLED); return_VALUE (ACPI_INTERRUPT_HANDLED); } @@ -4041,7 +3983,7 @@ acpi_event_sleep_button_wake(void *context) ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); if (ACPI_FAILURE(AcpiOsExecute(OSL_NOTIFY_HANDLER, - acpi_invoke_wake_eventhandler, &sc->acpi_sleep_button_stype))) + acpi_invoke_wake_eventhandler, &sc->acpi_sleep_button_sx))) return_VALUE (ACPI_INTERRUPT_NOT_HANDLED); return_VALUE (ACPI_INTERRUPT_HANDLED); } @@ -4237,8 +4179,7 @@ acpiioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, struct thread *t { struct acpi_softc *sc; struct acpi_ioctl_hook *hp; - int error; - int sstate; + int error, state; error = 0; hp = NULL; @@ -4268,9 +4209,9 @@ acpiioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, struct thread *t /* Core system ioctls. */ switch (cmd) { case ACPIIO_REQSLPSTATE: - sstate = *(int *)addr; - if (sstate != ACPI_STATE_S5) - return (acpi_ReqSleepState(sc, acpi_sstate_to_stype(sstate))); + state = *(int *)addr; + if (state != ACPI_STATE_S5) + return (acpi_ReqSleepState(sc, state)); device_printf(sc->acpi_dev, "power off via acpi ioctl not supported\n"); error = EOPNOTSUPP; break; @@ -4279,12 +4220,12 @@ acpiioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, struct thread *t error = acpi_AckSleepState(sc->acpi_clone, error); break; case ACPIIO_SETSLPSTATE: /* DEPRECATED */ - sstate = *(int *)addr; - if (sstate < ACPI_STATE_S0 || sstate > ACPI_STATE_S5) + state = *(int *)addr; + if (state < ACPI_STATE_S0 || state > ACPI_S_STATES_MAX) return (EINVAL); - if (!acpi_supported_sstates[sstate]) + if (!acpi_sleep_states[state]) return (EOPNOTSUPP); - if (ACPI_FAILURE(acpi_SetSleepState(sc, acpi_sstate_to_stype(sstate)))) + if (ACPI_FAILURE(acpi_SetSleepState(sc, state))) error = ENXIO; break; default: @@ -4296,7 +4237,7 @@ acpiioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, struct thread *t } static int -acpi_sname_to_sstate(const char *sname) +acpi_sname2sstate(const char *sname) { int sstate; @@ -4311,15 +4252,14 @@ acpi_sname_to_sstate(const char *sname) } static const char * -acpi_sstate_to_sname(int state) +acpi_sstate2sname(int sstate) { - static const char *snames[ACPI_S_STATE_COUNT] = {"S0", "S1", "S2", "S3", - "S4", "S5"}; + static const char *snames[] = { "S0", "S1", "S2", "S3", "S4", "S5" }; - if (state == ACPI_STATE_UNKNOWN) + if (sstate >= ACPI_STATE_S0 && sstate <= ACPI_STATE_S5) + return (snames[sstate]); + else if (sstate == ACPI_STATE_UNKNOWN) return ("NONE"); - if (state >= ACPI_STATE_S0 && state < ACPI_S_STATE_COUNT) - return (snames[state]); return (NULL); } @@ -4332,8 +4272,8 @@ acpi_supported_sleep_state_sysctl(SYSCTL_HANDLER_ARGS) sbuf_new(&sb, NULL, 32, SBUF_AUTOEXTEND); for (state = ACPI_STATE_S1; state < ACPI_S_STATE_COUNT; state++) - if (acpi_supported_sstates[state]) - sbuf_printf(&sb, "%s ", acpi_sstate_to_sname(state)); + if (acpi_sleep_states[state]) + sbuf_printf(&sb, "%s ", acpi_sstate2sname(state)); sbuf_trim(&sb); sbuf_finish(&sb); error = sysctl_handle_string(oidp, sbuf_data(&sb), sbuf_len(&sb), req); @@ -4341,64 +4281,27 @@ acpi_supported_sleep_state_sysctl(SYSCTL_HANDLER_ARGS) return (error); } - static int acpi_sleep_state_sysctl(SYSCTL_HANDLER_ARGS) { char sleep_state[10]; - int error; - int new_sstate, old_sstate; + int error, new_state, old_state; - old_sstate = *(int *)oidp->oid_arg1; - strlcpy(sleep_state, acpi_sstate_to_sname(old_sstate), sizeof(sleep_state)); + old_state = *(int *)oidp->oid_arg1; + strlcpy(sleep_state, acpi_sstate2sname(old_state), sizeof(sleep_state)); error = sysctl_handle_string(oidp, sleep_state, sizeof(sleep_state), req); if (error == 0 && req->newptr != NULL) { - new_sstate = acpi_sname_to_sstate(sleep_state); - if (new_sstate < 0) + new_state = acpi_sname2sstate(sleep_state); + if (new_state < ACPI_STATE_S1) return (EINVAL); - if (new_sstate < ACPI_S_STATE_COUNT && - !acpi_supported_sstates[new_sstate]) + if (new_state < ACPI_S_STATE_COUNT && !acpi_sleep_states[new_state]) return (EOPNOTSUPP); - if (new_sstate != old_sstate) - *(int *)oidp->oid_arg1 = new_sstate; + if (new_state != old_state) + *(int *)oidp->oid_arg1 = new_state; } return (error); } -static int -acpi_stype_sysctl(SYSCTL_HANDLER_ARGS) -{ - char name[10]; - int err; - int sstate; - enum power_stype new_stype, old_stype; - - old_stype = *(enum power_stype *)oidp->oid_arg1; - strlcpy(name, power_stype_to_name(old_stype), sizeof(name)); - err = sysctl_handle_string(oidp, name, sizeof(name), req); - if (err != 0 || req->newptr == NULL) - return (err); - - new_stype = power_name_to_stype(name); - if (new_stype == POWER_STYPE_UNKNOWN) { - sstate = acpi_sname_to_sstate(name); - if (sstate < 0) - return (EINVAL); - printf("warning: this sysctl expects a sleep type, but an ACPI S-state has " - "been passed to it. This functionality is deprecated; see acpi(4).\n"); - MPASS(sstate < ACPI_S_STATE_COUNT); - if (acpi_supported_sstates[sstate] == false) - return (EOPNOTSUPP); - new_stype = acpi_sstate_to_stype(sstate); - } - - if (acpi_supported_stypes[new_stype] == false) - return (EOPNOTSUPP); - if (new_stype != old_stype) - *(enum power_stype *)oidp->oid_arg1 = new_stype; - return (0); -} - /* Inform devctl(4) when we receive a Notify. */ void acpi_UserNotify(const char *subsystem, ACPI_HANDLE h, uint8_t notify) @@ -4747,7 +4650,7 @@ acpi_reset_interfaces(device_t dev) static int acpi_pm_func(u_long cmd, void *arg, enum power_stype stype) { - int error; + int error, sstate; struct acpi_softc *sc; error = 0; @@ -4758,7 +4661,8 @@ acpi_pm_func(u_long cmd, void *arg, enum power_stype stype) error = EINVAL; goto out; } - if (ACPI_FAILURE(acpi_EnterSleepState(sc, stype))) + sstate = acpi_stype_to_sstate(sc, stype); + if (ACPI_FAILURE(acpi_EnterSleepState(sc, sstate))) error = ENXIO; break; default: diff --git a/sys/dev/acpica/acpi_lid.c b/sys/dev/acpica/acpi_lid.c index fb8755d9f0fe..142791f7282a 100644 --- a/sys/dev/acpica/acpi_lid.c +++ b/sys/dev/acpica/acpi_lid.c @@ -235,9 +235,9 @@ acpi_lid_notify_status_changed(void *arg) sc->lid_status ? "opened" : "closed"); if (sc->lid_status == 0) - EVENTHANDLER_INVOKE(acpi_sleep_event, acpi_sc->acpi_lid_switch_stype); + EVENTHANDLER_INVOKE(acpi_sleep_event, acpi_sc->acpi_lid_switch_sx); else - EVENTHANDLER_INVOKE(acpi_wakeup_event, acpi_sc->acpi_lid_switch_stype); + EVENTHANDLER_INVOKE(acpi_wakeup_event, acpi_sc->acpi_lid_switch_sx); out: ACPI_SERIAL_END(lid); diff --git a/sys/dev/acpica/acpivar.h b/sys/dev/acpica/acpivar.h index 4c789dd3e9f2..fac32d832598 100644 --- a/sys/dev/acpica/acpivar.h +++ b/sys/dev/acpica/acpivar.h @@ -54,19 +54,20 @@ struct acpi_softc { struct cdev *acpi_dev_t; int acpi_enabled; - enum power_stype acpi_stype; + int acpi_sstate; int acpi_sleep_disabled; struct sysctl_ctx_list acpi_sysctl_ctx; struct sysctl_oid *acpi_sysctl_tree; - enum power_stype acpi_power_button_stype; - enum power_stype acpi_sleep_button_stype; - enum power_stype acpi_lid_switch_stype; + int acpi_power_button_sx; + int acpi_sleep_button_sx; + int acpi_lid_switch_sx; int acpi_standby_sx; - int acpi_s4bios; + int acpi_suspend_sx; int acpi_sleep_delay; + int acpi_s4bios; int acpi_do_disable; int acpi_verbose; int acpi_handle_reboot; @@ -74,7 +75,7 @@ struct acpi_softc { vm_offset_t acpi_wakeaddr; vm_paddr_t acpi_wakephys; - enum power_stype acpi_next_stype; /* Next suspend sleep type. */ + int acpi_next_sstate; /* Next suspend Sx state. */ struct apm_clone_data *acpi_clone; /* Pseudo-dev for devd(8). */ STAILQ_HEAD(,apm_clone_data) apm_cdevs; /* All apm/apmctl/acpi cdevs. */ struct callout susp_force_to; /* Force suspend if no acks. */ @@ -411,7 +412,7 @@ ACPI_STATUS acpi_EvaluateOSC(ACPI_HANDLE handle, uint8_t *uuid, uint32_t *caps_out, bool query); ACPI_STATUS acpi_OverrideInterruptLevel(UINT32 InterruptNumber); ACPI_STATUS acpi_SetIntrModel(int model); -int acpi_ReqSleepState(struct acpi_softc *sc, enum power_stype stype); +int acpi_ReqSleepState(struct acpi_softc *sc, int state); int acpi_AckSleepState(struct apm_clone_data *clone, int error); ACPI_STATUS acpi_SetSleepState(struct acpi_softc *sc, int state); int acpi_wake_set_enable(device_t dev, int enable); diff --git a/sys/x86/acpica/acpi_apm.c b/sys/x86/acpica/acpi_apm.c index 8e5785cf0ed6..be161cd6171b 100644 --- a/sys/x86/acpica/acpi_apm.c +++ b/sys/x86/acpica/acpi_apm.c @@ -235,7 +235,7 @@ apmdtor(void *data) acpi_sc = clone->acpi_sc; /* We are about to lose a reference so check if suspend should occur */ - if (acpi_sc->acpi_next_stype != POWER_STYPE_AWAKE && + if (acpi_sc->acpi_next_sstate != 0 && clone->notify_status != APM_EV_ACKED) acpi_AckSleepState(clone, 0); @@ -283,10 +283,10 @@ apmioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, struct thread *td case APMIO_SUSPEND: if ((flag & FWRITE) == 0) return (EPERM); - if (acpi_sc->acpi_next_stype == POWER_STYPE_AWAKE) { - if (power_suspend_stype != POWER_STYPE_POWEROFF) { + if (acpi_sc->acpi_next_sstate == 0) { + if (acpi_sc->acpi_suspend_sx != ACPI_STATE_S5) { error = acpi_ReqSleepState(acpi_sc, - power_suspend_stype); + acpi_sc->acpi_suspend_sx); } else { printf( "power off via apm suspend not supported\n"); @@ -298,10 +298,10 @@ apmioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, struct thread *td case APMIO_STANDBY: if ((flag & FWRITE) == 0) return (EPERM); - if (acpi_sc->acpi_next_stype == POWER_STYPE_AWAKE) { - if (power_standby_stype != POWER_STYPE_POWEROFF) { + if (acpi_sc->acpi_next_sstate == 0) { + if (acpi_sc->acpi_standby_sx != ACPI_STATE_S5) { error = acpi_ReqSleepState(acpi_sc, - power_standby_stype); + acpi_sc->acpi_standby_sx); } else { printf( "power off via apm standby not supported\n"); @@ -313,11 +313,10 @@ apmioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, struct thread *td case APMIO_NEXTEVENT: printf("apm nextevent start\n"); ACPI_LOCK(acpi); - if (acpi_sc->acpi_next_stype != POWER_STYPE_AWAKE && - clone->notify_status == APM_EV_NONE) { + if (acpi_sc->acpi_next_sstate != 0 && clone->notify_status == + APM_EV_NONE) { ev_info = (struct apm_event_info *)addr; - /* XXX Check this. */ - if (acpi_sc->acpi_next_stype == POWER_STYPE_STANDBY) + if (acpi_sc->acpi_next_sstate <= ACPI_STATE_S3) ev_info->type = PMEV_STANDBYREQ; else ev_info->type = PMEV_SUSPENDREQ; @@ -393,7 +392,7 @@ apmpoll(struct cdev *dev, int events, struct thread *td) revents = 0; devfs_get_cdevpriv((void **)&clone); ACPI_LOCK(acpi); - if (clone->acpi_sc->acpi_next_stype != POWER_STYPE_AWAKE) *** 13 LINES SKIPPED *** From nobody Thu Sep 18 13:01:27 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cSG3q6Zwdz68LHW; Thu, 18 Sep 2025 13:01: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 4cSG3q5sBCz3b3m; Thu, 18 Sep 2025 13:01:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758200487; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Gs/IE/VUzGJXzZE+Xwwx4ahAUklmXyUemf2F1TljXZE=; b=eTLAwEJcnWbomP05jCbffLd7sruWsjwIxgRFXp6b8vB01GzZvHXMcL6jBykS+RQHhhswdm cI2eRMuurSP/SIDInktBYVTZeF+LQ1Gs0qyZ4unZxbmN32zAxrJHyb4TybVnpzvfrtxpqR S4pRCsViWqGhdfT5PEIDP0/MLOfEcEPiDDYmBmopH4tJm7+ieyyYo60uw+YPuwN4Di2yC7 1E+TO03f+Aw+QmJtlu5HIGbUt1KuOQQNtS85ysGclrIVsF25a1Av9pDgzX2h4pw0fab+AA FIhWo4zVGkF49H0fnxrISXb921uiaxpjJeVcC95caeoznf+S+WNXMN4KNwqUrQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758200487; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Gs/IE/VUzGJXzZE+Xwwx4ahAUklmXyUemf2F1TljXZE=; b=FaFPTzHGIuOiGjO/WTwixTSpi/4d0mistfJ3MUl7W1ac9jnuDUl1JZqvGnmTJYG16ftwFF 6q9f1O2YWOvmI2xInTwYoxmxlbBsr6V11o6UpRRFUQ5bPaYfePFJlNYuvfBpxy4M5xHgjX jTEGu46xkzVElMPSx8UVemYlvi2TUniHs1GrdJD7nBZeoPUzbST9GrCQ9KA3affwNHlhnM Plaz6YYHmrNB/8mU+bc1/8/wGdE1wJ1B+OclXoEO94jbUIAYJDSQ4X6yVsCcfm6y8AG0PK f5QL0Q+hgxIG6BqA4jz04Oc9bZ2C5DJOdt+sWW7o12ozkWfY4gB3YPVnjAB4Gg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758200487; a=rsa-sha256; cv=none; b=nkRok+K53KSCu+fo211YIJ5DgQdcXYgcXJQjwhsCBdREMjKb6GMy+udiiDrSi3WGGJg+hu sQT43FU4HDwZXt2Cjb3W7DvMsfCoDpBMGoL+2t2+FM/8v23RYk5CvBcG1bOk55ATziQY0y vvh9B5yKer4nBHT+st9CLc3RMU8XfKm2NwyNY3km0wYkmcsqFAXlT6cv+PxabQciHbtLBY rnvgoetLpr8ZxfNWWq7v58xBX8KTm5q0fFfGCvdrm/1wOcjet5YKRtt0FPesMAXUtphadr zduFsvAxFf6KzqRA5hHPlq3N5EPgfgKjd6h6NU8dLS9o3V5UnKyJawXHdx4Wrg== 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 4cSG3q5RpJz1BHq; Thu, 18 Sep 2025 13:01: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 58ID1R5h090556; Thu, 18 Sep 2025 13:01:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58ID1RCH090554; Thu, 18 Sep 2025 13:01:27 GMT (envelope-from git) Date: Thu, 18 Sep 2025 13:01:27 GMT Message-Id: <202509181301.58ID1RCH090554@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: df997faca841 - main - atf_pytest: fix xfail detection from pytest report List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: df997faca8411bdf8008c25de5db3ed719019d21 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=df997faca8411bdf8008c25de5db3ed719019d21 commit df997faca8411bdf8008c25de5db3ed719019d21 Author: Siva Mahadevan AuthorDate: 2025-09-17 20:34:58 +0000 Commit: Ed Maste CommitDate: 2025-09-18 13:01:14 +0000 atf_pytest: fix xfail detection from pytest report The location of the 'wasxfail' attribute was moved from the 'reason' attribute back to the parent 'report'. This fixes an issue where xfails are wrongly reported to ATF as skipped tests. Signed-off-by: Siva Mahadevan Pull-request: https://github.com/freebsd/freebsd-src/pull/1849 Sponsored by: The FreeBSD Foundation --- tests/atf_python/atf_pytest.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/atf_python/atf_pytest.py b/tests/atf_python/atf_pytest.py index 19b5f88fa200..02ed502ace67 100644 --- a/tests/atf_python/atf_pytest.py +++ b/tests/atf_python/atf_pytest.py @@ -256,7 +256,7 @@ class ATFHandler(object): # Record failure & override "skipped" state self.set_report_state(test_name, state, reason) elif state == "skipped": - if hasattr(reason, "wasxfail"): + if hasattr(report, "wasxfail"): # xfail() called in the test body state = "expected_failure" else: @@ -264,7 +264,7 @@ class ATFHandler(object): pass self.set_report_state(test_name, state, reason) elif state == "passed": - if hasattr(reason, "wasxfail"): + if hasattr(report, "wasxfail"): # the test was expected to fail but didn't # mark as hard failure state = "failed" From nobody Thu Sep 18 14:35:32 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cSJ8N2hCLz67Tpx; Thu, 18 Sep 2025 14:35: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 4cSJ8N20Pqz3rsV; Thu, 18 Sep 2025 14:35:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758206132; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=83otVyIY/8Jp7wB+OAtu+b+uCe8GBQDJ8E1r7S4FiI8=; b=M0Pwi9j1POXQnSKRQNu951zUbnV66Qtw4OtCYCYClvemn8qyb8ibyqWnACYvEhHHPG0mjI r6BhofBm5YA4wXwc+ajLsQ93gL0QQGHJOfg1LMAMT7DTUxtFoR28khJ/KOp3oti8XHZssN gC0isCqhooKuCdUIK1xRiVJhw9x1UQ2U38asUCiJ7u8o9fLY7tpNte0JZCDoJeU3GPQJMk XSbP13WSa+2h9OHs1O90aa2e/SCZHrrRkR66dRiVqlnj7eVgdO6SZV9as3E1oorgiaBB2+ +YJ5vVHH7kVhcxxnMkzdRGSaBY3bDDLKKHQp717MaFW9gm5lT8WlJqEWV2/fnw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758206132; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=83otVyIY/8Jp7wB+OAtu+b+uCe8GBQDJ8E1r7S4FiI8=; b=FP2ciyIb0lj0c8YogKPdaGpZIXh7xcXkV8uk89WoJcW8Yhzkd3P4bPssv3oItQoYyIBW4j 0auQfSscp4uevjpyvcARtvNsBJmgBYHpxCV4ewdcxV2fDER9AfULI8/ecVwLN9+xex+iEP MQdBD9Rr4ztK7t5cJ7bINq3Ww5EQAlq/mUEoD0hqMIK0SJbnGAKNtO44QEraZkMh2ELNsn Njunk+zItjOWAnDD0NZ2CmP1fKj11fetryhIxM7IqzBc+PmlnOfLph+9wGnWnUwlXB+rEI xWjGyLCPV5w5BZo1RnMj1Ve5nZoEP2uDXcHJ67Kxde3gbI2lu0wVEFciMmhrPA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758206132; a=rsa-sha256; cv=none; b=ZJ9GLzq5TxuHH792qcrHpnP7qlMznC2TpjXlZtuhPBOzTUysqKOq1mefl63d3TEUDNV0Au nyInjuy99/z6par6PL7SMSLXidjaR1tG1e28U4SYhE41YttV9E8bAWeplrkqNUd+Zvpm7c gExOKZviB0jDrVNaDnIbj7cmWB3FDCsqwWsbl3fSEbimrgt0YlszMJJvOtChAxeR7hVE/j QaQONC6BT+nLEN8RtuHFemxHfhUrnXL3Wa1zPRPasYzxCrKCE3a+Z/HCyICWPK4CT7+wFl lyTsQGqJsz/PRDGh5W1qLgloQazwEoVPgPT5SHzGYhJ8UJ9fF7fJwderzNNOsA== 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 4cSJ8N1PLqztp; Thu, 18 Sep 2025 14:35: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 58IEZWJM061323; Thu, 18 Sep 2025 14:35:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58IEZW8g061320; Thu, 18 Sep 2025 14:35:32 GMT (envelope-from git) Date: Thu, 18 Sep 2025 14:35:32 GMT Message-Id: <202509181435.58IEZW8g061320@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jaeyoon Choi Subject: git: 380e4a8233c8 - main - committers-src: add myself (jaeyoon@) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jaeyoon X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 380e4a8233c8e17877b0bcdfb8003b3e9638071b Auto-Submitted: auto-generated The branch main has been updated by jaeyoon: URL: https://cgit.FreeBSD.org/src/commit/?id=380e4a8233c8e17877b0bcdfb8003b3e9638071b commit 380e4a8233c8e17877b0bcdfb8003b3e9638071b Author: Jaeyoon Choi AuthorDate: 2025-09-18 14:31:07 +0000 Commit: Jaeyoon Choi CommitDate: 2025-09-18 14:34:52 +0000 committers-src: add myself (jaeyoon@) Add myself (jaeyoon@) as a new src committer with imp@ as my mentor. Reviewed by: imp (mentor) Approved by: imp (mentor) Differential Revision: https://reviews.freebsd.org/D52570 --- share/misc/committers-src.dot | 2 ++ 1 file changed, 2 insertions(+) diff --git a/share/misc/committers-src.dot b/share/misc/committers-src.dot index 73d142b875f2..6035dd031216 100644 --- a/share/misc/committers-src.dot +++ b/share/misc/committers-src.dot @@ -211,6 +211,7 @@ igoro [label="Igor Ostapenko\nigoro@FreeBSD.org\n2024/08/22"] imp [label="Warner Losh\nimp@FreeBSD.org\n1996/09/20"] ivoras [label="Ivan Voras\nivoras@FreeBSD.org\n2008/06/10"] ivy [label="Lexi Winter\nivy@FreeBSD.org\n2025/04/18"] +jaeyoon [label="Jaeyoon Choi\njaeyoon@FreeBSD.org\n2025/09/09"] jah [label="Jason A. Harmening\njah@FreeBSD.org\n2015/03/08"] jamie [label="Jamie Gritton\njamie@FreeBSD.org\n2009/01/28"] jasone [label="Jason Evans\njasone@FreeBSD.org\n1999/03/03"] @@ -642,6 +643,7 @@ imp -> toshi imp -> tsoome imp -> uch imp -> vexeduxr +imp -> jaeyoon jake -> bms jake -> gordon From nobody Thu Sep 18 14:42:04 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cSJHw3Sqzz67Tr7; Thu, 18 Sep 2025 14:42:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cSJHw2rk2z3s6J; Thu, 18 Sep 2025 14:42:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758206524; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=P0S+VvjU3P5YYEdyc2qgdstKcU5beesa6IKj0CysRgc=; b=R+Ec3YpRBV2uMR9BVEx1tlFJJqFmx6aRl9ypMqGaEW8clITtIVtC/cPpJ4L1DEmSxiLHCr L2TALN4IazLp1OdaFVf+cNv1M80ubNZn/WEUQczs7b4a0iCsQNjsEBAXARMCW3VuACphcg Y3pka3sV5KfWfQeH5WkUpTzJayqlpb8le2jNyElE0RrFIkOdSvYk/0Jtovf6NOpfbON9L6 deFgdpvnm8adnNbc2eP2pRXsty2FffuzlM6xY2zjQB4Yu/uQM+POsLfsCdbh4uHKkNdk0M TA1rDib3dHeQ34X2iAiV3N4xuLC37JNxMrU7ahbj1fHdKg5rs3UGNyXqFDuf1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758206524; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=P0S+VvjU3P5YYEdyc2qgdstKcU5beesa6IKj0CysRgc=; b=q9tQ6NcRmPxpo3pyU1VtBfAuOOQjsfwX6/3QqoP3TGXlPTbWLHfBh6M8gWliI70yXKdDF4 +H+Ab9ehrgtPa7/Nbnqf8eeHWVQftNUVXZCz0RzKBYqQErANDsP6x55HcfNEXtAJIa1lkB jaXCpRlMjQAMMrbKcLTDxOF92tCOb79LVIGrYaorXN0mmSfUVsS0ZQr8yWsgxHlVhmAsbR M5upo1sy6JKCPGAukBRjG1S09hoBW4DnQTvaKvz2G+at9gogL11VPK5k4mk0bLZ5xmLzI0 CfAEwpcbie6P1QgzXjo3umK3BKIG+qnSYyCubs3c1FHA7ilIQAJS5/rk5oitiw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758206524; a=rsa-sha256; cv=none; b=o09smn/3mIHR6O7vO0BrTajdiVJ1EP6EPbr+MDV0H89Uv/PoocxYoyjA7dYu41q5ChYCbg BWxzvelzDxBr1fF3zNMZpPgdM+iPnsyW8/VVvBwgWWwWf2+EwJP3M7XiTtOE9KtqJnSDtl tCNrpELZZqD8WvDYVEvuxJi/i4J3jNqlJYRXnsatzfMmFCTvRvq7NILtc/6a/hphw227ZY VkU5kFZERde5wufkWSo8skmKApUx/7Xp0+RfWeZZ2rGa3+UwsTqmfd+J+2Woq+vGNrvikb AGz3s6CKekqFp/3KJh/+NxrVg6JWcDUH49KD/jcoEF9yYELDLuXhaMIwzquZVg== 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 4cSJHw2QxLzvL; Thu, 18 Sep 2025 14:42: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 58IEg4el077835; Thu, 18 Sep 2025 14:42:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58IEg4UQ077832; Thu, 18 Sep 2025 14:42:04 GMT (envelope-from git) Date: Thu, 18 Sep 2025 14:42:04 GMT Message-Id: <202509181442.58IEg4UQ077832@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jaeyoon Choi Subject: git: 6b841d70960a - main - ufshci: revisit controller reset path and add I/O timeout handling List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jaeyoon X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6b841d70960a3a0ec4e43392683053878c403f9c Auto-Submitted: auto-generated The branch main has been updated by jaeyoon: URL: https://cgit.FreeBSD.org/src/commit/?id=6b841d70960a3a0ec4e43392683053878c403f9c commit 6b841d70960a3a0ec4e43392683053878c403f9c Author: Jaeyoon Choi AuthorDate: 2025-09-18 14:37:08 +0000 Commit: Jaeyoon Choi CommitDate: 2025-09-18 14:41:47 +0000 ufshci: revisit controller reset path and add I/O timeout handling This patch revisits the controller reset path and introduces timeout handling for I/O commands. To support controller reset during driver operation, the controller’s construct, destruct, enable, and disable functions are clearly separated in ufshci_ctrlr.c. ufshci_ctrlr_hw_reset() function is added to leverage enable/disable. After initialization, ufshci_ctrlr_reset_task() is also introduced to ensure controller resets are performed via the task queue. Timeout handling is designed in five steps. This patch implements Step 1 and Step 5, while the remaining steps will be added later. The timeout mechanism follows the same shared timeout model used in the NVMe driver. Test: Intentionally delayed UPIU I/O in QEMU to trigger a timeout and verify timeout handling. Sponsored by: Samsung Electronics Reviewed by: imp (mentor) Differential Revision: https://reviews.freebsd.org/D52440 --- sys/dev/ufshci/ufshci_ctrlr.c | 399 +++++++++++++++++++++++--------------- sys/dev/ufshci/ufshci_ctrlr_cmd.c | 2 +- sys/dev/ufshci/ufshci_dev.c | 1 - sys/dev/ufshci/ufshci_pci.c | 3 +- sys/dev/ufshci/ufshci_private.h | 41 +++- sys/dev/ufshci/ufshci_req_queue.c | 292 ++++++++++++++++++++++++++-- sys/dev/ufshci/ufshci_req_sdb.c | 77 +++++++- sys/dev/ufshci/ufshci_sim.c | 1 - 8 files changed, 633 insertions(+), 183 deletions(-) diff --git a/sys/dev/ufshci/ufshci_ctrlr.c b/sys/dev/ufshci/ufshci_ctrlr.c index 36be94b8b8b7..35663b480cfa 100644 --- a/sys/dev/ufshci/ufshci_ctrlr.c +++ b/sys/dev/ufshci/ufshci_ctrlr.c @@ -12,8 +12,108 @@ #include "ufshci_private.h" #include "ufshci_reg.h" +static void +ufshci_ctrlr_fail(struct ufshci_controller *ctrlr) +{ + ctrlr->is_failed = true; + + ufshci_req_queue_fail(ctrlr, + ctrlr->task_mgmt_req_queue.qops.get_hw_queue( + &ctrlr->task_mgmt_req_queue)); + ufshci_req_queue_fail(ctrlr, + ctrlr->transfer_req_queue.qops.get_hw_queue( + &ctrlr->transfer_req_queue)); +} + +static void +ufshci_ctrlr_start(struct ufshci_controller *ctrlr, bool resetting) +{ + TSENTER(); + + /* + * If `resetting` is true, we are on the reset path. + * Re-enable request queues here because ufshci_ctrlr_reset_task() + * disables them during reset. + */ + if (resetting) { + if (ufshci_utmr_req_queue_enable(ctrlr) != 0) { + ufshci_ctrlr_fail(ctrlr); + return; + } + if (ufshci_utr_req_queue_enable(ctrlr) != 0) { + ufshci_ctrlr_fail(ctrlr); + return; + } + } + + if (ufshci_ctrlr_send_nop(ctrlr) != 0) { + ufshci_ctrlr_fail(ctrlr); + return; + } + + /* Initialize UFS target drvice */ + if (ufshci_dev_init(ctrlr) != 0) { + ufshci_ctrlr_fail(ctrlr); + return; + } + + /* Initialize Reference Clock */ + if (ufshci_dev_init_reference_clock(ctrlr) != 0) { + ufshci_ctrlr_fail(ctrlr); + return; + } + + /* Initialize unipro */ + if (ufshci_dev_init_unipro(ctrlr) != 0) { + ufshci_ctrlr_fail(ctrlr); + return; + } + + /* + * Initialize UIC Power Mode + * QEMU UFS devices do not support unipro and power mode. + */ + if (!(ctrlr->quirks & UFSHCI_QUIRK_IGNORE_UIC_POWER_MODE) && + ufshci_dev_init_uic_power_mode(ctrlr) != 0) { + ufshci_ctrlr_fail(ctrlr); + return; + } + + /* Initialize UFS Power Mode */ + if (ufshci_dev_init_ufs_power_mode(ctrlr) != 0) { + ufshci_ctrlr_fail(ctrlr); + return; + } + + /* Read Controller Descriptor (Device, Geometry) */ + if (ufshci_dev_get_descriptor(ctrlr) != 0) { + ufshci_ctrlr_fail(ctrlr); + return; + } + + if (ufshci_dev_config_write_booster(ctrlr)) { + ufshci_ctrlr_fail(ctrlr); + return; + } + + /* TODO: Configure Write Protect */ + + /* TODO: Configure Background Operations */ + + /* + * If the reset is due to a timeout, it is already attached to the SIM + * and does not need to be attached again. + */ + if (!resetting && ufshci_sim_attach(ctrlr) != 0) { + ufshci_ctrlr_fail(ctrlr); + return; + } + + TSEXIT(); +} + static int -ufshci_ctrlr_enable_host_ctrlr(struct ufshci_controller *ctrlr) +ufshci_ctrlr_disable_host_ctrlr(struct ufshci_controller *ctrlr) { int timeout = ticks + MSEC_2_TICKS(ctrlr->device_init_timeout_in_ms); sbintime_t delta_t = SBT_1US; @@ -27,6 +127,35 @@ ufshci_ctrlr_enable_host_ctrlr(struct ufshci_controller *ctrlr) ufshci_mmio_write_4(ctrlr, hce, hce); } + /* Wait for the HCE flag to change */ + while (1) { + hce = ufshci_mmio_read_4(ctrlr, hce); + if (!UFSHCIV(UFSHCI_HCE_REG_HCE, hce)) + break; + if (timeout - ticks < 0) { + ufshci_printf(ctrlr, + "host controller failed to disable " + "within %d ms\n", + ctrlr->device_init_timeout_in_ms); + return (ENXIO); + } + + pause_sbt("ufshci_disable_hce", delta_t, 0, C_PREL(1)); + delta_t = min(SBT_1MS, delta_t * 3 / 2); + } + + return (0); +} + +static int +ufshci_ctrlr_enable_host_ctrlr(struct ufshci_controller *ctrlr) +{ + int timeout = ticks + MSEC_2_TICKS(ctrlr->device_init_timeout_in_ms); + sbintime_t delta_t = SBT_1US; + uint32_t hce; + + hce = ufshci_mmio_read_4(ctrlr, hce); + /* Enable UFS host controller */ hce |= UFSHCIM(UFSHCI_HCE_REG_HCE); ufshci_mmio_write_4(ctrlr, hce, hce); @@ -36,7 +165,7 @@ ufshci_ctrlr_enable_host_ctrlr(struct ufshci_controller *ctrlr) * unstable, so we need to read the HCE value after some time after * initialization is complete. */ - pause_sbt("ufshci_hce", ustosbt(100), 0, C_PREL(1)); + pause_sbt("ufshci_enable_hce", ustosbt(100), 0, C_PREL(1)); /* Wait for the HCE flag to change */ while (1) { @@ -51,17 +180,103 @@ ufshci_ctrlr_enable_host_ctrlr(struct ufshci_controller *ctrlr) return (ENXIO); } - pause_sbt("ufshci_hce", delta_t, 0, C_PREL(1)); + pause_sbt("ufshci_enable_hce", delta_t, 0, C_PREL(1)); delta_t = min(SBT_1MS, delta_t * 3 / 2); } return (0); } +static int +ufshci_ctrlr_disable(struct ufshci_controller *ctrlr) +{ + int error; + + /* Disable all interrupts */ + ufshci_mmio_write_4(ctrlr, ie, 0); + + error = ufshci_ctrlr_disable_host_ctrlr(ctrlr); + return (error); +} + +static int +ufshci_ctrlr_enable(struct ufshci_controller *ctrlr) +{ + uint32_t ie, hcs; + int error; + + error = ufshci_ctrlr_enable_host_ctrlr(ctrlr); + if (error) + return (error); + + /* Send DME_LINKSTARTUP command to start the link startup procedure */ + error = ufshci_uic_send_dme_link_startup(ctrlr); + if (error) + return (error); + + /* + * The device_present(UFSHCI_HCS_REG_DP) bit becomes true if the host + * controller has successfully received a Link Startup UIC command + * response and the UFS device has found a physical link to the + * controller. + */ + hcs = ufshci_mmio_read_4(ctrlr, hcs); + if (!UFSHCIV(UFSHCI_HCS_REG_DP, hcs)) { + ufshci_printf(ctrlr, "UFS device not found\n"); + return (ENXIO); + } + + /* Enable additional interrupts by programming the IE register. */ + ie = ufshci_mmio_read_4(ctrlr, ie); + ie |= UFSHCIM(UFSHCI_IE_REG_UTRCE); /* UTR Completion */ + ie |= UFSHCIM(UFSHCI_IE_REG_UEE); /* UIC Error */ + ie |= UFSHCIM(UFSHCI_IE_REG_UTMRCE); /* UTMR Completion */ + ie |= UFSHCIM(UFSHCI_IE_REG_DFEE); /* Device Fatal Error */ + ie |= UFSHCIM(UFSHCI_IE_REG_UTPEE); /* UTP Error */ + ie |= UFSHCIM(UFSHCI_IE_REG_HCFEE); /* Host Ctrlr Fatal Error */ + ie |= UFSHCIM(UFSHCI_IE_REG_SBFEE); /* System Bus Fatal Error */ + ie |= UFSHCIM(UFSHCI_IE_REG_CEFEE); /* Crypto Engine Fatal Error */ + ufshci_mmio_write_4(ctrlr, ie, ie); + + /* TODO: Initialize interrupt Aggregation Control Register (UTRIACR) */ + + return (0); +} + +static int +ufshci_ctrlr_hw_reset(struct ufshci_controller *ctrlr) +{ + int error; + + error = ufshci_ctrlr_disable(ctrlr); + if (error) + return (error); + + error = ufshci_ctrlr_enable(ctrlr); + return (error); +} + +static void +ufshci_ctrlr_reset_task(void *arg, int pending) +{ + struct ufshci_controller *ctrlr = arg; + int error; + + /* Release resources */ + ufshci_utmr_req_queue_disable(ctrlr); + ufshci_utr_req_queue_disable(ctrlr); + + error = ufshci_ctrlr_hw_reset(ctrlr); + if (error) + return (ufshci_ctrlr_fail(ctrlr)); + + ufshci_ctrlr_start(ctrlr, true); +} + int ufshci_ctrlr_construct(struct ufshci_controller *ctrlr, device_t dev) { - uint32_t ver, cap, hcs, ie, ahit; + uint32_t ver, cap, ahit; uint32_t timeout_period, retry_count; int error; @@ -114,16 +329,15 @@ ufshci_ctrlr_construct(struct ufshci_controller *ctrlr, device_t dev) TUNABLE_INT_FETCH("hw.ufshci.retry_count", &retry_count); ctrlr->retry_count = retry_count; - /* Disable all interrupts */ - ufshci_mmio_write_4(ctrlr, ie, 0); - - /* Enable Host Controller */ - error = ufshci_ctrlr_enable_host_ctrlr(ctrlr); - if (error) - return (error); + ctrlr->enable_aborts = 1; + if (ctrlr->quirks & UFSHCI_QUIRK_NOT_SUPPORT_ABORT_TASK) + ctrlr->enable_aborts = 0; + else + TUNABLE_INT_FETCH("hw.ufshci.enable_aborts", + &ctrlr->enable_aborts); - /* Send DME_LINKSTARTUP command to start the link startup procedure */ - error = ufshci_uic_send_dme_link_startup(ctrlr); + /* Reset the UFSHCI controller */ + error = ufshci_ctrlr_hw_reset(ctrlr); if (error) return (error); @@ -134,18 +348,6 @@ ufshci_ctrlr_construct(struct ufshci_controller *ctrlr, device_t dev) ahit = 0; ufshci_mmio_write_4(ctrlr, ahit, ahit); - /* - * The device_present(UFSHCI_HCS_REG_DP) bit becomes true if the host - * controller has successfully received a Link Startup UIC command - * response and the UFS device has found a physical link to the - * controller. - */ - hcs = ufshci_mmio_read_4(ctrlr, hcs); - if (!UFSHCIV(UFSHCI_HCS_REG_DP, hcs)) { - ufshci_printf(ctrlr, "UFS device not found\n"); - return (ENXIO); - } - /* Allocate and initialize UTP Task Management Request List. */ error = ufshci_utmr_req_queue_construct(ctrlr); if (error) @@ -156,27 +358,21 @@ ufshci_ctrlr_construct(struct ufshci_controller *ctrlr, device_t dev) if (error) return (error); - /* Enable additional interrupts by programming the IE register. */ - ie = ufshci_mmio_read_4(ctrlr, ie); - ie |= UFSHCIM(UFSHCI_IE_REG_UTRCE); /* UTR Completion */ - ie |= UFSHCIM(UFSHCI_IE_REG_UEE); /* UIC Error */ - ie |= UFSHCIM(UFSHCI_IE_REG_UTMRCE); /* UTMR Completion */ - ie |= UFSHCIM(UFSHCI_IE_REG_DFEE); /* Device Fatal Error */ - ie |= UFSHCIM(UFSHCI_IE_REG_UTPEE); /* UTP Error */ - ie |= UFSHCIM(UFSHCI_IE_REG_HCFEE); /* Host Ctrlr Fatal Error */ - ie |= UFSHCIM(UFSHCI_IE_REG_SBFEE); /* System Bus Fatal Error */ - ie |= UFSHCIM(UFSHCI_IE_REG_CEFEE); /* Crypto Engine Fatal Error */ - ufshci_mmio_write_4(ctrlr, ie, ie); - - /* TODO: Initialize interrupt Aggregation Control Register (UTRIACR) */ - /* TODO: Separate IO and Admin slot */ + /* * max_hw_pend_io is the number of slots in the transfer_req_queue. * Reduce num_entries by one to reserve an admin slot. */ ctrlr->max_hw_pend_io = ctrlr->transfer_req_queue.num_entries - 1; + /* Create a thread for the taskqueue. */ + ctrlr->taskqueue = taskqueue_create("ufshci_taskq", M_WAITOK, + taskqueue_thread_enqueue, &ctrlr->taskqueue); + taskqueue_start_threads(&ctrlr->taskqueue, 1, PI_DISK, "ufshci taskq"); + + TASK_INIT(&ctrlr->reset_task, 0, ufshci_ctrlr_reset_task, ctrlr); + return (0); } @@ -208,50 +404,21 @@ ufshci_ctrlr_destruct(struct ufshci_controller *ctrlr, device_t dev) bus_release_resource(dev, SYS_RES_MEMORY, ctrlr->resource_id, ctrlr->resource); nores: + KASSERT(!mtx_owned(&ctrlr->uic_cmd_lock), + ("destroying uic_cmd_lock while still owned")); mtx_destroy(&ctrlr->uic_cmd_lock); + + KASSERT(!mtx_owned(&ctrlr->sc_mtx), + ("destroying sc_mtx while still owned")); mtx_destroy(&ctrlr->sc_mtx); return; } -int +void ufshci_ctrlr_reset(struct ufshci_controller *ctrlr) { - uint32_t ie; - int error; - - /* Backup and disable all interrupts */ - ie = ufshci_mmio_read_4(ctrlr, ie); - ufshci_mmio_write_4(ctrlr, ie, 0); - - /* Release resources */ - ufshci_utmr_req_queue_destroy(ctrlr); - ufshci_utr_req_queue_destroy(ctrlr); - - /* Reset Host Controller */ - error = ufshci_ctrlr_enable_host_ctrlr(ctrlr); - if (error) - return (error); - - /* Send DME_LINKSTARTUP command to start the link startup procedure */ - error = ufshci_uic_send_dme_link_startup(ctrlr); - if (error) - return (error); - - /* Enable interrupts */ - ufshci_mmio_write_4(ctrlr, ie, ie); - - /* Allocate and initialize UTP Task Management Request List. */ - error = ufshci_utmr_req_queue_construct(ctrlr); - if (error) - return (error); - - /* Allocate and initialize UTP Transfer Request List or SQ/CQ. */ - error = ufshci_utr_req_queue_construct(ctrlr); - if (error) - return (error); - - return (0); + taskqueue_enqueue(ctrlr->taskqueue, &ctrlr->reset_task); } int @@ -295,84 +462,6 @@ ufshci_ctrlr_send_nop(struct ufshci_controller *ctrlr) return (0); } -static void -ufshci_ctrlr_fail(struct ufshci_controller *ctrlr, bool admin_also) -{ - printf("ufshci(4): ufshci_ctrlr_fail\n"); - - ctrlr->is_failed = true; - - /* TODO: task_mgmt_req_queue should be handled as fail */ - - ufshci_req_queue_fail(ctrlr, - &ctrlr->transfer_req_queue.hwq[UFSHCI_SDB_Q]); -} - -static void -ufshci_ctrlr_start(struct ufshci_controller *ctrlr) -{ - TSENTER(); - - if (ufshci_ctrlr_send_nop(ctrlr) != 0) { - ufshci_ctrlr_fail(ctrlr, false); - return; - } - - /* Initialize UFS target drvice */ - if (ufshci_dev_init(ctrlr) != 0) { - ufshci_ctrlr_fail(ctrlr, false); - return; - } - - /* Initialize Reference Clock */ - if (ufshci_dev_init_reference_clock(ctrlr) != 0) { - ufshci_ctrlr_fail(ctrlr, false); - return; - } - - /* Initialize unipro */ - if (ufshci_dev_init_unipro(ctrlr) != 0) { - ufshci_ctrlr_fail(ctrlr, false); - return; - } - - /* - * Initialize UIC Power Mode - * QEMU UFS devices do not support unipro and power mode. - */ - if (!(ctrlr->quirks & UFSHCI_QUIRK_IGNORE_UIC_POWER_MODE) && - ufshci_dev_init_uic_power_mode(ctrlr) != 0) { - ufshci_ctrlr_fail(ctrlr, false); - return; - } - - /* Initialize UFS Power Mode */ - if (ufshci_dev_init_ufs_power_mode(ctrlr) != 0) { - ufshci_ctrlr_fail(ctrlr, false); - return; - } - - /* Read Controller Descriptor (Device, Geometry) */ - if (ufshci_dev_get_descriptor(ctrlr) != 0) { - ufshci_ctrlr_fail(ctrlr, false); - return; - } - - if (ufshci_dev_config_write_booster(ctrlr)) { - ufshci_ctrlr_fail(ctrlr, false); - return; - } - - /* TODO: Configure Background Operations */ - - if (ufshci_sim_attach(ctrlr) != 0) { - ufshci_ctrlr_fail(ctrlr, false); - return; - } - - TSEXIT(); -} - void ufshci_ctrlr_start_config_hook(void *arg) { @@ -382,9 +471,9 @@ ufshci_ctrlr_start_config_hook(void *arg) if (ufshci_utmr_req_queue_enable(ctrlr) == 0 && ufshci_utr_req_queue_enable(ctrlr) == 0) - ufshci_ctrlr_start(ctrlr); + ufshci_ctrlr_start(ctrlr, false); else - ufshci_ctrlr_fail(ctrlr, false); + ufshci_ctrlr_fail(ctrlr); ufshci_sysctl_initialize_ctrlr(ctrlr); config_intrhook_disestablish(&ctrlr->config_hook); diff --git a/sys/dev/ufshci/ufshci_ctrlr_cmd.c b/sys/dev/ufshci/ufshci_ctrlr_cmd.c index 71d163d998af..253f31a93c2e 100644 --- a/sys/dev/ufshci/ufshci_ctrlr_cmd.c +++ b/sys/dev/ufshci/ufshci_ctrlr_cmd.c @@ -15,7 +15,7 @@ ufshci_ctrlr_cmd_send_task_mgmt_request(struct ufshci_controller *ctrlr, struct ufshci_request *req; struct ufshci_task_mgmt_request_upiu *upiu; - req = ufshci_allocate_request_vaddr(NULL, 0, M_WAITOK, cb_fn, cb_arg); + req = ufshci_allocate_request_vaddr(NULL, 0, M_NOWAIT, cb_fn, cb_arg); req->request_size = sizeof(struct ufshci_task_mgmt_request_upiu); req->response_size = sizeof(struct ufshci_task_mgmt_response_upiu); diff --git a/sys/dev/ufshci/ufshci_dev.c b/sys/dev/ufshci/ufshci_dev.c index dd196b1d638b..975468e5156f 100644 --- a/sys/dev/ufshci/ufshci_dev.c +++ b/sys/dev/ufshci/ufshci_dev.c @@ -774,4 +774,3 @@ out: ufshci_dev_disable_write_booster(ctrlr); return (error); } - diff --git a/sys/dev/ufshci/ufshci_pci.c b/sys/dev/ufshci/ufshci_pci.c index d64b7526f713..992026fd4f4d 100644 --- a/sys/dev/ufshci/ufshci_pci.c +++ b/sys/dev/ufshci/ufshci_pci.c @@ -49,7 +49,8 @@ static struct _pcsid { uint32_t ref_clk; uint32_t quirks; } pci_ids[] = { { 0x131b36, "QEMU UFS Host Controller", UFSHCI_REF_CLK_19_2MHz, - UFSHCI_QUIRK_IGNORE_UIC_POWER_MODE }, + UFSHCI_QUIRK_IGNORE_UIC_POWER_MODE | + UFSHCI_QUIRK_NOT_SUPPORT_ABORT_TASK }, { 0x98fa8086, "Intel Lakefield UFS Host Controller", UFSHCI_REF_CLK_19_2MHz, UFSHCI_QUIRK_LONG_PEER_PA_TACTIVATE | diff --git a/sys/dev/ufshci/ufshci_private.h b/sys/dev/ufshci/ufshci_private.h index 2e033f84c373..ec388c06e248 100644 --- a/sys/dev/ufshci/ufshci_private.h +++ b/sys/dev/ufshci/ufshci_private.h @@ -68,7 +68,6 @@ struct ufshci_request { bool is_admin; int32_t retries; bool payload_valid; - bool timeout; bool spare[2]; /* Future use */ STAILQ_ENTRY(ufshci_request) stailq; }; @@ -82,6 +81,7 @@ enum ufshci_slot_state { }; struct ufshci_tracker { + TAILQ_ENTRY(ufshci_tracker) tailq; struct ufshci_request *req; struct ufshci_req_queue *req_queue; struct ufshci_hw_queue *hwq; @@ -121,6 +121,8 @@ struct ufshci_qops { struct ufshci_req_queue *req_queue); int (*enable)(struct ufshci_controller *ctrlr, struct ufshci_req_queue *req_queue); + void (*disable)(struct ufshci_controller *ctrlr, + struct ufshci_req_queue *req_queue); int (*reserve_slot)(struct ufshci_req_queue *req_queue, struct ufshci_tracker **tr); int (*reserve_admin_slot)(struct ufshci_req_queue *req_queue, @@ -137,16 +139,27 @@ struct ufshci_qops { #define UFSHCI_SDB_Q 0 /* Queue number for a single doorbell queue */ +enum ufshci_recovery { + RECOVERY_NONE = 0, /* Normal operations */ + RECOVERY_WAITING, /* waiting for the reset to complete */ +}; + /* * Generic queue container used by both SDB (fixed 32-slot bitmap) and MCQ * (ring buffer) modes. Fields are shared; some such as sq_head, sq_tail and * cq_head are not used in SDB but used in MCQ. */ struct ufshci_hw_queue { + struct ufshci_controller *ctrlr; + struct ufshci_req_queue *req_queue; uint32_t id; int domain; int cpu; + struct callout timer; /* recovery lock */ + bool timer_armed; /* recovery lock */ + enum ufshci_recovery recovery_state; /* recovery lock */ + union { struct ufshci_utp_xfer_req_desc *utrd; struct ufshci_utp_task_mgmt_req_desc *utmrd; @@ -161,6 +174,9 @@ struct ufshci_hw_queue { uint32_t num_entries; uint32_t num_trackers; + TAILQ_HEAD(, ufshci_tracker) free_tr; + TAILQ_HEAD(, ufshci_tracker) outstanding_tr; + /* * A Request List using the single doorbell method uses a dedicated * ufshci_tracker, one per slot. @@ -177,7 +193,13 @@ struct ufshci_hw_queue { int64_t num_retries; int64_t num_failures; + /* + * Each lock may be acquired independently. + * When both are required, acquire them in this order to avoid + * deadlocks. (recovery_lock -> qlock) + */ struct mtx_padalign qlock; + struct mtx_padalign recovery_lock; }; struct ufshci_req_queue { @@ -242,6 +264,9 @@ struct ufshci_controller { 4 /* Need to wait 1250us after power mode change */ #define UFSHCI_QUIRK_CHANGE_LANE_AND_GEAR_SEPARATELY \ 8 /* Need to change the number of lanes before changing HS-GEAR. */ +#define UFSHCI_QUIRK_NOT_SUPPORT_ABORT_TASK \ + 16 /* QEMU does not support Task Management Request */ + uint32_t ref_clk; struct cam_sim *ufshci_sim; @@ -264,6 +289,9 @@ struct ufshci_controller { /* Fields for tracking progress during controller initialization. */ struct intr_config_hook config_hook; + struct task reset_task; + struct taskqueue *taskqueue; + /* For shared legacy interrupt. */ int rid; struct resource *res; @@ -272,6 +300,8 @@ struct ufshci_controller { uint32_t major_version; uint32_t minor_version; + uint32_t enable_aborts; + uint32_t num_io_queues; uint32_t max_hw_pend_io; @@ -345,7 +375,7 @@ void ufshci_sim_detach(struct ufshci_controller *ctrlr); /* Controller */ int ufshci_ctrlr_construct(struct ufshci_controller *ctrlr, device_t dev); void ufshci_ctrlr_destruct(struct ufshci_controller *ctrlr, device_t dev); -int ufshci_ctrlr_reset(struct ufshci_controller *ctrlr); +void ufshci_ctrlr_reset(struct ufshci_controller *ctrlr); /* ctrlr defined as void * to allow use with config_intrhook. */ void ufshci_ctrlr_start_config_hook(void *arg); void ufshci_ctrlr_poll(struct ufshci_controller *ctrlr); @@ -388,7 +418,9 @@ int ufshci_utmr_req_queue_construct(struct ufshci_controller *ctrlr); int ufshci_utr_req_queue_construct(struct ufshci_controller *ctrlr); void ufshci_utmr_req_queue_destroy(struct ufshci_controller *ctrlr); void ufshci_utr_req_queue_destroy(struct ufshci_controller *ctrlr); +void ufshci_utmr_req_queue_disable(struct ufshci_controller *ctrlr); int ufshci_utmr_req_queue_enable(struct ufshci_controller *ctrlr); +void ufshci_utr_req_queue_disable(struct ufshci_controller *ctrlr); int ufshci_utr_req_queue_enable(struct ufshci_controller *ctrlr); void ufshci_req_queue_fail(struct ufshci_controller *ctrlr, struct ufshci_hw_queue *hwq); @@ -404,6 +436,8 @@ void ufshci_req_sdb_destroy(struct ufshci_controller *ctrlr, struct ufshci_req_queue *req_queue); struct ufshci_hw_queue *ufshci_req_sdb_get_hw_queue( struct ufshci_req_queue *req_queue); +void ufshci_req_sdb_disable(struct ufshci_controller *ctrlr, + struct ufshci_req_queue *req_queue); int ufshci_req_sdb_enable(struct ufshci_controller *ctrlr, struct ufshci_req_queue *req_queue); int ufshci_req_sdb_reserve_slot(struct ufshci_req_queue *req_queue, @@ -489,13 +523,12 @@ _ufshci_allocate_request(const int how, ufshci_cb_fn_t cb_fn, void *cb_arg) struct ufshci_request *req; KASSERT(how == M_WAITOK || how == M_NOWAIT, - ("nvme_allocate_request: invalid how %d", how)); + ("ufshci_allocate_request: invalid how %d", how)); req = malloc(sizeof(*req), M_UFSHCI, how | M_ZERO); if (req != NULL) { req->cb_fn = cb_fn; req->cb_arg = cb_arg; - req->timeout = true; } return (req); } diff --git a/sys/dev/ufshci/ufshci_req_queue.c b/sys/dev/ufshci/ufshci_req_queue.c index bb6efa6d2ccc..7aa164d00bec 100644 --- a/sys/dev/ufshci/ufshci_req_queue.c +++ b/sys/dev/ufshci/ufshci_req_queue.c @@ -24,6 +24,7 @@ static const struct ufshci_qops sdb_utmr_qops = { .destroy = ufshci_req_sdb_destroy, .get_hw_queue = ufshci_req_sdb_get_hw_queue, .enable = ufshci_req_sdb_enable, + .disable = ufshci_req_sdb_disable, .reserve_slot = ufshci_req_sdb_reserve_slot, .reserve_admin_slot = ufshci_req_sdb_reserve_slot, .ring_doorbell = ufshci_req_sdb_utmr_ring_doorbell, @@ -38,6 +39,7 @@ static const struct ufshci_qops sdb_utr_qops = { .destroy = ufshci_req_sdb_destroy, .get_hw_queue = ufshci_req_sdb_get_hw_queue, .enable = ufshci_req_sdb_enable, + .disable = ufshci_req_sdb_disable, .reserve_slot = ufshci_req_sdb_reserve_slot, .reserve_admin_slot = ufshci_req_sdb_reserve_slot, .ring_doorbell = ufshci_req_sdb_utr_ring_doorbell, @@ -74,6 +76,13 @@ ufshci_utmr_req_queue_destroy(struct ufshci_controller *ctrlr) &ctrlr->task_mgmt_req_queue); } +void +ufshci_utmr_req_queue_disable(struct ufshci_controller *ctrlr) +{ + ctrlr->task_mgmt_req_queue.qops.disable(ctrlr, + &ctrlr->task_mgmt_req_queue); +} + int ufshci_utmr_req_queue_enable(struct ufshci_controller *ctrlr) { @@ -109,6 +118,13 @@ ufshci_utr_req_queue_destroy(struct ufshci_controller *ctrlr) &ctrlr->transfer_req_queue); } +void +ufshci_utr_req_queue_disable(struct ufshci_controller *ctrlr) +{ + ctrlr->transfer_req_queue.qops.disable(ctrlr, + &ctrlr->transfer_req_queue); +} + int ufshci_utr_req_queue_enable(struct ufshci_controller *ctrlr) { @@ -226,31 +242,30 @@ void ufshci_req_queue_complete_tracker(struct ufshci_tracker *tr) { struct ufshci_req_queue *req_queue = tr->req_queue; + struct ufshci_hw_queue *hwq = tr->hwq; struct ufshci_request *req = tr->req; struct ufshci_completion cpl; uint8_t ocs; bool retry, error, retriable; - mtx_assert(&tr->hwq->qlock, MA_NOTOWNED); + mtx_assert(&hwq->qlock, MA_NOTOWNED); /* Copy the response from the Request Descriptor or UTP Command * Descriptor. */ + cpl.size = tr->response_size; if (req_queue->is_task_mgmt) { - cpl.size = tr->response_size; memcpy(&cpl.response_upiu, - (void *)tr->hwq->utmrd[tr->slot_num].response_upiu, - cpl.size); + (void *)hwq->utmrd[tr->slot_num].response_upiu, cpl.size); - ocs = tr->hwq->utmrd[tr->slot_num].overall_command_status; + ocs = hwq->utmrd[tr->slot_num].overall_command_status; } else { bus_dmamap_sync(req_queue->dma_tag_ucd, req_queue->ucdmem_map, BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); - cpl.size = tr->response_size; memcpy(&cpl.response_upiu, (void *)tr->ucd->response_upiu, cpl.size); - ocs = tr->hwq->utrd[tr->slot_num].overall_command_status; + ocs = hwq->utrd[tr->slot_num].overall_command_status; } error = ufshci_req_queue_response_is_error(req_queue, ocs, @@ -262,9 +277,9 @@ ufshci_req_queue_complete_tracker(struct ufshci_tracker *tr) retry = error && retriable && req->retries < req_queue->ctrlr->retry_count; if (retry) - tr->hwq->num_retries++; + hwq->num_retries++; if (error && req->retries >= req_queue->ctrlr->retry_count && retriable) - tr->hwq->num_failures++; + hwq->num_failures++; KASSERT(tr->req, ("there is no request assigned to the tracker\n")); KASSERT(cpl.response_upiu.header.task_tag == @@ -282,7 +297,7 @@ ufshci_req_queue_complete_tracker(struct ufshci_tracker *tr) req->cb_fn(req->cb_arg, &cpl, error); } - mtx_lock(&tr->hwq->qlock); + mtx_lock(&hwq->qlock); /* Clear the UTRL Completion Notification register */ req_queue->qops.clear_cpl_ntf(req_queue->ctrlr, tr); @@ -301,6 +316,9 @@ ufshci_req_queue_complete_tracker(struct ufshci_tracker *tr) ufshci_free_request(req); tr->req = NULL; tr->slot_state = UFSHCI_SLOT_STATE_FREE; + + TAILQ_REMOVE(&hwq->outstanding_tr, tr, tailq); + TAILQ_INSERT_HEAD(&hwq->free_tr, tr, tailq); } mtx_unlock(&tr->hwq->qlock); @@ -309,7 +327,16 @@ ufshci_req_queue_complete_tracker(struct ufshci_tracker *tr) bool ufshci_req_queue_process_completions(struct ufshci_req_queue *req_queue) { - return (req_queue->qops.process_cpl(req_queue)); + struct ufshci_hw_queue *hwq; + bool done; + + hwq = req_queue->qops.get_hw_queue(req_queue); + + mtx_lock(&hwq->recovery_lock); + done = req_queue->qops.process_cpl(req_queue); + mtx_unlock(&hwq->recovery_lock); + + return (done); } static void @@ -427,6 +454,225 @@ ufshci_req_queue_fill_utr_descriptor(struct ufshci_utp_xfer_req_desc *desc, desc->prdt_length = prdt_entry_cnt; } +static void +ufshci_req_queue_timeout_recovery(struct ufshci_controller *ctrlr, + struct ufshci_hw_queue *hwq) +{ + /* TODO: Step 2. Logical unit reset */ + /* TODO: Step 3. Target device reset */ + /* TODO: Step 4. Bus reset */ + + /* + * Step 5. All previous commands were timeout. + * Recovery failed, reset the host controller. + */ + ufshci_printf(ctrlr, + "Recovery step 5: Resetting controller due to a timeout.\n"); + hwq->recovery_state = RECOVERY_WAITING; + + ufshci_ctrlr_reset(ctrlr); +} + +static void +ufshci_abort_complete(void *arg, const struct ufshci_completion *status, + bool error) +{ + struct ufshci_tracker *tr = arg; + + /* + * We still need to check the active tracker array, to cover race where + * I/O timed out at same time controller was completing the I/O. An + * abort request always is on the Task Management Request queue, but + * affects either an Task Management Request or an I/O (UTRL) queue, so + * take the appropriate queue lock for the original command's queue, + * since we'll need it to avoid races with the completion code and to + * complete the command manually. + */ + mtx_lock(&tr->hwq->qlock); + if (tr->slot_state != UFSHCI_SLOT_STATE_FREE) { + mtx_unlock(&tr->hwq->qlock); + /* + * An I/O has timed out, and the controller was unable to abort + * it for some reason. And we've not processed a completion for + * it yet. Construct a fake completion status, and then complete + * the I/O's tracker manually. + */ + ufshci_printf(tr->hwq->ctrlr, + "abort task request failed, aborting task manually\n"); + ufshci_req_queue_manual_complete_tracker(tr, + UFSHCI_DESC_ABORTED, UFSHCI_RESPONSE_CODE_GENERAL_FAILURE); + + if ((status->response_upiu.task_mgmt_response_upiu + .output_param1 == + UFSHCI_TASK_MGMT_SERVICE_RESPONSE_FUNCTION_COMPLETE) || + (status->response_upiu.task_mgmt_response_upiu + .output_param1 == + UFSHCI_TASK_MGMT_SERVICE_RESPONSE_FUNCTION_SUCCEEDED)) { + ufshci_printf(tr->hwq->ctrlr, + "Warning: the abort task request completed \ + successfully, but the original task is still incomplete."); + return; + } + + /* Abort Task failed. Perform recovery steps 2-5 */ + ufshci_req_queue_timeout_recovery(tr->hwq->ctrlr, tr->hwq); + } else { + mtx_unlock(&tr->hwq->qlock); + } +} + +static void +ufshci_req_queue_timeout(void *arg) +{ + struct ufshci_hw_queue *hwq = arg; + struct ufshci_controller *ctrlr = hwq->ctrlr; + struct ufshci_tracker *tr; + sbintime_t now; + bool idle = true; + bool fast; + + mtx_assert(&hwq->recovery_lock, MA_OWNED); + + /* + * If the controller is failed, then stop polling. This ensures that any + * failure processing that races with the hwq timeout will fail safely. + */ + if (ctrlr->is_failed) { + ufshci_printf(ctrlr, + "Failed controller, stopping watchdog timeout.\n"); + hwq->timer_armed = false; + return; + } + + /* + * Shutdown condition: We set hwq->timer_armed to false in + * ufshci_req_sdb_destroy before calling callout_drain. When we call + * that, this routine might get called one last time. Exit w/o setting a + * timeout. None of the watchdog stuff needs to be done since we're + * destroying the hwq. + */ + if (!hwq->timer_armed) { + ufshci_printf(ctrlr, + "Timeout fired during ufshci_utr_req_queue_destroy\n"); + return; + } + + switch (hwq->recovery_state) { + case RECOVERY_NONE: + /* + * See if there's any recovery needed. First, do a fast check to + * see if anything could have timed out. If not, then skip + * everything else. + */ + fast = false; + mtx_lock(&hwq->qlock); + now = getsbinuptime(); *** 337 LINES SKIPPED *** From nobody Thu Sep 18 15:13:35 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cSK0H2d7Rz67XlH; Thu, 18 Sep 2025 15:13: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 4cSK0H1r7Fz3vDK; Thu, 18 Sep 2025 15:13:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758208415; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=M80XppdJu3BB6TYqw1AKcfJl5MK1GI3JQn/69vjpWIo=; b=iuYVlrf+AYP+5/41IIgAmIJHb2jNnAFIbdaMTDAebit6sYswoPATN77BBJ8ds5EDj/hGFf EXc6niK+W9h5Eg69RsMvLWe3N4RG4Nj+PyWJshX+mz46rUwhv2YatSk13zv5WTtrSedHbx UHtP03l4CHZnMgFzzf9oigjPszESJUrLpDnfDwbsdqs7YLpgO+M/RE2LdJhdpSchJwFbFw qkno031IYGyw7QzRxlJ/yW/hSzkwQS1htPNGwlgG8ZLfatUE2YzkSCfzal31TBLPIiIBN3 wQEkbz4TZ09n/BS6xsNyVKgwf/zDxc/kej27b1uqN1v2LKrTqCaeHUkF3fa1NQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758208415; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=M80XppdJu3BB6TYqw1AKcfJl5MK1GI3JQn/69vjpWIo=; b=wDW14fPSIv8q21FksNu+HWx4g3DYf/j7KowCsCpfc7/b8tkfj96VJQviz55UgVJss7ZaTM oTJlvztV+JfjWwqBDKOqQFFzaVbNgJv73J087yrXc3/dIrodwUwwSJ7yeBTwQYynGyHA3S VaGQYhlG9eJmqbdkxKRjqooChDyJ8Gea069Hca2gNPktEXxSVLu/a7faxIU5FbzCxI3xn5 1C56wsG1Pi4nqUIOYw7rBL6LQj09u96ytdLV2bYXrtV0gulFcZUVz6DEK5R5PAY7vClypx jUy4mGyB2i6qASIau8n4KdMk/RzW6hvyTGoNDVOOCiGwIPbz6zB3y6TTTjkezQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758208415; a=rsa-sha256; cv=none; b=UgyJ9RLjh6nRsAJ/OIfcBy79pAztKteG79ePzMdxRrO/KNis3CDl07t0PAcFobKuzAvrKV 5qNng+ffF4Xat5FNErtCMvL9JLfM1glVhG+ZCxvvTKwOG7l7D3skBU6ewR8r6vUWiIPGnZ gNKSMgAsdIkzNL4ZAEASqOO2+yDw1khwb/n73GUNasYNoeTNfpfTdPegOImz4R0TR6GLX8 yfRcJmUiM8na/NfSUVfyQyJHOUwzcUEkSXgDK4ojRjNSm3RyGkDIZTnUwOGmn7uZf7SE8r pRLNquOO1kzXxJlTjA+JWqCKBX+nZEgZkZvaPrwq1SrI45jx3oM3iz7SyCGmpA== 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 4cSK0H19tqz29Z; Thu, 18 Sep 2025 15:13: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 58IFDZLv036155; Thu, 18 Sep 2025 15:13:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58IFDZt1036152; Thu, 18 Sep 2025 15:13:35 GMT (envelope-from git) Date: Thu, 18 Sep 2025 15:13:35 GMT Message-Id: <202509181513.58IFDZt1036152@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 6683dcf61b3d - main - cpuctl: run amd_ucode_wrmsr only on one CPU and report if it failed List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6683dcf61b3d0dfa8639c9e501eefb7709922ddf Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=6683dcf61b3d0dfa8639c9e501eefb7709922ddf commit 6683dcf61b3d0dfa8639c9e501eefb7709922ddf Author: Gleb Smirnoff AuthorDate: 2025-09-18 15:10:59 +0000 Commit: Gleb Smirnoff CommitDate: 2025-09-18 15:10:59 +0000 cpuctl: run amd_ucode_wrmsr only on one CPU and report if it failed The CPUCTL_UPDATE is supposed to be applied only to the CPU the ioctl(2) was performed on. This is true for Intel CPUs, but for AMD the SMP rendezvouz of amd_ucode_wrmsr() effectively executed it on all CPUs. Also, the update failure was not reported. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D52466 --- sys/dev/cpuctl/cpuctl.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/sys/dev/cpuctl/cpuctl.c b/sys/dev/cpuctl/cpuctl.c index 9253b17a259d..b0ab3467df69 100644 --- a/sys/dev/cpuctl/cpuctl.c +++ b/sys/dev/cpuctl/cpuctl.c @@ -402,19 +402,20 @@ out: * its workings. */ static void -amd_ucode_wrmsr(void *ucode_ptr) +amd_ucode_wrmsr(void *arg) { + struct ucode_update_data *d = arg; uint32_t tmp[4]; - wrmsr_safe(MSR_K8_UCODE_UPDATE, (uintptr_t)ucode_ptr); + if (PCPU_GET(cpuid) == d->cpu) + d->ret = wrmsr_safe(MSR_K8_UCODE_UPDATE, (uintptr_t)d->ptr); do_cpuid(0, tmp); } static int update_amd(int cpu, cpuctl_update_args_t *args, struct thread *td) { - void *ptr; - int ret; + struct ucode_update_data d = { .cpu = cpu }; if (args->size == 0 || args->data == NULL) { DPRINTF("[cpuctl,%d]: zero-sized firmware image", __LINE__); @@ -430,18 +431,17 @@ update_amd(int cpu, cpuctl_update_args_t *args, struct thread *td) * malloc(9) always returns the pointer aligned at least on * the size of the allocation. */ - ptr = malloc(args->size + 16, M_CPUCTL, M_ZERO | M_WAITOK); - if (copyin(args->data, ptr, args->size) != 0) { + d.ptr = malloc(args->size + 16, M_CPUCTL, M_ZERO | M_WAITOK); + if (copyin(args->data, d.ptr, args->size) != 0) { DPRINTF("[cpuctl,%d]: copyin %p->%p of %zd bytes failed", __LINE__, args->data, ptr, args->size); - ret = EFAULT; + d.ret = EFAULT; goto fail; } - smp_rendezvous(NULL, amd_ucode_wrmsr, NULL, ptr); - ret = 0; + smp_rendezvous(NULL, amd_ucode_wrmsr, NULL, &d); fail: - free(ptr, M_CPUCTL); - return (ret); + free(d.ptr, M_CPUCTL); + return (d.ret); } static int From nobody Thu Sep 18 15:13:36 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cSK0J4nLTz67XGC; Thu, 18 Sep 2025 15:13: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 4cSK0J29cLz3vNg; Thu, 18 Sep 2025 15:13:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758208416; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ip9D5hNz2kD2bAUF6gmeLiUH4lAfkSA7AozZffoGOLI=; b=eV0JRS0GkfHr07JSStFlfbwIiM3+wcnpj5wnOPslLlrKzOJucSshsH3I+GZMDRjFXzP7CB /rLopxY5n6fmGtY+ihh/pLl53AEPlLzTzAqWOGku1whHrGTZp/1RtgCnnB2b6bl9db06Ve xnWZxHcwEGsyzVxcGeuSw4OULXSQYzUwYWuyL6sv6Z99YSH+Twyf5rN2X5UF2RvgHyzQDF OUzoqZaV5i5Y5dM9bScD5VU0kzxPBuDqHqxCgblHg9yCAXPzH6brzVCb35MX45C3lPqqfi PyTOCSchU+wCuLSMF+FyIbMbh0hogtUfZHzuVrOqXh0w4eXpqSCXU02p2hOsIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758208416; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ip9D5hNz2kD2bAUF6gmeLiUH4lAfkSA7AozZffoGOLI=; b=sww7oy2aN6/MYVkZmR/EOm48GWZ5dhGcCDPLkCofFMQ1YTqSlmaP79ruHV6yZgwCHes2Ft j7MTWy3ZxKLuRRvbQ7Tb9gdU0qsOGr3G5MAwFWCrbOw7tHiKCL929hjoPRwyyXMWuDJvLT PvgwdLc2nUk2dmUK8/9CxvHoLMwZtnSE2zTQe5gGTy7Tf6zW2SHshAlEie0xwRYSLcFoj0 pN33J3nX53HWHl/T5ZrHk/SSoe3T2yNoMfJDs9La+0BnlVsNzfSL65j17csL7XvICHP77r zNXK4lYknC+FL/CeOT4kbJC8q6J4iYPeW7n5T3i7Z8qhBqiRmVIo70CHCe+gEw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758208416; a=rsa-sha256; cv=none; b=NOQFEKkhp6ZKs8I06nbSjkjeOXKH/PC2ug4hKtSA8mm9RmWh9E0SVniPgqz7kTbrbFuxg0 BuSZbRONyR4ny+HEyhs9ImvlABZ63IGgWR7ldAjqsEfkXUX6s/ukxzwAc886mrd682iMuO u71TtgkdH7vt475i6vNoQ4YSEgIwFBt9Q+y/RtJA5hJ3GU90YV8Vwte4g24uW1b+m7gbPb UzY+4I99dXqTlekMOG9bxMKzPTpsnEew6VnxE7dpVrjSQpg3eAhe/ZkUC6Z0sPXdee7ZnM K31NQuxoXmMAA12o0B29O4DR5Wh57HRUtlK5EraoJg8EsdJ4QQqSvmbeRA/Cuw== 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 4cSK0J1hT7z29b; Thu, 18 Sep 2025 15:13: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 58IFDa6f036192; Thu, 18 Sep 2025 15:13:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58IFDaNd036188; Thu, 18 Sep 2025 15:13:36 GMT (envelope-from git) Date: Thu, 18 Sep 2025 15:13:36 GMT Message-Id: <202509181513.58IFDaNd036188@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 83804499b724 - main - cpucontrol: return selected revision from ucode_amd_find() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 83804499b72405475027e670690d4cdbada46090 Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=83804499b72405475027e670690d4cdbada46090 commit 83804499b72405475027e670690d4cdbada46090 Author: Gleb Smirnoff AuthorDate: 2025-09-18 15:11:03 +0000 Commit: Gleb Smirnoff CommitDate: 2025-09-18 15:11:03 +0000 cpucontrol: return selected revision from ucode_amd_find() This fixes two printing bugs in cpucontrol(1). First, the utility will now print "updating from rev X to rev Y", instead of incorrect "updating to revision X", where X is actually the old revision. This also matches what Intel updater prints. Second, the utility won't incorrectly warn that the update failed after reading the new revision post update. Reviewed by: kib, markj Differential Revision: https://reviews.freebsd.org/D52506 --- sys/x86/include/ucode.h | 2 +- sys/x86/x86/ucode.c | 3 ++- sys/x86/x86/ucode_subr.c | 10 +++++----- usr.sbin/cpucontrol/amd10h.c | 11 ++++++----- 4 files changed, 14 insertions(+), 12 deletions(-) diff --git a/sys/x86/include/ucode.h b/sys/x86/include/ucode.h index 0338d48a0832..75b9ff3afbd0 100644 --- a/sys/x86/include/ucode.h +++ b/sys/x86/include/ucode.h @@ -63,7 +63,7 @@ struct ucode_intel_extsig_table { }; const void *ucode_amd_find(const char *path, uint32_t signature, - uint32_t revision, const uint8_t *fw_data, size_t fw_size, + uint32_t *revision, const uint8_t *fw_data, size_t fw_size, size_t *selected_sizep); int ucode_intel_load(const void *data, bool unsafe, uint64_t *nrevp, uint64_t *orevp); diff --git a/sys/x86/x86/ucode.c b/sys/x86/x86/ucode.c index 0c153c0b656c..1973047fafd1 100644 --- a/sys/x86/x86/ucode.c +++ b/sys/x86/x86/ucode.c @@ -277,7 +277,8 @@ ucode_amd_match(const uint8_t *data, size_t *len) signature = regs[0]; revision = rdmsr(MSR_BIOS_SIGN); - return (ucode_amd_find("loader blob", signature, revision, data, *len, len)); + return (ucode_amd_find("loader blob", signature, &revision, data, *len, + len)); } /* diff --git a/sys/x86/x86/ucode_subr.c b/sys/x86/x86/ucode_subr.c index 9e128ad2bf04..53d7cfc06769 100644 --- a/sys/x86/x86/ucode_subr.c +++ b/sys/x86/x86/ucode_subr.c @@ -94,7 +94,7 @@ typedef struct container_header { * source code. */ const void * -ucode_amd_find(const char *path, uint32_t signature, uint32_t revision, +ucode_amd_find(const char *path, uint32_t signature, uint32_t *revision, const uint8_t *fw_data, size_t fw_size, size_t *selected_sizep) { const amd_10h_fw_header_t *fw_header; @@ -112,7 +112,7 @@ ucode_amd_find(const char *path, uint32_t signature, uint32_t revision, (signature >> 4) & 0x0f, (signature >> 0) & 0x0f, (signature >> 20) & 0xff, (signature >> 16) & 0x0f); - WARNX(1, "microcode revision %#x", revision); + WARNX(1, "microcode revision %#x", *revision); nextfile: WARNX(1, "checking %s for update.", path); @@ -212,9 +212,9 @@ nextfile: fw_header->processor_rev_id, equiv_id); continue; /* different cpu */ } - if (fw_header->patch_id <= revision) { + if (fw_header->patch_id <= *revision) { WARNX(1, "patch_id %x, revision %x", - fw_header->patch_id, revision); + fw_header->patch_id, *revision); continue; /* not newer revision */ } if (fw_header->nb_dev_id != 0 || fw_header->sb_dev_id != 0) { @@ -222,7 +222,7 @@ nextfile: } WARNX(3, "selecting revision: %x", fw_header->patch_id); - revision = fw_header->patch_id; + *revision = fw_header->patch_id; selected_fw = fw_header; selected_size = section_header->size; } diff --git a/usr.sbin/cpucontrol/amd10h.c b/usr.sbin/cpucontrol/amd10h.c index 4fda44f0b797..9fc861fe5914 100644 --- a/usr.sbin/cpucontrol/amd10h.c +++ b/usr.sbin/cpucontrol/amd10h.c @@ -93,7 +93,7 @@ amd10h_update(const struct ucode_update_params *params) size_t fw_size; size_t selected_size; uint32_t revision; - uint32_t new_rev; + uint32_t new_rev, old_rev; uint32_t signature; int devfd; int error; @@ -121,15 +121,16 @@ amd10h_update(const struct ucode_update_params *params) WARN(0, "ioctl(%s)", dev); goto done; } - revision = (uint32_t)msrargs.data; + old_rev = revision = (uint32_t)msrargs.data; - selected_fw = ucode_amd_find(path, signature, revision, fw_image, + selected_fw = ucode_amd_find(path, signature, &revision, fw_image, fw_size, &selected_size); if (selected_fw != NULL) { WARNX(1, "selected ucode size is %zu", selected_size); - fprintf(stderr, "%s: updating cpu %s to revision %#x... ", - path, dev, revision); + fprintf(stderr, + "%s: updating cpu %s from rev %#x to rev %#x... ", + path, dev, old_rev, revision); args.data = __DECONST(void *, selected_fw); args.size = selected_size; From nobody Thu Sep 18 16:34:51 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cSLp36TKhz67fPL; Thu, 18 Sep 2025 16:34: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 4cSLp35lgFz488t; Thu, 18 Sep 2025 16:34:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758213291; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=X03/ZeBRpQ2KkBEmH3e8KEgTRNrn5JLp1lxl9dY8RNc=; b=W2Yp86k7BrFlSaNxDuxKvcD3y1arNnm0E6V0qan1DEc62YlJcO5MD+Cs5UYTCe7/kvKgaZ wJ+uIPJ0swXTXIYh2K85U2HR4dcqiTv4I+XwXz6K9r0KThp/mdcS/ubz7fn8/B6IVM9QH4 58riP3EcEmNLl2FsANseAgYuanWX4hA5k4XWN63vyNEXnj+vNUqvZmtV7Pw3dfNBJS6W06 XGTm4wuRahDn05QtzB5g07xw+WbAbEKacOJOKNxRTo+LjupSe9shT+tstYDc1eoP1fE6AE Cmjus+h5ypKGb30xv2IKRIyakkw3kcKrZkLYCSJg9suUfyjIJhyThgMv9AMu4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758213291; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=X03/ZeBRpQ2KkBEmH3e8KEgTRNrn5JLp1lxl9dY8RNc=; b=MyIVEzubo3/Z33E7raxTrtG9A6N6FHkPelk1xOLcOfzUp0ZVDFc8WCJQx3RjaIrRranJVN NWcr9sACFpKoWKYYBunFQv+dfJuj56RL6vglZ17UsSmEyRS0E5DAbS/i4UiAMYTBeUN1FN KVQXEUwfSzeLHZ6IySSzX5+0lcW9ZhvsvK8cTOQ+qBdyLf+cEe9utmuVwjqjJqxK2g8CSc FweNkU5/0r0zUk5vm/go1/ZHex0SEhiG9neBWKlB7jIVUMTzfknDfJURTiyWs3oOl1IdIR tzeqqsEGTKq2NWBWGTRvXghLy/xCmFfT0Ao2AaOWzakHIzbUXv5gloFhHkY0Tg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758213291; a=rsa-sha256; cv=none; b=RrynHUazwN03yx4ncoJGE+RYehSGT5c4fvpMTkwhc3qVNyLXHrWjBz8UOC7hvfkJTa4+6R XrgmkLvd1pchk1tf7tdbnh4U4nu6Lg7wv0HPeZKCYH61BCRwLA2G5+QObPCglwGKX+lv2H vo/YxTkVexTdV6feo51qSSnfOYWQXk7zAHZx/dxlmsyXjsV0hsSCmnSEGax8qqKiFdjMqr 4OdWl9LeSkIufU/FEAtG/9cfbMTZhp3O5YXwiXwOXnLutmx3DXfjhD1ephE/bM3YjMrO7q XoKhRsVLL3U+L7JVch2Hp4tLtp5NkMyivgnTnAy/crcEEROsgHsYENZTILHiAQ== 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 4cSLp353qhz37K; Thu, 18 Sep 2025 16:34: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 58IGYpgq086806; Thu, 18 Sep 2025 16:34:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58IGYp6Y086803; Thu, 18 Sep 2025 16:34:51 GMT (envelope-from git) Date: Thu, 18 Sep 2025 16:34:51 GMT Message-Id: <202509181634.58IGYp6Y086803@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Ziaee Subject: git: 8f7a4d7949d8 - main - ObsoleteFiles: Remove the miscapitalized vimage.9 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ziaee X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8f7a4d7949d83c13a7451cba7626950d182dfc5d Auto-Submitted: auto-generated The branch main has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=8f7a4d7949d83c13a7451cba7626950d182dfc5d commit 8f7a4d7949d83c13a7451cba7626950d182dfc5d Author: Alexander Ziaee AuthorDate: 2025-09-18 16:22:56 +0000 Commit: Alexander Ziaee CommitDate: 2025-09-18 16:29:03 +0000 ObsoleteFiles: Remove the miscapitalized vimage.9 MFC after: 3 days Fixes: 08d41d8803d9 (ObsoleteFiles: Remove the miscapitalized vnet.9) Fixes: 3049b2f5115b (vnet.9: Rename vnet.9/vimage.9 to VNET.9/VIMAGE.9) --- ObsoleteFiles.inc | 1 + 1 file changed, 1 insertion(+) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index 76e2027d9af2..d3b1a0239e3f 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -53,6 +53,7 @@ # 20250917: Remove a miscapitalized manual OLD_FILES+=usr/share/man/man9/vnet.9.gz +OLD_FILES+=usr/share/man/man9/vimage.9.gz # 20250911: This tool is no longer needed OLD_FILES+=usr/tests/bin/cp/sparse From nobody Thu Sep 18 17:38:19 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cSNCH5FTcz67lHF; Thu, 18 Sep 2025 17:38:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cSNCH4Qdxz4Hrk; Thu, 18 Sep 2025 17:38:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758217099; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/52mhIJHpt4dSi1Vy943nxmHXuQAe2LHMmn2dPkOw9E=; b=cZZ0FtKYQ9d8+1m3Z+WXFsQjW/6RVFE7e2YlQdr+zp1Mim86Bz+jtnRMQ0jSfd+aW/NOrm wcTytdHQZVmmpJkx6qdxrONMd0e7736fG14C5d/mDv0UxDVsNuRtHP2WuUIv6IvOONT/oo Sa1etKjeFE0DRF0A/qWSuo0+93tUn+A2Sm3zIFnR2sR8IRWehf8zhQagZTXJJljymyw0vf jTPNnTAKI3w4S6dI2G+0ZENLfEtO3lYKMgmjekM48k8JB9pv4nX03VQKJ27Q2XkWOQD31O OxXM+nGUPijLrvwJu2l314yPJIBsA5J1XS6uFcBoVnRTZ3FcH06CW4cA/R7n/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758217099; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/52mhIJHpt4dSi1Vy943nxmHXuQAe2LHMmn2dPkOw9E=; b=HtuamoFbvzSPDEf7Hy8cEuQPxyK7D0mVCU+iZz42KccKxWfqqMTAgXEQbx2Nu5oLnu+CJw pCvBn3M5rx6XGH1Jsc3mm9L9hcvr9dP7HqHVOI6dAuG7j+dZkG4HoVWV8FSYA25DrPTwxB OnQb0XofKNj8UKdgO3yTWCtjvPNVquyNqXbVklOrmtqxO/3Rgp6ibuzlxMQR1qSSmi3oWj jagWMAqOaKSxt0aqgitO26cOkZoLd7oAPEZbzLMnwpfDTEPxCCFL2kdSJk2U3Q+Yb7ZA+a IT3O0dW1yDw8PF79Fv8MDIKDFffsmjnmPKmH3nvcC73WJwy1TKa2zdyXTs+6RQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758217099; a=rsa-sha256; cv=none; b=QLu7e2X0/mpRlbg6kCLSzjb/2tFzc+gsYmrKET+RRHFFDb8sSMT4oapGv4HM9fAR5PqdB6 U/csYODQ5phDpI9/0FAuEi49le7/OVncuuNBo7i4xMDvgIkorwRr34KgtMvNUFEa6fXm9i j7VYSXYDPegRMgX1f/MvvTmMGoVnrKqkRB+HV7GHzNInMtIrIZgvI7rNaZ/5T6GgirZaAW Q/1rTaMOg64P6wVOpZoHTbzS4FPXtJZPU2gnkb6ZecAaS+bBm/Tb+8+830LniFvLGpwCIg ntxLZuVYYjlp0Co7c6Th3PIUkWXxgOFaCog8jDgwHH3EdcpXnPlWqIO/wJSnXg== 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 4cSNCH3BvPz62y; Thu, 18 Sep 2025 17:38:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58IHcJWB001074; Thu, 18 Sep 2025 17:38:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58IHcJqV001071; Thu, 18 Sep 2025 17:38:19 GMT (envelope-from git) Date: Thu, 18 Sep 2025 17:38:19 GMT Message-Id: <202509181738.58IHcJqV001071@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Ziaee Subject: git: a37825313f62 - main - stand/man: Fix mdoc typos for emails, tag spdx List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ziaee X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a37825313f624121c6f07bc03f9cf655c300885b Auto-Submitted: auto-generated The branch main has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=a37825313f624121c6f07bc03f9cf655c300885b commit a37825313f624121c6f07bc03f9cf655c300885b Author: Alexander Ziaee AuthorDate: 2025-09-18 17:12:19 +0000 Commit: Alexander Ziaee CommitDate: 2025-09-18 17:20:01 +0000 stand/man: Fix mdoc typos for emails, tag spdx MFC after: 3 days --- stand/man/boot1.efi.8 | 2 ++ stand/man/loader.8 | 9 ++++++--- stand/man/loader_4th.8 | 7 +++++-- stand/man/loader_lua.8 | 3 +++ stand/man/loader_simp.8 | 5 ++++- 5 files changed, 20 insertions(+), 6 deletions(-) diff --git a/stand/man/boot1.efi.8 b/stand/man/boot1.efi.8 index b6135f8e0e12..2c882a595592 100644 --- a/stand/man/boot1.efi.8 +++ b/stand/man/boot1.efi.8 @@ -1,4 +1,6 @@ .\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) 2020 Netflix, Inc .\" .\" Redistribution and use in source and binary forms, with or without diff --git a/stand/man/loader.8 b/stand/man/loader.8 index 4fc3bbb7cff0..234eabd571e0 100644 --- a/stand/man/loader.8 +++ b/stand/man/loader.8 @@ -1,3 +1,6 @@ +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) 1999 Daniel C. Sobral .\" All rights reserved. .\" Copyright (c) 2021 Warner Losh @@ -115,11 +118,11 @@ scripting language changed to Lua by default in The .Nm was written by -.An Michael Smith Aq msmith@FreeBSD.org . +.An Michael Smith Aq Mt msmith@FreeBSD.org . .Pp FICL was written by -.An John Sadler Aq john_sadler@alum.mit.edu . +.An John Sadler Aq Mt john_sadler@alum.mit.edu . .Pp -.An Warner Losh Aq imp@FreeBSD.org +.An Warner Losh Aq Mt imp@FreeBSD.org integrated Lua into the tree based on initial work done by Pedro Souza for the 2014 Google Summer of Code. diff --git a/stand/man/loader_4th.8 b/stand/man/loader_4th.8 index 9e87326f893b..21e907bd8630 100644 --- a/stand/man/loader_4th.8 +++ b/stand/man/loader_4th.8 @@ -1,3 +1,6 @@ +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) 1999 Daniel C. Sobral .\" All rights reserved. .\" @@ -576,8 +579,8 @@ first appeared in The .Nm was written by -.An Michael Smith Aq msmith@FreeBSD.org . +.An Michael Smith Aq Mt msmith@FreeBSD.org . .Pp .Tn FICL was written by -.An John Sadler Aq john_sadler@alum.mit.edu . +.An John Sadler Aq Mt john_sadler@alum.mit.edu . diff --git a/stand/man/loader_lua.8 b/stand/man/loader_lua.8 index 0aa467237266..c60de9417abc 100644 --- a/stand/man/loader_lua.8 +++ b/stand/man/loader_lua.8 @@ -1,3 +1,6 @@ +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) 1999 Daniel C. Sobral .\" All rights reserved. .\" diff --git a/stand/man/loader_simp.8 b/stand/man/loader_simp.8 index cdacd823b1a5..683ca8b2da5d 100644 --- a/stand/man/loader_simp.8 +++ b/stand/man/loader_simp.8 @@ -1,3 +1,6 @@ +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) 1999 Daniel C. Sobral .\" All rights reserved. .\" @@ -755,4 +758,4 @@ first appeared in The .Nm was written by -.An Michael Smith Aq msmith@FreeBSD.org . +.An Michael Smith Aq Mt msmith@FreeBSD.org . From nobody Thu Sep 18 19:17:24 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cSQPc5Y5rz67tP9; Thu, 18 Sep 2025 19:17: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 4cSQPc5BXSz3F94; Thu, 18 Sep 2025 19:17:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758223044; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ptV1c81YY3t3Il3LMhiTWuS8grTOmIMJUzSuLkj84jk=; b=INpPhRb4QPwyzO5vaMgxJZIgzRovs+9BFAspMejWyJt+K4xCI0va8mXgUJAthZD43UwJPZ rbH2QiVxaVBJfqkSZtQGUiwCfm5RB+NosyZmd5ZQ4Ipez1Rh5UJYCn8S37cHh2RlbOxKR0 xRn7U+Mh1poVolf6FiL2H+X5W7zdQElhrEszYjtffq9a2apaindKjobumAZ5WdtCzpEDs/ 7jhH9DMADsRwKxNzvHziA6oTvH/qIzj/nAypJhaMZ+q/Ka1jXHPjOuQ0R/rNaYlX0JR801 0LdITzcCzdWsA+8/ArPa2qQ/ULreRFxDthyghURzwntCVHIsJewmVxqKLlwONg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758223044; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ptV1c81YY3t3Il3LMhiTWuS8grTOmIMJUzSuLkj84jk=; b=uGeV7+s94wCnxzLyBR2vDQVhjXgeixR8n/YRqVnFrBtITwdZnKGdw81wm7tHQLRynECuUi RTDXjUn0FdfRFSN+CG3QM1M156UPJQNNziZpDhxLcRwoek15uzJldP99yZRruJvjFmWUVM mxVcv6grPX99Ba+FaE7t1aPPQfPomlxbaj+/itLkqNwlPpk9xR98hZ77stelqAJ63RBeuB I0mTdF+kMhCoQN/SEAP7IOQmWt8jk6VrX9XUySmmEqBojdkubxK+UGLcLjFmlYk4HzIo7d Zb1Nam9hIxyD7/V1gYt0LPGL9jqVDjXf8b1XMaZxwZkmzEejuLUwfUMZwxmeKA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758223044; a=rsa-sha256; cv=none; b=gDZewSMC8lgrPnBjPeSPJPorKJVYsNyt/CLOJCTiB8ncazF14OCI3Z1oZfpBIRxL+z0yDz 9xBKiXZ4bg+qVPA5+pDLXO9YT3avRZeWZGskorb3vDYekm6KvRCj6wGDIVPPUADP7TDTJE p+FyBTC5/mW4l9UewR13XT7g4ZyDqDh8YDfuLN0gibNUvJHcpNzh+G2CIxe3tVIchw1ShK tzJW6AHpWYndXnYRswMKGikI4QhsK0Ghw7pSeIv8TkQZNxlz58EDKGITzYMwwY/noW3gI7 wsID+fJX+DOqiz/lWzVDoYUYV0wjChgBvCvS+Rfea/OZXCWscasedY48DCwRbg== 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 4cSQPc4gR9z811; Thu, 18 Sep 2025 19:17: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 58IJHOJF088556; Thu, 18 Sep 2025 19:17:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58IJHOn8088552; Thu, 18 Sep 2025 19:17:24 GMT (envelope-from git) Date: Thu, 18 Sep 2025 19:17:24 GMT Message-Id: <202509181917.58IJHOn8088552@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Enji Cooper Subject: git: c99bb5747f5e - main - nanobsd: minor formatting cleanup List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c99bb5747f5e88527e7414fd543c903f367001c4 Auto-Submitted: auto-generated The branch main has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=c99bb5747f5e88527e7414fd543c903f367001c4 commit c99bb5747f5e88527e7414fd543c903f367001c4 Author: Enji Cooper AuthorDate: 2025-09-17 18:06:43 +0000 Commit: Enji Cooper CommitDate: 2025-09-18 19:17:11 +0000 nanobsd: minor formatting cleanup - Reformat function definitions POSIX states that compound commands, i.e., ones that use `(..)` or `{ .. } `, are permissible as function definitions, however, many shell syntax validators do not acknowledge the former format. Switch to the latter format so more naive editors, like the vim syntax highlighter, better parse the syntax of the file. Moreover, replacing `(..)` with `{..}` replaces several subshells with their non-subshell equivalents. Given that `set -e` is used liberally and `exit` is not used in the calling code when `set -e` is not enforced, there is no net loss by making this change. - Clean trailing whitespace. - Reindent some related comments to match the indentation of the previous line. - Add shebangs to the tops of files to help syntax colorizers and file identifiers understand that the files are in shell syntax. MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D52596 --- tools/tools/nanobsd/defaults.sh | 162 ++++++++++++++++++------------------ tools/tools/nanobsd/embedded/common | 56 ++++++------- tools/tools/nanobsd/legacy.sh | 12 +-- tools/tools/nanobsd/rescue/common | 32 +++---- 4 files changed, 130 insertions(+), 132 deletions(-) diff --git a/tools/tools/nanobsd/defaults.sh b/tools/tools/nanobsd/defaults.sh index 4c4323c4bd87..4f0cc2fa99bd 100755 --- a/tools/tools/nanobsd/defaults.sh +++ b/tools/tools/nanobsd/defaults.sh @@ -209,30 +209,29 @@ SRC_ENV_CONF=/dev/null # ####################################################################### -# Export values into the shell. Must use { } instead of ( ) like -# other functions to avoid a subshell. +# Export values into the shell. # We set __MAKE_CONF as a global since it is easier to get quoting # right for paths with spaces in them. -make_export ( ) { +make_export() { # Similar to export_var, except puts the data out to stdout - var=$1 + local var=$1 eval val=\$$var echo "Setting variable: $var=\"$val\"" export $1 } -nano_make_build_env ( ) { +nano_make_build_env() { __MAKE_CONF="${NANO_MAKE_CONF_BUILD}" make_export __MAKE_CONF } -nano_make_install_env ( ) { +nano_make_install_env() { __MAKE_CONF="${NANO_MAKE_CONF_INSTALL}" make_export __MAKE_CONF } # Extra environment variables for kernel builds -nano_make_kernel_env ( ) { +nano_make_kernel_env() { if [ -f "${NANO_KERNEL}" ] ; then KERNCONFDIR="$(realpath $(dirname ${NANO_KERNEL}))" KERNCONF="$(basename ${NANO_KERNEL})" @@ -244,23 +243,23 @@ nano_make_kernel_env ( ) { fi } -nano_global_make_env ( ) ( +nano_global_make_env() { # global settings for the make.conf file, if set [ -z "${NANO_ARCH}" ] || echo TARGET_ARCH="${NANO_ARCH}" [ -z "${NANO_CPUTYPE}" ] || echo TARGET_CPUTYPE="${NANO_CPUTYPE}" -) +} # # Create empty files in the target tree, and record the fact. All paths # are relative to NANO_WORLDDIR. # -tgt_touch ( ) ( +tgt_touch() { cd "${NANO_WORLDDIR}" for i; do touch $i echo "./${i} type=file" >> ${NANO_METALOG} done -) +} # # Convert a directory into a symlink. Takes two arguments, the @@ -268,9 +267,9 @@ tgt_touch ( ) ( # directory is removed and a symlink is created. If we're doing # a nopriv build, then append this fact to the metalog # -tgt_dir2symlink ( ) ( - dir=$1 - symlink=$2 +tgt_dir2symlink() { + local dir=$1 + local symlink=$2 cd "${NANO_WORLDDIR}" rm -xrf "$dir" @@ -278,28 +277,28 @@ tgt_dir2symlink ( ) ( if [ -n "$NANO_METALOG" ]; then echo "./${dir} type=link mode=0777 link=${symlink}" >> ${NANO_METALOG} fi -) +} # run in the world chroot, errors fatal -CR ( ) { +CR() { chroot "${NANO_WORLDDIR}" /bin/sh -exc "$*" } # run in the world chroot, errors not fatal -CR0 ( ) { +CR0() { chroot "${NANO_WORLDDIR}" /bin/sh -c "$*" || true } -clean_build ( ) ( +clean_build() { pprint 2 "Clean and create object directory (${MAKEOBJDIRPREFIX})" if ! rm -xrf ${MAKEOBJDIRPREFIX}/ > /dev/null 2>&1 ; then chflags -R noschg ${MAKEOBJDIRPREFIX}/ rm -xr ${MAKEOBJDIRPREFIX}/ fi -) +} -make_conf_build ( ) ( +make_conf_build() { pprint 2 "Construct build make.conf ($NANO_MAKE_CONF_BUILD)" mkdir -p ${MAKEOBJDIRPREFIX} @@ -312,9 +311,9 @@ make_conf_build ( ) ( echo "${CONF_WORLD}" echo "${CONF_BUILD}" ) > ${NANO_MAKE_CONF_BUILD} -) +} -build_world ( ) ( +build_world() { pprint 2 "run buildworld" pprint 3 "log: ${MAKEOBJDIRPREFIX}/_.bw" @@ -324,9 +323,9 @@ build_world ( ) ( cd "${NANO_SRC}" ${NANO_PMAKE} buildworld ) > ${MAKEOBJDIRPREFIX}/_.bw 2>&1 -) +} -build_kernel ( ) ( +build_kernel() { pprint 2 "build kernel ($NANO_KERNEL)" pprint 3 "log: ${MAKEOBJDIRPREFIX}/_.bk" @@ -342,9 +341,9 @@ build_kernel ( ) ( cd "${NANO_SRC}" ${NANO_PMAKE} buildkernel ) > ${MAKEOBJDIRPREFIX}/_.bk 2>&1 -) +} -clean_world ( ) ( +clean_world() { if [ "${NANO_OBJ}" != "${MAKEOBJDIRPREFIX}" ]; then pprint 2 "Clean and create object directory (${NANO_OBJ})" if ! rm -xrf ${NANO_OBJ}/ > /dev/null 2>&1 ; then @@ -361,9 +360,9 @@ clean_world ( ) ( fi mkdir -p "${NANO_WORLDDIR}" fi -) +} -make_conf_install ( ) ( +make_conf_install() { pprint 2 "Construct install make.conf ($NANO_MAKE_CONF_INSTALL)" # Make sure we get all the global settings that NanoBSD wants @@ -377,9 +376,9 @@ make_conf_install ( ) ( echo METALOG=${NANO_METALOG} fi ) > ${NANO_MAKE_CONF_INSTALL} -) +} -install_world ( ) ( +install_world() { pprint 2 "installworld" pprint 3 "log: ${NANO_LOG}/_.iw" @@ -390,9 +389,9 @@ install_world ( ) ( ${NANO_MAKE} installworld DESTDIR="${NANO_WORLDDIR}" DB_FROM_SRC=yes chflags -R noschg "${NANO_WORLDDIR}" ) > ${NANO_LOG}/_.iw 2>&1 -) +} -install_etc ( ) ( +install_etc() { pprint 2 "install /etc" pprint 3 "log: ${NANO_LOG}/_.etc" @@ -405,9 +404,9 @@ install_etc ( ) ( # so they can spam it. cp /dev/null "${NANO_WORLDDIR}"/etc/make.conf ) > ${NANO_LOG}/_.etc 2>&1 -) +} -install_kernel ( ) ( +install_kernel() { pprint 2 "install kernel ($NANO_KERNEL)" pprint 3 "log: ${NANO_LOG}/_.ik" @@ -426,9 +425,9 @@ install_kernel ( ) ( ${NANO_MAKE} installkernel DESTDIR="${NANO_WORLDDIR}" DB_FROM_SRC=yes ) > ${NANO_LOG}/_.ik 2>&1 -) +} -native_xtools ( ) ( +native_xtools() { pprint 2 "Installing the optimized native build tools for cross env" pprint 3 "log: ${NANO_LOG}/_.native_xtools" @@ -441,13 +440,13 @@ native_xtools ( ) ( ${NANO_MAKE} native-xtools-install DESTDIR="${NANO_WORLDDIR}" ) > ${NANO_LOG}/_.native_xtools 2>&1 -) +} # # Run the requested set of early customization scripts, run before # buildworld. # -run_early_customize ( ) { +run_early_customize() { pprint 2 "run early customize scripts" for c in $NANO_EARLY_CUSTOMIZE do @@ -467,7 +466,7 @@ run_early_customize ( ) { # done an installworld, installed the etc files, installed the kernel # and tweaked them in the standard way. # -run_customize ( ) ( +run_customize() { pprint 2 "run customize scripts" for c in $NANO_CUSTOMIZE @@ -477,13 +476,13 @@ run_customize ( ) ( pprint 4 "`type $c`" ( set -o xtrace ; $c ) > ${NANO_LOG}/_.cust.$c 2>&1 done -) +} # # Run any last-minute customization commands after we've had a chance to # setup nanobsd, prune empty dirs from /usr, etc # -run_late_customize ( ) ( +run_late_customize() { pprint 2 "run late customize scripts" for c in $NANO_LATE_CUSTOMIZE do @@ -492,7 +491,7 @@ run_late_customize ( ) ( pprint 4 "`type $c`" ( set -o xtrace ; $c ) > ${NANO_LOG}/_.late_cust.$c 2>&1 done -) +} # # Hook called after we run all the late customize commands, but @@ -501,7 +500,7 @@ run_late_customize ( ) ( # have been recording their actions. It's not anticipated that # a user's cfg file would override this. # -fixup_before_diskimage ( ) ( +fixup_before_diskimage() { # Run the deduplication script that takes the metalog journal and # combines multiple entries for the same file (see source for # details). We take the extra step of removing the size keywords. This @@ -517,9 +516,9 @@ fixup_before_diskimage ( ) ( cat ${NANO_METALOG}.pre | ${NANO_TOOLS}/mtree-dedup.awk | \ sed -e 's/ size=[0-9][0-9]*//' | sort >> ${NANO_METALOG} fi -) +} -setup_nanobsd ( ) ( +setup_nanobsd() { pprint 2 "configure nanobsd setup" pprint 3 "log: ${NANO_LOG}/_.dl" @@ -564,9 +563,9 @@ setup_nanobsd ( ) ( tgt_dir2symlink tmp var/tmp ) > ${NANO_LOG}/_.dl 2>&1 -) +} -setup_nanobsd_etc ( ) ( +setup_nanobsd_etc() { pprint 2 "configure nanobsd /etc" ( @@ -623,18 +622,18 @@ EOF # Create directory for eventual /usr/local/etc contents mkdir -p etc/local ) -) +} -prune_usr ( ) ( +prune_usr() { # Remove all empty directories in /usr find "${NANO_WORLDDIR}"/usr -type d -depth -print | while read d do rmdir $d > /dev/null 2>&1 || true done -) +} -newfs_part ( ) ( +newfs_part() { local dev mnt lbl dev=$1 mnt=$2 @@ -642,15 +641,15 @@ newfs_part ( ) ( echo newfs ${NANO_NEWFS} ${NANO_LABEL:+-L${NANO_LABEL}${lbl}} ${dev} newfs ${NANO_NEWFS} ${NANO_LABEL:+-L${NANO_LABEL}${lbl}} ${dev} mount -o async ${dev} ${mnt} -) +} # Convenient spot to work around any umount issues that your build environment # hits by overriding this method. -nano_umount ( ) ( +nano_umount() { umount ${1} -) +} -populate_slice ( ) ( +populate_slice() { local dev dir mnt lbl dev=$1 dir=$2 @@ -665,23 +664,23 @@ populate_slice ( ) ( fi df -i ${mnt} nano_umount ${mnt} -) +} -populate_cfg_slice ( ) ( +populate_cfg_slice() { populate_slice "$1" "$2" "$3" "$4" -) +} -populate_data_slice ( ) ( +populate_data_slice() { populate_slice "$1" "$2" "$3" "$4" -) +} -last_orders ( ) ( +last_orders() { # Redefine this function with any last orders you may have # after the build completed, for instance to copy the finished # image to a more convenient place: # cp ${NANO_DISKIMGDIR}/${NANO_IMG1NAME} /home/ftp/pub/nanobsd.disk true -) +} ####################################################################### # @@ -693,7 +692,7 @@ last_orders ( ) ( # Common Flash device geometries # -FlashDevice ( ) { +FlashDevice() { if [ -d ${NANO_TOOLS} ] ; then . ${NANO_TOOLS}/FlashDevice.sub else @@ -722,8 +721,8 @@ FlashDevice ( ) { # The generic-hdd device is preferred for flash devices larger than 1GB. # -UsbDevice ( ) { - a1=`echo $1 | tr '[:upper:]' '[:lower:]'` +UsbDevice() { + local a1=`echo $1 | tr '[:upper:]' '[:lower:]'` case $a1 in generic-fdd) NANO_HEADS=64 @@ -745,7 +744,7 @@ UsbDevice ( ) { ####################################################################### # Setup serial console -cust_comconsole ( ) ( +cust_comconsole() { # Enable getty on console sed -i "" -e '/^tty[du]0/s/off/onifconsole/' ${NANO_WORLDDIR}/etc/ttys @@ -754,32 +753,32 @@ cust_comconsole ( ) ( # Tell loader to use serial console early. echo "${NANO_BOOT2CFG}" > ${NANO_WORLDDIR}/boot.config -) +} ####################################################################### # Allow root login via ssh -cust_allow_ssh_root ( ) ( +cust_allow_ssh_root() { sed -i "" -E 's/^#?PermitRootLogin.*/PermitRootLogin yes/' \ ${NANO_WORLDDIR}/etc/ssh/sshd_config -) +} ####################################################################### # Install the stuff under ./Files -cust_install_files ( ) ( +cust_install_files() { cd "${NANO_TOOLS}/Files" find . -print | grep -Ev '/(CVS|\.svn|\.hg|\.git)/' | cpio ${CPIO_SYMLINK} -Ldumpv ${NANO_WORLDDIR} if [ -n "${NANO_CUST_FILES_MTREE}" -a -f ${NANO_CUST_FILES_MTREE} ]; then CR "mtree -eiU -p /" <${NANO_CUST_FILES_MTREE} fi -) +} ####################################################################### # Install packages from ${NANO_PACKAGE_DIR} -cust_pkgng ( ) ( +cust_pkgng() { mkdir -p ${NANO_WORLDDIR}/usr/local/etc local PKG_CONF="${NANO_WORLDDIR}/usr/local/etc/pkg.conf" local PKGCMD="env BATCH=YES ASSUME_ALWAYS_YES=YES PKG_DBDIR=${NANO_PKG_META_BASE}/pkg SIGNATURE_TYPE=none /usr/sbin/pkg" @@ -841,14 +840,14 @@ cust_pkgng ( ) ( umount ${NANO_WORLDDIR}/dev umount ${NANO_WORLDDIR}/_.p rm -xrf ${NANO_WORLDDIR}/_.p -) +} ####################################################################### # Convenience function: # Register all args as early customize function to run just before # build commences. -early_customize_cmd ( ) { +early_customize_cmd() { NANO_EARLY_CUSTOMIZE="$NANO_EARLY_CUSTOMIZE $*" } @@ -856,7 +855,7 @@ early_customize_cmd ( ) { # Convenience function: # Register all args as customize function. -customize_cmd ( ) { +customize_cmd() { NANO_CUSTOMIZE="$NANO_CUSTOMIZE $*" } @@ -865,7 +864,7 @@ customize_cmd ( ) { # Register all args as late customize function to run just before # image creation. -late_customize_cmd ( ) { +late_customize_cmd() { NANO_LATE_CUSTOMIZE="$NANO_LATE_CUSTOMIZE $*" } @@ -877,14 +876,14 @@ late_customize_cmd ( ) { # Progress Print # Print $2 at level $1. -pprint ( ) ( +pprint() { if [ "$1" -le $PPLEVEL ]; then runtime=$(( `date +%s` - $NANO_STARTTIME )) printf "%s %.${1}s %s\n" "`date -u -r $runtime +%H:%M:%S`" "#####" "$2" 1>&3 fi -) +} -usage ( ) { +usage() { ( echo "Usage: $0 [-BbfhIiKknpqvWwX] [-c config_file]" echo " -B suppress installs (both kernel and world)" @@ -911,7 +910,7 @@ usage ( ) { # Setup and Export Internal variables # -export_var ( ) { # Don't want a subshell +export_var() { var=$1 # Lookup value of the variable. eval val=\$$var @@ -920,8 +919,7 @@ export_var ( ) { # Don't want a subshell } # Call this function to set defaults _after_ parsing options. -# don't want a subshell otherwise variable setting is thrown away. -set_defaults_and_export ( ) { +set_defaults_and_export() { : ${NANO_OBJ:=/usr/obj/nanobsd.${NANO_NAME}${NANO_LAYOUT:+.${NANO_LAYOUT}}} : ${MAKEOBJDIRPREFIX:=${NANO_OBJ}} : ${NANO_DISKIMGDIR:=${NANO_OBJ}} diff --git a/tools/tools/nanobsd/embedded/common b/tools/tools/nanobsd/embedded/common index 4aecd3602f6f..132ca9e2ba5b 100644 --- a/tools/tools/nanobsd/embedded/common +++ b/tools/tools/nanobsd/embedded/common @@ -1,4 +1,4 @@ - +#!/bin/sh #- # Copyright (c) 2015 M. Warner Losh # Copyright (c) 2010-2011 iXsystems, Inc. @@ -113,18 +113,18 @@ NANO_FAT_DIR=${NANO_LOG}/_.fat customize_cmd cust_allow_ssh_root -add_etc_make_conf ( ) ( +add_etc_make_conf() { touch ${NANO_WORLDDIR}/etc/make.conf -) +} customize_cmd add_etc_make_conf -cust_install_machine_files ( ) ( +cust_install_machine_files() { echo "cd ${NANO_CFG_BASE}/Files" cd ${NANO_CFG_BASE}/Files find . -print | grep -Ev '/(CVS|\.svn|\.hg|\.git)' | cpio -dumpv ${NANO_WORLDDIR} -) +} customize_cmd cust_install_files -customize_cmd cust_install_machine_files +customize_cmd cust_install_machine_files CONF_BUILD=" LOCAL_XTOOL_DIRS=usr.bin/mkimg @@ -173,13 +173,13 @@ NANO_PACKAGE_ONLY=1 # Creates images for all the formats that use MBR / GPT # split later if the #ifdef soup gets too bad. -create_diskimage_gpt ( ) ( +create_diskimage_gpt() { pprint 2 "build diskimage gpt ${NANO_NAME}" create_diskimage_mbr $* -) +} -create_diskimage_mbr ( ) ( +create_diskimage_mbr() { local fmt @@ -314,7 +314,7 @@ create_diskimage_mbr ( ) ( rm -f ${out}.xz xz -9 --keep ${out} ) > ${NANO_LOG}/_.di 2>&1 -) +} die( ) { echo "$*" @@ -373,7 +373,7 @@ $var=$val" fi done -typical_embedded ( ) ( +typical_embedded() { # Need to create rc.conf before we copy over /etc to /conf/base/etc # so now's a good time. @@ -388,10 +388,10 @@ typical_embedded ( ) ( # Make sure that firstboot scripts run so growfs works. # Note: still some issues remvoing this XXX touch ${NANO_WORLDDIR}/firstboot -) +} customize_cmd typical_embedded -fix_pkg ( ) ( +fix_pkg() { chdir ${NANO_WORLDDIR} mkdir -p pkg mkdir -p pkg/db @@ -410,20 +410,20 @@ fix_pkg ( ) ( echo "./pkg/db type=dir uname=root gname=wheel mode=0755" echo "./pkg/tmp type=dir uname=root gname=wheel mode=0755" ) >> ${NANO_METALOG} -) +} customize_cmd fix_pkg -save_build ( ) ( +save_build() { VERSION_FILE=${NANO_WORLDDIR}/etc/version if [ "${SVNREVISION}" = "${REVISION}" ]; then echo "${NANO_NAME}" > "${VERSION_FILE}" else echo "${NANO_NAME} (${SVNREVISION})" > "${VERSION_FILE}" fi -) +} customize_cmd save_build -shrink_md_fbsize ( ) ( +shrink_md_fbsize() { # We have a lot of little files on our memory disks. Let's decrease # the block and frag size to fit more little files on them (this # halves our space requirement by ~50% on /etc and /var on 8.x -- @@ -431,12 +431,12 @@ shrink_md_fbsize ( ) ( # are 4 times larger). sed -i '' -e 's,-S -i 4096,-S -i 4096 -b 4096 -f 512,' \ ${NANO_WORLDDIR}/etc/rc.initdiskless -) +} customize_cmd shrink_md_fbsize customize_cmd cust_comconsole -dos_boot_part ( ) ( +dos_boot_part() { local d=/usr/local/share/u-boot/${NANO_BOOT_PKG} local f=${NANO_FAT_DIR} @@ -453,7 +453,7 @@ dos_boot_part ( ) ( # Now we need to copy over dtb files from the build. cp ${NANO_WORLDDIR}/boot/dtb/*.dtb . -) +} if [ -n "$NANO_BOOT_PKG" ]; then d=/usr/local/share/u-boot/${NANO_BOOT_PKG} @@ -468,7 +468,7 @@ if [ -n "$NANO_BOOT_PKG" ]; then customize_cmd dos_boot_part fi -product_custom ( ) ( +product_custom() { # not quite ready to tweak these in nopriv build if [ -z ${NANO_NOPRIV_BUILD} ]; then # Last second tweaks -- generally not needed @@ -480,7 +480,7 @@ product_custom ( ) ( chown root:wheel ${NANO_WORLDDIR}/ chown root:wheel ${NANO_WORLDDIR}/usr fi -) +} late_customize_cmd product_custom # @@ -615,19 +615,19 @@ esac NANO_SLICE_DATA= # Not included # These don't make any sense to this strategy, so stub them out. -calculate_partitioning ( ) ( -) +calculate_partitioning() { +} # These don't make any sense to this strategy, so stub them out. -create_code_slice ( ) ( -) +create_code_slice() { +} # Each major disk scheme has its own routine. Generally # this is for mbr, gpt, etc. These are generally are widely # shared, but some specialized formats won't be shared. -create_diskimage ( ) ( +create_diskimage() { eval create_diskimage_${NANO_DISK_SCHEME} -) +} # Set the path to the same path we use for buldworld to use latest mkimg NANO_TARGET=$(cd ${NANO_SRC}; ${NANO_MAKE} TARGET_ARCH=${NANO_ARCH} -V _TARGET) diff --git a/tools/tools/nanobsd/legacy.sh b/tools/tools/nanobsd/legacy.sh index 2f689212263e..cbe56d6f560c 100644 --- a/tools/tools/nanobsd/legacy.sh +++ b/tools/tools/nanobsd/legacy.sh @@ -34,7 +34,7 @@ # Functions and variable definitions used by the legacy nanobsd # image building system. -calculate_partitioning ( ) ( +calculate_partitioning() { echo $NANO_MEDIASIZE $NANO_IMAGES \ $NANO_SECTS $NANO_HEADS \ $NANO_CODESIZE $NANO_CONFSIZE $NANO_DATASIZE | @@ -90,9 +90,9 @@ calculate_partitioning ( ) ( } } ' > ${NANO_LOG}/_.partitioning -) +} -create_code_slice ( ) ( +create_code_slice() { pprint 2 "build code slice" pprint 3 "log: ${NANO_OBJ}/_.cs" @@ -142,10 +142,10 @@ create_code_slice ( ) ( trap - 1 2 15 EXIT ) > ${NANO_OBJ}/_.cs 2>&1 -) +} -create_diskimage ( ) ( +create_diskimage() { pprint 2 "build diskimage" pprint 3 "log: ${NANO_OBJ}/_.di" @@ -243,4 +243,4 @@ create_diskimage ( ) ( trap - 1 2 15 EXIT ) > ${NANO_LOG}/_.di 2>&1 -) +} diff --git a/tools/tools/nanobsd/rescue/common b/tools/tools/nanobsd/rescue/common index 15bf10f5e67d..a145a1ded32a 100644 --- a/tools/tools/nanobsd/rescue/common +++ b/tools/tools/nanobsd/rescue/common @@ -1,5 +1,5 @@ -# -# +#!/bin/sh + #NANO_SRC=$(pwd) #NANO_SRC=${NANO_SRC%/tools/tools/nanobsd/rescue} #NANO_OBJ=${NANO_SRC}/../nanobsd-builds/${NANO_NAME}/obj @@ -24,12 +24,12 @@ NANO_MD_BACKING=file # Options to put in make.conf during buildworld only CONF_BUILD=' ' -# Options to put in make.conf during installworld only +# Options to put in make.conf during installworld only CONF_INSTALL=' ' -# Options to put in make.conf during both build- & installworld. -CONF_WORLD=' -CFLAGS=-O -pipe +# Options to put in make.conf during both build- & installworld. +CONF_WORLD=' +CFLAGS=-O -pipe # We do not need these for rescue WITHOUT_TESTS=true WITHOUT_DEBUG_FILES=true @@ -71,9 +71,9 @@ customize_cmd cust_install_files #customize_cmd cust_pkgng -cust_etc_cfg () ( - cd ${NANO_WORLDDIR} -# mkdir -pv scratch +cust_etc_cfg() { + cd ${NANO_WORLDDIR} + # mkdir -pv scratch echo "hostname=\"rescue\"" > etc/rc.conf echo "font8x14=\"iso15-8x14\"" >> etc/rc.conf echo "font8x16=\"iso15-8x16\"" >> etc/rc.conf @@ -85,12 +85,12 @@ cust_etc_cfg () ( echo "/dev/${NANO_DRIVE}s3 /cfg ufs rw,noauto 2 2" >> etc/fstab echo "tmpfs /boot/zfs tmpfs rw,size=1048576,mode=777 0 0" >> etc/fstab echo "ports:/usr/ports /usr/ports nfs rw,noauto,noatime,bg,soft,intr,nfsv3 0 0" >> etc/fstab -# echo "/dev/ad1s1a /scratch ufs rw,noauto,noatime 0 0" >> etc/fstab + # echo "/dev/ad1s1a /scratch ufs rw,noauto,noatime 0 0" >> etc/fstab /usr/sbin/pwd_mkdb -d etc etc/master.passwd -) +} customize_cmd cust_etc_cfg -setup_nanobsd_etc ( ) ( +setup_nanobsd_etc() { pprint 2 "configure nanobsd /etc" ( cd ${NANO_WORLDDIR} @@ -102,8 +102,8 @@ setup_nanobsd_etc ( ) ( echo "NANO_DRIVE=${NANO_DRIVE}" > etc/nanobsd.conf mkdir -p cfg ) -) -last_orders () ( +} +last_orders() { pprint 2 "last orders" ( cd ${NANO_WORLDDIR} @@ -112,7 +112,7 @@ last_orders () ( echo "/dev/iso9660/${BIGLABEL} / cd9660 ro,noatime 0 0" > etc/fstab echo "tmpfs /boot/zfs tmpfs rw,size=1048576,mode=777 0 0" >> etc/fstab echo "ports:/usr/ports /usr/ports nfs rw,noauto,noatime,bg,soft,intr,nfsv3 0 0" >> etc/fstab -# echo "/dev/ad1s1a /scratch ufs rw,noauto,noatime 0 0" >> etc/fstab + # echo "/dev/ad1s1a /scratch ufs rw,noauto,noatime 0 0" >> etc/fstab rm -f conf/default/etc/remount touch conf/default/etc/.keepme touch conf/default/var/.keepme @@ -125,4 +125,4 @@ last_orders () ( -o label="${BIGLABEL}" -o publisher="RMX" \ -o bootimage="i386;_.w/boot/cdboot" -o no-emul-boot _.disk.iso _.w/ ) -) +} From nobody Thu Sep 18 19:17:50 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cSQQ65qX9z67tG7; Thu, 18 Sep 2025 19:17: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 4cSQQ64lb6z3Fm8; Thu, 18 Sep 2025 19:17:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758223070; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=W7FWcqWvu9hxM0dk5Rnwtfq7rHeXO7jV/cvq2IrSao0=; b=RxfcOt2BHkQZG1KG8CPib3madlNjGkliZ3uP8ORvZVffjS+Q7O0dsVXid6l9YYC4fxs8Mg 1qEzYVXS47U+/Bs2RXPye/7m53+cWC1OAoLv9VUkEclwER5/U4RvDKhSLfAFAHpJf2DlvS o/ugqAP7oUjB0pKWn9xaeSE0EAOjYkbuFlW/q3Hu3kRVDrSXb4npTBgv6rvKUQzR+ACIWG 7CMAN5/u6SiFmNwrWtRqt2TcmWY54qNkROvNqQV62MF6HKdFud2fllQk7zFZgcf3gatjvN iZkFJZg4Ey7GdcPKR8qpYbF0zTwbPwZ0/k115Omb3lhqZ6rmJ++gZiHBLuX9kQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758223070; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=W7FWcqWvu9hxM0dk5Rnwtfq7rHeXO7jV/cvq2IrSao0=; b=sVJarPxz6CWLmsocVVdfFo0695ikya1f5BRFpBEwwRkqAC6OiVXGmbGNbO9zTsltaTJDjg xpIBxMxxFMAlDB6+kn2gxkEW1/JguXPyrcCax+sREkwuURG17RmXz0Jhm3uaQUftPGxWUo 0YJERlha0i7mG//houYrb/NjuKWZsuNVpjllXs1bOmQesjn42CmQ7Dgt//AAL3vhKuwWqq WONiG4FEfTRJ77VGDZbhSLlfdy5jt14w7XMasC16OcdcxOTamRrYmHhtUZUVeFsX2EoNAb x3qg/5/cmbPhgy2Wrzez4FGq9/Pvcf/ZAaU0Aqxr/wqnY7gqqf9by/c1gjAYIQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758223070; a=rsa-sha256; cv=none; b=ZcZo/s8JBMJ8FRJCTHiwTgtt/Esnh+hQFhDbk+dflwq9PlwL8LzxUeoI6bgc98mXC0ZbDF PuwBiU9moEzUGabW5wmxR7zTN6zcouxijWAwWHaiXkpCheakypC+WyMlAO5QngHFj9e/pQ fHXPa+tAmXjavIuwWa0pp7Jw+a6Ua+7Z8rHSjIFwA/IIOF/9fD1oJWembu5VicA17yfckF UA1CMqp20SKeTCPOfWJqEv6nKFQx3x+RnUsS1i0DtFSkBvKvTc97RsW7L2sBW9KaJnMqjA x+4w+Ca8dQRaDbnsT/fMwnf69GXOPUwO1QeypFMCY7dMdEOiToULm5gj/mZAHg== 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 4cSQQ642FHz7Xg; Thu, 18 Sep 2025 19:17: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 58IJHo0K088810; Thu, 18 Sep 2025 19:17:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58IJHoPv088807; Thu, 18 Sep 2025 19:17:50 GMT (envelope-from git) Date: Thu, 18 Sep 2025 19:17:50 GMT Message-Id: <202509181917.58IJHoPv088807@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Enji Cooper Subject: git: d5984d5f29a7 - main - OpenSSL: update Makefiles to reflect 3.5.1 release List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d5984d5f29a7c717b88ccd17a85a747792403cdf Auto-Submitted: auto-generated The branch main has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=d5984d5f29a7c717b88ccd17a85a747792403cdf commit d5984d5f29a7c717b88ccd17a85a747792403cdf Author: Enji Cooper AuthorDate: 2025-09-08 03:20:42 +0000 Commit: Enji Cooper CommitDate: 2025-09-18 19:17:44 +0000 OpenSSL: update Makefiles to reflect 3.5.1 release This is a targeted effort to update the INCS and SRCS entries for libcrypto, the legacy provider, and libssl to match what upstream (OpenSSL) builds in their respective libraries. The number of stylistic changes were kept at a minimum. Another incoming change will reformat this file to make future maintenance easier. MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D52554 --- secure/lib/libcrypto/Makefile | 49 +++++++++++++++++----------- secure/lib/libcrypto/modules/Makefile.inc | 7 ---- secure/lib/libcrypto/modules/legacy/Makefile | 41 ++++++++++++++++++++--- secure/lib/libssl/Makefile | 2 +- share/mk/src.libnames.mk | 2 +- 5 files changed, 68 insertions(+), 33 deletions(-) diff --git a/secure/lib/libcrypto/Makefile b/secure/lib/libcrypto/Makefile index 75ebb6e65327..5cb3f5a7c3fe 100644 --- a/secure/lib/libcrypto/Makefile +++ b/secure/lib/libcrypto/Makefile @@ -91,7 +91,7 @@ SRCS+= x_bignum.c x_info.c x_int64.c x_long.c x_pkey.c x_sig.c x_spki.c SRCS+= x_val.c # async -SRCS+= async.c async_err.c async_posix.c async_wait.c +SRCS+= async.c async_err.c async_null.c async_posix.c async_wait.c async_win.c # bf SRCS+= bf_cfb64.c bf_ecb.c bf_ofb64.c bf_prefix.c bf_readbuff.c bf_skey.c @@ -224,7 +224,11 @@ SRCS+= dsa_gen.c dsa_key.c dsa_lib.c dsa_meth.c dsa_ossl.c dsa_pmeth.c SRCS+= dsa_prn.c dsa_sign.c dsa_vrf.c # dso +SRCS+= dso_dl.c SRCS+= dso_dlfcn.c dso_err.c dso_lib.c +SRCS+= dso_openssl.c +SRCS+= dso_vms.c +SRCS+= dso_win32.c # ec SRCS+= curve25519.c curve448.c curve448_tables.c ec2_oct.c ec2_smpl.c @@ -291,7 +295,7 @@ SRCS+= ffc_params.c ffc_params_generate.c ffc_params_validate.c SRCS+= hashtable.c hashfunc.c # hmac -SRCS+= hmac.c hmac_s390x.c +SRCS+= hmac.c # hpke SRCS+= hpke_util.c hpke.c @@ -424,17 +428,10 @@ SRCS+= cipher_aes_xts_fips.c SRCS+= cipher_aes_gcm_siv.c cipher_aes_gcm_siv_hw.c \ cipher_aes_gcm_siv_polyval.c SRCS+= cipher_aes_siv.c cipher_aes_siv_hw.c -SRCS+= cipher_blowfish.c cipher_blowfish_hw.c SRCS+= cipher_camellia.c cipher_camellia_hw.c -SRCS+= cipher_cast5.c cipher_cast5_hw.c SRCS+= cipher_chacha20.c cipher_chacha20_hw.c SRCS+= cipher_chacha20_poly1305.c cipher_chacha20_poly1305_hw.c -SRCS+= cipher_des.c cipher_des_hw.c -SRCS+= cipher_desx.c cipher_desx_hw.c SRCS+= cipher_null.c -SRCS+= cipher_rc4.c cipher_rc4_hw.c -SRCS+= cipher_rc4_hmac_md5.c cipher_rc4_hmac_md5_hw.c -SRCS+= cipher_seed.c cipher_seed_hw.c SRCS+= cipher_tdes.c cipher_tdes_common.c cipher_tdes_hw.c SRCS+= cipher_tdes_default.c cipher_tdes_default_hw.c \ cipher_tdes_wrap.c cipher_tdes_wrap_hw.c @@ -442,12 +439,10 @@ SRCS+= cipher_tdes_default.c cipher_tdes_default_hw.c \ # providers/implementations/digests SRCS+= digestcommon.c SRCS+= blake2_prov.c blake2b_prov.c blake2s_prov.c -SRCS+= md4_prov.c SRCS+= md5_prov.c md5_sha1_prov.c SRCS+= null_prov.c SRCS+= ripemd_prov.c SRCS+= sha2_prov.c sha3_prov.c -SRCS+= wp_prov.c # providers/implementations/encode_decode SRCS+= decode_der2key.c decode_epki2pki.c decode_msblob2key.c decode_pvk2key.c @@ -463,8 +458,8 @@ SRCS+= kdf_exch.c # providers/implementations/kdfs SRCS+= argon2.c hkdf.c hmacdrbg_kdf.c kbkdf.c krb5kdf.c -SRCS+= pbkdf1.c pbkdf2.c pbkdf2_fips.c -SRCS+= pkcs12kdf.c pvkkdf.c scrypt.c sskdf.c sshkdf.c tls1_prf.c x942kdf.c +SRCS+= pbkdf2.c pbkdf2_fips.c +SRCS+= pkcs12kdf.c scrypt.c sskdf.c sshkdf.c tls1_prf.c x942kdf.c # providers/implementations/kem SRCS+= ec_kem.c ecx_kem.c kem_util.c ml_kem_kem.c mlx_kem.c rsa_kem.c @@ -484,6 +479,7 @@ SRCS+= siphash_prov.c # providers/implementations/rands SRCS+= drbg.c drbg_ctr.c drbg_hash.c drbg_hmac.c test_rng.c SRCS+= seed_src.c +SRCS+= seed_src_jitter.c # providers/implementations/rands/seeding SRCS+= rand_cpu_x86.c rand_tsc.c rand_unix.c rand_win.c @@ -499,7 +495,7 @@ SRCS+= aes_skmgmt.c generic.c SRCS+= file_store.c file_store_any2obj.c # rand -SRCS+= prov_seed.c rand_deprecated.c rand_egd.c rand_err.c rand_lib.c +SRCS+= prov_seed.c rand_deprecated.c rand_err.c rand_lib.c SRCS+= rand_meth.c rand_pool.c rand_uniform.c randfile.c # rc2 @@ -573,7 +569,10 @@ SRCS+= store_err.c store_init.c store_lib.c store_meth.c store_register.c SRCS+= store_result.c store_strings.c # thread -SRCS+= api.c arch.c arch/thread_win.c arch/thread_posix.c arch/thread_none.c internal.c +SRCS+= api.c arch.c internal.c +SRCS+= thread_none.c +SRCS+= thread_posix.c +SRCS+= thread_win.c # ts SRCS+= ts_asn1.c ts_conf.c ts_err.c ts_lib.c ts_req_print.c ts_req_utils.c @@ -620,11 +619,21 @@ SRCS+= x509type.c INCS= aes.h asn1.h asn1err.h asn1t.h async.h asyncerr.h bio.h INCS+= bioerr.h blowfish.h bn.h bnerr.h buffer.h buffererr.h byteorder.h camellia.h -INCS+= cast.h cmac.h cmp.h cmp_util.h cmperr.h cms.h cmserr.h comp.h comperr.h conf.h conf_api.h +INCS+= cast.h cmac.h cmp.h cmp_util.h cmperr.h cms.h cmserr.h comp.h comperr.h conf.h INCS+= conferr.h configuration.h conftypes.h core.h core_dispatch.h core_names.h core_object.h INCS+= crmf.h crmferr.h crypto.h cryptoerr.h cryptoerr_legacy.h ct.h cterr.h -INCS+= decoder.h decodererr.h des.h dh.h dherr.h dsa.h -INCS+= dsaerr.h dtls1.h e_os2.h e_ostime.h ebcdic.h ec.h ecdh.h ecdsa.h ecerr.h encoder.h encodererr.h +INCS+= decoder.h decodererr.h +INCS+= der_digests.h +INCS+= der_dsa.h +INCS+= der_ec.h +INCS+= der_ecx.h +INCS+= der_ml_dsa.h +INCS+= der_rsa.h +INCS+= der_slh_dsa.h +INCS+= der_wrap.h +INCS+= des.h dh.h dherr.h dsa.h +INCS+= dsaerr.h +INCS+= dtls1.h e_os2.h e_ostime.h ebcdic.h ec.h ecdh.h ecdsa.h ecerr.h encoder.h encodererr.h INCS+= engine.h engineerr.h err.h ess.h esserr.h evp.h evperr.h fips_names.h fipskey.h hmac.h hpke.h http.h httperr.h idea.h indicator.h INCS+= kdf.h kdferr.h lhash.h macros.h md2.h md4.h md5.h mdc2.h modes.h obj_mac.h INCS+= objects.h objectserr.h ocsp.h ocsperr.h opensslconf.h opensslv.h @@ -762,6 +771,7 @@ PICFLAG+= -DOPENSSL_PIC ${LCRYPTO_SRC}/crypto/stack \ ${LCRYPTO_SRC}/crypto/store \ ${LCRYPTO_SRC}/crypto/thread \ + ${LCRYPTO_SRC}/crypto/thread/arch \ ${LCRYPTO_SRC}/crypto/ts \ ${LCRYPTO_SRC}/crypto/txt_db \ ${LCRYPTO_SRC}/crypto/ui \ @@ -771,6 +781,7 @@ PICFLAG+= -DOPENSSL_PIC ${LCRYPTO_SRC}/providers \ ${LCRYPTO_SRC}/providers/common \ ${LCRYPTO_SRC}/providers/common/der \ + ${LCRYPTO_SRC}/providers/common/include/prov \ ${LCRYPTO_SRC}/providers/implementations/asymciphers \ ${LCRYPTO_SRC}/providers/implementations/ciphers \ ${LCRYPTO_SRC}/providers/implementations/digests \ @@ -787,4 +798,4 @@ PICFLAG+= -DOPENSSL_PIC ${LCRYPTO_SRC}/providers/implementations/storemgmt \ ${LCRYPTO_SRC}/ssl \ ${LCRYPTO_SRC}/ssl/record \ - ${LCRYPTO_SRC}/ssl/record/methods + ${LCRYPTO_SRC}/ssl/record/methods \ diff --git a/secure/lib/libcrypto/modules/Makefile.inc b/secure/lib/libcrypto/modules/Makefile.inc index 4b3d9fc512ce..64fb57ee74c5 100644 --- a/secure/lib/libcrypto/modules/Makefile.inc +++ b/secure/lib/libcrypto/modules/Makefile.inc @@ -10,11 +10,4 @@ CFLAGS+= -I${LCRYPTO_SRC}/providers/common/include CFLAGS+= -I${LCRYPTO_SRC}/providers/fips/include CFLAGS+= -I${LCRYPTO_SRC}/providers/implementations/include -# common -SRCS+= provider_err.c provider_ctx.c -SRCS+= provider_util.c - -.PATH: ${LCRYPTO_SRC}/providers \ - ${LCRYPTO_SRC}/providers/common - WARNS?= 0 diff --git a/secure/lib/libcrypto/modules/legacy/Makefile b/secure/lib/libcrypto/modules/legacy/Makefile index db05f212f62a..8f91d9504504 100644 --- a/secure/lib/libcrypto/modules/legacy/Makefile +++ b/secure/lib/libcrypto/modules/legacy/Makefile @@ -1,7 +1,7 @@ SHLIB_NAME?= legacy.so LIBADD= crypto -SRCS+= legacyprov.c prov_running.c params_idx.c +SRCS+= legacyprov.c prov_running.c # ciphers SRCS+= ciphercommon.c ciphercommon_hw.c ciphercommon_block.c \ @@ -16,17 +16,48 @@ SRCS+= cipher_rc4.c cipher_rc4_hw.c SRCS+= cipher_rc4_hmac_md5.c cipher_rc4_hmac_md5_hw.c SRCS+= cipher_seed.c cipher_seed_hw.c -# digests +# crypto +SRCS+= cpuid.c +SRCS+= ctype.c + +# crypto/des +SRCS+= des_enc.c +SRCS+= fcrypt_b.c + +# crypto/md5 +SRCS+= md5_dgst.c +SRCS+= md5_one.c +SRCS+= md5_sha1.c + +# providers/implementations/digests SRCS+= digestcommon.c SRCS+= md4_prov.c wp_prov.c ripemd_prov.c -# kdfs -SRCS+= pbkdf1.c pvkkdf.c +# providers/implementations/kdfs +SRCS+= pbkdf1.c +SRCS+= pvkkdf.c + +# common +SRCS+= provider_err.c provider_ctx.c +SRCS+= provider_util.c + +SRCS+= tls_pad.c + +# This is needed so the provider can be loaded for us. +# +# There's a discrepancy between how this provider gets built in OpenSSL proper +# and FreeBSD. +SRCS+= params_idx.c .include .PATH: ${LCRYPTO_SRC}/crypto \ + ${LCRYPTO_SRC}/crypto/des \ + ${LCRYPTO_SRC}/crypto/md5 \ + ${LCRYPTO_SRC}/providers \ + ${LCRYPTO_SRC}/providers/common \ ${LCRYPTO_SRC}/providers/implementations/ciphers \ ${LCRYPTO_SRC}/providers/implementations/digests \ ${LCRYPTO_SRC}/providers/implementations/kdfs \ - ${LCRYPTO_SRC}/ssl + ${LCRYPTO_SRC}/ssl \ + ${LCRYPTO_SRC}/ssl/record/methods \ diff --git a/secure/lib/libssl/Makefile b/secure/lib/libssl/Makefile index b0ca31644279..fe2e2492045f 100644 --- a/secure/lib/libssl/Makefile +++ b/secure/lib/libssl/Makefile @@ -76,7 +76,7 @@ CFLAGS+=-DOPENSSL_NO_KTLS SRCS+= ktls_meth.c .endif -LIBADD= crypto +LIBADD= pthread crypto CFLAGS+= -I${LCRYPTO_SRC}/ssl CFLAGS+= -I${.OBJDIR:H}/libcrypto diff --git a/share/mk/src.libnames.mk b/share/mk/src.libnames.mk index d6597caf7e2a..95cd3b02d8e4 100644 --- a/share/mk/src.libnames.mk +++ b/share/mk/src.libnames.mk @@ -329,7 +329,7 @@ _DP_archive+= md .endif .endif _DP_sqlite3= pthread -_DP_ssl= crypto +_DP_ssl= pthread crypto _DP_ssh= crypto crypt z .if ${MK_LDNS} != "no" _DP_ssh+= ldns From nobody Thu Sep 18 19:25:02 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cSQZR2Bhqz67tSM; Thu, 18 Sep 2025 19:25:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cSQZR0d7Fz3GxP; Thu, 18 Sep 2025 19:25:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758223503; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rhPBSpMkGEiE3vTtYjM5zD7VQyZTQfdj+CXiWX5kVcc=; b=xG0r3faSZH8Bfc5nBEWmEjrY9EmM3/hFKhWBmA82BPGDLilomD+nHwndVsUdqtVNh+/6kY exnekNOkY9/kVs0tKXY/HVa6UF/VoqI/bfBkI1yp7kPs4iQ/inDqFlz9ki0IlZwcVMwjfS zZIzIsl0elqJLDIkcGQ/qQXMVDBlKhxBxcYmQ1b75RWxrWQ+rme2BHSDWe8dZOPdIDRsH7 w4lQ4JfMxwEMJ01zZ2pQUMcYQTWNeKXYLRFXkT4ISzors0XQRMn5MN1Aqt8WeGlyvij0XL 9JweMwE9hRfVx2zamwTr/C3rdjinZYPuBKpUde1UgfMGstNUE++tq49/DDAzIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758223503; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rhPBSpMkGEiE3vTtYjM5zD7VQyZTQfdj+CXiWX5kVcc=; b=X9BoqtxAvAzCajwAltnS5KR8dfdUCL9OQWLcoP4y9IT5m50E0+Nu5QVgo3VmgdVtNkUBIv Je03BHIFy2h7oHXaYvxGUWOMtjgtKw1f8qNJSyK03Dm/4zlh6INUsmOMsP8KpYzbfv8L/b ghC/BiUgW64jtnLf4CVpxkE9u86Qo1YOyqLXi/iCgVSgp2b7wQjqqyzYT5onXnZ9JWTOgu VtVxroTmDRDm9/cghIK8zL70DrQ4SUeQiN4R47dPqL99ZLy8MCkoAp52xkWmpfclEb0VYF aOYy4kPsOc0xuwTyTbdPyrgsUij4cpwd1YIEg6Ky9o3LNyNitGvDRCUUgXt8Qw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758223503; a=rsa-sha256; cv=none; b=NFMelCWekUXcaSbuxOGOnZjAjneBABW6VU0mVzjT7Tflov95xyBOtrb1iAk3BcDUvOpxI/ +PFPItOPcSjTy+Zb8xf4qaJc0cgA15OHbyUfT4N8QhI7iF+qv76hKGoQd+XOSULbDmJ/QZ s4UERnNSdJHBSgNtrCxpzwIv42QzrRYvADYetPHySB7pq+iAfqPX9HgbqQEwOnUuRP8qm5 Xmax8PgmyG2bsFWLSCX/Hr4GdJ9ser1P1WHQnJp8Eh1x2kyG53ANk2g1B5jJNaJ3zwPHxa SGaES4K4XtmrGG1JAXOLzc4a/WjTGpSm82OY7dJZsIhQM+MVsKPZATCj/bcBjA== 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 4cSQZR09qrz7tr; Thu, 18 Sep 2025 19:25:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58IJP233007200; Thu, 18 Sep 2025 19:25:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58IJP2P1007197; Thu, 18 Sep 2025 19:25:02 GMT (envelope-from git) Date: Thu, 18 Sep 2025 19:25:02 GMT Message-Id: <202509181925.58IJP2P1007197@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Colin Percival Subject: git: 2c06b824436d - main - pkgbootstrap: Build pkg if PORTSDIR exists List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2c06b824436df6177545cc0f1603e5c3bfbf3365 Auto-Submitted: auto-generated The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=2c06b824436df6177545cc0f1603e5c3bfbf3365 commit 2c06b824436df6177545cc0f1603e5c3bfbf3365 Author: Colin Percival AuthorDate: 2025-09-18 19:21:29 +0000 Commit: Colin Percival CommitDate: 2025-09-18 19:21:29 +0000 pkgbootstrap: Build pkg if PORTSDIR exists If we don't already have the pkg tool installed, we need to install it before we can build packages for pkgbase. (This arises in release builds which run in clean chroots; most users will have pkg installed already.) Installing it from pkg.freebsd.org via "pkg bootstrap" runs into two problems: First, it's an external dependency with security implications; and second, there's a bootstrapping problem on new major versions where pkg.freebsd.org does not have packages yet. Instead, if we have a ports tree, use it to build pkg ourselves. With hat: re MFC after: 6 hours Sponsored by: https://www.patreon.com/cperciva --- Makefile.inc1 | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Makefile.inc1 b/Makefile.inc1 index cd0385ea32ac..d41741d15384 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -1992,8 +1992,16 @@ PKG_ABI!= ${PKG_CMD} -o ABI_FILE=${PKG_ABI_FILE} config ABI _pkgbootstrap: .PHONY .if make(*package*) && !exists(${LOCALBASE}/sbin/pkg) +.if exists(${PORTSDIR}/ports-mgmt/pkg/Makefile) + env - UNAME_r=${UNAME_r} PATH=$$PATH \ + make -C ${PORTSDIR}/ports-mgmt/pkg \ + I_DONT_CARE_IF_MY_BUILDS_TARGET_THE_WRONG_RELEASE=1 \ + BATCH=1 WRKDIRPREFIX=/tmp/ports DISTDIR=/tmp/distfiles \ + all install clean +.else @env ASSUME_ALWAYS_YES=YES pkg bootstrap .endif +.endif PKG_BIN_VERSION!=${PKG_CMD} --version
/dev/null |\ awk -F. '/^[0-9.]+$$/ {print $$1 * 10000 + $$2 * 100 + $$3}' From nobody Thu Sep 18 22:08:07 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cSVBb4SFbz686Xv; Thu, 18 Sep 2025 22:08:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cSVBb3t0Yz3kND; Thu, 18 Sep 2025 22:08:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758233287; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SQDsmDLhb+Hxo/DoTzCidGt59sSMMVf1jW7pUA62rWY=; b=Jyw2TdoAF5apWlK7c1bSEBE8TUkCehO51mX+xHHi60pJ9Wi/Nol8g1MhpBh1u4kKyJgJMD x8dX/TjfVv3+loglpXsTKrMG32MsCjZXAy0MK8Xkk4tJYz9mRcFMYWxavJcXp0bMTVfX7R 5+Hgg92EwAoicomagA77yJL/KC8A6BC7IVMLEYe7yIfuFVL+b1CvuB14a0ey28dCJTQ1K3 k9CesqLWlBzQBL1B5NgEhhMbHcps/4ZxG264R6Uci7TEq1ByAA+xF4dEJqAe2XZI3zyTG/ PfU4sT6NUgVpUl9PW2tHqW9rr8IHoWlGiCXiOq4yPOmn49m/sct/jpoJzxkJvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758233287; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SQDsmDLhb+Hxo/DoTzCidGt59sSMMVf1jW7pUA62rWY=; b=i0v6QnXHc7S8OQHlwgdurRr0Pu0pROdzYd8H93CW1qmIeHFMsBGpydlYIThPIqgyWUjJ75 nwuaVYjifshpwhfbYTuTenLHpEy6HeEmn/nz6IixxhJ6/pDVds9xbI5Igp4C+VTEuis3kL ySjZGiViYFTk838V0zBE6DaNAO+uoYbDqINiRR7zXKlMGa6HAo93uiZN3pMgqKSB2pmtJG lVQRRCCjIipaLGm+r2Dfed1Q3obiKv9HyCLFIW32HwwlVagFdO53A4FROpql8k4tGJIS+n SmKhKjlXILqbzWz9Qevez95MOSk6ZN9EOd80J7j7hojXHSc76loZL7A6DAnPOA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758233287; a=rsa-sha256; cv=none; b=fhYYV7A2hBZpLoaANl7a6LS4Dc0bCe1C9usSriqhnytf8P6+3u1HpRHit2r4Df2yA4Dwg8 5fIbaubU8EyS5zlU1ItQvdpE+5rGVtvqEJ0YiIkEe0L1aIb9ZNgxuEY4IQGeho9YE2TPss 3+rpMuMFN/uVeXo1/1RnwkcYCuTYkLjhXy/Sm7B46xIiyrn+0ZhubpFtOo2d7Y4lFOpKRE ZheMD3Kw9XpP+w6URS5iUmyARwfYJdFmpdBCGVwH/DXBK0U9TrmyiSI3VDKI/XGZXA5Y7m Eed63ZmakkNa7UG3NJI8QIEMeNaUl8A/z3LPBDsPKCoMxTq8rZpPSLY7rnr5Ew== 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 4cSVBb3QRGzTt8; Thu, 18 Sep 2025 22:08:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58IM87tl007811; Thu, 18 Sep 2025 22:08:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58IM87fG007808; Thu, 18 Sep 2025 22:08:07 GMT (envelope-from git) Date: Thu, 18 Sep 2025 22:08:07 GMT Message-Id: <202509182208.58IM87fG007808@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ahmad Khalifa Subject: git: e0c83ab3b362 - main - gpioled: remove redundant -1 check List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: vexeduxr X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e0c83ab3b362c9bd45c5d21683012cecab28d802 Auto-Submitted: auto-generated The branch main has been updated by vexeduxr: URL: https://cgit.FreeBSD.org/src/commit/?id=e0c83ab3b362c9bd45c5d21683012cecab28d802 commit e0c83ab3b362c9bd45c5d21683012cecab28d802 Author: Ahmad Khalifa AuthorDate: 2025-09-18 22:03:32 +0000 Commit: Ahmad Khalifa CommitDate: 2025-09-18 22:06:37 +0000 gpioled: remove redundant -1 check The function is never called with onoff = -1 MFC after: 3 days MFC with: 9ae3c30 --- sys/dev/gpio/gpioled.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/sys/dev/gpio/gpioled.c b/sys/dev/gpio/gpioled.c index 71af5741b2fe..a36c2faef379 100644 --- a/sys/dev/gpio/gpioled.c +++ b/sys/dev/gpio/gpioled.c @@ -75,8 +75,6 @@ gpioled_control(void *priv, int onoff) struct gpioled_softc *sc; sc = (struct gpioled_softc *)priv; - if (onoff == -1) /* Keep the current state. */ - return; if (sc->sc_softinvert) onoff = !onoff; GPIOLED_LOCK(sc); From nobody Thu Sep 18 22:10:52 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cSVFn0svDz686pd; Thu, 18 Sep 2025 22:10: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 4cSVFn07T5z3lSx; Thu, 18 Sep 2025 22:10:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758233453; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1SiiepdOcRXUTlnSP7B1MpaZZJ93iX1viO1cAMsIRFA=; b=iEQEuWs95wUm9q+9kvyZJW9GP3VtizOMB6jJM7AWyD4ylA5RJSkYE2MrUhyg0InyUNyG/i F8yPaqYv75PmtvO3PH19o9dUckErgPdlyntb7WSKpvDvhyK9Luhz7mDuuQPXZ8fnh84/6L YDeCd5O+bpmHiwgN+hhO5nmOM5XY2U5MS+U+kw3WvrDcaVcby3ALKksghEdi4CmyNMAUCw Cf7fKQA9ep343ytWe/Nez/ayeDgcVjHH5K2Xg+hYipJRNA71pjvLvBbl4vEq5F39dFfA4N FcIXspKYa8ifZ/ye2bLxfk/wrqEx0WbChzn/rr4cLeEsOyFs70td4saHJ0CnIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758233453; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1SiiepdOcRXUTlnSP7B1MpaZZJ93iX1viO1cAMsIRFA=; b=ZqtYE8bEeMX1HFX2BJ+mxB8AYmGlnS3MNNKZJ6B8J0YUsVChUDpr8UiqV1IDl+94wt94Nj LXNP/Ol/lBs0rwaBMXegVk+lh8S/Y5mx6A2QJx7QykhrWQgOseOeZ8iM/r2Pdv4opBw0+n /zMvtVEmzVn526kNu+4Le/sHJzY2HpTb+3eCQGTdMkQRIWloT6hiUBNowEOrQbCbP/9RFp 24TP0y1E0ly4i0mIYrNsNWi7UsXzCZIGW3HyrXnx3TZDBG1w/zKUSZw3rp2G7KGzSlwJx4 Hu6Vv+vEDezBITS/yI9EgolAs7KlKr5sI0lzHAbII9K/5Ro1u1Qfm7zdeCxIlg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758233453; a=rsa-sha256; cv=none; b=Zf6dJiBhJWh6HXOPQxrynGFMH5sTHbX7oXBqGbl2+/9SK7knBzDt5bPIjVPtW6Y4C5OxeQ qOT9RLEx9uFrhXG16yfFV8L2JSt/FC23aFYWSpH1cej+eMcLgEd+b8FWUfVln+I53ojwuZ SdI4YNQRZZbGhR5kUiUpyZaobCo2mywIxHjQYA2Eom3DOcSPwj4E8hykl8VU3FGCZA7/aW CgPM+hQH+BKTFocPSIyprH9xVi3Evwga3Pm5/EYh3zec3vHKAieTvaGDLGHswxO15IZK21 Ecm2cfo8V3SEE5PTspgLqSj4YbMk6QS7q1Z5MeUZlB39gTu8dCxKBLMCD2Qy6A== 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 4cSVFm6mwSzTbK; Thu, 18 Sep 2025 22:10: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 58IMAqtF020979; Thu, 18 Sep 2025 22:10:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58IMAqu2020976; Thu, 18 Sep 2025 22:10:52 GMT (envelope-from git) Date: Thu, 18 Sep 2025 22:10:52 GMT Message-Id: <202509182210.58IMAqu2020976@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: bf115203bb8a - main - dtrace: Deduplicate dtrace_sync() and dtrace_xcall() implementations List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bf115203bb8a61bd03ba23931ff0b5bf931b7d1b Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=bf115203bb8a61bd03ba23931ff0b5bf931b7d1b commit bf115203bb8a61bd03ba23931ff0b5bf931b7d1b Author: Mark Johnston AuthorDate: 2025-09-17 15:29:48 +0000 Commit: Mark Johnston CommitDate: 2025-09-18 22:09:49 +0000 dtrace: Deduplicate dtrace_sync() and dtrace_xcall() implementations dtrace_xcall() is just a thin wrapper around smp_rendezvous_cpus(). There's no need for six identical implementations to live in MD layers. No functional change intended. MFC after: 2 weeks --- .../contrib/opensolaris/uts/common/dtrace/dtrace.c | 25 ++++++++++++++++++++ sys/cddl/dev/dtrace/aarch64/dtrace_subr.c | 27 ---------------------- sys/cddl/dev/dtrace/amd64/dtrace_subr.c | 25 -------------------- sys/cddl/dev/dtrace/arm/dtrace_subr.c | 25 -------------------- sys/cddl/dev/dtrace/i386/dtrace_subr.c | 25 -------------------- sys/cddl/dev/dtrace/powerpc/dtrace_subr.c | 25 -------------------- sys/cddl/dev/dtrace/riscv/dtrace_subr.c | 27 ---------------------- 7 files changed, 25 insertions(+), 154 deletions(-) diff --git a/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c b/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c index 8078f3f6d4b1..853cfb845878 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c +++ b/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c @@ -707,6 +707,31 @@ dtrace_error(uint32_t *counter) } while (dtrace_cas32(counter, oval, nval) != oval); } +void +dtrace_xcall(processorid_t cpu, dtrace_xcall_t func, void *arg) +{ + cpuset_t cpus; + + if (cpu == DTRACE_CPUALL) + cpus = all_cpus; + else + CPU_SETOF(cpu, &cpus); + + smp_rendezvous_cpus(cpus, smp_no_rendezvous_barrier, func, + smp_no_rendezvous_barrier, arg); +} + +static void +dtrace_sync_func(void) +{ +} + +void +dtrace_sync(void) +{ + dtrace_xcall(DTRACE_CPUALL, (dtrace_xcall_t)dtrace_sync_func, NULL); +} + /* * Use the DTRACE_LOADFUNC macro to define functions for each of loading a * uint8_t, a uint16_t, a uint32_t and a uint64_t. diff --git a/sys/cddl/dev/dtrace/aarch64/dtrace_subr.c b/sys/cddl/dev/dtrace/aarch64/dtrace_subr.c index 32e84d8fbfe9..ff880e804770 100644 --- a/sys/cddl/dev/dtrace/aarch64/dtrace_subr.c +++ b/sys/cddl/dev/dtrace/aarch64/dtrace_subr.c @@ -124,33 +124,6 @@ dtrace_toxic_ranges(void (*func)(uintptr_t base, uintptr_t limit)) (*func)(0, (uintptr_t)VM_MIN_KERNEL_ADDRESS); } -void -dtrace_xcall(processorid_t cpu, dtrace_xcall_t func, void *arg) -{ - cpuset_t cpus; - - if (cpu == DTRACE_CPUALL) - cpus = all_cpus; - else - CPU_SETOF(cpu, &cpus); - - smp_rendezvous_cpus(cpus, smp_no_rendezvous_barrier, func, - smp_no_rendezvous_barrier, arg); -} - -static void -dtrace_sync_func(void) -{ - -} - -void -dtrace_sync(void) -{ - - dtrace_xcall(DTRACE_CPUALL, (dtrace_xcall_t)dtrace_sync_func, NULL); -} - static uint64_t nsec_scale; #define SCALE_SHIFT 25 diff --git a/sys/cddl/dev/dtrace/amd64/dtrace_subr.c b/sys/cddl/dev/dtrace/amd64/dtrace_subr.c index 81aa53d00bd8..877d52fe18a7 100644 --- a/sys/cddl/dev/dtrace/amd64/dtrace_subr.c +++ b/sys/cddl/dev/dtrace/amd64/dtrace_subr.c @@ -142,31 +142,6 @@ dtrace_toxic_ranges(void (*func)(uintptr_t base, uintptr_t limit)) (*func)(0, la57 ? (uintptr_t)addr_P5Tmap : (uintptr_t)addr_P4Tmap); } -void -dtrace_xcall(processorid_t cpu, dtrace_xcall_t func, void *arg) -{ - cpuset_t cpus; - - if (cpu == DTRACE_CPUALL) - cpus = all_cpus; - else - CPU_SETOF(cpu, &cpus); - - smp_rendezvous_cpus(cpus, smp_no_rendezvous_barrier, func, - smp_no_rendezvous_barrier, arg); -} - -static void -dtrace_sync_func(void) -{ -} - -void -dtrace_sync(void) -{ - dtrace_xcall(DTRACE_CPUALL, (dtrace_xcall_t)dtrace_sync_func, NULL); -} - #ifdef notyet void dtrace_safe_synchronous_signal(void) diff --git a/sys/cddl/dev/dtrace/arm/dtrace_subr.c b/sys/cddl/dev/dtrace/arm/dtrace_subr.c index bb42044aa477..10e9281709b6 100644 --- a/sys/cddl/dev/dtrace/arm/dtrace_subr.c +++ b/sys/cddl/dev/dtrace/arm/dtrace_subr.c @@ -138,31 +138,6 @@ dtrace_toxic_ranges(void (*func)(uintptr_t base, uintptr_t limit)) */ } -void -dtrace_xcall(processorid_t cpu, dtrace_xcall_t func, void *arg) -{ - cpuset_t cpus; - - if (cpu == DTRACE_CPUALL) - cpus = all_cpus; - else - CPU_SETOF(cpu, &cpus); - - smp_rendezvous_cpus(cpus, smp_no_rendezvous_barrier, func, - smp_no_rendezvous_barrier, arg); -} - -static void -dtrace_sync_func(void) -{ -} - -void -dtrace_sync(void) -{ - dtrace_xcall(DTRACE_CPUALL, (dtrace_xcall_t)dtrace_sync_func, NULL); -} - /* * DTrace needs a high resolution time function which can * be called from a probe context and guaranteed not to have diff --git a/sys/cddl/dev/dtrace/i386/dtrace_subr.c b/sys/cddl/dev/dtrace/i386/dtrace_subr.c index 026581f5a899..ebe2194a4b2f 100644 --- a/sys/cddl/dev/dtrace/i386/dtrace_subr.c +++ b/sys/cddl/dev/dtrace/i386/dtrace_subr.c @@ -139,31 +139,6 @@ dtrace_toxic_ranges(void (*func)(uintptr_t base, uintptr_t limit)) (*func)(0, kernelbase); } -void -dtrace_xcall(processorid_t cpu, dtrace_xcall_t func, void *arg) -{ - cpuset_t cpus; - - if (cpu == DTRACE_CPUALL) - cpus = all_cpus; - else - CPU_SETOF(cpu, &cpus); - - smp_rendezvous_cpus(cpus, smp_no_rendezvous_barrier, func, - smp_no_rendezvous_barrier, arg); -} - -static void -dtrace_sync_func(void) -{ -} - -void -dtrace_sync(void) -{ - dtrace_xcall(DTRACE_CPUALL, (dtrace_xcall_t)dtrace_sync_func, NULL); -} - #ifdef notyet void dtrace_safe_synchronous_signal(void) diff --git a/sys/cddl/dev/dtrace/powerpc/dtrace_subr.c b/sys/cddl/dev/dtrace/powerpc/dtrace_subr.c index 5dd083310e6f..ee8be8da642f 100644 --- a/sys/cddl/dev/dtrace/powerpc/dtrace_subr.c +++ b/sys/cddl/dev/dtrace/powerpc/dtrace_subr.c @@ -123,31 +123,6 @@ dtrace_toxic_ranges(void (*func)(uintptr_t base, uintptr_t limit)) */ } -void -dtrace_xcall(processorid_t cpu, dtrace_xcall_t func, void *arg) -{ - cpuset_t cpus; - - if (cpu == DTRACE_CPUALL) - cpus = all_cpus; - else - CPU_SETOF(cpu, &cpus); - - smp_rendezvous_cpus(cpus, smp_no_rendezvous_barrier, func, - smp_no_rendezvous_barrier, arg); -} - -static void -dtrace_sync_func(void) -{ -} - -void -dtrace_sync(void) -{ - dtrace_xcall(DTRACE_CPUALL, (dtrace_xcall_t)dtrace_sync_func, NULL); -} - static int64_t tgt_cpu_tsc; static int64_t hst_cpu_tsc; static int64_t timebase_skew[MAXCPU]; diff --git a/sys/cddl/dev/dtrace/riscv/dtrace_subr.c b/sys/cddl/dev/dtrace/riscv/dtrace_subr.c index 3a6aacd86fcd..ed2c0bdba7e2 100644 --- a/sys/cddl/dev/dtrace/riscv/dtrace_subr.c +++ b/sys/cddl/dev/dtrace/riscv/dtrace_subr.c @@ -127,33 +127,6 @@ dtrace_toxic_ranges(void (*func)(uintptr_t base, uintptr_t limit)) (*func)(0, (uintptr_t)VM_MIN_KERNEL_ADDRESS); } -void -dtrace_xcall(processorid_t cpu, dtrace_xcall_t func, void *arg) -{ - cpuset_t cpus; - - if (cpu == DTRACE_CPUALL) - cpus = all_cpus; - else - CPU_SETOF(cpu, &cpus); - - smp_rendezvous_cpus(cpus, smp_no_rendezvous_barrier, func, - smp_no_rendezvous_barrier, arg); -} - -static void -dtrace_sync_func(void) -{ - -} - -void -dtrace_sync(void) -{ - - dtrace_xcall(DTRACE_CPUALL, (dtrace_xcall_t)dtrace_sync_func, NULL); -} - /* * DTrace needs a high resolution time function which can * be called from a probe context and guaranteed not to have From nobody Thu Sep 18 22:10:54 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cSVFp2PMtz686vc; Thu, 18 Sep 2025 22:10: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 4cSVFp1GZbz3lY8; Thu, 18 Sep 2025 22:10:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758233454; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RbmcHBtYh4tT3ENf01XPNkiI8k9+9TUBhV6eG8Liex0=; b=KC6pqKBS4cozynYL35JSWnVBSqvfAER85uVIlNlfCcI+hE3Mh70gwpm2mfMlRlpW2UHnf0 OlZDnsXQ+6oLqaes8GBEK2KY/IumWmMTbNhTT9dbtJ365+k+wbrEIGw2+vFKBRM84sme4z QmxLFfBD/j8Ni+ztJBh+nqFSm5vUAL28N/8VLiKrD6/tRLCvukMG/Os/3+v19nfJ8gLoCg Xp77Givzg2cqXmwy6/QmEaUBkID+Rf5nitra4J2BNt2z/JGPvSW4yuDw8La7waX5elmiT5 pylDf6EIrGIsDE0eppI68w80XKzKC9Gt5AZcdlNS3tqBgKFv4h+rBwp6JQVE5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758233454; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RbmcHBtYh4tT3ENf01XPNkiI8k9+9TUBhV6eG8Liex0=; b=e8XGNhmKgi4ud5Jnxf80yCCrF+g/nlmt5MvAoUGU324qjmbxz712tgWB4abDaEA7hZfjHF 7bs6wm0eltk8XdDc6rlkhTc1YZihNC+Bg3f/1B/m4Xczv478JyDeSxbiq80fimrGXpyNky 2PiNGjPfi2xetO0HzHu1k5GyThqjRCz+skreFykknwg679aG+ithm+8qSQ57oVfZ1BSAMw LlnAvZx2BeVe1KFJfZJYIUvnWKIJD7taNXIvKfLARsr/eefLqCfya1oxoWVfkXEmsZZdvG OkKrR45Z2Ie3/5kHyJC9sA5lcBmhlR8tYan8kUoScpxI1Rm5pxL4/4MeFyYcbQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758233454; a=rsa-sha256; cv=none; b=qdYGM+86I1WQZS8D1EFVtT95HqulRbc583Di8usX11dy50gDSBaVrZ4fK/kEEst/XU9RCk x+Xa7hxG/6KVy/c+ZQfjPahMJdTZbibtqCZITwI7/gmh+PaI6J9c8vaMrUQITQUnDZuGq9 Q1ieX7UFFQDp/ts4+0EEQV/VtTB2nO7JTitBVFUedQOmNJm7LBAED/IqMGj8mhz1VEfa0F Asd2PE6Fyi/65YaBqGyZmneN5kEB3CEdpzZmVepaCTB8OmFS+6g3G/1i5vCqT8w40nZDF3 g5EkVga2RbkZmC2ZfMp5/3Fkp7tzAI7H0Tm+sDh0MgHB9zIzpHVRL5HijyYy7A== 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 4cSVFp0q66zTtN; Thu, 18 Sep 2025 22:10: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 58IMAswb021014; Thu, 18 Sep 2025 22:10:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58IMAsaN021011; Thu, 18 Sep 2025 22:10:54 GMT (envelope-from git) Date: Thu, 18 Sep 2025 22:10:54 GMT Message-Id: <202509182210.58IMAsaN021011@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 4784ca874410 - main - pw: Remove duplicate lines from the pw useradd usage message List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4784ca87441093328cec4e9b133608e172343f64 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=4784ca87441093328cec4e9b133608e172343f64 commit 4784ca87441093328cec4e9b133608e172343f64 Author: Mark Johnston AuthorDate: 2025-09-18 15:13:26 +0000 Commit: Mark Johnston CommitDate: 2025-09-18 22:09:49 +0000 pw: Remove duplicate lines from the pw useradd usage message No functional change intended. MFC after: 1 week Sponsored by: The FreeBSD Foundation Sponsored by: Klara, Inc. --- usr.sbin/pw/pw.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/usr.sbin/pw/pw.c b/usr.sbin/pw/pw.c index a4c95258f3bb..fc778b16c7e5 100644 --- a/usr.sbin/pw/pw.c +++ b/usr.sbin/pw/pw.c @@ -257,8 +257,6 @@ cmdhelp(int mode, int which) "\t-Y update NIS maps\n" "\t-N no update\n" " Setting defaults:\n" - "\t-V etcdir alternate /etc location\n" - "\t-R rootdir alternate root directory\n" "\t-D set user defaults\n" "\t-b dir default home root dir\n" "\t-e period default expiry period\n" From nobody Thu Sep 18 22:42:46 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cSVyZ4DlTz688bs; Thu, 18 Sep 2025 22:42: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 4cSVyZ3Y6Vz3pqX; Thu, 18 Sep 2025 22:42:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758235366; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+tBrvCw2rV5mbBB6g0ctE1fQlsFnFWyeadlIjiz7eR8=; b=juOcdXgt6lgpRC5QuSdbw4MRYBuNBV5y8vVh41f4CWkNRBJoeu5Gmt3TwDs7KNrMLj4Yxb NNM59NZrPwgwtzERBoYJEEy17/qh30Ec+BhmRkPPHtkF80+fZnM0wltr763pelOUxybw3z Lv6LrAdMKLF0mNBuQcXOfDDGeXY9KyiXAaLJapTb7yuYpzep/WpQGLLP3XTcMiNE6K/MuF HIzNMdvMedRZnghjWjuyD62XzNmZoVcS2OghwshmzEjvAVi3YUgn7LhQnIo7FB5F/sduq1 Sn7IoYcounXFF3Az4Qjl5qOwVUUvX57kzeveQDqhUeexdrjPJIxa8UA0OcP5fw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758235366; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+tBrvCw2rV5mbBB6g0ctE1fQlsFnFWyeadlIjiz7eR8=; b=okl21iy+w4h7ZkvefgjZEP09o2MXKPyBcUjIldHDHWMFHxFbRgHeQWpRQ6YvCzGNR4jnen 2j34ozE9Z7WQFFKZMh29a2NwuG6IYeGZxiqcyc2TodYua9R2IVGg2UDE7gLz8PIri+yW/8 Jh/8nJ14LUGQXLO13Zf/Ye1j2yGmjMmRHAthObTdBYu3iASSjmxSW2hF8/dA6ED6TX0pMN HyxN9CYFE7b+FJXmcCYr/lISERqfrlQsixFXSvUXb2rUQLAmjW39D2Jd4i76hJn+4zntnW q9qMYrg53wIsI88l2cycdBuua0/ru7weKiS4RY3Xqnm7EBAw4m159YGhIa7IXA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758235366; a=rsa-sha256; cv=none; b=k1fF0XV7Zqq9MCaRcuWjLCNsnUfrBCwgDhlI+EBfWw3VW0jaNr6Gb7viDFAkEjXVWQp0/w BqP0qIp8C8DY9M1iu+luU5bggJP2t59lm7Ogj1MtuSP1TuPOBmj/BW1JRcOIxzZGclb1B0 qa9qtu+B4rd17msquJCrdd5T+Xv9OgJ2resTbgLCCoN+swJGwbe0ZtAlsowtpaOfLU5MgO M+cqpod78nJo6/2FON9eAkXhbJ8SluGSxk6DnCfomE2ZYLUYFeg9x7x3RUAfQ90iqLzeoj JV9RH+p0uKYyPy3+dvoPOHae3HJnCXTKqbtLBjJjpkMAuH8XItqv/vBygY9vPA== 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 4cSVyZ2yYkzWqn; Thu, 18 Sep 2025 22:42: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 58IMgkYh081713; Thu, 18 Sep 2025 22:42:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58IMgkNv081710; Thu, 18 Sep 2025 22:42:46 GMT (envelope-from git) Date: Thu, 18 Sep 2025 22:42:46 GMT Message-Id: <202509182242.58IMgkNv081710@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: daa63c9417a2 - main - pw: Print warnings when metadata updates fail List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: daa63c9417a28ad08881ff03df828fd8180dad12 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=daa63c9417a28ad08881ff03df828fd8180dad12 commit daa63c9417a28ad08881ff03df828fd8180dad12 Author: Mark Johnston AuthorDate: 2025-09-18 22:38:33 +0000 Commit: Mark Johnston CommitDate: 2025-09-18 22:38:33 +0000 pw: Print warnings when metadata updates fail We do this in most places already, but not consistently. MFC after: 1 week Sponsored by: The FreeBSD Foundation Sponsored by: Klara, Inc. --- usr.sbin/pw/cpdir.c | 6 ++++-- usr.sbin/pw/pw_user.c | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/usr.sbin/pw/cpdir.c b/usr.sbin/pw/cpdir.c index 3dee8f7c43ac..63068cab000c 100644 --- a/usr.sbin/pw/cpdir.c +++ b/usr.sbin/pw/cpdir.c @@ -127,8 +127,10 @@ copymkdir(int rootfd, char const * dir, int skelfd, mode_t mode, uid_t uid, /* * Propagate special filesystem flags */ - fchown(destfd, uid, gid); - fchflags(destfd, st.st_flags); + if (fchown(destfd, uid, gid) != 0) + warn("chown(%s)", p); + if (fchflags(destfd, st.st_flags) != 0) + warn("chflags(%s)", p); close(destfd); } closedir(d); diff --git a/usr.sbin/pw/pw_user.c b/usr.sbin/pw/pw_user.c index 8a9a4342f5ef..9f5cfb0f4473 100644 --- a/usr.sbin/pw/pw_user.c +++ b/usr.sbin/pw/pw_user.c @@ -123,7 +123,8 @@ mkdir_home_parents(int dfd, const char *dir) if (fstatat(dfd, dirs, &st, 0) == -1) { if (mkdirat(dfd, dirs, _DEF_DIRMODE) == -1) err(EX_OSFILE, "'%s' (home parent) is not a directory", dirs); - fchownat(dfd, dirs, 0, 0, 0); + if (fchownat(dfd, dirs, 0, 0, 0) != 0) + warn("chown(%s)", dirs); } free(dirs); From nobody Thu Sep 18 22:42:47 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cSVyb5J55z688fH; Thu, 18 Sep 2025 22:42:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cSVyb4Qr8z3q99; Thu, 18 Sep 2025 22:42:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758235367; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=btLp5BLsZAcqTuNzN/ZY5k8wRDacqiQ2fMcNJoCb1GM=; b=dfUnjK94N+BuWV0Rn0I2AoM6J7ESkWPG7t32o2sdDgSWHHqSxP/rIeITIn12p4mhzEOLe9 zK0X6r4msRYiON/1Dr7o8jLXjP74m+thMCC2j2mhYXOwO/mmYh8ayHGfBehzk4PiQDmWK+ AgRWhxPiFimEWhoFwu5jcf10AG/KBAkPcmbCTHGWGgixpcfB5ebR400OnYFad5igzH/HqN Hd/lvS6LNttRA/WAIUkQqJIV7WeAqsvljndcxKwxggBTeUS9zA+nMWvz1pL75fnmkU1J5+ XdGP6fNNDt2KkbHG8FaTUeWBVdBhcz7frdq32hHe1VCPKAtiSqR2X+XUxZRznw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758235367; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=btLp5BLsZAcqTuNzN/ZY5k8wRDacqiQ2fMcNJoCb1GM=; b=K0tlyU/TX9IJV2zNxkhjonKo4jXXEM3raBqlWV0Wvp+XZ8tGx2UZHKiNgjCaraIcBVb7ZK KT/YWaOr43OrKKr4lNkk2ZXe0qmUPQZCjWEHJqGHKd9KzSh8swP3eEeTn5LMLHDB6iHc/j Wl0AMQOileqeEcFzl6y+ebcGEUKb0vWbmOS5pJQqIYoyxHCa2NndknV4N/JT0cNE9xMxBX JctsXRsUWefwPnGMccWe8PXUhibvvN0TwwffmHMDOZaGj8aFWAspuE7PzkaEJL+gBL/IAl vAQWUXuj+VrwA4nRFUbipPS9p15J6L22TBt6B5gfFqAvrSXXGqgi5lowIrXxKg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758235367; a=rsa-sha256; cv=none; b=dxdVxQjuwdEpLHzrx3Anl8KRFXvzjk+dpXoOvyIWqAuJq9jw8JKB8SN/BkLevrptNAltY9 4tqcDquEGNCYIwgEvz1zoLmcUv/Mmq84g4rHwe8cIEDvg5s1OyPHbTP6AIOs/f7wP58gri eKzllr3YKgH2AeXHwN7Wqf+I+HVTry89xvwi+krX0Uutdolb+g1mr7UXKIqHDTeCz9+wot YQPu5ofsxp4a+00+vbD6dRBFs7+sFZKERuU2dC4I6/OREuoyzntyzuYZGw2kpfONbAuSAD CpjGfrRrLcIRbBqY5JHO6LlQN0n0CtXjfW79WohoDqvHHMvXKwMm0AvMP0f1bg== 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 4cSVyb3zLJzWp4; Thu, 18 Sep 2025 22:42:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58IMglXs081746; Thu, 18 Sep 2025 22:42:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58IMglMh081743; Thu, 18 Sep 2025 22:42:47 GMT (envelope-from git) Date: Thu, 18 Sep 2025 22:42:47 GMT Message-Id: <202509182242.58IMglMh081743@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: bc69d5dffa21 - main - pw: Clean up a couple of errx() calls List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bc69d5dffa21cdf228e481b5502fd0f053d65e6d Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=bc69d5dffa21cdf228e481b5502fd0f053d65e6d commit bc69d5dffa21cdf228e481b5502fd0f053d65e6d Author: Mark Johnston AuthorDate: 2025-09-18 22:38:45 +0000 Commit: Mark Johnston CommitDate: 2025-09-18 22:38:45 +0000 pw: Clean up a couple of errx() calls - Remove a stray backslash. - Make an error message fit on one line. No functional change intended. MFC after: 1 week Sponsored by: The FreeBSD Foundation Sponsored by: Klara, Inc. --- usr.sbin/pw/pw.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/usr.sbin/pw/pw.c b/usr.sbin/pw/pw.c index fc778b16c7e5..18f1a17ba942 100644 --- a/usr.sbin/pw/pw.c +++ b/usr.sbin/pw/pw.c @@ -143,12 +143,13 @@ main(int argc, char *argv[]) optarg = &argv[1][2]; if (*optarg == '\0') { if (stat(argv[2], &st) != 0) - errx(EX_OSFILE, \ + errx(EX_OSFILE, "no such directory `%s'", argv[2]); if (!S_ISDIR(st.st_mode)) - errx(EX_OSFILE, "`%s' not a " - "directory", argv[2]); + errx(EX_OSFILE, + "`%s' not a directory", + argv[2]); optarg = argv[2]; ++argv; --argc; From nobody Thu Sep 18 22:42:48 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cSVyd2vhQz688Pg; Thu, 18 Sep 2025 22:42: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 4cSVyc4wFJz3pkr; Thu, 18 Sep 2025 22:42:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758235368; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4gNO/ALPxcQVNDgBAs0G5OCCtQlXtC6QpQNRwY1slT8=; b=St0Ag53/XzMSr9r1qFPQHsAZR0qvqr7o047PFweXszyX1WYqRFgMVWiAO7aw/eRIwsSXMY 4Z1Nzs7mBNJdLOmuCHYYJdIKuiZdNf8kRYxfaamAhLOe9jlT2xU/FZy/zbARKr5wkylcgh +qR9MkyEimMIcxYdLM0c9mU+HAiZAHIm3/9JxruvPSABgOeHt5PMvjl3YKd4Zi0glKDFWz SQGAhwOfnwOAbiH6C34NPiWHfSSsABWtML25/FSU9IHnDK6RUMNl39NBxslJ5PrwtiYPGk v1KbD2NiuruRDmK9mpE/k/HJ71Nqqw3HVVgV9eaEjlcv16SAJEfNJnkyeQsJBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758235368; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4gNO/ALPxcQVNDgBAs0G5OCCtQlXtC6QpQNRwY1slT8=; b=fSSF5dXi7CQknOr0VfHmHsp5Vc85f53XFUtcJBhL5T4DgmxKGmyodsxGMs7p3piOSBaTVS Ey0p0741I1pXRmZN6zoE6ZMK0Pe3lo5NK3EhhFY3p2kBTBjjolSFPaqad07OKLpaiZ2Chj t/oAXpQchk2tgLx1Xbn1y8Koj5pQhtnIELOx1n+ZfWyVwwpmRF5x8z5nI5xpRf4cM/wvG1 jAniBv/HOp2otApi6+MIhfJea/fYFcjBGqBzBRZTJ+WFnjb9nn73Hgg5qNz2nJyvix6mVm bNb3qPy5YEYhY0h0IhIlLVJbOwvppnNGgI23i73Gb+57QFjWDKIBBMACXYCjug== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758235368; a=rsa-sha256; cv=none; b=PmknSTeN97TgtdJ5q9wCMvTqodqvvNgnhR5q0jYhyY1zEED85wz78SJKP8x4pREcFJUSmB 3bYjqqtq+pUItyPKKPfxOpPAbjLYPGGRRqkIOjbVEiXkxC3A8T8lCzjczXVUWiRsTqlqf5 WbDKMYrouiVlVFIfDiVnKAB2XkOWhFATQKRKbcQ6tA8FWS2VJ8FrVcAOzpypkCwkHZ95bd SkjnRJx9fbiFI1oE/yHI4TzzS6Voo5YWVsDyY6dVQw/Z+1AblLWBHQjf/FZM2NDxQfO4fM 8oY3rcGfLK6XxWbry2SHoy5G+Pamyb89FEVhFkJ3c54gfiqA/udr+trKaDQDqg== 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 4cSVyc4Qc4zXK8; Thu, 18 Sep 2025 22:42: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 58IMgm6B081779; Thu, 18 Sep 2025 22:42:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58IMgmMT081776; Thu, 18 Sep 2025 22:42:48 GMT (envelope-from git) Date: Thu, 18 Sep 2025 22:42:48 GMT Message-Id: <202509182242.58IMgmMT081776@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 42dc71a544a4 - main - pw: Style List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 42dc71a544a4d78d0068f70b6d4089a8c9e07cb1 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=42dc71a544a4d78d0068f70b6d4089a8c9e07cb1 commit 42dc71a544a4d78d0068f70b6d4089a8c9e07cb1 Author: Mark Johnston AuthorDate: 2025-09-18 22:38:58 +0000 Commit: Mark Johnston CommitDate: 2025-09-18 22:38:58 +0000 pw: Style No functional change intended. MFC after: 1 week Sponsored by: The FreeBSD Foundation Sponsored by: Klara, Inc. --- usr.sbin/pw/pw.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/usr.sbin/pw/pw.c b/usr.sbin/pw/pw.c index 18f1a17ba942..6f59e392bdd0 100644 --- a/usr.sbin/pw/pw.c +++ b/usr.sbin/pw/pw.c @@ -166,8 +166,7 @@ main(int argc, char *argv[]) conf.altroot = true; } else break; - } - else if (mode == -1 && (tmp = getindex(Modes, argv[1])) != -1) + } else if (mode == -1 && (tmp = getindex(Modes, argv[1])) != -1) mode = tmp; else if (which == -1 && (tmp = getindex(Which, argv[1])) != -1) which = tmp; @@ -179,7 +178,7 @@ main(int argc, char *argv[]) } else if (strcmp(argv[1], "help") == 0 && argv[2] == NULL) cmdhelp(mode, which); else if (which != -1 && mode != -1) - arg1 = argv[1]; + arg1 = argv[1]; else errx(EX_USAGE, "unknown keyword `%s'", argv[1]); ++argv; From nobody Thu Sep 18 22:42:49 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cSVyf1w57z688Ph; Thu, 18 Sep 2025 22:42: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 4cSVyd62VZz3q9b; Thu, 18 Sep 2025 22:42:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758235369; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Xarth6ENTuwjiznDgQ0TffMCZY6SGjUIGJ/sK2jmcdk=; b=JiOyghU+l43jcswl8wVj3iaOvSZaoucK4S7ASZu+IUmWXnH6DhodXoUTt9fzHf9MhXGG6p KD1fP/ue6DoYH3VhEujIHGxRhoHnpIArThiPbos7F8ST61s1gvmFsHfkBY3Mg+rajCiI/3 lsWUuU6/qTNwe80DvLvpCTvpi/kfBysV+m2t50Nq7q4zIRKVI18SjZSS4qkqbPmcU6p/M+ EmOuWtpFYOhPWeaP6qfT4UrySGIBoDkXbP7eGuCArN7WkZzohzln2bSPbC32rRVCy8hJqo MlhCjvvRTZijNuifn4RwGMncQRGvJr61iIJW/8uXMLc5s/EOSpfVjgeipf+0zg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758235369; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Xarth6ENTuwjiznDgQ0TffMCZY6SGjUIGJ/sK2jmcdk=; b=DqDHpoWHCsQ8s8UJ8KNBDwf4TM3F4kR4LP7RoWn4uABoRGjmbzQpx8E0kv63acQ/YZ4yPv QhFWgUI5SmtyzJkinyn8Uka9s24tZnLiztSrXhjlP0XBfq8C6dSFwZh/YxfkGGMI7mWIWF WmIm1gYJjVECH9Pf0i8qa7nJhZJRmTZ3XUmymgU2/tOQ0RBAo4KJ0Jr7iUYHvVwt0UN/Pj pnXJgX37SCM3R4G7qE38mxmqYpuGlhHjJX4r64OEjnQnDTRrHGiRbFlLOQEhuGqYDwslPE MLUDBRJbmAD5OMwlXvHCtYx/ckrnvcmi8HjwxvBUNpz2PyKc3b09Euhejw0Oog== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758235369; a=rsa-sha256; cv=none; b=lpKe3r9Y0NzLlHMbTdu9AWX/svCWesMW+M7l51dDXpSX950pBfbj4TqYcBafGtqsLFHPMa SX39s6YIz2c5ANIDmXdh99cPbRoSNedkRqPouotW66Chi5UMz/8ZAIcpbOp74q+1W3OzXX IeHU0FbKxLoDprB8HvCQI0c8GnwBJ7FeYEz3LvUfa4JdP2cq0ZKmZQD6YkfG5FxQabqhcW qAfxRCqHJaCn+sXGatgsWgjWJ7QhgkJXJzsdFb/Irsg0BJ9NXaI+jN1fHzT8yDCZ04d9Z0 RcD8GLGKaQrH/fTA5kAQKAVaqjACl2GBnm7+xULhME0MBVt7Hsa6y2j7eeZGjA== 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 4cSVyd5Q0zzVh9; Thu, 18 Sep 2025 22:42: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 58IMgnYl081812; Thu, 18 Sep 2025 22:42:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58IMgnRY081809; Thu, 18 Sep 2025 22:42:49 GMT (envelope-from git) Date: Thu, 18 Sep 2025 22:42:49 GMT Message-Id: <202509182242.58IMgnRY081809@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 41b2a80353e0 - main - pw: Add a missing chown() when creating dirs in mkdir_home_parents() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 41b2a80353e0dd04939cc260d5763854a264c158 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=41b2a80353e0dd04939cc260d5763854a264c158 commit 41b2a80353e0dd04939cc260d5763854a264c158 Author: Mark Johnston AuthorDate: 2025-09-18 22:39:11 +0000 Commit: Mark Johnston CommitDate: 2025-09-18 22:39:11 +0000 pw: Add a missing chown() when creating dirs in mkdir_home_parents() mkdir_home_parents() effectively performs a mkdir -p of the root home directory. It chowns the home directory to 0, 0, but doesn't do so for the intermediate directories. Add an explicit chown() call for those too. Fix a long line while here. Reviewed by: bapt MFC after: 1 week Sponsored by: The FreeBSD Foundation Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D52587 --- usr.sbin/pw/pw_user.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/usr.sbin/pw/pw_user.c b/usr.sbin/pw/pw_user.c index 9f5cfb0f4473..007f750c7d1a 100644 --- a/usr.sbin/pw/pw_user.c +++ b/usr.sbin/pw/pw_user.c @@ -115,7 +115,11 @@ mkdir_home_parents(int dfd, const char *dir) *tmp = '\0'; if (fstatat(dfd, dirs, &st, 0) == -1) { if (mkdirat(dfd, dirs, _DEF_DIRMODE) == -1) - err(EX_OSFILE, "'%s' (home parent) is not a directory", dirs); + err(EX_OSFILE, + "'%s' (home parent) is not a directory", + dirs); + if (fchownat(dfd, dirs, 0, 0, 0) != 0) + warn("chown(%s)", dirs); } *tmp = '/'; } From nobody Thu Sep 18 22:42:50 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cSVyg1LkSz6893g; Thu, 18 Sep 2025 22:42:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cSVyf6s27z3qC4; Thu, 18 Sep 2025 22:42:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758235371; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZeWGZfJMluhc5Vm98w7F91z7UQDhvEhvgbA0cmcYpZA=; b=EmjLy7YAzhSmx74/Yfym6YjzvBEuTuvn7AdPFERuQW4wML4X6GKHvXjgvYeUaEl0DlR5wQ 0wksXT8GSSa0KrEKaVWnz1Rvwzp7gl8Rgo4wlXYZ4IMOKk+r5AR4zy2fv6JgOn7h0HexST eIceN6r/p+oIr7whYeWysgq0YNbQsVQzmN30v6wmPSGL31fx8UWLSnHCQNwUmw31A5R7PA R5Kdm1UPugATtrIRAfWWm2ehYF1EKwr6jocssUHn21KPMnHe03UZX9nGMBEnkc6iZG1As6 ZJUrYKOUtqgatefp89UVlb/BIQ74pjZ/PhIQGQt+PKV3S0vwpoGX3EZysnDbqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758235371; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZeWGZfJMluhc5Vm98w7F91z7UQDhvEhvgbA0cmcYpZA=; b=pVchVRTqkA6vGTajI+ypfUGoJ8sFLK7mcKEpU0QqiVTEU+v9fYoT6/7yCudZbIK5Mgd3Oz gD1ctQrx5o/II5KcH0aPFVhDNq6lu4FTl8hE8lnT5PNil1W/VU2H4sIXCXt4OcankcIbYI BqJtdEbMEhNVEoBdErcN2Z/xi9yQfL2/QVMkwrN57n2p7y8ZEeiHwJk7aC9sOhAWy04bG2 K6GktyFC+aKVBbmeqrXKPyqkzqoPv/5wHO69S1ssY9EEpPgmV5BK5fDNxIx5vdYgdB2nv+ qzVOdPwVzVMbcfe9AxDHesP7f2v6yllycZ2XPpIrPedAR/mQ4IWq+kjrxN7LLg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758235371; a=rsa-sha256; cv=none; b=quwKr4AY8ZkEWEhkeBNfio6cxv7ctn94plyDvJVuRtIo+VqZl9KwA9DGWgcn9vF8MPi8PM 8qBbTHsPF7pPEexnVKU+hePnS0O6As421rN9zhwuD31hJ+D1pC7MW1vyb/MAIGb4UV1wPf +zK3d0EN0KolBpj8D75xkrYuM5IOCcnsZIlFqzzyMnlmTQ7UKw4lBrhQeeVNvAt9VKrSAj R8rryNA4jjqpN9urXQnViwOd+Eu7NNIBan0Iuwf4LryxZ6Uu/Ve/GsQhRRN2Xh+7/ECknA u3f843Xkz0dpiNtpw/upkcquV2oamvvc63N3Kxd1bzzfxIG04PXaOIcDbUP4Fw== 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 4cSVyf6M4KzWbm; Thu, 18 Sep 2025 22:42: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 58IMgo0q081852; Thu, 18 Sep 2025 22:42:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58IMgoiA081849; Thu, 18 Sep 2025 22:42:50 GMT (envelope-from git) Date: Thu, 18 Sep 2025 22:42:50 GMT Message-Id: <202509182242.58IMgoiA081849@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: a03d150a3d44 - main - pw: Use copy_file_range() when copying skeleton files List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a03d150a3d44c49344ebd0862defd1a5ad1f524e Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=a03d150a3d44c49344ebd0862defd1a5ad1f524e commit a03d150a3d44c49344ebd0862defd1a5ad1f524e Author: Mark Johnston AuthorDate: 2025-09-18 22:39:39 +0000 Commit: Mark Johnston CommitDate: 2025-09-18 22:39:39 +0000 pw: Use copy_file_range() when copying skeleton files As a bonus, check for I/O errors and print them to standard error. Reviewed by: bapt, emaste MFC after: 1 week Sponsored by: The FreeBSD Foundation Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D52588 --- usr.sbin/pw/cpdir.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/usr.sbin/pw/cpdir.c b/usr.sbin/pw/cpdir.c index 63068cab000c..3839a039495a 100644 --- a/usr.sbin/pw/cpdir.c +++ b/usr.sbin/pw/cpdir.c @@ -36,10 +36,10 @@ #include "pw.h" void -copymkdir(int rootfd, char const * dir, int skelfd, mode_t mode, uid_t uid, +copymkdir(int rootfd, char const *dir, int skelfd, mode_t mode, uid_t uid, gid_t gid, int flags) { - char *p, lnk[MAXPATHLEN], copybuf[4096]; + char *p, lnk[MAXPATHLEN]; int len, homefd, srcfd, destfd; ssize_t sz; struct stat st; @@ -120,8 +120,12 @@ copymkdir(int rootfd, char const * dir, int skelfd, mode_t mode, uid_t uid, continue; } - while ((sz = read(srcfd, copybuf, sizeof(copybuf))) > 0) - write(destfd, copybuf, sz); + do { + sz = copy_file_range(srcfd, NULL, destfd, NULL, + SSIZE_MAX, 0); + } while (sz > 0); + if (sz < 0) + warn("copy_file_range"); close(srcfd); /* From nobody Thu Sep 18 22:42:51 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cSVyh4gk4z688fM; Thu, 18 Sep 2025 22:42:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cSVyh1cTkz3qJ7; Thu, 18 Sep 2025 22:42:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758235372; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Uzqni+XDKxGynOI11Cdtyx2y5SgZmhyWOfjsK4T5F2I=; b=RxoTVlQbYt9938/V3DABmbassufylAuJyxxN4jAbE4ETN0MpB6UVh7SaPfTD9/aUW/bRmt a+C5HA1QvR4xYB08gepaNFwwnEOibELmUKEtiBhMm3jqHWhqqCN2+RDiqZ0IQOdDmkLPX7 8Qc5O51OWIQYoVyMZfTRth4ZSo1/1R/0FO7pTX6UTcuDy/2AAV0xUG9xHcXxD5/VzvPllN bmtJqCr6XNzdE9rI6Qlbd2n+TIlvgWW7h6PvltWQhXsPiP2Wl2HSCOxorQ870zYA1hjEOG jRQbJP5BnpNn9XtLtN3gA73c7ToDzJuw5JyIfRr2CZzlmP3zkcdZ/2MybZr6Cg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758235372; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Uzqni+XDKxGynOI11Cdtyx2y5SgZmhyWOfjsK4T5F2I=; b=lfKcM8bDebXe6ZvrUTvRBtMCkhh7N0y7/LOMp6m0IxxOek7cyzeFeDYxNM4yggD5Zg0AAM jgqY/WIWEYoaEj16rgZwyHmXI1bVFbcXi6z7FXCYpBNjwgnh8dWJugUMc/CMZ5dpyYyAU8 pN2qKV+bNewf4aHkmAq1oS7FnMBCHDlLJmJ79mwywZHsR3CBfg+DSHaIASpe1uY4ALy1H5 KAvK985xH7Bb11ZcUIeYFfeThq21dNI4tO1ZRCAq2vTsQBMx/tEXbZVrp+KpjEKKpDP2J6 J7GMGQWCMXZN9XwvwsL906fZwlyQCSVm5evaq8RV0ymIUE6W8JZSVBXadPhyFw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758235372; a=rsa-sha256; cv=none; b=wzfTp0kNRJuNC2zCHmRRVB4WKt2+mQ/tE940mnQNQT2+sTDxjdEHKwGtCdbnPxzZhx46OO J3806NMTrsCLEHP6IQ49W/JFjUeNGI7SUDuDEkPt79wgdakbzTgzEuMdRNedvcUjXZngaZ y/vxfTxefwJbrVGNOxY+5Jbocsfaqha3M7GqSpnB0lkC/k8bVBzNbFcQSbEUpMUEgMxQAJ yQDtXuRKLKxOJidtA2XD4DWpePbHud0go5KXBExbavggJdAFkdbPHkL/7OEitNvtj68tsL eyMZv0aGKN1BaesCSvpnlW3/3rHAfMHF2uqxdF81wAloyN0ZA2QtESYKEq0kVQ== 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 4cSVyh1D5fzVhB; Thu, 18 Sep 2025 22:42:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58IMgpjX081887; Thu, 18 Sep 2025 22:42:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58IMgppj081884; Thu, 18 Sep 2025 22:42:51 GMT (envelope-from git) Date: Thu, 18 Sep 2025 22:42:51 GMT Message-Id: <202509182242.58IMgppj081884@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 182ed3c0755f - main - pw: Add a metalog output mode List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 182ed3c0755f1bf161d8be02016b5f6cf9b57556 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=182ed3c0755f1bf161d8be02016b5f6cf9b57556 commit 182ed3c0755f1bf161d8be02016b5f6cf9b57556 Author: Mark Johnston AuthorDate: 2025-09-18 22:40:00 +0000 Commit: Mark Johnston CommitDate: 2025-09-18 22:42:16 +0000 pw: Add a metalog output mode When creating OS images as a non-root user, it may be useful to pre-create users in the staged tree. The useradd operation adds files to the new user's home directory, copied from the skeleton directory (/usr/share/skel), which makes it inconvient for use in this scenario since the added files are not recorded in the mtree metalog. To cover this gap, this change adds a new -M option to pw's useradd operation, causing pw to add mtree entries for newly added files. Extend an existing regression test to validate this mode. Reviewed by: bapt, emaste MFC after: 1 week Sponsored by: The FreeBSD Foundation Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D52590 --- usr.sbin/pw/cpdir.c | 43 +++++++++++++++++++++------------ usr.sbin/pw/pw.8 | 16 +++++++++++++ usr.sbin/pw/pw.c | 30 +++++++++++++++++++++-- usr.sbin/pw/pw.h | 5 ++++ usr.sbin/pw/pw_user.c | 9 ++++++- usr.sbin/pw/pw_utils.c | 46 ++++++++++++++++++++++++++++++++++++ usr.sbin/pw/pwupd.h | 1 + usr.sbin/pw/tests/pw_useradd_test.sh | 20 ++++++++++++---- 8 files changed, 148 insertions(+), 22 deletions(-) diff --git a/usr.sbin/pw/cpdir.c b/usr.sbin/pw/cpdir.c index 3839a039495a..979323d64342 100644 --- a/usr.sbin/pw/cpdir.c +++ b/usr.sbin/pw/cpdir.c @@ -40,49 +40,48 @@ copymkdir(int rootfd, char const *dir, int skelfd, mode_t mode, uid_t uid, gid_t gid, int flags) { char *p, lnk[MAXPATHLEN]; - int len, homefd, srcfd, destfd; + int len, srcfd, destfd; ssize_t sz; struct stat st; struct dirent *e; DIR *d; + mode_t pumask; if (*dir == '/') dir++; + pumask = umask(0); + umask(pumask); + if (mkdirat(rootfd, dir, mode) != 0) { - mode_t pumask; if (errno != EEXIST) { warn("mkdir(%s)", dir); return; } - pumask = umask(0); - umask(pumask); - if (fchmodat(rootfd, dir, mode & ~pumask, AT_SYMLINK_NOFOLLOW) == -1) warn("chmod(%s)", dir); } - if (fchownat(rootfd, dir, uid, gid, AT_SYMLINK_NOFOLLOW) == -1) warn("chown(%s)", dir); - if (flags > 0 && chflagsat(rootfd, dir, flags, AT_SYMLINK_NOFOLLOW) == -1) warn("chflags(%s)", dir); + metalog_emit(dir, (mode | S_IFDIR) & ~pumask, uid, gid, flags); if (skelfd == -1) return; - homefd = openat(rootfd, dir, O_DIRECTORY); if ((d = fdopendir(skelfd)) == NULL) { close(skelfd); - close(homefd); return; } while ((e = readdir(d)) != NULL) { + char path[MAXPATHLEN]; + if (strcmp(e->d_name, ".") == 0 || strcmp(e->d_name, "..") == 0) continue; @@ -92,19 +91,32 @@ copymkdir(int rootfd, char const *dir, int skelfd, mode_t mode, uid_t uid, if (strncmp(p, "dot.", 4) == 0) /* Conversion */ p += 3; + (void)snprintf(path, sizeof(path), "%s/%s", dir, p); if (S_ISDIR(st.st_mode)) { - copymkdir(homefd, p, openat(skelfd, e->d_name, O_DIRECTORY), - st.st_mode & _DEF_DIRMODE, uid, gid, st.st_flags); + int fd; + + fd = openat(skelfd, e->d_name, O_DIRECTORY); + if (fd == -1) { + warn("openat(%s)", e->d_name); + continue; + } + copymkdir(rootfd, path, fd, st.st_mode & _DEF_DIRMODE, + uid, gid, st.st_flags); continue; } if (S_ISLNK(st.st_mode) && - (len = readlinkat(skelfd, e->d_name, lnk, sizeof(lnk) -1)) + (len = readlinkat(skelfd, e->d_name, lnk, sizeof(lnk) - 1)) != -1) { lnk[len] = '\0'; - symlinkat(lnk, homefd, p); - fchownat(homefd, p, uid, gid, AT_SYMLINK_NOFOLLOW); + if (symlinkat(lnk, rootfd, path) != 0) + warn("symlink(%s)", path); + else if (fchownat(rootfd, path, uid, gid, + AT_SYMLINK_NOFOLLOW) != 0) + warn("chown(%s)", path); + metalog_emit_symlink(path, lnk, st.st_mode & ~pumask, + uid, gid); continue; } @@ -113,7 +125,7 @@ copymkdir(int rootfd, char const *dir, int skelfd, mode_t mode, uid_t uid, if ((srcfd = openat(skelfd, e->d_name, O_RDONLY)) == -1) continue; - destfd = openat(homefd, p, O_RDWR | O_CREAT | O_EXCL, + destfd = openat(rootfd, path, O_RDWR | O_CREAT | O_EXCL, st.st_mode); if (destfd == -1) { close(srcfd); @@ -135,6 +147,7 @@ copymkdir(int rootfd, char const *dir, int skelfd, mode_t mode, uid_t uid, warn("chown(%s)", p); if (fchflags(destfd, st.st_flags) != 0) warn("chflags(%s)", p); + metalog_emit(path, st.st_mode & ~pumask, uid, gid, st.st_flags); close(destfd); } closedir(d); diff --git a/usr.sbin/pw/pw.8 b/usr.sbin/pw/pw.8 index 5eae810b6732..f6d9ebca6308 100644 --- a/usr.sbin/pw/pw.8 +++ b/usr.sbin/pw/pw.8 @@ -30,6 +30,7 @@ .Nd create, remove, modify & display system users and groups .Sh SYNOPSIS .Nm +.Op Fl M Ar metalog .Op Fl R Ar rootdir .Op Fl V Ar etcdir .Cm useradd @@ -464,6 +465,21 @@ option, bearing the name of the new account. This can be overridden by the .Fl d option on the command line, if desired. +.It Fl M Ar metalog +Specify a path to a +.Xr mtree 5 +metalog file. +.Nm +will add entries for all files added to a user's home directory. +This is useful when building images as a non-root user, as the +metalog can be used as input to +.Xr tar 1 +or +.Xr makefs 8 . +Note that this option must precede the +.Ql useradd +string on the command line, otherwise it will be interpreted as the mode +option. .It Fl M Ar mode Create the user's home directory with the specified .Ar mode , diff --git a/usr.sbin/pw/pw.c b/usr.sbin/pw/pw.c index 6f59e392bdd0..7cb5dd160e12 100644 --- a/usr.sbin/pw/pw.c +++ b/usr.sbin/pw/pw.c @@ -132,7 +132,11 @@ main(int argc, char *argv[]) while (argc > 1) { if (*argv[1] == '-') { /* - * Special case, allow pw -V [args] for scripts etc. + * Special case, allow pw -V [args] for + * scripts etc. + * + * The -M option before the keyword is handled + * differently from -M after a keyword. */ arg = argv[1][1]; if (arg == 'V' || arg == 'R') { @@ -164,6 +168,23 @@ main(int argc, char *argv[]) "%s%s", optarg, arg == 'R' ? _PATH_PWD : ""); conf.altroot = true; + } else if (mode == -1 && which == -1 && arg == 'M') { + int fd; + + optarg = &argv[1][2]; + if (*optarg == '\0') { + optarg = argv[2]; + ++argv; + --argc; + } + fd = open(optarg, + O_WRONLY | O_APPEND | O_CREAT | O_CLOEXEC, + 0644); + if (fd == -1) + errx(EX_OSERR, + "Cannot open metalog `%s'", + optarg); + conf.metalog = fdopen(fd, "ae"); } else break; } else if (mode == -1 && (tmp = getindex(Modes, argv[1])) != -1) @@ -195,6 +216,10 @@ main(int argc, char *argv[]) if (conf.rootfd == -1) errx(EXIT_FAILURE, "Unable to open '%s'", conf.rootdir); + if (conf.metalog != NULL && (which != W_USER || mode != M_ADD)) + errx(EXIT_FAILURE, + "metalog can only be specified with 'useradd'"); + return (cmdfunc[which][mode](argc, argv, arg1)); } @@ -233,10 +258,11 @@ cmdhelp(int mode, int which) static const char *help[W_NUM][M_NUM] = { { - "usage: pw useradd [name] [switches]\n" + "usage: pw [-M metalog] useradd [name] [switches]\n" "\t-V etcdir alternate /etc location\n" "\t-R rootdir alternate root directory\n" "\t-C config configuration file\n" + "\t-M metalog mtree file, must precede 'useradd'\n" "\t-q quiet operation\n" " Adding users:\n" "\t-n name login name\n" diff --git a/usr.sbin/pw/pw.h b/usr.sbin/pw/pw.h index c3725693f91d..ceb843d79503 100644 --- a/usr.sbin/pw/pw.h +++ b/usr.sbin/pw/pw.h @@ -70,6 +70,11 @@ struct userconf *get_userconfig(const char *cfg); struct userconf *read_userconfig(char const * file); int write_userconfig(struct userconf *cnf, char const * file); +void metalog_emit(const char *path, mode_t mode, uid_t uid, gid_t gid, + int flags); +void metalog_emit_symlink(const char *path, const char *target, mode_t mode, + uid_t uid, gid_t gid); + int pw_group_add(int argc, char **argv, char *name); int pw_group_del(int argc, char **argv, char *name); int pw_group_mod(int argc, char **argv, char *name); diff --git a/usr.sbin/pw/pw_user.c b/usr.sbin/pw/pw_user.c index 007f750c7d1a..413eac4882cc 100644 --- a/usr.sbin/pw/pw_user.c +++ b/usr.sbin/pw/pw_user.c @@ -86,10 +86,13 @@ mkdir_home_parents(int dfd, const char *dir) { struct stat st; char *dirs, *tmp; + mode_t pumask; + + pumask = umask(0); + umask(pumask); if (*dir != '/') errx(EX_DATAERR, "invalid base directory for home '%s'", dir); - dir++; if (fstatat(dfd, dir, &st, 0) != -1) { @@ -120,6 +123,9 @@ mkdir_home_parents(int dfd, const char *dir) dirs); if (fchownat(dfd, dirs, 0, 0, 0) != 0) warn("chown(%s)", dirs); + metalog_emit(dir, + (_DEF_DIRMODE | S_IFDIR) & ~pumask, 0, 0, + 0); } *tmp = '/'; } @@ -129,6 +135,7 @@ mkdir_home_parents(int dfd, const char *dir) err(EX_OSFILE, "'%s' (home parent) is not a directory", dirs); if (fchownat(dfd, dirs, 0, 0, 0) != 0) warn("chown(%s)", dirs); + metalog_emit(dirs, (_DEF_DIRMODE | S_IFDIR) & ~pumask, 0, 0, 0); } free(dirs); diff --git a/usr.sbin/pw/pw_utils.c b/usr.sbin/pw/pw_utils.c index 9be1656bcfe1..87dd421ca8a3 100644 --- a/usr.sbin/pw/pw_utils.c +++ b/usr.sbin/pw/pw_utils.c @@ -92,3 +92,49 @@ nis_update(void) { errx(i, "make exited with status %d", i); return (i); } + +static void +metalog_emit_record(const char *path, const char *target, mode_t mode, + uid_t uid, gid_t gid, int flags) +{ + const char *flagstr, *type; + int error; + + if (conf.metalog == NULL) + return; + + if (target != NULL) + type = "link"; + else if (S_ISDIR(mode)) + type = "dir"; + else if (S_ISREG(mode)) + type = "file"; + else + errx(1, "metalog_emit: unhandled file type for %s", path); + + flagstr = fflagstostr(flags & + (UF_IMMUTABLE | UF_APPEND | SF_IMMUTABLE | SF_APPEND)); + if (flagstr == NULL) + errx(1, "metalog_emit: fflagstostr failed"); + + error = fprintf(conf.metalog, + "./%s type=%s mode=0%03o uid=%u gid=%u%s%s%s%s\n", + path, type, mode & ACCESSPERMS, uid, gid, + target != NULL ? " link=" : "", target != NULL ? target : "", + *flagstr != '\0' ? " flags=" : "", *flagstr != '\0' ? flagstr : ""); + if (error < 0) + errx(1, "metalog_emit: write error"); +} + +void +metalog_emit(const char *path, mode_t mode, uid_t uid, gid_t gid, int flags) +{ + metalog_emit_record(path, NULL, mode, uid, gid, flags); +} + +void +metalog_emit_symlink(const char *path, const char *target, mode_t mode, + uid_t uid, gid_t gid) +{ + metalog_emit_record(path, target, mode, uid, gid, 0); +} diff --git a/usr.sbin/pw/pwupd.h b/usr.sbin/pw/pwupd.h index a39a022ca309..605c51dcec2a 100644 --- a/usr.sbin/pw/pwupd.h +++ b/usr.sbin/pw/pwupd.h @@ -76,6 +76,7 @@ struct userconf { struct pwconf { char rootdir[MAXPATHLEN]; char etcpath[MAXPATHLEN]; + FILE *metalog; int fd; int rootfd; bool altroot; diff --git a/usr.sbin/pw/tests/pw_useradd_test.sh b/usr.sbin/pw/tests/pw_useradd_test.sh index 6413c063d482..75e96a64ba8e 100755 --- a/usr.sbin/pw/tests/pw_useradd_test.sh +++ b/usr.sbin/pw/tests/pw_useradd_test.sh @@ -1,4 +1,3 @@ - # Import helper functions . $(atf_get_srcdir)/helper_functions.shin @@ -357,15 +356,28 @@ user_add_skel_body() { echo "c" > ${HOME}/skel/c/d/dot.c mkdir ${HOME}/home ln -sf /nonexistent ${HOME}/skel/c/foo - atf_check -s exit:0 ${RPW} useradd foo -k /skel -m + atf_check -s exit:0 ${RPW} -M METALOG useradd foo -k /skel -m test -d ${HOME}/home/foo || atf_fail "Directory not created" test -f ${HOME}/home/foo/.a || atf_fail "File not created" atf_check -o file:${HOME}/skel/.a -s exit:0 cat ${HOME}/home/foo/.a atf_check -o file:${HOME}/skel/b -s exit:0 cat ${HOME}/home/foo/b - test -d ${HOME}/home/foo/c || atf_fail "Dotted directory in skel not copied" - test -d ${HOME}/home/foo/.plop || atf_fail "Directory in skell not created" + test -d ${HOME}/home/foo/c || atf_fail "Directory in skel not copied" + test -d ${HOME}/home/foo/.plop || atf_fail "Dotted directory in skel not created" atf_check -o inline:"/nonexistent\n" -s ignore readlink -f ${HOME}/home/foo/c/foo atf_check -o file:${HOME}/skel/c/d/dot.c -s exit:0 cat ${HOME}/home/foo/c/d/.c + + cat <<__EOF__ >METALOG.expected +./home/foo type=dir mode=0755 uid=1001 gid=1001 +./home/foo/.a type=file mode=0644 uid=1001 gid=1001 +./home/foo/.plop type=dir mode=0755 uid=1001 gid=1001 +./home/foo/b type=file mode=0644 uid=1001 gid=1001 +./home/foo/c type=dir mode=0755 uid=1001 gid=1001 +./home/foo/c/d type=dir mode=0755 uid=1001 gid=1001 +./home/foo/c/d/.c type=file mode=0644 uid=1001 gid=1001 +./home/foo/c/foo type=link mode=0755 uid=1001 gid=1001 link=/nonexistent +__EOF__ + atf_check -o save:METALOG.out sort METALOG + atf_check diff METALOG.out METALOG.expected } atf_test_case user_add_uid0 From nobody Thu Sep 18 23:42:59 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cSXJ3363tz68DNb; Thu, 18 Sep 2025 23:42: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 4cSXJ32QPFz3vl9; Thu, 18 Sep 2025 23:42:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758238979; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QMQR87znho0JLmW/UYf1BDDPzoyeKgOAD8HYRUI67zo=; b=yuF2dOc38ugp9RLt+lX3s+NOvSFCtCWAiNI9Jyz5JpRjcYGwvKbGgahMZl8lxQwrUHdaTm 806XQj2pE8nvbmkAbQNRg+pbQ9UdDryVPItK10UrmT329B4lfSX0ry0K6XeRRdnOzNmKHn 2oboNO7PQQrPtw+Y+SM0Zb8E5tLwfQmsja5NWL2ZuHHnIoBy7i+j9GTKdTmOPrnwiNt5vx OJE67zMOobujb7Q+5beeAB4K4jjDvkp3GY2NDxJ3Xe1jlKafXKvuysIgx/2xnwIde2+3Fi DMSFlBMnvnrVL030G9sxDF760/47ze2+BH51StHcTgo8vswJU6dFO1PvWZNRiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758238979; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QMQR87znho0JLmW/UYf1BDDPzoyeKgOAD8HYRUI67zo=; b=R5tUJcITRtRJI6bpnB99XE3sthWmtqoiXv7uuLUrlVi6okVu83Y/bnXPULm9RbFko18ZL4 OQC2Ch2udWKkD6XF4my/if0jsZoVB+m2ERcOPFDcXGDu93eqXjmhyYmZYNI7RBBQCf97IK HYxIEdl6WUtDeGq/HlYdpyIaKG+Ntmkl2W6bMBYbbLX4vDdKrp6xmZs4CwReGqyYwkx53Y UxN127sjf7P/iqDuRQDLgfPecBpWyfbHwtIE4V0J88YSsBbyzEy3bcvQ7fe39N/EPxgP8h vTRWQt2cNp/zsy0Xto1bk4ibGcVxaeqbTR2rWIxR5J7c4SFvXhOelQ1W/HWiCg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758238979; a=rsa-sha256; cv=none; b=Jd44ZwcAubzoKhhkYBEUTespjMwM3VYhbhITkv5u22fpfLfaJvZQxCg9c4qE8oxlAUpCKy rso5dbuQ4zxw2SM+i6DbYJZTfZR8kBpsJS6UtmaKe+20TYRIcJAgDy30WfjAdYYsdDlvCa eBXe+EqAWFEwf52773Zx/lULM6CWgBQK+VGkJgAXM1BVgg0Qz0S4ZU9hkvsx2fXmFntjiM oX3Ymz4X8Ee99oxVMETbHGJmS/UYyPHbEfN09Q1A7w3zL96kLw01yeXopk8OaK4zj4Nz/G FmjQBfw991d+WkEQbm3hfeKOyP1t+G8wMsiKENC+dseOwIHfoH6Oz7pQsFJw6A== 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 4cSXJ3229lzYP0; Thu, 18 Sep 2025 23:42: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 58INgxZx094078; Thu, 18 Sep 2025 23:42:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58INgxvZ094075; Thu, 18 Sep 2025 23:42:59 GMT (envelope-from git) Date: Thu, 18 Sep 2025 23:42:59 GMT Message-Id: <202509182342.58INgxvZ094075@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Colin Percival Subject: git: 5918b4866a96 - main - release: Allow pkg build on "wrong" major List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5918b4866a9689b50180da42aad6d742466b0d1b Auto-Submitted: auto-generated The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=5918b4866a9689b50180da42aad6d742466b0d1b commit 5918b4866a9689b50180da42aad6d742466b0d1b Author: Colin Percival AuthorDate: 2025-09-18 23:37:46 +0000 Commit: Colin Percival CommitDate: 2025-09-18 23:41:14 +0000 release: Allow pkg build on "wrong" major While we usually build FreeBSD releases on the same major version, we do need to be able to e.g. build 15 on 16. Tell the ports tree that we know what we're doing. (We don't, not really, but we can at least pretend...) MFC after: 6 hours Sponsored by: https://www.patreon.com/cperciva --- release/scripts/make-pkg-package.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/release/scripts/make-pkg-package.sh b/release/scripts/make-pkg-package.sh index a0ac0fc16305..7712054d26c0 100755 --- a/release/scripts/make-pkg-package.sh +++ b/release/scripts/make-pkg-package.sh @@ -13,6 +13,7 @@ export WRKDIR=$(make -C ${PORTSDIR}/ports-mgmt/pkg -V WRKDIR) make -C ${PORTSDIR}/ports-mgmt/pkg TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ CONFIGURE_ARGS="--host=$(uname -m)-portbld-freebsd${REVISION}" \ + I_DONT_CARE_IF_MY_BUILDS_TARGET_THE_WRONG_RELEASE=YES \ BATCH=YES stage create-manifest ${PKG_CMD} -o ABI=${PKG_ABI} \ From nobody Fri Sep 19 01:16:39 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cSZN72hqsz68LKY; Fri, 19 Sep 2025 01:16: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 4cSZN72B33z485l; Fri, 19 Sep 2025 01:16:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758244599; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oFqUz13KNNENTfPLq6g0F9OJEDLBdh7iyhDuYo5OjkM=; b=jR5h7xvT7+kE0khQsF/K2MS/Moe5uXwgt3yeQznvWjjUy6e0qwu5ROxvdcQYM8HorQTYiY Df8XfYrxQ6o844jIAII//1VBnrAUOATvdXe0S7bVaFUJTwOrLc5OTentLzfRb4dYt8/+qa 885B9a1nhfUi93Oi5k+QC4pNfZ+uoXXgi7nR0PaAkEERbCo0tXwt49n3WeBcqaZTw5UvLv QGQBCfB/uaW30N8DCBogpc/m9Mlv5sKa07qrHAFjGurTcOoJo/nhJHV6JTN+uCAkuAKeXJ bGrqcBrSA47MGP7OmtJOinFG2zOoQ8OfunloB+P2Y2LhPR6vj4NUIsqrr/DeTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758244599; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oFqUz13KNNENTfPLq6g0F9OJEDLBdh7iyhDuYo5OjkM=; b=G94uSQNXZTSo9qN099PkkB14j/Lz0JIffw8vbgXNoeuHEVnzuzqdYvWBpgoO7xmtVZPoJf Agxq5OJ/I8QhkKjisYbuAP9FUuRVdwVoBFWvNNeR5R2GGb6l0ZsfhQzsplye4h8dShG59P Avu+yvK4P5wFOKCpVEToAPfCdLF89rUGpNdd7SS/4OXs9nQW0uuTo39y+nhJhVKSQD9pRZ cfvkAxqGCvYkTzFon9cwEY2fi20+4e+1vv+/IEJOTLIhIQ0ZMaFHa4FwxQxNdJZvqBA7/z P4CJlZ8eSt1rpQxHG+03MnxQ2xxI2QECEeRqsJNYekwIsl/wRROkh9xJkOfQpQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758244599; a=rsa-sha256; cv=none; b=bnDgWVlJ7ji7vIfdacdvFMLpo98KWz3rUT8oeRAsmIlkosqoNEtqUvIIuygN++MQrNX4AA fnRcGB1rhz3tDRoocdCmN15af3Ouss93lrEn3Ff8cfxLwEXGOJ9kDZqBlm1HeeuoXOilI5 ipD3SjrPWdqsGjrysPT2wUYbv7hM5eak/7vZHPRhOGaxce8iWpEIogYQGbHbT53hYU935+ HdCd/YTtZpepM4CRbdf8eQ8eTcJnucr6HEAaP4C7YaoN5X4Cwvj7D/tDOxX4fc1O2eY+d2 T0oCHyZXr4xZ6IGF10UdmfoQYtB9deEHHu2xTfBqxv381viySGZhGYvrGtPwkA== 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 4cSZN71jDmzc82; Fri, 19 Sep 2025 01:16: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 58J1Gdxo066028; Fri, 19 Sep 2025 01:16:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58J1GdYu066025; Fri, 19 Sep 2025 01:16:39 GMT (envelope-from git) Date: Fri, 19 Sep 2025 01:16:39 GMT Message-Id: <202509190116.58J1GdYu066025@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: 561dc357c2f5 - main - bsdinstall: Use package sets for pkgbase install List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 561dc357c2f5892af3aa481a1020860b7ff473e0 Auto-Submitted: auto-generated The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=561dc357c2f5892af3aa481a1020860b7ff473e0 commit 561dc357c2f5892af3aa481a1020860b7ff473e0 Author: Lexi Winter AuthorDate: 2025-09-18 17:28:36 +0000 Commit: Lexi Winter CommitDate: 2025-09-19 01:15:10 +0000 bsdinstall: Use package sets for pkgbase install Update the pkgbase component selection dialogue to take the components list from the meta-package sets available on the install media, except for "kernel" which is still handled magically. Always install "minimal", and by default select "base", "kernel-dbg" and any libcompat sets (e.g., lib32) if they're available. Replace the various "dbg" options with a single "debug" component that installs the debug symbols for all the components the user selected, except for kernel since we handle that separately and it's common to want kernel debugs symbols without userland debug symbols. MFC after: 3 seconds Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D52558 --- usr.sbin/bsdinstall/scripts/pkgbase.in | 159 ++++++++++++++++++++------------- 1 file changed, 97 insertions(+), 62 deletions(-) diff --git a/usr.sbin/bsdinstall/scripts/pkgbase.in b/usr.sbin/bsdinstall/scripts/pkgbase.in index d123394c170e..c06a3f789791 100755 --- a/usr.sbin/bsdinstall/scripts/pkgbase.in +++ b/usr.sbin/bsdinstall/scripts/pkgbase.in @@ -77,37 +77,57 @@ end -- traditional tarball component selection dialog. local function select_components(components, options) local descriptions = { - kernel_dbg = "Kernel debug info", - base_dbg = "Base system debug info", - src = "System source tree", - tests = "Test suite", - lib32 = "32-bit compatibility libraries", - lib32_dbg = "32-bit compatibility libraries debug info", + ["kernel-dbg"] = "Debug symbols for the kernel", + ["devel"] = "C/C++ compilers and related utilities", + ["base"] = "The complete base system (includes devel)", + ["src"] = "System source tree", + ["tests"] = "Test suite", + ["lib32"] = "32-bit compatibility libraries", + ["debug"] = "Debug symbols for the selected components", } + + -- These defaults match what the non-pkgbase installer selects + -- by default. local defaults = { - kernel_dbg = "on", - base_dbg = "off", - src = "off", - tests = "off", - lib32 = "on", - lib32_dbg = "off", + ["base"] = "on", + ["kernel-dbg"] = "on", } + -- Enable compat sets by default. + for compat in all_libcompats:gmatch("%S+") do + defaults["lib" .. compat] = "on" + end -- Sorting the components is necessary to ensure that the ordering is -- consistent in the UI. local sorted_components = {} for component, _ in pairs(components) do - table.insert(sorted_components, component) + -- Decide which sets we want to offer to the user: + -- + -- "minimal" is not offered since it's always included. + -- + -- "-dbg" sets are never offered, because those are handled + -- via the "debug" component. + -- + -- "kernels" is never offered because we only want one kernel, + -- which is handled separately. + -- + -- Sets whose name ends in "-jail" are intended for jails, and + -- are only offered if no_kernel is set. + if not component:match("^minimal") and + not component:match("%-dbg$") and + not (component == "kernels") and + not (not options.no_kernel and component:match("%-jail$")) then + table.insert(sorted_components, component) + end end table.sort(sorted_components) local checklist_items = {} for _, component in ipairs(sorted_components) do - if component ~= "base" and component ~= "kernel" and - not (component == "kernel_dbg" and options.no_kernel) and - #components[component] > 0 then - local description = descriptions[component] or "''" - local default = defaults[component] or "off" + if component ~= "kernel" and not + (component == "kernel-dbg" and options.no_kernel) then + local description = descriptions[component] or "" + local default = defaults[component] or "off" table.insert(checklist_items, component) table.insert(checklist_items, description) table.insert(checklist_items, default) @@ -120,7 +140,10 @@ local function select_components(components, options) "--nocancel", "--disable-esc", "--separate-output", - "--checklist", "Choose optional system components to install:", + "--checklist", + "A minimal set of packages suitable for a multi-user system ".. + "is always installed. Select additional packages you wish ".. + "to install:", "0", "0", "0", -- autosize } append_list(bsddialog_args, checklist_items) @@ -132,10 +155,16 @@ local function select_components(components, options) -- hopefully useful stack trace. assert(exit_code == 0) - local selected = {"base"} + -- Always install the minimal set, since it's required for the system + -- to work. The base set depends on minimal, but it's fine to install + -- both, and this way the user can remove the base set without pkg + -- autoremove then trying to remove minimal. + local selected = {"minimal"} + if not options.no_kernel then table.insert(selected, "kernel") end + for component in output:gmatch("[^\n]+") do table.insert(selected, component) end @@ -145,26 +174,21 @@ end -- Returns a list of pkgbase packages selected by the user local function select_packages(pkg, options) + -- These are the components which aren't generated automatically from + -- package sets. local components = { - kernel = {}, - kernel_dbg = {}, - base = {}, - base_dbg = {}, - src = {}, - tests = {}, + ["kernel"] = {}, + ["kernel-dbg"] = {}, + ["debug"] = {}, } - for compat in all_libcompats:gmatch("%S+") do - components["lib" .. compat] = {} - components["lib" .. compat .. "_dbg"] = {} - end - local rquery = capture(pkg .. "rquery -U -r FreeBSD-base %n") for package in rquery:gmatch("[^\n]+") do - if package == "FreeBSD-src" or package:match("^FreeBSD%-src%-.*") then - table.insert(components["src"], package) - elseif package == "FreeBSD-tests" or package:match("^FreeBSD%-tests%-.*") then - table.insert(components["tests"], package) + local setname = package:match("^FreeBSD%-set%-(.+)$") + + if setname then + components[setname] = components[setname] or {} + table.insert(components[setname], package) elseif package:match("^FreeBSD%-kernel%-.*") and package ~= "FreeBSD-kernel-man" then @@ -172,40 +196,51 @@ local function select_packages(pkg, options) if package == "FreeBSD-kernel-generic" then table.insert(components["kernel"], package) elseif package == "FreeBSD-kernel-generic-dbg" then - table.insert(components["kernel_dbg"], package) - end - elseif package:match(".*%-dbg$") then - table.insert(components["base_dbg"], package) - else - local found = false - for compat in all_libcompats:gmatch("%S+") do - if package:match(".*%-dbg%-lib" .. compat .. "$") then - table.insert(components["lib" .. compat .. "_dbg"], package) - found = true - break - elseif package:match(".*%-lib" .. compat .. "$") then - table.insert(components["lib" .. compat], package) - found = true - break - end - end - if not found then - table.insert(components["base"], package) + table.insert(components["kernel-dbg"], package) end end end - -- Don't assert the existence of dbg, tests, and src packages here. If using - -- a custom local repository with BSDINSTALL_PKG_REPOS_DIR we shouldn't - -- require it to have all packages. + + -- Assert that both a kernel and the "minimal" set are available, since + -- those are both required to install a functional system. Don't worry + -- if other sets are missing (e.g. base or src), which might happen + -- when using custom install media. assert(#components["kernel"] == 1) - assert(#components["base"] > 0) + assert(#components["minimal"] == 1) - local selected = {} - for _, component in ipairs(select_components(components, options)) do - append_list(selected, components[component]) + -- Prompt the user for what to install. + local selected = select_components(components, options) + + -- Determine if the "debug" component was selected. + local debug = false + for _, component in ipairs(selected) do + if component == "debug" then + debug = true + break + end end - return selected + local packages = {} + for _, component in ipairs(selected) do + local pkglist = components[component] + append_list(packages, pkglist) + + -- If the debug component was selected, install the -dbg + -- package for each set. We have to check if the dbg set + -- actually exists, because some sets (src, tests) don't + -- have a -dbg subpackage. + for _, c in ipairs(pkglist) do + local setname = c:match("^FreeBSD%-set%-(.*)$") + if debug and setname then + local dbgset = setname.."-dbg" + if components[dbgset] then + append_list(packages, components[dbgset]) + end + end + end + end + + return packages end local function parse_options() From nobody Fri Sep 19 01:16:40 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cSZN83qP0z68LHJ; Fri, 19 Sep 2025 01:16: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 4cSZN82w0Rz47lT; Fri, 19 Sep 2025 01:16:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758244600; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EYXT2AumXWtftAC4/0p/5Q2NyRdZCPByUD2K5PTLG+8=; b=fF6wDver4Ql7sBrEcS3/uAEazgoxGsxJU4q7JFR5h61vxclS8qCHa47Q/jfiFLqe/30D4w hVWjbMtksAP9V7L5wsBCrehUS9PsTafLk9w6kllK2kiGWmLxJPfoGLYwNQndCrzVtLqxdH o6Xn99GozgjoILDhp5ONXwb0GkKAFhG3XkK7pnE0nKn453iTipFpIKKZ4VM4wzh7Me5gvu rUWRLxvn/N2v1l6ARhxibzW5UiVORvIwK01Fdv+JpL3zSvtblFukacGdqTZXPqTeBcMdQ9 X3VBUr6xaHSanE5MaNRY1A0E8fSzpbgE2t8f9gy6cz4STXkJDVZtOEXO8V82pQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758244600; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EYXT2AumXWtftAC4/0p/5Q2NyRdZCPByUD2K5PTLG+8=; b=F8s0rUtxCxMzw/CnAA/ohJ+XBwQ+BYXK20mANs/CdXb+uCobPTNbXnvQ6pQykGtki/zhy/ YakRHrmE9gGDrq6hnwWCWJWM0cCGuzwjFpSNfYm/Vmc4s6zYjeSO+orLJehn9SFQnlCtjF /lRZ5KqECfCCHQqHG8qV5RsG5W2JpdtjqmgSv1xdhBWYZFiJWofZgd82xJEctr4M4HOt5C 0djCDA+zIS3Gh8LU8W1IOqIP9WRoBbDPGesNDiCtKB7j9+GconL6rs2+4pTYA4dQlEUM+u ZZWMd69kR8s+6O/4ekQ/ZnYOxw10hT0Yqht/+6HcI/K4/ZgnfqXbvifh9FoEFw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758244600; a=rsa-sha256; cv=none; b=TWvOGGdSZDznOqozlBuJW+1plYowztBqkwkxr0zTVgy4S5bPRKJRDtpit6ioiyXa3nlT2d hniEnoF1ovfV0r3WvDoIilrZyixruhp9EOQi3/6+rdbBlzL7GEdoWdMt3dAA57hMSnkzLz 1f5byG+/Iq43vubCmMgoT46S8DY8OoPu66BSPJbxAV3n3lFG9MW9o2w1ulMeqwfeaZw+0b djHOyoIX5lmB//iCKOI6rUdkbngy+IQPdEeiT5LnYugO37zh0lSfh+LSR/JVfJ5gQGMmSO 9itMvz583eJasS9g5BZVNFml1gI8nisyjqsp/xbvkVMfvKngL9GD/amz2hiJ4A== 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 4cSZN82WCpzcFS; Fri, 19 Sep 2025 01:16: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 58J1Gegf066062; Fri, 19 Sep 2025 01:16:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58J1GefE066059; Fri, 19 Sep 2025 01:16:40 GMT (envelope-from git) Date: Fri, 19 Sep 2025 01:16:40 GMT Message-Id: <202509190116.58J1GefE066059@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: 7e79bc8ce706 - main - release: use sets to select base packages List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7e79bc8ce70693a892c443c42af5ec16a95ba466 Auto-Submitted: auto-generated The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=7e79bc8ce70693a892c443c42af5ec16a95ba466 commit 7e79bc8ce70693a892c443c42af5ec16a95ba466 Author: Isaac Freund AuthorDate: 2025-09-16 19:38:54 +0000 Commit: Lexi Winter CommitDate: 2025-09-19 01:15:10 +0000 release: use sets to select base packages The introduction of package sets allows us to replace the current fragile string matching with this simpler and more robust alternative. Sponsored by: The FreeBSD Foundation MFC after: 3 seconds Reviewed by: emaste, ivy Differential Revision: https://reviews.freebsd.org/D52592 --- release/scripts/pkgbase-stage.lua | 98 +++++++++++---------------------------- 1 file changed, 28 insertions(+), 70 deletions(-) diff --git a/release/scripts/pkgbase-stage.lua b/release/scripts/pkgbase-stage.lua index 0cd4cbb5c438..9e968fd150f8 100755 --- a/release/scripts/pkgbase-stage.lua +++ b/release/scripts/pkgbase-stage.lua @@ -18,89 +18,47 @@ local function capture(command) return output:match("(.-)\n$") or output end -local function append_list(list, other) - for _, item in ipairs(other) do - table.insert(list, item) - end -end - -- Returns a list of packages to be included in the given media local function select_packages(pkg, media, all_libcompats) - local components = { - kernel = {}, - kernel_dbg = {}, - base = {}, - base_dbg = {}, - src = {}, - tests = {}, - } - - for compat in all_libcompats:gmatch("%S+") do - components["lib" .. compat] = {} - components["lib" .. compat .. "_dbg"] = {} - end - + local components = {} local rquery = capture(pkg .. "rquery -U -r FreeBSD-base %n") for package in rquery:gmatch("[^\n]+") do - if package == "FreeBSD-src" or package:match("^FreeBSD%-src%-.*") then - table.insert(components["src"], package) - elseif package == "FreeBSD-tests" or package:match("^FreeBSD%-tests%-.*") then - table.insert(components["tests"], package) - elseif package:match("^FreeBSD%-kernel%-.*") and - package ~= "FreeBSD-kernel-man" - then - -- Kernels other than FreeBSD-kernel-generic are ignored - -- Note that on powerpc64 and powerpc64le the names are - -- slightly different. - if package:match("^FreeBSD%-kernel%-generic.*%-dbg") then - table.insert(components["kernel_dbg"], package) - elseif package:match("^FreeBSD%-kernel%-generic.*") then - table.insert(components["kernel"], package) - end - elseif package:match(".*%-dbg$") then - table.insert(components["base_dbg"], package) - else - local found = false - for compat in all_libcompats:gmatch("%S+") do - if package:match(".*%-dbg%-lib" .. compat .. "$") then - table.insert(components["lib" .. compat .. "_dbg"], package) - found = true - break - elseif package:match(".*%-lib" .. compat .. "$") then - table.insert(components["lib" .. compat], package) - found = true - break - end - end - if not found then - table.insert(components["base"], package) - end + local set = package:match("^FreeBSD%-set%-(.*)$") + if set then + components[set] = package + -- Kernels other than FreeBSD-kernel-generic are ignored + -- Note that on powerpc64 and powerpc64le the names are + -- slightly different. + elseif package:match("^FreeBSD%-kernel%-generic.*-dbg") then + components["kernel-dbg"] = package + elseif package:match("^FreeBSD%-kernel%-generic.*") then + components["kernel"] = package end end - assert(#components["kernel"] == 1) - assert(#components["base"] > 0) + assert(components["kernel"]) + assert(components["base"]) local selected = {} if media == "disc" then - append_list(selected, components["base"]) - append_list(selected, components["kernel"]) - append_list(selected, components["kernel_dbg"]) - append_list(selected, components["src"]) - append_list(selected, components["tests"]) + table.insert(selected, components["base"]) + table.insert(selected, components["kernel"]) + table.insert(selected, components["kernel-dbg"]) + table.insert(selected, components["src"]) + table.insert(selected, components["tests"]) for compat in all_libcompats:gmatch("%S+") do - append_list(selected, components["lib" .. compat]) + table.insert(selected, components["lib" .. compat]) end else assert(media == "dvd") - append_list(selected, components["base"]) - append_list(selected, components["base_dbg"]) - append_list(selected, components["kernel"]) - append_list(selected, components["kernel_dbg"]) - append_list(selected, components["src"]) - append_list(selected, components["tests"]) + table.insert(selected, components["base"]) + table.insert(selected, components["base-dbg"]) + table.insert(selected, components["kernel"]) + table.insert(selected, components["kernel-dbg"]) + table.insert(selected, components["src"]) + table.insert(selected, components["tests"]) for compat in all_libcompats:gmatch("%S+") do - append_list(selected, components["lib" .. compat]) - append_list(selected, components["lib" .. compat .. "_dbg"]) + table.insert(selected, components["lib" .. compat]) + table.insert(selected, components["lib" .. compat .. "-dbg"]) end end @@ -138,7 +96,7 @@ local function main() local packages = select_packages(pkg, media, all_libcompats) - assert(os.execute(pkg .. "fetch -o " .. target .. " " .. table.concat(packages, " "))) + assert(os.execute(pkg .. "fetch -d -o " .. target .. " " .. table.concat(packages, " "))) assert(os.execute(pkg .. "repo " .. target)) end From nobody Fri Sep 19 01:43:31 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cSZz82R11z68NDt; Fri, 19 Sep 2025 01:43: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 4cSZz80K3yz3HL6; Fri, 19 Sep 2025 01:43:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758246212; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WrxvMU8fg5aO6bjIpzXQhikQCUaE763ZxstW6LVEM4E=; b=qPLPdPRYSNjzaDXhh4LwbqUP/hJAGd/g7ms5mL9zfNyaIjJwqsrDmec4psy67YsGd5tuTm aPaXv5eDgEfBoHt26Faw/XWdswoXrqahKr0yqdUsVl4iVYpa2JM8wUreRJ6F0dqSMXc/QB OZ69PL0RM+wvwaaUtVc+YjYbdT3zkCzjJ9NU6NC5BJa3SfPlrExjjF2VgmZChsmjgVvNa/ xRYPK4DlusQNxMXiLr33xRSqId42lKCW9py6rCuQHUcfrE2dRI38V12dxVEIa9tf6ri2hZ x2Fvk9hh6B5D6thiQlgbP4OVkbpRUyTyeGVuyu5UpQGwlp9U3wnxEKtP7LJG+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758246212; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WrxvMU8fg5aO6bjIpzXQhikQCUaE763ZxstW6LVEM4E=; b=W64e2eLNHYK197BFb+WOpbmjHu8Qr3VKQqYRZcRF1IRfVTnWvVvff+jERYqvJAH49RjbJl gdnM50nQfiiPOQQ4WlTHrB5P7lxL0BO5tMoVPD25sRZWTLZR3TriIlXzwe/+4Wjm0ENe6/ 3ZMP1JvrDQTptU8o3m7DclMJlpLr+vgxCpB0fbUmAFtHViYGhJc1QoMNW2era52LkiQLv/ b9TCBxuk8q9sxxZUR+mqb4cdgthVG5CRlK6YC/DWVpDHbEcKfD+kOmrl/1yQt0pOPlQmmA 5G0AUwTBnKLjMiJipcr/Rm36UJYusZ6kP1JUUPmTDwu5BbPERyxtMTaVPv9nlw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758246212; a=rsa-sha256; cv=none; b=t8DQk22kXlWG5+gvruLpmONpiss+rRFHfe7705PZCH4RDeJnbhy5SQs6aduN5aisyJU/cn bnGY9qGaQqWXSFMRU6rVgQiFEyB6zv3mIoxB9kAJd0qZvS4gu/pADUp75bDZ/o56YqbOh5 KuZKAWL5ZY8fYXGKw8JUmn5jSYMOHwNd2CV8U7THzUVbazhGldHk7PDriHL0eTK3lKHisr Qp60e9tCCEn08dVAnuWUx0fbwRxl2nOo8GntOVwmGeFtVf8zU9hZA133IyGvd2p7Yhl5a3 9h/Ihtpjmzzs87MJXfb5HO9JPXtKxLe76+zPb8ZxjifQtdG67MvDD83f+oMTaQ== 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 4cSZz76m4qzdVS; Fri, 19 Sep 2025 01:43: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 58J1hVsG019603; Fri, 19 Sep 2025 01:43:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58J1hVUK019600; Fri, 19 Sep 2025 01:43:31 GMT (envelope-from git) Date: Fri, 19 Sep 2025 01:43:31 GMT Message-Id: <202509190143.58J1hVUK019600@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 4d6d5f5a21ab - main - linuxkpi: Move string_helpers.h to string_choices.h List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4d6d5f5a21abc4abd715c63c0d99c82aaa3955c0 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=4d6d5f5a21abc4abd715c63c0d99c82aaa3955c0 commit 4d6d5f5a21abc4abd715c63c0d99c82aaa3955c0 Author: Ed Maste AuthorDate: 2025-09-18 20:46:56 +0000 Commit: Ed Maste CommitDate: 2025-09-19 01:42:19 +0000 linuxkpi: Move string_helpers.h to string_choices.h Chace Linux change fca76071bab2 ("lib/string_helpers: Split out string_choices.h") from v6.5. Everything that we implemented from string_helpers.h has moved, so rename the file, update the include guards, and add a new dummy string_helpers.h that just #includes it. This matches Linux for the functionality that we have. Reviewed by: bz Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D52606 --- .../linuxkpi/common/include/linux/string_choices.h | 71 ++++++++++++++++++++++ .../linuxkpi/common/include/linux/string_helpers.h | 67 ++------------------ 2 files changed, 75 insertions(+), 63 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/string_choices.h b/sys/compat/linuxkpi/common/include/linux/string_choices.h new file mode 100644 index 000000000000..74aa3fd019b2 --- /dev/null +++ b/sys/compat/linuxkpi/common/include/linux/string_choices.h @@ -0,0 +1,71 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2023 Jean-Sébastien Pédron + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice unmodified, this list of conditions, and the following + * disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef _LINUXKPI_LINUX_STRING_CHOICES_H_ +#define _LINUXKPI_LINUX_STRING_CHOICES_H_ + +#include + +static inline const char * +str_yes_no(bool value) +{ + if (value) + return "yes"; + else + return "no"; +} + +static inline const char * +str_on_off(bool value) +{ + if (value) + return "on"; + else + return "off"; +} + +static inline const char * +str_enabled_disabled(bool value) +{ + if (value) + return "enabled"; + else + return "disabled"; +} + +static inline const char * +str_enable_disable(bool value) +{ + if (value) + return "enable"; + else + return "disable"; +} + +#define str_disable_enable(_v) str_enable_disable(!(_v)) + +#endif diff --git a/sys/compat/linuxkpi/common/include/linux/string_helpers.h b/sys/compat/linuxkpi/common/include/linux/string_helpers.h index 2c6fe0b1708d..07d113c0cb21 100644 --- a/sys/compat/linuxkpi/common/include/linux/string_helpers.h +++ b/sys/compat/linuxkpi/common/include/linux/string_helpers.h @@ -1,71 +1,12 @@ -/*- - * SPDX-License-Identifier: BSD-2-Clause - * - * Copyright (c) 2023 Jean-Sébastien Pédron - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice unmodified, this list of conditions, and the following - * disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. +/* + * Copyright (c) 2025 The FreeBSD Foundation * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * SPDX-License-Identifier: BSD-2-Clause */ #ifndef _LINUXKPI_LINUX_STRING_HELPERS_H_ #define _LINUXKPI_LINUX_STRING_HELPERS_H_ -#include - -static inline const char * -str_yes_no(bool value) -{ - if (value) - return "yes"; - else - return "no"; -} - -static inline const char * -str_on_off(bool value) -{ - if (value) - return "on"; - else - return "off"; -} - -static inline const char * -str_enabled_disabled(bool value) -{ - if (value) - return "enabled"; - else - return "disabled"; -} - -static inline const char * -str_enable_disable(bool value) -{ - if (value) - return "enable"; - else - return "disable"; -} - -#define str_disable_enable(_v) str_enable_disable(!(_v)) +#include #endif From nobody Fri Sep 19 02:43:39 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cScJX4tDBz68RQH; Fri, 19 Sep 2025 02:43: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 4cScJX40d5z3Qvk; Fri, 19 Sep 2025 02:43:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758249820; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vJp03LM4QWpPDZHnx/CGAOfiQoyc5HOmza2HVX1mHgE=; b=YJMCoqClICzT3NeOgZI+iB96SyvgSMl2BjYYWOtX9IidRIVfaXdW+wjwLbP6SDtmWc+3vb 79ZzdMnq0Xxgr9eOgbzQdKuscx+qO4C2qS/3IQJhm+lnxsLs9Lxc54D4F2XuV055G6Lwaf +WMvE6L/t2rGTltPpJ/VxYRhuxvFPthit7+KS3bDhdlF5fE4E6Otva/LFbFDiPAlPHw7lZ JbC+efPdUWJGH5cqSM/pqopmGG1xOgfL7pe48GtNukqQTuwOp3KHHFCJGo38aAAHGHU/k+ 4eDh5gJffK9OgcnyQFKS0fa+qDn37KpXZXqqw6jmYhgkoZm+XMinQqU/5m99oA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758249820; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vJp03LM4QWpPDZHnx/CGAOfiQoyc5HOmza2HVX1mHgE=; b=KZlYVb10m7Y/m63VWnNKVUFZqzOcGmpvqk8D3vlMCD6rfEaMVWPjqQ/k604fTeiZRu666y V0EpRt0jnwA6vcBmLKmGUgxUr04HgjAS4lJTs97hfN7mr2Pxo9421F7tNYzzxCTmKVTb7t +uMGcoPeEt9qAnBZ76K3+4N031CdHgv0mWnIga1C8yrliLtyRgguE7OXdMH6DLb1c7jR4K KewDSs++7tzvBdJ3H3wM/qeU1+1wjvfg9nMRJF3dqPNcGikf2qN0jbmsPpS15cjofQPSFo PbuCcCrJ/YzD27p8OefuCpjJ6eKzAME3RZIeWJ1wPzUen6mXhWfVufWD1c48tw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758249820; a=rsa-sha256; cv=none; b=a3fZl/ORtilzxUY1xQmFFy5Y/MoDVq+xdoreXNF0XeH05A1WJc2RfVwN8yhUfwYTl/bQub yVIcT3k08utFYycT/zGjyW1A0dlDVtElXTKqNHfJE5698ev74OGkL+0hIaadEzHBP9b+W7 UXiW2xH9c1Z4xoWfGB4REZQCP2XGlm+THy5G9TqfBXbaSCm6h60JJFgjmp+UZMsB9hmWl4 oJZu7HuYQoLE9ps7P0kopibrkN0YzNeuCWyBANMKIzT2upv7W96T+TibYgnTYGu/RIpyKv JH401tVQqCBpnoEoiuw2jwjVQm/8qPsiTIx2Iu9pwZsbx76Cxz359t2Qkyt7Cw== 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 4cScJX3TxNzfxl; Fri, 19 Sep 2025 02:43: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 58J2heli032450; Fri, 19 Sep 2025 02:43:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58J2hdQP032447; Fri, 19 Sep 2025 02:43:39 GMT (envelope-from git) Date: Fri, 19 Sep 2025 02:43:39 GMT Message-Id: <202509190243.58J2hdQP032447@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Xin LI Subject: git: 627b778d9e6b - main - MFV: libexpat 2.7.2 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: delphij X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 627b778d9e6b603a44a010d22d823ca7c392b363 Auto-Submitted: auto-generated The branch main has been updated by delphij: URL: https://cgit.FreeBSD.org/src/commit/?id=627b778d9e6b603a44a010d22d823ca7c392b363 commit 627b778d9e6b603a44a010d22d823ca7c392b363 Merge: 4d6d5f5a21ab 14feafd16d12 Author: Xin LI AuthorDate: 2025-09-19 02:43:17 +0000 Commit: Xin LI CommitDate: 2025-09-19 02:43:17 +0000 MFV: libexpat 2.7.2 MFC after: 3 days contrib/expat/Changes | 81 +++- contrib/expat/Makefile.am | 7 +- contrib/expat/Makefile.in | 128 +++--- contrib/expat/README.md | 6 +- contrib/expat/configure.ac | 22 +- contrib/expat/doc/Makefile.in | 29 +- contrib/expat/doc/reference.html | 136 +++++- contrib/expat/doc/xmlwf.1 | 30 +- contrib/expat/doc/xmlwf.xml | 28 +- contrib/expat/examples/Makefile.in | 35 +- contrib/expat/expat_config.h.in | 12 +- contrib/expat/fuzz/xml_lpm_fuzzer.cpp | 6 +- contrib/expat/fuzz/xml_parse_fuzzer.c | 20 +- contrib/expat/fuzz/xml_parsebuffer_fuzzer.c | 24 +- contrib/expat/lib/Makefile.in | 49 ++- contrib/expat/lib/expat.h | 61 ++- contrib/expat/lib/expat_external.h | 123 +++--- contrib/expat/lib/internal.h | 8 + contrib/expat/lib/xmlparse.c | 658 +++++++++++++++++++++------- contrib/expat/lib/xmlrole.h | 34 +- contrib/expat/lib/xmltok.c | 4 +- contrib/expat/lib/xmltok.h | 226 +++++----- contrib/expat/tests/Makefile.in | 99 +++-- contrib/expat/tests/alloc_tests.c | 220 +++++++++- contrib/expat/tests/basic_tests.c | 8 +- contrib/expat/tests/benchmark/Makefile.in | 35 +- contrib/expat/tests/common.c | 11 +- contrib/expat/tests/handlers.c | 29 +- contrib/expat/tests/minicheck.h | 3 +- contrib/expat/tests/misc_tests.c | 7 +- contrib/expat/tests/nsalloc_tests.c | 11 +- contrib/expat/xmlwf/Makefile.in | 37 +- contrib/expat/xmlwf/unixfilemap.c | 6 +- contrib/expat/xmlwf/xmlfile.c | 21 +- contrib/expat/xmlwf/xmlwf.c | 21 +- contrib/expat/xmlwf/xmlwf_helpgen.py | 18 +- lib/libexpat/expat_config.h | 18 +- lib/libexpat/libbsdxml.3 | 2 +- 38 files changed, 1615 insertions(+), 658 deletions(-) diff --cc contrib/expat/README.md index 77c6bf27d307,000000000000..fdaaf459e204 mode 100644,000000..100644 --- a/contrib/expat/README.md +++ b/contrib/expat/README.md @@@ -1,311 -1,0 +1,311 @@@ +[![Run Linux CI tasks](https://github.com/libexpat/libexpat/actions/workflows/linux.yml/badge.svg)](https://github.com/libexpat/libexpat/actions/workflows/linux.yml) - [![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/github/libexpat/libexpat?svg=true)](https://ci.appveyor.com/project/libexpat/libexpat) +[![Packaging status](https://repology.org/badge/tiny-repos/expat.svg)](https://repology.org/metapackage/expat/versions) +[![Downloads SourceForge](https://img.shields.io/sourceforge/dt/expat?label=Downloads%20SourceForge)](https://sourceforge.net/projects/expat/files/) +[![Downloads GitHub](https://img.shields.io/github/downloads/libexpat/libexpat/total?label=Downloads%20GitHub)](https://github.com/libexpat/libexpat/releases) +[![OpenSSF Best Practices](https://www.bestpractices.dev/projects/10205/badge)](https://www.bestpractices.dev/projects/10205) + +> [!CAUTION] +> +> Expat is **understaffed** and without funding. +> There is a [call for help with details](https://github.com/libexpat/libexpat/blob/master/expat/Changes) +> at the top of the `Changes` file. + + - # Expat, Release 2.7.1 ++# Expat, Release 2.7.2 + +This is Expat, a C99 library for parsing +[XML 1.0 Fourth Edition](https://www.w3.org/TR/2006/REC-xml-20060816/), started by +[James Clark](https://en.wikipedia.org/wiki/James_Clark_%28programmer%29) in 1997. +Expat is a stream-oriented XML parser. This means that you register +handlers with the parser before starting the parse. These handlers +are called when the parser discovers the associated structures in the +document being parsed. A start tag is an example of the kind of +structures for which you may register handlers. + +Expat supports the following C99 compilers: + +- GNU GCC >=4.5 (for use from C) or GNU GCC >=4.8.1 (for use from C++) +- LLVM Clang >=3.5 - - Microsoft Visual Studio >=16.0/2019 (rolling `${today} minus 5 years`) ++- Microsoft Visual Studio >=17.0/2022 ++ (the oldest version supported by the [official GitHub Actions Windows images](https://github.com/actions/runner-images)) + +Windows users can use the +[`expat-win32bin-*.*.*.{exe,zip}` download](https://github.com/libexpat/libexpat/releases), +which includes both pre-compiled libraries and executables, and source code for +developers. + +Expat is [free software](https://www.gnu.org/philosophy/free-sw.en.html). +You may copy, distribute, and modify it under the terms of the License +contained in the file +[`COPYING`](https://github.com/libexpat/libexpat/blob/master/expat/COPYING) +distributed with this package. +This license is the same as the MIT/X Consortium license. + + +## Using libexpat in your CMake-Based Project + +There are three documented ways of using libexpat with CMake: + +### a) `find_package` with Module Mode + +This approach leverages CMake's own [module `FindEXPAT`](https://cmake.org/cmake/help/latest/module/FindEXPAT.html). + +Notice the *uppercase* `EXPAT` in the following example: + +```cmake +cmake_minimum_required(VERSION 3.10) + +project(hello VERSION 1.0.0) + +find_package(EXPAT 2.2.8 MODULE REQUIRED) + +add_executable(hello + hello.c +) + +target_link_libraries(hello PUBLIC EXPAT::EXPAT) +``` + +### b) `find_package` with Config Mode + +This approach requires files from… + +- libexpat >=2.2.8 where packaging uses the CMake build system +or +- libexpat >=2.3.0 where packaging uses the GNU Autotools build system + on Linux +or +- libexpat >=2.4.0 where packaging uses the GNU Autotools build system + on macOS or MinGW. + +Notice the *lowercase* `expat` in the following example: + +```cmake +cmake_minimum_required(VERSION 3.10) + +project(hello VERSION 1.0.0) + +find_package(expat 2.2.8 CONFIG REQUIRED char dtd ns) + +add_executable(hello + hello.c +) + +target_link_libraries(hello PUBLIC expat::expat) +``` + +### c) The `FetchContent` module + +This approach — as demonstrated below — requires CMake >=3.18 for both the +[`FetchContent` module](https://cmake.org/cmake/help/latest/module/FetchContent.html) +and its support for the `SOURCE_SUBDIR` option to be available. + +Please note that: +- Use of the `FetchContent` module with *non-release* SHA1s or `master` + of libexpat is neither advised nor considered officially supported. +- Pinning to a specific commit is great for robust CI. +- Pinning to a specific commit needs updating every time there is a new + release of libexpat — either manually or through automation —, + to not miss out on libexpat security updates. + +For an example that pulls in libexpat via Git: + +```cmake +cmake_minimum_required(VERSION 3.18) + +include(FetchContent) + +project(hello VERSION 1.0.0) + +FetchContent_Declare( + expat + GIT_REPOSITORY https://github.com/libexpat/libexpat/ + GIT_TAG 000000000_GIT_COMMIT_SHA1_HERE_000000000 # i.e. Git tag R_0_Y_Z + SOURCE_SUBDIR expat/ +) + +FetchContent_MakeAvailable(expat) + +add_executable(hello + hello.c +) + +target_link_libraries(hello PUBLIC expat) +``` + + +## Building from a Git Clone + +If you are building Expat from a check-out from the +[Git repository](https://github.com/libexpat/libexpat/), +you need to run a script that generates the configure script using the +GNU autoconf and libtool tools. To do this, you need to have +autoconf 2.58 or newer. Run the script like this: + +```console +./buildconf.sh +``` + +Once this has been done, follow the same instructions as for building +from a source distribution. + + +## Building from a Source Distribution + +### a) Building with the configure script (i.e. GNU Autotools) + +To build Expat from a source distribution, you first run the +configuration shell script in the top level distribution directory: + +```console +./configure +``` + +There are many options which you may provide to configure (which you +can discover by running configure with the `--help` option). But the +one of most interest is the one that sets the installation directory. +By default, the configure script will set things up to install +libexpat into `/usr/local/lib`, `expat.h` into `/usr/local/include`, and +`xmlwf` into `/usr/local/bin`. If, for example, you'd prefer to install +into `/home/me/mystuff/lib`, `/home/me/mystuff/include`, and +`/home/me/mystuff/bin`, you can tell `configure` about that with: + +```console +./configure --prefix=/home/me/mystuff +``` + +Another interesting option is to enable 64-bit integer support for +line and column numbers and the over-all byte index: + +```console +./configure CPPFLAGS=-DXML_LARGE_SIZE +``` + +However, such a modification would be a breaking change to the ABI +and is therefore not recommended for general use — e.g. as part of +a Linux distribution — but rather for builds with special requirements. + +After running the configure script, the `make` command will build +things and `make install` will install things into their proper +location. Have a look at the `Makefile` to learn about additional +`make` options. Note that you need to have write permission into +the directories into which things will be installed. + +If you are interested in building Expat to provide document +information in UTF-16 encoding rather than the default UTF-8, follow +these instructions (after having run `make distclean`). +Please note that we configure with `--without-xmlwf` as xmlwf does not +support this mode of compilation (yet): + +1. Mass-patch `Makefile.am` files to use `libexpatw.la` for a library name: +
+ `find . -name Makefile.am -exec sed + -e 's,libexpat\.la,libexpatw.la,' + -e 's,libexpat_la,libexpatw_la,' + -i.bak {} +` + +1. Run `automake` to re-write `Makefile.in` files:
+ `automake` + +1. For UTF-16 output as unsigned short (and version/error strings as char), + run:
+ `./configure CPPFLAGS=-DXML_UNICODE --without-xmlwf`
+ For UTF-16 output as `wchar_t` (incl. version/error strings), run:
+ `./configure CFLAGS="-g -O2 -fshort-wchar" CPPFLAGS=-DXML_UNICODE_WCHAR_T + --without-xmlwf` +
Note: The latter requires libc compiled with `-fshort-wchar`, as well. + +1. Run `make` (which excludes xmlwf). + +1. Run `make install` (again, excludes xmlwf). + +Using `DESTDIR` is supported. It works as follows: + +```console +make install DESTDIR=/path/to/image +``` + +overrides the in-makefile set `DESTDIR`, because variable-setting priority is + +1. commandline +1. in-makefile +1. environment + +Note: This only applies to the Expat library itself, building UTF-16 versions +of xmlwf and the tests is currently not supported. + +When using Expat with a project using autoconf for configuration, you +can use the probing macro in `conftools/expat.m4` to determine how to +include Expat. See the comments at the top of that file for more +information. + +A reference manual is available in the file `doc/reference.html` in this +distribution. + + +### b) Building with CMake + +The CMake build system is still *experimental* and may replace the primary +build system based on GNU Autotools at some point when it is ready. + + +#### Available Options + +For an idea of the available (non-advanced) options for building with CMake: + +```console +# rm -f CMakeCache.txt ; cmake -D_EXPAT_HELP=ON -LH . | grep -B1 ':.*=' | sed 's,^--$,,' +// Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel ... +CMAKE_BUILD_TYPE:STRING= + +// Install path prefix, prepended onto install directories. +CMAKE_INSTALL_PREFIX:PATH=/usr/local + +// Path to a program. +DOCBOOK_TO_MAN:FILEPATH=/usr/bin/docbook2x-man + +// Build man page for xmlwf +EXPAT_BUILD_DOCS:BOOL=ON + +// Build the examples for expat library +EXPAT_BUILD_EXAMPLES:BOOL=ON + +// Build fuzzers for the expat library +EXPAT_BUILD_FUZZERS:BOOL=OFF + +// Build pkg-config file +EXPAT_BUILD_PKGCONFIG:BOOL=ON + +// Build the tests for expat library +EXPAT_BUILD_TESTS:BOOL=ON + +// Build the xmlwf tool for expat library +EXPAT_BUILD_TOOLS:BOOL=ON + +// Character type to use (char|ushort|wchar_t) [default=char] +EXPAT_CHAR_TYPE:STRING=char + +// Install expat files in cmake install target +EXPAT_ENABLE_INSTALL:BOOL=ON + +// Use /MT flag (static CRT) when compiling in MSVC +EXPAT_MSVC_STATIC_CRT:BOOL=OFF + +// Build fuzzers via OSS-Fuzz for the expat library +EXPAT_OSSFUZZ_BUILD:BOOL=OFF + +// Build a shared expat library +EXPAT_SHARED_LIBS:BOOL=ON + +// Treat all compiler warnings as errors +EXPAT_WARNINGS_AS_ERRORS:BOOL=OFF + +// Make use of getrandom function (ON|OFF|AUTO) [default=AUTO] +EXPAT_WITH_GETRANDOM:STRING=AUTO + +// Utilize libbsd (for arc4random_buf) +EXPAT_WITH_LIBBSD:BOOL=OFF + +// Make use of syscall SYS_getrandom (ON|OFF|AUTO) [default=AUTO] +EXPAT_WITH_SYS_GETRANDOM:STRING=AUTO +``` diff --cc lib/libexpat/expat_config.h index 748f75ee157d,000000000000..64da66e1cf6f mode 100644,000000..100644 --- a/lib/libexpat/expat_config.h +++ b/lib/libexpat/expat_config.h @@@ -1,149 -1,0 +1,149 @@@ +/* expat_config.h. Generated from expat_config.h.in by configure. */ +/* expat_config.h.in. Generated from configure.ac by autoheader. */ + +#ifndef EXPAT_CONFIG_H +#define EXPAT_CONFIG_H 1 + +#include + +/* Define if building universal (internal helper macro) */ +/* #undef AC_APPLE_UNIVERSAL_BUILD */ + +/* 1234 = LILENDIAN, 4321 = BIGENDIAN */ +#if BYTE_ORDER == LITTLE_ENDIAN +#define BYTEORDER 1234 +#else +#define BYTEORDER 4321 +#endif + +/* Define to 1 if you have the `arc4random' function. */ +#define HAVE_ARC4RANDOM 1 + +/* Define to 1 if you have the `arc4random_buf' function. */ +#define HAVE_ARC4RANDOM_BUF 1 + +/* define if the compiler supports basic C++11 syntax */ +#define HAVE_CXX11 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_FCNTL_H 1 + - /* Define to 1 if you have the `getpagesize' function. */ ++/* Define to 1 if you have the 'getpagesize' function. */ +#define HAVE_GETPAGESIZE 1 + +/* Define to 1 if you have the `getrandom' function. */ +#define HAVE_GETRANDOM 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + - /* Define to 1 if you have the `bsd' library (-lbsd). */ ++/* Define to 1 if you have the 'bsd' library (-lbsd). */ +/* #undef HAVE_LIBBSD */ + - /* Define to 1 if you have a working `mmap' system call. */ ++/* Define to 1 if you have a working 'mmap' system call. */ +#define HAVE_MMAP 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDIO_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have `syscall' and `SYS_getrandom'. */ +#define HAVE_SYSCALL_GETRANDOM 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_PARAM_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to the sub-directory where libtool stores uninstalled libraries. */ +#define LT_OBJDIR ".libs/" + +/* Name of package */ +#define PACKAGE "expat" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "https://github.com/libexpat/libexpat/issues" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "expat" + +/* Define to the full name and version of this package. */ - #define PACKAGE_STRING "expat 2.7.1" ++#define PACKAGE_STRING "expat 2.7.2" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "expat" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "" + +/* Define to the version of this package. */ - #define PACKAGE_VERSION "2.7.1" ++#define PACKAGE_VERSION "2.7.2" + - /* Define to 1 if all of the C90 standard headers exist (not just the ones ++/* Define to 1 if all of the C89 standard headers exist (not just the ones + required in a freestanding environment). This macro is provided for + backward compatibility; new code need not use it. */ +#define STDC_HEADERS 1 + +/* Version number of package */ - #define VERSION "2.7.1" ++#define VERSION "2.7.2" + +/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most + significant byte first (like Motorola and SPARC, unlike Intel). */ +#if defined AC_APPLE_UNIVERSAL_BUILD +# if defined __BIG_ENDIAN__ +# define WORDS_BIGENDIAN 1 +# endif +#else +# ifndef WORDS_BIGENDIAN +/* # undef WORDS_BIGENDIAN */ +# endif +#endif + +/* Define to allow retrieving the byte offsets for attribute names and values. + */ +/* #undef XML_ATTR_INFO */ + +/* Define to specify how much context to retain around the current parse + point, 0 to disable. */ +#define XML_CONTEXT_BYTES 1024 + +/* Define to include code reading entropy from `/dev/urandom'. */ +#define XML_DEV_URANDOM 1 + +/* Define to make parameter entity parsing functionality available. */ +#define XML_DTD 1 + +/* Define as 1/0 to enable/disable support for general entities. */ +#define XML_GE 1 + +/* Define to make XML Namespaces functionality available. */ +#define XML_NS 1 + - /* Define to empty if `const' does not conform to ANSI C. */ ++/* Define to empty if 'const' does not conform to ANSI C. */ +/* #undef const */ + - /* Define to `long int' if does not define. */ ++/* Define to 'long int' if does not define. */ +/* #undef off_t */ + +#endif // ndef EXPAT_CONFIG_H diff --cc lib/libexpat/libbsdxml.3 index c91184840b70,000000000000..60aa64fba20d mode 100644,000000..100644 --- a/lib/libexpat/libbsdxml.3 +++ b/lib/libexpat/libbsdxml.3 @@@ -1,67 -1,0 +1,67 @@@ +.\"- +.\" Copyright (c) 2002 Poul-Henning Kamp +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\"/ +.Dd April 7, 2025 +.Dt LIBBSDXML 3 +.Os +.Sh NAME +.Nm libbsdxml +.Nd eXpat XML parser library +.Sh SYNOPSIS +.In bsdxml.h +.Sh DESCRIPTION +The +.Nm - library is a verbatim copy of the eXpat XML library version 2.7.1. ++library is a verbatim copy of the eXpat XML library version 2.7.2. +.Pp +The +.Nm +library is intended to be used within the +.Fx +base system only. +Use of the +.Nm +library for other purposes is not supported and discouraged. +.Pp +To avoid version and autoconfiguration issues, the library has been +renamed to +.Nm +rather than retain the original eXpat library and include file names +to prevent confusion and autoconfiguration issues for 3rd party +software. +.Sh SEE ALSO +For full documentation, please see the eXpat webpage at +.Pa http://www.libexpat.org/ . +.Sh AUTHORS +.An -nosplit +The original eXpat was written by +.An James Clark Aq Mt jjc@jclark.com . +.Pp +Subsequently eXpat maintenance and development been taken up by a group +of people under the leadership of +.An Fred Drake Aq Mt fdrake@acm.com , +.An Paul Prescod , +and +.An Clark Cooper . From nobody Fri Sep 19 05:09:48 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cSgYD3dqVz68cP6; Fri, 19 Sep 2025 05:09:52 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from omta003.cacentral1.a.cloudfilter.net (omta001.cacentral1.a.cloudfilter.net [3.97.99.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cSgYD0YRVz3hgF; Fri, 19 Sep 2025 05:09:52 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Authentication-Results: mx1.freebsd.org; none Received: from shw-obgw-4004a.ext.cloudfilter.net ([10.228.9.227]) by cmsmtp with ESMTPS id zHQVusQS20ym7zTNXuecbC; Fri, 19 Sep 2025 05:09:51 +0000 Received: from spqr.komquats.com ([70.66.136.217]) by cmsmtp with ESMTPSA id zTNVu0meAJhBPzTNWuSdvU; Fri, 19 Sep 2025 05:09:51 +0000 X-Auth-User: cschuber X-Authority-Analysis: v=2.4 cv=QY3Fvdbv c=1 sm=1 tr=0 ts=68cce59f a=h7br+8Ma+Xn9xscxy5znUg==:117 a=h7br+8Ma+Xn9xscxy5znUg==:17 a=kj9zAlcOel0A:10 a=yJojWOMRYYMA:10 a=6I5d2MoRAAAA:8 a=EkcXrb_YAAAA:8 a=YxBL1-UpAAAA:8 a=47Afa10EURncjdjWeDsA:9 a=CjuIK1q_8ugA:10 a=LK5xJRSDVpKd5WXXoEvA:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy.cwsent.com [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTP id B4CBC1022; Thu, 18 Sep 2025 22:09:48 -0700 (PDT) Received: by slippy.cwsent.com (Postfix, from userid 1000) id 85F72492; Thu, 18 Sep 2025 22:09:48 -0700 (PDT) X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.8+dev Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Aymeric Wibo cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 87e2b532ec9e - main - Revert "sys/power: Sleep type reporting by PM backends" In-reply-to: <202509180949.58I9nwwU017076@gitrepo.freebsd.org> References: <202509180949.58I9nwwU017076@gitrepo.freebsd.org> Comments: In-reply-to Aymeric Wibo message dated "Thu, 18 Sep 2025 09:49:58 +0000." List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 18 Sep 2025 22:09:48 -0700 Message-Id: <20250919050948.85F72492@slippy.cwsent.com> X-CMAE-Envelope: MS4xfJuw96mzDWmiqh9VrOrF0N5fOLo4EFhDmx+8pHIvxyTinANOEfjejecW+tUlbDC9y+6S73zbO3/UWn/zv6HtYpf8fcQQcei+ZdHycRzmEKzTonjzr022 pqtFLXwszT6mSNlcFFed+1QswDBVlM2hWoyvuKF4aWwdO+Jqzk904s5NRJyuFmEt8CMtLzArMhQlYo/qItscyNjuLkxWIAhi4n2ibh8oGl3mSZFouPntsJIs kh3BkOlLANFsQijGfXC0PRqCHvTRzAT8A19p5M1O1tJouP9SlM0WJbpDy6HxZxImUtzP4haAz9pvGQrWjNsBn2JJBEiJN9gejXf5lii8Vn0= X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4cSgYD0YRVz3hgF In message <202509180949.58I9nwwU017076@gitrepo.freebsd.org>, Aymeric Wibo writ es: > The branch main has been updated by obiwac: > > URL: https://cgit.FreeBSD.org/src/commit/?id=87e2b532ec9e9504ac743931ffae5286 > 79a1f4c0 > > commit 87e2b532ec9e9504ac743931ffae528679a1f4c0 > Author: Aymeric Wibo > AuthorDate: 2025-09-18 09:45:27 +0000 > Commit: Aymeric Wibo > CommitDate: 2025-09-18 09:49:17 +0000 > > Revert "sys/power: Sleep type reporting by PM backends" > > This reverts commit e779891327b1d9b9ab10ba482e59f498790505a7. > > PR: 289634 > --- > sys/dev/acpica/acpi.c | 6 ++---- > sys/kern/subr_power.c | 46 +++++----------------------------------------- > sys/sys/power.h | 3 +-- > 3 files changed, 8 insertions(+), 47 deletions(-) > > diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c > index 702e1ecb5340..8dd879a573cc 100644 > --- a/sys/dev/acpica/acpi.c > +++ b/sys/dev/acpica/acpi.c > @@ -734,8 +734,7 @@ acpi_attach(device_t dev) > goto out; > > /* Register ACPI again to pass the correct argument of pm_func. */ > - power_pm_register(POWER_PM_TYPE_ACPI, acpi_pm_func, sc, > - acpi_supported_stypes); > + power_pm_register(POWER_PM_TYPE_ACPI, acpi_pm_func, sc); > > acpi_platform_osc(dev); > > @@ -4777,8 +4776,7 @@ acpi_pm_register(void *arg) > if (!cold || resource_disabled("acpi", 0)) > return; > > - power_pm_register(POWER_PM_TYPE_ACPI, acpi_pm_func, NULL, > - acpi_supported_stypes); > + power_pm_register(POWER_PM_TYPE_ACPI, acpi_pm_func, NULL); > } > > SYSINIT(power, SI_SUB_KLD, SI_ORDER_ANY, acpi_pm_register, NULL); > diff --git a/sys/kern/subr_power.c b/sys/kern/subr_power.c > index 44ad82860649..eb5bd03f5018 100644 > --- a/sys/kern/subr_power.c > +++ b/sys/kern/subr_power.c > @@ -39,14 +39,13 @@ > #include > #include > > -enum power_stype power_standby_stype = POWER_STYPE_UNKNOWN; > -enum power_stype power_suspend_stype = POWER_STYPE_UNKNOWN; > -enum power_stype power_hibernate_stype = POWER_STYPE_UNKNOWN; > +enum power_stype power_standby_stype = POWER_STYPE_STANDBY; > +enum power_stype power_suspend_stype = POWER_STYPE_SUSPEND_TO_IDLE; > +enum power_stype power_hibernate_stype = POWER_STYPE_HIBERNATE; > > static u_int power_pm_type = POWER_PM_TYPE_NONE; > static power_pm_fn_t power_pm_fn = NULL; > static void *power_pm_arg = NULL; > -static bool power_pm_supported[POWER_STYPE_COUNT] = {0}; > static struct task power_pm_task; > > enum power_stype > @@ -71,26 +70,6 @@ power_stype_to_name(enum power_stype stype) > return (power_stype_names[stype]); > } > > -static int > -sysctl_supported_stypes(SYSCTL_HANDLER_ARGS) > -{ > - int error; > - struct sbuf sb; > - enum power_stype stype; > - > - sbuf_new(&sb, NULL, 32, SBUF_AUTOEXTEND); > - for (stype = 0; stype < POWER_STYPE_COUNT; stype++) { > - if (power_pm_supported[stype]) > - sbuf_printf(&sb, "%s ", power_stype_to_name(stype)); > - } > - sbuf_trim(&sb); > - sbuf_finish(&sb); > - error = sysctl_handle_string(oidp, sbuf_data(&sb), sbuf_len(&sb), req); > - sbuf_delete(&sb); > - > - return (error); > -} > - > static int > power_sysctl_stype(SYSCTL_HANDLER_ARGS) > { > @@ -107,8 +86,7 @@ power_sysctl_stype(SYSCTL_HANDLER_ARGS) > new_stype = power_name_to_stype(name); > if (new_stype == POWER_STYPE_UNKNOWN) > return (EINVAL); > - if (!power_pm_supported[new_stype]) > - return (EOPNOTSUPP); > + /* TODO Check to see if the new stype is supported. */ > if (new_stype != old_stype) > *(enum power_stype *)oidp->oid_arg1 = new_stype; > return (0); > @@ -117,9 +95,6 @@ power_sysctl_stype(SYSCTL_HANDLER_ARGS) > static SYSCTL_NODE(_kern, OID_AUTO, power, CTLFLAG_RW, 0, > "Generic power management related sysctls"); > > -SYSCTL_PROC(_kern_power, OID_AUTO, supported_stype, > - CTLTYPE_STRING | CTLFLAG_RD, 0, 0, sysctl_supported_stypes, "A", > - "List supported sleep types"); > SYSCTL_PROC(_kern_power, OID_AUTO, standby, CTLTYPE_STRING | CTLFLAG_RW, > &power_standby_stype, 0, power_sysctl_stype, "A", > "Sleep type to enter on standby"); > @@ -139,8 +114,7 @@ power_pm_deferred_fn(void *arg, int pending) > } > > int > -power_pm_register(u_int pm_type, power_pm_fn_t pm_fn, void *pm_arg, > - bool pm_supported[static POWER_STYPE_COUNT]) > +power_pm_register(u_int pm_type, power_pm_fn_t pm_fn, void *pm_arg) > { > int error; > > @@ -149,16 +123,6 @@ power_pm_register(u_int pm_type, power_pm_fn_t pm_fn, vo > id *pm_arg, > power_pm_type = pm_type; > power_pm_fn = pm_fn; > power_pm_arg = pm_arg; > - memcpy(power_pm_supported, pm_supported, > - sizeof(power_pm_supported)); > - if (power_pm_supported[POWER_STYPE_STANDBY]) > - power_standby_stype = POWER_STYPE_STANDBY; > - if (power_pm_supported[POWER_STYPE_SUSPEND_TO_IDLE]) > - power_suspend_stype = POWER_STYPE_SUSPEND_TO_IDLE; > - else if (power_pm_supported[POWER_STYPE_SUSPEND_TO_MEM]) > - power_suspend_stype = POWER_STYPE_SUSPEND_TO_MEM; > - if (power_pm_supported[POWER_STYPE_HIBERNATE]) > - power_hibernate_stype = POWER_STYPE_HIBERNATE; > error = 0; > TASK_INIT(&power_pm_task, 0, power_pm_deferred_fn, NULL); > } else { > diff --git a/sys/sys/power.h b/sys/sys/power.h > index 33ace400bfd2..44d7fc354423 100644 > --- a/sys/sys/power.h > +++ b/sys/sys/power.h > @@ -91,8 +91,7 @@ extern const char *power_stype_to_name(enum power_stype _ > stype); > > typedef int (*power_pm_fn_t)(u_long _cmd, void* _arg, enum power_stype _styp > e); > extern int power_pm_register(u_int _pm_type, power_pm_fn_t _pm_fn, > - void *_pm_arg, > - bool _pm_supported[static POWER_STYPE_COUNT]); > + void *_pm_arg); > extern u_int power_pm_get_type(void); > extern void power_pm_suspend(int); > > cThank you. This resolves the poweroff hang on my UEFI machines (HP 840 and Framework 13 and the poweroff panic on my non-UEFI machines (all ASUS). -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org e**(i*pi)+1=0 From nobody Fri Sep 19 07:04:31 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cSk5g2RsBz67WHG; Fri, 19 Sep 2025 07:04:39 +0000 (UTC) (envelope-from bapt@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cSk5g1s3Vz3rNn; Fri, 19 Sep 2025 07:04:39 +0000 (UTC) (envelope-from bapt@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758265479; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=yNu1lqo6BhLtgknIyO/lTJQsqL3P8Eq8pTVLPSt0BiY=; b=iUN+COZ/QK3bQc7mL4v5xgwFtz+wW96H8VtEK8SqAourpcvmn2yWHLsRAlvQgTT+Yab2ms yzeOMu74rKO6oT33F4djGVdtd36sXD7G7vAetOkprvMyKGlmCTK3G/FCsHDwDIwgu9vIBB wLjW+IqbtGuXAJw5egS5EX34pGa5rjfRgeD5c/Vu7mVgs/rj9WGB3izM5aLr0Crzfa0IqC qtAjfU5u0aGKVyds4FXRGmkN/90x0YJoL2T5z+gB8n2n+eYrOoMaH0OKVbEMUN9fl4HM9K 5+d9c8ypJmoTcegyWoiFxwil284orZkc2C1jkyH/K1hALTdxFz2u8ES4SDIzeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758265479; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=yNu1lqo6BhLtgknIyO/lTJQsqL3P8Eq8pTVLPSt0BiY=; b=uYJr+h7zRvCm+eedTMt6CqP/rhCPMoBSH2rTBy8QxZZiTzLaoyg0mpaA9uL9/TR1N/oE0k e63qANnHglwcBGYYmgpzrQs8L8I1fzr8/k2khZ0Ui6Xt5N+aOYUjKHIP15yIkMZVIuLbm+ wjrYpkHwUGdWmbdjeILXTHdmXNpRvjJQeFsrMjH+3yS/E+nrWsKqlmY1DRIoYRifAou9Zt kD0RbqKZLWvUELqpBG2Du0hzgw18uevOPy7qi0OVd1eJMQmpCwPBz5iWR8HLgJ3TK2KMTz IVQnayAq7ieS5ZFEoXETrJpige7HSiAT1WNjBUSKu6b6+SoP1TbJkB+f/238mQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758265479; a=rsa-sha256; cv=none; b=UxN0/V6/Z9hVQb/aOJR4rU4M6JSMCcIiJgPPTIb1ius9M63K+o4UupBiOR/LqbsAt776Qh /9dWU5dGrje8zjlBIf4xL1epJGBd46Gs1U9AUeDJ7tgxYUip/H5p/5lg0z0/N44SVsi7yx 8X0VUL2QXu5wW7IhVAEKbyC/0WE9I0TRoJNwXBIvNRclMnyMxkRxppGwpvlvP0U4NX9unQ pnRcGGbgcrUnzBNVRMKQiWyfKyu5nb1Tq88OHqZaitjvmlloeVk28ozPNH3O9PXSIjkZM5 1Ok5CDrYAOBgvACeQma88rBgrYpFUuvg6wCJJdKMEKCGt0463rEtyk1JRZx9xw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from b.nours.eu (b.nours.eu [IPv6:2001:41d0:303:5e39::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: bapt) by smtp.freebsd.org (Postfix) with ESMTPSA id 4cSk5g0WPvz16CK; Fri, 19 Sep 2025 07:04:39 +0000 (UTC) (envelope-from bapt@freebsd.org) Received: by b.nours.eu (Postfix, from userid 1001) id CA7D7B1466; Fri, 19 Sep 2025 09:04:31 +0200 (CEST) Date: Fri, 19 Sep 2025 09:04:31 +0200 From: Baptiste Daroussin To: Colin Percival Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 6b5adf33873a - main - Include a pkg package in the pkgbase repo Message-ID: References: <202509172239.58HMdOK9055924@gitrepo.freebsd.org> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202509172239.58HMdOK9055924@gitrepo.freebsd.org> On Wed 17 Sep 22:39, Colin Percival wrote: > The branch main has been updated by cperciva: > > URL: https://cgit.FreeBSD.org/src/commit/?id=6b5adf33873a309523dc4e585ff08d70bb6c6f2f > > commit 6b5adf33873a309523dc4e585ff08d70bb6c6f2f > Author: Colin Percival > AuthorDate: 2025-09-17 22:34:25 +0000 > Commit: Colin Percival > CommitDate: 2025-09-17 22:34:25 +0000 > > Include a pkg package in the pkgbase repo > > It is essential that users be able to install the FreeBSD base system > from release media and have all the bits needed to update the FreeBSD > base system without touching the ports tree or pkg.freebsd.org. To > that end, resurrect (and heavily rewrite) the make-pkg-package.sh > script and hook it into the create-packages target; if /usr/ports > exists when building pkgbase packages, we'll also (cross)build pkg > and include it in the repository. > > Scripting for actually installing this package as part of the FreeBSD > installation process to come later, but I wanted this in the tree in > time to test it in this week's snapshots. > > MFC after: 1 day > Sponsored by: https://www.patreon.com/cperciva > --- > Makefile.inc1 | 6 ++++-- > release/scripts/make-pkg-package.sh | 28 ++++++++++++---------------- > 2 files changed, 16 insertions(+), 18 deletions(-) > > diff --git a/Makefile.inc1 b/Makefile.inc1 > index 97a0b00cc517..65631c2e8eb8 100644 > --- a/Makefile.inc1 > +++ b/Makefile.inc1 > @@ -2039,12 +2039,14 @@ update-packages: .PHONY > ${_+_}${MAKE} -C ${.CURDIR} ${PKGMAKEARGS} real-update-packages > > package-pkg: .PHONY > +.if exists(${PORTSDIR}) > rm -rf /tmp/ports.${TARGET} || : > - env ${WMAKEENV:Q} SRCDIR=${.CURDIR} PORTSDIR=${PORTSDIR} REVISION=${_REVISION} \ > + env ${WMAKEENV} SRCDIR=${.CURDIR} PORTSDIR=${PORTSDIR} REVISION=${_REVISION} \ > PKG_CMD=${PKG_CMD} PKG_VERSION=${PKG_VERSION} REPODIR=${REPODIR} \ > WSTAGEDIR=${WSTAGEDIR} \ > OSVERSION="${SRCRELDATE}" \ > sh ${.CURDIR}/release/scripts/make-pkg-package.sh > +.endif > > real-packages: stage-packages create-packages sign-packages .PHONY > > @@ -2127,7 +2129,7 @@ create-packages-source: _pkgbootstrap _repodir .PHONY > SOURCE_DATE_EPOCH=${SOURCE_DATE_EPOCH} \ > create-source-packages > > -create-packages: .PHONY create-packages-world create-packages-kernel create-packages-source create-packages-sets > +create-packages: .PHONY create-packages-world create-packages-kernel create-packages-source package-pkg create-packages-sets > > create-source-src-package: _pkgbootstrap .PHONY > rm -f ${SSTAGEDIR}/src.plist 2>/dev/null || : > diff --git a/release/scripts/make-pkg-package.sh b/release/scripts/make-pkg-package.sh > index 68172c47f326..a0ac0fc16305 100755 > --- a/release/scripts/make-pkg-package.sh > +++ b/release/scripts/make-pkg-package.sh > @@ -1,26 +1,22 @@ > #!/bin/sh > -# > -# > > -# Simulate the build environment. > -eval $(make -C ${SRCDIR} TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} buildenvvars) > +# Simulate the build environment. Note that we need to unset some variables > +# which are set in the src tree since they have different (unwanted) effects > +# in the ports tree. > +SRC_PKG_VERSION=${PKG_VERSION} > +PKG_ABI=$(${PKG_CMD} -o ABI_FILE=${WSTAGEDIR}/bin/sh config ABI) > +unset PKG_VERSION > +unset MAKEFLAGS > +unset PKGBASE > export WRKDIRPREFIX=/tmp/ports.${TARGET} > -export WSTAGEDIR=${WSTAGEDIR} > -export REPODIR=${REPODIR} > -export PKG_CMD=${PKG_CMD} > -export PKG_VERSION=${PKG_VERSION} > -export OSVERSION=${OSVERSION} > export WRKDIR=$(make -C ${PORTSDIR}/ports-mgmt/pkg -V WRKDIR) > > make -C ${PORTSDIR}/ports-mgmt/pkg TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ I am not sure I got this properly, but You probably want to add --sysroot=${WSTAGEDIR} to ensure pkg is linked to the proper libraries and use the right headers from the target? in particular since pkg uses __FreeBSD_version in some places. > CONFIGURE_ARGS="--host=$(uname -m)-portbld-freebsd${REVISION}" \ Best regards, Bapt From nobody Fri Sep 19 08:09:14 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cSlXB37kRz67cSd; Fri, 19 Sep 2025 08: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 4cSlXB2QVFz41xf; Fri, 19 Sep 2025 08: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=1758269354; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8QgSySrbpddqaEAzcXjPKk2xFx6Y6P2bdfXOQHCmb1I=; b=kcXk3c6ZX3cAZZFiM6U1vBzRn4M+qvoWMlNT7q7/h92xK7CqDDj3tyE17TQB6KTdyvFdU9 FN0QkCbJpMIKU26Y7K6xLf8jUhMZ56t1LLGt1apcRevHsyfNboZHokNjbluc2KN/2FQR8U tVRmQjgCKWP6uI2npYBeI2jVnXPayAIOPXRuUZZIZkcf4MBYR/v4O3YW34l/TCM4GJ7sIp scdwGT1e++BDfPIqj6fcf6qgYNUM2XNNTNib1zLYXcUngzKL7cAUus2UFde4NOXHf6BOHB JTh2je5lGcBASA+Ftac1iuO5ZvIC9DjVJcaHe+d6opOAR0zdO4n1qsnXA/fdFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758269354; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8QgSySrbpddqaEAzcXjPKk2xFx6Y6P2bdfXOQHCmb1I=; b=wntqhggzbZdwFams2pCgJ75ShiSIr8D9H4nvvO7Vd+TDGMVmtn3i3LAYv9HiwdYHZ9qKXB FeUUl0+i2v6nwdKAc3uB8Xnz2EvfF8W8w3BMqQQ23Oh4WhxIG1jlI7swfYVTBKwDfZekcc 2EFMLAIwYl2W0KERvxqy0DvVzzRwzVIUwoNoD6W40apvMnLufbsDT170OxuZwZX9BkgOvE 0so59ulWy+MmYl8wYXYMebYy4b6PCqi7hFXqdJkm+sBpjEUrg6fOmrSXt78sGknVfEOWNK U8qCxJl4htGlrkGt05fhDtbwsOdEMCfSt7P/019/HlbWOmmgZfTTMwlVKk9PsA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758269354; a=rsa-sha256; cv=none; b=a+F5/hO415e/DM8r81vNLDk1VfDxu/mwik6AAbhFli/nRI2Y077bBkUzPitjJvZNkNShA/ 40N8qgbvn0bvD44IWC44EyvQr1iUdkw1HkQXcADDKefCAgKjYc9KzoQLqaU6r/5C2QUAAh U2akvNEsxxTAzrajzOHysjTGSJGV4/OanW5c+CXQrGrYT0XYJq2bnjdWzWr9Q+R8VfqKti ebo9jd/N8y39LgVW+43Y8glmUrtTUgwtYohYjiqccayohvLg+AIy0yEEPqGlTGhh2R+rOW xf0bonawtV4VWc7wgLtjyo4I3WxyZnSbYe+c0QA/HYB1ncl80elBWdBhU1ktNQ== 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 4cSlXB1tvczqJ5; Fri, 19 Sep 2025 08: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 58J89E5b036113; Fri, 19 Sep 2025 08: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 58J89Eiu036110; Fri, 19 Sep 2025 08:09:14 GMT (envelope-from git) Date: Fri, 19 Sep 2025 08:09:14 GMT Message-Id: <202509190809.58J89Eiu036110@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Colin Percival Subject: git: 088e21000507 - main - release: More fixes for building pkg package List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 088e21000507510a2c3b1ec22684fe9665f6c8a7 Auto-Submitted: auto-generated The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=088e21000507510a2c3b1ec22684fe9665f6c8a7 commit 088e21000507510a2c3b1ec22684fe9665f6c8a7 Author: Colin Percival AuthorDate: 2025-09-19 08:07:17 +0000 Commit: Colin Percival CommitDate: 2025-09-19 08:09:01 +0000 release: More fixes for building pkg package * Ignore "wrong major" errors when obtaining WRKDIR. * Put distfiles in /tmp in case /usr/ports is read-only. MFC after: 6 hours Sponsored by: https://www.patreon.com/cperciva --- release/scripts/make-pkg-package.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/release/scripts/make-pkg-package.sh b/release/scripts/make-pkg-package.sh index 7712054d26c0..ee75e7d68d14 100755 --- a/release/scripts/make-pkg-package.sh +++ b/release/scripts/make-pkg-package.sh @@ -9,7 +9,8 @@ unset PKG_VERSION unset MAKEFLAGS unset PKGBASE export WRKDIRPREFIX=/tmp/ports.${TARGET} -export WRKDIR=$(make -C ${PORTSDIR}/ports-mgmt/pkg -V WRKDIR) +export DISTDIR=/tmp/distfiles +export WRKDIR=$(make -C ${PORTSDIR}/ports-mgmt/pkg I_DONT_CARE_IF_MY_BUILDS_TARGET_THE_WRONG_RELEASE=YES -V WRKDIR) make -C ${PORTSDIR}/ports-mgmt/pkg TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ CONFIGURE_ARGS="--host=$(uname -m)-portbld-freebsd${REVISION}" \ From nobody Fri Sep 19 10:30:06 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cSpfk4xGGz67ncX; Fri, 19 Sep 2025 10:30:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cSpfk3vK4z3LZy; Fri, 19 Sep 2025 10:30:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758277806; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6M2S6uC/36glgu+KeCa0DTI2spWCpOybw5lWDPotPVQ=; b=ScQ+OcjKCll2YLRWJGh9Ow7bpNxxL5IOVNe5owvWRinH6/hk33mD02ZnqyFfi+Kh1X0U7t DZxD9BpI8r5DZ7HZmPx/4d7nLYNJA1xQqSJF3RxuuFqi3SaLBIvRmFxWbvDZfElOR54i5J 5FJjC+Pnh2rHG6CCKB3B2p06P8/e/M6YmKy35qmZM1ykrJo7ycF0FkMIbkmSISkyLDU0K1 zJpyuaqOVISslPjLzjAhWhVy+yd7LTHXE3eZ2x6W8FMOzycJvnwL8tFgA93SHQ5cJob4RF 1WKvMo0QxNfQ1DtM5U4iAorwZBPuzO01Ted17oM369tW3iyR2Vmfq4oLgNsjTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758277806; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6M2S6uC/36glgu+KeCa0DTI2spWCpOybw5lWDPotPVQ=; b=aLK/ixiZbUiApBkehULv1qaX+qGC9IHstMuLiuK0EnVzKaxBSNquChg4Op4M/nJEnQHwRq 3p1ImW8P7CGi56z7KMrVKkUj9j6NmG0A/G2hDqTr/RKkXnwCkLhqTZ8m37WHWYJb5V1xlC 69jKrCdmr9XpQj5iA2FhU2MQd+FCmCVNKB8zKKDVkB98Sivo9hHOVCuYzLpfiaB+mY3cUD hq+Qe8/5C5rBhFPUILPPUG8x+/EZanEM3reCrA+I7L9miMZPDpec807CTW4nx6XcvUVcaF 0f9LIh8kYQdNqW82rJAg7LhuDt1kouNWUTnqt7Z9A1MnFXNMKdAgYpLNYv56XQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758277806; a=rsa-sha256; cv=none; b=dLTNPwlKjrD5c+hP/HlC3H9cXY3PE5O+fvacGpvaSoJLswNx0ObI1X34qtURlftUfasdDD 8LZJ0dmA781FroiN/lhIbXPyPmEl0iE6KQ10UQzz/0WdfTg8ytvQKd6ujdTZCZB2pAGrd+ 3irpqsO4dEb/Uh8v6MYX921vaNqE8TkYj428pGTVE45QkuzTCtaGufv5JV0lIKHDIiLeKm 8wieVqOnGmWimlsQobKAkFKOMVTlOHhepb7YigURtwafPPB4fUERukwzWsugBzvHJ9SEkJ iNGp0wDBhqsbX68DH6OdEAdDQUZW691BF7Y/pSHPEXMJ33r5lUa69LhmVOkIwA== 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 4cSpfk3Sm3ztKP; Fri, 19 Sep 2025 10:30:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58JAU6hT003985; Fri, 19 Sep 2025 10:30:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58JAU6CE003980; Fri, 19 Sep 2025 10:30:06 GMT (envelope-from git) Date: Fri, 19 Sep 2025 10:30:06 GMT Message-Id: <202509191030.58JAU6CE003980@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: 72828486ca94 - main - arm64: Move the FEAT_PAN check later List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 72828486ca9412f118d7e2316e584cd1cab8c90f Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=72828486ca9412f118d7e2316e584cd1cab8c90f commit 72828486ca9412f118d7e2316e584cd1cab8c90f Author: Andrew Turner AuthorDate: 2025-09-19 10:05:46 +0000 Commit: Andrew Turner CommitDate: 2025-09-19 10:05:46 +0000 arm64: Move the FEAT_PAN check later We only need to enable PAN (Privileged access never) before userspace is running. Before that there are no unprivileged mappings to protect the kernel from accessing. While here switch to use get_kernel_reg to handle the case some CPUs have FEAT_PAN, while some don't. Reviewed by: emaste Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D52576 --- sys/arm64/arm64/machdep.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/arm64/arm64/machdep.c b/sys/arm64/arm64/machdep.c index 47c701e8588c..29ffa5109305 100644 --- a/sys/arm64/arm64/machdep.c +++ b/sys/arm64/arm64/machdep.c @@ -178,7 +178,8 @@ pan_check(const struct cpu_feat *feat __unused, u_int midr __unused) { uint64_t id_aa64mfr1; - id_aa64mfr1 = READ_SPECIALREG(id_aa64mmfr1_el1); + if (!get_kernel_reg(ID_AA64MMFR1_EL1, &id_aa64mfr1)) + return (FEAT_ALWAYS_DISABLE); if (ID_AA64MMFR1_PAN_VAL(id_aa64mfr1) == ID_AA64MMFR1_PAN_NONE) return (FEAT_ALWAYS_DISABLE); @@ -209,7 +210,7 @@ pan_enable(const struct cpu_feat *feat __unused, CPU_FEAT(feat_pan, "Privileged access never", pan_check, NULL, pan_enable, - CPU_FEAT_EARLY_BOOT | CPU_FEAT_PER_CPU); + CPU_FEAT_AFTER_DEV | CPU_FEAT_PER_CPU); bool has_hyp(void) From nobody Fri Sep 19 10:30:07 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cSpfl5Q13z67nX1; Fri, 19 Sep 2025 10:30:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cSpfl4WB1z3LKx; Fri, 19 Sep 2025 10:30:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758277807; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Q8dwCp6B4P1MtMvu4SEuhRa39XmK0T9drYReM8GKYKs=; b=mS1FE3T36IDk4f275yXYxMTgoDBMEqOPf/RRVVE36LiOJyourBiRgpL/PM20B0ASsl6Z3m N6A7aZRd0cLhrMEyweOtxe5NDYILQO4+J5STcH+uhVsTOf0gApLnjGvyT/vk0RIAoQkV7+ IOD2lVlUUdOPF7jcNYqkbLHsDWBdS6rr5xNJ1oRV5YHsLMLeNn01qWpi2RAq7a0WQrLUYa r0e9+zGsMx4s+pYR89vAs/Na2gdDvtwf/dJCeosw+COuF2CbZw5pbdYEaz9UG+DNSb9kNb aI9YJYAWeLf5cElH328uC/Jq6v7VhqG0kdKkyLBLXUOsVYe5MAENzEJiCoihMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758277807; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Q8dwCp6B4P1MtMvu4SEuhRa39XmK0T9drYReM8GKYKs=; b=jiKoyUbsHid3JuIIXUw3Shb45U2kmtd9QHf7kQeT14FC6s9qOVAau4p8y/Gf09cQcr8IjF JEchhEm1bwiWpnMFZe24HwdzuYXGi4yimI3r39ODE66Yio+S3MftBJklD42wTRvciJIgBb XlHD9yd5GkPPeIb5OIHqyq1FpRbSsCIuXLGBjLBcW7tHLz1/4KygzNxqIZviDvgIhgdkKD B6ou0sqc4bDbQGv0Jk5/2qhGcJ3olXiPVk2oMz2SxLsgbsxqL/ajShm3ZbJTFtqVSkdTJ/ Eji46yAYNHdtouxK/U5Ghe6sa0KW6QkJDRcBc97urWqoNsrCrgUn/R7et5zwSw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758277807; a=rsa-sha256; cv=none; b=g4sZPFeJgsE2NvpyJNTu3jS/b3eNUaU/II9KN7yDHRdfdVKvNeo8mh1U44zrTOUv7V1bzV GO9HCshE0wV6gSH5D/RX9tJ0u6n1BxKwoTTwjZOUjxJUNLjbDyGmN3NA4XJQ52fIwpFHzv LjPru8Bc0jsmvopIz/t+/nmCISTh4WcmV5nrd4WLIS8gzFICsgG25jwxZWquDrAenXDX2x JA/VmFnXTJFQ6PWWncMXBJ2YZnAwjspu426IDr/NFkWoZspP4Nb3OvQyFIpzB0TlKdbbFG uyRJXQrNj4L2cK6vX/wUvcDQonc+4PBspVDby+csPpmBJwK73Uu43i12XjAhoQ== 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 4cSpfl44VsztKQ; Fri, 19 Sep 2025 10:30:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58JAU7pa004251; Fri, 19 Sep 2025 10:30:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58JAU7ii004244; Fri, 19 Sep 2025 10:30:07 GMT (envelope-from git) Date: Fri, 19 Sep 2025 10:30:07 GMT Message-Id: <202509191030.58JAU7ii004244@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: 055229eda697 - main - arm64: Add cpu_feat_disabled for disabled features List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 055229eda697445880edd0050d0230a3f1bc85b3 Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=055229eda697445880edd0050d0230a3f1bc85b3 commit 055229eda697445880edd0050d0230a3f1bc85b3 Author: Andrew Turner AuthorDate: 2025-09-19 10:05:46 +0000 Commit: Andrew Turner CommitDate: 2025-09-19 10:05:46 +0000 arm64: Add cpu_feat_disabled for disabled features When a feature is disabled we may need to run a cleanup handler, e.g. to remove a feature from the sanitized ID registers. Add support for this with a new feat_disabled handler. Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D52577 --- sys/arm/arm/generic_timer.c | 9 ++++++++- sys/arm64/arm64/cpu_feat.c | 10 +++++++--- sys/arm64/arm64/identcpu.c | 2 +- sys/arm64/arm64/machdep.c | 9 ++++++++- sys/arm64/arm64/pmap.c | 4 ++-- sys/arm64/arm64/ptrauth.c | 34 ++++++++++++++++++++-------------- sys/arm64/include/cpu_feat.h | 5 ++++- 7 files changed, 50 insertions(+), 23 deletions(-) diff --git a/sys/arm/arm/generic_timer.c b/sys/arm/arm/generic_timer.c index dacef8de2257..c4a1f44a0079 100644 --- a/sys/arm/arm/generic_timer.c +++ b/sys/arm/arm/generic_timer.c @@ -905,8 +905,15 @@ wfxt_enable(const struct cpu_feat *feat __unused, return (true); } +static void +wfxt_disabled(const struct cpu_feat *feat __unused) +{ + if (PCPU_GET(cpuid) == 0) + update_special_reg(ID_AA64ISAR2_EL1, ID_AA64ISAR2_WFxT_MASK, 0); +} + CPU_FEAT(feat_wfxt, "WFE and WFI instructions with timeout", - wfxt_check, NULL, wfxt_enable, + wfxt_check, NULL, wfxt_enable, wfxt_disabled, CPU_FEAT_AFTER_DEV | CPU_FEAT_SYSTEM); #endif diff --git a/sys/arm64/arm64/cpu_feat.c b/sys/arm64/arm64/cpu_feat.c index 986d5079e980..0ffcdf2c9ed1 100644 --- a/sys/arm64/arm64/cpu_feat.c +++ b/sys/arm64/arm64/cpu_feat.c @@ -69,18 +69,18 @@ enable_cpu_feat(uint32_t stage) check_status = feat->feat_check(feat, midr); /* Ignore features that are not present */ if (check_status == FEAT_ALWAYS_DISABLE) - continue; + goto next; snprintf(tunable, sizeof(tunable), "hw.feat.%s", feat->feat_name); if (TUNABLE_BOOL_FETCH(tunable, &val)) { /* Is the feature disabled by the tunable? */ if (!val) - continue; + goto next; /* If enabled by the tunable then enable it */ } else if (check_status == FEAT_DEFAULT_DISABLE) { /* No tunable set and disabled by default */ - continue; + goto next; } /* @@ -122,6 +122,10 @@ enable_cpu_feat(uint32_t stage) if (feat->feat_enable(feat, errata_status, errata_list, errata_count)) feat->feat_enabled = true; + +next: + if (!feat->feat_enabled && feat->feat_disabled != NULL) + feat->feat_disabled(feat); } } diff --git a/sys/arm64/arm64/identcpu.c b/sys/arm64/arm64/identcpu.c index 01b4ece59861..2d07420bcdb0 100644 --- a/sys/arm64/arm64/identcpu.c +++ b/sys/arm64/arm64/identcpu.c @@ -2353,7 +2353,7 @@ user_ctr_enable(const struct cpu_feat *feat __unused, } CPU_FEAT(trap_ctr, "Trap CTR_EL0", - user_ctr_check, user_ctr_has_errata, user_ctr_enable, + user_ctr_check, user_ctr_has_errata, user_ctr_enable, NULL, CPU_FEAT_AFTER_DEV | CPU_FEAT_PER_CPU); static bool diff --git a/sys/arm64/arm64/machdep.c b/sys/arm64/arm64/machdep.c index 29ffa5109305..322bad273a08 100644 --- a/sys/arm64/arm64/machdep.c +++ b/sys/arm64/arm64/machdep.c @@ -208,8 +208,15 @@ pan_enable(const struct cpu_feat *feat __unused, return (true); } +static void +pan_disabled(const struct cpu_feat *feat __unused) +{ + if (PCPU_GET(cpuid) == 0) + update_special_reg(ID_AA64MMFR1_EL1, ID_AA64MMFR1_PAN_MASK, 0); +} + CPU_FEAT(feat_pan, "Privileged access never", - pan_check, NULL, pan_enable, + pan_check, NULL, pan_enable, pan_disabled, CPU_FEAT_AFTER_DEV | CPU_FEAT_PER_CPU); bool diff --git a/sys/arm64/arm64/pmap.c b/sys/arm64/arm64/pmap.c index 8a4395aa1c89..dbf5c820d20b 100644 --- a/sys/arm64/arm64/pmap.c +++ b/sys/arm64/arm64/pmap.c @@ -1722,7 +1722,7 @@ pmap_dbm_enable(const struct cpu_feat *feat __unused, } CPU_FEAT(feat_hafdbs, "Hardware management of the Access flag and dirty state", - pmap_dbm_check, pmap_dbm_has_errata, pmap_dbm_enable, + pmap_dbm_check, pmap_dbm_has_errata, pmap_dbm_enable, NULL, CPU_FEAT_AFTER_DEV | CPU_FEAT_PER_CPU); static cpu_feat_en @@ -1767,7 +1767,7 @@ pmap_multiple_tlbi_enable(const struct cpu_feat *feat __unused, } CPU_FEAT(errata_multi_tlbi, "Multiple TLBI errata", - pmap_multiple_tlbi_check, NULL, pmap_multiple_tlbi_enable, + pmap_multiple_tlbi_check, NULL, pmap_multiple_tlbi_enable, NULL, CPU_FEAT_EARLY_BOOT | CPU_FEAT_PER_CPU); /* diff --git a/sys/arm64/arm64/ptrauth.c b/sys/arm64/arm64/ptrauth.c index fdab5414e24c..ab40b72887e9 100644 --- a/sys/arm64/arm64/ptrauth.c +++ b/sys/arm64/arm64/ptrauth.c @@ -97,11 +97,11 @@ ptrauth_check(const struct cpu_feat *feat __unused, u_int midr __unused) if (!pac_enable) { if (boothowto & RB_VERBOSE) printf("Pointer authentication is disabled\n"); - goto out; + return (FEAT_ALWAYS_DISABLE); } if (ptrauth_disable()) - goto out; + return (FEAT_ALWAYS_DISABLE); /* * This assumes if there is pointer authentication on the boot CPU @@ -127,17 +127,6 @@ ptrauth_check(const struct cpu_feat *feat __unused, u_int midr __unused) } } -out: - /* - * Pointer authentication may be disabled, mask out the ID fields we - * expose to userspace and the rest of the kernel so they don't try - * to use it. - */ - update_special_reg(ID_AA64ISAR1_EL1, ID_AA64ISAR1_API_MASK | - ID_AA64ISAR1_APA_MASK | ID_AA64ISAR1_GPA_MASK | - ID_AA64ISAR1_GPI_MASK, 0); - update_special_reg(ID_AA64ISAR2_EL1, ID_AA64ISAR2_APA3_MASK, 0); - return (FEAT_ALWAYS_DISABLE); } @@ -157,8 +146,25 @@ ptrauth_enable(const struct cpu_feat *feat __unused, return (true); } +static void +ptrauth_disabled(const struct cpu_feat *feat __unused) +{ + /* + * Pointer authentication may be disabled, mask out the ID fields we + * expose to userspace and the rest of the kernel so they don't try + * to use it. + */ + if (PCPU_GET(cpuid) == 0) { + update_special_reg(ID_AA64ISAR1_EL1, ID_AA64ISAR1_API_MASK | + ID_AA64ISAR1_APA_MASK | ID_AA64ISAR1_GPA_MASK | + ID_AA64ISAR1_GPI_MASK, 0); + update_special_reg(ID_AA64ISAR2_EL1, ID_AA64ISAR2_APA3_MASK, 0); + } + +} + CPU_FEAT(feat_pauth, "Pointer Authentication", - ptrauth_check, NULL, ptrauth_enable, + ptrauth_check, NULL, ptrauth_enable, ptrauth_disabled, CPU_FEAT_EARLY_BOOT | CPU_FEAT_SYSTEM); /* Copy the keys when forking a new process */ diff --git a/sys/arm64/include/cpu_feat.h b/sys/arm64/include/cpu_feat.h index 6a554b6baedf..20c743a7e507 100644 --- a/sys/arm64/include/cpu_feat.h +++ b/sys/arm64/include/cpu_feat.h @@ -80,12 +80,14 @@ typedef bool (cpu_feat_has_errata)(const struct cpu_feat *, u_int, u_int **, u_int *); typedef bool (cpu_feat_enable)(const struct cpu_feat *, cpu_feat_errata, u_int *, u_int); +typedef void (cpu_feat_disabled)(const struct cpu_feat *); struct cpu_feat { const char *feat_name; cpu_feat_check *feat_check; cpu_feat_has_errata *feat_has_errata; cpu_feat_enable *feat_enable; + cpu_feat_disabled *feat_disabled; uint32_t feat_flags; bool feat_enabled; }; @@ -93,12 +95,13 @@ SET_DECLARE(cpu_feat_set, struct cpu_feat); SYSCTL_DECL(_hw_feat); -#define CPU_FEAT(name, descr, check, has_errata, enable, flags) \ +#define CPU_FEAT(name, descr, check, has_errata, enable, disabled, flags) \ static struct cpu_feat name = { \ .feat_name = #name, \ .feat_check = check, \ .feat_has_errata = has_errata, \ .feat_enable = enable, \ + .feat_disabled = disabled, \ .feat_flags = flags, \ .feat_enabled = false, \ }; \ From nobody Fri Sep 19 10:30:08 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cSpfn4BSZz67nZM; Fri, 19 Sep 2025 10:30:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cSpfm5hMZz3LS3; Fri, 19 Sep 2025 10:30:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758277808; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kHJSwOAJ88LQjt41wvmHZraJ5KeAMBZk8HyBFW7RWcw=; b=STiTNeGE4S+wUE6Q67E8x8k6cYI8aUCsnZFWILV5s3i6anIpOrZl6ORIgJdfUoK+ylZYRH A7CZ9JOzMPUxJt6I4LX/OPv2oidB6Vbs5GjbMEAlU4p/p5f/bT0PboWTPRz0H9MgkQjGns IE4jA+4DlriJQ3TMVDmD8cLIh2dXGdX1iKNU1msstNN/o8VqCIfxuoubxlFVkQCYnjoKfW BzVny56zbP72clu397oe9iLOjPB7NxjaUiR5H7EhjWNKIS09kG19AHN8nV6wVLRYMiCJan G+N//fmz8rwOIOQngJGmEhwwSgoUhFVFjAJnDYzdr4vrxgJRbo24iIk9U1MwJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758277808; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kHJSwOAJ88LQjt41wvmHZraJ5KeAMBZk8HyBFW7RWcw=; b=f2ppJJ6wlqMA1SLI9vx43le0yvCoor9+9qNxNWQVD5r7LBKMZik8J0tJFwzOz4+F8XGWmy wpSscSDdSfBrIfkP5UaVkLFZffFa4kGtMzVwoRCUGzWRgRKUKTN3UdpNtKCd/NdrBJOlZ1 aZdyPc93mVK/IyZ9ZkqTFb+TOTU/P83tW6WnLWKJh9E1p0nxD4XEbo56QK3yJYbO9nfEFs H9TrwnPrqc5HAGN0DGSU6mAIyhebJyp6mn3t3JUsuSoQ7xeYQdsJf2Sv6EJlkIt6Rc/VK8 MhmlAa7Rt6ITHqP9HlW7OBO3qlCFXhsirusdoF5co9MpZouedNF36gnT4CMspw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758277808; a=rsa-sha256; cv=none; b=ySiqILDE4mRD6ScdaNd+a/bgHrsfbESYxUA32lAivLPtlCysjYK7K24R2XMuH5QNbEmIhm YTTbEAUymE/YKlF+HasI0uoTXJa6LMUJ33D8SmBGWuld8eEDPOZ20OJ51Z9/4R70iFMc4z pnsxdi6MJO2mneVlwN9xy3X1Z0Zs3N/4aVYfYgiek4pFtcyUEAjLpdoKIK/ayM67iqTy9Z yPsN2L3l4R1cfWXN6ywqHGGzdtRBONqq9kzNCqyVTY1brtXOHqAKx1etHNhtJy6OtbslN6 fa+t82SoV00eANtXhQaYxAlS6bhCVoVLHgozGV/6wWbOw8ZTkp0+oRRlEZ1qXQ== 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 4cSpfm4bnRztdt; Fri, 19 Sep 2025 10:30:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58JAU8ON004515; Fri, 19 Sep 2025 10:30:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58JAU8DS004512; Fri, 19 Sep 2025 10:30:08 GMT (envelope-from git) Date: Fri, 19 Sep 2025 10:30:08 GMT Message-Id: <202509191030.58JAU8DS004512@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: 5e0e2565288f - main - arm64: Read the CPU feature tunables once List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5e0e2565288f3d1f1b4223d8bb53c7d70e0aa92c Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=5e0e2565288f3d1f1b4223d8bb53c7d70e0aa92c commit 5e0e2565288f3d1f1b4223d8bb53c7d70e0aa92c Author: Andrew Turner AuthorDate: 2025-09-19 10:05:47 +0000 Commit: Andrew Turner CommitDate: 2025-09-19 10:05:47 +0000 arm64: Read the CPU feature tunables once Rather than reading the CPU tunables each time we enable a feature just read them once on boot. Reading them early on non-boot CPUs causes issues where they try to allocate memory before the core is set up to do so. As they don't change it is safe to cache the state of them. Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D52578 --- sys/arm64/arm64/cpu_feat.c | 35 +++++++++++++++++++++++++---------- sys/arm64/include/cpu_feat.h | 3 +++ 2 files changed, 28 insertions(+), 10 deletions(-) diff --git a/sys/arm64/arm64/cpu_feat.c b/sys/arm64/arm64/cpu_feat.c index 0ffcdf2c9ed1..fb065ea463cf 100644 --- a/sys/arm64/arm64/cpu_feat.c +++ b/sys/arm64/arm64/cpu_feat.c @@ -54,6 +54,21 @@ enable_cpu_feat(uint32_t stage) SET_FOREACH(featp, cpu_feat_set) { feat = *featp; + /* Read any tunable the user may have set */ + if (stage == CPU_FEAT_EARLY_BOOT && PCPU_GET(cpuid) == 0) { + snprintf(tunable, sizeof(tunable), "hw.feat.%s", + feat->feat_name); + if (TUNABLE_BOOL_FETCH(tunable, &val)) { + if (val) { + feat->feat_flags |= + CPU_FEAT_USER_ENABLED; + } else { + feat->feat_flags |= + CPU_FEAT_USER_DISABLED; + } + } + } + /* Run the enablement code at the correct stage of boot */ if ((feat->feat_flags & CPU_FEAT_STAGE_MASK) != stage) continue; @@ -71,17 +86,17 @@ enable_cpu_feat(uint32_t stage) if (check_status == FEAT_ALWAYS_DISABLE) goto next; - snprintf(tunable, sizeof(tunable), "hw.feat.%s", - feat->feat_name); - if (TUNABLE_BOOL_FETCH(tunable, &val)) { - /* Is the feature disabled by the tunable? */ - if (!val) - goto next; - /* If enabled by the tunable then enable it */ - } else if (check_status == FEAT_DEFAULT_DISABLE) { - /* No tunable set and disabled by default */ + /* The user disabled the feature */ + if ((feat->feat_flags & CPU_FEAT_USER_DISABLED) != 0) + goto next; + + /* + * The feature was disabled by default and the user + * didn't enable it then skip. + */ + if (check_status == FEAT_DEFAULT_DISABLE && + (feat->feat_flags & CPU_FEAT_USER_ENABLED) == 0) goto next; - } /* * Check if the feature has any errata that may need a diff --git a/sys/arm64/include/cpu_feat.h b/sys/arm64/include/cpu_feat.h index 20c743a7e507..6a311d4000bb 100644 --- a/sys/arm64/include/cpu_feat.h +++ b/sys/arm64/include/cpu_feat.h @@ -73,6 +73,9 @@ typedef enum { #define CPU_FEAT_PER_CPU 0x00000000 #define CPU_FEAT_SYSTEM 0x00000010 +#define CPU_FEAT_USER_ENABLED 0x40000000 +#define CPU_FEAT_USER_DISABLED 0x80000000 + struct cpu_feat; typedef cpu_feat_en (cpu_feat_check)(const struct cpu_feat *, u_int); From nobody Fri Sep 19 10:30:09 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cSpfp1LPSz67ncf; Fri, 19 Sep 2025 10:30:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cSpfn5XQmz3LbY; Fri, 19 Sep 2025 10:30:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758277809; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TeugHrrr6fkjowocJcTxUobIhWVcYf8SjcrPxSSQN6I=; b=NwqPaFjyeeDAI2/kBd9L3BhoywvwIl9L0+wzL1x4NyTDSB3bRoQKkC8LquCykxRxcgBiQ1 XuG3DEVWnT+VC+gB4PyJ7omt+bkHkdMc5y5e2/95X9zEOp3lyi6NpEEKv/x/oTNnfnM7jF sLuICsLj7JvcjiQ6rVNdhRLNuOoPbRa8NgNCUeRyZt7pcN+jhQ61atZc/y6KhtSRn2VqCl rhP8t53ztZUp32juKNI7IzYMEKJR6+Edr1jjtGheiavIQi2z+1mgFGC1UrU8A/xP66QWWI yTN5K4VgrGvbril9WAo5Cle4mej5U8aiMdeJmZjj6o4tSa9U1yL/6nr1GV8/Jg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758277809; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TeugHrrr6fkjowocJcTxUobIhWVcYf8SjcrPxSSQN6I=; b=LoSwbaZ8jK+Nz3u5gMSs84QE5NLJ04ykDSTfrsLon0s//83Ypyf1xZiBqtfnMWejCw1I89 IwZswzXREGrgm36jqnoFLGfqkmcUZDvaaqy2kOHn9p0Fuy4r1YFoPjVf8ZCCqOKmClTEox f+typ8/tkLPRuQ8LXxebl/dKyxsOOTGXPiFY/PbGEGhE/C2aIUMXR05hF/a1ZpEuvDQpE1 Co2SD9koNo33vrIVRSW7M2XbR0bnDDWFZeop3ZdftArkx2/x5GI7Em3Qakjuqo1RoZe1OX jOQPO1hFgYE5i2Ju4Rvusaj/T8nGB5vEyB73wpjvU3I8upc6m20DeQ2eab9T8Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758277809; a=rsa-sha256; cv=none; b=rV26RhAYeLARuHpM/2kKX1IQuD9drFNzTS9rUFWfSmfz+LJU5j/Y1FoixhqBU/Ca+VtVGU YMHa6SXA+dmnVG0N5IYZwZD1cAOZ8ZufOqxyBseEpug40RMqHU867nPaufSk1wGi/dYa3x vdIRj5c2CLmcNjJIOl3igH46K+9x+1Uy8VIZ1DNXmnMOfcs1kcFKB54EjNwF0zETIpHoB7 h8lZIj6On9Pf+80Ew58IOUOQO31w0S1xz5W4P70laE7s7+9lKjayt4Q6w+6CmeO0YDrc8H kuHcMTiTCPYL2t1vFfVy/UX4PQu3p/6j6ijDOANUg+JNwlgvQq2jTIbW9YifjA== 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 4cSpfn57jmztMS; Fri, 19 Sep 2025 10:30:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58JAU9DZ004945; Fri, 19 Sep 2025 10:30:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58JAU9tR004942; Fri, 19 Sep 2025 10:30:09 GMT (envelope-from git) Date: Fri, 19 Sep 2025 10:30:09 GMT Message-Id: <202509191030.58JAU9tR004942@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: 5e690f1e12ce - main - arm64: Fix enabling CPU features List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5e690f1e12ce8699f16019854dfffd1857a801d8 Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=5e690f1e12ce8699f16019854dfffd1857a801d8 commit 5e690f1e12ce8699f16019854dfffd1857a801d8 Author: Andrew Turner AuthorDate: 2025-09-19 10:05:47 +0000 Commit: Andrew Turner CommitDate: 2025-09-19 10:05:47 +0000 arm64: Fix enabling CPU features Previously when enabling CPU feature we assumed the no check function means the feature was unconditionally enabled. When adding support to disable features on boot this check was incorrectly partially left in place. As all current features have a check function this meant all features were disabled. Fix this by restoring the previous behaviour while also allowing the user to disable the feature. Reviewed by: emaste Fixes: 4bc68fa98f68 ("arm64: Support managing features from loader") Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D52579 --- sys/arm64/arm64/cpu_feat.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/sys/arm64/arm64/cpu_feat.c b/sys/arm64/arm64/cpu_feat.c index fb065ea463cf..94114d47f846 100644 --- a/sys/arm64/arm64/cpu_feat.c +++ b/sys/arm64/arm64/cpu_feat.c @@ -78,10 +78,11 @@ enable_cpu_feat(uint32_t stage) PCPU_GET(cpuid) != 0) continue; - if (feat->feat_check != NULL) - continue; - - check_status = feat->feat_check(feat, midr); + if (feat->feat_check != NULL) { + check_status = feat->feat_check(feat, midr); + } else { + check_status = FEAT_DEFAULT_ENABLE; + } /* Ignore features that are not present */ if (check_status == FEAT_ALWAYS_DISABLE) goto next; From nobody Fri Sep 19 10:30:10 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cSpfq02lDz67nZT; Fri, 19 Sep 2025 10:30: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 4cSpfp5sVPz3Lgv; Fri, 19 Sep 2025 10:30:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758277810; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1egHfxrGKJOG0LXAuwWwrGmLBizoy3zyhGWOFFZF+1I=; b=h1G/2oJPuJfqFjyoK0wVzSzwIeROpw6T9ZZfZKxfpP4bQ9i3WbCI9O9JzfOHkeON/huyoI /GsYHh1CaTco9psSxeNCRWvQ42Xb2hhm2NpjQbtppxtmZ7w4DoXZKvBkfG+IQzGCiRr4/m rV6Bc2yWAgzEwJcJwPWufzirQqVQOaU8FRQ8+yGoJXQtQ1p/0Kd7tt4xgqabxtTcM5yoTD IArglEHeDDysFn9wjasSWpo/b9fQIqs4hRZtG+huBTW1hcvv5MQaSY7laWpyexqhOJ5ZsB cbLjAZR1+rQ8rMVMxiHInad3Vmx2MNL7woStrXscujcGTRbYMlUU12GDBWNC3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758277810; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1egHfxrGKJOG0LXAuwWwrGmLBizoy3zyhGWOFFZF+1I=; b=FlRhETzBSeoEGC9lStI3HHrvrcTy0reegeT5HB+m9E95SiDeGv/dBkovImv+Sr09kUbLf1 MHWOxMjksMesqWVm+VAEbt6iAK9hWFSIYitTCsgwuAjwnpKpD36V4IKNLYwauZQdAOHTp1 J6Yukr+K9Anlu6mjHbYTht9Y5sEv7g5SbQXwvORgF4EqVSNLJsDgSqkP9Cq9d7LDaCxcW2 ZDfpN4moHl2DGslxsxKj2IlRbQf3ftINQOzHDxOnjGYjLOyQqnl4P/O5l2IfuFlExuvSSF /BKxk9OBw3g+1SOCwJTUNkRVbedcuTvGkviiK+mHEMuN2kmU23nbgvhaWHL91g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758277810; a=rsa-sha256; cv=none; b=w4KEaoILhoWO+4/+veQlp5BiZgeoylHEZyiGYPgfF7GtmPTnvxZVIoU4QG3qgly23pjKf6 qzsNmI1U7BuTf1kj3U9j7RsWuWc6GMibmprRuXdmjGnyf0w7iUZh2HJ+5fB8ewLtASdwRY AMgv4ir3nMlMlveO/gO4795qALAtVS33vyk4xaArvSUGGJPZ16qIWJljD9s+H+Za5xXGTO D/LTLda4ibZgPHWlr60LiOHu2xjGzPRItH14KbcfN9sXZed1fdEh39GSm14KENaN1rsTbL MtbRTOmKkzeqFgmwSVhaQT61ZppnEoGGRRHVfnlfZfnlXhppKcpZAYYiJ5S7RQ== 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 4cSpfp5MPcztKR; Fri, 19 Sep 2025 10:30: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 58JAUAr6005596; Fri, 19 Sep 2025 10:30:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58JAUACK005592; Fri, 19 Sep 2025 10:30:10 GMT (envelope-from git) Date: Fri, 19 Sep 2025 10:30:10 GMT Message-Id: <202509191030.58JAUACK005592@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: 0706d3464f4e - main - arm64: Set the endian without a memory access List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0706d3464f4ef375fc31ecc7fa0733a13eca9d19 Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=0706d3464f4ef375fc31ecc7fa0733a13eca9d19 commit 0706d3464f4ef375fc31ecc7fa0733a13eca9d19 Author: Andrew Turner AuthorDate: 2025-09-19 10:05:47 +0000 Commit: Andrew Turner CommitDate: 2025-09-19 10:05:47 +0000 arm64: Set the endian without a memory access Early in the kernel we set the endian through the sctlr_el1 and sctlr_el2 registers. To get the value to put into these registers we load them from memory. As this will depend on the endian to get the fields in the correct order then it will fail if the endian is not what the kernel expects. Add a macro to load a 64-bit value into a register without a memory access and use this to set the register. As instructions are not affected by the endian set in sctlr this is safe. It is unlikely this will be hit as UEFI requires the processor to be in little endian mode, however when booting using the Linux ABI the kernel may start in big-endian, and secondary CPUs could be big-endian. Reviewed by: emaste Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D51012 --- sys/arm64/arm64/locore.S | 41 +++++++++++++++++++++++++++++++++++++---- 1 file changed, 37 insertions(+), 4 deletions(-) diff --git a/sys/arm64/arm64/locore.S b/sys/arm64/arm64/locore.S index 4a10a2b4f2d3..50a3eda846da 100644 --- a/sys/arm64/arm64/locore.S +++ b/sys/arm64/arm64/locore.S @@ -39,6 +39,23 @@ #define VIRT_BITS 48 +/* + * Loads a 64-bit value into reg using 1 to 4 mov/movk instructions. + * This can be used early on when we don't know the CPUs endianness. + */ +.macro mov_q reg, val + mov \reg, :abs_g0_nc:\val +.if (\val >> 16) & 0xffff != 0 + movk \reg, :abs_g1_nc:\val +.endif +.if (\val >> 32) & 0xffff != 0 + movk \reg, :abs_g2_nc:\val +.endif +.if (\val >> 48) & 0xffff != 0 + movk \reg, :abs_g3:\val +.endif +.endm + #if PAGE_SIZE == PAGE_SIZE_16K /* * The number of level 3 tables to create. 32 will allow for 1G of address @@ -324,15 +341,23 @@ LENTRY(enter_kernel_el) cmp x23, #(CURRENTEL_EL_EL2) b.eq 1f - ldr x2, =SCTLR_MMU_OFF + /* + * Ensure there are no memory operations here. If the boot loader + * enters the kernel in big-endian mode then loading sctlr will + * be incorrect. As instructions are the same in both endians it is + * safe to use mov instructions. + */ + mov_q x2, SCTLR_MMU_OFF msr sctlr_el1, x2 - /* SCTLR_EOS is set so eret is a context synchronizing event so we + /* + * SCTLR_EOS is set to make eret a context synchronizing event. We * need an isb here to ensure it's observed by later instructions, * but don't need it in the eret below. */ isb - /* Ensure SPSR_EL1 and pstate are in sync. The only wat to set the + /* + * Ensure SPSR_EL1 and pstate are in sync. The only way to set the * latter is to set the former and return from an exception with eret. */ mov x2, #(PSR_DAIF | PSR_M_EL1h) @@ -346,11 +371,19 @@ LENTRY(enter_kernel_el) * Set just the reserved bits in sctlr_el2. This will disable the * MMU which may have broken the kernel if we enter the kernel in * EL2, e.g. when using VHE. + * + * As with sctlr_el1 above use mov instructions to ensure there are + * no memory operations. */ - ldr x2, =(SCTLR_EL2_RES1 | SCTLR_EL2_EIS | SCTLR_EL2_EOS) + mov_q x2, (SCTLR_EL2_RES1 | SCTLR_EL2_EIS | SCTLR_EL2_EOS) msr sctlr_el2, x2 isb + /* + * The hardware is now in little-endian mode so memory operations + * are safe. + */ + /* Configure the Hypervisor */ ldr x2, =(HCR_RW | HCR_APK | HCR_API) msr hcr_el2, x2 From nobody Fri Sep 19 10:30:11 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cSpfr1R82z67nZV; Fri, 19 Sep 2025 10:30:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cSpfq6tDGz3LfB; Fri, 19 Sep 2025 10:30:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758277812; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7PfDZHWx7Xd94sX2su+MoZ7iCQLzPEPWK0iGLYpJ+BI=; b=k2KOp8pv9lrdkuiWqU5SiVYBY48b+AtF+VxuUkYLlA2dP5HEVXl+LQTi8GVhbJ0Pf6DiL2 CvPLuab6PYUddYYIc8igI1QjkPJ7yHCweMJ5FLleUAkilaA6ZKoQR441RY4zg/vTQB9sIs UZVuv6Zx4C7YLpGlni7hsC7SHHBVtqrJnHiwhz+JRcghaFVFKxDSNt8G+t/r2g7qFJQ3Cu OZApiD/rarNfyW/fcoyOzNvKTW/B2vYOXuT/4hUaqBk64zbW3ldzQ9Hlrw+vgAsPdYXGxq ZOHDPAvsz+l/rJK5FRAX70DwcFxYbtRUq26F22XxFem+9vh1CG3FJt3eqc0LFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758277812; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7PfDZHWx7Xd94sX2su+MoZ7iCQLzPEPWK0iGLYpJ+BI=; b=Fi8oUtdlEh4c0Y+76jpbCksbN7y71j0s14TPKCKlDwQIeQRJMxphbANwwuENG55wBmZZMf gUp0EFG4hC6vRaPhgZtJMtJes0Wl0Xum+D01vZKry/WHiwc8tVChB0GOrDGS2AGQK0aIDa 0tT9qF2Rl0J16gU6csuZVhdI/bBUVyhcIz89499vm+YPfi1a2dDSYuJ4EqNrAycAXEh9d4 MVte1mqDlkNbBOE10asZ8sMBCfkmp7G/eKZdyVDI6cYUxvYy5DdKitbpJk4u/t9OIpVJfB m1EFcfNTR2YkjLUGR92+ByXBTd72QAvucuqIn/wlhCi//qnpi6AzDuiFmGrd7A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758277812; a=rsa-sha256; cv=none; b=HwUUM9CpMkth4wZP7jayeantxUJ3SjhENr0m0chGJbeU6I4G/rb58pw6Qd2BR7/PvEmTPO RwWsCsbUCJsCJLRA1Bs2RPInAEzggcwCSNnXNbbmj9y/LV1Gp+bfryagl6gGBDfJYXUIk+ GpSVj8KLClnBRBz/c0/XBBciYnH5fia37f5OIMdRGF5m8QDau6Zv/IAf1FMAZHQJdHIu5f B9Wnc89euFZazWNbslq2wi6MEJqmun5ve0xYTK2jObqNgaEqRgMl9bkWUdka13vb+P7BQ6 K54uRPQLir6CbFguJ8gv2fTrkn8/CX3939irWFdXhtZoJw0frB9SQgR5rzBNyA== 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 4cSpfq6FhyztHg; Fri, 19 Sep 2025 10:30: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 58JAUBWx006234; Fri, 19 Sep 2025 10:30:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58JAUBtQ006230; Fri, 19 Sep 2025 10:30:11 GMT (envelope-from git) Date: Fri, 19 Sep 2025 10:30:11 GMT Message-Id: <202509191030.58JAUBtQ006230@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: 68b3d0cbe034 - main - arm64: Enable EPAN and IESB List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 68b3d0cbe03467abac0523bbeea0cfc34efd9b05 Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=68b3d0cbe03467abac0523bbeea0cfc34efd9b05 commit 68b3d0cbe03467abac0523bbeea0cfc34efd9b05 Author: Andrew Turner AuthorDate: 2025-09-19 10:05:48 +0000 Commit: Andrew Turner CommitDate: 2025-09-19 10:05:48 +0000 arm64: Enable EPAN and IESB These are both safe to enable. EPAN only affects PAN when it's enabled, and IESB makes exception entry and exit an Implicit Error Synchronization event. Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D51013 --- sys/arm64/include/armreg.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/arm64/include/armreg.h b/sys/arm64/include/armreg.h index 500f35c48787..c2065fdb3f8c 100644 --- a/sys/arm64/include/armreg.h +++ b/sys/arm64/include/armreg.h @@ -2612,10 +2612,12 @@ (SCTLR_LSMAOE | SCTLR_nTLSMD | SCTLR_EIS | SCTLR_TSCXT | SCTLR_EOS) #define SCTLR_MMU_ON \ (SCTLR_MMU_OFF | \ + SCTLR_EPAN | \ SCTLR_BT1 | \ SCTLR_BT0 | \ SCTLR_UCI | \ SCTLR_SPAN | \ + SCTLR_IESB | \ SCTLR_nTWE | \ SCTLR_nTWI | \ SCTLR_UCT | \ From nobody Fri Sep 19 11:46:40 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cSrM54ZvMz67tnY; Fri, 19 Sep 2025 11:46:41 +0000 (UTC) (envelope-from des@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cSrM545JBz3Y4W; Fri, 19 Sep 2025 11:46:41 +0000 (UTC) (envelope-from des@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758282401; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=bshPf4+RDRwpnORAN4l43cvYUiOX7bAzQujZhpcyvgo=; b=lZ4f0w/9NDU6Spot6L8CpVCCScsVspD2ZMSk090gd+jVPSbc10kXJwKDUFE0VtU4Xn2U/4 OC/EqqoKF8/w9ASaxRYjZ/fvlXCme8JolrboH/wl3PZR7M2QTvcW5ryXrFLWSF39yLut6+ 87x5/BYxQzsQT71JHRVxEGhaYfXfMFnMqzdj4rYz9t8tUeeRt0LYCxQ0PWl42QETnZaktz JXVA/QRzWxSV6Jn0IdmPulfLqJEjU27nBr1Hmv9S65BtSUkycDQiqpscMys9Nmc/6HK3q3 SHb5y9cmjGGMTcyZyZH2ndoLhEerX5z/CU/3qwmXNXWL3eWvAmjwFU4SuUjzUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758282401; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=bshPf4+RDRwpnORAN4l43cvYUiOX7bAzQujZhpcyvgo=; b=ca+5nldOJiup90xjsM7gXtzR+PfGG285gDV3dror6dMx6JWkjyIj7yfJb6luc+yZYSMkpj La47XoHgUGTYCnM3d/wLbm168iySP3ROnEn5QI00uk5NDC7iy7IjJ8jwQXBZ1odNFCHyMU /DX9+WAC/iBlKyAgO0lec40F5LwPMIQp+z1GOMWFMKq0wKOYbe+b+a7q53EP0UkQOViLlC lY4rVYC1Zxx4Pvjv2facAqLfpLhZnhwYE9NkmQFOT+7US0yIItwr2c2STDswTImzK48+EE RpIGUJoeT/8Euv1r/m/Mhu3pzFXjhtA1AAxkgbQyujzUuOyD2Yw63+sNodn4tw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758282401; a=rsa-sha256; cv=none; b=JRBVqYGg/pqocxQCQOjar7A6f9QpW24+Il3QlEPPaUvy0o9vg/muRhdn98O1OLcYPFpYsj HTqy6Vwd6qmYOyuQAEjtTOAUdmgpIemBQ0oDzkli4UlQiRyxgfdWFxGqP0w+88in/KzdsP 7vwuDXTq5JvSiGbr19qb2P1HPDHG/Eo+/woHc4MMBREEoFQ1ImOHAqxEq22q0bkCAvUJ6M NOQF0QylVRJ10sxzE1vr8lCCQrxeIa6bWrZVhfngdZ4kV9VeWekEc3ZUw5LlG080ky4xJ7 vqTkMJiqT71RCCYZ5OAv/KNd89eYlfr5f2k/rhLzp6NbXQKBfsN3R7q7nEGtbA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from ltc.des.dev (unknown [IPv6:2a01:e0a:c54:bed0:922e:16ff:fef1:acef]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: des) by smtp.freebsd.org (Postfix) with ESMTPSA id 4cSrM52ZVzz1Csd; Fri, 19 Sep 2025 11:46:41 +0000 (UTC) (envelope-from des@freebsd.org) Received: by ltc.des.dev (Postfix, from userid 1001) id 08D10882AE; Fri, 19 Sep 2025 13:46:40 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Colin Percival Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 088e21000507 - main - release: More fixes for building pkg package In-Reply-To: <202509190809.58J89Eiu036110@gitrepo.freebsd.org> (Colin Percival's message of "Fri, 19 Sep 2025 08:09:14 GMT") References: <202509190809.58J89Eiu036110@gitrepo.freebsd.org> User-Agent: Gnus/5.13 (Gnus v5.13) Date: Fri, 19 Sep 2025 13:46:40 +0200 Message-ID: <865xdefyvz.fsf@ltc.des.dev> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Colin Percival writes: > diff --git a/release/scripts/make-pkg-package.sh b/release/scripts/make-p= kg-package.sh > index 7712054d26c0..ee75e7d68d14 100755 > --- a/release/scripts/make-pkg-package.sh > +++ b/release/scripts/make-pkg-package.sh > @@ -9,7 +9,8 @@ unset PKG_VERSION > unset MAKEFLAGS > unset PKGBASE > export WRKDIRPREFIX=3D/tmp/ports.${TARGET} > -export WRKDIR=3D$(make -C ${PORTSDIR}/ports-mgmt/pkg -V WRKDIR) > +export DISTDIR=3D/tmp/distfiles > +export WRKDIR=3D$(make -C ${PORTSDIR}/ports-mgmt/pkg I_DONT_CARE_IF_MY_B= UILDS_TARGET_THE_WRONG_RELEASE=3DYES -V WRKDIR) >=20=20 > make -C ${PORTSDIR}/ports-mgmt/pkg TARGET=3D${TARGET} TARGET_ARCH=3D${TA= RGET_ARCH} \ > CONFIGURE_ARGS=3D"--host=3D$(uname -m)-portbld-freebsd${REVISION}" \ This breaks the release build because nothing creates DISTDIR. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@FreeBSD.org From nobody Fri Sep 19 12:25:07 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cSsCV6Vh1z67wjZ; Fri, 19 Sep 2025 12:25:10 +0000 (UTC) (envelope-from des@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cSsCV5xJ8z3c8H; Fri, 19 Sep 2025 12:25:10 +0000 (UTC) (envelope-from des@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758284710; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=njsIoI+enp+1zuFdg9DEWi8N57IeZvZu91CaVsiU6/Y=; b=GQA3M0PGZl1NOvhdaiIoZPJrnrqTxHlTX5az0vfntWva+wXsFjyvr48g6S1MtMDsd1qunn 3w44ujdlQSL9Q2HllnYdljWZ4Akp/2Lzp5nuyKClscOER5+9m9EHbr0+Y1Opc6i6+G13nb Jc95RkAc8m9tJ2hCkj2GNwkohzfCKnDXTGQNrQV7njwL3DKP/3rHpYScZzrnemv3NIWLae kUMdnD0MAQe2gbg55M2DrFjzRcjPHRmlrsm5KO9duRZg5zUX9/IbnkxvNeLXQf3k8tBWwh W2GfNbYqGQgKZxTQhPeV8S5kSdGs/+YeQz4RzQ5g0I37lKTOlWhGx3zjkFslSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758284710; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=njsIoI+enp+1zuFdg9DEWi8N57IeZvZu91CaVsiU6/Y=; b=A62DAE8vkIRXufBLSbmGl7BT2CBMTueb2DX8yucOVaQRKuRw2Lf4i2SoFnZ/U60/JjJDPV ZILifhj+0RDZHzFbczdlDBVgEhAHtiFgpDJ/5e9G0rwWt3hbf25F0hdgnhl6XaDX04Wm84 I90sqNVN5tZ4y3cKEkscQ8NCSmDJPsoZ1bya/uKhJ2V5ROyNpnqHyYFnzBmGgXw0PSCb5a ciI0Xm9c0yuGSTLk7/wP0k9C0p4k63vngHZz38u0JjOdFMTzdFjAzGjOjqx7hr3tZhVgMM o5G+hqcx2cCzAoVVJHi2PABEqChpsTfT703L9rUlbBZveQIJMmDBfKD1VFsHUA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758284710; a=rsa-sha256; cv=none; b=STJ8P0hvcCGmRmSyLcghd7j9QwGyukWIrE9O2hCrY1JfmXw3vV0jgoKJiH1mDtl9pTjRWe BF77/InX9fzjCzP+7LwpMeIPZgkCDTG9KFPLSt5TZd9sQ3p4Ijky0/qTEXgwJAvWTmd7kj CBsCV2RXdXlr/uZNW3cJcyGRT7No5XrMQn9eASjaWkfmkGFD3Gbr9LMmy9U1rFgwWG2fhq uWnh0HtQDqazcH6aDr9AgE53xg/CPIBSvW0fVAtNemldpa7cghFj+QEzh8mhLJVWhb6Sp1 4WZtUbNm7gLc0tqqXXUvjMN46F84ZqMwIDu1wg37pYwj8ALFXHJS9EdSGzoocg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from ltc.des.dev (88-177-82-251.subs.proxad.net [88.177.82.251]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: des) by smtp.freebsd.org (Postfix) with ESMTPSA id 4cSsCV4ZytzWh; Fri, 19 Sep 2025 12:25:10 +0000 (UTC) (envelope-from des@freebsd.org) Received: by ltc.des.dev (Postfix, from userid 1001) id 0676388242; Fri, 19 Sep 2025 14:25:08 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Colin Percival Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 2c06b824436d - main - pkgbootstrap: Build pkg if PORTSDIR exists In-Reply-To: <202509181925.58IJP2P1007197@gitrepo.freebsd.org> (Colin Percival's message of "Thu, 18 Sep 2025 19:25:02 GMT") References: <202509181925.58IJP2P1007197@gitrepo.freebsd.org> User-Agent: Gnus/5.13 (Gnus v5.13) Date: Fri, 19 Sep 2025 14:25:07 +0200 Message-ID: <86y0qaeijg.fsf@ltc.des.dev> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Colin Percival writes: > pkgbootstrap: Build pkg if PORTSDIR exists >=20=20=20=20=20 > If we don't already have the pkg tool installed, we need to install it > before we can build packages for pkgbase. (This arises in release > builds which run in clean chroots; most users will have pkg installed > already.) Installing it from pkg.freebsd.org via "pkg bootstrap" runs > into two problems: First, it's an external dependency with security > implications; and second, there's a bootstrapping problem on new major > versions where pkg.freebsd.org does not have packages yet. >=20=20=20=20=20 > Instead, if we have a ports tree, use it to build pkg ourselves. >=20=20=20=20=20 > With hat: re > MFC after: 6 hours > Sponsored by: https://www.patreon.com/cperciva Please revert this, it not only breaks building main in poudriere but also ends up polluting both the jail and the host in the process. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@FreeBSD.org From nobody Fri Sep 19 14:02:05 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cSvMK41v7z683kS; Fri, 19 Sep 2025 14:02: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 4cSvMK3SM2z3ntM; Fri, 19 Sep 2025 14:02:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758290525; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wZ8jGkrl/jvjnk5e87r3IUJ7CB7Jb4vGEUd0OeGnguI=; b=DL0Jp6bl0vQ+T6fZ3PoDWsxSN6j/JAZHuKQX4Z+8B/52V7168y00DhotybDyOGGRzPGSzb fCnHbkvx6MsnHkJEtWAVOWfM1vdAfCnTZBXlqyurARHHhaayxjJG4g15YM3rdwpOB14c/y IwYFLfH4/VDOhJMyC3gkDBWn0uLFIDtK1uJx1xSewVd9fNQkCj2tfCzE3VwsTSlAl9H0Pr 4EDX8J4sspkBSODVWbxVrKU4NcA8jG7xk6KJt0xWJKd0pDg53ioL8iruWuD/BDQW/HP8PD PXwyLF6M0RHdwtyIOZIAbH0XC+2jZsLC00RjPuEFxO7NpgcCpkpj31t+uOFRgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758290525; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wZ8jGkrl/jvjnk5e87r3IUJ7CB7Jb4vGEUd0OeGnguI=; b=JYZGCiSSVHn0g/jE+1OKXGkhtc+UG+oHdpPdlzsA4uazHmPE347xqdpDiFBQUx2kNo8A+K 5JS7IQhOxzhLe5YRfkqcJD5+U6TReNhKz3kVGzTpl6kNzJLWpdMBg+OiATCAk6nI85QB3N fSqdRx5fjhX1TfSZW1t//RAbojLoAtj+cJTaJpvMb0q4QtqCkItFfQ8NzpMvZjdZwK79fx HSelmySo8sWCreHlg6l19qlmtlDuZf5Gj+B0b0EwhUVWubNXeBK9YhVH3PUgx81LVU1+VK MzwkVn3obvceqDXbERh4280FykapuYaINwxu6fZfb6QZCf8kFQqOG3v1uNo+xw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758290525; a=rsa-sha256; cv=none; b=gOkYcZGkWj6NNxhKAzh5/KCYKwM8Z7H2SZY/4GbNz9ZTd1fQ1t0WrZdSkMssYbbQFVMxCq GHN/6nt3px4BIi3ikuU9Mj3nCycVh6MDd2be6AqBCF/ce5ezFp55Hu1CUhvggHBUEurmdG UpGQbwokiij2nnDiRIDcmnu19TthbHG3EZeSbo5A/fRmy//yobw2QTlOI2KlvQlQFbN0ic PWf450/HLp0Y/INGofTwL+6ib5/B7VPw+daTPUh5V5eIf/BQ5vSxHIq4/i8V9x0C5cxAt7 0furnDwJeZCOBPbLgWNXzfENINVtKJ8kyLIyAWJCEz2ayYyu36YLmdXeK2MfOg== 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 4cSvMK33bRz10yc; Fri, 19 Sep 2025 14:02:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58JE25bD009704; Fri, 19 Sep 2025 14:02:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58JE25j6009701; Fri, 19 Sep 2025 14:02:05 GMT (envelope-from git) Date: Fri, 19 Sep 2025 14:02:05 GMT Message-Id: <202509191402.58JE25j6009701@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Ziaee Subject: git: 89bc43a1ea9b - main - cdceem.4: Clean description for apropos, tag spdx List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ziaee X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 89bc43a1ea9b23cac9cb94f0b684d5655c9a90e4 Auto-Submitted: auto-generated The branch main has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=89bc43a1ea9b23cac9cb94f0b684d5655c9a90e4 commit 89bc43a1ea9b23cac9cb94f0b684d5655c9a90e4 Author: Alexander Ziaee AuthorDate: 2025-09-18 20:14:30 +0000 Commit: Alexander Ziaee CommitDate: 2025-09-19 13:58:45 +0000 cdceem.4: Clean description for apropos, tag spdx CDCEEM is already defined in the document name, no need to list it in parentheticals a second time in the document description. This brings the apropos listing down to one line on the one true standard console. MFC after: 3 days --- share/man/man4/cdceem.4 | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/share/man/man4/cdceem.4 b/share/man/man4/cdceem.4 index 6d8caf53cc02..c2a282027241 100644 --- a/share/man/man4/cdceem.4 +++ b/share/man/man4/cdceem.4 @@ -1,3 +1,6 @@ +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) 2019 Edward Tomasz Napierala .\" .\" Redistribution and use in source and binary forms, with or without @@ -20,12 +23,12 @@ .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. -.Dd November 7, 2019 +.Dd September 18, 2025 .Dt CDCEEM 4 .Os .Sh NAME .Nm cdceem -.Nd "USB Communication Device Class Ethernet Emulation Model (CDC EEM) driver" +.Nd USB Communication Device Class Ethernet Emulation Model driver .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your From nobody Fri Sep 19 14:19:53 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cSvls2B92z684pL; Fri, 19 Sep 2025 14:19: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 4cSvls1gzCz3q8V; Fri, 19 Sep 2025 14:19:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758291593; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=09vurr1oVbYViJ7bPh2QrocXGF5nVuH8aSeU2reWgFk=; b=O1D76D47lkBs1/vGHb6TFQn9DfC2nIjxS0dEcpKhpLyAWIshUslbm3EfClqT2/HdbQVcaR /JkkUp6aVWpk+XKYqmX68zKqUPB9329eyHXK2CjE4AwN50afO72hcq8Pio+nYxr/nCHL5p Fl3Sdrj+GFT+sttSUSTKBSDHfoL8kPOZYAitLdVUjcqgc7tt/PS4KgWgKG27ffMkFHglPX hF5B8orqNM7ksdhwxYSQ3gJU6sNNz6KT8XopPtKf+5bORfs4ZSWSxREOrCx+T7392OCpxr 5lfDG/96KpXedQen6ZC7wOsVx51vhzc+8PQphoqbj3OUWau+DjUCzqBXllVnBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758291593; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=09vurr1oVbYViJ7bPh2QrocXGF5nVuH8aSeU2reWgFk=; b=uF2rJNtTdpasNws4U1q6aRBOm3f5DVdS7HivOxaIpli9XyAxKCQ18eigbr9hT5fqjfztO5 bguZe1MhqYsUVgORKgiwPYmdOJoFkmOlzFMrkpWwzscIXKVaq55pWqZ7V6nU1agNU28Xpu QxyPQwqB02o0BE1JuU0GPLrw6SCStkB6JKKN27Uzu9PqOj6PEJ0s1Qi1okL3JVy+mLzr9Y HWoHCOCGuSP9Ig+T59USadT82a0OEfSILt0DVGV9BONPIs4vGL62OZc9fKzzMMxAdZmto1 OGta+Gyz7P9TDNCUT4KDbodPCN0w7IvGWmBXDjde6mmwP32VNOVAr4kjMtstew== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758291593; a=rsa-sha256; cv=none; b=sbaA3W0CNQpfRRtltFrdfgRM3OOQvMqKrgjqCqhPldgQbJhG23Rcau09nC468rPhHr1RIL QEP18FLlLL+boSEZWdua1IniHovXdkhR5pFlPhGpcJooRfIUn3KeT5Xs/HWx1ldL9Be7xp os7Pk24NmMQOyGODm9ZoNkhYah+Dhfqdh49PXV9zFC1Y7adUXeEx3YPBuNTaCEOCFugb/Q jZIZ71D4tGCSXKO7Uv0/k2wND92uLwW7hIDS8ow7dJqKO/bgEUzBqf+7HysnjvK63o7Tjd PIddtAOVezISvD/liozrZ9T5PhbzttzAK1wU8iYxeUUad3jQgInJR7iaosVlAA== 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 4cSvls19hFz11Hm; Fri, 19 Sep 2025 14:19: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 58JEJr33031835; Fri, 19 Sep 2025 14:19:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58JEJrSZ031832; Fri, 19 Sep 2025 14:19:53 GMT (envelope-from git) Date: Fri, 19 Sep 2025 14:19:53 GMT Message-Id: <202509191419.58JEJrSZ031832@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 94a0f9f63e16 - main - kern/vfs_vnops.c: generalize the lock primitive for file foffset List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 94a0f9f63e164e4f3791bc7d105d6f267b4d47bc Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=94a0f9f63e164e4f3791bc7d105d6f267b4d47bc commit 94a0f9f63e164e4f3791bc7d105d6f267b4d47bc Author: Konstantin Belousov AuthorDate: 2025-09-10 16:35:01 +0000 Commit: Konstantin Belousov CommitDate: 2025-09-19 14:19:05 +0000 kern/vfs_vnops.c: generalize the lock primitive for file foffset Generalize foffset_lock/unlock() by splitting the locking info file_v_lock/unlock() (LP64 case) or file_v_lock/unlock_mtxp() for ILP32 (using mutex pool) and then taking the action to read the offset. sys/file.h: rename struct file f_vnread_flags member into generic f_vflags Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Differential revision: https://reviews.freebsd.org/D52486 --- sys/kern/vfs_vnops.c | 148 +++++++++++++++++++++++++++++++-------------------- sys/sys/file.h | 6 +-- 2 files changed, 94 insertions(+), 60 deletions(-) diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c index a4f41192f684..f81c2033d95e 100644 --- a/sys/kern/vfs_vnops.c +++ b/sys/kern/vfs_vnops.c @@ -798,58 +798,82 @@ vn_rdwr_inchunks(enum uio_rw rw, struct vnode *vp, void *base, size_t len, } #if OFF_MAX <= LONG_MAX -off_t -foffset_lock(struct file *fp, int flags) +static void +file_v_lock(struct file *fp, short lock_bit, short lock_wait_bit) { - volatile short *flagsp; - off_t res; + short *flagsp; short state; - KASSERT((flags & FOF_OFFSET) == 0, ("FOF_OFFSET passed")); - - if ((flags & FOF_NOLOCK) != 0) - return (atomic_load_long(&fp->f_offset)); - - /* - * According to McKusick the vn lock was protecting f_offset here. - * It is now protected by the FOFFSET_LOCKED flag. - */ - flagsp = &fp->f_vnread_flags; - if (atomic_cmpset_acq_16(flagsp, 0, FOFFSET_LOCKED)) - return (atomic_load_long(&fp->f_offset)); + flagsp = &fp->f_vflags; + state = atomic_load_16(flagsp); + if ((state & lock_bit) == 0 && + atomic_cmpset_acq_16(flagsp, state, state | lock_bit)) + return; - sleepq_lock(&fp->f_vnread_flags); + sleepq_lock(flagsp); state = atomic_load_16(flagsp); for (;;) { - if ((state & FOFFSET_LOCKED) == 0) { + if ((state & lock_bit) == 0) { if (!atomic_fcmpset_acq_16(flagsp, &state, - FOFFSET_LOCKED)) + state | lock_bit)) continue; break; } - if ((state & FOFFSET_LOCK_WAITING) == 0) { + if ((state & lock_wait_bit) == 0) { if (!atomic_fcmpset_acq_16(flagsp, &state, - state | FOFFSET_LOCK_WAITING)) + state | lock_wait_bit)) continue; } DROP_GIANT(); - sleepq_add(&fp->f_vnread_flags, NULL, "vofflock", 0, 0); - sleepq_wait(&fp->f_vnread_flags, PRI_MAX_KERN); + sleepq_add(flagsp, NULL, "vofflock", 0, 0); + sleepq_wait(flagsp, PRI_MAX_KERN); PICKUP_GIANT(); - sleepq_lock(&fp->f_vnread_flags); + sleepq_lock(flagsp); state = atomic_load_16(flagsp); } - res = atomic_load_long(&fp->f_offset); - sleepq_release(&fp->f_vnread_flags); - return (res); + sleepq_release(flagsp); } -void -foffset_unlock(struct file *fp, off_t val, int flags) +static void +file_v_unlock(struct file *fp, short lock_bit, short lock_wait_bit) { - volatile short *flagsp; + short *flagsp; short state; + flagsp = &fp->f_vflags; + state = atomic_load_16(flagsp); + if ((state & lock_wait_bit) == 0 && + atomic_cmpset_rel_16(flagsp, state, state & ~lock_bit)) + return; + + sleepq_lock(flagsp); + MPASS((*flagsp & lock_bit) != 0); + MPASS((*flagsp & lock_wait_bit) != 0); + atomic_clear_16(flagsp, lock_bit | lock_wait_bit); + sleepq_broadcast(flagsp, SLEEPQ_SLEEP, 0, 0); + sleepq_release(flagsp); +} + +off_t +foffset_lock(struct file *fp, int flags) +{ + KASSERT((flags & FOF_OFFSET) == 0, ("FOF_OFFSET passed")); + + if ((flags & FOF_NOLOCK) == 0) { + file_v_lock(fp, FILE_V_FOFFSET_LOCKED, + FILE_V_FOFFSET_LOCK_WAITING); + } + + /* + * According to McKusick the vn lock was protecting f_offset here. + * It is now protected by the FOFFSET_LOCKED flag. + */ + return (atomic_load_long(&fp->f_offset)); +} + +void +foffset_unlock(struct file *fp, off_t val, int flags) +{ KASSERT((flags & FOF_OFFSET) == 0, ("FOF_OFFSET passed")); if ((flags & FOF_NOUPDATE) == 0) @@ -859,21 +883,10 @@ foffset_unlock(struct file *fp, off_t val, int flags) if ((flags & FOF_NEXTOFF_W) != 0) fp->f_nextoff[UIO_WRITE] = val; - if ((flags & FOF_NOLOCK) != 0) - return; - - flagsp = &fp->f_vnread_flags; - state = atomic_load_16(flagsp); - if ((state & FOFFSET_LOCK_WAITING) == 0 && - atomic_cmpset_rel_16(flagsp, state, 0)) - return; - - sleepq_lock(&fp->f_vnread_flags); - MPASS((fp->f_vnread_flags & FOFFSET_LOCKED) != 0); - MPASS((fp->f_vnread_flags & FOFFSET_LOCK_WAITING) != 0); - fp->f_vnread_flags = 0; - sleepq_broadcast(&fp->f_vnread_flags, SLEEPQ_SLEEP, 0, 0); - sleepq_release(&fp->f_vnread_flags); + if ((flags & FOF_NOLOCK) == 0) { + file_v_unlock(fp, FILE_V_FOFFSET_LOCKED, + FILE_V_FOFFSET_LOCK_WAITING); + } } static off_t @@ -882,7 +895,35 @@ foffset_read(struct file *fp) return (atomic_load_long(&fp->f_offset)); } -#else + +#else /* OFF_MAX <= LONG_MAX */ + +static void +file_v_lock_mtxp(struct file *fp, struct mtx *mtxp, short lock_bit, + short lock_wait_bit) +{ + mtx_assert(mtxp, MA_OWNED); + + while ((fp->f_vflags & lock_bit) != 0) { + fp->f_vflags |= lock_wait_bit; + msleep(&fp->f_vflags, mtxp, PRI_MAX_KERN, + "vofflock", 0); + } + fp->f_vflags |= lock_bit; +} + +static void +file_v_unlock_mtxp(struct file *fp, struct mtx *mtxp, short lock_bit, + short lock_wait_bit) +{ + mtx_assert(mtxp, MA_OWNED); + + KASSERT((fp->f_vflags & lock_bit) != 0, ("Lost lock_bit")); + if ((fp->f_vflags & lock_wait_bit) != 0) + wakeup(&fp->f_vflags); + fp->f_vflags &= ~(lock_bit | lock_wait_bit); +} + off_t foffset_lock(struct file *fp, int flags) { @@ -894,12 +935,8 @@ foffset_lock(struct file *fp, int flags) mtxp = mtx_pool_find(mtxpool_sleep, fp); mtx_lock(mtxp); if ((flags & FOF_NOLOCK) == 0) { - while (fp->f_vnread_flags & FOFFSET_LOCKED) { - fp->f_vnread_flags |= FOFFSET_LOCK_WAITING; - msleep(&fp->f_vnread_flags, mtxp, PRI_MAX_KERN, - "vofflock", 0); - } - fp->f_vnread_flags |= FOFFSET_LOCKED; + file_v_lock_mtxp(fp, mtxp, FILE_V_FOFFSET_LOCKED, + FILE_V_FOFFSET_LOCK_WAITING); } res = fp->f_offset; mtx_unlock(mtxp); @@ -922,11 +959,8 @@ foffset_unlock(struct file *fp, off_t val, int flags) if ((flags & FOF_NEXTOFF_W) != 0) fp->f_nextoff[UIO_WRITE] = val; if ((flags & FOF_NOLOCK) == 0) { - KASSERT((fp->f_vnread_flags & FOFFSET_LOCKED) != 0, - ("Lost FOFFSET_LOCKED")); - if (fp->f_vnread_flags & FOFFSET_LOCK_WAITING) - wakeup(&fp->f_vnread_flags); - fp->f_vnread_flags = 0; + file_v_unlock_mtxp(fp, mtxp, FILE_V_FOFFSET_LOCKED, + FILE_V_FOFFSET_LOCK_WAITING); } mtx_unlock(mtxp); } diff --git a/sys/sys/file.h b/sys/sys/file.h index cc3c733580fd..9a072121e25f 100644 --- a/sys/sys/file.h +++ b/sys/sys/file.h @@ -197,7 +197,7 @@ struct file { struct vnode *f_vnode; /* NULL or applicable vnode */ struct ucred *f_cred; /* associated credentials. */ short f_type; /* descriptor type */ - short f_vnread_flags; /* (f) Sleep lock for f_offset */ + short f_vflags; /* (f) Sleep lock flags for members */ /* * DTYPE_VNODE specific fields. */ @@ -220,8 +220,8 @@ struct file { #define f_cdevpriv f_vnun.fvn_cdevpriv #define f_advice f_vnun.fvn_advice -#define FOFFSET_LOCKED 0x1 -#define FOFFSET_LOCK_WAITING 0x2 +#define FILE_V_FOFFSET_LOCKED 0x0001 +#define FILE_V_FOFFSET_LOCK_WAITING 0x0002 #endif /* __BSD_VISIBLE */ #endif /* _KERNEL || _WANT_FILE */ From nobody Fri Sep 19 14:19:54 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cSvlt3DCQz684cr; Fri, 19 Sep 2025 14:19: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 4cSvlt2Jt6z3pym; Fri, 19 Sep 2025 14:19:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758291594; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fL7iJ5BYMSI3aDtWNboEbkM8go7s+aOC49/ha3uqKOg=; b=R9eVSAO+gIA04yB0zBJWQOmHBn49nGYdcUuqbTlt13r7VkinZYTxlKRxsaALKeAbKb1RPV R+iHI8FLcDS0+7UqQgCHLgmJFTGTCjwxpN0ntuSLCX3+rLVI3SKwk/DjMDlXEDbw5VgvLA qFAp8A//VDKXpZCvIJXWuJW+ZQIOOYBzUFCpAOv1AuUceYeSGbMdkdkoVeIskAYy2g+rhK ZeBYjSsBuAmdbdjKs+dgRJkm8e8rGl5qWUn/k1YQJnZ65YNd5xho77BqK07xJMm2oPFV98 47EyAujGuhZtuB+NqZg2i/s4+W+kX4m8pXfy/9ztjqFGvApRxwgCsS5H8q/Cfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758291594; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fL7iJ5BYMSI3aDtWNboEbkM8go7s+aOC49/ha3uqKOg=; b=nWuAEUIo4Wd421xG55Qz8MyGV5KhoPHunCe1gdtVD48I69LzQbMiP1V/ToPv0BFzdQnMJ3 MIUKFfapwrlBISK0U2MoqFhCZbdILrGlu0zPu1KtPuam/hgM4p/VoMW6oZPCYd/HDJN9Lu 7DhwVmNaMPmiAfbqeacxetYuim13sEcdHKuDwNswf2ixJY5q/cUjCd5cBdH29hyLp3OlSc yFe1nAaJIrWvhbZUiE0ucRx/l4KBzOtoGE2Za0olvqR2DpBlXhdLAE8J3U+7Wn0nMO1LAy eNdKsUn7AU9Yw/tg1XcQY00GnWWgDrcXyDECl1mD47QcrxAT2+/gtfHw6Odh1g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758291594; a=rsa-sha256; cv=none; b=uYAQCcu0MCNKmGSQg4XmIU5znYNknvrLgjDwbYnwsVOoeIbssMpBkHruj8JHoqq3XRdV0M oaH3xszJZskd5xi9dkSlsQNbGBoikFSGMkPCEaO7rYSbL9YKhBE4SstLnHxGyaCDSmpWSq xU5rjJv7WWOh9bz7OjPSEHhfcmsLkFIMB7TMwcu5W4y/qpcEpVub9/cl5+/SarJXYyqvLr muu80CxB+cvwWO/TQfRbd6wDWtLiB98jPAVhKASnQPrC7I9pd6HPaS8Di9iBfAst6aX37B /LWzbKFti34adeI1Ob1pxomEAZ6PBr1ByD06k/tpEYFlU7K+fxHkik83sNCBhg== 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 4cSvlt1tFrz11Hn; Fri, 19 Sep 2025 14:19: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 58JEJsx1031870; Fri, 19 Sep 2025 14:19:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58JEJsvj031867; Fri, 19 Sep 2025 14:19:54 GMT (envelope-from git) Date: Fri, 19 Sep 2025 14:19:54 GMT Message-Id: <202509191419.58JEJsvj031867@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 40a42785dbba - main - fcntl(F_SETFL): only allow one thread to perform F_SETFL List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 40a42785dbba93cc5196178fc49d340c1a89cabe Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=40a42785dbba93cc5196178fc49d340c1a89cabe commit 40a42785dbba93cc5196178fc49d340c1a89cabe Author: Konstantin Belousov AuthorDate: 2025-09-11 10:05:04 +0000 Commit: Konstantin Belousov CommitDate: 2025-09-19 14:19:13 +0000 fcntl(F_SETFL): only allow one thread to perform F_SETFL Use f_vflags file locking for this. Allowing more than one thread handling F_SETFL might cause de-sync between real driver state and flags. Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Differential revision: https://reviews.freebsd.org/D52487 --- sys/kern/kern_descrip.c | 3 +++ sys/kern/vfs_vnops.c | 36 ++++++++++++++++++++++++++++++++++++ sys/sys/file.h | 4 ++++ 3 files changed, 43 insertions(+) diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c index 2a833d2eafbe..19118eb7f275 100644 --- a/sys/kern/kern_descrip.c +++ b/sys/kern/kern_descrip.c @@ -658,6 +658,7 @@ kern_fcntl(struct thread *td, int fd, int cmd, intptr_t arg) error = EBADF; break; } + fsetfl_lock(fp); do { tmp = flg = fp->f_flag; tmp &= ~FCNTLFLAGS; @@ -677,6 +678,7 @@ kern_fcntl(struct thread *td, int fd, int cmd, intptr_t arg) if (error != 0) goto revert_nonblock; } + fsetfl_unlock(fp); fdrop(fp, td); break; revert_nonblock: @@ -691,6 +693,7 @@ revert_flags: tmp |= got_cleared; tmp &= ~got_set; } while (atomic_cmpset_int(&fp->f_flag, flg, tmp) == 0); + fsetfl_unlock(fp); fdrop(fp, td); break; diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c index f81c2033d95e..3d4567b6ab1e 100644 --- a/sys/kern/vfs_vnops.c +++ b/sys/kern/vfs_vnops.c @@ -896,6 +896,18 @@ foffset_read(struct file *fp) return (atomic_load_long(&fp->f_offset)); } +void +fsetfl_lock(struct file *fp) +{ + file_v_lock(fp, FILE_V_SETFL_LOCKED, FILE_V_SETFL_LOCK_WAITING); +} + +void +fsetfl_unlock(struct file *fp) +{ + file_v_unlock(fp, FILE_V_SETFL_LOCKED, FILE_V_SETFL_LOCK_WAITING); +} + #else /* OFF_MAX <= LONG_MAX */ static void @@ -971,6 +983,30 @@ foffset_read(struct file *fp) return (foffset_lock(fp, FOF_NOLOCK)); } + +void +fsetfl_lock(struct file *fp) +{ + struct mtx *mtxp; + + mtxp = mtx_pool_find(mtxpool_sleep, fp); + mtx_lock(mtxp); + file_v_lock_mtxp(fp, mtxp, FILE_V_SETFL_LOCKED, + FILE_V_SETFL_LOCK_WAITING); + mtx_unlock(mtxp); +} + +void +fsetfl_unlock(struct file *fp) +{ + struct mtx *mtxp; + + mtxp = mtx_pool_find(mtxpool_sleep, fp); + mtx_lock(mtxp); + file_v_unlock_mtxp(fp, mtxp, FILE_V_SETFL_LOCKED, + FILE_V_SETFL_LOCK_WAITING); + mtx_unlock(mtxp); +} #endif void diff --git a/sys/sys/file.h b/sys/sys/file.h index 9a072121e25f..c44fd0f28929 100644 --- a/sys/sys/file.h +++ b/sys/sys/file.h @@ -93,6 +93,8 @@ void foffset_lock_pair(struct file *fp1, off_t *off1p, struct file *fp2, void foffset_lock_uio(struct file *fp, struct uio *uio, int flags); void foffset_unlock(struct file *fp, off_t val, int flags); void foffset_unlock_uio(struct file *fp, struct uio *uio, int flags); +void fsetfl_lock(struct file *fp); +void fsetfl_unlock(struct file *fp); static inline off_t foffset_get(struct file *fp) @@ -222,6 +224,8 @@ struct file { #define FILE_V_FOFFSET_LOCKED 0x0001 #define FILE_V_FOFFSET_LOCK_WAITING 0x0002 +#define FILE_V_SETFL_LOCKED 0x0004 +#define FILE_V_SETFL_LOCK_WAITING 0x0008 #endif /* __BSD_VISIBLE */ #endif /* _KERNEL || _WANT_FILE */ From nobody Fri Sep 19 14:48:37 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cSwP71pFsz686ZR; Fri, 19 Sep 2025 14:48:43 +0000 (UTC) (envelope-from ivy@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cSwP713fTz3s9v; Fri, 19 Sep 2025 14:48:43 +0000 (UTC) (envelope-from ivy@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758293323; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=XWJB2OG6o/2FpqwTija3xx3/xkCOMccQDsoKz1oLd/Q=; b=kR+63LETy6cANnVrGZNEdus/ClWLwX0okJNe1pdeIww1oBuFym/125K0x3KXITScuobkqh lUQ+hmHwOW00MwhXhiaLtcqJuRXnu+RxWpX7QzqElwBSjwt+ug2tlF+ZqdxMVrIJyyP9f8 gsGLhDjYf/7MRIrgNMeSow9S/Wmhkue2d0CdPuoRQ3dkPVmYUWgsYqyQT13uxpRT8lxOxY hxXKyqN58lGDAelZe5NbByXXs3WkuU8ndhIFHvtZjCGBHlxXv5n0JwS+6IoaSDX1YHhMQa c9QkWWJN6TklsOXM014BGvZ48VrV/2FyEwAw+KDRKIDYhIMu8Awc+UUcWQG4gQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758293323; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=XWJB2OG6o/2FpqwTija3xx3/xkCOMccQDsoKz1oLd/Q=; b=oCSZltpEkACQrqn0/2sZ+BJUD284DTXNQrZEgbU4TY+35Vp26sIqjMgMxOrSyqNw3C2xid C71S78IMdxZY59Qr/fFfDVTnfB1ba93dCYc5l6R45XTB80S6MB/o1kaC60i+WLYWniwGAx wHbxZai3smI3/N0LzMoDGJO5nfhlE8rlpR9GdVZ2yadANdAmwLq2EMUCrIli+T1PbhzU2V FIzZUl8Wf/0pJ6noLkS8nObww+ya6o1IyDxdfHKhKAzsfzRomwmj2nTBBkxVCFVrtSQm9t rmAuXIq7vkpAapoLLF0KwVrA8OQ1see5tDkjIWNnXrv8YsWyTMSbPoJWdTBIxQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758293323; a=rsa-sha256; cv=none; b=xQngqZFyw2NHuyrqXTLix/7QFqjcBLcWkQU2KM7kdJkkUCo4s0LaeX1k+U6KjGs54J8Owc WebO/S5jhPWX0JAFs2rqPlrTsyycj50CPqiUdC0QwEqZfiARM4zI1/laIljNlK/bOl4Nnx cg9Ojo4UOPfx/OnJD7s/NZWpgMEVMH/ei/VK/MIMPoWh7pkzFRNtG42wz5bduuMBTr6XsH 26urWGYxh0qPAuyrMKlzdeFx9brNVoTmYqCv3lsVsM6DQfU0PKGi+0sD1wN/StzzjkR7i5 rdAJRC8SqR/7jGt3PwuXujm0ZleBRXz3yOOMCACvoNdBorY4Wc1BYvaH7XpwrQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from amaryllis.le-fay.org (amaryllis.le-fay.org [IPv6:2a00:1098:6b:400::9]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: ivy/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4cSwP6493mz2fN; Fri, 19 Sep 2025 14:48:42 +0000 (UTC) (envelope-from ivy@freebsd.org) Date: Fri, 19 Sep 2025 15:48:37 +0100 From: Lexi Winter To: Colin Percival Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 6b5adf33873a - main - Include a pkg package in the pkgbase repo Message-ID: Mail-Followup-To: Colin Percival , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202509172239.58HMdOK9055924@gitrepo.freebsd.org> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="dFIcyrwOOJqH0zpy" Content-Disposition: inline In-Reply-To: <202509172239.58HMdOK9055924@gitrepo.freebsd.org> --dFIcyrwOOJqH0zpy Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Colin Percival wrote in <202509172239.58HMdOK9055924@gitrepo.freebsd.org>: > Include a pkg package in the pkgbase repo > =20 > -create-packages: .PHONY create-packages-world create-packages-kernel cre= ate-packages-source create-packages-sets > +create-packages: .PHONY create-packages-world create-packages-kernel cre= ate-packages-source package-pkg create-packages-sets please consider reverting this: it causes a normal source build to attempt to install software from ports as root, which is not right, and it means the base repository is polluted with a random package =66rom ports, when it is supposed to only include the base system. if this is necessary for the release media, then it should at least be optional and enabled by a make option, not by default. --dFIcyrwOOJqH0zpy Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQSyjTg96lp3RifySyn1nT63mIK/YAUCaM1tQgAKCRD1nT63mIK/ YI1wAP9oUgF5/ZoWcHPdFU02UbkAcPTo07eLoc6fiwQuLYpanQD/RVjYryCneAjN VBPBmjMadFarIqfTj8+wkcwuxHRn8gA= =EWKp -----END PGP SIGNATURE----- --dFIcyrwOOJqH0zpy-- From nobody Fri Sep 19 15:25:42 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cSxCv0v6Xz6895y; Fri, 19 Sep 2025 15:25:47 +0000 (UTC) (envelope-from ivy@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cSxCv0DTLz3vt9; Fri, 19 Sep 2025 15:25:47 +0000 (UTC) (envelope-from ivy@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758295547; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=oPUjImVDMRdoEuZdxzu0S/QHaye/aPCl5Tz+IMnhJpI=; b=ZuE1ZBql4pr9T4ZFLf882FWEH5HaTW5puoIF/ja5Ao9+W4xpMouGODHyExbVfHZ6E+GXNk GCacWVjbQ6V40ycfL52yVbYwd/GqDTNnpC5CUvma1F46u+5o3T8Ut2wffEENXhw5q+i96o Nv2WkhzSMmuOwysZXvn5I/yWAe398C/1vAx1guV2UxwLvmvD0Z6rsywYkezI1n8JIoQtIa VLwAyfCT2+vANAeF5i7ofLFd/TfzsI7oEnmb+5mTidWeA0pmq1okebrxekpfEJSIb7bFGK mzRPo3JAHr93+AoZcORGB8xeVNTheMxzSwui1yTXNiwqjxalKl+zvWp4M7RpqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758295547; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=oPUjImVDMRdoEuZdxzu0S/QHaye/aPCl5Tz+IMnhJpI=; b=vjmIDu5V9x+Lpi340wz9UU9CTR+v5TkJSNRS3+l+/kqIONqDldytLC3N3KM8yTYPAsJ74a +4vlDoCrMleroqMKqvz5mT6wv14CTZhHzKqOtD1p89BS9BFnPSopCMBQjLkvgULZr5J7uP yiDnDIMBEyQCvxj/NVtoQgs0+DUJryhpxdIAtHa24iOsQHRJHFbu/WSv6HUkmYNcVrvKa9 SgYQwhy4mg6PE+Yo4YQVAEuBmj82k44hPLMa2qtM9HnZK3KzfQt8yYROKAUrSvca6t20Xb ltj7UkbPBCY1qYXWbN+ZRPADKE8tFjhnskM9CVp+A05SBYN/A5c70M8skc616g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758295547; a=rsa-sha256; cv=none; b=kOJdKzKy/T+KRvls2UMZnsBHpRcazcXD3Uq935VjbiMzXBjNvm/zUFZySVz5Y3RJpIcfoW m2XQKST62EPxdJfPLWCr3+zNN+t+BfaBUru77m4CpzBOebH63qTPYQzm5sPSKFKwfH6Ouo wHqQzc9+OuGg+Ii8MqmqO19Fj1ssE6vte4c1I7ptD/i52VxHmF3zmjPir4T8YF+/Xa39v+ eSBbdW4SoSqRobPHQ1XxnkV3Iq+6tE8EdX4sRoTfDWzF7lT02c1O7fJhIBrfFxtT5RpPDG NBJvYjM+3tUHfDNEpA5B7U9I49QLCdmIDaWMVRsO+XeOj8Li7DXSqTOI4gXBbA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from amaryllis.le-fay.org (amaryllis.le-fay.org [IPv6:2a00:1098:6b:400::9]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: ivy/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4cSxCt320cz3Lk; Fri, 19 Sep 2025 15:25:46 +0000 (UTC) (envelope-from ivy@freebsd.org) Date: Fri, 19 Sep 2025 16:25:42 +0100 From: Lexi Winter To: Colin Percival , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 6b5adf33873a - main - Include a pkg package in the pkgbase repo Message-ID: Mail-Followup-To: Colin Percival , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202509172239.58HMdOK9055924@gitrepo.freebsd.org> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="wZAm7w05OqLQIq3n" Content-Disposition: inline In-Reply-To: --wZAm7w05OqLQIq3n Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Lexi Winter wrote in : > Colin Percival wrote in <202509172239.58HMdOK9055924@gitrepo.freebsd.org>: > > Include a pkg package in the pkgbase repo > > =20 > > -create-packages: .PHONY create-packages-world create-packages-kernel c= reate-packages-source create-packages-sets > > +create-packages: .PHONY create-packages-world create-packages-kernel c= reate-packages-source package-pkg create-packages-sets >=20 > please consider reverting this: it causes a normal source build to > attempt to install software from ports as root, which is not right, > and it means the base repository is polluted with a random package > from ports, when it is supposed to only include the base system. >=20 > if this is necessary for the release media, then it should at least > be optional and enabled by a make option, not by default. this also breaks the build if ${LOCALBASE} is set to a non-default value: https://people.freebsd.org/~ivy/tmp/update-packages.log if i'm reading this right, it seems like even if this works it will build a new pkg package every time you build src, which roughly doubles the time it takes me to build packages. that's going to slow down my development workflow significantly, since i always update from packages when testing changes. i've reverted this locally for now so i can get some work done. --wZAm7w05OqLQIq3n Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQSyjTg96lp3RifySyn1nT63mIK/YAUCaM118wAKCRD1nT63mIK/ YFDHAQDrHJOhHkojdEdnhLkDelASz1Cy9CPNeNdK/kUZoIdvewEA0mEZaTXLLcCB Wqll/3ey3S/8jl4k0ig8lkK0gpAtoQA= =tlZx -----END PGP SIGNATURE----- --wZAm7w05OqLQIq3n-- From nobody Fri Sep 19 16:03:14 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cSy3655skz68C9M; Fri, 19 Sep 2025 16:03: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 4cSy364W33z43m1; Fri, 19 Sep 2025 16:03:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758297794; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=j3YMlMahfLVZxWc1KI0+/4I7dW2kpRMqq+G1MykUWIw=; b=mx+z0zKweCwzM22EU0Do0CcUTcE4bq5KxZ/KtzqCbshAJ50J8B7tQIJgF/lHi/A333Pifr PRDPH+oHLUV4vpfjhSQ1NIr3q3xm7YyNtGdKn53lbtZi5XkkX12taTgnebwtoS/L2BmoV6 TwLktCzlu3bZQ8mhAMxSxlFXFyzm4Ub1YzeKHKY3CqAHi7r2TbOgNKuxtuMGjoN135LkXx fKDN6yl9guB0NTlPv87mf8DmV4VuJgG+zQSz68pSs19XKmS5xrJJHgwDCzRCYy9zriXt3u 8LgMXCh0MbCluYiVU6qZIDUlurd8M5XqRvVyDWaoPezDN23aQuyR+78T9hJDZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758297794; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=j3YMlMahfLVZxWc1KI0+/4I7dW2kpRMqq+G1MykUWIw=; b=eVgOmNJRx3+J11yqMkgT95ujBDsRgzjEFx6H/Emp0tuqkQk5xdx6fLmeIijIhjFOLEfPA+ TcORZWW2jAeLFCDrxJW0RUMazL9bD8y1KFNGeJkOT8szYgkZNpd8JbcqNwL6ligtt0bfnm 8s5yYKgETxw8eWx9dVmlzBsJzEend6qpgd/+IaasEpkNx2EZ23qrlE9LVAFQdtt7gb0PyM XVPVEAGWnismALX9jnaEYa/2FQoI8jPipw4NG2d/hyShyS7PjRg0HN4X68G4fPmBUcOkzl W8xxHLcROISBihhlCcaekx9tOK6xVt2vFT+uxH+ppfFWMhZR7cSH2cqu6wsd8w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758297794; a=rsa-sha256; cv=none; b=qJ0Yvl3J9kDKQYvCyl5uwAFRzBPDGDKNLi9TmZU2xpgQmdqUreCIUrq6XY6+7Ov+Vs0VEI DVMkOt0sZ+TUtkZ1Jz39VD1rNmvTF52oyHtzSSMkCsTSUnqn6H7wTmox7gtrUWNyXA3mZT GrXBn9AQgY27u/jbYR7p0kmq7S52p8tWbvdcwTvf8B7rE4zady2sRklqT7i15SyggY1T1O dLnLHP/6nUoklUGb1UpGlo9teiicD+Gu9rWgJBgUfBfM8oXXr8420lulfwrErDHooi2+eV Q9AMw/5kFMQ75wo0DWLNCbQni/Z0s88yaLoGNc/YzalHcK6fbu0aufQMAfpJ6Q== 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 4cSy3644vjz14DZ; Fri, 19 Sep 2025 16:03: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 58JG3Eud037441; Fri, 19 Sep 2025 16:03:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58JG3EF6037438; Fri, 19 Sep 2025 16:03:14 GMT (envelope-from git) Date: Fri, 19 Sep 2025 16:03:14 GMT Message-Id: <202509191603.58JG3EF6037438@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 87a7b35f04b6 - main - bsdinstall: fix vfs.zfs.vdev.min_auto_ashift oid List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 87a7b35f04b60956e9aa192680ae80773ec38f14 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=87a7b35f04b60956e9aa192680ae80773ec38f14 commit 87a7b35f04b60956e9aa192680ae80773ec38f14 Author: Siva Mahadevan AuthorDate: 2025-07-15 16:45:24 +0000 Commit: Ed Maste CommitDate: 2025-09-19 16:02:57 +0000 bsdinstall: fix vfs.zfs.vdev.min_auto_ashift oid Signed-off-by: Siva Mahadevan PR: 266374 Pull request: https://github.com/freebsd/freebsd-src/pull/1851 Reviewed by: emaste Sponsored by: The FreeBSD Foundation --- usr.sbin/bsdinstall/scripts/zfsboot | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/usr.sbin/bsdinstall/scripts/zfsboot b/usr.sbin/bsdinstall/scripts/zfsboot index aa05faa7d3dd..5fbf56ea59ac 100755 --- a/usr.sbin/bsdinstall/scripts/zfsboot +++ b/usr.sbin/bsdinstall/scripts/zfsboot @@ -69,7 +69,7 @@ f_include $BSDCFG_SHARE/variable.subr : ${ZFSBOOT_VDEV_TYPE:=stripe} # -# Should we use sysctl(8) vfs.zfs.min_auto_ashift=12 to force 4K sectors? +# Should we use sysctl(8) vfs.zfs.vdev.min_auto_ashift=12 to force 4K sectors? # : ${ZFSBOOT_FORCE_4K_SECTORS=1} @@ -221,7 +221,7 @@ PRINTF_CONF="printf '%s=\"%%s\"\\\n' %s >> \"%s\"" PRINTF_FSTAB='printf "$FSTAB_FMT" "%s" "%s" "%s" "%s" "%s" "%s" >> "%s"' SHELL_TRUNCATE=':> "%s"' SWAP_GMIRROR_LABEL='gmirror label swap %s' -SYSCTL_ZFS_MIN_ASHIFT_12='sysctl vfs.zfs.min_auto_ashift=12' +SYSCTL_ZFS_MIN_ASHIFT_12='sysctl vfs.zfs.vdev.min_auto_ashift=12' UMOUNT='umount "%s"' ZFS_CREATE_WITH_OPTIONS='zfs create %s "%s"' ZFS_MOUNT='zfs mount "%s"' @@ -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.min_auto_ashift=12" +msg_force_4k_sectors_help="Align partitions to 4K sector boundries 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" @@ -1099,7 +1099,7 @@ zfs_create_boot() # f_dprintf "$funcname: Preparing disk partitions for ZFS pool..." - # Force 4K sectors using vfs.zfs.min_auto_ashift=12 + # Force 4K sectors using vfs.zfs.vdev.min_auto_ashift=12 if [ "$ZFSBOOT_FORCE_4K_SECTORS" ]; then f_dprintf "$funcname: With 4K sectors..." f_eval_catch $funcname sysctl "$SYSCTL_ZFS_MIN_ASHIFT_12" \ @@ -1382,7 +1382,7 @@ zfs_create_boot() if [ "$ZFSBOOT_FORCE_4K_SECTORS" ]; then f_eval_catch $funcname echo "$ECHO_APPEND" \ - 'vfs.zfs.min_auto_ashift=12' \ + 'vfs.zfs.vdev.min_auto_ashift=12' \ $BSDINSTALL_TMPETC/sysctl.conf.zfs || return $FAILURE fi From nobody Fri Sep 19 16:29:13 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cSyd621Xxz68F98; Fri, 19 Sep 2025 16:29:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cSyd61GjHz49lx; Fri, 19 Sep 2025 16:29:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758299354; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YIrjvAkqtuqJxyKUfmx1YqFXWlN2n4sSutstxWb6xRc=; b=o13OwPFRIW0CuJdABCo3YiQLBSBCj/+GzRgUvPsg3RSHQEm2rk7NEj2HReuNr3rYpk2seu S312JGkazPMU9XXlIbwJKiU+W4iAUptcVkvQtrE/kX89kmBJ96Hz3HVw1YVu5KTKR6S9VU erYtY1VR6uSmGaC9FqwP1Mp89k2/wDlaQeguogL3if2FvsmFU40IGsqn2TnUK8P/5avrko FOp19bNQSe933XfvuEMvPW4sJD0DPh8gxqTU+Y6oHJ0cHxnN6A7WvrGOIZBkrH1bsT5qB5 StAqeQM1fGpmV7TGzlz7cmFOhspOuVycFPOEXlUAjxQZOK6AXRtc3UPd5LXrxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758299354; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YIrjvAkqtuqJxyKUfmx1YqFXWlN2n4sSutstxWb6xRc=; b=dgPh8Sseep1JgJPGuEdOhNHXOUQ5VgsVTlCFP9G7KkpW73qtoa/2W8se1LQOBn5Cl1bANp gKz/tupS90/8OVD8odUmzbZC1ECF09p/Fbqm/+Hcr8unCwS2a88wJm+iWZBPC1LhGHT2S4 LA2XWUo1eQ7dF1uSxSIkoZeekw4GUd0/nFife3hEI9pirtIXvpK+f+CUNtaeQQx+oqINu1 J+zbnH38ZY+uqIfqzVMjDXmAOXvFT4RJPu377fT+S6q/ws3z5UwuxI1HMKo9PD4wbhdNM3 Q8k3ceoNUFuRBwR+I2WZSWBipQXLxEQJZ3OPj4H2BTcx9/ovrgDIxjqpasec8A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758299354; a=rsa-sha256; cv=none; b=evM/qLj3yVW9KXQCcgAGwiHAxUeMXQf4buFyn747oQ8j5b2ISaYJNogfOwUPTnqfOc8L26 bduenTrlVuMKvwpzOdn1p+M1drm5XTbmM2W8u9oEgcMJJP4OUNqKXTPz53ZKdJZGHoPReE j4ARXptV7tEt0muXUp8kGtpKhT0kzNvQzClde1CP/DoBNb9c5n9qEAiQySISJCVksZFCow 4WplwECxmwtQWtZd2/v/AnzPzU7OJA/BBacm8dvkwFM40Msx6D393KWv8NI7+OQS39Dkqi VCGXg+NaTy7p8+8OM/Pgd0qRTLkyMhJC7dd/TiW3YgkOQtrUNGUskF6gsQ6RVQ== 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 4cSyd60kjwz14HQ; Fri, 19 Sep 2025 16:29: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 58JGTDsc076369; Fri, 19 Sep 2025 16:29:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58JGTD0U076366; Fri, 19 Sep 2025 16:29:13 GMT (envelope-from git) Date: Fri, 19 Sep 2025 16:29:13 GMT Message-Id: <202509191629.58JGTD0U076366@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Colin Percival Subject: git: 060f7edadcff - main - pkgbase: Don't include pkg by default List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 060f7edadcff77cf804b60ecb25f8517c8dca62f Auto-Submitted: auto-generated The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=060f7edadcff77cf804b60ecb25f8517c8dca62f commit 060f7edadcff77cf804b60ecb25f8517c8dca62f Author: Colin Percival AuthorDate: 2025-09-19 16:20:37 +0000 Commit: Colin Percival CommitDate: 2025-09-19 16:29:02 +0000 pkgbase: Don't include pkg by default We need to put pkg into the pkgbase repository for release builds, but not for non-release pkgbase builds. Gate the contents of package-pkg behind INCLUDE_PKG_IN_PKGBASE_REPO=YES and set that when building releases. Reviewed by: ivy MFC after: 6 hours Sponsored by: https://www.patreon.com/cperciva --- Makefile.inc1 | 2 ++ release/Makefile | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index d41741d15384..65149beb9eb6 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -2047,6 +2047,7 @@ update-packages: .PHONY ${_+_}${MAKE} -C ${.CURDIR} ${PKGMAKEARGS} real-update-packages package-pkg: _pkgbootstrap _repodir .PHONY +.if defined(INCLUDE_PKG_IN_PKGBASE_REPO) .if exists(${PORTSDIR}) rm -rf /tmp/ports.${TARGET} || : env ${WMAKEENV} SRCDIR=${.CURDIR} PORTSDIR=${PORTSDIR} REVISION=${_REVISION} \ @@ -2055,6 +2056,7 @@ package-pkg: _pkgbootstrap _repodir .PHONY OSVERSION="${SRCRELDATE}" \ sh ${.CURDIR}/release/scripts/make-pkg-package.sh .endif +.endif real-packages: stage-packages create-packages sign-packages .PHONY diff --git a/release/Makefile b/release/Makefile index bc04a7974744..40eea0e24a70 100644 --- a/release/Makefile +++ b/release/Makefile @@ -195,7 +195,8 @@ PKG_ABI= $$(${PKG_CMD} -o ABI_FILE=${.TARGET}/usr/bin/uname config ABI) pkgbase-repo: mkdir -p pkgbase-repo - ( ${IMAKE} -C ${WORLDDIR} packages REPODIR=${.OBJDIR}/pkgbase-repo ) + ( ${IMAKE} -C ${WORLDDIR} packages REPODIR=${.OBJDIR}/pkgbase-repo \ + INCLUDE_PKG_IN_PKGBASE_REPO=YES ) disc1: ${PKGBASE_REPO} # Install system From nobody Fri Sep 19 16:39:52 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cSysN68L8z68Fg4; Fri, 19 Sep 2025 16:39: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 4cSysN566rz4DQd; Fri, 19 Sep 2025 16:39:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758299992; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lF84S4PgOIZDjIJ1PB3+wnW3aG/jKdFDUHa7pQaVLxk=; b=PZXOfwsqQA2EB6ek496oTH/G8rr8CBxT3KCTjuGucJLygYpfh/8UtxXiKawRIMdURIpGsR 8GQ5BvYOwHDUrqdNXD4jLQf3nD6A5p+OYONyoKICtjv1cLaRhQC4f5JOONNaM+g6IbX+1R J8LW82nzgGdz7VQ3/XebOp1jbJmw6QR5mpdtsh1dlPgTB3Bqnyo8eUs0HGB3FKx0OmsdbA jvzhcB2aRwq25hOezSs2XVg6698PqNHQjK90tfkA9jDhQWsyUCuhLrstdihIndshdobQBI /TeDtlgwNIf2Cjzn/+z14vN1exQ9abPArryf0A/KOk334krKD5WsV1pJVriNzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758299992; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lF84S4PgOIZDjIJ1PB3+wnW3aG/jKdFDUHa7pQaVLxk=; b=RLewYmKdpLyyODDgKTWwd2k5TwAVdOJXZtHc4vkGZeu7/WtM+M/3KpL0Yr0KPPKOxOeIwU fjtTFQQ+MBi5kRT0KZhuyXn3Fxq1jv5QFKi8LxnG6p/NXEXCw/0+Ag2e3lybHV133u7EYF NmC1FXI4PgGmRbqd4Swv8bzv15yIIgBoRDgRWUcvDoI+Qxy3ITMooiC9qZraSBr3w+D8kc b0XnfIRVwCS73r1dJ5VQeRlk/qJdfpJUH1iE044AuTFDz69tovFVDToVGCYVk0e4UWiir/ sJ4OUdcvucPod0ROoktaa06ymNzR6YuvrC1+anMRa/aHqa0gDzQAb7CQurVNZw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758299992; a=rsa-sha256; cv=none; b=RQygWd/piacUfN8zvXMdHl+j80SvW7CTctb5XTTjfskx8M28rTgF4nCN1YlUAGnFlPo1Df qSINA61SYcd38rO6l1O2Fa4d1AxxSUnUkE2bghPB/JiEaUn++whJRUJ7VVB9upMAzgICNY xAhiipmEMLHEYZzQfSa8ZmjUZuTpILtx4uP8sD+ezgZm3ILGTL3buIDE2q5HcXy+xtkPiY JPDSS1GZdyZ8qWa/ZDfcuYlODugOPkS4DUMyiZGJy9CDqgPYzWaSYYnyvvuPE6M0/Wfuw9 wQXwN/9fVWCf0hTKzCAP2MD4SM3F8noX9p6227dJbF1bUh2yLXB6JFCIISbsGg== 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 4cSysN4jBKz153b; Fri, 19 Sep 2025 16:39: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 58JGdq8Z095008; Fri, 19 Sep 2025 16:39:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58JGdqEV095006; Fri, 19 Sep 2025 16:39:52 GMT (envelope-from git) Date: Fri, 19 Sep 2025 16:39:52 GMT Message-Id: <202509191639.58JGdqEV095006@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: b3468202994f - main - mtree: Add package tags to some root directories List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b3468202994f6856c5c49f3365e05f4f8017d680 Auto-Submitted: auto-generated The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=b3468202994f6856c5c49f3365e05f4f8017d680 commit b3468202994f6856c5c49f3365e05f4f8017d680 Author: Lexi Winter AuthorDate: 2025-09-19 16:38:24 +0000 Commit: Lexi Winter CommitDate: 2025-09-19 16:39:04 +0000 mtree: Add package tags to some root directories This ensures the normally-empty directories /proc, /net, /media and /mnt are created on a fresh pkgbase install. Put /proc, /mnt and /media in -runtime since those are basic directories that should always exist. /net is only used by the automounter, so put that in -autofs. While here, also tag /rescue in -rescue, since nothing else installs there. Reported by: Graham Perrin PR: 289654 MFC after: 3 days Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D52622 --- etc/mtree/BSD.root.dist | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/etc/mtree/BSD.root.dist b/etc/mtree/BSD.root.dist index 5ea99ccbdb89..6ba632894ca7 100644 --- a/etc/mtree/BSD.root.dist +++ b/etc/mtree/BSD.root.dist @@ -122,15 +122,15 @@ resolvconf .. .. - media + media tags=package=runtime .. - mnt + mnt tags=package=runtime .. - net + net tags=package=autofs .. - proc mode=0555 + proc mode=0555 tags=package=runtime .. - rescue + rescue tags=package=rescue .. root mode=0750 .. From nobody Fri Sep 19 17:08:06 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cSzTy6bqZz68HcZ; Fri, 19 Sep 2025 17:08:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cSzTy5r6fz4K3S; Fri, 19 Sep 2025 17:08:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758301686; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YVcl18gY94ShgVneaxXE0MkDR/0CkWDeBM9W68l6yUA=; b=Mmq4mCxn2+BiS9Mw47dFcvm1CED+tj2G4fKt2/SSf1nQH1URpqr4OwgWILPgxHXn2zmd11 EwIlnp9ruvW2+/Qo8o+uhMiyPXPcl5bCUwtzr2p6/aD3J5sNQiRb/unmfBP7SOTViHe7lO 3q9q2/yzszaOATlz5uV2fnH1KQp7se9L/UFUpkPfx4Szv+pbTY5b+IanBDHjZJWtdgtdLo 9T6tPVXNyYqs9s1X4+K+JkixPBzDP/xz4ZmybqM9b5wQ+ncxmgEEWQs/0GauFsAFeqvZsJ kWR6WbAkzeVATeYUDvLvJecLMmyduhV1iwy3Ez4fFSZNhH2DzhlJA7Qzo0OVJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758301686; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YVcl18gY94ShgVneaxXE0MkDR/0CkWDeBM9W68l6yUA=; b=NAOdhLakzj8QPpjJT6uFWy/r2MzM/0iVLS8UyiNdfq5Huzn7oTWELHOgGAM3of7d41C8Dc yOK8aA6xGAFnB6tTHWgahilzhfca0N4tt6148pMKY8xYMmRUYqKVN5f/pm1sYYwhKUoPcK Q/E9ABbsAo2tARAL3UG34am2m6GagEFCW4OyzJM+QPmp9yVweGZz4mmIuYsxpDAwxSp+kd 7sGkn4WGndUfEN1dtGkqrC2fNG1aGWDkn6QXzvoDllNV5RiWbLS6eG5w2kt6dzLjpky//2 Q00qL8zk198mlPKLU0+QBUDJhRwSX+JP3g+9fI2kplihd3KNusd6Yo6WIH5VVA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758301686; a=rsa-sha256; cv=none; b=dT764pQd2CaYHyi9d8RTslUhu1vmQmV4hfQuFeptRZVdnCYm8olEshI4kSp7ruB53JvQiS R1YCMHSQBo+aSN8Gk6isQ/zPyPYGPio8I9IrYxKLlFwNBjcRKiUHUzKRO6u+ID19Z/NTdZ /EH37As3FKKrA3ilZ9yVBsu/TzGgBO49Sk5AQ0CNsDL+1etwHRixV05KXx5YuBNPmieFVo HxE/1rD1mFjGUnFFp5LojE8tYMZnLpuBKekKILUbjgp+zaknOqlMyX6xlw/qhUujdGQHvX BTghUIZ2qFA0H59dFh6OgezDeRW6FnmxosfJiIKlYVHaMogmudIN1uHliBt/JA== 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 4cSzTy5Cktz15QJ; Fri, 19 Sep 2025 17:08:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58JH86sT052294; Fri, 19 Sep 2025 17:08:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58JH86mh052291; Fri, 19 Sep 2025 17:08:06 GMT (envelope-from git) Date: Fri, 19 Sep 2025 17:08:06 GMT Message-Id: <202509191708.58JH86mh052291@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Colin Percival Subject: git: e87b75a8bfc8 - main - pkgbootstrap: Gate building from ports List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e87b75a8bfc8fb7fda8225e55255d9ad99cdefb2 Auto-Submitted: auto-generated The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=e87b75a8bfc8fb7fda8225e55255d9ad99cdefb2 commit e87b75a8bfc8fb7fda8225e55255d9ad99cdefb2 Author: Colin Percival AuthorDate: 2025-09-19 16:46:21 +0000 Commit: Colin Percival CommitDate: 2025-09-19 17:07:33 +0000 pkgbootstrap: Gate building from ports In release builds we want to build pkg from the ports tree for reasons mentioned in a previous commit; but non-release pkgbase builds may be just fine with installing pkg from pkg.freebsd.org. Gate it behind BOOTSTRAP_PKG_FROM_PORTS rather than building form ports any time we have a ports tree available. While I'm here, make the pkgbase-repo target in release/Makefile create the temporary directories we need for building. Reviewed by: ivy MFC after: 6 hours Sponsored by: https://www.patreon.com/cperciva Fixes: 2c06b824436d ("pkgbootstrap: Build pkg if PORTSDIR exists") --- Makefile.inc1 | 2 +- release/Makefile | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index 65149beb9eb6..6744a25965c6 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -1992,7 +1992,7 @@ PKG_ABI!= ${PKG_CMD} -o ABI_FILE=${PKG_ABI_FILE} config ABI _pkgbootstrap: .PHONY .if make(*package*) && !exists(${LOCALBASE}/sbin/pkg) -.if exists(${PORTSDIR}/ports-mgmt/pkg/Makefile) +.if defined(BOOTSTRAP_PKG_FROM_PORTS) env - UNAME_r=${UNAME_r} PATH=$$PATH \ make -C ${PORTSDIR}/ports-mgmt/pkg \ I_DONT_CARE_IF_MY_BUILDS_TARGET_THE_WRONG_RELEASE=1 \ diff --git a/release/Makefile b/release/Makefile index 40eea0e24a70..b4da9c68eca1 100644 --- a/release/Makefile +++ b/release/Makefile @@ -195,8 +195,9 @@ PKG_ABI= $$(${PKG_CMD} -o ABI_FILE=${.TARGET}/usr/bin/uname config ABI) pkgbase-repo: mkdir -p pkgbase-repo + mkdir -p /tmp/ports /tmp/distfiles ( ${IMAKE} -C ${WORLDDIR} packages REPODIR=${.OBJDIR}/pkgbase-repo \ - INCLUDE_PKG_IN_PKGBASE_REPO=YES ) + INCLUDE_PKG_IN_PKGBASE_REPO=YES BOOTSTRAP_PKG_FROM_PORTS=YES ) disc1: ${PKGBASE_REPO} # Install system From nobody Fri Sep 19 17:11:56 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cSzZN1zmWz68HpM; Fri, 19 Sep 2025 17:11:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cSzZN1LSKz4Kh3; Fri, 19 Sep 2025 17:11:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758301916; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=o1hZEbmom2reifomCybz/U0Ygs3ps8gJnJcR63bDN80=; b=IKynQS2fZVezytxcG2tK4xhkpVPGgkfvE/No7aexL6kX/dwfYxUxVzqS+nsSsR19XBe4e/ r7xpdIBjg7gyqOM3MvrJal2abF5B0YJ17Qxs4kBtjkg+Wxrcbk3kovK1XHB68AkPMITWwx sh/tjuTem5GP3Gz7OzLaRJJE0edgNnJpfrzEMXuXaNapL4gYXoKFy5ymA75hKmXlgVqg3w CuG0qY3Dq4IV8aONjzEM+bLAIerJ+wXkCmG99UC9Vh0z6C3XXgYIE/SbFqVNlcDqAtGac/ m7GG69AkYPyeQJeVwJby+pGgm+nXW+8M7pZCV8nBAi8nGqr8hFaw+/g4q/45Ag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758301916; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=o1hZEbmom2reifomCybz/U0Ygs3ps8gJnJcR63bDN80=; b=SJEE6hvaDvLQSrwckfDsbgRc/6fByDYya1vGd7sUSDZHwfpC1qyJaSePFTSjnEFn5QFLoV /w/lTxYZBbIgEWkZgWztahSjwCj40PNlkq+IijeoDCCbx5fvU454df5Zpbvx/PL/v0N2d5 l/YUUUJmEXzVFE3IDjtYNeHLYFQRs6pzuHFz3DB7NZuUpEVCGyyU5T2Kjl9/G1hGO4bKJd n2CquZkim+ykpxdL/PyGcVMb7JivuZuqOdq6y01ZfOB0Ye1ZAykXnUNSxor+gyxYFinhHW YhxEfj4M6/J1IiXpcR1kS5aRjDgCr6z1Xte90skxSpkcawxKZ2e+p4QhguuJFg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758301916; a=rsa-sha256; cv=none; b=OIDX7qEEiDCYJI41BY+I8xN6V4LWLY7O9LnSvseoTDbPs3BINdpuJGB8Z8xVYO8U48DA4d Zs1v3vvlTfuLJVIybO6T10nbciQlUIbcodDaT4YCwesAELLhUL4LVme/tOG775rc5A0Fkt SygMK8XC6p0PjVB/Y9QnBs1NeKV+XVvauMm5d3FTQHhGFm6yXzM1m/7iYTZcxFvwqEG/fK srIFiU8hR5JWjaBjQDHWHHsceGjhW7S8k3piAMkVO3eDflahbuLoiBk0+OPY21gvMImL3Y k0ZXaki81AVS0iKuFYKjClcb6Rj9DfF4LK2p3dye4lefxQxFr3b7kqUVcX+9qw== 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 4cSzZN0hjpz15Ym; Fri, 19 Sep 2025 17:11:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58JHBu6J064276; Fri, 19 Sep 2025 17:11:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58JHBuBS064273; Fri, 19 Sep 2025 17:11:56 GMT (envelope-from git) Date: Fri, 19 Sep 2025 17:11:56 GMT Message-Id: <202509191711.58JHBuBS064273@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 932e404f12c1 - main - Revert "zfs readdir: if there were no dirents to copy out, return EINVAL same as UFS" List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 932e404f12c172e3d4ec47dedee02da400ef8f92 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=932e404f12c172e3d4ec47dedee02da400ef8f92 commit 932e404f12c172e3d4ec47dedee02da400ef8f92 Author: Konstantin Belousov AuthorDate: 2025-09-19 17:05:08 +0000 Commit: Konstantin Belousov CommitDate: 2025-09-19 17:11:50 +0000 Revert "zfs readdir: if there were no dirents to copy out, return EINVAL same as UFS" This reverts commit 9a3edc8d5dbcb896179cfa7867f961184e146a09. Apparently returning EINVAL is more aggressive than UFS does it, and this causes compatibility issues with apps that actually trigger the behavior. PR: 289485, 289678 Sponsored by: The FreeBSD Foundation MFC after: 3 days --- sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vnops_os.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vnops_os.c b/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vnops_os.c index 8dce97baba66..411225786089 100644 --- a/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vnops_os.c +++ b/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vnops_os.c @@ -1698,7 +1698,6 @@ zfs_readdir(vnode_t *vp, zfs_uio_t *uio, cred_t *cr, int *eofp, objset_t *os; caddr_t outbuf; size_t bufsize; - ssize_t orig_resid; zap_cursor_t zc; zap_attribute_t *zap; uint_t bytes_wanted; @@ -1747,7 +1746,6 @@ zfs_readdir(vnode_t *vp, zfs_uio_t *uio, cred_t *cr, int *eofp, error = 0; os = zfsvfs->z_os; offset = zfs_uio_offset(uio); - orig_resid = zfs_uio_resid(uio); prefetch = zp->z_zn_prefetch; zap = zap_attribute_long_alloc(); @@ -1927,7 +1925,7 @@ update: kmem_free(outbuf, bufsize); if (error == ENOENT) - error = orig_resid == zfs_uio_resid(uio) ? EINVAL : 0; + error = 0; ZFS_ACCESSTIME_STAMP(zfsvfs, zp); From nobody Fri Sep 19 17:11:57 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cSzZP4YxTz68Hrr; Fri, 19 Sep 2025 17:11: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 4cSzZP2Vskz4Kkf; Fri, 19 Sep 2025 17:11:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758301917; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=a7HXgSRcv0WeV9GPXfWYPnb7m4NsxKmC98gVRI+mmK8=; b=MCpRZNibkUIUs1ICIMHcpvhJPhx7XxWYp/0uz6eCambFtL7tUyxk7wXiN0U+cJ2P2n8J06 LsnFC3G7ai/KMpxH9SDaqVgMJKpZroI9E1NG3nFP7pNIzdmjI98COQGg9tp5TDqDu+B5fI cMBX7jhxaItbyvkUeBt/jEpOQNnIfbBkWjFUOOLhKxtKP3e9h77tYH9LECVs6wy2M7bN3L N1Mar6VYyN4Nw/fbmYa4k1Ip1lYgs/P7adpq0um3jOxxOq9miVtmSS8I2Z79AjfSRZUYo/ LDy+ZkFsfSg/VnEb2RKuNasMEv8fn4blG6MAAWKd4UmWYz1LffB4AiR5uUfQFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758301917; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=a7HXgSRcv0WeV9GPXfWYPnb7m4NsxKmC98gVRI+mmK8=; b=Da1TkULb1yXOfV9XMQvLNZb414j8zrVoba6QzNR6PNVgjGPMVYgAS7nO28nhAilImQBI+7 kFrmL+9VvbGuSN/HUKv0lMDDGM/RffmO+mVTEru1CQH0zFZo1gw/ny+mSpSCjxHbh6ts9T Gd31epBPeyKMRPPLQBk+6gptf5tto8urhD9UY/swMh8slQdYmLaoYlS+quiOhhCu6BQqgt bVdJ2rqfD8Vohto1VDKI9mYycUydIxpTLSbsr0zPJUR9fWc1kemPcijjGVFpAuTrj1yVgv UFASYsfyiQcTRfkzOwl4TLIuy5Wxsb9yiZvEDbuaynVcMOw+m18Jb/lYdrQSpw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758301917; a=rsa-sha256; cv=none; b=liiZJ+GzcE2NvxJHSGKg0zsbR0CrkWmsgJncD5nVLpQ9EGzRQhZDFzAVrRFZj6STH4kD5W aEvhn40Ao5UqBxCLx3B99f2wsaA5Sspam2h72yAp8hZEsDjZf1fJ7s0+SaYTR3SNJUJmyf JvBeyGE+vpshgCWnbKXpVFiXdfLdZDGUIo/XsljBW7X4zRKlV+A/ChX7o8zIp76NgX1hTi i7U2fFbS+tt5jJhUMDIPs5L+8z22grjoVFd661ou52LrxBHgvb/sTyGSs9b2Jy5mEAZ4XP RYWrBRH+qTvfvM9ib3jaM/3zteu4JekqlSLy9B8kjH6wL9FsDuDFGvoDTILxrA== 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 4cSzZP23MZz15vG; Fri, 19 Sep 2025 17:11: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 58JHBvSW064318; Fri, 19 Sep 2025 17: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 58JHBvIR064315; Fri, 19 Sep 2025 17:11:57 GMT (envelope-from git) Date: Fri, 19 Sep 2025 17:11:57 GMT Message-Id: <202509191711.58JHBvIR064315@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 72924ce99c7f - main - Revert "zfsctl_root_readdir: if there were no dirents to copy out, return EINVAL" List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 72924ce99c7f177db486bd2764a76bcf25892a17 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=72924ce99c7f177db486bd2764a76bcf25892a17 commit 72924ce99c7f177db486bd2764a76bcf25892a17 Author: Konstantin Belousov AuthorDate: 2025-09-19 17:06:54 +0000 Commit: Konstantin Belousov CommitDate: 2025-09-19 17:11:50 +0000 Revert "zfsctl_root_readdir: if there were no dirents to copy out, return EINVAL" This reverts commit cead6157cc1b748df29b32072f492d4f6afae65a. Same as 9a3edc8d5dbcb896179cfa7867f961184e146a09 Sponsored by: The FreeBSD Foundation MFC after: 3 days --- .../openzfs/module/os/freebsd/zfs/zfs_ctldir.c | 40 ++++++++-------------- 1 file changed, 14 insertions(+), 26 deletions(-) diff --git a/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_ctldir.c b/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_ctldir.c index a222c5de4a2a..4de48e013ec4 100644 --- a/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_ctldir.c +++ b/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_ctldir.c @@ -674,7 +674,6 @@ zfsctl_root_readdir(struct vop_readdir_args *ap) zfs_uio_t uio; int *eofp = ap->a_eofflag; off_t dots_offset; - ssize_t orig_resid; int error; zfs_uio_init(&uio, ap->a_uio); @@ -694,11 +693,13 @@ zfsctl_root_readdir(struct vop_readdir_args *ap) return (0); } - orig_resid = zfs_uio_resid(&uio); error = sfs_readdir_common(zfsvfs->z_root, ZFSCTL_INO_ROOT, ap, &uio, &dots_offset); - if (error != 0) - goto err; + if (error != 0) { + if (error == ENAMETOOLONG) /* ran out of destination space */ + error = 0; + return (error); + } if (zfs_uio_offset(&uio) != dots_offset) return (SET_ERROR(EINVAL)); @@ -711,11 +712,8 @@ zfsctl_root_readdir(struct vop_readdir_args *ap) entry.d_reclen = sizeof (entry); error = vfs_read_dirent(ap, &entry, zfs_uio_offset(&uio)); if (error != 0) { -err: - if (error == ENAMETOOLONG) { - error = orig_resid == zfs_uio_resid(&uio) ? - EINVAL : 0; - } + if (error == ENAMETOOLONG) + error = 0; return (SET_ERROR(error)); } if (eofp != NULL) @@ -1060,21 +1058,17 @@ zfsctl_snapdir_readdir(struct vop_readdir_args *ap) zfs_uio_t uio; int *eofp = ap->a_eofflag; off_t dots_offset; - ssize_t orig_resid; int error; zfs_uio_init(&uio, ap->a_uio); - orig_resid = zfs_uio_resid(&uio); ASSERT3S(vp->v_type, ==, VDIR); error = sfs_readdir_common(ZFSCTL_INO_ROOT, ZFSCTL_INO_SNAPDIR, ap, &uio, &dots_offset); if (error != 0) { - if (error == ENAMETOOLONG) { /* ran out of destination space */ - error = orig_resid == zfs_uio_resid(&uio) ? - EINVAL : 0; - } + if (error == ENAMETOOLONG) /* ran out of destination space */ + error = 0; return (error); } @@ -1092,13 +1086,9 @@ zfsctl_snapdir_readdir(struct vop_readdir_args *ap) dsl_pool_config_exit(dmu_objset_pool(zfsvfs->z_os), FTAG); if (error != 0) { if (error == ENOENT) { - if (orig_resid == zfs_uio_resid(&uio)) { - error = EINVAL; - } else { - error = 0; - if (eofp != NULL) - *eofp = 1; - } + if (eofp != NULL) + *eofp = 1; + error = 0; } zfs_exit(zfsvfs, FTAG); return (error); @@ -1111,10 +1101,8 @@ zfsctl_snapdir_readdir(struct vop_readdir_args *ap) entry.d_reclen = sizeof (entry); error = vfs_read_dirent(ap, &entry, zfs_uio_offset(&uio)); if (error != 0) { - if (error == ENAMETOOLONG) { - error = orig_resid == zfs_uio_resid(&uio) ? - EINVAL : 0; - } + if (error == ENAMETOOLONG) + error = 0; zfs_exit(zfsvfs, FTAG); return (SET_ERROR(error)); } From nobody Fri Sep 19 17:25:11 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cSzsn1C32z68K2v for ; Fri, 19 Sep 2025 17:25:17 +0000 (UTC) (envelope-from 0100019963022dbc-3731daff-7d83-4edc-8c6f-b837230375f5-000000@amazonses.com) Received: from a8-56.smtp-out.amazonses.com (a8-56.smtp-out.amazonses.com [54.240.8.56]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4cSzsn0TXyz4MLP for ; Fri, 19 Sep 2025 17:25:17 +0000 (UTC) (envelope-from 0100019963022dbc-3731daff-7d83-4edc-8c6f-b837230375f5-000000@amazonses.com) Authentication-Results: mx1.freebsd.org; none DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=vnqrkfnvu6csdl6mwgk5t6ix3nnepx57; d=tarsnap.com; t=1758302711; h=Message-ID:Date:MIME-Version:Subject:To:References:From:In-Reply-To:Content-Type:Content-Transfer-Encoding; bh=6Z9XkkHgY3gc4U3JvuEa0i+cScWYa0CpTKFdTaDE6Qw=; b=IbVqPAdJPeESPrSFIWzoSPpBvykKAM1lg+uNASap76ndWqnxousACS2q6MZ6AaBd 3IeblIo9rqIU2U61YB4+uvfHFU9qyG5Py4T8uWTxduw24PDsinW/xWv+hIOs4LXoWjr b10LL8htazpAUt7m3pWI/Gx5mhoWmGCl9oDlAGc0= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=6gbrjpgwjskckoa6a5zn6fwqkn67xbtw; d=amazonses.com; t=1758302711; h=Message-ID:Date:MIME-Version:Subject:To:References:From:In-Reply-To:Content-Type:Content-Transfer-Encoding:Feedback-ID; bh=6Z9XkkHgY3gc4U3JvuEa0i+cScWYa0CpTKFdTaDE6Qw=; b=mmZnd6hG10yq+pKPzB63uhFfAwIFUZ80asIzvwYqwGW6gapjkFfg4SZMSJDRTijZ PIoMzTaNEYwO2XRs69CTPLJeAvOcVH1LvLx9bg+H/fhD8hoFDrnmdxUM9Q0umBolwf/ N3vKv6cWcHCbUT81WFWnvgPrTXNj9yMPgFNJlBOQ= Message-ID: <0100019963022dbc-3731daff-7d83-4edc-8c6f-b837230375f5-000000@email.amazonses.com> Date: Fri, 19 Sep 2025 17:25:11 +0000 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 94a0f9f63e16 - main - kern/vfs_vnops.c: generalize the lock primitive for file foffset To: Konstantin Belousov , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202509191419.58JEJrSZ031832@gitrepo.freebsd.org> Content-Language: en-US From: Colin Percival Autocrypt: addr=cperciva@tarsnap.com; keydata= xsFNBGWMSrYBEACdWRqDn3B3SKO7IG0/fGHYtfs26f3Q5QeAcasy1fQLniwGQWn5rlILhbCD K/jdNoDm5Zxq20eqyffoDNObCjnHgg4tGANdi+RmDy+7CDpE789H8dss9y7Pt5DlGGAXQQnt hxush3EYS/Ctprd9UUL/lzOOLOU1aNtzB84tNrJBtcJmL7OYHfyTSNFxvedqJrrasejIQOLI t/DQ89BPzz+vsKHz7FJPXh3fsVkzLA00DJYcfkgxyABfJNA7U6yMwd4DVSdx/SsvfIDMVXnu UXCXswo106WPZbYGlZPpq0wW6iibtTerJix+8AeuwXvl9O1p8yESK4ErkIxCnmghTSz+pdzj z/6xBRkdDM9VdZ0r+CzsaNXMpDOzFuKyjaiYBdgCLljbDnXIHFcqXenrZ7Xwkm09g/M4uVSh pIUG2RYa6tsHSQoGCp3f2RZv1znfViKQFbbL83QjtPA20AhseZSYbHp1FPhXyy9J0wkGL16L e99g6gdGeIRE82BZjBjKGDkoyDPq+oDRSFl8NtzmIKy+cfz00nViqcTF4bREXEawFGhlpO0X O9q8mijI9iFB6zaPBiSdJGBL5ML5qLTNCl8Zlf4m1TBvmRTqF/lzMHVXHidDoUhpSh/y3AFZ 1KrYc27ztJQywDJPJPWPbtY8YhFLFs377gfP8WldsZjzp8nvoQARAQABzSVDb2xpbiBQZXJj aXZhbCA8Y3BlcmNpdmFAdGFyc25hcC5jb20+wsGRBBMBCAA7FiEEglY7hNBiDtwN+4ZBOJfy 4i5lrT8FAmWMSyYCGwMICwkNCAwHCwMFFQoJCAsFFgMCAQACHgUCF4AACgkQOJfy4i5lrT+i Yg/+PYyJNoFuygtV5t/skcjYmvEC93mnazEvh+x99vGYZnGKeJ8NDOF4QCUzeHquOWxDi8Zl reXyswKcrIquPxxX6+YyGe97VbvLnez3ksfzOYRj1F4qV0Rq8ZNK51+bvIrbcS3SfDaRioAk D7WWwFor8y/hSwxYkfsKbtP5PRcem20JUxuC085zqWLaKv5t5n2CBzAGMjwJaQ3tM3AXVwWJ uJaHA6ot/6fntJlmkfcyCYyyr0D6b0guRj3STbZ2hNn5o2AI+f6LJJ31s2sPFjl6rs7fORf3 hFSNOHDd2HxfVBXFdQy24ROkC4orBBz2xh9GScjxxT/hbXkfufkubFubw7n0HkvHzA3UF+Qq A8JiI3n+d7ocsP0/5BQ2sZdeqPGJgHx6RkAMuW1tJ29wSvCN1qMgFwhYkpQdfvHlociQrimU fvlRfSrBEe8o7tvIuEdpvwvCZSTJqQbVoMw8UHFE7nzyCXUSab5h6PbjakCqim13ekVO2KFF TTPcz5o5jEeUY75tzbIwcDfFbT5KqNjWy06TVdM9VEJDHSfOfxHR3kSEwZ+tT2aTvL3grsUn gFwSNcj4Cl4CRFfUw8zVZY+7O7RiMlhBqykikvUurrdGKc1Scwa0yuppdA6eVvylyTWSQGrQ +uLWtV1LUKN7ZqKJWBkLPt9nS4XZWGyBvxOHYqjOwU0EZYxKtgEQANYfgbtUMVnhjxDHhWLp g5kLHK3YW0TfJKzpXqDB7NiqxHofn4OcbZnVC3MKggcbs9o1/UtsjnlsG8550PfiYkDXvPiO RJwgbGs6MGIDK797C6cnBLQ8xwBa9SL4cl5iQFnhWmt6vwnJ+an/cm5JpYves3wL7jV09qU9 57hkHXEUcl38r4FssZzVcLKPUVTa3Un+QGRTGDGe/f4ctjMaqv0ZCM+l2ixPhf/vqESrfSLv V/+T3dmtUfXjazO3SABvsHwxgGuTTYOlKoPCaebr+BRdqm0xeIShoIlhvTI8y4clchqx/Uxg UG5X2kvU13k3DS3Q8uLE4Et9x1CcZT6WGgBZSR6R0WfD0SDnzufNnRWJ0dEPA2MtJHE7+85R Vi9j/IgZV+y5Ur+bnPkjDG1s2SVciX5v9HQ0oilcBhvx0j5lGE9hhurD9F+fCvkr4KdbCknE 6Y8ce8pCNBUoB/DqibJivOzTk9K9MGB5x0De5TerIrFiaw3/mQC9nGeO9dtE7wvDJetWeoTq 4BEaCzpufNqbkpOaTQILr4V6Gp7M6v97g83TVAwZntz/q8ptwuKQPZ2JaSFLZn7oWUpYXA5s +SIODFHLn6iMoYpBQskHQjnj4lEPJadl4qj+ZKA89iDAKsniyoFXsbJe2CPbMS1yzBxKZq6K D/jpt7BOnuHr/JrXABEBAAHCwXYEGAEIACAWIQSCVjuE0GIO3A37hkE4l/LiLmWtPwUCZYxK tgIbDAAKCRA4l/LiLmWtP3jmEACQrh9gWe8F1Tkw3m6VoHKwLc5he4tX3WpQa//soPO6iGG3 S3WPruQ46NrAaAojoOcKI9UONDO5rxG0ZTX53S+lu2EO47jbcLwOCjaEpjKpDRt9ZXBQE8Xl mtBE9Bp3W9gpjB1nE3KNM1mJYgsK0QdRpwwfh4pVgGpOj8j23I6MCK+v99zEBnpgCn2GX8W/ kctRXHqWwndHysOJtRP/zrl7dDaABF1f9efUl0LL3TD3GJ9VDz+DNOin/uK2a1hiJo8QzTRk PpfUQ2ebzDsrd1i/pOWkMSkdH+rEu4AGrXWtaBwrMyrGkL6Icb6yO+P9/z0W2wlgBf3P1YRt JPgQt/Dj3yvA/UnaV/QmuVQPjl13o24UnJGsZM8XGnNdfWBKkC1Q6VXC4QT+dyBHYH9MuE9d 6oGl8pFM1+cTfEfbM62/rRoPkF1yHMsI/903VxEvuUIKfhEZAVLFyHldooNxuchntHQP9y8J 8Ou9bWYQP7MnEn+kwSwrZkjurfPkan+xQvp6dDYnj3V0GwA5pprBMaB928VIDVOv+1PNQI3t Cvk5VPv/skq+TJRMHW7bFSt8PRa91cUf1FOLIz9APDiJOzXkwxUEHGV3zPSaUhs1JYjyBeGT wDAvtLUdjOnRhEUOwlnIrztmvyciutjJoVzKEEjj5WXnHk9L9kQ1bpAjkjTONw== In-Reply-To: <202509191419.58JEJrSZ031832@gitrepo.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Feedback-ID: ::1.us-east-1.Lv9FVjaNvvR5llaqfLoOVbo2VxOELl7cjN0AOyXnPlk=:AmazonSES X-SES-Outgoing: 2025.09.19-54.240.8.56 X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4cSzsn0TXyz4MLP On 9/19/25 07:19, Konstantin Belousov wrote: > commit 94a0f9f63e164e4f3791bc7d105d6f267b4d47bc > > kern/vfs_vnops.c: generalize the lock primitive for file foffset > > + atomic_clear_16(flagsp, lock_bit | lock_wait_bit); Jenkins says this breaks powerpc64: /usr/src/sys/kern/vfs_vnops.c:852:2: error: call to undeclared function 'atomic_clear_16'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration] 852 | atomic_clear_16(flagsp, lock_bit | lock_wait_bit); | ^ /usr/src/sys/kern/vfs_vnops.c:852:2: note: did you mean 'atomic_clear_int'? -- Colin Percival FreeBSD Release Engineering Lead & EC2 platform maintainer Founder, Tarsnap | www.tarsnap.com | Online backups for the truly paranoid From nobody Fri Sep 19 18:05:28 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cT0mQ6RjJz68Lng; Fri, 19 Sep 2025 18:05:42 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4cT0mP50YSz4QGv; Fri, 19 Sep 2025 18:05:41 +0000 (UTC) (envelope-from kostikbel@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=fail reason="No valid SPF, No valid DKIM" header.from=gmail.com (policy=none); spf=softfail (mx1.freebsd.org: 2001:470:d5e7:1::1 is neither permitted nor denied by domain of kostikbel@gmail.com) smtp.mailfrom=kostikbel@gmail.com Received: from tom.home (kib@localhost [127.0.0.1] (may be forged)) by kib.kiev.ua (8.18.1/8.18.1) with ESMTP id 58JI5S3K022092; Fri, 19 Sep 2025 21:05:31 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 58JI5S3K022092 Received: (from kostik@localhost) by tom.home (8.18.1/8.18.1/Submit) id 58JI5S2V022091; Fri, 19 Sep 2025 21:05:28 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 19 Sep 2025 21:05:28 +0300 From: Konstantin Belousov To: Colin Percival Cc: Konstantin Belousov , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 94a0f9f63e16 - main - kern/vfs_vnops.c: generalize the lock primitive for file foffset Message-ID: References: <202509191419.58JEJrSZ031832@gitrepo.freebsd.org> <0100019963022db0-d88b1d01-e0f3-4ec3-9838-a7f8f66f6c1f-000000@email.amazonses.com> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0100019963022db0-d88b1d01-e0f3-4ec3-9838-a7f8f66f6c1f-000000@email.amazonses.com> X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on tom.home X-Spamd-Bar: -- X-Spamd-Result: default: False [-2.82 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.92)[-0.921]; NEURAL_HAM_MEDIUM(-0.90)[-0.901]; MIME_GOOD(-0.10)[text/plain]; DMARC_POLICY_SOFTFAIL(0.10)[gmail.com : No valid SPF, No valid DKIM,none]; MIME_TRACE(0.00)[0:+]; TO_DN_SOME(0.00)[]; ARC_NA(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US]; MISSING_XM_UA(0.00)[]; HAS_XAW(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org,dev-commits-src-main@freebsd.org]; FREEMAIL_ENVFROM(0.00)[gmail.com]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; R_DKIM_NA(0.00)[]; R_SPF_SOFTFAIL(0.00)[~all:c]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_TLS_LAST(0.00)[]; RCPT_COUNT_FIVE(0.00)[5] X-Rspamd-Queue-Id: 4cT0mP50YSz4QGv On Fri, Sep 19, 2025 at 05:25:11PM +0000, Colin Percival wrote: > On 9/19/25 07:19, Konstantin Belousov wrote: > > commit 94a0f9f63e164e4f3791bc7d105d6f267b4d47bc > > > > kern/vfs_vnops.c: generalize the lock primitive for file foffset > > > > + atomic_clear_16(flagsp, lock_bit | lock_wait_bit); > > Jenkins says this breaks powerpc64: > > /usr/src/sys/kern/vfs_vnops.c:852:2: error: call to undeclared function > 'atomic_clear_16'; ISO C99 and later do not support implicit function > declarations [-Werror,-Wimplicit-function-declaration] > 852 | atomic_clear_16(flagsp, lock_bit | lock_wait_bit); > | ^ > /usr/src/sys/kern/vfs_vnops.c:852:2: note: did you mean 'atomic_clear_int'? D52626 From nobody Fri Sep 19 19:19:32 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cT2Pd0mVtz67SSt; Fri, 19 Sep 2025 19:19: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 4cT2Pc5ZWTz3K7t; Fri, 19 Sep 2025 19:19:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758309573; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZxtuDwj0zY9roCIRNuiBf8T7BaasBrjQs01VhVBWqyE=; b=hPte5YMmKecuXIdntc5iVAc9bb00t05dm+HR5pg1KDSm2Yokdvpw959Tmb60SQyafvZ+jM YK/9RJGh8A5Yu+yt0G6PG7GWGbhacq7/nGGud5XN3oXKX11KRl9wbXvCoQYSEgShkiiFWd iRSYlqjwIM0emMnnSHv1EJiwZsQZK4MQfqTTD5mNqk8NhkODmWLIY4nJvclgGsaZS05U6h VCsTqGpbS+0EyeYLUWEEbMx3qFft67u4pVl+M1ijJ/a+5l7f32rlUtG31mMllAavV3AOus tmxZV/MdWcVRvxozmmPEe1Z9DacniU5Yl5bQfuggyg+XgBDp1I7CrGeeBjmfUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758309572; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZxtuDwj0zY9roCIRNuiBf8T7BaasBrjQs01VhVBWqyE=; b=bXsnS2CASvD2tOKQYFDRW+l/gDxbRlIQ7cBidbi5Nxa7XmbSGCSwuD3wRVf5L9NjAQZ6Ab UDA6lrQp69k6hY6eekjOTOYreMGR1LL90QsWqPVaH9BblOhGkQFAt1BQtcZfoOfrmmO9Zv AVOac8iwpXF9p/kFc0r8qwKFckP29Kbxddoy4GOZrJQOkIh8DSPNsSCj94f1txEw5fq2Gv F6gpzDXMZueUWJ+8g9vBeBIBw6IP6f0ys/C1Y2tX6VIMIJF3achDp37Wd4dl4eTJ+L53ag /1O/DQSPK5IZDkdvYP779i87+tui87q3gciFaydSANfU5l1iPkzUzpux4c2iww== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758309572; a=rsa-sha256; cv=none; b=OfeUNcXvgxcfGiIVKb0egoyKMY0ab61iXlY8lE8eT0Li0CHh92/s80z0NPwJf0v9Wi9CCp ud/oKsleMoVjZOrf1a23iaAlZpWzTN7zLyIg0f3mqT33tsSWEgG9z+E8SzMyvwXbdhRRFO ADdtO5bgOsyJXQLFxG2Bz76ShxQYr4pjGBnjv7PlZL9x/+7qO7TZ3VdXJZZ8Bm/MhLZqIU VG1iYIDwGkbWOJtpbRwYe15nV1xnp/GMiM8fZnwjkeWrWJLr4qoK48TuxdImtrkcum8c+D yUix1y1Ja4yypBfDNfZxftrJiWb37zdYUlutqDWJQUKaDwUo53gW73oPmDTFCQ== 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 4cT2Pc54cnz197J; Fri, 19 Sep 2025 19:19: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 58JJJWuW097227; Fri, 19 Sep 2025 19:19:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58JJJWRf097224; Fri, 19 Sep 2025 19:19:32 GMT (envelope-from git) Date: Fri, 19 Sep 2025 19:19:32 GMT Message-Id: <202509191919.58JJJWRf097224@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Zhenlei Huang Subject: git: 5017fdb72881 - main - ifconfig: Fix the display of the IFCAP_MEXTPG capability without netlink List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5017fdb728811fd3e15d7151524378f49a49aee1 Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=5017fdb728811fd3e15d7151524378f49a49aee1 commit 5017fdb728811fd3e15d7151524378f49a49aee1 Author: Zhenlei Huang AuthorDate: 2025-09-19 19:18:27 +0000 Commit: Zhenlei Huang CommitDate: 2025-09-19 19:18:27 +0000 ifconfig: Fix the display of the IFCAP_MEXTPG capability without netlink Historically this capability is IFCAP_NOMAP but it was renamed to IFCAP_MEXTPG. Catch up with the change 3f43ada98c89. PR: 289545 Fixes: 3f43ada98c89 Catch up with 6edfd179c86: mechanically rename IFCAP_NOMAP to IFCAP_MEXTPG MFC after: 3 days --- sbin/ifconfig/ifconfig.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/ifconfig/ifconfig.c b/sbin/ifconfig/ifconfig.c index c323a26ec1a8..41d2f4603983 100644 --- a/sbin/ifconfig/ifconfig.c +++ b/sbin/ifconfig/ifconfig.c @@ -1665,7 +1665,7 @@ static const char *IFCAPBITS[] = { [22] = "TXCSUM_IPV6", [24] = "TXRTLMT", [25] = "HWRXTSTMP", - [26] = "NOMAP", + [26] = "MEXTPG", [27] = "TXTLS4", [28] = "TXTLS6", [29] = "VXLAN_HWCSUM", From nobody Fri Sep 19 19:23:02 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cT2Tf2lD3z67ShW; Fri, 19 Sep 2025 19:23: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 4cT2Tf21RYz3LDp; Fri, 19 Sep 2025 19:23:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758309782; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OvEEJkDSir0I5gbJXrIoWJ9t196dh6L8FPfq54q9s1o=; b=D4pIm+lTUM6V0Aqt48Q9IfulnP/3MqgN6YDiIN+acCRIXNgE+xJ8E2lVALRDuVeZrLT2A+ pEgJ3xwqniQnjqO0SgNyCMdrloJmTwHzPPD54Oq+6CJofzrhYikvgV9Ssjq8o49mJwwfNX TqQsyXqtzq7MjQ21bQpc0FbPFFWcDmqWMeGZPTBnEwsXVu0ZFtZd9G0BqT3Mi9yn/0NORe gdgJ2xttTeW1mOe70TidmNS3+5+DiAqNpyBPkz681PqxSSjEvaGzWj5YEDGgsmtfCQcIXJ QW66msgH4u6KhNf01c1BL4vC2aMn+VXLBqJUqvZvK5a116aI39dfGM0f4uA+8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758309782; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OvEEJkDSir0I5gbJXrIoWJ9t196dh6L8FPfq54q9s1o=; b=Rwbph1vjL3qcqnL7vbwm2Gb9VK09Hp+H58UTgvwV+Sr2CgPOM234LJozQOiH4Ep/ikTCm3 4dqQpxfI6DhycqeqlbZ5XnWqf+TDfvgr3CqqUwQSQiAvK7SqHBtAY2WN+iU1ST2wyFIrJt IA5s1B4t4t8/gh3elzekQGgmD4XhO+T+MUMFzKyF0zQSjtOcPT819ip2DAXD0vCIeZgKcZ wx3gYpdph1CcGs36i9oEyIAtk1eUs5aOPM/SlUkeogMbYdex7Ct8sGaEamP9N5AoAc5++5 8Aj6kTQJi6ta9jJSMttVwDVhq1xN42owFGANPgK5DcUbgj1s23AloHictz5+WQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758309782; a=rsa-sha256; cv=none; b=Xex6R5DsDenxaa78Zl5KSEkEjKkZit8iyGBO7L0zYy1WiCFehTUfHYzjhAzyI85u8SwOJX b9eBk4kNLVFU3OmEnL0C+pptQ7jKy0lw+BAeaBxZ4zUHjuXe/MQcNhLDeluo8gT+bkKHHu 8qz8SOM+Gmo3vq8fiYvrF7OJF1zQ/wSTgJzCnPuSt9yIum19g23+tYG3tvYEa1sD1XMUve nCQBkOEAW3D0hjz97FMtJrF6PKweP52Shw4l8iCj09ltQAqrXBO9qPzJekAcIjBZmWgGgL T98ZBDCo0lxEsVCCC4pNgxpZH+d14Zu8AcDmKX/8sA91hrDsiBumr+rSjPY54A== 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 4cT2Tf1SsWz18rn; Fri, 19 Sep 2025 19:23: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 58JJN2mq013833; Fri, 19 Sep 2025 19:23:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58JJN250013830; Fri, 19 Sep 2025 19:23:02 GMT (envelope-from git) Date: Fri, 19 Sep 2025 19:23:02 GMT Message-Id: <202509191923.58JJN250013830@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Colin Percival Subject: git: 8f268240ee60 - main - Revert "fcntl(F_SETFL): only allow one thread to perform F_SETFL" List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8f268240ee60b55f29910c89f546dbecf412c94c Auto-Submitted: auto-generated The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=8f268240ee60b55f29910c89f546dbecf412c94c commit 8f268240ee60b55f29910c89f546dbecf412c94c Author: Colin Percival AuthorDate: 2025-09-19 19:14:19 +0000 Commit: Colin Percival CommitDate: 2025-09-19 19:22:44 +0000 Revert "fcntl(F_SETFL): only allow one thread to perform F_SETFL" Temporarily back this out to fix the tree while I try 16.0 snapshot builds. It will come back once D52626 lands. This reverts commit 40a42785dbba93cc5196178fc49d340c1a89cabe. Discussed with: kib --- sys/kern/kern_descrip.c | 3 --- sys/kern/vfs_vnops.c | 36 ------------------------------------ sys/sys/file.h | 4 ---- 3 files changed, 43 deletions(-) diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c index 19118eb7f275..2a833d2eafbe 100644 --- a/sys/kern/kern_descrip.c +++ b/sys/kern/kern_descrip.c @@ -658,7 +658,6 @@ kern_fcntl(struct thread *td, int fd, int cmd, intptr_t arg) error = EBADF; break; } - fsetfl_lock(fp); do { tmp = flg = fp->f_flag; tmp &= ~FCNTLFLAGS; @@ -678,7 +677,6 @@ kern_fcntl(struct thread *td, int fd, int cmd, intptr_t arg) if (error != 0) goto revert_nonblock; } - fsetfl_unlock(fp); fdrop(fp, td); break; revert_nonblock: @@ -693,7 +691,6 @@ revert_flags: tmp |= got_cleared; tmp &= ~got_set; } while (atomic_cmpset_int(&fp->f_flag, flg, tmp) == 0); - fsetfl_unlock(fp); fdrop(fp, td); break; diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c index 3d4567b6ab1e..f81c2033d95e 100644 --- a/sys/kern/vfs_vnops.c +++ b/sys/kern/vfs_vnops.c @@ -896,18 +896,6 @@ foffset_read(struct file *fp) return (atomic_load_long(&fp->f_offset)); } -void -fsetfl_lock(struct file *fp) -{ - file_v_lock(fp, FILE_V_SETFL_LOCKED, FILE_V_SETFL_LOCK_WAITING); -} - -void -fsetfl_unlock(struct file *fp) -{ - file_v_unlock(fp, FILE_V_SETFL_LOCKED, FILE_V_SETFL_LOCK_WAITING); -} - #else /* OFF_MAX <= LONG_MAX */ static void @@ -983,30 +971,6 @@ foffset_read(struct file *fp) return (foffset_lock(fp, FOF_NOLOCK)); } - -void -fsetfl_lock(struct file *fp) -{ - struct mtx *mtxp; - - mtxp = mtx_pool_find(mtxpool_sleep, fp); - mtx_lock(mtxp); - file_v_lock_mtxp(fp, mtxp, FILE_V_SETFL_LOCKED, - FILE_V_SETFL_LOCK_WAITING); - mtx_unlock(mtxp); -} - -void -fsetfl_unlock(struct file *fp) -{ - struct mtx *mtxp; - - mtxp = mtx_pool_find(mtxpool_sleep, fp); - mtx_lock(mtxp); - file_v_unlock_mtxp(fp, mtxp, FILE_V_SETFL_LOCKED, - FILE_V_SETFL_LOCK_WAITING); - mtx_unlock(mtxp); -} #endif void diff --git a/sys/sys/file.h b/sys/sys/file.h index c44fd0f28929..9a072121e25f 100644 --- a/sys/sys/file.h +++ b/sys/sys/file.h @@ -93,8 +93,6 @@ void foffset_lock_pair(struct file *fp1, off_t *off1p, struct file *fp2, void foffset_lock_uio(struct file *fp, struct uio *uio, int flags); void foffset_unlock(struct file *fp, off_t val, int flags); void foffset_unlock_uio(struct file *fp, struct uio *uio, int flags); -void fsetfl_lock(struct file *fp); -void fsetfl_unlock(struct file *fp); static inline off_t foffset_get(struct file *fp) @@ -224,8 +222,6 @@ struct file { #define FILE_V_FOFFSET_LOCKED 0x0001 #define FILE_V_FOFFSET_LOCK_WAITING 0x0002 -#define FILE_V_SETFL_LOCKED 0x0004 -#define FILE_V_SETFL_LOCK_WAITING 0x0008 #endif /* __BSD_VISIBLE */ #endif /* _KERNEL || _WANT_FILE */ From nobody Fri Sep 19 19:23:03 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cT2Tg39wFz67SQ7; Fri, 19 Sep 2025 19:23:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cT2Tg2TZ1z3LhS; Fri, 19 Sep 2025 19:23:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758309783; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PD0RaN7cXKaxg9zBJhhuHvTPyGcAf4GeqrMpdGi4VkQ=; b=JYTfihmvSh21qFI3qHqVeY2tKeSiikwE8d4OKBXJU62x/Fn0HZXfdXJE4rB0rEQ7RXkWtP nKguWIM8aUACTeBKWJdqdFI6LzFeqMEph9S02DF+R9pG18t1A6lTyE5Efxi4E1sMv/VQH1 zMdDPoXWouG6mbmptrZI5qEuZS+jkryRheKhbhb9zkEqNGcOrTnWg6PhN0KEaREhfdkFVx v3bFBdqVK1rQA6j6U/vypiOl/y0IcOD61PO2dyEDI25VaLpaFK4pHxOBW1ql3KT8xHW7yW Iy9aBQ0aXgjyXzFde+eaLuik42Hr0PPQuo1yLr7TdfK6RtXAbTwR6mWtHwrH2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758309783; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PD0RaN7cXKaxg9zBJhhuHvTPyGcAf4GeqrMpdGi4VkQ=; b=ypBP44ntEqC4TDaEGUzJDeXhvWgFR+dFrVUJD6RB521g3dVUmKgOLk5eRrpnAXz4fC1e9+ vUin2qsTrUIBRuzY+yUzXNCd7ml6C5Nl4/tROKPzfybB90OqHudPbmVnCwVRdOiR8q1++O r9zYXv5BWxYWH6aDfxol7yadc7kwrrnHnym9F2y0cQdye3g7vi/TljVlBGZXFL+1Fud0TS T3NQaOiNezHI42PWgcxiFZmk973PIjqfCBTmWtlqex7ROSnT44PpWY9sznUqEowcNPTKxx 4Gn83JXy553bvWUtnzhCk4o1MGKaLkbWEqKj9bwEGhwyFe6uFhLQpd88cPu+zA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758309783; a=rsa-sha256; cv=none; b=iD+lfE0WxhbmJlhbRohAVXVxeRt7rcuYPngTaTEHhJ2zUnG6rFxkI5ZbHd5Z85w2Lv3c0d kXel8c8/29nUOHKxJq/3hiGKi8uwd8/qjCrFsQzFr4nF/Um5XGVicRPRrhWp4SR2iXfOjd DvaEF9h250QJhHZsfDoCf0wX9I9gRTbZJbR23TlueN3WkOwau015l9fhl99NdKwuhXChDb DcjQB5yZR+VBwLnGSCzfeT/RhdArtiU27i8WCgdHWZXAOgPK5ZkNJrNriI7AeGMrsKCP0w WnWVJHpDUO927bj88pL9YeFPTYlPOQ9WhiFHG3ujvasNehtKwxDo5cTjcnNRpg== 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 4cT2Tg21JTz19Pb; Fri, 19 Sep 2025 19:23:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58JJN3uW013875; Fri, 19 Sep 2025 19:23:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58JJN30J013872; Fri, 19 Sep 2025 19:23:03 GMT (envelope-from git) Date: Fri, 19 Sep 2025 19:23:03 GMT Message-Id: <202509191923.58JJN30J013872@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Colin Percival Subject: git: 1f2a65222b88 - main - Revert "kern/vfs_vnops.c: generalize the lock primitive for file foffset" List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1f2a65222b8808dfa0466d6cad165116431dd6a9 Auto-Submitted: auto-generated The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=1f2a65222b8808dfa0466d6cad165116431dd6a9 commit 1f2a65222b8808dfa0466d6cad165116431dd6a9 Author: Colin Percival AuthorDate: 2025-09-19 19:15:31 +0000 Commit: Colin Percival CommitDate: 2025-09-19 19:22:44 +0000 Revert "kern/vfs_vnops.c: generalize the lock primitive for file foffset" Temporarily back this out to fix the tree while I try 16.0 snapshot builds. It will come back once D52626 lands. This reverts commit 94a0f9f63e164e4f3791bc7d105d6f267b4d47bc. Discussed with: kib --- sys/kern/vfs_vnops.c | 148 ++++++++++++++++++++------------------------------- sys/sys/file.h | 6 +-- 2 files changed, 60 insertions(+), 94 deletions(-) diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c index f81c2033d95e..a4f41192f684 100644 --- a/sys/kern/vfs_vnops.c +++ b/sys/kern/vfs_vnops.c @@ -798,82 +798,58 @@ vn_rdwr_inchunks(enum uio_rw rw, struct vnode *vp, void *base, size_t len, } #if OFF_MAX <= LONG_MAX -static void -file_v_lock(struct file *fp, short lock_bit, short lock_wait_bit) +off_t +foffset_lock(struct file *fp, int flags) { - short *flagsp; + volatile short *flagsp; + off_t res; short state; - flagsp = &fp->f_vflags; - state = atomic_load_16(flagsp); - if ((state & lock_bit) == 0 && - atomic_cmpset_acq_16(flagsp, state, state | lock_bit)) - return; + KASSERT((flags & FOF_OFFSET) == 0, ("FOF_OFFSET passed")); + + if ((flags & FOF_NOLOCK) != 0) + return (atomic_load_long(&fp->f_offset)); - sleepq_lock(flagsp); + /* + * According to McKusick the vn lock was protecting f_offset here. + * It is now protected by the FOFFSET_LOCKED flag. + */ + flagsp = &fp->f_vnread_flags; + if (atomic_cmpset_acq_16(flagsp, 0, FOFFSET_LOCKED)) + return (atomic_load_long(&fp->f_offset)); + + sleepq_lock(&fp->f_vnread_flags); state = atomic_load_16(flagsp); for (;;) { - if ((state & lock_bit) == 0) { + if ((state & FOFFSET_LOCKED) == 0) { if (!atomic_fcmpset_acq_16(flagsp, &state, - state | lock_bit)) + FOFFSET_LOCKED)) continue; break; } - if ((state & lock_wait_bit) == 0) { + if ((state & FOFFSET_LOCK_WAITING) == 0) { if (!atomic_fcmpset_acq_16(flagsp, &state, - state | lock_wait_bit)) + state | FOFFSET_LOCK_WAITING)) continue; } DROP_GIANT(); - sleepq_add(flagsp, NULL, "vofflock", 0, 0); - sleepq_wait(flagsp, PRI_MAX_KERN); + sleepq_add(&fp->f_vnread_flags, NULL, "vofflock", 0, 0); + sleepq_wait(&fp->f_vnread_flags, PRI_MAX_KERN); PICKUP_GIANT(); - sleepq_lock(flagsp); + sleepq_lock(&fp->f_vnread_flags); state = atomic_load_16(flagsp); } - sleepq_release(flagsp); -} - -static void -file_v_unlock(struct file *fp, short lock_bit, short lock_wait_bit) -{ - short *flagsp; - short state; - - flagsp = &fp->f_vflags; - state = atomic_load_16(flagsp); - if ((state & lock_wait_bit) == 0 && - atomic_cmpset_rel_16(flagsp, state, state & ~lock_bit)) - return; - - sleepq_lock(flagsp); - MPASS((*flagsp & lock_bit) != 0); - MPASS((*flagsp & lock_wait_bit) != 0); - atomic_clear_16(flagsp, lock_bit | lock_wait_bit); - sleepq_broadcast(flagsp, SLEEPQ_SLEEP, 0, 0); - sleepq_release(flagsp); -} - -off_t -foffset_lock(struct file *fp, int flags) -{ - KASSERT((flags & FOF_OFFSET) == 0, ("FOF_OFFSET passed")); - - if ((flags & FOF_NOLOCK) == 0) { - file_v_lock(fp, FILE_V_FOFFSET_LOCKED, - FILE_V_FOFFSET_LOCK_WAITING); - } - - /* - * According to McKusick the vn lock was protecting f_offset here. - * It is now protected by the FOFFSET_LOCKED flag. - */ - return (atomic_load_long(&fp->f_offset)); + res = atomic_load_long(&fp->f_offset); + sleepq_release(&fp->f_vnread_flags); + return (res); } void foffset_unlock(struct file *fp, off_t val, int flags) { + volatile short *flagsp; + short state; + KASSERT((flags & FOF_OFFSET) == 0, ("FOF_OFFSET passed")); if ((flags & FOF_NOUPDATE) == 0) @@ -883,10 +859,21 @@ foffset_unlock(struct file *fp, off_t val, int flags) if ((flags & FOF_NEXTOFF_W) != 0) fp->f_nextoff[UIO_WRITE] = val; - if ((flags & FOF_NOLOCK) == 0) { - file_v_unlock(fp, FILE_V_FOFFSET_LOCKED, - FILE_V_FOFFSET_LOCK_WAITING); - } + if ((flags & FOF_NOLOCK) != 0) + return; + + flagsp = &fp->f_vnread_flags; + state = atomic_load_16(flagsp); + if ((state & FOFFSET_LOCK_WAITING) == 0 && + atomic_cmpset_rel_16(flagsp, state, 0)) + return; + + sleepq_lock(&fp->f_vnread_flags); + MPASS((fp->f_vnread_flags & FOFFSET_LOCKED) != 0); + MPASS((fp->f_vnread_flags & FOFFSET_LOCK_WAITING) != 0); + fp->f_vnread_flags = 0; + sleepq_broadcast(&fp->f_vnread_flags, SLEEPQ_SLEEP, 0, 0); + sleepq_release(&fp->f_vnread_flags); } static off_t @@ -895,35 +882,7 @@ foffset_read(struct file *fp) return (atomic_load_long(&fp->f_offset)); } - -#else /* OFF_MAX <= LONG_MAX */ - -static void -file_v_lock_mtxp(struct file *fp, struct mtx *mtxp, short lock_bit, - short lock_wait_bit) -{ - mtx_assert(mtxp, MA_OWNED); - - while ((fp->f_vflags & lock_bit) != 0) { - fp->f_vflags |= lock_wait_bit; - msleep(&fp->f_vflags, mtxp, PRI_MAX_KERN, - "vofflock", 0); - } - fp->f_vflags |= lock_bit; -} - -static void -file_v_unlock_mtxp(struct file *fp, struct mtx *mtxp, short lock_bit, - short lock_wait_bit) -{ - mtx_assert(mtxp, MA_OWNED); - - KASSERT((fp->f_vflags & lock_bit) != 0, ("Lost lock_bit")); - if ((fp->f_vflags & lock_wait_bit) != 0) - wakeup(&fp->f_vflags); - fp->f_vflags &= ~(lock_bit | lock_wait_bit); -} - +#else off_t foffset_lock(struct file *fp, int flags) { @@ -935,8 +894,12 @@ foffset_lock(struct file *fp, int flags) mtxp = mtx_pool_find(mtxpool_sleep, fp); mtx_lock(mtxp); if ((flags & FOF_NOLOCK) == 0) { - file_v_lock_mtxp(fp, mtxp, FILE_V_FOFFSET_LOCKED, - FILE_V_FOFFSET_LOCK_WAITING); + while (fp->f_vnread_flags & FOFFSET_LOCKED) { + fp->f_vnread_flags |= FOFFSET_LOCK_WAITING; + msleep(&fp->f_vnread_flags, mtxp, PRI_MAX_KERN, + "vofflock", 0); + } + fp->f_vnread_flags |= FOFFSET_LOCKED; } res = fp->f_offset; mtx_unlock(mtxp); @@ -959,8 +922,11 @@ foffset_unlock(struct file *fp, off_t val, int flags) if ((flags & FOF_NEXTOFF_W) != 0) fp->f_nextoff[UIO_WRITE] = val; if ((flags & FOF_NOLOCK) == 0) { - file_v_unlock_mtxp(fp, mtxp, FILE_V_FOFFSET_LOCKED, - FILE_V_FOFFSET_LOCK_WAITING); + KASSERT((fp->f_vnread_flags & FOFFSET_LOCKED) != 0, + ("Lost FOFFSET_LOCKED")); + if (fp->f_vnread_flags & FOFFSET_LOCK_WAITING) + wakeup(&fp->f_vnread_flags); + fp->f_vnread_flags = 0; } mtx_unlock(mtxp); } diff --git a/sys/sys/file.h b/sys/sys/file.h index 9a072121e25f..cc3c733580fd 100644 --- a/sys/sys/file.h +++ b/sys/sys/file.h @@ -197,7 +197,7 @@ struct file { struct vnode *f_vnode; /* NULL or applicable vnode */ struct ucred *f_cred; /* associated credentials. */ short f_type; /* descriptor type */ - short f_vflags; /* (f) Sleep lock flags for members */ + short f_vnread_flags; /* (f) Sleep lock for f_offset */ /* * DTYPE_VNODE specific fields. */ @@ -220,8 +220,8 @@ struct file { #define f_cdevpriv f_vnun.fvn_cdevpriv #define f_advice f_vnun.fvn_advice -#define FILE_V_FOFFSET_LOCKED 0x0001 -#define FILE_V_FOFFSET_LOCK_WAITING 0x0002 +#define FOFFSET_LOCKED 0x1 +#define FOFFSET_LOCK_WAITING 0x2 #endif /* __BSD_VISIBLE */ #endif /* _KERNEL || _WANT_FILE */ From nobody Fri Sep 19 22:39:07 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cT6qw2gPSz67kLP; Fri, 19 Sep 2025 22:39:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cT6qw1SYdz3jXq; Fri, 19 Sep 2025 22:39:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758321548; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7+aoe3xM872wSx0uQAQPOG28C3l+FI+KLPVp5fIdI3Q=; b=AxB8aj4VVIWmK5+nx/2IHBe86kdy05dDgFDsd60FirSAnRJ7O5WSCcxQ3yzYC91SFeyxhq Z+x+qvuibXb2HjAIcmNijEw4+f1LBNaHUtwUWVkCAi4k7alJrBnkB1QU+PeKSygat1C2zW MaD/4cWAgU3rO16akKgAA752YLRjCmjjHkzbKVEvmMVkIArz4ks3hySdEzpVZTQlcRFHke f2XRftLZN+iC3VYtlWSrlrhVhYFI3QfIMBVSXMvEIpaDAdKzCmBQJmOipR7M8NsJZihpzE v48unpkuwYE9uxhXlpWatY+rUA3lHmbIwVtA0MnUmy0bRCVYN6PDgyLLi7kdeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758321548; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7+aoe3xM872wSx0uQAQPOG28C3l+FI+KLPVp5fIdI3Q=; b=p2oeaCi+RBAi0W8sjtKuOVHAs6UB3XcYjKogLkzTQD63objafYPke1HM2i6/oCpQEwLxMh nhlQKjkh/ducWqSvbq8zH3u8Pv+/WjnzrnFGwspBUODvifqbT/pcH4XmwoWDRpzrLx9YGk 1BJK8nJK/69eaE0+C1Xk9M8Ae1qN0WcpEjv4yZb856rdxaza0HJb42KHKKFrGtV2ZtrRKa TOnQgG0urezT0nMRaBH9bPjfpjyUJFtOPK0zcoaKWvjn5mNdcu9Hrjx6uKm8jSSdWiPfsc +MlZPDSE6L4xGt2pS/aNSZ4nn4lXNixvZW6kKbGOg7/S8Alsf3Yo/2PwtoySCw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758321548; a=rsa-sha256; cv=none; b=cepvzKOE50SHPvT7kwkKHiAirFwu3tN4GvTHUGxO0BM9ABPqNRa7wu6FYWIXG09oFITbKl +0I2dpgkG7OzzPHRLW6C2Zh6WWKRMmjLY8WuhRpccD5TeTvKzjF4axXg+SRJs4MIwXpvI+ dslkJN0d9K37Ls4otJALlMoedzMJdKBnD4tmPDfZdTrPiK20pS4Vj5l2mtkDv/CdrjSNv3 XiQWSXgwhj8CdG4YhAVf1omunG+Rujw+TANar8xHr+hk0zDhDG3ShfJ/FLa7bH+1Eacy/z tFk3om/Jdn9mI8R1npomntCXlEhMig4uGvh/KHgGidJ/wicqxk9SOxrbGSMNIg== 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 4cT6qw0nHzz1Fg8; Fri, 19 Sep 2025 22:39:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58JMd7rO073817; Fri, 19 Sep 2025 22:39:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58JMd73o073814; Fri, 19 Sep 2025 22:39:07 GMT (envelope-from git) Date: Fri, 19 Sep 2025 22:39:07 GMT Message-Id: <202509192239.58JMd73o073814@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alan Somers Subject: git: e043af9ca596 - main - fusefs: fix a kernel panic regarding SCM_RIGHTS List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e043af9ca59608309cac2fd222c17f989ba0d35e Auto-Submitted: auto-generated The branch main has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=e043af9ca59608309cac2fd222c17f989ba0d35e commit e043af9ca59608309cac2fd222c17f989ba0d35e Author: Alan Somers AuthorDate: 2025-09-19 16:02:25 +0000 Commit: Alan Somers CommitDate: 2025-09-19 22:38:42 +0000 fusefs: fix a kernel panic regarding SCM_RIGHTS If the last copy of an open file resides within the socket buffer of a unix-domain socket, then VOP_CLOSE will be called with no thread information. Fix fusefs to handle that case, and add a regression test. Also add a test case for writes to a file that lies within a sockbuf. Along with close, a write from the writeback cache is the only other operation I can think of that might apply to a file residing in a sockbuf. PR: 289686 Reported by: iron.udjin@gmail.com MFC after: 1 week Sponsored by: ConnectWise Reviewed by: glebius, markj Differential Revision: https://reviews.freebsd.org/D52625 --- sys/fs/fuse/fuse_vnops.c | 10 ++++-- tests/sys/fs/fusefs/release.cc | 54 +++++++++++++++++++++++++++++++ tests/sys/fs/fusefs/write.cc | 73 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 134 insertions(+), 3 deletions(-) diff --git a/sys/fs/fuse/fuse_vnops.c b/sys/fs/fuse/fuse_vnops.c index 8712679375c6..5c28db29fc63 100644 --- a/sys/fs/fuse/fuse_vnops.c +++ b/sys/fs/fuse/fuse_vnops.c @@ -795,11 +795,15 @@ fuse_vnop_close(struct vop_close_args *ap) struct mount *mp = vnode_mount(vp); struct ucred *cred = ap->a_cred; int fflag = ap->a_fflag; - struct thread *td = ap->a_td; - pid_t pid = td->td_proc->p_pid; + struct thread *td; struct fuse_vnode_data *fvdat = VTOFUD(vp); + pid_t pid; int err = 0; + /* NB: a_td will be NULL from some async kernel contexts */ + td = ap->a_td ? ap->a_td : curthread; + pid = td->td_proc->p_pid; + if (fuse_isdeadfs(vp)) return 0; if (vnode_isdir(vp)) @@ -838,7 +842,7 @@ fuse_vnop_close(struct vop_close_args *ap) } /* TODO: close the file handle, if we're sure it's no longer used */ if ((fvdat->flag & FN_SIZECHANGE) != 0) { - fuse_vnode_savesize(vp, cred, td->td_proc->p_pid); + fuse_vnode_savesize(vp, cred, pid); } return err; } diff --git a/tests/sys/fs/fusefs/release.cc b/tests/sys/fs/fusefs/release.cc index b664ba512b64..9df236bfbaf7 100644 --- a/tests/sys/fs/fusefs/release.cc +++ b/tests/sys/fs/fusefs/release.cc @@ -29,6 +29,9 @@ */ extern "C" { +#include +#include + #include #include } @@ -188,6 +191,57 @@ TEST_F(Release, ok) ASSERT_EQ(0, close(fd)) << strerror(errno); } +/* + * Nothing bad should happen when closing a Unix-domain named socket that + * contains a fusefs file descriptor within its receive buffer. + * Regression test for + * https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=289686 + */ +TEST_F(Release, scm_rights) +{ + const char FULLPATH[] = "mountpoint/some_file.txt"; + const char RELPATH[] = "some_file.txt"; + struct msghdr msg; + struct iovec iov; + char message[CMSG_SPACE(sizeof(int))]; + uint64_t ino = 42; + int fd; + int s[2]; + union { + char buf[CMSG_SPACE(sizeof(fd))]; + struct cmsghdr align; + } u; + + expect_lookup(RELPATH, ino, 1); + expect_open(ino, 0, 1); + expect_flush(ino, 1, ReturnErrno(0)); + expect_release(ino, getpid(), O_RDONLY, 0); + + ASSERT_EQ(0, socketpair(AF_UNIX, SOCK_STREAM, 0, s)) << strerror(errno); + + fd = open(FULLPATH, O_RDONLY); + ASSERT_LE(0, fd) << strerror(errno); + + memset(&message, 0, sizeof(message)); + memset(&msg, 0, sizeof(msg)); + iov.iov_base = NULL; + iov.iov_len = 0; + msg.msg_iov = &iov; + msg.msg_iovlen = 1; + msg.msg_control = u.buf, + msg.msg_controllen = sizeof(u.buf); + struct cmsghdr *cmsg = CMSG_FIRSTHDR(&msg); + cmsg->cmsg_level = SOL_SOCKET; + cmsg->cmsg_type = SCM_RIGHTS; + cmsg->cmsg_len = CMSG_LEN(sizeof(fd)); + memcpy(CMSG_DATA(cmsg), &fd, sizeof(fd)); + ASSERT_GE(sendmsg(s[0], &msg, 0), 0) << strerror(errno); + + close(fd); // Close fd within our process + close(s[0]); + close(s[1]); // The last copy of fd is within this socket's rcvbuf +} + /* When closing a file with a POSIX file lock, release should release the lock*/ TEST_F(ReleaseWithLocks, unlock_on_close) { diff --git a/tests/sys/fs/fusefs/write.cc b/tests/sys/fs/fusefs/write.cc index 1fe2e3cc522d..f5573a865a04 100644 --- a/tests/sys/fs/fusefs/write.cc +++ b/tests/sys/fs/fusefs/write.cc @@ -32,9 +32,11 @@ extern "C" { #include #include #include +#include #include #include #include +#include #include #include @@ -1398,6 +1400,77 @@ TEST_F(WriteBackAsync, eof) leak(fd); } +/* + * Nothing bad should happen if a file with a dirty writeback cache is closed + * while the last copy lies in some socket's socket buffer. Inspired by bug + * 289686 . + */ +TEST_F(WriteBackAsync, scm_rights) +{ + const char FULLPATH[] = "mountpoint/some_file.txt"; + const char RELPATH[] = "some_file.txt"; + const char *CONTENTS = "abcdefgh"; + uint64_t ino = 42; + int fd; + ssize_t bufsize = strlen(CONTENTS); + int s[2]; + struct msghdr msg; + struct iovec iov; + char message[CMSG_SPACE(sizeof(int))]; + union { + char buf[CMSG_SPACE(sizeof(fd))]; + struct cmsghdr align; + } u; + + expect_lookup(RELPATH, ino, 0); + expect_open(ino, 0, 1); + /* VOP_SETATTR will try to set timestamps during flush */ + EXPECT_CALL(*m_mock, process( + ResultOf([=](auto in) { + return (in.header.opcode == FUSE_SETATTR && + in.header.nodeid == ino); + }, Eq(true)), + _) + ).WillOnce(Invoke(ReturnImmediate([=](auto in __unused, auto& out) { + SET_OUT_HEADER_LEN(out, attr); + out.body.attr.attr.ino = ino; + out.body.attr.attr.mode = S_IFREG | 0644; + out.body.attr.attr.size = bufsize; + }))); + + expect_write(ino, 0, bufsize, bufsize, CONTENTS); + expect_flush(ino, 1, ReturnErrno(0)); + expect_release(ino, ReturnErrno(0)); + + /* Open a file on the fusefs file system */ + fd = open(FULLPATH, O_RDWR); + ASSERT_LE(0, fd) << strerror(errno); + + /* Write to the file to dirty its writeback cache */ + ASSERT_EQ(bufsize, write(fd, CONTENTS, bufsize)) << strerror(errno); + + /* Send the file into a socket */ + ASSERT_EQ(0, socketpair(AF_UNIX, SOCK_STREAM, 0, s)) << strerror(errno); + memset(&message, 0, sizeof(message)); + memset(&msg, 0, sizeof(msg)); + iov.iov_base = NULL; + iov.iov_len = 0; + msg.msg_iov = &iov; + msg.msg_iovlen = 1; + msg.msg_control = u.buf, + msg.msg_controllen = sizeof(u.buf); + struct cmsghdr *cmsg = CMSG_FIRSTHDR(&msg); + cmsg->cmsg_level = SOL_SOCKET; + cmsg->cmsg_type = SCM_RIGHTS; + cmsg->cmsg_len = CMSG_LEN(sizeof(fd)); + memcpy(CMSG_DATA(cmsg), &fd, sizeof(fd)); + ASSERT_GE(sendmsg(s[0], &msg, 0), 0) << strerror(errno); + + close(fd); // Close fd within our process + close(s[0]); + close(s[1]); // The last copy of fd is within this socket's rcvbuf +} + /* * When a file has dirty writes that haven't been flushed, the server's notion * of its mtime and ctime will be wrong. The kernel should ignore those if it From nobody Sat Sep 20 00:47:37 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cT9h92psRz67vCH; Sat, 20 Sep 2025 00:47: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 4cT9h92KmNz40Mq; Sat, 20 Sep 2025 00:47:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758329257; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BXKmN9Vf2ArlA0QgNNqxyEk/zZuyTNHhXPlRVcnyIpM=; b=cZcZ6l3R7MpCFrFqr5YM4hskpAcY5KsfwMf3y+3r6wL9FrJoJ8YgAIvNqJEQXgaL/cosTC 1FUrzWn7Ti9/dbbLoGKQvdz29/PKXu+QbeK7ebgM9V8k9OXJ1vutPAtC/vyw/Z6tF5sapf y7RrhKlelxcPjUPJimozeHjMkwDhzgjCsNqMJ2uulRnjlZq3zytSs7ZnNJ47xUFVd2I6dK cIpHWqyl9bpGOD2w3qmJVnGxAvBvsd/fG9ejXBggszswK5UA1a4ELB/i9oEsc1k+pCNJj3 32ZjqKd74iSGFsnfjePQbWLJxo/cjAjOIWHkMkpWJ2VP4aWXGa2rnZrYp8MtHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758329257; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BXKmN9Vf2ArlA0QgNNqxyEk/zZuyTNHhXPlRVcnyIpM=; b=I5V9w2mHEQFn5qDb/Cad6xLZTF49hjfctt0X7K9txElD2DoEMhCasWw0sB331hj6e4Gtt3 exW6n1H0rl6rW6PP7pF4n6u0cUm9kzAF/okMikQOxyEuOdXnyj/0bOrRh/aZW3SzXPgaiz mPsdFWv9UhGAwXsDS6K4H7EBik8aWnSVxqTpkg/kMxOM2VYqTMGHIGa/9A7vvrP713X6IP cwgnV4cXz0YxxhzPMbeDVJheCRIJpLcXZ9EVcUtFUYUP6cMfoXBDDHa8guaNwQQ/zq5Tbw a/RQNbh72X5R8SVUPr7v3rnvMAwVFzNjLXZNwFU69X5U0SEywHSs8ZkUnuMKbQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758329257; a=rsa-sha256; cv=none; b=cdcw7NchV4e/bKJBz2ePSV26slGvhlBbIWQiW5EIyfF98TeeSTx/vibaoZFF9kLh26Olp/ ViX2MipuSzYpdv2JKAFsKxBKr5vYQ1BdUyCy++P5vDmjt9jZo/ufwgeQbrVDnVyUq6H+t3 pPDtHufpJGtkuY6mnPCAAuvPDALmVNZaK/GKZYstKCItAYpMa+uCaOzJHtOX4hBeIwdcUA 3/s5BHCZ1f3h5+93PFFLvnhsWOnHCbqvyL/iLDzrnPBPDtQcMdl42jOaG757smLPpg4G6q rq4Mu2Phf1KN54ZneEhBtbB7OQDXGDtRBVSZWbhzzyX5fVzWi+4s9mlzTzbrhw== 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 4cT9h91vCJz1KqD; Sat, 20 Sep 2025 00:47: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 58K0lbff016995; Sat, 20 Sep 2025 00:47:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58K0lbkF016992; Sat, 20 Sep 2025 00:47:37 GMT (envelope-from git) Date: Sat, 20 Sep 2025 00:47:37 GMT Message-Id: <202509200047.58K0lbkF016992@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Adrian Chadd Subject: git: cce278510a82 - main - usb: update wifi drivers to use IEEE80211_FEXT_SEQNO_OFFLOAD List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: adrian X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cce278510a820785d883e2c9b19a95c176427880 Auto-Submitted: auto-generated The branch main has been updated by adrian: URL: https://cgit.FreeBSD.org/src/commit/?id=cce278510a820785d883e2c9b19a95c176427880 commit cce278510a820785d883e2c9b19a95c176427880 Author: Adrian Chadd AuthorDate: 2025-06-09 19:52:35 +0000 Commit: Adrian Chadd CommitDate: 2025-09-20 00:42:07 +0000 usb: update wifi drivers to use IEEE80211_FEXT_SEQNO_OFFLOAD Migrate the following wifi drivers to use the seqno offload option. Locally tested (STA mode) on: * mtw * uath * upgt * ural * urtw * uzyd Differential Revision: https://reviews.freebsd.org/D50771 Okayed by: bz --- sys/dev/usb/wlan/if_mtw.c | 5 +++++ sys/dev/usb/wlan/if_uath.c | 4 ++++ sys/dev/usb/wlan/if_upgt.c | 5 +++++ sys/dev/usb/wlan/if_ural.c | 6 ++++++ sys/dev/usb/wlan/if_urtw.c | 6 ++++++ sys/dev/usb/wlan/if_zyd.c | 4 ++++ 6 files changed, 30 insertions(+) diff --git a/sys/dev/usb/wlan/if_mtw.c b/sys/dev/usb/wlan/if_mtw.c index 137590651948..6967e5081542 100644 --- a/sys/dev/usb/wlan/if_mtw.c +++ b/sys/dev/usb/wlan/if_mtw.c @@ -638,6 +638,7 @@ mtw_attach(device_t self) ic->ic_flags |= IEEE80211_F_DATAPAD; ic->ic_flags_ext |= IEEE80211_FEXT_SWBMISS; + ic->ic_flags_ext |= IEEE80211_FEXT_SEQNO_OFFLOAD; mtw_getradiocaps(ic, IEEE80211_CHAN_MAX, &ic->ic_nchans, ic->ic_channels); @@ -3131,6 +3132,8 @@ mtw_tx(struct mtw_softc *sc, struct mbuf *m, struct ieee80211_node *ni) data->ni = ni; data->ridx = ridx; + ieee80211_output_seqno_assign(ni, -1, m); + mtw_set_tx_desc(sc, data); /* @@ -3390,6 +3393,8 @@ mtw_tx_param(struct mtw_softc *sc, struct mbuf *m, struct ieee80211_node *ni, break; data->ridx = ridx; + ieee80211_output_seqno_assign(ni, -1, m); + mtw_set_tx_desc(sc, data); MTW_DPRINTF(sc, MTW_DEBUG_XMIT, "sending raw frame len=%u rate=%u\n", diff --git a/sys/dev/usb/wlan/if_uath.c b/sys/dev/usb/wlan/if_uath.c index b49c75032d77..cc303e565bca 100644 --- a/sys/dev/usb/wlan/if_uath.c +++ b/sys/dev/usb/wlan/if_uath.c @@ -432,6 +432,8 @@ uath_attach(device_t dev) /* put a regulatory domain to reveal informations. */ uath_regdomain = sc->sc_devcap.regDomain; + ic->ic_flags_ext |= IEEE80211_FEXT_SEQNO_OFFLOAD; + memset(bands, 0, sizeof(bands)); setbit(bands, IEEE80211_MODE_11B); setbit(bands, IEEE80211_MODE_11G); @@ -1548,6 +1550,8 @@ uath_tx_start(struct uath_softc *sc, struct mbuf *m0, struct ieee80211_node *ni, ieee80211_radiotap_tx(vap, m0); } + ieee80211_output_seqno_assign(ni, -1, m0); + wh = mtod(m0, struct ieee80211_frame *); if (wh->i_fc[1] & IEEE80211_FC1_PROTECTED) { k = ieee80211_crypto_encap(ni, m0); diff --git a/sys/dev/usb/wlan/if_upgt.c b/sys/dev/usb/wlan/if_upgt.c index 642631ae34b7..1ab833301b3c 100644 --- a/sys/dev/usb/wlan/if_upgt.c +++ b/sys/dev/usb/wlan/if_upgt.c @@ -354,6 +354,8 @@ upgt_attach(device_t dev) ic->ic_transmit = upgt_transmit; ic->ic_parent = upgt_parent; + ic->ic_flags_ext |= IEEE80211_FEXT_SEQNO_OFFLOAD; + ieee80211_radiotap_attach(ic, &sc->sc_txtap.wt_ihdr, sizeof(sc->sc_txtap), UPGT_TX_RADIOTAP_PRESENT, @@ -2116,6 +2118,9 @@ upgt_tx_start(struct upgt_softc *sc, struct mbuf *m, struct ieee80211_node *ni, upgt_set_led(sc, UPGT_LED_BLINK); + /* Assign sequence number */ + ieee80211_output_seqno_assign(ni, -1, m); + /* * Software crypto. */ diff --git a/sys/dev/usb/wlan/if_ural.c b/sys/dev/usb/wlan/if_ural.c index 260d75a9821d..adef924a085c 100644 --- a/sys/dev/usb/wlan/if_ural.c +++ b/sys/dev/usb/wlan/if_ural.c @@ -473,6 +473,8 @@ ural_attach(device_t self) | IEEE80211_C_WPA /* 802.11i */ ; + ic->ic_flags_ext |= IEEE80211_FEXT_SEQNO_OFFLOAD; + ural_getradiocaps(ic, IEEE80211_CHAN_MAX, &ic->ic_nchans, ic->ic_channels); @@ -1073,6 +1075,8 @@ ural_tx_mgt(struct ural_softc *sc, struct mbuf *m0, struct ieee80211_node *ni) STAILQ_REMOVE_HEAD(&sc->tx_free, next); sc->tx_nfree--; + ieee80211_output_seqno_assign(ni, -1, m0); + wh = mtod(m0, struct ieee80211_frame *); if (wh->i_fc[1] & IEEE80211_FC1_PROTECTED) { k = ieee80211_crypto_encap(ni, m0); @@ -1229,6 +1233,8 @@ ural_tx_data(struct ural_softc *sc, struct mbuf *m0, struct ieee80211_node *ni) rate = ieee80211_node_get_txrate_dot11rate(ni); } + ieee80211_output_seqno_assign(ni, -1, m0); + if (wh->i_fc[1] & IEEE80211_FC1_PROTECTED) { k = ieee80211_crypto_encap(ni, m0); if (k == NULL) { diff --git a/sys/dev/usb/wlan/if_urtw.c b/sys/dev/usb/wlan/if_urtw.c index 439faeefc408..86cf4c653ae7 100644 --- a/sys/dev/usb/wlan/if_urtw.c +++ b/sys/dev/usb/wlan/if_urtw.c @@ -884,6 +884,8 @@ urtw_attach(device_t dev) /* XXX TODO: setup regdomain if URTW_EPROM_CHANPLAN_BY_HW bit is set.*/ + ic->ic_flags_ext |= IEEE80211_FEXT_SEQNO_OFFLOAD; + urtw_getradiocaps(ic, IEEE80211_CHAN_MAX, &ic->ic_nchans, ic->ic_channels); @@ -1699,6 +1701,10 @@ urtw_tx_start(struct urtw_softc *sc, struct ieee80211_node *ni, struct mbuf *m0, ismcast = IEEE80211_IS_MULTICAST(wh->i_addr1); type = wh->i_fc[0] & IEEE80211_FC0_TYPE_MASK; + + /* Assign sequence number */ + ieee80211_output_seqno_assign(ni, -1, m0); + /* * Software crypto. */ diff --git a/sys/dev/usb/wlan/if_zyd.c b/sys/dev/usb/wlan/if_zyd.c index 1a698caef3c5..7affdcdce089 100644 --- a/sys/dev/usb/wlan/if_zyd.c +++ b/sys/dev/usb/wlan/if_zyd.c @@ -384,6 +384,8 @@ zyd_attach(device_t dev) | IEEE80211_C_WPA /* 802.11i */ ; + ic->ic_flags_ext |= IEEE80211_FEXT_SEQNO_OFFLOAD; + zyd_getradiocaps(ic, IEEE80211_CHAN_MAX, &ic->ic_nchans, ic->ic_channels); @@ -2463,6 +2465,8 @@ zyd_tx_start(struct zyd_softc *sc, struct mbuf *m0, struct ieee80211_node *ni) } } + ieee80211_output_seqno_assign(ni, -1, m0); + if (wh->i_fc[1] & IEEE80211_FC1_PROTECTED) { k = ieee80211_crypto_encap(ni, m0); if (k == NULL) { From nobody Sat Sep 20 00:47:38 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cT9hB5H12z67vRG; Sat, 20 Sep 2025 00:47: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 4cT9hB3fJJz40DW; Sat, 20 Sep 2025 00:47:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758329258; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AuV2m1EdvSUvjSzxWBXbDK0gqoOQsmCe00F/6UwgTCg=; b=akQU0F07V3OtR3SMQmcI1WOKfkNlpBglaL5xVnI2bvl3vlmyMIiZcLATYlytXRnExOjd4b ewoqbS4GhuSAXyFXIK4+QxgFnqzjl0MiY39vrL3hl4GA1IQjHi/sOUYaStZjmZL0FPvrf2 1hVes7tmM15WaIZkFo6UA05CtQ8rGrkhLSKUl52l+FE0cBDh52z53sP8BrViCqwxJ7sm14 uzOfmxwM3n3vuq8D4S9h00kbojNvT0mh97SN1Hj2u8PoqQzBTDnuhw9BQ3zUjApDYlY4th q5IXm9IugqsGFAZtlfwioL9UqhQGbrF9WZ76VYagNQEiczRqnT6FcjyHFl3acA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758329258; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AuV2m1EdvSUvjSzxWBXbDK0gqoOQsmCe00F/6UwgTCg=; b=oAKt3F9EI1c0eIh8vSN40kZkQKAi4KIq20A6qLiIwmWNVnxe/9UtNO3b7vZnmHkRmb1nUe AHhFttoe8FaJab0fGYvtR8joD2ssHpCqJbkxGz4KB3+vEDDuuQq5mpB98Mn5VtmlQ+CwAV PfC1rNCAbSRhRDkiXf6NkpHef9TMPgmDFTQN4jfovj0oTGBEyYXkCHzMLCKeUYQouBTHuU 33owlrotVFFt1TDmpfGKm3lGcOO8py7UI27r18y4/2O6MpQysKgqQkwJx9mHcfiX707dfu +KGUFrxMxdQzipieJq0c6xhMWnMJbWcIsKwbFW85Alqa6/rmsxbu6Utpo2UA4w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758329258; a=rsa-sha256; cv=none; b=W2Uo89037BmDabrKK88ERI3ALh7uum0fIYqV2TT42IZfCT8qyOEPcH5BkkBvhCk+F2enU0 yLe6ppFIbevFrB+in9cTvupaQK1jSFdum1AQWaRBeulAgb+Nh83TICpkuvCnbZ9FBXQcrH lvhKngAVs+XqdZeE8l+76q7GZmbynLwuwi0kuYzTvpxScPNNGAKbmimbeFI/A1zfyBKN77 X/FYTXBDnR90NOykpJ/jTKdMr0KfUuwrDUAKtagaMWuCHpYkEGQyUXZb++vu55JW+MXR95 YWDinPmpkl954GT4MwGcAHR1GpswsjgD6whyrU2k2aEk9UxBzJ9hyRCEmd/Zng== 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 4cT9hB37Hwz1KQP; Sat, 20 Sep 2025 00:47: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 58K0lchW017029; Sat, 20 Sep 2025 00:47:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58K0lcgE017026; Sat, 20 Sep 2025 00:47:38 GMT (envelope-from git) Date: Sat, 20 Sep 2025 00:47:38 GMT Message-Id: <202509200047.58K0lcgE017026@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Adrian Chadd Subject: git: 785edcc2af5a - main - net80211: convert the rest of the native net80211 drivers to SEQNO_OFFLOAD List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: adrian X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 785edcc2af5ae32c24f5caf5b9552f62bdae33ee Auto-Submitted: auto-generated The branch main has been updated by adrian: URL: https://cgit.FreeBSD.org/src/commit/?id=785edcc2af5ae32c24f5caf5b9552f62bdae33ee commit 785edcc2af5ae32c24f5caf5b9552f62bdae33ee Author: Adrian Chadd AuthorDate: 2025-06-10 04:22:10 +0000 Commit: Adrian Chadd CommitDate: 2025-09-20 00:42:45 +0000 net80211: convert the rest of the native net80211 drivers to SEQNO_OFFLOAD * Convert the rest of the drivers to implement driver/offloaded sequence number handling. * For drivers that implement their own sequence number space handling for A-MPDU, only call ieee80211_output_seqno_assign() if the frame isn't tagged with M_AMPDU_MPDU, which mirrors the original net80211 sequence number behaviour. (Except of course, the assignment is now happening during final encap/transmit, not early in encap.) Locally tested (sta mode): * ath * iwn * bwi * bwn * iwm * otus * ral Differential Revision: https://reviews.freebsd.org/D50772 Okayed by: bz --- sys/dev/ath/if_ath.c | 3 +++ sys/dev/ath/if_ath_tx.c | 10 ++++++++++ sys/dev/bwi/if_bwi.c | 4 ++++ sys/dev/bwn/if_bwn.c | 2 ++ sys/dev/ipw/if_ipw.c | 3 +++ sys/dev/iwi/if_iwi.c | 4 ++++ sys/dev/iwm/if_iwm.c | 3 ++- sys/dev/iwn/if_iwn.c | 10 ++++++++++ sys/dev/malo/if_malo.c | 4 ++++ sys/dev/mwl/if_mwl.c | 4 ++++ sys/dev/otus/if_otus.c | 11 +++++++++++ sys/dev/ral/rt2560.c | 4 ++++ sys/dev/ral/rt2661.c | 4 +++- sys/dev/ral/rt2860.c | 3 +++ 14 files changed, 67 insertions(+), 2 deletions(-) diff --git a/sys/dev/ath/if_ath.c b/sys/dev/ath/if_ath.c index 934024ddfbcf..1304b597c545 100644 --- a/sys/dev/ath/if_ath.c +++ b/sys/dev/ath/if_ath.c @@ -924,6 +924,9 @@ ath_attach(u_int16_t devid, struct ath_softc *sc) | IEEE80211_C_PMGT /* Station side power mgmt */ | IEEE80211_C_SWSLEEP ; + + ic->ic_flags_ext |= IEEE80211_FEXT_SEQNO_OFFLOAD; + /* * Query the hal to figure out h/w crypto support. */ diff --git a/sys/dev/ath/if_ath_tx.c b/sys/dev/ath/if_ath_tx.c index 1559b66a7c7d..deadd63c3d18 100644 --- a/sys/dev/ath/if_ath_tx.c +++ b/sys/dev/ath/if_ath_tx.c @@ -1588,6 +1588,10 @@ ath_tx_normal_setup(struct ath_softc *sc, struct ieee80211_node *ni, */ pktlen = m0->m_pkthdr.len - (hdrlen & 3); + /* seqno allocate, only if AMPDU isn't running */ + if ((m0->m_flags & M_AMPDU_MPDU) == 0) + ieee80211_output_seqno_assign(ni, -1, m0); + /* Handle encryption twiddling if needed */ if (! ath_tx_tag_crypto(sc, ni, m0, iswep, isfrag, &hdrlen, &pktlen, &keyix)) { @@ -2201,6 +2205,10 @@ ath_tx_raw_start(struct ath_softc *sc, struct ieee80211_node *ni, * for QoS frames. */ + /* seqno allocate, only if AMPDU isn't running */ + if ((m0->m_flags & M_AMPDU_MPDU) == 0) + ieee80211_output_seqno_assign(ni, -1, m0); + /* Handle encryption twiddling if needed */ if (! ath_tx_tag_crypto(sc, ni, m0, params->ibp_flags & IEEE80211_BPF_CRYPTO, 0, @@ -2981,6 +2989,8 @@ ath_tx_tid_seqno_assign(struct ath_softc *sc, struct ieee80211_node *ni, ATH_TX_LOCK_ASSERT(sc); + /* TODO: can this use ieee80211_output_seqno_assign() now? */ + /* * Is it a QOS NULL Data frame? Give it a sequence number from * the default TID (IEEE80211_NONQOS_TID.) diff --git a/sys/dev/bwi/if_bwi.c b/sys/dev/bwi/if_bwi.c index 1087ca813d65..85146d4c4010 100644 --- a/sys/dev/bwi/if_bwi.c +++ b/sys/dev/bwi/if_bwi.c @@ -498,6 +498,9 @@ bwi_attach(struct bwi_softc *sc) IEEE80211_C_BGSCAN | IEEE80211_C_MONITOR; ic->ic_opmode = IEEE80211_M_STA; + + ic->ic_flags_ext |= IEEE80211_FEXT_SEQNO_OFFLOAD; + ieee80211_ifattach(ic); ic->ic_headroom = sizeof(struct bwi_txbuf_hdr); @@ -1361,6 +1364,7 @@ bwi_start_locked(struct bwi_softc *sc) (m = mbufq_dequeue(&sc->sc_snd)) != NULL) { ni = (struct ieee80211_node *) m->m_pkthdr.rcvif; wh = mtod(m, struct ieee80211_frame *); + ieee80211_output_seqno_assign(ni, -1, m); if ((wh->i_fc[1] & IEEE80211_FC1_PROTECTED) != 0 && ieee80211_crypto_encap(ni, m) == NULL) { if_inc_counter(ni->ni_vap->iv_ifp, diff --git a/sys/dev/bwn/if_bwn.c b/sys/dev/bwn/if_bwn.c index 38bf6f5d31a3..ec9d56661034 100644 --- a/sys/dev/bwn/if_bwn.c +++ b/sys/dev/bwn/if_bwn.c @@ -774,6 +774,7 @@ bwn_attach_post(struct bwn_softc *sc) ; ic->ic_flags_ext |= IEEE80211_FEXT_SWBMISS; /* s/w bmiss */ + ic->ic_flags_ext |= IEEE80211_FEXT_SEQNO_OFFLOAD; /* Determine the NVRAM variable containing our MAC address */ core_unit = bhnd_get_core_unit(sc->sc_dev); @@ -999,6 +1000,7 @@ bwn_start(struct bwn_softc *sc) continue; } wh = mtod(m, struct ieee80211_frame *); + ieee80211_output_seqno_assign(ni, -1, m); if (wh->i_fc[1] & IEEE80211_FC1_PROTECTED) { k = ieee80211_crypto_encap(ni, m); if (k == NULL) { diff --git a/sys/dev/ipw/if_ipw.c b/sys/dev/ipw/if_ipw.c index 01d713cdae18..9db562669487 100644 --- a/sys/dev/ipw/if_ipw.c +++ b/sys/dev/ipw/if_ipw.c @@ -283,6 +283,8 @@ ipw_attach(device_t dev) | IEEE80211_C_WPA /* 802.11i supported */ ; + ic->ic_flags_ext |= IEEE80211_FEXT_SEQNO_OFFLOAD; + /* read MAC address from EEPROM */ val = ipw_read_prom_word(sc, IPW_EEPROM_MAC + 0); ic->ic_macaddr[0] = val >> 8; @@ -1557,6 +1559,7 @@ ipw_tx_start(struct ipw_softc *sc, struct mbuf *m0, struct ieee80211_node *ni) wh = mtod(m0, struct ieee80211_frame *); + ieee80211_output_seqno_assign(ni, -1, m0); if (wh->i_fc[1] & IEEE80211_FC1_PROTECTED) { k = ieee80211_crypto_encap(ni, m0); if (k == NULL) { diff --git a/sys/dev/iwi/if_iwi.c b/sys/dev/iwi/if_iwi.c index 3a410a5cbf2c..26b8037186a6 100644 --- a/sys/dev/iwi/if_iwi.c +++ b/sys/dev/iwi/if_iwi.c @@ -371,6 +371,8 @@ iwi_attach(device_t dev) #endif ; + ic->ic_flags_ext |= IEEE80211_FEXT_SEQNO_OFFLOAD; + /* read MAC address from EEPROM */ val = iwi_read_prom_word(sc, IWI_EEPROM_MAC + 0); ic->ic_macaddr[0] = val & 0xff; @@ -1834,6 +1836,8 @@ iwi_tx_start(struct iwi_softc *sc, struct mbuf *m0, struct ieee80211_node *ni, } else staid = 0; + ieee80211_output_seqno_assign(ni, -1, m0); + if (wh->i_fc[1] & IEEE80211_FC1_PROTECTED) { k = ieee80211_crypto_encap(ni, m0); if (k == NULL) { diff --git a/sys/dev/iwm/if_iwm.c b/sys/dev/iwm/if_iwm.c index 1e9090310ece..9f590f11864c 100644 --- a/sys/dev/iwm/if_iwm.c +++ b/sys/dev/iwm/if_iwm.c @@ -6142,7 +6142,8 @@ iwm_attach(device_t dev) // IEEE80211_C_BGSCAN /* capable of bg scanning */ ; /* Advertise full-offload scanning */ - ic->ic_flags_ext = IEEE80211_FEXT_SCAN_OFFLOAD; + ic->ic_flags_ext |= IEEE80211_FEXT_SCAN_OFFLOAD; + ic->ic_flags_ext |= IEEE80211_FEXT_SEQNO_OFFLOAD; for (i = 0; i < nitems(sc->sc_phyctxt); i++) { sc->sc_phyctxt[i].id = i; sc->sc_phyctxt[i].color = 0; diff --git a/sys/dev/iwn/if_iwn.c b/sys/dev/iwn/if_iwn.c index b7c452a4f074..6270de3627e6 100644 --- a/sys/dev/iwn/if_iwn.c +++ b/sys/dev/iwn/if_iwn.c @@ -584,6 +584,9 @@ iwn_attach(device_t dev) | IEEE80211_C_PMGT /* Station-side power mgmt */ ; + /* Driver / firmware assigned sequence numbers */ + ic->ic_flags_ext |= IEEE80211_FEXT_SEQNO_OFFLOAD; + /* Read MAC address, channels, etc from EEPROM. */ if ((error = iwn_read_eeprom(sc, ic->ic_macaddr)) != 0) { device_printf(dev, "could not read EEPROM, error %d\n", @@ -4577,6 +4580,9 @@ iwn_tx_data(struct iwn_softc *sc, struct mbuf *m, struct ieee80211_node *ni) * XXX TODO: Group addressed frames aren't aggregated and must * go to the normal non-aggregation queue, and have a NONQOS TID * assigned from net80211. + * + * TODO: same with NULL QOS frames, which we shouldn't be sending + * anyway ourselves (and should stub out / warn / etc.) */ ac = M_WME_GETAC(m); @@ -4589,6 +4595,10 @@ iwn_tx_data(struct iwn_softc *sc, struct mbuf *m, struct ieee80211_node *ni) ac = *(int *)tap->txa_private; } + /* Only assign if not A-MPDU; the A-MPDU TX path will do its own */ + if ((m->m_flags & M_AMPDU_MPDU) == 0) + ieee80211_output_seqno_assign(ni, -1, m); + /* Encrypt the frame if need be. */ if (wh->i_fc[1] & IEEE80211_FC1_PROTECTED) { /* Retrieve key for TX. */ diff --git a/sys/dev/malo/if_malo.c b/sys/dev/malo/if_malo.c index 79a3213c6802..2e4f3967ace4 100644 --- a/sys/dev/malo/if_malo.c +++ b/sys/dev/malo/if_malo.c @@ -263,6 +263,8 @@ malo_attach(uint16_t devid, struct malo_softc *sc) ; IEEE80211_ADDR_COPY(ic->ic_macaddr, sc->malo_hwspecs.macaddr); + ic->ic_flags_ext |= IEEE80211_FEXT_SEQNO_OFFLOAD; + /* * Transmit requires space in the packet for a special format transmit * record and optional padding between this record and the payload. @@ -1040,6 +1042,8 @@ malo_tx_start(struct malo_softc *sc, struct ieee80211_node *ni, } else qos = 0; + ieee80211_output_seqno_assign(ni, -1, m0); + if (iswep) { struct ieee80211_key *k; diff --git a/sys/dev/mwl/if_mwl.c b/sys/dev/mwl/if_mwl.c index c885968dfe15..9f3d34f4f50d 100644 --- a/sys/dev/mwl/if_mwl.c +++ b/sys/dev/mwl/if_mwl.c @@ -433,6 +433,8 @@ mwl_attach(uint16_t devid, struct mwl_softc *sc) | IEEE80211_HTC_SMPS /* SMPS available */ ; + ic->ic_flags_ext |= IEEE80211_FEXT_SEQNO_OFFLOAD; + /* * Mark h/w crypto support. * XXX no way to query h/w support. @@ -3087,6 +3089,8 @@ mwl_tx_start(struct mwl_softc *sc, struct ieee80211_node *ni, struct mwl_txbuf * } else qos = 0; + ieee80211_output_seqno_assign(ni, -1, m0); + if (iswep) { const struct ieee80211_cipher *cip; struct ieee80211_key *k; diff --git a/sys/dev/otus/if_otus.c b/sys/dev/otus/if_otus.c index 5919e75a59cf..f6c4a0118b68 100644 --- a/sys/dev/otus/if_otus.c +++ b/sys/dev/otus/if_otus.c @@ -728,6 +728,12 @@ otus_attachhook(struct otus_softc *sc) IEEE80211_C_SWAMSDUTX | /* Do software A-MSDU TX */ IEEE80211_C_WPA; /* WPA/RSN. */ + /* + * Although A-MPDU RX is fine, A-MPDU TX apparently has some + * hardware bugs. Looking at Linux carl9170, it has a work-around + * that forces all frames into the AC_BE queue regardless of + * the actual QoS queue. + */ ic->ic_htcaps = IEEE80211_HTC_HT | #if 0 @@ -737,6 +743,8 @@ otus_attachhook(struct otus_softc *sc) IEEE80211_HTCAP_MAXAMSDU_3839 | IEEE80211_HTCAP_SMPS_OFF; + ic->ic_flags_ext |= IEEE80211_FEXT_SEQNO_OFFLOAD; + otus_getradiocaps(ic, IEEE80211_CHAN_MAX, &ic->ic_nchans, ic->ic_channels); @@ -2232,6 +2240,9 @@ otus_tx(struct otus_softc *sc, struct ieee80211_node *ni, struct mbuf *m, int hasqos, xferlen, type, ismcast; wh = mtod(m, struct ieee80211_frame *); + + ieee80211_output_seqno_assign(ni, -1, m); + if (wh->i_fc[1] & IEEE80211_FC1_PROTECTED) { k = ieee80211_crypto_encap(ni, m); if (k == NULL) { diff --git a/sys/dev/ral/rt2560.c b/sys/dev/ral/rt2560.c index 09b01ea55be9..7feb324eb21d 100644 --- a/sys/dev/ral/rt2560.c +++ b/sys/dev/ral/rt2560.c @@ -281,6 +281,8 @@ rt2560_attach(device_t dev, int id) #endif ; + ic->ic_flags_ext |= IEEE80211_FEXT_SEQNO_OFFLOAD; + rt2560_getradiocaps(ic, IEEE80211_CHAN_MAX, &ic->ic_nchans, ic->ic_channels); @@ -1516,6 +1518,8 @@ rt2560_tx_mgt(struct rt2560_softc *sc, struct mbuf *m0, wh = mtod(m0, struct ieee80211_frame *); + ieee80211_output_seqno_assign(ni, -1, m0); + if (wh->i_fc[1] & IEEE80211_FC1_PROTECTED) { k = ieee80211_crypto_encap(ni, m0); if (k == NULL) { diff --git a/sys/dev/ral/rt2661.c b/sys/dev/ral/rt2661.c index 38cd99d899ed..c9c86d4f089a 100644 --- a/sys/dev/ral/rt2661.c +++ b/sys/dev/ral/rt2661.c @@ -282,6 +282,8 @@ rt2661_attach(device_t dev, int id) #endif ; + ic->ic_flags_ext |= IEEE80211_FEXT_SEQNO_OFFLOAD; + rt2661_getradiocaps(ic, IEEE80211_CHAN_MAX, &ic->ic_nchans, ic->ic_channels); @@ -1284,7 +1286,7 @@ rt2661_tx_mgt(struct rt2661_softc *sc, struct mbuf *m0, rate = ni->ni_txparms->mgmtrate; wh = mtod(m0, struct ieee80211_frame *); - + ieee80211_output_seqno_assign(ni, -1, m0); if (wh->i_fc[1] & IEEE80211_FC1_PROTECTED) { k = ieee80211_crypto_encap(ni, m0); if (k == NULL) { diff --git a/sys/dev/ral/rt2860.c b/sys/dev/ral/rt2860.c index 1449df683a93..76fe4652839d 100644 --- a/sys/dev/ral/rt2860.c +++ b/sys/dev/ral/rt2860.c @@ -323,6 +323,8 @@ rt2860_attach(device_t dev, int id) | IEEE80211_C_WME /* 802.11e */ ; + ic->ic_flags_ext |= IEEE80211_FEXT_SEQNO_OFFLOAD; + rt2860_getradiocaps(ic, IEEE80211_CHAN_MAX, &ic->ic_nchans, ic->ic_channels); @@ -1471,6 +1473,7 @@ rt2860_tx(struct rt2860_softc *sc, struct mbuf *m, struct ieee80211_node *ni) wh = mtod(m, struct ieee80211_frame *); + ieee80211_output_seqno_assign(ni, -1, m); if (wh->i_fc[1] & IEEE80211_FC1_PROTECTED) { k = ieee80211_crypto_encap(ni, m); if (k == NULL) { From nobody Sat Sep 20 00:47:39 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cT9hC6R7Kz67vTY; Sat, 20 Sep 2025 00:47: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 4cT9hC4LYCz40Wh; Sat, 20 Sep 2025 00:47:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758329259; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AeapaHlfL9QnjMjGt64u638dp9gcQxL6aHv2gUhwrvI=; b=YEAJdDA5b7Ym1U9/ygfiLVbC5XKgOCrUEZN448KjI+w9U+mUjct/rdRI8S3jL/I3eCODrz 7LRVUQ0xL5lfcamxK9Fy1+iu9Kpcp11HjcbykEGx2n13A46Z9UoPRL6Zx58RLTixRNd4IY 1aORlRcFrdoTvQgxVNEVCN5LPgOML5VLUeABnWaCg8XsK37J9HC1DfjAEwTYj2V3ANajk6 7SoKX3CxqxfvwDL43dracrvxb1JBTHsIzOu3JA3RlEGzAbar0dW+klrjQIYpjgOdw5RphG SQen1w5+EmWwjmsDlbzF1jJ/JVevXCwenxD5n4asgr3h9ZXZ39BL6JqfxcAAeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758329259; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AeapaHlfL9QnjMjGt64u638dp9gcQxL6aHv2gUhwrvI=; b=aJrU9GP/UmB6KKzJyS8zH7vVEUrkJjM6cxQy3nRzotFycukaUGLYAVsxTM85mr2WL4jqlN l48QqLjOC50G0UsFr234EzvHUbKIA+cTckCj6I4/8VOtKrFc4mzGiACSoO/CKarpPl6MLn x626iJwAJAwks7Jtw7OJwmb/75aelBKfZdNuiJrntt0VxUlHAhcr740/oiUl99hmzCq9tC e54BnVuDhTBiooFb/JfXgAFFHiFYz3PvVVDqA5L5Dbz4QqRGno3vlKuJC6nKXUGXmdyXzB 2yCvfvTNO/7WcmWZ56BFuVXaxVrjEuQJEHL6bYIyJXxaNRLAn5BRUOwGnSPcsQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758329259; a=rsa-sha256; cv=none; b=SdsKTbSOJxRh5G68cAk7CmLO3JRebf61e/MYi/TRAb/eD0GIq4BaldncB/AI858+3lVZS+ WIRIIOQG+0nQ0Ss0+TH3Y4JdFDuh53SGiwQnmE4mvjjvWcePlf4xjide7+Rtgm03g9CCgs F2B5NeNVw93pdsuG5x/0ZGvFBePRy4KzFRRmG9aCBJnWdAiOhGXPxJzLMH9cyGm5ww4uQl h1xbfXYXO6C1uKIEppIGd54vVa47vejXLNwqsgZY9wi65gKGClgypayQXxKp/gSIGVzgMF XWGXbT3n4utKJXCb0PMW7H9XJJ5dDHcXUt1OF36iSqkUiLDjbnGbDRnCvQowNw== 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 4cT9hC3yMNz1KQQ; Sat, 20 Sep 2025 00:47: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 58K0ldWl017073; Sat, 20 Sep 2025 00:47:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58K0ldcL017070; Sat, 20 Sep 2025 00:47:39 GMT (envelope-from git) Date: Sat, 20 Sep 2025 00:47:39 GMT Message-Id: <202509200047.58K0ldcL017070@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Adrian Chadd Subject: git: d9ae618c0816 - main - [rtwn] don't send NULL data frames if we're compiled with firmware enabled List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: adrian X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d9ae618c0816d24bc8127e479db5787c97a23140 Auto-Submitted: auto-generated The branch main has been updated by adrian: URL: https://cgit.FreeBSD.org/src/commit/?id=d9ae618c0816d24bc8127e479db5787c97a23140 commit d9ae618c0816d24bc8127e479db5787c97a23140 Author: Adrian Chadd AuthorDate: 2025-08-27 17:04:39 +0000 Commit: Adrian Chadd CommitDate: 2025-09-20 00:44:19 +0000 [rtwn] don't send NULL data frames if we're compiled with firmware enabled the firmware should be sending these. Differential Revision: https://reviews.freebsd.org/D52298 Reviewed by: bz Locally tested: * rtl8821/rtl8812au (STA) --- sys/dev/rtwn/if_rtwn.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sys/dev/rtwn/if_rtwn.c b/sys/dev/rtwn/if_rtwn.c index 25287f222270..c5889937fb08 100644 --- a/sys/dev/rtwn/if_rtwn.c +++ b/sys/dev/rtwn/if_rtwn.c @@ -271,6 +271,11 @@ rtwn_attach(struct rtwn_softc *sc) /* Enable seqno offload */ ic->ic_flags_ext |= IEEE80211_FEXT_SEQNO_OFFLOAD; +#ifdef RTWN_WITHOUT_UCODE + /* Don't originate NULL data frames - let firmware do this */ + ic->ic_flags_ext |= IEEE80211_FEXT_NO_NULLDATA; +#endif + /* Adjust capabilities. */ rtwn_adj_devcaps(sc); From nobody Sat Sep 20 00:47:40 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cT9hF0Xr6z67vTb; Sat, 20 Sep 2025 00:47: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 4cT9hD52m6z40F2; Sat, 20 Sep 2025 00:47:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758329260; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XnKyji4OH2RkxNdGkPKfbhqJbxENkMVCv/VpsWyBQek=; b=kPlk+xkdj+PZjGo4Ckh0DK2N6kYWPnQtZS239GJWKyRcD1g3a2afKGhffNENKFKdGiWigR jj3tyvXHjo47jnf47u0T4cTaw/D2daU6+/kw0gNP8MAEavdZTlpjc7ahE8fw4RwKZnMitw gCQaQ57WivufVazRPzBCwgZ5gtxhZamEz3hv6MivZfqJ4QClioeVQowaSs/hfL5oDbiO/5 YfbyNkeams3diJY/AXLSNgoEy41Z3v0/Y0/MOHNr3yKgIx49uvmWH4Q27noaeg7nFh/Bit Vk9TXHJyXUyslLwwkJdCWW9/wiT17AROUu0GoizS8vPIfy3cP4oLus2Cz3xXOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758329260; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XnKyji4OH2RkxNdGkPKfbhqJbxENkMVCv/VpsWyBQek=; b=YjgG+Za6M+sg7PBLyzIAYPErIyVcscu3PceefQPn72whlK1NA0Kp1McF00VHqHGMs227GA NLprEc4/ck0NWAd7+5gJIJUx2YdFJkHh9xup2+fpotIiLsU1JPph2beM9/fbKob65vOHNE E9xJVV0EKg/ltsMx+iUgQ1p9Wnvokac2guN7n/7WKV4maCTLlvzyUcIU5jh07ThgGoHbiE N41E+tq180DDLeISdLj5QPoRp7UqhWv3ya0R8oQu3q+TSQKHd9ZrdYJc5P/YfwBJpjgPxB bjeTHor3Wd+eDprMz5R2Sb3GE2Jbqo2XYeLb5uJR2YIJOrjLvNwCPXcado+1Tg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758329260; a=rsa-sha256; cv=none; b=FfStsfrYuMxkpBC9qfDdY2n3sWCHE+BLjodb1s8QXUJxyzT5fGS9fwLXXpdZfE5bLEQYBP S8BSMmERP/y53ZKh8OcxY9nT/VHU28hYY6w0OtghxGkVqJBz/g1RKT6WFjNMozIiEKNOty Z+nhLrij75AkGXt20GFXIUDFxsOsBmd1AOV8K50DLlJwC54rGp+ODEVtdQPRUGivKQC3Uz Q7elYyRRTp0z5ZmmK3bTiDobhkQt0+2/VACsUvTLpAGLmzb6rBIZ+MCwvgyY63ZcQLva1C K9Hmc6SKXToBnLDdTvqIIy5sYRB1RUYC8e0gapkDwc/x88ZlqfA4IjuJOa3dXQ== 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 4cT9hD4cCRz1KSD; Sat, 20 Sep 2025 00:47: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 58K0leFQ017107; Sat, 20 Sep 2025 00:47:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58K0leL1017103; Sat, 20 Sep 2025 00:47:40 GMT (envelope-from git) Date: Sat, 20 Sep 2025 00:47:40 GMT Message-Id: <202509200047.58K0leL1017103@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Adrian Chadd Subject: git: a58f30788070 - main - [iwn] Don't originate NULL data frames in net80211 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: adrian X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a58f307880700fff7646416101c301e4d1784bfb Auto-Submitted: auto-generated The branch main has been updated by adrian: URL: https://cgit.FreeBSD.org/src/commit/?id=a58f307880700fff7646416101c301e4d1784bfb commit a58f307880700fff7646416101c301e4d1784bfb Author: Adrian Chadd AuthorDate: 2025-08-27 20:06:55 +0000 Commit: Adrian Chadd CommitDate: 2025-09-20 00:46:32 +0000 [iwn] Don't originate NULL data frames in net80211 Don't originate null data frames in net80211; leave that up to the iwn firmware. This should fix a bunch of cases where we're seeing out of sequence 802.11n aggregation data packets because net80211 power management stuff was triggering NULL data frames when we don't need them and messing up the firmware / ring buffer sequence number space. Differential Revision: https://reviews.freebsd.org/D52299 Locally tested: * 6205, STA mode --- sys/dev/iwn/if_iwn.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/dev/iwn/if_iwn.c b/sys/dev/iwn/if_iwn.c index 6270de3627e6..a949103f20d4 100644 --- a/sys/dev/iwn/if_iwn.c +++ b/sys/dev/iwn/if_iwn.c @@ -586,6 +586,8 @@ iwn_attach(device_t dev) /* Driver / firmware assigned sequence numbers */ ic->ic_flags_ext |= IEEE80211_FEXT_SEQNO_OFFLOAD; + /* Don't originate null data frames in net80211 */ + ic->ic_flags_ext |= IEEE80211_FEXT_NO_NULLDATA; /* Read MAC address, channels, etc from EEPROM. */ if ((error = iwn_read_eeprom(sc, ic->ic_macaddr)) != 0) { From nobody Sat Sep 20 00:47:41 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cT9hG1X30z67vTj; Sat, 20 Sep 2025 00:47: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 4cT9hF61pCz40NZ; Sat, 20 Sep 2025 00:47:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758329261; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bbBYHXv19mhUQX8TeM/rt+ob2kpNQP+McUoBEbYJpy0=; b=h+KwuqOP2WsXzxP4rIqbccZY+HEm7Kw3Mf8axmRygOrGJRVVK3KZV4CcqlpHyIrByCogEf hEtcjJiSvh/hbLbCl6spFMnKJMB20ak37Tn7nmy+UeaPbelrxxzup/XBh5mZrxtRjb5AVS /Fm+ZqaSfYqXtm2z8pfbbgyaErDxgTHsofn5FYrpwvsZaUNZqbEZNXzbsF5K7NLDkAHHNG IUitgYTom9mY33sVULrX4rgQ9MoFG1xwvglVftJrdLnqAOGQN2goPO5ENJXYHxVtAtm+7R RjB4xFmk7klhsVzDcq+buDntrkc8rvAcClAOXNd7Xxa7zAADWIvlEhLwUxJedA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758329261; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bbBYHXv19mhUQX8TeM/rt+ob2kpNQP+McUoBEbYJpy0=; b=wHDN+OnIov6f0029HqpwBTPJPcexwX1kWHMAnUmCz44vMoSs+kVmU34uWNQePGIxmJHvkX 83sqr9ywSnnNFVWafDE4nf7BbzBjASk7k9jC4aE3DNxhQxmSkm3y5iw/1EykasWGmGrSRv x1cIxXhxMeGyCqCARvo5vR/xYZV5sdmYgApvic24leZFwm0mkrG2mjiS7T+bqA9vi/8Y8g qoyWG/D8g3Xi2fHZKGkEaQtZRXXUoDuzVEUnhoQDBosP0/NQPIejWLgMOsCy2mtJo6ilqE gwtV+M4uMisWPJqUpVpFduNggsnM+2e2A3SA80vWU39iEizLciQVf2+OA+pkMw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758329261; a=rsa-sha256; cv=none; b=ZK+I64an1M6Ano1SxysoaznpI3c0ptuggpnh57qyWkCLdaboSBiundifEFt2kzNNHuRFIR ejIA3c6OeQODfKL5WUT9UwXR9oYbkHOm7LefQkLpfhCzYBscF7SK7TbY0IQrZiPcscHAbC WUG68L+xjAhGtnkLtANCqNeKSTIg1Hfkco9Y9kp0pYdrlnzWgpB6+2d55Ia50SL8z+Uweu 9WK4UyGQhi1v5V/EejQtYbMdboaIPQrkroZ1OwrGnsd4ARjTjC5M+s5lKxYKnpYOD2sxr6 Zj2uFMqC9TxDQ3lL3nhFlduiREvUnfx7yJXo42AFS1oOgRUpsY6TMkjGxfpAZQ== 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 4cT9hF4y0Xz1KqF; Sat, 20 Sep 2025 00:47: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 58K0lf9L017141; Sat, 20 Sep 2025 00:47:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58K0lfGb017138; Sat, 20 Sep 2025 00:47:41 GMT (envelope-from git) Date: Sat, 20 Sep 2025 00:47:41 GMT Message-Id: <202509200047.58K0lfGb017138@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Adrian Chadd Subject: git: db69f613ee45 - main - [iwx] tell net80211 not to originate NULL data frames List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: adrian X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: db69f613ee45c2614a38d40f3e82733e6247e13a Auto-Submitted: auto-generated The branch main has been updated by adrian: URL: https://cgit.FreeBSD.org/src/commit/?id=db69f613ee45c2614a38d40f3e82733e6247e13a commit db69f613ee45c2614a38d40f3e82733e6247e13a Author: Adrian Chadd AuthorDate: 2025-08-30 05:10:22 +0000 Commit: Adrian Chadd CommitDate: 2025-09-20 00:47:20 +0000 [iwx] tell net80211 not to originate NULL data frames Tell it not to originate NULL / QoS NULL data frames. The firmware will handle them here. Differential Revision: https://reviews.freebsd.org/D52300 Reviewed by: bz Locally tested: * 9260, STA mode --- sys/dev/iwx/if_iwx.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/dev/iwx/if_iwx.c b/sys/dev/iwx/if_iwx.c index 1fe531d69933..3b29c8e78b97 100644 --- a/sys/dev/iwx/if_iwx.c +++ b/sys/dev/iwx/if_iwx.c @@ -10474,6 +10474,8 @@ iwx_attach(device_t dev) ic->ic_flags_ext = IEEE80211_FEXT_SCAN_OFFLOAD; /* Enable seqno offload */ ic->ic_flags_ext |= IEEE80211_FEXT_SEQNO_OFFLOAD; + /* Don't send null data frames; let firmware do it */ + ic->ic_flags_ext |= IEEE80211_FEXT_NO_NULLDATA; ic->ic_txstream = 2; ic->ic_rxstream = 2; From nobody Sat Sep 20 04:18:46 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cTGMq2CpXz68Bb7; Sat, 20 Sep 2025 04:18: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 4cTGMq10SPz3RJ7; Sat, 20 Sep 2025 04:18:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758341927; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TMLo4r7LIdC6QuJWBBt3DNhsByQ2xLWpisk2P2+FsSo=; b=Miu91WnSEGLVZiaD+VvJVN73BJ5hKyjiSPmY04grnys3920C0YqD34qCIvUNvNoA6si2Rb fmemezsIBQtIbGuQGY77ZCQw2drEQMqxYMgAQyu184VS7EhvvU0yW7oOTVdDetXTwyilA7 UOzglbi95/+kNXJW1OVByrG+3HkjAvZIZUv4IEDjPsBxAvfNZjHuU/Mt5mDJ3cFBPH9GXk J3p5AOHt8JR6ss0mHi1kCHAusCwQrCHHTYpm0yq7vAi7LcYDloCwYqgmFMcY0RBBNgnMcc K19Gzd5bKMWg8pcraTrqSHtR/NRjNQTjsKrMG5ofs/SIyeLGSZ2quwuRPfJnKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758341927; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TMLo4r7LIdC6QuJWBBt3DNhsByQ2xLWpisk2P2+FsSo=; b=v6fNpLtJEkbqvp1GpyyYHwZdsDGG2r6gknGG7w3ugfjIR5NJmayoEbY9J329gv2v3EAwiy MC7L28B/mw7VOrH8kMq/cdzlLLTiXYxOQ3vBRVh3e8bLfH6+KH+e3liOgejPsruNuUGXU5 iheqX/COncJq2akDtciLeWNYpudH0DcL7Gs7FBnlrpgR270GWLtCI2QN21c/xRG5ZeZLrW ZUxFcqMlk1qMQFziagxM8i4FQmxhhv2rXXS/zjO0snxk9SEd3jreepUu+vLzTMykQ6TFWJ 4W7WNJnkQ7mksgbMYONxXoTba+9WVkl+1y1zs+Oq0ZefRfYpyMrJs04ujHGfhQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758341927; a=rsa-sha256; cv=none; b=GAoSZAmQKr4BTIpkINeJfM62MlZc5DKRC+OtHFDyx2biR+883a3DC8YMz8ZtO1j2ACK0qE 4m0uc1WXtNT1wQz+j+sX9SjGEKUxc85RRHujy421SMIEMgLpO7wlfe2XUw9WsGGkbzxTLY WKMgzEWdbofKcNkmERQGBBkFiTVVgSs5ro7rgLnG/PaOvIXWq781HEWTOGNOV8jYetK/T/ AGuD0XaNlhSwplx1Lon3qlpwJVosOyibtjpPm22qD1L5Eomom0w7/eNqeqqbExsWd5yNxw U4+4+iXLDXQeHvMAEB7AmATSGjIvJGA1qDEMWwYG7HRT7snCcglHlLeqHRPhSw== 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 4cTGMq0NhDz1RJJ; Sat, 20 Sep 2025 04:18: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 58K4IkPc013551; Sat, 20 Sep 2025 04:18:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58K4IklS013548; Sat, 20 Sep 2025 04:18:46 GMT (envelope-from git) Date: Sat, 20 Sep 2025 04:18:46 GMT Message-Id: <202509200418.58K4IklS013548@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 11205b085411 - main - remote coredump: fully initialize coredump_vnode_ctx and coredump_writer structs List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 11205b0854113eae68f725287b8501951d67be0f Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=11205b0854113eae68f725287b8501951d67be0f commit 11205b0854113eae68f725287b8501951d67be0f Author: Konstantin Belousov AuthorDate: 2025-09-19 15:38:07 +0000 Commit: Konstantin Belousov CommitDate: 2025-09-20 04:17:18 +0000 remote coredump: fully initialize coredump_vnode_ctx and coredump_writer structs Reported and tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week --- sys/kern/kern_sig.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c index da0efac0598d..8efc0886988b 100644 --- a/sys/kern/kern_sig.c +++ b/sys/kern/kern_sig.c @@ -2656,9 +2656,11 @@ ptrace_coredumpreq(struct thread *td, struct proc *p, return; } + memset(&wctx, 0, sizeof(wctx)); wctx.vp = tcq->tc_vp; wctx.fcred = NOCRED; + memset(&cdw, 0, sizeof(wctx)); cdw.ctx = &wctx; cdw.write_fn = core_vn_write; cdw.extend_fn = core_vn_extend; From nobody Sat Sep 20 04:23:18 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cTGT31Ljlz68BRB; Sat, 20 Sep 2025 04:23: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 4cTGT30YfWz3SC9; Sat, 20 Sep 2025 04:23:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758342199; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LXuPqiUeYvueSF43dZ7sTx6aWwWmnxWI262fZmJlzhg=; b=XG8fQbygpHRBl8QmRFXfU37e4a/PC2LXywdxXO8tMyBfa599gTla+AQSlnjG9nel3t258x N7vLledG9IPKL52D1kySTE7av+HLG22j6do/RyN966QGkBCJRk3A9iNjgXf2S/ZOJBhg0o 3gIxlJ7CJaj0QHkFBg/Hirep9fDg+9z5bl3KyjrXCyilkdnCafhvF5302Ucp63q09g/K+S b5V9qF5AjFbhJdFedkzlf7/VWH/tmDMtOIBRS/KbHc/7UTRep4OcmCPqv1NALob+6fMBHA 59v2FidXiGO1wxuCfi6wTycfrYyipFFTgC8WlRl0lkfmlDA0caTGVHSMtKoZeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758342199; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LXuPqiUeYvueSF43dZ7sTx6aWwWmnxWI262fZmJlzhg=; b=qR/Aglxh4AZAZbq3fse1ieErOgoAewJA6JMnr6EIKzrKh/y420TbyOWt7z0ZC0QsscYbye H3fuUqJYVsythgJ2lR5Sn1PQrL0siehalAm3Kx/sSmgrymUdx7A01X+gh4DGd8gR07ye95 rTLwWrhOZMRQ7dhBSx50u3Xd8L/v2HdmFEDmXI3wgoAMxYqaHUuqAMYDdebfBi8L0hXmcO Ki6ddPXLsrnhVEbHsuJug4UtdOc47SyXC6E8/DEjFFg8WaTISlueGf4DDAFfXjjl00kkQp 7akj1x08U6PfAbrhq+/zpU2etbxEJJZ5RORcdzAlW1v4olOLi2W+uJof8PaBCA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758342199; a=rsa-sha256; cv=none; b=kcTzL4yXXNnAn1tLsYOjzBBJ/Ev7EP0qFgQwy9krdRG3QnqQJGHnQEcrMyA1NczLBMoBpj UNjE+91iscQwAj2tpr4ZeOyS4TUY9UlMUPWfYLamEEwcerg3b3gQWuWcc9o0X3u7zdZaus Paq7HyfPGG2HNtss+L6cM78L5nFca/ARYgTHxT8/1ZB5ACwp958H1dghVf+aIxK1Rr5i+2 LXLq21l8pkA7Ed4/MS5ju34JlKz1Q62xU9G0tUvysQuS4FoLpZONglqVUhY7PDUfhRT2Q3 eTWg+xTvFg7u/zUf+KAby4OernuIZlfvKqcQkPClb3B+9Z4/EZStuXz5CpzEWg== 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 4cTGT261shz1R0S; Sat, 20 Sep 2025 04:23:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58K4NI8A030035; Sat, 20 Sep 2025 04:23:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58K4NImf030032; Sat, 20 Sep 2025 04:23:18 GMT (envelope-from git) Date: Sat, 20 Sep 2025 04:23:18 GMT Message-Id: <202509200423.58K4NImf030032@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Colin Percival Subject: git: 08adaf71e2e5 - main - release.sh: Bootstrap pkg from the ports tree List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 08adaf71e2e5a44ea27df0e2b09fbe8279a2523e Auto-Submitted: auto-generated The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=08adaf71e2e5a44ea27df0e2b09fbe8279a2523e commit 08adaf71e2e5a44ea27df0e2b09fbe8279a2523e Author: Colin Percival AuthorDate: 2025-09-20 04:20:07 +0000 Commit: Colin Percival CommitDate: 2025-09-20 04:23:13 +0000 release.sh: Bootstrap pkg from the ports tree When building OCI continers, we create a pkgbase repository; but we need pkg in order to do this, and it may not be fetchable. Bootstrap it from the ports tree instead. Note that this pkgbase repository is not the same one as we ship as part of the release build; this duplication of package-creation will be fixed at a later date. MFC after: 6 hours Sponsored by: https://www.patreon.com/cperciva --- release/release.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/release/release.sh b/release/release.sh index f4786685e612..3934d066420a 100755 --- a/release/release.sh +++ b/release/release.sh @@ -328,7 +328,9 @@ chroot_build_target() { eval chroot ${CHROOTDIR} make -C /usr/src ${RELEASE_WMAKEFLAGS} buildworld eval chroot ${CHROOTDIR} make -C /usr/src ${RELEASE_KMAKEFLAGS} buildkernel if [ -n "${WITH_OCIIMAGES}" ]; then - eval chroot ${CHROOTDIR} make -C /usr/src ${RELEASE_WMAKEFLAGS} packages + mkdir ${CHROOT}/tmp/ports ${CHROOT}/tmp/distfiles + eval chroot ${CHROOTDIR} make -C /usr/src ${RELEASE_WMAKEFLAGS} \ + BOOTSTRAP_PKG_FROM_PORTS=YES packages fi return 0 From nobody Sat Sep 20 12:07:15 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cTSmN14cZz67kmJ; Sat, 20 Sep 2025 12:07: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 4cTSmN0Qfxz3JxB; Sat, 20 Sep 2025 12:07:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758370036; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bF3wjlxdl16hjMRHZLAolHl0e0VnMhjSchjY/i7ZnOw=; b=jSuy/OA056A6qwm5oLRvQg631kSTVzko2l84q+VCYQFYct3Ub2YdxdwDIzJObEVEChD+w5 fcdL+uBzUkF9XOwbJpsk17682Nmhk25X5A98cRPWCxwzm0flbbtZgcTK5Dcso8CrW7J8sd PB+W2ikLILVYTwiLKkcna/snhE420RUWx04eT/ryi+dS8GGXkZe8eItUk14ThTtHAEqzPC Y+85OYWw9zsrXymFY/2J8quxL5fzeNGPOogGyVVHT4jWnB+hkCB1Osg43JBYIA5Jj0dDrt LjsDa1RitOvnlEipMnhqSKxGSuNjPQXsl2W66A+Bmc2aibE/jfEsl9CfSB1pqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758370036; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bF3wjlxdl16hjMRHZLAolHl0e0VnMhjSchjY/i7ZnOw=; b=S6KyBEP1oitl53jhkuBxyWEN52CoLA125rb5H7ZNZbFRgEP76cIeDKXu74gf3ytmN6M7gZ JJgdU/ZKQ5AFuzfwaKW94d1BycdFbfcEEjHAiooySUJpYxr5rNXW3UwNevd7q5nM8JeBLZ MY4dyFqHJCJxutqXkuDRUwQhHUBWwV8T93OpduzLqQXBYC3u9dUnuTeeX1y9M+FydXft9/ eRrsBwshdDelh9vPH9WCvpaK8KBfwjDcLrz/sj2FujrRKtLr8ICG+SOZhrw8X1tc8A08YF 3/U4FvN7ehjx2swRw5Ls4oVEAvqnSUhAPUJRDzNooBqOIze2EwAbKQQeyP/IWQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758370036; a=rsa-sha256; cv=none; b=IN/mu23sNPBZYDIDpTSm6kGnsV6IdKfpRaNoxwOoPr5roK9jbfWAsNxams3dETApCGVinH TjDW/yTsW5qLAByd3XsqHf1UDfj4sngK9yxw6w0rCWhipXiHY33HXLaWZlzsOuMWE6Xzjz 344UdxDmhg6bmlnWuzl2OKLlNLCJ3cv5NnOATepWVI089EaGFkN7jLRQmdkpfIBrYq4/1U IZeQre5ZMBsBkC6mw7+N3hqZ4VrdIAV0uSJDVu9h3GqRhi0WjP3QZZZLxpY6mf9IR/y65+ 0qzAjchaTnTgeCXnQ8W4VXqBDOOcUH6nNP41/vbTp1ouxNuoC/twujtMb2O7hQ== 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 4cTSmM71XczBrS; Sat, 20 Sep 2025 12:07: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 58KC7FKb096912; Sat, 20 Sep 2025 12:07:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58KC7FSg096909; Sat, 20 Sep 2025 12:07:15 GMT (envelope-from git) Date: Sat, 20 Sep 2025 12:07:15 GMT Message-Id: <202509201207.58KC7FSg096909@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Colin Percival Subject: git: f0b1e0470af5 - main - release.sh: Use mkdir -p List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f0b1e0470af5c89c1deac5e6788fe7a8d0063a6f Auto-Submitted: auto-generated The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=f0b1e0470af5c89c1deac5e6788fe7a8d0063a6f commit f0b1e0470af5c89c1deac5e6788fe7a8d0063a6f Author: Colin Percival AuthorDate: 2025-09-20 12:05:48 +0000 Commit: Colin Percival CommitDate: 2025-09-20 12:05:48 +0000 release.sh: Use mkdir -p Don't fail if directories already exist. Fixes: 08adaf71e2e5 ("release.sh: Bootstrap pkg from the ports tree") MFC after: 6 hours Sponsored by: https://www.patreon.com/cperciva --- release/release.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release/release.sh b/release/release.sh index 3934d066420a..0815c7c78d14 100755 --- a/release/release.sh +++ b/release/release.sh @@ -328,7 +328,7 @@ chroot_build_target() { eval chroot ${CHROOTDIR} make -C /usr/src ${RELEASE_WMAKEFLAGS} buildworld eval chroot ${CHROOTDIR} make -C /usr/src ${RELEASE_KMAKEFLAGS} buildkernel if [ -n "${WITH_OCIIMAGES}" ]; then - mkdir ${CHROOT}/tmp/ports ${CHROOT}/tmp/distfiles + mkdir -p ${CHROOT}/tmp/ports ${CHROOT}/tmp/distfiles eval chroot ${CHROOTDIR} make -C /usr/src ${RELEASE_WMAKEFLAGS} \ BOOTSTRAP_PKG_FROM_PORTS=YES packages fi From nobody Sat Sep 20 12:24:56 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cTT8n14Zdz67lkF; Sat, 20 Sep 2025 12:24: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 4cTT8n0SlPz3LKB; Sat, 20 Sep 2025 12:24:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758371097; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZttslCqm17m0+3ufrW02MxI5NBsRLOjID1gvSvx72bI=; b=sHWDgstIylL1QhSUDUdux11mrApLJhdGPZNlYc2YC/RmGXzi//Or3mML6bHZ0tSf8n9Gu+ vcWEK8xJ+VEyY03DjNonYCQI+Sk2p1ADtPjpZrFM8tRSyJZusAoZAVg2Xc4tEuSsvS/yRf 2jB3XaPqmG13S+SI2kUxxxCQLnBLM2A3Gb+RX7KBvkXE5yD4SeHm2LZz4Cd9jGhGSufEeY 4PZ+zjQQZVPSLDUu1hPWvb0U1npx7Vv7gOcH/iZmqALbJnaimEhq0gKT/WeLMorPz30k8i OWq/MigdqXGNdjjipz80MqBvmLO4CtMOXvq5Wfk7ybnwS9p2PVk6VArlokC90g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758371097; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZttslCqm17m0+3ufrW02MxI5NBsRLOjID1gvSvx72bI=; b=BX7YYIrvfhr+BrMpQ9msmei/MtI1MBRe+cMcWjrQ2lMQ7os1LODDmzpfAEZpjR6X7ZtIKS /6qeFOYGBAFQHDz1pgtCICvyR+ES7ltzON0W7Aj9ytixJwT8SE1nbEXNz+QXplYnMgGXoR ZXSV4mrHUDKvDDAmjRiZGWyQtsa94jpFFsOZ6y/xnNS/MdqlAFamU9lVrEXiGJj54s2dNX nZJU+VY7E7q6UQyjFkGfYTjZRWRI12RKA7w646/+/G5GzU7XVcKCeLxIVq1QZ9bUuCabDt puC6got5eHrODRV/xrklWBX8tWWzUuWe1MYBJVEot7c5Kj7hPkweyjvSoic3Sw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758371097; a=rsa-sha256; cv=none; b=nezM1+B99uvf45jao3tVkDFyDyQLcKSxPcS1A/DiS0M5+TYaIJZ6M56h48q6dSr78mJU4x ERgdFZ3CNmjMzNfdHi0klo8AQ8RNJLESCXJvxUZCk5WgowD5VTFuy6jQNBTUK1VY0FRa59 xNmPF/RQvy3WfygLsyB1e4Ql+MJ3zOHaiYIuAoVllswT4aHYEiMlbkejILW+wnMTdFeRXf eKrPPym6iG04wfQ7glWI4+sPKdYWeymzX5NRXiMqK3kWwBYKOpvmmBT6uotlAvcnjjcAEa 3ScUyVILCF2O4LHVVESTEJGfm2Sg9MQo8eMWJ/I6NQMD8fz0wDxEGcrbJoNygQ== 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 4cTT8m6v3wzBlX; Sat, 20 Sep 2025 12:24:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58KCOupI033437; Sat, 20 Sep 2025 12:24:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58KCOuVt033434; Sat, 20 Sep 2025 12:24:56 GMT (envelope-from git) Date: Sat, 20 Sep 2025 12:24:56 GMT Message-Id: <202509201224.58KCOuVt033434@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 7ea59a07046a - main - sanitizers: Provide wrappers for atomic_testandset_acq_long List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7ea59a07046a0bf25d4fccb456715dffaae52021 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=7ea59a07046a0bf25d4fccb456715dffaae52021 commit 7ea59a07046a0bf25d4fccb456715dffaae52021 Author: Mark Johnston AuthorDate: 2025-09-19 22:54:20 +0000 Commit: Mark Johnston CommitDate: 2025-09-20 12:21:04 +0000 sanitizers: Provide wrappers for atomic_testandset_acq_long Noticed when building a kernel with options RANDOM_FENESTRASX. MFC after: 1 week --- sys/kern/subr_asan.c | 1 + sys/kern/subr_msan.c | 1 + 2 files changed, 2 insertions(+) diff --git a/sys/kern/subr_asan.c b/sys/kern/subr_asan.c index 464efda1e91a..fee6c1a844e2 100644 --- a/sys/kern/subr_asan.c +++ b/sys/kern/subr_asan.c @@ -835,6 +835,7 @@ ASAN_ATOMIC_FUNC_TESTANDSET(32, uint32_t); ASAN_ATOMIC_FUNC_TESTANDSET(64, uint64_t); ASAN_ATOMIC_FUNC_TESTANDSET(int, u_int); ASAN_ATOMIC_FUNC_TESTANDSET(long, u_long); +ASAN_ATOMIC_FUNC_TESTANDSET(acq_long, u_long); ASAN_ATOMIC_FUNC_TESTANDSET(ptr, uintptr_t); ASAN_ATOMIC_FUNC_SWAP(32, uint32_t); diff --git a/sys/kern/subr_msan.c b/sys/kern/subr_msan.c index a3238b61482b..883dbd2b7604 100644 --- a/sys/kern/subr_msan.c +++ b/sys/kern/subr_msan.c @@ -1301,6 +1301,7 @@ MSAN_ATOMIC_FUNC_TESTANDSET(32, uint32_t); MSAN_ATOMIC_FUNC_TESTANDSET(64, uint64_t); MSAN_ATOMIC_FUNC_TESTANDSET(int, u_int); MSAN_ATOMIC_FUNC_TESTANDSET(long, u_long); +MSAN_ATOMIC_FUNC_TESTANDSET(acq_long, u_long); MSAN_ATOMIC_FUNC_TESTANDSET(ptr, uintptr_t); MSAN_ATOMIC_FUNC_SWAP(32, uint32_t); From nobody Sat Sep 20 12:24:57 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cTT8p2gf3z67lnt; Sat, 20 Sep 2025 12:24: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 4cTT8p0YzRz3L72; Sat, 20 Sep 2025 12:24:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758371098; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=x3Ms7pYvBf1ZY0FaUDKEFY1XpXEL2Z9zcqn70dFC4EI=; b=XKkAraPHI/r7LQ6IotUSJ6/Sqsi8ynz8aiVM+jgMViXVa29UAdf40LYNwDfpeHy0Xtu4Sl VHPDq0OvyLxLcBHr1YBIM/FVxTpWZeAe6rVofrtnVbkTMtPPwOzeGDvVmlklFnGZgSU8hg KWoWa2ls+oeHCfLJHlao4IWZe/rohnsKzXCwmm6FKDIiQe1l8f7mcwLXXg3h4XcjSuROOp cAAO1DjHI/9r9tT58BqrA2GfjdcH4XeWlU9YMK0sc8eQ4AfwLi4TaG7Spc8+l6HZ7wbn2o DVoSUdsy57//3dCWVDwqWEoI4FHEnVDXGFaDX5sqjPu2z8ppjFu4NbxpkyoHMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758371098; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=x3Ms7pYvBf1ZY0FaUDKEFY1XpXEL2Z9zcqn70dFC4EI=; b=QCWiGxKBo3x333OC8qI/I3d70L/l1fgRxfzhE2mX6kWuavhxTDPuwYMSb/oLQsAWopmpT4 tOl0nN1lbJ3JXK7Gre3KobQp1KVI5Nd0FP+br2yS5z8ArrDJWvoDF9zYZveAwWFmP0b7My +oYcEuvYNV8Eq+xWGD59lVGmASlUZlw4MOSVREQwn/8SznFl45g4wOAW7KeePxVqXeN1mW GPtCyXZvldRIa/m6RnZFYFbKdrbVopJ1xY9pFLkVxbSSblOOYVNkqkFhsM9JLjgv5v/ODb gr1omDXlafy/MZgNpqzNQBX9vgpq0ERqVyEJJ+FKZV9VCvZ2hBq7bzP925DBQg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758371098; a=rsa-sha256; cv=none; b=KFFFVMHiSbg7mbPDFppf5V95Fcxr5Jf5xHyXlxtcT9ujWH2U3J6f/VAqPfHIw3XZm5QKT9 CV7ZJ3pR43byaQbYirgUtAAWm2SMnQl8/aqOKeFeVdyPQVC2GjwK7jr73UNjPzBrLMEp/q wFjnPntcR/6udMDV4KRHAzQVtBGRodlSoMvmKgTlYsr6AZl5xQyr8aVO7DBNujGs16SzNF yGuM3n6Gh9O6j2prnC1TkGR7KepKsxc/bym/BQN/whbI5gWK9OruOZYpcJTlJu7qs2YTIO 51ySsBwuDwnSO8BSv2AwqEmtSScYEgcAwCVaLih6FJLvFUgHiu3dQLoY/gPXYg== 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 4cTT8p09zyzCDd; Sat, 20 Sep 2025 12:24: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 58KCOvRf033471; Sat, 20 Sep 2025 12:24:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58KCOv1x033468; Sat, 20 Sep 2025 12:24:57 GMT (envelope-from git) Date: Sat, 20 Sep 2025 12:24:57 GMT Message-Id: <202509201224.58KCOv1x033468@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 174d5d9397c4 - main - random: fxrng: Add an entry for RANDOM_RANDOMDEV to the source table List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 174d5d9397c492aff67f7ad49e130039697dc1dd Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=174d5d9397c492aff67f7ad49e130039697dc1dd commit 174d5d9397c492aff67f7ad49e130039697dc1dd Author: Mark Johnston AuthorDate: 2025-09-19 22:58:22 +0000 Commit: Mark Johnston CommitDate: 2025-09-20 12:21:57 +0000 random: fxrng: Add an entry for RANDOM_RANDOMDEV to the source table Otherwise we get a NULL pointer dereference when writing to /dev/random. PR: 288826 Reviewed by: cem MFC after: 1 week Fixes: fa8db724ae6e ("random: Treat writes to /dev/random as separate from /entropy") Differential Revision: https://reviews.freebsd.org/D52633 --- sys/dev/random/fenestrasX/fx_pool.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/dev/random/fenestrasX/fx_pool.c b/sys/dev/random/fenestrasX/fx_pool.c index d2e6f0db71ee..f4ad1e295d54 100644 --- a/sys/dev/random/fenestrasX/fx_pool.c +++ b/sys/dev/random/fenestrasX/fx_pool.c @@ -164,6 +164,9 @@ static const struct fxrng_ent_char { [RANDOM_CALLOUT] = { .entc_cls = &fxrng_lo_push, }, + [RANDOM_RANDOMDEV] = { + .entc_cls = &fxrng_lo_push, + }, [RANDOM_PURE_OCTEON] = { .entc_cls = &fxrng_hi_push, /* Could be made pull. */ }, From nobody Sat Sep 20 12:31:52 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cTTJm4cRlz67mCn; Sat, 20 Sep 2025 12:31: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 4cTTJm4Pb6z3MTQ; Sat, 20 Sep 2025 12:31:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758371512; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qMTU21e7zlEhxvrTFRhGgf8zwMsCqomgcHebYpT+3JQ=; b=NN7K9RH5sr9F/kMQ5IsDHMJ69lgfJ4YIpPy7xdxNPlczmxXvpXoOPaEjioqh7rG/bjRuTL iHCfRzSvB2XuDWTsgn09B0KaMkAD09Socu3mHC5L/nfWjyqBy94frI1BtQpriNaqm+xZqp qmyxJmLBT/mVegzr38BuWpf+7n2krwAWw3noVg9WnoyaJUsfhVhrTDsJgYG1kBsU7uMlNS a4NnQPfpfExM0I1ehK4v3tENL9+KxNYUO79w5c4534EyEH3kY0ZBeTi9sp5zDu+hPGwQuJ nnZzbf43K6EmAHaWyhIkhSKEH0UyU+K5mlCFLh6TDSd2IPNm8Ql5IUPR0YtLIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758371512; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qMTU21e7zlEhxvrTFRhGgf8zwMsCqomgcHebYpT+3JQ=; b=iLhIYps/ObcdGjGlivunY3Wn1r8LQYOLEzSAA4ZJz8LkERUlpjivwqprDvC40vOBwmmuy4 /QSKogCQ9r8s9PddkkhYjCxadY4LalMxgasMSPEwI8VK5yPpcHiz+me4BLGNT8enuVlhgd zfpFpgz/PlsIN0Pgdhs64RFfvOxWeRHf/9cPotJzdGuyBZO3h6IRO1FNYqpppzWuhDPzcl dE/BCbZ5FUMynj2/jsocneQiVBAMHQiVl03yZr0NFkUOu7GW/927UP+h83NhNaEW7PSqor kkpd1gspfx+TDx6/eT3hKHfBlatytW+gu0t55HSQj97xDqieGKystN80e3zS1A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758371512; a=rsa-sha256; cv=none; b=PKDDgOacNux2qsp8IMcJ+hg8vMhj6nBZOolHitCp4xGsmZ04emm7R0tkDgo8H4/QxRVFX7 Ps/nNCJzQPXXC7g5t5ROtrfx7Rb+vD5bxg5+ynraPkx+VHuWGxTWKZkmTD4+5lURAXhhug R9pKvEhxZtOW3g5YSMzHOo/olmNZUYOb6UwwIEQwjfX37d+dfi5VCK7lOxyb4BzBfPFq2q MQ+FBX94KX+HWr2VYOXDwhPoyURj3l6b3X4P4g8+KtqBnC4QYZZuzX36MjrUC68/EYPfMl p+qAT+FZD3VBRAic9ILLninq6zYi+ILTNuM7TL+MPvhIJHE1Nh+EUvPZzZR4Gw== 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 4cTTJm3zZrzCS8; Sat, 20 Sep 2025 12:31: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 58KCVqio047483; Sat, 20 Sep 2025 12:31:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58KCVqBC047480; Sat, 20 Sep 2025 12:31:52 GMT (envelope-from git) Date: Sat, 20 Sep 2025 12:31:52 GMT Message-Id: <202509201231.58KCVqBC047480@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Guido Falsi Subject: git: 31ec8b6407fd - main - sys/netinet6: Implement RFC 7217 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: madpilot X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 31ec8b6407fdd5a87d70265762457c67ce618283 Auto-Submitted: auto-generated The branch main has been updated by madpilot: URL: https://cgit.FreeBSD.org/src/commit/?id=31ec8b6407fdd5a87d70265762457c67ce618283 commit 31ec8b6407fdd5a87d70265762457c67ce618283 Author: Guido Falsi AuthorDate: 2025-09-20 12:26:41 +0000 Commit: Guido Falsi CommitDate: 2025-09-20 12:31:44 +0000 sys/netinet6: Implement RFC 7217 Implement RFC 7217 (A Method for Generating Semantically Opaque Interface Identifiers with IPv6 Stateless Address Autoconfiguration (SLAAC)) in our IPv6 stack. A new ifconfig `stableaddr` flag is added to enable the feature on interfaces, which defaults to on or off for new interfaces based on the sysctl `net.inet6.ip6.use_stableaddr` (off by default, so this commit causes no change in behavior with default settings). The algorithm follows the RFC in its logic, using SHA256-HMAC as the algorithm to derive addresses so as to provide code that can be leveraged by future implentations of RFC 8981, leveraging the `hostuuid` as the secret. The source of the hostidentifier can be configured using the sysctl `net.inet6.ip6.stableaddr_netifsource`, while the number of retries generating a new address in case of collision can be configured using the `net.inet6.ip6.stableaddr_maxretries` sysctl (default 3). Documentation about all these flags is added to the ifconfig(8) man page. Reviewed by: cognet, glebius, hrs Tested by: zarychtam@plan-b.pwste.edu.pl Approved by: cognet, glebius Relnotes: yes Differential Revision: https://reviews.freebsd.org/D49681 --- sbin/ifconfig/af_inet6.c | 2 + sbin/ifconfig/af_nd6.c | 1 + sbin/ifconfig/ifconfig.8 | 30 +++++ sys/netinet6/in6.h | 3 + sys/netinet6/in6_ifattach.c | 275 +++++++++++++++++++++++++++++++++++++------- sys/netinet6/in6_ifattach.h | 2 + sys/netinet6/in6_proto.c | 10 ++ sys/netinet6/ip6_input.c | 1 + sys/netinet6/ip6_var.h | 12 ++ sys/netinet6/nd6.c | 9 ++ sys/netinet6/nd6.h | 2 + sys/netinet6/nd6_nbr.c | 35 +++++- sys/netinet6/nd6_rtr.c | 128 +++++++++++++-------- usr.sbin/ndp/ndp.c | 7 ++ 14 files changed, 423 insertions(+), 94 deletions(-) diff --git a/sbin/ifconfig/af_inet6.c b/sbin/ifconfig/af_inet6.c index e0f34f0c4d82..9386f5eaf513 100644 --- a/sbin/ifconfig/af_inet6.c +++ b/sbin/ifconfig/af_inet6.c @@ -726,6 +726,8 @@ static struct cmd inet6_cmds[] = { DEF_CMD_ARG("pltime", setip6pltime), DEF_CMD_ARG("vltime", setip6vltime), DEF_CMD("eui64", 0, setip6eui64), + DEF_CMD("stableaddr", ND6_IFF_STABLEADDR, setnd6flags), + DEF_CMD("-stableaddr", -ND6_IFF_STABLEADDR, setnd6flags), #ifdef EXPERIMENTAL DEF_CMD("ipv6_only", ND6_IFF_IPV6_ONLY_MANUAL,setnd6flags), DEF_CMD("-ipv6_only", -ND6_IFF_IPV6_ONLY_MANUAL,setnd6flags), diff --git a/sbin/ifconfig/af_nd6.c b/sbin/ifconfig/af_nd6.c index 2899ad6a0778..fb7e72028e2e 100644 --- a/sbin/ifconfig/af_nd6.c +++ b/sbin/ifconfig/af_nd6.c @@ -66,6 +66,7 @@ static const char *ND6BITS[] = { [9] = "IPV6_ONLY", [10] = "IPV6_ONLY_MANUAL", #endif + [11] = "STABLEADDR", [15] = "DEFAULTIF", }; diff --git a/sbin/ifconfig/ifconfig.8 b/sbin/ifconfig/ifconfig.8 index c4184ba61ee4..fafb77e1ca6c 100644 --- a/sbin/ifconfig/ifconfig.8 +++ b/sbin/ifconfig/ifconfig.8 @@ -1004,6 +1004,36 @@ Set a flag to disable Duplicate Address Detection. .It Cm -no_dad Clear a flag .Cm no_dad . +.It Cm stableaddr +Set a flag to create SLAAC addresses using a stable algorithm according to RFC 7217 +The +.Xr sysctl 8 +variable +.Va net.inet6.ip6.use_stableaddr +controls whether this flag is set by default or not for newly created interfaces. +To get consistent defaults for interfaces created at boot it should be set as a tunable via loader.conf(8). +The +.Xr sysctl 8 +variable +.Va net.inet6.ip6.stableaddr_maxretries +sets the maximum number of retries to generate a unique IPv6 address to be performed in case of DAD failures. +This defaults to 3 which is also the reccommended minimum value. +The interface ID source can be configured using the +.Xr sysctl 8 +variable +.Va net.inet6.ip6.stableaddr_netifsource: +.Bl -tag -compact +.It Cm 0 +uses the interface name string (the default) +.It Cm 1 +uses the interface ID +.It Cm 2 +uses the MAC address of the interface (if one can be obtained for it) +.El +.Pp +.It Cm -stableaddr +Clear the flag +.Cm stableaddr . .El .Ss IPv6 Parameters The following parameters are specific for IPv6 addresses. diff --git a/sys/netinet6/in6.h b/sys/netinet6/in6.h index 67c3ccbb1be8..a7fe03b9c3d7 100644 --- a/sys/netinet6/in6.h +++ b/sys/netinet6/in6.h @@ -609,6 +609,8 @@ struct ip6_mtuinfo { /* IPV6CTL_RTMINEXPIRE 26 deprecated */ /* IPV6CTL_RTMAXCACHE 27 deprecated */ +#define IPV6CTL_STABLEADDR_NETIFSRC 30 /* semantically opaque addresses (RFC7217) hash algo netif parameter src */ +#define IPV6CTL_STABLEADDR_MAXRETRIES 31 /* semantically opaque addresses (RFC7217) max DAD retries */ #define IPV6CTL_USETEMPADDR 32 /* use temporary addresses (RFC3041) */ #define IPV6CTL_TEMPPLTIME 33 /* preferred lifetime for tmpaddrs */ #define IPV6CTL_TEMPVLTIME 34 /* valid lifetime for tmpaddrs */ @@ -617,6 +619,7 @@ struct ip6_mtuinfo { #define IPV6CTL_PREFER_TEMPADDR 37 /* prefer temporary addr as src */ #define IPV6CTL_ADDRCTLPOLICY 38 /* get/set address selection policy */ #define IPV6CTL_USE_DEFAULTZONE 39 /* use default scope zone */ +#define IPV6CTL_USESTABLEADDR 40 /* use semantically opaque addresses (RFC7217) */ #define IPV6CTL_MAXFRAGS 41 /* max fragments */ #if 0 diff --git a/sys/netinet6/in6_ifattach.c b/sys/netinet6/in6_ifattach.c index cc149616006e..57fe12a1c93b 100644 --- a/sys/netinet6/in6_ifattach.c +++ b/sys/netinet6/in6_ifattach.c @@ -33,6 +33,7 @@ #include #include +#include #include #include #include @@ -43,6 +44,7 @@ #include #include #include +#include #include #include @@ -79,6 +81,8 @@ VNET_DEFINE(int, ip6_auto_linklocal) = 1; /* enabled by default */ VNET_DEFINE(struct callout, in6_tmpaddrtimer_ch); #define V_in6_tmpaddrtimer_ch VNET(in6_tmpaddrtimer_ch) +VNET_DEFINE(int, ip6_stableaddr_netifsource) = IP6_STABLEADDR_NETIFSRC_NAME; /* Use interface name by default */ + VNET_DECLARE(struct inpcbinfo, ripcbinfo); #define V_ripcbinfo VNET(ripcbinfo) @@ -98,6 +102,9 @@ static void in6_purgemaddrs(struct ifnet *); #define IFID_LOCAL(in6) (!EUI64_LOCAL(in6)) #define IFID_UNIVERSAL(in6) (!EUI64_UNIVERSAL(in6)) +#define HMAC_IPAD 0x36 +#define HMAC_OPAD 0x5C + /* * Generate a last-resort interface identifier, when the machine has no * IEEE802/EUI64 address sources. @@ -147,22 +154,14 @@ get_rand_ifid(struct ifnet *ifp, struct in6_addr *in6) } -/* - * Get interface identifier for the specified interface. - * XXX assumes single sockaddr_dl (AF_LINK address) per an interface - * - * in6 - upper 64bits are preserved +/** + * Get interface link level sockaddr */ -int -in6_get_hw_ifid(struct ifnet *ifp, struct in6_addr *in6) +static struct sockaddr_dl * +get_interface_link_level(struct ifnet *ifp) { struct ifaddr *ifa; struct sockaddr_dl *sdl; - u_int8_t *addr; - size_t addrlen; - static u_int8_t allzero[8] = { 0, 0, 0, 0, 0, 0, 0, 0 }; - static u_int8_t allone[8] = - { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; NET_EPOCH_ASSERT(); @@ -175,14 +174,30 @@ in6_get_hw_ifid(struct ifnet *ifp, struct in6_addr *in6) if (sdl->sdl_alen == 0) continue; - goto found; + return sdl; } - return -1; + return NULL; +} + +/* + * Get hwaddr from link interface + */ +static uint8_t * +in6_get_interface_hwaddr(struct ifnet *ifp, size_t *len) +{ + struct sockaddr_dl *sdl; + u_int8_t *addr; + static u_int8_t allzero[8] = { 0, 0, 0, 0, 0, 0, 0, 0 }; + static u_int8_t allone[8] = + { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; + + sdl = get_interface_link_level(ifp); + if (sdl == NULL) + return (NULL); -found: addr = LLADDR(sdl); - addrlen = sdl->sdl_alen; + *len = sdl->sdl_alen; /* get EUI64 */ switch (ifp->if_type) { @@ -193,36 +208,21 @@ found: case IFT_IEEE1394: /* IEEE802/EUI64 cases - what others? */ /* IEEE1394 uses 16byte length address starting with EUI64 */ - if (addrlen > 8) - addrlen = 8; + if (*len > 8) + *len = 8; /* look at IEEE802/EUI64 only */ - if (addrlen != 8 && addrlen != 6) - return -1; + if (*len != 8 && *len != 6) + return (NULL); /* * check for invalid MAC address - on bsdi, we see it a lot * since wildboar configures all-zero MAC on pccard before * card insertion. */ - if (bcmp(addr, allzero, addrlen) == 0) - return -1; - if (bcmp(addr, allone, addrlen) == 0) - return -1; - - /* make EUI64 address */ - if (addrlen == 8) - bcopy(addr, &in6->s6_addr[8], 8); - else if (addrlen == 6) { - in6->s6_addr[8] = addr[0]; - in6->s6_addr[9] = addr[1]; - in6->s6_addr[10] = addr[2]; - in6->s6_addr[11] = 0xff; - in6->s6_addr[12] = 0xfe; - in6->s6_addr[13] = addr[3]; - in6->s6_addr[14] = addr[4]; - in6->s6_addr[15] = addr[5]; - } + if (memcmp(addr, allzero, *len) == 0 || memcmp(addr, allone, *len) == 0) + return (NULL); + break; case IFT_GIF: @@ -233,16 +233,51 @@ found: * identifier source (can be renumbered). * we don't do this. */ - return -1; + return (NULL); case IFT_INFINIBAND: - if (addrlen != 20) - return -1; - bcopy(addr + 12, &in6->s6_addr[8], 8); + if (*len != 20) + return (NULL); + *len = 8; + addr += 12; break; default: + return (NULL); + } + + return addr; +} + + /* + * Get interface identifier for the specified interface. + * XXX assumes single sockaddr_dl (AF_LINK address) per an interface + * + * in6 - upper 64bits are preserved + */ +int +in6_get_hw_ifid(struct ifnet *ifp, struct in6_addr *in6) +{ + size_t hwaddr_len; + uint8_t *hwaddr; + static u_int8_t allzero[8] = { 0, 0, 0, 0, 0, 0, 0, 0 }; + + hwaddr = in6_get_interface_hwaddr(ifp, &hwaddr_len); + if (hwaddr == NULL || (hwaddr_len != 6 && hwaddr_len != 8)) return -1; + + /* make EUI64 address */ + if (hwaddr_len == 8) + memcpy(&in6->s6_addr[8], hwaddr, 8); + else if (hwaddr_len == 6) { + in6->s6_addr[8] = hwaddr[0]; + in6->s6_addr[9] = hwaddr[1]; + in6->s6_addr[10] = hwaddr[2]; + in6->s6_addr[11] = 0xff; + in6->s6_addr[12] = 0xfe; + in6->s6_addr[13] = hwaddr[3]; + in6->s6_addr[14] = hwaddr[4]; + in6->s6_addr[15] = hwaddr[5]; } /* sanity check: g bit must not indicate "group" */ @@ -263,6 +298,153 @@ found: return 0; } +/* + * Validate generated interface id to make sure it does not fall in any reserved range: + * + * https://www.iana.org/assignments/ipv6-interface-ids/ipv6-interface-ids.xhtml + */ +static bool +validate_ifid(uint8_t *iid) +{ + static uint8_t allzero[8] = { 0, 0, 0, 0, 0, 0, 0, 0 }; + static uint8_t reserved_eth[5] = { 0x02, 0x00, 0x5E, 0xFF, 0xFE }; + static uint8_t reserved_anycast[7] = { 0xFD, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }; + + /* Subnet-Router Anycast (RFC 4291)*/ + if (memcmp(iid, allzero, 8) == 0) + return (false); + + /* + * Reserved IPv6 Interface Identifiers corresponding to the IANA Ethernet Block (RFC 4291) + * and + * Proxy Mobile IPv6 (RFC 6543) + */ + if (memcmp(iid, reserved_eth, 5) == 0) + return (false); + + /* Reserved Subnet Anycast Addresses (RFC 2526) */ + if (memcmp(iid, reserved_anycast, 7) == 0 && iid[7] >= 0x80) + return (false); + + return (true); +} + +/* + * Get interface identifier for the specified interface, according to + * RFC 7217 Stable and Opaque IDs with SLAAC, using HMAC-SHA256 digest. + * + * in6 - upper 64bits are preserved + */ +bool +in6_get_stableifid(struct ifnet *ifp, struct in6_addr *in6, int prefixlen) +{ + struct sockaddr_dl *sdl; + const uint8_t *netiface; + size_t netiface_len, hostuuid_len; + uint8_t hostuuid[HOSTUUIDLEN + 1], hmac_key[SHA256_BLOCK_LENGTH], + hk_ipad[SHA256_BLOCK_LENGTH], hk_opad[SHA256_BLOCK_LENGTH]; + uint64_t dad_failures; + SHA256_CTX ctxt; + + switch (V_ip6_stableaddr_netifsource) { + case IP6_STABLEADDR_NETIFSRC_ID: + sdl = get_interface_link_level(ifp); + if (sdl == NULL) + return (false); + netiface = (uint8_t *)&LLINDEX(sdl); + netiface_len = sizeof(u_short); /* real return type of LLINDEX */ + break; + + case IP6_STABLEADDR_NETIFSRC_MAC: + netiface = in6_get_interface_hwaddr(ifp, &netiface_len); + if (netiface == NULL) + return (false); + break; + + case IP6_STABLEADDR_NETIFSRC_NAME: + default: + netiface = (const uint8_t *)if_name(ifp); + netiface_len = strlen(netiface); + break; + } + + /* Use hostuuid as constant "secret" key */ + getcredhostuuid(curthread->td_ucred, hostuuid, sizeof(hostuuid)); + if (strncmp(hostuuid, DEFAULT_HOSTUUID, sizeof(hostuuid)) == 0) { + // If hostuuid is not set, use a random value + arc4rand(hostuuid, HOSTUUIDLEN, 0); + hostuuid[HOSTUUIDLEN] = '\0'; + } + hostuuid_len = strlen(hostuuid); + + dad_failures = counter_u64_fetch(ND_IFINFO(ifp)->dad_failures); + + /* + * RFC 7217 section 7 + * + * default max retries + */ + if (dad_failures > V_ip6_stableaddr_maxretries) + return (false); + + /* + * Use hostuuid as basis for HMAC key + */ + memset(hmac_key, 0, sizeof(hmac_key)); + if (hostuuid_len <= SHA256_BLOCK_LENGTH) { + /* copy to hmac key variable, zero padded */ + memcpy(hmac_key, hostuuid, hostuuid_len); + } else { + /* if longer than block length, use hash of the value, zero padded */ + SHA256_Init(&ctxt); + SHA256_Update(&ctxt, hostuuid, hostuuid_len); + SHA256_Final(hmac_key, &ctxt); + } + /* XOR key with ipad and opad values */ + for (uint16_t i = 0; i < sizeof(hmac_key); i++) { + hk_ipad[i] = hmac_key[i] ^ HMAC_IPAD; + hk_opad[i] = hmac_key[i] ^ HMAC_OPAD; + } + + /* + * Generate interface id in a loop, adding an offset to be factored in the hash function. + * This is necessary, because if the generated interface id happens to be invalid we + * want to force the hash function to generate a different one, otherwise we would end up + * in an infinite loop trying the same invalid interface id over and over again. + * + * Using an uint8 counter for the offset, so limit iteration at UINT8_MAX. This is a safety + * measure, this will never iterate more than once or twice in practice. + */ + for(uint8_t offset = 0; offset < UINT8_MAX; offset++) { + uint8_t digest[SHA256_DIGEST_LENGTH]; + + /* Calculate inner hash */ + SHA256_Init(&ctxt); + SHA256_Update(&ctxt, hk_ipad, sizeof(hk_ipad)); + SHA256_Update(&ctxt, in6->s6_addr, prefixlen / 8); + SHA256_Update(&ctxt, netiface, netiface_len); + SHA256_Update(&ctxt, (uint8_t *)&dad_failures, 8); + SHA256_Update(&ctxt, hostuuid, hostuuid_len); + SHA256_Update(&ctxt, &offset, 1); + SHA256_Final(digest, &ctxt); + + /* Calculate outer hash */ + SHA256_Init(&ctxt); + SHA256_Update(&ctxt, hk_opad, sizeof(hk_opad)); + SHA256_Update(&ctxt, digest, sizeof(digest)); + SHA256_Final(digest, &ctxt); + + if (validate_ifid(digest)) { + /* assumes sizeof(digest) > sizeof(ifid) */ + memcpy(&in6->s6_addr[8], digest, 8); + + return (true); + } + } + + return (false); +} + /* * Get interface identifier for the specified interface. If it is not * available on ifp0, borrow interface identifier from other information @@ -278,7 +460,14 @@ in6_get_ifid(struct ifnet *ifp0, struct ifnet *altifp, NET_EPOCH_ASSERT(); - /* first, try to get it from the interface itself */ + /* first, try to get it from the interface itself, with stable algorithm, if configured */ + if ((ND_IFINFO(ifp0)->flags & ND6_IFF_STABLEADDR) && in6_get_stableifid(ifp0, in6, 64) == 0) { + nd6log((LOG_DEBUG, "%s: got interface identifier from itself (stable private)\n", + if_name(ifp0))); + goto success; + } + + /* then/otherwise try to get it from the interface itself */ if (in6_get_hw_ifid(ifp0, in6) == 0) { nd6log((LOG_DEBUG, "%s: got interface identifier from itself\n", if_name(ifp0))); diff --git a/sys/netinet6/in6_ifattach.h b/sys/netinet6/in6_ifattach.h index fd52422b10be..75b2ca4fa018 100644 --- a/sys/netinet6/in6_ifattach.h +++ b/sys/netinet6/in6_ifattach.h @@ -39,6 +39,8 @@ void in6_ifattach(struct ifnet *, struct ifnet *); void in6_ifattach_destroy(void); void in6_ifdetach(struct ifnet *); void in6_ifdetach_destroy(struct ifnet *); +int in6_get_tmpifid(struct ifnet *, u_int8_t *, const u_int8_t *, int); +bool in6_get_stableifid(struct ifnet *, struct in6_addr *, int); void in6_tmpaddrtimer(void *); int in6_get_hw_ifid(struct ifnet *, struct in6_addr *); int in6_get_ifid(struct ifnet *, struct ifnet *, struct in6_addr *); diff --git a/sys/netinet6/in6_proto.c b/sys/netinet6/in6_proto.c index b289d4eeb0a2..6669a2ba56ce 100644 --- a/sys/netinet6/in6_proto.c +++ b/sys/netinet6/in6_proto.c @@ -167,6 +167,7 @@ VNET_DEFINE(int, ip6_rr_prune) = 5; /* router renumbering prefix * walk list every 5 sec. */ VNET_DEFINE(int, ip6_mcast_pmtu) = 0; /* enable pMTU discovery for multicast? */ VNET_DEFINE(int, ip6_v6only) = 1; +VNET_DEFINE(int, ip6_stableaddr_maxretries) = IP6_IDGEN_RETRIES; #ifdef IPSTEALTH VNET_DEFINE(int, ip6stealth) = 0; @@ -313,6 +314,15 @@ SYSCTL_INT(_net_inet6_ip6, IPV6CTL_RR_PRUNE, rr_prune, SYSCTL_INT(_net_inet6_ip6, IPV6CTL_USETEMPADDR, use_tempaddr, CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(ip6_use_tempaddr), 0, "Create RFC3041 temporary addresses for autoconfigured addresses"); +SYSCTL_BOOL(_net_inet6_ip6, IPV6CTL_USESTABLEADDR, use_stableaddr, + CTLFLAG_VNET | CTLFLAG_RWTUN, &VNET_NAME(ip6_use_stableaddr), 0, + "Create RFC7217 semantically opaque address for autoconfigured addresses (default for new interfaces)"); +SYSCTL_INT(_net_inet6_ip6, IPV6CTL_STABLEADDR_MAXRETRIES, stableaddr_maxretries, + CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(ip6_stableaddr_maxretries), IP6_IDGEN_RETRIES, + "RFC7217 semantically opaque address DAD max retries"); +SYSCTL_INT(_net_inet6_ip6, IPV6CTL_STABLEADDR_NETIFSRC, stableaddr_netifsource, + CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(ip6_stableaddr_netifsource), IP6_STABLEADDR_NETIFSRC_NAME, + "RFC7217 semantically opaque address Net_Iface source (0 - name, 1 - ID, 2 - MAC addr)"); SYSCTL_PROC(_net_inet6_ip6, IPV6CTL_TEMPPLTIME, temppltime, CTLFLAG_VNET | CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, NULL, 0, sysctl_ip6_temppltime, "I", diff --git a/sys/netinet6/ip6_input.c b/sys/netinet6/ip6_input.c index b22491a6007f..99dad1e7c309 100644 --- a/sys/netinet6/ip6_input.c +++ b/sys/netinet6/ip6_input.c @@ -235,6 +235,7 @@ ip6_vnet_init(void *arg __unused) &V_ip6_auto_linklocal); TUNABLE_INT_FETCH("net.inet6.ip6.accept_rtadv", &V_ip6_accept_rtadv); TUNABLE_INT_FETCH("net.inet6.ip6.no_radr", &V_ip6_no_radr); + TUNABLE_BOOL_FETCH("net.inet6.ip6.use_stableaddr", &V_ip6_use_stableaddr); CK_STAILQ_INIT(&V_in6_ifaddrhead); V_in6_ifaddrhashtbl = hashinit(IN6ADDR_NHASH, M_IFADDR, diff --git a/sys/netinet6/ip6_var.h b/sys/netinet6/ip6_var.h index 12b00d4f9934..e1a4e8678ebb 100644 --- a/sys/netinet6/ip6_var.h +++ b/sys/netinet6/ip6_var.h @@ -338,8 +338,20 @@ VNET_DECLARE(int, ip6_use_tempaddr); /* Whether to use temporary addresses */ VNET_DECLARE(int, ip6_prefer_tempaddr); /* Whether to prefer temporary * addresses in the source address * selection */ +VNET_DECLARE(bool, ip6_use_stableaddr); /* Whether to use stable address generation (RFC 7217) */ #define V_ip6_use_tempaddr VNET(ip6_use_tempaddr) #define V_ip6_prefer_tempaddr VNET(ip6_prefer_tempaddr) +#define V_ip6_use_stableaddr VNET(ip6_use_stableaddr) + +#define IP6_IDGEN_RETRIES 3 /* RFC 7217 section 7 default max retries */ +VNET_DECLARE(int, ip6_stableaddr_maxretries); +#define V_ip6_stableaddr_maxretries VNET(ip6_stableaddr_maxretries) + +#define IP6_STABLEADDR_NETIFSRC_NAME 0 +#define IP6_STABLEADDR_NETIFSRC_ID 1 +#define IP6_STABLEADDR_NETIFSRC_MAC 2 +VNET_DECLARE(int, ip6_stableaddr_netifsource); +#define V_ip6_stableaddr_netifsource VNET(ip6_stableaddr_netifsource) VNET_DECLARE(int, ip6_use_defzone); /* Whether to use the default scope * zone when unspecified */ diff --git a/sys/netinet6/nd6.c b/sys/netinet6/nd6.c index 8480e7fc90e3..938d411711f0 100644 --- a/sys/netinet6/nd6.c +++ b/sys/netinet6/nd6.c @@ -324,6 +324,13 @@ nd6_ifattach(struct ifnet *ifp) /* XXX: we cannot call nd6_setmtu since ifp is not fully initialized */ nd6_setmtu0(ifp, nd); + /* Configure default value for stable addresses algorithm, skip loopback interface */ + if (V_ip6_use_stableaddr && !(ifp->if_flags & IFF_LOOPBACK)) { + nd->flags |= ND6_IFF_STABLEADDR; + } + + nd->dad_failures = counter_u64_alloc(M_WAITOK); + return nd; } @@ -343,6 +350,8 @@ nd6_ifdetach(struct ifnet *ifp, struct nd_ifinfo *nd) } NET_EPOCH_EXIT(et); + counter_u64_free(nd->dad_failures); + free(nd, M_IP6NDP); } diff --git a/sys/netinet6/nd6.h b/sys/netinet6/nd6.h index 9cb2571da58b..1de2a77ddf6d 100644 --- a/sys/netinet6/nd6.h +++ b/sys/netinet6/nd6.h @@ -76,6 +76,7 @@ struct nd_ifinfo { u_int8_t randomseed0[8]; /* upper 64 bits of MD5 digest */ u_int8_t randomseed1[8]; /* lower 64 bits (usually the EUI64 IFID) */ u_int8_t randomid[8]; /* current random ID */ + counter_u64_t dad_failures; /* DAD failures when using RFC 7217 stable addresses */ }; #define ND6_IFF_PERFORMNUD 0x1 @@ -89,6 +90,7 @@ struct nd_ifinfo { #define ND6_IFF_NO_RADR 0x40 #define ND6_IFF_NO_PREFER_IFACE 0x80 /* XXX: not related to ND. */ #define ND6_IFF_NO_DAD 0x100 +#define ND6_IFF_STABLEADDR 0x800 #ifdef EXPERIMENTAL /* XXX: not related to ND. */ #define ND6_IFF_IPV6_ONLY 0x200 /* draft-ietf-6man-ipv6only-flag */ diff --git a/sys/netinet6/nd6_nbr.c b/sys/netinet6/nd6_nbr.c index 640348a1d198..76b1fd86ee08 100644 --- a/sys/netinet6/nd6_nbr.c +++ b/sys/netinet6/nd6_nbr.c @@ -38,6 +38,7 @@ #include #include +#include #include #include #include @@ -1466,9 +1467,14 @@ nd6_dad_timer(void *arg) * No duplicate address found. Check IFDISABLED flag * again in case that it is changed between the * beginning of this function and here. + * + * Reset DAD failures counter if using stable addresses. */ - if ((ND_IFINFO(ifp)->flags & ND6_IFF_IFDISABLED) == 0) + if ((ND_IFINFO(ifp)->flags & ND6_IFF_IFDISABLED) == 0) { ia->ia6_flags &= ~IN6_IFF_TENTATIVE; + if ((ND_IFINFO(ifp)->flags & ND6_IFF_STABLEADDR) && !(ia->ia6_flags & IN6_IFF_TEMPORARY)) + counter_u64_zero(ND_IFINFO(ifp)->dad_failures); + } nd6log((LOG_DEBUG, "%s: DAD complete for %s - no duplicates found\n", @@ -1497,20 +1503,39 @@ nd6_dad_duplicated(struct ifaddr *ifa, struct dadq *dp) struct ifnet *ifp; char ip6buf[INET6_ADDRSTRLEN]; + ifp = ifa->ifa_ifp; + log(LOG_ERR, "%s: DAD detected duplicate IPv6 address %s: " "NS in/out/loopback=%d/%d/%d, NA in=%d\n", - if_name(ifa->ifa_ifp), ip6_sprintf(ip6buf, &ia->ia_addr.sin6_addr), + if_name(ifp), ip6_sprintf(ip6buf, &ia->ia_addr.sin6_addr), dp->dad_ns_icount, dp->dad_ns_ocount, dp->dad_ns_lcount, dp->dad_na_icount); ia->ia6_flags &= ~IN6_IFF_TENTATIVE; ia->ia6_flags |= IN6_IFF_DUPLICATED; - ifp = ifa->ifa_ifp; log(LOG_ERR, "%s: DAD complete for %s - duplicate found\n", if_name(ifp), ip6_sprintf(ip6buf, &ia->ia_addr.sin6_addr)); - log(LOG_ERR, "%s: manual intervention required\n", - if_name(ifp)); + + /* + * For RFC 7217 stable addresses, increment failure counter here if we still have retries. + * More addresses will be generated as long as retries are not exhausted. + */ + if ((ND_IFINFO(ifp)->flags & ND6_IFF_STABLEADDR) && !(ia->ia6_flags & IN6_IFF_TEMPORARY)) { + uint64_t dad_failures = counter_u64_fetch(ND_IFINFO(ifp)->dad_failures); + + if (dad_failures <= V_ip6_stableaddr_maxretries) { + counter_u64_add(ND_IFINFO(ifp)->dad_failures, 1); + /* if retries exhausted, output an informative error message */ + if (dad_failures == V_ip6_stableaddr_maxretries) + log(LOG_ERR, "%s: manual intervention required, consider disabling \"stableaddr\" on the interface" + " or checking hostuuid for uniqueness\n", + if_name(ifp)); + } + } else { + log(LOG_ERR, "%s: manual intervention required\n", + if_name(ifp)); + } /* * If the address is a link-local address formed from an interface diff --git a/sys/netinet6/nd6_rtr.c b/sys/netinet6/nd6_rtr.c index 6fe78083df23..01623a4506be 100644 --- a/sys/netinet6/nd6_rtr.c +++ b/sys/netinet6/nd6_rtr.c @@ -92,6 +92,7 @@ VNET_DEFINE(int, nd6_defifindex); #define V_nd6_defifp VNET(nd6_defifp) VNET_DEFINE(int, ip6_use_tempaddr) = 0; +VNET_DEFINE(bool, ip6_use_stableaddr) = 0; VNET_DEFINE(int, ip6_desync_factor); VNET_DEFINE(uint32_t, ip6_temp_max_desync_factor) = TEMP_MAX_DESYNC_FACTOR_BASE; @@ -1184,7 +1185,7 @@ in6_ifadd(struct nd_prefixctl *pr, int mcast) struct in6_aliasreq ifra; struct in6_ifaddr *ia = NULL, *ib = NULL; int error, plen0; - struct in6_addr *ifid_addr = NULL, mask; + struct in6_addr *ifid_addr = NULL, mask, newaddr; int prefixlen = pr->ndpr_plen; int updateflags; char ip6buf[INET6_ADDRSTRLEN]; @@ -1210,61 +1211,70 @@ in6_ifadd(struct nd_prefixctl *pr, int mcast) * (4) it is easier to manage when an interface has addresses * with the same interface identifier, than to have multiple addresses * with different interface identifiers. + * + * If using stable privacy generation, generate a new address with + * the algorithm specified in RFC 7217 section 5 */ - ifa = (struct ifaddr *)in6ifa_ifpforlinklocal(ifp, 0); /* 0 is OK? */ - if (ifa) { - ib = (struct in6_ifaddr *)ifa; - ifid_addr = &ib->ia_addr.sin6_addr; - - /* prefixlen + ifidlen must be equal to 128 */ - plen0 = in6_mask2len(&ib->ia_prefixmask.sin6_addr, NULL); - if (prefixlen != plen0) { - ifa_free(ifa); - ifid_addr = NULL; - nd6log((LOG_DEBUG, - "%s: wrong prefixlen for %s (prefix=%d ifid=%d)\n", - __func__, if_name(ifp), prefixlen, 128 - plen0)); - } - } - /* No suitable LL address, get the ifid directly */ - if (ifid_addr == NULL) { - struct in6_addr taddr; - ifa = ifa_alloc(sizeof(taddr), M_WAITOK); + /* make ifaddr */ + in6_prepare_ifra(&ifra, &pr->ndpr_prefix.sin6_addr, &mask); + + if (ND_IFINFO(ifp)->flags & ND6_IFF_STABLEADDR) { + memcpy(&newaddr, &pr->ndpr_prefix.sin6_addr, sizeof(pr->ndpr_prefix.sin6_addr)); + + if(!in6_get_stableifid(ifp, &newaddr, prefixlen)) + return NULL; + } else { + ifa = (struct ifaddr *)in6ifa_ifpforlinklocal(ifp, 0); /* 0 is OK? */ if (ifa) { ib = (struct in6_ifaddr *)ifa; ifid_addr = &ib->ia_addr.sin6_addr; - if(in6_get_ifid(ifp, NULL, ifid_addr) != 0) { - nd6log((LOG_DEBUG, - "%s: failed to get ifid for %s\n", - __func__, if_name(ifp))); + + /* prefixlen + ifidlen must be equal to 128 */ + plen0 = in6_mask2len(&ib->ia_prefixmask.sin6_addr, NULL); + if (prefixlen != plen0) { ifa_free(ifa); ifid_addr = NULL; + nd6log((LOG_DEBUG, + "%s: wrong prefixlen for %s (prefix=%d ifid=%d)\n", + __func__, if_name(ifp), prefixlen, 128 - plen0)); } } - } - if (ifid_addr == NULL) { - nd6log((LOG_INFO, - "%s: could not determine ifid for %s\n", - __func__, if_name(ifp))); - return NULL; - } + /* No suitable LL address, get the ifid directly */ + if (ifid_addr == NULL) { + struct in6_addr taddr; + ifa = ifa_alloc(sizeof(taddr), M_WAITOK); + if (ifa) { + ib = (struct in6_ifaddr *)ifa; + ifid_addr = &ib->ia_addr.sin6_addr; + if(in6_get_ifid(ifp, NULL, ifid_addr) != 0) { + nd6log((LOG_DEBUG, + "%s: failed to get ifid for %s\n", + __func__, if_name(ifp))); + ifa_free(ifa); + ifid_addr = NULL; + } + } + } - /* make ifaddr */ - in6_prepare_ifra(&ifra, &pr->ndpr_prefix.sin6_addr, &mask); + if (ifid_addr == NULL) { + nd6log((LOG_INFO, + "%s: could not determine ifid for %s\n", + __func__, if_name(ifp))); + return NULL; + } + + memcpy(&newaddr, &ib->ia_addr.sin6_addr, sizeof(ib->ia_addr.sin6_addr)); + ifa_free(ifa); + } IN6_MASK_ADDR(&ifra.ifra_addr.sin6_addr, &mask); /* interface ID */ - ifra.ifra_addr.sin6_addr.s6_addr32[0] |= - (ifid_addr->s6_addr32[0] & ~mask.s6_addr32[0]); - ifra.ifra_addr.sin6_addr.s6_addr32[1] |= - (ifid_addr->s6_addr32[1] & ~mask.s6_addr32[1]); - ifra.ifra_addr.sin6_addr.s6_addr32[2] |= - (ifid_addr->s6_addr32[2] & ~mask.s6_addr32[2]); - ifra.ifra_addr.sin6_addr.s6_addr32[3] |= - (ifid_addr->s6_addr32[3] & ~mask.s6_addr32[3]); - ifa_free(ifa); + ifra.ifra_addr.sin6_addr.s6_addr32[0] |= (newaddr.s6_addr32[0] & ~mask.s6_addr32[0]); + ifra.ifra_addr.sin6_addr.s6_addr32[1] |= (newaddr.s6_addr32[1] & ~mask.s6_addr32[1]); + ifra.ifra_addr.sin6_addr.s6_addr32[2] |= (newaddr.s6_addr32[2] & ~mask.s6_addr32[2]); + ifra.ifra_addr.sin6_addr.s6_addr32[3] |= (newaddr.s6_addr32[3] & ~mask.s6_addr32[3]); /* lifetimes. */ ifra.ifra_lifetime.ia6t_vltime = pr->ndpr_vltime; @@ -1495,6 +1505,7 @@ prelist_update(struct nd_prefixctl *new, struct nd_defrouter *dr, int auth; struct in6_addrlifetime lt6_tmp; char ip6buf[INET6_ADDRSTRLEN]; + bool has_temporary = false; NET_EPOCH_ASSERT(); @@ -1640,9 +1651,6 @@ prelist_update(struct nd_prefixctl *new, struct nd_defrouter *dr, if (ifa6->ia6_ndpr != pr) continue; - if (ia6_match == NULL) /* remember the first one */ - ia6_match = ifa6; - /* * An already autoconfigured address matched. Now that we * are sure there is at least one matched address, we can @@ -1702,6 +1710,13 @@ prelist_update(struct nd_prefixctl *new, struct nd_defrouter *dr, if ((ifa6->ia6_flags & IN6_IFF_TEMPORARY) != 0) { u_int32_t maxvltime, maxpltime; + /* + * if stable addresses (RFC 7217) are enabled, mark that a temporary address has been found + * to avoid generating uneeded extra ones. + */ + if (ND_IFINFO(ifp)->flags & ND6_IFF_STABLEADDR) + has_temporary = true; + if (V_ip6_temp_valid_lifetime > (u_int32_t)((time_uptime - ifa6->ia6_createtime) + V_ip6_desync_factor)) { @@ -1730,6 +1745,24 @@ prelist_update(struct nd_prefixctl *new, struct nd_defrouter *dr, } ifa6->ia6_lifetime = lt6_tmp; ifa6->ia6_updatetime = time_uptime; + + /* + * If using stable addresses (RFC 7217) and we still have retries to perform, ignore + * addresses already marked as duplicated, since a new one will be generated. + * Also ignore addresses marked as temporary, since their generation is orthogonal to + * opaque stable ones. + * + * There is a small race condition, in that the dad_counter could be incremented + * between here and when a new address is generated, but this will cause that generation + * to fail and no further retries should happen. + */ + if (ND_IFINFO(ifp)->flags & ND6_IFF_STABLEADDR && + counter_u64_fetch(ND_IFINFO(ifp)->dad_failures) <= V_ip6_stableaddr_maxretries && + ifa6->ia6_flags & (IN6_IFF_DUPLICATED | IN6_IFF_TEMPORARY)) + continue; + + if (ia6_match == NULL) /* remember the first one */ + ia6_match = ifa6; } if (ia6_match == NULL && new->ndpr_vltime) { int ifidlen; @@ -1780,8 +1813,11 @@ prelist_update(struct nd_prefixctl *new, struct nd_defrouter *dr, * immediately together with a new set of temporary * addresses. Thus, we specifiy 1 as the 2nd arg of * in6_tmpifadd(). + * + * Skip this if a temporary address has been marked as + * found (happens only if stable addresses (RFC 7217) is in use) */ - if (V_ip6_use_tempaddr) { + if (V_ip6_use_tempaddr && !has_temporary) { int e; if ((e = in6_tmpifadd(ia6, 1, 1)) != 0) { nd6log((LOG_NOTICE, "%s: failed to " diff --git a/usr.sbin/ndp/ndp.c b/usr.sbin/ndp/ndp.c index 6e6f40c3ff64..cbca8ec20941 100644 --- a/usr.sbin/ndp/ndp.c +++ b/usr.sbin/ndp/ndp.c @@ -1058,6 +1058,9 @@ ifinfo(char *ifname, int argc, char **argv) #endif #ifdef ND6_IFF_NO_PREFER_IFACE SETFLAG("no_prefer_iface", ND6_IFF_NO_PREFER_IFACE); +#endif +#ifdef ND6_IFF_STABLEADDR + SETFLAG("stableaddr", ND6_IFF_STABLEADDR); #endif SETVALUE("basereachable", ND.basereachable); SETVALUE("retrans", ND.retrans); @@ -1144,6 +1147,10 @@ ifinfo(char *ifname, int argc, char **argv) if ((ND.flags & ND6_IFF_AUTO_LINKLOCAL)) xo_emit("{l:%s} ", "auto_linklocal"); #endif +#ifdef ND6_IFF_STABLEADDR + if ((ND.flags & ND6_IFF_STABLEADDR)) + xo_emit("{l:%s} ", "stableaddr"); +#endif #ifdef ND6_IFF_NO_PREFER_IFACE if ((ND.flags & ND6_IFF_NO_PREFER_IFACE)) xo_emit("{l:%s} ", "no_prefer_iface"); From nobody Sat Sep 20 19:34:24 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cTfhK0wgWz68JQJ; Sat, 20 Sep 2025 19: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 4cTfhK0H07z3CH9; Sat, 20 Sep 2025 19: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=1758396865; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KbzQZigqxdZ3G+3UHMZz11Vme03qvF+NZkGSKGq7gbo=; b=rYliPIwneGfqFEXMglFAQpxWt9GsYb+4WOyjr2YrDVTi7KVWQDmnPDhMY2kouxNvUd2LSG OLJL34v/ELiCyg8pCdK8BQMKJDl7W9XpQ9XjPAZKTHqnxuddIDd88iZLsX/KHyV4DRcS4Z AOADrR2ciQFIpj45sE6LXqpvPfJ0BtztJEuFkTwhsbk/tZMpQ95rLb9KormDa3k/KHEktF iRRgoqnmEr4E6VDzEhC2sxiQVEUj23xCSpe1090NJAakyPMgZUuf2eKlHDMUEyvDV6bzzo CnzuFlBp+SFP03AgYCWaQTkuV7A0NpOeSO2jGcP6HHowUyELlYWGZxMeuwLCVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758396865; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KbzQZigqxdZ3G+3UHMZz11Vme03qvF+NZkGSKGq7gbo=; b=g4S2w87jEV/K19FCR2awdk8g7pH8t8ah3wDTz8Eg4of74TVfkLyhOTtHwMbBOIv5Rx2qJD gTQhywOOV72KCahSSShPqm+C+vCL9nqK0OJp9tY6yX9buakMrxxW9sCdrsmPKWJkqKV1Jp uJXusm8R6dux6OESFxXLJhNJf/241yoZBnULTjmmQUz1jqyrFPy7YZ9XXeJ9kdkckznp62 3jBAulww5hHmIeDo5+ulMg7ScGn8IETgYam5TYa/AANNgjDXdFFlN6P4BQq5Ld3e9F7Q1W 3qaLl8OuaLumdZO/+QVs38KsA4SxFu5FqUGSaChPPzoyMOeocOzlDVNF+S71Zw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758396865; a=rsa-sha256; cv=none; b=KuQO+FlqR1WvbiqitfXZgl1wHJM6HGCm1R5D9mDn9gL2oQBPI2a4Qhjl9Nt4qfML5LZGgt mnPS9lLw8KyL+PdR6u6Ms2vPt2TVHTuUHq4fC/OhnbvhL93ZmtIMG5vyyqViFnsGOOF+n8 WQqBlom4aGda/TgLj/pofxvquULaQPmguZBW8MWNhIe+GWVHQBiDjLfl3hzTc01LrZo4ep 45Gr/RauDk4av9ooUdW/3b26Gmmaf+XB7iUX8Gm8Sn42UnqBO3FfKNiHhVaNYwGsviSXQd g9vC2z3ggKoSiJejuPyjGcwg0PpepWcbL4jHkTo5uA3YnuAKor0zLyzAApjkVQ== 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 4cTfhJ6yrczjNg; Sat, 20 Sep 2025 19: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 58KJYOr1040238; Sat, 20 Sep 2025 19: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 58KJYO0O040235; Sat, 20 Sep 2025 19:34:24 GMT (envelope-from git) Date: Sat, 20 Sep 2025 19:34:24 GMT Message-Id: <202509201934.58KJYO0O040235@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: b31abc95eb73 - main - arm, powerpc, riscv: implement atomic_set/clear_16 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b31abc95eb730d566891e134ba14af852645f772 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=b31abc95eb730d566891e134ba14af852645f772 commit b31abc95eb730d566891e134ba14af852645f772 Author: Konstantin Belousov AuthorDate: 2025-09-19 18:01:47 +0000 Commit: Konstantin Belousov CommitDate: 2025-09-20 19:23:54 +0000 arm, powerpc, riscv: implement atomic_set/clear_16 Reviewed by: jrtc27, markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D52626 --- sys/arm/include/atomic.h | 3 +++ sys/powerpc/include/atomic.h | 33 ++++++++++++++++++++++++++++++++- sys/riscv/include/atomic.h | 3 +++ sys/sys/_atomic_subword.h | 28 ++++++++++++++++++++++++++++ 4 files changed, 66 insertions(+), 1 deletion(-) diff --git a/sys/arm/include/atomic.h b/sys/arm/include/atomic.h index f3313b136656..c180ceaca142 100644 --- a/sys/arm/include/atomic.h +++ b/sys/arm/include/atomic.h @@ -1110,4 +1110,7 @@ atomic_thread_fence_seq_cst(void) */ #include +#define atomic_set_short atomic_set_16 +#define atomic_clear_short atomic_clear_16 + #endif /* _MACHINE_ATOMIC_H_ */ diff --git a/sys/powerpc/include/atomic.h b/sys/powerpc/include/atomic.h index 015a283e2de7..b2d7549e5bd0 100644 --- a/sys/powerpc/include/atomic.h +++ b/sys/powerpc/include/atomic.h @@ -1137,7 +1137,38 @@ atomic_thread_fence_seq_cst(void) #define atomic_cmpset_short atomic_cmpset_16 #define atomic_fcmpset_char atomic_fcmpset_8 #define atomic_fcmpset_short atomic_fcmpset_16 -#endif +#define atomic_set_short atomic_set_16 +#define atomic_clear_short atomic_clear_16 +#else + +static __inline void +atomic_set_short(volatile u_short *p, u_short bit) +{ + u_short v; + + v = atomic_load_short(p); + for (;;) { + if (atomic_fcmpset_16(p, &v, v | bit)) + break; + } +} + +static __inline void +atomic_clear_short(volatile u_short *p, u_short bit) +{ + u_short v; + + v = atomic_load_short(p); + for (;;) { + if (atomic_fcmpset_16(p, &v, v & ~bit)) + break; + } +} + +#define atomic_set_16 atomic_set_short +#define atomic_clear_16 atomic_clear_short + +#endif /* ISA_206_ATOMICS */ /* These need sys/_atomic_subword.h on non-ISA-2.06-atomic platforms. */ ATOMIC_CMPSET_ACQ_REL(char); diff --git a/sys/riscv/include/atomic.h b/sys/riscv/include/atomic.h index 74ffc171b028..c90cb02c482c 100644 --- a/sys/riscv/include/atomic.h +++ b/sys/riscv/include/atomic.h @@ -656,4 +656,7 @@ atomic_thread_fence_seq_cst(void) #include +#define atomic_set_short atomic_set_16 +#define atomic_clear_short atomic_clear_16 + #endif /* _MACHINE_ATOMIC_H_ */ diff --git a/sys/sys/_atomic_subword.h b/sys/sys/_atomic_subword.h index dee5a3bed871..284e2bfa340f 100644 --- a/sys/sys/_atomic_subword.h +++ b/sys/sys/_atomic_subword.h @@ -205,4 +205,32 @@ atomic_load_acq_16(const volatile uint16_t *p) #undef _ATOMIC_BYTE_SHIFT #undef _ATOMIC_HWORD_SHIFT +#ifndef atomic_set_16 +static __inline void +atomic_set_16(volatile uint16_t *p, uint16_t bit) +{ + uint16_t v; + + v = atomic_load_16(p); + for (;;) { + if (atomic_fcmpset_16(p, &v, v | bit)) + break; + } +} +#endif + +#ifndef atomic_clear_16 +static __inline void +atomic_clear_16(volatile uint16_t *p, uint16_t bit) +{ + uint16_t v; + + v = atomic_load_16(p); + for (;;) { + if (atomic_fcmpset_16(p, &v, v & ~bit)) + break; + } +} +#endif + #endif /* _SYS__ATOMIC_SUBWORD_H_ */ From nobody Sat Sep 20 19:34:26 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cTfhL2ghDz68J8H; Sat, 20 Sep 2025 19:34: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 4cTfhL1P34z3CbV; Sat, 20 Sep 2025 19: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=1758396866; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/4NYf8G0Rayp1pTPWpd8/Xyoj8aQM2N6XtncFwQayWM=; b=hNXWoLTk05CPWe5BaDP2GpX7jkWekBsW7D6Ir1FB73OcuvjkRfd6QWKSTQ04Fc4FMVWfze bOC3wmmfwDc5R1wsHvutd4xdpNpKiXmTcxYrpts553+afpekzlA1ul0S+hBi5bvor2rmhk Rbzg+AbUwg9sW2WI1ayq09RlYj3zknjUuRHrdnOVUDmkxcvJmu+VKWldR56uO1bZPgMw6i 4XkhpIg6ZDFanQRChkL56NrBM/r4ZAQOp9WfFvXVEyw+tjfh2rJFY3F+PzKRYyqptbNzun ATnl4L5otnvvRGzXk2gu1iFtuOl51KeW/lYCZs0LCiRZbfRNNs1kw6edRmplGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758396866; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/4NYf8G0Rayp1pTPWpd8/Xyoj8aQM2N6XtncFwQayWM=; b=TN4UG2d56G2CZaR3sTx4wBdX5pwsF03uDV8eIs047s9PN4wHBY0ih2/cZCgmhJ0ZmJkIBH UGrFZc5+nH7pXUh87IVrDaV90POecqVFdOpDtSLQYrvEhN0e+WP648XLI8FR9cK58pylKh OntKTeTMpOxQwsJbtDjlFhti2bSOzv32BQ4auf8na1N1rueASaZxnvEOrjNVkCYX3tsq3S bXspO0bg8dlhaXhLb3aYxc2C4PIJF9q18Y926LJRMc03NInqLiG9AA0Y5ywfO6ATaQn9xp MaoZUtVt6wxy15RBB1opJcSj0mS9fePsr5JcHymtWankjCPwYpklzWKTCmXE1A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758396866; a=rsa-sha256; cv=none; b=WZ/9DKPnhTWZRVNNbgHcoWy+gCy53Rq6utPjAlH0Vhj4BjkwjnTY+biG+PJU90Ub+IJB19 ZAVFt5LwQyJS6ly7ZA1fwpJd5uo3oNNsAhmDf6vaTis/rsgJu9B4y12CJh8/90ix7pTuj8 PuGDlbNs4cnYEJk0zjzKdsKbKaPyjUKYFj5HhvQj0DwPMvAh6F21kuWxKvHZHhXPPBlBfR L3xT1fE+zfj9OaAYQdCZ4MNAo5GpLpPLAYzdl2GSEOdLzpgW6K7JcEwUpYfj1N2cdB10rY TuZLhCeqW8PY2pe4JkZhRpoBu23Uv6nsZB+UPHC2/U7oc4OUEwGS9mLQuA4Ejg== 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 4cTfhL0nzWzjR7; Sat, 20 Sep 2025 19: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 58KJYQZO040272; Sat, 20 Sep 2025 19: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 58KJYQHQ040269; Sat, 20 Sep 2025 19:34:26 GMT (envelope-from git) Date: Sat, 20 Sep 2025 19:34:26 GMT Message-Id: <202509201934.58KJYQHQ040269@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 1c0465a3d32e - main - arm/atomic.h: remove misleading comment List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1c0465a3d32e59cd260067e87469abd013571470 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=1c0465a3d32e59cd260067e87469abd013571470 commit 1c0465a3d32e59cd260067e87469abd013571470 Author: Konstantin Belousov AuthorDate: 2025-09-20 19:10:02 +0000 Commit: Konstantin Belousov CommitDate: 2025-09-20 19:24:02 +0000 arm/atomic.h: remove misleading comment Noted and reviewed by: jrtc27 Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D52626 --- sys/arm/include/atomic.h | 5 ----- 1 file changed, 5 deletions(-) diff --git a/sys/arm/include/atomic.h b/sys/arm/include/atomic.h index c180ceaca142..f66953710615 100644 --- a/sys/arm/include/atomic.h +++ b/sys/arm/include/atomic.h @@ -1103,11 +1103,6 @@ atomic_thread_fence_seq_cst(void) #define atomic_store_rel_int atomic_store_rel_32 #define atomic_swap_int atomic_swap_32 -/* - * For: - * - atomic_load_acq_8 - * - atomic_load_acq_16 - */ #include #define atomic_set_short atomic_set_16 From nobody Sat Sep 20 19:34:27 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cTfhM4ZJ6z68JMQ; Sat, 20 Sep 2025 19: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 4cTfhM3KZMz3CYp; Sat, 20 Sep 2025 19:34:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758396867; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=p8xatuMzSBNNjn1Z5h9jprUge3SmpEiBWhPOntprpzE=; b=sklD+e5MwcBG8+fXBLAKBAPZ+RDwUiA7bUFXz/OtYKr/U/znuO0ZgAe8umcqtDSN/gs9y9 fEmQgsi8i1uMaLQcW508bgAjg/XLzyNpLSylGHVLq1sOMIFkdg1VsRCAPiPU2aleP8Lio5 jpztgED3pp8AtoZ90+bvdsaB9tcHW6LP6wJhKEfIG0vbSpOll4f8Pap9X40g9C9Gp2q8iN 8yPPL1JRwWWm2nml3sdD3oXfDw96NUf51T/eUZe2g7RUIA5lSQSSmZjrEJBTFeVgArGctt ssSK4I9YhDeiwd49cuCeq/O4MuAfwL7meErjOl4m8nFOTfNV4ArD++6oKRPmDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758396867; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=p8xatuMzSBNNjn1Z5h9jprUge3SmpEiBWhPOntprpzE=; b=oZLGwn7uG5w3EAaSuDbkFd42vbDmlTDl5Kp85+4h8I17UrMar9pYFSD/sO5nsqC1cZN0wZ RCMEfqsPPnRrMM35XJH1estVzCpYRIVlvZzP/1ccHYXCwrOhKQcXqaxfojxGgvXYEzrQfN zivDB1Qmbproj5TfnOxmD6UM2ZBi2vWobICCdgc36VReVPz0ZqGL0ikQQ/A87PWEcJIFhi 73BSWOMFFktdoWbU1rJhwdKC/utrinSqsV1iW3gZh+6/fu4oh9dVpoPgwuBz+urqdEg3dt 8HcpKEPTXI6jYG3B3hSFPZ4jLHTK1ma7OoTxZpus/5gjCkVHkrgHrBbDdMV7bg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758396867; a=rsa-sha256; cv=none; b=MskpXXOr2GAuvzTEcZtbx/QFemElZItoLhlSFDmQM4fYryf2m1ifcu30xXh4iJiSPGAoGt 9Te8jvbWeNFniV/W5+AK4wc5+BKGypLnpjN0pdPDc8n0p1qvMWHzTES1o4FNVlBwwHn+ha DvKDpuZ47f3IndE2gYnj7K+xmaC1Nv9Ajty/LxvIolFgz0sqPi887cVAuOs6N9YLlRfKMF E/KBF2Ufbf+mn4KHzrrBFlyEXYjtofNm2aGcD1+epslFAMx9PRtn58BcixSfrZdB1sK+JJ rRVIQiYq5NdcdDAiv+4laJE8V7ye4msdK8BcuLMMEUFY/QlxbxNinN2Jh/9dSw== 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 4cTfhM1ssLzjR8; Sat, 20 Sep 2025 19:34: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 58KJYRGd040308; Sat, 20 Sep 2025 19:34:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58KJYRVT040303; Sat, 20 Sep 2025 19:34:27 GMT (envelope-from git) Date: Sat, 20 Sep 2025 19:34:27 GMT Message-Id: <202509201934.58KJYRVT040303@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 0ee6f5efdfc6 - main - kern/vfs_vnops.c: generalize the lock primitive for file foffset List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0ee6f5efdfc6550077f15204335a68aab9c34d67 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=0ee6f5efdfc6550077f15204335a68aab9c34d67 commit 0ee6f5efdfc6550077f15204335a68aab9c34d67 Author: Konstantin Belousov AuthorDate: 2025-09-10 16:35:01 +0000 Commit: Konstantin Belousov CommitDate: 2025-09-20 19:24:10 +0000 kern/vfs_vnops.c: generalize the lock primitive for file foffset Generalize foffset_lock/unlock() by splitting the locking info file_v_lock/unlock() (LP64 case) or file_v_lock/unlock_mtxp() for ILP32 (using mutex pool) and then taking the action to read the offset. sys/file.h: rename struct file f_vnread_flags member into generic f_vflags Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Differential revision: https://reviews.freebsd.org/D52486 --- sys/kern/vfs_vnops.c | 148 +++++++++++++++++++++++++++++++-------------------- sys/sys/file.h | 6 +-- 2 files changed, 94 insertions(+), 60 deletions(-) diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c index a4f41192f684..f81c2033d95e 100644 --- a/sys/kern/vfs_vnops.c +++ b/sys/kern/vfs_vnops.c @@ -798,58 +798,82 @@ vn_rdwr_inchunks(enum uio_rw rw, struct vnode *vp, void *base, size_t len, } #if OFF_MAX <= LONG_MAX -off_t -foffset_lock(struct file *fp, int flags) +static void +file_v_lock(struct file *fp, short lock_bit, short lock_wait_bit) { - volatile short *flagsp; - off_t res; + short *flagsp; short state; - KASSERT((flags & FOF_OFFSET) == 0, ("FOF_OFFSET passed")); - - if ((flags & FOF_NOLOCK) != 0) - return (atomic_load_long(&fp->f_offset)); - - /* - * According to McKusick the vn lock was protecting f_offset here. - * It is now protected by the FOFFSET_LOCKED flag. - */ - flagsp = &fp->f_vnread_flags; - if (atomic_cmpset_acq_16(flagsp, 0, FOFFSET_LOCKED)) - return (atomic_load_long(&fp->f_offset)); + flagsp = &fp->f_vflags; + state = atomic_load_16(flagsp); + if ((state & lock_bit) == 0 && + atomic_cmpset_acq_16(flagsp, state, state | lock_bit)) + return; - sleepq_lock(&fp->f_vnread_flags); + sleepq_lock(flagsp); state = atomic_load_16(flagsp); for (;;) { - if ((state & FOFFSET_LOCKED) == 0) { + if ((state & lock_bit) == 0) { if (!atomic_fcmpset_acq_16(flagsp, &state, - FOFFSET_LOCKED)) + state | lock_bit)) continue; break; } - if ((state & FOFFSET_LOCK_WAITING) == 0) { + if ((state & lock_wait_bit) == 0) { if (!atomic_fcmpset_acq_16(flagsp, &state, - state | FOFFSET_LOCK_WAITING)) + state | lock_wait_bit)) continue; } DROP_GIANT(); - sleepq_add(&fp->f_vnread_flags, NULL, "vofflock", 0, 0); - sleepq_wait(&fp->f_vnread_flags, PRI_MAX_KERN); + sleepq_add(flagsp, NULL, "vofflock", 0, 0); + sleepq_wait(flagsp, PRI_MAX_KERN); PICKUP_GIANT(); - sleepq_lock(&fp->f_vnread_flags); + sleepq_lock(flagsp); state = atomic_load_16(flagsp); } - res = atomic_load_long(&fp->f_offset); - sleepq_release(&fp->f_vnread_flags); - return (res); + sleepq_release(flagsp); } -void -foffset_unlock(struct file *fp, off_t val, int flags) +static void +file_v_unlock(struct file *fp, short lock_bit, short lock_wait_bit) { - volatile short *flagsp; + short *flagsp; short state; + flagsp = &fp->f_vflags; + state = atomic_load_16(flagsp); + if ((state & lock_wait_bit) == 0 && + atomic_cmpset_rel_16(flagsp, state, state & ~lock_bit)) + return; + + sleepq_lock(flagsp); + MPASS((*flagsp & lock_bit) != 0); + MPASS((*flagsp & lock_wait_bit) != 0); + atomic_clear_16(flagsp, lock_bit | lock_wait_bit); + sleepq_broadcast(flagsp, SLEEPQ_SLEEP, 0, 0); + sleepq_release(flagsp); +} + +off_t +foffset_lock(struct file *fp, int flags) +{ + KASSERT((flags & FOF_OFFSET) == 0, ("FOF_OFFSET passed")); + + if ((flags & FOF_NOLOCK) == 0) { + file_v_lock(fp, FILE_V_FOFFSET_LOCKED, + FILE_V_FOFFSET_LOCK_WAITING); + } + + /* + * According to McKusick the vn lock was protecting f_offset here. + * It is now protected by the FOFFSET_LOCKED flag. + */ + return (atomic_load_long(&fp->f_offset)); +} + +void +foffset_unlock(struct file *fp, off_t val, int flags) +{ KASSERT((flags & FOF_OFFSET) == 0, ("FOF_OFFSET passed")); if ((flags & FOF_NOUPDATE) == 0) @@ -859,21 +883,10 @@ foffset_unlock(struct file *fp, off_t val, int flags) if ((flags & FOF_NEXTOFF_W) != 0) fp->f_nextoff[UIO_WRITE] = val; - if ((flags & FOF_NOLOCK) != 0) - return; - - flagsp = &fp->f_vnread_flags; - state = atomic_load_16(flagsp); - if ((state & FOFFSET_LOCK_WAITING) == 0 && - atomic_cmpset_rel_16(flagsp, state, 0)) - return; - - sleepq_lock(&fp->f_vnread_flags); - MPASS((fp->f_vnread_flags & FOFFSET_LOCKED) != 0); - MPASS((fp->f_vnread_flags & FOFFSET_LOCK_WAITING) != 0); - fp->f_vnread_flags = 0; - sleepq_broadcast(&fp->f_vnread_flags, SLEEPQ_SLEEP, 0, 0); - sleepq_release(&fp->f_vnread_flags); + if ((flags & FOF_NOLOCK) == 0) { + file_v_unlock(fp, FILE_V_FOFFSET_LOCKED, + FILE_V_FOFFSET_LOCK_WAITING); + } } static off_t @@ -882,7 +895,35 @@ foffset_read(struct file *fp) return (atomic_load_long(&fp->f_offset)); } -#else + +#else /* OFF_MAX <= LONG_MAX */ + +static void +file_v_lock_mtxp(struct file *fp, struct mtx *mtxp, short lock_bit, + short lock_wait_bit) +{ + mtx_assert(mtxp, MA_OWNED); + + while ((fp->f_vflags & lock_bit) != 0) { + fp->f_vflags |= lock_wait_bit; + msleep(&fp->f_vflags, mtxp, PRI_MAX_KERN, + "vofflock", 0); + } + fp->f_vflags |= lock_bit; +} + +static void +file_v_unlock_mtxp(struct file *fp, struct mtx *mtxp, short lock_bit, + short lock_wait_bit) +{ + mtx_assert(mtxp, MA_OWNED); + + KASSERT((fp->f_vflags & lock_bit) != 0, ("Lost lock_bit")); + if ((fp->f_vflags & lock_wait_bit) != 0) + wakeup(&fp->f_vflags); + fp->f_vflags &= ~(lock_bit | lock_wait_bit); +} + off_t foffset_lock(struct file *fp, int flags) { @@ -894,12 +935,8 @@ foffset_lock(struct file *fp, int flags) mtxp = mtx_pool_find(mtxpool_sleep, fp); mtx_lock(mtxp); if ((flags & FOF_NOLOCK) == 0) { - while (fp->f_vnread_flags & FOFFSET_LOCKED) { - fp->f_vnread_flags |= FOFFSET_LOCK_WAITING; - msleep(&fp->f_vnread_flags, mtxp, PRI_MAX_KERN, - "vofflock", 0); - } - fp->f_vnread_flags |= FOFFSET_LOCKED; + file_v_lock_mtxp(fp, mtxp, FILE_V_FOFFSET_LOCKED, + FILE_V_FOFFSET_LOCK_WAITING); } res = fp->f_offset; mtx_unlock(mtxp); @@ -922,11 +959,8 @@ foffset_unlock(struct file *fp, off_t val, int flags) if ((flags & FOF_NEXTOFF_W) != 0) fp->f_nextoff[UIO_WRITE] = val; if ((flags & FOF_NOLOCK) == 0) { - KASSERT((fp->f_vnread_flags & FOFFSET_LOCKED) != 0, - ("Lost FOFFSET_LOCKED")); - if (fp->f_vnread_flags & FOFFSET_LOCK_WAITING) - wakeup(&fp->f_vnread_flags); - fp->f_vnread_flags = 0; + file_v_unlock_mtxp(fp, mtxp, FILE_V_FOFFSET_LOCKED, + FILE_V_FOFFSET_LOCK_WAITING); } mtx_unlock(mtxp); } diff --git a/sys/sys/file.h b/sys/sys/file.h index cc3c733580fd..9a072121e25f 100644 --- a/sys/sys/file.h +++ b/sys/sys/file.h @@ -197,7 +197,7 @@ struct file { struct vnode *f_vnode; /* NULL or applicable vnode */ struct ucred *f_cred; /* associated credentials. */ short f_type; /* descriptor type */ - short f_vnread_flags; /* (f) Sleep lock for f_offset */ + short f_vflags; /* (f) Sleep lock flags for members */ /* * DTYPE_VNODE specific fields. */ @@ -220,8 +220,8 @@ struct file { #define f_cdevpriv f_vnun.fvn_cdevpriv #define f_advice f_vnun.fvn_advice -#define FOFFSET_LOCKED 0x1 -#define FOFFSET_LOCK_WAITING 0x2 +#define FILE_V_FOFFSET_LOCKED 0x0001 +#define FILE_V_FOFFSET_LOCK_WAITING 0x0002 #endif /* __BSD_VISIBLE */ #endif /* _KERNEL || _WANT_FILE */ From nobody Sat Sep 20 19:34:28 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cTfhN4gZ3z68JbP; Sat, 20 Sep 2025 19:34: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 4cTfhN2v0bz3Chh; Sat, 20 Sep 2025 19:34:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758396868; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=joCHUwCHlpRAm3FXzZfGAyTvPnAwjNgsZWF/FB7j38Y=; b=ZgdbKAym6YrgHCCgEsIQ50sPwM7w7XXqZBJRbtZn3h9MHDxO0snzipSG/l4gqczmg1narH 9lUY7g0nCMKNNux2CZ2L29rhcZzX9YK5JMa+g5TtwYWPdYe2Oa8glVRjy5I6AvfT2KUgBe Buyv21VBuV7UP9HHm3YrpFVlWwW8OJsW+oO1e9vl70uN6zJSEuseUsG/3FKD5ICep4ZiPE KY8Rz5GIFF77Mj0idlpOJ+DKQ1bk8Yyf4Up2gE1iIAn2oDf8+JdpziTGo2r932WyXUe0DQ KUCwqikAevmuRU7XwAArR9qkqUdl8ae/S15JTJ+3uPjyzgHY7XT+OKyfbNcHBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758396868; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=joCHUwCHlpRAm3FXzZfGAyTvPnAwjNgsZWF/FB7j38Y=; b=vDbKXux8Pzr6nGipqyMNILgpaqQun0BE0YysDF+bCvgR2aDoOuZgWsdxZhgIwX8yJPUuuv kqwaafMMQBjVsv/rKZhBgxf4MrXJrvliBuCuAJpG/+0uIpKsNQWUiRrpAA5ecbyrZofcuG Cgyp7KeiBqO10JCIoK6EE7HMzG9j092mrFj9Bbb/Nn5hegOSsVXlISs0wzld+WT0+JWGaj KPjcJmXKx2BDbzdxwBihHERv7P3KtDCVJG9hiKYUkQllt5G3WfZ4o5yPrBxYfOUykFcWO4 vVBRy6c4RX3uc4bkBj8nmTxGKXw4V9dPnSIqpDRS3kZrAm5BcUzbLnurK1HN3A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758396868; a=rsa-sha256; cv=none; b=Y7LRm9wRUjp3Z6ci/I0A7y+v6CHobG9Emd5Rnk2KxoTSrQhvaH5+xuLi9O+CobvdxkaSoN WCrtI41RBw79+c5g14aA2ewpQ4Eo2V3E7+QrtTQrlD8hHE97QUeZM0HgRr7kSIA86p2RWl 2YMOIk9pO/QeLaQZcxT9Bc+mLuhTz9qOkxH8Wzi2N73OvhTXAkjmBi4Bq7yQKabEROkiun ZGU290sPITWNIFfG7k9U5cuti5AFWdmMXBrzssZE/1Z1sgJzhECmT7dEFIWAZ8NVYdONFm ot1RB9eQuU52+IfuBppPj5kNWfaMiDVMP8e5Y1SvqXSmgdVUUlXAAI/y02q69g== 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 4cTfhN2Js0zhNW; Sat, 20 Sep 2025 19:34: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 58KJYS5n040348; Sat, 20 Sep 2025 19:34:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58KJYSEN040345; Sat, 20 Sep 2025 19:34:28 GMT (envelope-from git) Date: Sat, 20 Sep 2025 19:34:28 GMT Message-Id: <202509201934.58KJYSEN040345@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 4c3a868d13c0 - main - fcntl(F_SETFL): only allow one thread to perform F_SETFL List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4c3a868d13c053ef173268cdfe1365978a282178 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=4c3a868d13c053ef173268cdfe1365978a282178 commit 4c3a868d13c053ef173268cdfe1365978a282178 Author: Konstantin Belousov AuthorDate: 2025-09-11 10:05:04 +0000 Commit: Konstantin Belousov CommitDate: 2025-09-20 19:24:10 +0000 fcntl(F_SETFL): only allow one thread to perform F_SETFL Use f_vflags file locking for this. Allowing more than one thread handling F_SETFL might cause de-sync between real driver state and flags. Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Differential revision: https://reviews.freebsd.org/D52487 --- sys/kern/kern_descrip.c | 3 +++ sys/kern/vfs_vnops.c | 36 ++++++++++++++++++++++++++++++++++++ sys/sys/file.h | 4 ++++ 3 files changed, 43 insertions(+) diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c index 2a833d2eafbe..19118eb7f275 100644 --- a/sys/kern/kern_descrip.c +++ b/sys/kern/kern_descrip.c @@ -658,6 +658,7 @@ kern_fcntl(struct thread *td, int fd, int cmd, intptr_t arg) error = EBADF; break; } + fsetfl_lock(fp); do { tmp = flg = fp->f_flag; tmp &= ~FCNTLFLAGS; @@ -677,6 +678,7 @@ kern_fcntl(struct thread *td, int fd, int cmd, intptr_t arg) if (error != 0) goto revert_nonblock; } + fsetfl_unlock(fp); fdrop(fp, td); break; revert_nonblock: @@ -691,6 +693,7 @@ revert_flags: tmp |= got_cleared; tmp &= ~got_set; } while (atomic_cmpset_int(&fp->f_flag, flg, tmp) == 0); + fsetfl_unlock(fp); fdrop(fp, td); break; diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c index f81c2033d95e..3d4567b6ab1e 100644 --- a/sys/kern/vfs_vnops.c +++ b/sys/kern/vfs_vnops.c @@ -896,6 +896,18 @@ foffset_read(struct file *fp) return (atomic_load_long(&fp->f_offset)); } +void +fsetfl_lock(struct file *fp) +{ + file_v_lock(fp, FILE_V_SETFL_LOCKED, FILE_V_SETFL_LOCK_WAITING); +} + +void +fsetfl_unlock(struct file *fp) +{ + file_v_unlock(fp, FILE_V_SETFL_LOCKED, FILE_V_SETFL_LOCK_WAITING); +} + #else /* OFF_MAX <= LONG_MAX */ static void @@ -971,6 +983,30 @@ foffset_read(struct file *fp) return (foffset_lock(fp, FOF_NOLOCK)); } + +void +fsetfl_lock(struct file *fp) +{ + struct mtx *mtxp; + + mtxp = mtx_pool_find(mtxpool_sleep, fp); + mtx_lock(mtxp); + file_v_lock_mtxp(fp, mtxp, FILE_V_SETFL_LOCKED, + FILE_V_SETFL_LOCK_WAITING); + mtx_unlock(mtxp); +} + +void +fsetfl_unlock(struct file *fp) +{ + struct mtx *mtxp; + + mtxp = mtx_pool_find(mtxpool_sleep, fp); + mtx_lock(mtxp); + file_v_unlock_mtxp(fp, mtxp, FILE_V_SETFL_LOCKED, + FILE_V_SETFL_LOCK_WAITING); + mtx_unlock(mtxp); +} #endif void diff --git a/sys/sys/file.h b/sys/sys/file.h index 9a072121e25f..c44fd0f28929 100644 --- a/sys/sys/file.h +++ b/sys/sys/file.h @@ -93,6 +93,8 @@ void foffset_lock_pair(struct file *fp1, off_t *off1p, struct file *fp2, void foffset_lock_uio(struct file *fp, struct uio *uio, int flags); void foffset_unlock(struct file *fp, off_t val, int flags); void foffset_unlock_uio(struct file *fp, struct uio *uio, int flags); +void fsetfl_lock(struct file *fp); +void fsetfl_unlock(struct file *fp); static inline off_t foffset_get(struct file *fp) @@ -222,6 +224,8 @@ struct file { #define FILE_V_FOFFSET_LOCKED 0x0001 #define FILE_V_FOFFSET_LOCK_WAITING 0x0002 +#define FILE_V_SETFL_LOCKED 0x0004 +#define FILE_V_SETFL_LOCK_WAITING 0x0008 #endif /* __BSD_VISIBLE */ #endif /* _KERNEL || _WANT_FILE */ From nobody Sat Sep 20 20:21:51 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cTglK4L01z68LwT; Sat, 20 Sep 2025 20:22:05 +0000 (UTC) (envelope-from chmeee@has.gonegalt.net) Received: from mail.gonegalt.net (mail.gonegalt.net [208.167.253.104]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4cTglK1f7Jz3J8N; Sat, 20 Sep 2025 20:22:05 +0000 (UTC) (envelope-from chmeee@has.gonegalt.net) Authentication-Results: mx1.freebsd.org; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gonegalt.net; s=dkim; t=1758399723; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=TSHUOs5KaH+MIKofAkszlBM0j+bLwv+wuXnd7HkfUek=; b=cH8/YcVIHFv2GWSNgUsEEf61syVpFYYJmRAgku6v9qncpmzmL5LGwAzOrwq5fSJX4UY52N uegA8FVxqFwB7oAQnCBaTba3FwZUhqcQzj+6bj+7Ly7w0pUQ+IYjB8yxA5D6sMseP5T0I8 UBNiqZurFEAkFzM3XkzrktW2T4LIhjo= Received: by localhost (OpenSMTPD) with ESMTP id 10ba77dc; Sat, 20 Sep 2025 16:22:03 -0400 (EDT) Received: from ralga.knownspace ([2600:2b00:a720:d301:9f03:382a:d672:81f0]) by mail.gonegalt.net with ESMTPSA id 0fh1F+sMz2hTegEA0J78UA (envelope-from ); Sat, 20 Sep 2025 16:22:03 -0400 Date: Sat, 20 Sep 2025 16:21:51 -0400 From: Justin Hibbits To: Konstantin Belousov Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: b31abc95eb73 - main - arm, powerpc, riscv: implement atomic_set/clear_16 Message-ID: <20250920162151.05aad15b@ralga.knownspace> In-Reply-To: <202509201934.58KJYO0O040235@gitrepo.freebsd.org> References: <202509201934.58KJYO0O040235@gitrepo.freebsd.org> X-Mailer: Claws Mail 4.3.1 (GTK 3.24.50; powerpc64le-unknown-linux-gnu) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4cTglK1f7Jz3J8N On Sat, 20 Sep 2025 19:34:24 GMT Konstantin Belousov wrote: > The branch main has been updated by kib: > > URL: > https://cgit.FreeBSD.org/src/commit/?id=b31abc95eb730d566891e134ba14af852645f772 > > commit b31abc95eb730d566891e134ba14af852645f772 > Author: Konstantin Belousov > AuthorDate: 2025-09-19 18:01:47 +0000 > Commit: Konstantin Belousov > CommitDate: 2025-09-20 19:23:54 +0000 > > arm, powerpc, riscv: implement atomic_set/clear_16 > > Reviewed by: jrtc27, markj > Sponsored by: The FreeBSD Foundation > MFC after: 1 week > Differential revision: https://reviews.freebsd.org/D52626 > --- > sys/arm/include/atomic.h | 3 +++ > sys/powerpc/include/atomic.h | 33 ++++++++++++++++++++++++++++++++- > sys/riscv/include/atomic.h | 3 +++ > sys/sys/_atomic_subword.h | 28 ++++++++++++++++++++++++++++ > 4 files changed, 66 insertions(+), 1 deletion(-) > > diff --git a/sys/arm/include/atomic.h b/sys/arm/include/atomic.h > index f3313b136656..c180ceaca142 100644 > --- a/sys/arm/include/atomic.h > +++ b/sys/arm/include/atomic.h > @@ -1110,4 +1110,7 @@ atomic_thread_fence_seq_cst(void) > */ > #include > > +#define atomic_set_short atomic_set_16 > +#define atomic_clear_short atomic_clear_16 > + > #endif /* _MACHINE_ATOMIC_H_ */ > diff --git a/sys/powerpc/include/atomic.h > b/sys/powerpc/include/atomic.h index 015a283e2de7..b2d7549e5bd0 100644 > --- a/sys/powerpc/include/atomic.h > +++ b/sys/powerpc/include/atomic.h > @@ -1137,7 +1137,38 @@ atomic_thread_fence_seq_cst(void) > #define atomic_cmpset_short atomic_cmpset_16 > #define atomic_fcmpset_char atomic_fcmpset_8 > #define atomic_fcmpset_short atomic_fcmpset_16 > -#endif > +#define atomic_set_short atomic_set_16 > +#define atomic_clear_short atomic_clear_16 > +#else > + > +static __inline void > +atomic_set_short(volatile u_short *p, u_short bit) > +{ > + u_short v; > + > + v = atomic_load_short(p); > + for (;;) { > + if (atomic_fcmpset_16(p, &v, v | bit)) > + break; > + } > +} > + > +static __inline void > +atomic_clear_short(volatile u_short *p, u_short bit) > +{ > + u_short v; > + > + v = atomic_load_short(p); > + for (;;) { > + if (atomic_fcmpset_16(p, &v, v & ~bit)) > + break; > + } > +} > + > +#define atomic_set_16 atomic_set_short > +#define atomic_clear_16 atomic_clear_short > + > +#endif /* ISA_206_ATOMICS */ > > /* These need sys/_atomic_subword.h on non-ISA-2.06-atomic > platforms. */ ATOMIC_CMPSET_ACQ_REL(char); > diff --git a/sys/riscv/include/atomic.h b/sys/riscv/include/atomic.h > index 74ffc171b028..c90cb02c482c 100644 > --- a/sys/riscv/include/atomic.h > +++ b/sys/riscv/include/atomic.h > @@ -656,4 +656,7 @@ atomic_thread_fence_seq_cst(void) > > #include > > +#define atomic_set_short atomic_set_16 > +#define atomic_clear_short atomic_clear_16 > + > #endif /* _MACHINE_ATOMIC_H_ */ > diff --git a/sys/sys/_atomic_subword.h b/sys/sys/_atomic_subword.h > index dee5a3bed871..284e2bfa340f 100644 > --- a/sys/sys/_atomic_subword.h > +++ b/sys/sys/_atomic_subword.h > @@ -205,4 +205,32 @@ atomic_load_acq_16(const volatile uint16_t *p) > #undef _ATOMIC_BYTE_SHIFT > #undef _ATOMIC_HWORD_SHIFT > > +#ifndef atomic_set_16 > +static __inline void > +atomic_set_16(volatile uint16_t *p, uint16_t bit) > +{ > + uint16_t v; > + > + v = atomic_load_16(p); > + for (;;) { > + if (atomic_fcmpset_16(p, &v, v | bit)) > + break; > + } > +} > +#endif > + > +#ifndef atomic_clear_16 > +static __inline void > +atomic_clear_16(volatile uint16_t *p, uint16_t bit) > +{ > + uint16_t v; > + > + v = atomic_load_16(p); > + for (;;) { > + if (atomic_fcmpset_16(p, &v, v & ~bit)) > + break; > + } > +} > +#endif > + > #endif /* _SYS__ATOMIC_SUBWORD_H_ */ I'll do a follow-up on this soon (next few days) for the ISA_206_ATOMICS case. - Justin From nobody Sat Sep 20 22:17:59 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cTkKj4j6rz68ThL; Sat, 20 Sep 2025 22:18:33 +0000 (UTC) (envelope-from herbert@gojira.at) Received: from mout-p-202.mailbox.org (mout-p-202.mailbox.org [80.241.56.172]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4cTkKj2KP1z3VxC; Sat, 20 Sep 2025 22:18:33 +0000 (UTC) (envelope-from herbert@gojira.at) Authentication-Results: mx1.freebsd.org; none Received: from smtp102.mailbox.org (smtp102.mailbox.org [IPv6:2001:67c:2050:b231:465::102]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-202.mailbox.org (Postfix) with ESMTPS id 4cTkKd0rd1z9scN; Sun, 21 Sep 2025 00:18:29 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gojira.at; s=MBO0001; t=1758406709; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=nRoAN8r6/wV9CPW8BsZ+HK8PZjjubLWGKfcTzVVO2yo=; b=v1NYLLuQfnmZEnEzSV7LOAwuk3DGteaGmRjvZfj7jMGK+mLR56YOJ17mvETymwHpa8HHa+ 8GEUVCGJ4Jd1hiZytTGih8d9Nhin7iOTqbK0oYsa0gVkvivyxb3kJHtkSOyVzouHUdyOlt qy/gqyKRnHpDFF0QZ5ekGMlT1zqhgkq645/SLvYq0bIHW7aJ2tj2i3Yfnrgrm8x6aKL5tH ySYXKd3f3/yYxuH7YqaHK59uUwag+f6lh7q6bGCsIE4hRgrF1iyBz4YU7dYVk3c8wMmAdL voVp/5W8vSWeTd74Oa/SVX9LdZuHpuCmzUrlFWGHIr7QNq5mCUFHyW1IvzGjAw== Date: Sun, 21 Sep 2025 00:17:59 +0200 Message-ID: <874iswhip4.wl-herbert@gojira.at> From: "Herbert J. Skuhra" To: Guido Falsi Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 31ec8b6407fd - main - sys/netinet6: Implement RFC 7217 In-Reply-To: <202509201231.58KCVqBC047480@gitrepo.freebsd.org> References: <202509201231.58KCVqBC047480@gitrepo.freebsd.org> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:199118, ipnet:80.241.56.0/21, country:DE] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4cTkKj2KP1z3VxC On Sat, 20 Sep 2025 14:31:52 +0200, Guido Falsi wrote: > > The branch main has been updated by madpilot: > > URL: https://cgit.FreeBSD.org/src/commit/?id=31ec8b6407fdd5a87d70265762457c67ce618283 > > commit 31ec8b6407fdd5a87d70265762457c67ce618283 > Author: Guido Falsi > AuthorDate: 2025-09-20 12:26:41 +0000 > Commit: Guido Falsi > CommitDate: 2025-09-20 12:31:44 +0000 > > sys/netinet6: Implement RFC 7217 > > Implement RFC 7217 (A Method for Generating Semantically Opaque > Interface Identifiers with IPv6 Stateless Address Autoconfiguration > (SLAAC)) in our IPv6 stack. > > A new ifconfig `stableaddr` flag is added to enable the feature on > interfaces, which defaults to on or off for new interfaces based > on the sysctl `net.inet6.ip6.use_stableaddr` (off by default, so > this commit causes no change in behavior with default settings). > > The algorithm follows the RFC in its logic, using SHA256-HMAC as > the algorithm to derive addresses so as to provide code that can > be leveraged by future implentations of RFC 8981, leveraging the > `hostuuid` as the secret. > > The source of the hostidentifier can be configured using the sysctl > `net.inet6.ip6.stableaddr_netifsource`, while the number of retries > generating a new address in case of collision can be configured > using the `net.inet6.ip6.stableaddr_maxretries` sysctl (default 3). > > Documentation about all these flags is added to the ifconfig(8) man > page. > > Reviewed by: cognet, glebius, hrs > Tested by: zarychtam@plan-b.pwste.edu.pl > Approved by: cognet, glebius > Relnotes: yes > Differential Revision: https://reviews.freebsd.org/D49681 > --- > sbin/ifconfig/af_inet6.c | 2 + > sbin/ifconfig/af_nd6.c | 1 + > sbin/ifconfig/ifconfig.8 | 30 +++++ > sys/netinet6/in6.h | 3 + > sys/netinet6/in6_ifattach.c | 275 +++++++++++++++++++++++++++++++++++++------- > sys/netinet6/in6_ifattach.h | 2 + > sys/netinet6/in6_proto.c | 10 ++ > sys/netinet6/ip6_input.c | 1 + > sys/netinet6/ip6_var.h | 12 ++ > sys/netinet6/nd6.c | 9 ++ > sys/netinet6/nd6.h | 2 + > sys/netinet6/nd6_nbr.c | 35 +++++- > sys/netinet6/nd6_rtr.c | 128 +++++++++++++-------- > usr.sbin/ndp/ndp.c | 7 ++ > 14 files changed, 423 insertions(+), 94 deletions(-) This commit breaks security/netbird: Management: Disconnected, reason: create wg interface: error creating tun device: unable to get nd6 flags for tun0: invalid argument Signal: Disconnected, reason: create wg interface: error creating tun device: unable to get nd6 flags for tun0: invalid argument From nobody Sat Sep 20 22:41:46 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cTkrj659yz68W9S for ; Sat, 20 Sep 2025 22:41:57 +0000 (UTC) (envelope-from eduardo@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cTkrj4rqBz3ZNd for ; Sat, 20 Sep 2025 22:41:57 +0000 (UTC) (envelope-from eduardo@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758408117; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=P0t7eFsldAY5lTHLYdMcC1BfgCvn2+GDdJ4vAV6t7RM=; b=vEDxMm6YjXVk+/FTUZcDvEjnj0AA+kofsGJrLb2AeQ1APpj/3RIQeNEaVA4wxavertUO7E hZ/f/2MGkIRUM8MGongh9LwqAJGTUBRkWzgEEKYYiFe+7GpXji+yRSP7JqQkp6Nhkt/CP3 +Oo7PnpcEZcrMNkToMqZVX+411jOorkhOq/8u8epW6tVtTDnmdcyLX8+15VcKpmwrYVxFZ Ykn9/BVys2g0XOVRKrC4f+d6K1HhdGLgl6bSVt3gUzwnecKvNg3xgHj12i5yoJS/DFSwTm /JrkaxrE8BjDl+PLuupQLm/4EdCwEvbwWhx2bsfUudX1AhoBvn7n7fOqkjC4Kg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758408117; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=P0t7eFsldAY5lTHLYdMcC1BfgCvn2+GDdJ4vAV6t7RM=; b=p1tQQsLokSIlJqEc6jW9oVeDNg2mXvXa7fStmitkXdXoOiKA6XFtpHw9rNv7Q0c0lTVGyf M7a5m7ZnueTCghZ04Okb/ebs6Dq6DwaiTJ7M5MJV0U0/2rbtP/kkMAxGqEwCXv+Zh8Z9Vj rbxRx8b2D+uGEB3X67+OT929GDnweH9hu69vIQ4CQc9ynGBV9C8H8brScv/sjj2guGUQjw h/K/LKoS/C1GKJgO5C2oj/6pF7RzLC7PSsJ/QzzeNEsJlBttiPgsrgklWohQPopl9ZEy/2 pP7pWJ4aQTRgAmsrMMgWkC6d2HpNG3t/m3eg9h7/j/OrPkXH2/iaPucT2dwveA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758408117; a=rsa-sha256; cv=none; b=JGYLT1F+DJ+AaCoqtgKL9hHdfV4OL0y0QeVMxxbTBwF7PD4MNyEwGCmGccu8+M/A5VH6Bv 9IwGBfspHJiScjbWhyzcPgnbpbG5PKWRrM4Zwvqo9gQBszVwjR1LsG3qF8pEXhj5zLWJPV 3Wo5It1HHSQkjeSIIE0TXL1mFRLeeD8SG+GR0iy+Wiux8XiMYvhe1IoZTrScEm5sSiFe/q wFP/z8ehKmjOni/OZTOeqQwJXssJJ+oZPYUQrQDMLZNqUA9dpRSoxw2IS/T0/7wMhuPhrj NqyG1/EK0C+Re0kDDOFwdqs3VKbQ37k4oBwoUtALzFlNIRHpM33CHPBGxtHtRg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from mail-qk1-f174.google.com (mail-qk1-f174.google.com [209.85.222.174]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) (Authenticated sender: eduardo) by smtp.freebsd.org (Postfix) with ESMTPSA id 4cTkrj3sYGz10sH for ; Sat, 20 Sep 2025 22:41:57 +0000 (UTC) (envelope-from eduardo@freebsd.org) Received: by mail-qk1-f174.google.com with SMTP id af79cd13be357-80f6846bf6dso88266185a.2 for ; Sat, 20 Sep 2025 15:41:57 -0700 (PDT) X-Forwarded-Encrypted: i=1; AJvYcCU0Kx7rClp9zykliU4lb2UDug3GZBLleHIvdQqrFaMTqgOhk03UYubUGwX4hc4/lCKm5SPDoJXt3zRRnsMlqygFYg+u4Q==@freebsd.org X-Gm-Message-State: AOJu0YyQdaxN9EvY9jNxxk0Ca8f1gnAkSl5ld6hh3gU4AeCrAb5u7Yff BTIs+4yESijEpC6OzKAnkXIry/hr3JGdRV0noyWNgDMi1xTC79fmiu8KNbvDxs21SDsG2qGlzqV ThYkJy3ilBvwJeWmxJ3a5JnSWjPaOxxI= X-Google-Smtp-Source: AGHT+IE6kG3I2I0cE0DIZkQBF8wSg3HZy47QNzdykHx5sYhW8fA7jvQm/JRJXbLr4i9Y3t1LpwnNVZGl+X0Bm+j5Hug= X-Received: by 2002:a05:622a:2b44:b0:4b6:2efe:2f73 with SMTP id d75a77b69052e-4c23cf3bee3mr48901081cf.1.1758408117075; Sat, 20 Sep 2025 15:41:57 -0700 (PDT) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 References: <202509191603.58JG3EF6037438@gitrepo.freebsd.org> In-Reply-To: <202509191603.58JG3EF6037438@gitrepo.freebsd.org> From: Nuno Teixeira Date: Sat, 20 Sep 2025 23:41:46 +0100 X-Gmail-Original-Message-ID: X-Gm-Features: AS18NWBwHZxxEYd1MmE99_rsb6fGtP4YyLkIUBA1KnikhMa_w8d29w55NGGGT4g Message-ID: Subject: Re: git: 87a7b35f04b6 - main - bsdinstall: fix vfs.zfs.vdev.min_auto_ashift oid To: Ed Maste Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="0000000000003046b1063f434bf4" --0000000000003046b1063f434bf4 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hello! I've just upgraded to a recent main and on boot i see: `sysctl: unknown oid 'vfs.zfs.min_auto_ashift' at line 9` I remember this line in /etc/sysctl.conf for years: ``` # # This file is read when going to multi-user and its contents piped thru # ``sysctl'' to adjust kernel values. ``man 5 sysctl.conf'' for details. # # Uncomment this to prevent users from seeing information about processes that # are being run under another UID. #security.bsd.see_other_uids=3D0 vfs.zfs.min_auto_ashift=3D12 ``` Do we need to fix it from vfs.zfs.min_auto_ashift -> vfs.zfs.vdev.min_auto_ashift on /etc/sysctl.conf? Cheers, Ed Maste escreveu (sexta, 19/09/2025 =C3=A0(s) 17:03): > The branch main has been updated by emaste: > > URL: > https://cgit.FreeBSD.org/src/commit/?id=3D87a7b35f04b60956e9aa192680ae807= 73ec38f14 > > commit 87a7b35f04b60956e9aa192680ae80773ec38f14 > Author: Siva Mahadevan > AuthorDate: 2025-07-15 16:45:24 +0000 > Commit: Ed Maste > CommitDate: 2025-09-19 16:02:57 +0000 > > bsdinstall: fix vfs.zfs.vdev.min_auto_ashift oid > > Signed-off-by: Siva Mahadevan > PR: 266374 > Pull request: https://github.com/freebsd/freebsd-src/pull/1851 > Reviewed by: emaste > Sponsored by: The FreeBSD Foundation > --- > usr.sbin/bsdinstall/scripts/zfsboot | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) > > diff --git a/usr.sbin/bsdinstall/scripts/zfsboot > b/usr.sbin/bsdinstall/scripts/zfsboot > index aa05faa7d3dd..5fbf56ea59ac 100755 > --- a/usr.sbin/bsdinstall/scripts/zfsboot > +++ b/usr.sbin/bsdinstall/scripts/zfsboot > @@ -69,7 +69,7 @@ f_include $BSDCFG_SHARE/variable.subr > : ${ZFSBOOT_VDEV_TYPE:=3Dstripe} > > # > -# Should we use sysctl(8) vfs.zfs.min_auto_ashift=3D12 to force 4K secto= rs? > +# Should we use sysctl(8) vfs.zfs.vdev.min_auto_ashift=3D12 to force 4K > sectors? > # > : ${ZFSBOOT_FORCE_4K_SECTORS=3D1} > > @@ -221,7 +221,7 @@ PRINTF_CONF=3D"printf '%s=3D\"%%s\"\\\n' %s >> \"%s\"= " > PRINTF_FSTAB=3D'printf "$FSTAB_FMT" "%s" "%s" "%s" "%s" "%s" "%s" >> "%s= "' > SHELL_TRUNCATE=3D':> "%s"' > SWAP_GMIRROR_LABEL=3D'gmirror label swap %s' > -SYSCTL_ZFS_MIN_ASHIFT_12=3D'sysctl vfs.zfs.min_auto_ashift=3D12' > +SYSCTL_ZFS_MIN_ASHIFT_12=3D'sysctl vfs.zfs.vdev.min_auto_ashift=3D12' > UMOUNT=3D'umount "%s"' > ZFS_CREATE_WITH_OPTIONS=3D'zfs create %s "%s"' > ZFS_MOUNT=3D'zfs mount "%s"' > @@ -255,7 +255,7 @@ msg_encrypt_disks=3D"Encrypt Disks?" > msg_encrypt_disks_help=3D"Use geli(8) to encrypt all data partitions" > msg_error=3D"Error" > msg_force_4k_sectors=3D"Force 4K Sectors?" > -msg_force_4k_sectors_help=3D"Align partitions to 4K sector boundries and > set vfs.zfs.min_auto_ashift=3D12" > +msg_force_4k_sectors_help=3D"Align partitions to 4K sector boundries and > set vfs.zfs.vdev.min_auto_ashift=3D12" > msg_freebsd_installer=3D"$OSNAME Installer" > msg_geli_password=3D"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=3D"Initializing encryption on selected disks,\n this will > take several seconds per disk" > @@ -1099,7 +1099,7 @@ zfs_create_boot() > # > f_dprintf "$funcname: Preparing disk partitions for ZFS pool..." > > - # Force 4K sectors using vfs.zfs.min_auto_ashift=3D12 > + # Force 4K sectors using vfs.zfs.vdev.min_auto_ashift=3D12 > if [ "$ZFSBOOT_FORCE_4K_SECTORS" ]; then > f_dprintf "$funcname: With 4K sectors..." > f_eval_catch $funcname sysctl "$SYSCTL_ZFS_MIN_ASHIFT_12"= \ > @@ -1382,7 +1382,7 @@ zfs_create_boot() > > if [ "$ZFSBOOT_FORCE_4K_SECTORS" ]; then > f_eval_catch $funcname echo "$ECHO_APPEND" \ > - 'vfs.zfs.min_auto_ashift=3D12' \ > + 'vfs.zfs.vdev.min_auto_ashift=3D12' \ > $BSDINSTALL_TMPETC/sysctl.conf.zfs || return $FAILUR= E > fi > > > --=20 Nuno Teixeira FreeBSD UNIX: Web: https://FreeBSD.org --0000000000003046b1063f434bf4 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello!

I've just upgrade= d to a recent main and on boot i see:

`sysctl: unknown oid 'vfs.= zfs.min_auto_ashift' at line 9`

I remember this line = in /etc/sysctl.conf for years:

```
#
# =C2=A0This file = is read when going to multi-user and its contents piped thru
# =C2=A0``s= ysctl'' to adjust kernel values. =C2=A0``man 5 sysctl.conf''= ; for details.
#

# Uncomment this to prevent users from seeing in= formation about processes that
# are being run under another UID.
#se= curity.bsd.see_other_uids=3D0
vfs.zfs.min_auto_ashift=3D12
```
Do we need to fix it from=C2=A0vfs<= /span>.zfs.min_auto_ashift ->=C2=A0vfs.zfs.vdev.min_auto_ashift on /etc/sysctl.conf?

<= /div>
Cheers,

Ed Maste <emaste@freebsd.org> escreveu (sexta, 19/09/2025= =C3=A0(s) 17:03):
The branch main has been updated by emaste:

URL: https://cgit.= FreeBSD.org/src/commit/?id=3D87a7b35f04b60956e9aa192680ae80773ec38f14
commit 87a7b35f04b60956e9aa192680ae80773ec38f14
Author:=C2=A0 =C2=A0 =C2=A0Siva Mahadevan <me@svmhdvn.name>
AuthorDate: 2025-07-15 16:45:24 +0000
Commit:=C2=A0 =C2=A0 =C2=A0Ed Maste <emaste@FreeBSD.org>
CommitDate: 2025-09-19 16:02:57 +0000

=C2=A0 =C2=A0 bsdinstall: fix vfs.zfs.vdev.min_auto_ashift oid

=C2=A0 =C2=A0 Signed-off-by: Siva Mahadevan <me@svmhdvn.name>
=C2=A0 =C2=A0 PR: 266374
=C2=A0 =C2=A0 Pull request: https://github.com/freeb= sd/freebsd-src/pull/1851
=C2=A0 =C2=A0 Reviewed by: emaste
=C2=A0 =C2=A0 Sponsored by: The FreeBSD Foundation
---
=C2=A0usr.sbin/bsdinstall/scripts/zfsboot | 10 +++++-----
=C2=A01 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/usr.sbin/bsdinstall/scripts/zfsboot b/usr.sbin/bsdinstall/scri= pts/zfsboot
index aa05faa7d3dd..5fbf56ea59ac 100755
--- a/usr.sbin/bsdinstall/scripts/zfsboot
+++ b/usr.sbin/bsdinstall/scripts/zfsboot
@@ -69,7 +69,7 @@ f_include $BSDCFG_SHARE/variable.subr
=C2=A0: ${ZFSBOOT_VDEV_TYPE:=3Dstripe}

=C2=A0#
-# Should we use sysctl(8) vfs.zfs.min_auto_ashift=3D12 to force 4K sectors= ?
+# Should we use sysctl(8) vfs.zfs.vdev.min_auto_ashift=3D12 to force 4K se= ctors?
=C2=A0#
=C2=A0: ${ZFSBOOT_FORCE_4K_SECTORS=3D1}

@@ -221,7 +221,7 @@ PRINTF_CONF=3D"printf '%s=3D\"%%s\"\= \\n' %s >> \"%s\""
=C2=A0PRINTF_FSTAB=3D'printf "$FSTAB_FMT" "%s" &quo= t;%s" "%s" "%s" "%s" "%s" >= > "%s"'
=C2=A0SHELL_TRUNCATE=3D':> "%s"'
=C2=A0SWAP_GMIRROR_LABEL=3D'gmirror label swap %s'
-SYSCTL_ZFS_MIN_ASHIFT_12=3D'sysctl vfs.zfs.min_auto_ashift=3D12' +SYSCTL_ZFS_MIN_ASHIFT_12=3D'sysctl vfs.zfs.vdev.min_auto_ashift=3D12&#= 39;
=C2=A0UMOUNT=3D'umount "%s"'
=C2=A0ZFS_CREATE_WITH_OPTIONS=3D'zfs create %s "%s"'
=C2=A0ZFS_MOUNT=3D'zfs mount "%s"'
@@ -255,7 +255,7 @@ msg_encrypt_disks=3D"Encrypt Disks?"
=C2=A0msg_encrypt_disks_help=3D"Use geli(8) to encrypt all data partit= ions"
=C2=A0msg_error=3D"Error"
=C2=A0msg_force_4k_sectors=3D"Force 4K Sectors?"
-msg_force_4k_sectors_help=3D"Align partitions to 4K sector boundries = and set vfs.zfs.min_auto_ashift=3D12"
+msg_force_4k_sectors_help=3D"Align partitions to 4K sector boundries = and set vfs.zfs.vdev.min_auto_ashift=3D12"
=C2=A0msg_freebsd_installer=3D"$OSNAME Installer"
=C2=A0msg_geli_password=3D"Enter a strong passphrase, used to protect = your encryption keys. You will be required to enter this passphrase each ti= me the system is booted"
=C2=A0msg_geli_setup=3D"Initializing encryption on selected disks,\n t= his will take several seconds per disk"
@@ -1099,7 +1099,7 @@ zfs_create_boot()
=C2=A0 =C2=A0 =C2=A0 =C2=A0 #
=C2=A0 =C2=A0 =C2=A0 =C2=A0 f_dprintf "$funcname: Preparing disk parti= tions for ZFS pool..."

-=C2=A0 =C2=A0 =C2=A0 =C2=A0# Force 4K sectors using vfs.zfs.min_auto_ashif= t=3D12
+=C2=A0 =C2=A0 =C2=A0 =C2=A0# Force 4K sectors using vfs.zfs.vdev.min_auto_= ashift=3D12
=C2=A0 =C2=A0 =C2=A0 =C2=A0 if [ "$ZFSBOOT_FORCE_4K_SECTORS" ]; t= hen
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 f_dprintf "$fu= ncname: With 4K sectors..."
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 f_eval_catch $funcn= ame sysctl "$SYSCTL_ZFS_MIN_ASHIFT_12" \
@@ -1382,7 +1382,7 @@ zfs_create_boot()

=C2=A0 =C2=A0 =C2=A0 =C2=A0 if [ "$ZFSBOOT_FORCE_4K_SECTORS" ]; t= hen
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 f_eval_catch $funcn= ame echo "$ECHO_APPEND" \
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 '= ;vfs.zfs.min_auto_ashift=3D12' \
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 '= ;vfs.zfs.vdev.min_auto_ashift=3D12' \
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0$BSDINSTALL_TMPETC/sysctl.conf.zfs || return $FAILURE
=C2=A0 =C2=A0 =C2=A0 =C2=A0 fi




--
Nuno Teixeira
=
FreeBSD UNIX:=C2=A0 <eduardo@FreeBSD.org>=C2=A0 =C2=A0Web:=C2=A0 https://Fr= eeBSD.org
--0000000000003046b1063f434bf4-- From nobody Sat Sep 20 23:14:07 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cTlZ319yLz68XZs for ; Sat, 20 Sep 2025 23:14:19 +0000 (UTC) (envelope-from eduardo@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cTlZ263Ccz3dHq for ; Sat, 20 Sep 2025 23:14:18 +0000 (UTC) (envelope-from eduardo@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758410058; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=xy48y/QgIbQ5c5uwnuAKuTaF9Ou0/NE1iUHDY3lLUQs=; b=aNko+w7uwPm7jkjmWKMgiA2WwEFsocxSQQnsd3Cd8JimbrxDN7COEWbblLDQeRWkBWRhRA vPp3YF2yRVm+Jj4KfFAnLuGLQ2AvTU1GxPkKAwlFkvsc7kkHoNGiCIQfBREQd12a3uEQm1 SbuPBAVVNwjgb0vCfdNsSpXm2l5jTbz5/KxAg90wS8Ak7xVBEWmW7lHTSpYxFJuVfFZaSY JHzDJVGvU3IUrw8UKcs7gTcWUtw8W5qK704EYWMHSojMu2y4wOCVhlC8+eTQofzraea2h2 PIuZNQjSdXH8t5B4OmJfrAlBc+kdw8JHLzdR8J+cZKOgmxrr4KKWvvBHz3Q4Xw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758410058; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=xy48y/QgIbQ5c5uwnuAKuTaF9Ou0/NE1iUHDY3lLUQs=; b=R14mBSOIAttaNNHkfWrNXxC3sZVAPOqGG0W05pc+eZPkjlyd1LAjsroJGNgtH3fEzD1fVh nV0Parr8lZMhaM5ZVD9eKn+dCDIAVCZrR3BIuTkH/dVKXsd4JODlq7BrsCEbn0amoT1X1J ziYr1HxlP6WPc/ZrXOhOKFwe42BfzcLpgBKieSYNpllAijL/YomTwEQeEK/0dI0t39ikBB lX9jAw+DhNtjrRbTqyl32j5TUVInHqrgm5EsiNsXENtGlBJr6w8PoUWhWNjFiV9v6meZmH mUNUvV3LiX+TsKHBDzH0dvmYmjpv8TH35lcNGeGZDwAZaIwRGMy/jqE8pf52OA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758410058; a=rsa-sha256; cv=none; b=Tn4C6lwDLJPWgct9MRkx/FaK2zMXCY5M7FAl3sBC/xgPAs+ozZ2iAt8Qvh96srKjcGB7D2 8jvVjc07U8QWf1jQtxi1l9ORmsKvvtgBXdLgXD0Qdp5y8CmJnjxsoU9/6s7f+LxkeTePM7 DRQgqq0oQPANrOqCCZvWqfq7JoEAjJoZ7QPAF0nmUR6mIqffDzpeLYMMJGepSIiYRcKB9r h9kY5e+RqJ2DTnPApuktvFl03sYjr1nTQp6pX/GB+DZnrjHiM8UT5pxYLZCyOgVNblFtZv REL4YMw0EOW+At/wr57CxlWVAHnJd3Aro9wXf6U2nv9suUZTC+mdeljeWsJt6w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from mail-qt1-f177.google.com (mail-qt1-f177.google.com [209.85.160.177]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) (Authenticated sender: eduardo) by smtp.freebsd.org (Postfix) with ESMTPSA id 4cTlZ25Gk4z11qb for ; Sat, 20 Sep 2025 23:14:18 +0000 (UTC) (envelope-from eduardo@freebsd.org) Received: by mail-qt1-f177.google.com with SMTP id d75a77b69052e-4b7a69fb918so3676371cf.1 for ; Sat, 20 Sep 2025 16:14:18 -0700 (PDT) X-Forwarded-Encrypted: i=1; AJvYcCUoU5SjyGj5Q8UTepalC1oumotY0YvxYb4GTKSf97dzBDYQO/fp7oGgKhKtTyG2Qtt4jftOsrHCp+9I+hR6zK9VRx3ISQ==@freebsd.org X-Gm-Message-State: AOJu0YzY9/owCsS3YPZZ6FmoARyBzZrHo2XSa7VxYWmecGIbQ/Sh+rx4 CYNBCm9i7aBop7S2JXzgAvkogJyMh7sCNMucVw4ktWUkGbl1ZP8Hvuo8264zoreVCE52QNF6pkZ SKRgKdVbMu414HlJkn88hrO4/3mW8mD4= X-Google-Smtp-Source: AGHT+IFqQ0iSz++mtwGQd2X3SggHCMbkWoKEq80mJ17ExzlcS/KSjXVC5xwQmmzwJ0pTgspDDH9mzMEnz3+H2mNgzkU= X-Received: by 2002:a05:620a:19a7:b0:80e:455:940d with SMTP id af79cd13be357-83ba438b262mr654825785a.5.1758410058221; Sat, 20 Sep 2025 16:14:18 -0700 (PDT) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 References: <202509191603.58JG3EF6037438@gitrepo.freebsd.org> In-Reply-To: From: Nuno Teixeira Date: Sun, 21 Sep 2025 00:14:07 +0100 X-Gmail-Original-Message-ID: X-Gm-Features: AS18NWDLzkmpW97Q2ySBxgXE7yKyFRvkqbgsJXul9_FTk1OsH_fKG5MKFteiPPk Message-ID: Subject: Re: git: 87a7b35f04b6 - main - bsdinstall: fix vfs.zfs.vdev.min_auto_ashift oid To: Ed Maste Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="000000000000e3ce8f063f43be31" --000000000000e3ce8f063f43be31 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable (...) Maybe this need to be fixed somehow because values are different: % sysctl -a | grep ashift <118>sysctl: unknown oid 'vfs.zfs.min_auto_ashift' at line 9 <118>sysctl: unknown oid 'vfs.zfs.min_auto_ashift' at line 9 <118>sysctl: unknown oid 'vfs.zfs.min_auto_ashift' at line 9 <118>sysctl: unknown oid 'vfs.zfs.min_auto_ashift' at line 9 <118>sysctl: unknown oid 'vfs.zfs.min_auto_ashift' at line 9 vfs.zfs.vdev.max_auto_ashift: 14 vfs.zfs.vdev.min_auto_ashift: 9 vfs.zfs.vdev.file.physical_ashift: 9 vfs.zfs.vdev.file.logical_ashift: 9 Nuno Teixeira escreveu (s=C3=A1bado, 20/09/2025 =C3= =A0(s) 23:41): > Hello! > > I've just upgraded to a recent main and on boot i see: > > `sysctl: unknown oid 'vfs.zfs.min_auto_ashift' at line 9` > > I remember this line in /etc/sysctl.conf for years: > > ``` > # > # This file is read when going to multi-user and its contents piped thru > # ``sysctl'' to adjust kernel values. ``man 5 sysctl.conf'' for details= . > # > > # Uncomment this to prevent users from seeing information about processes > that > # are being run under another UID. > #security.bsd.see_other_uids=3D0 > vfs.zfs.min_auto_ashift=3D12 > ``` > Do we need to fix it from vfs.zfs.min_auto_ashift -> vfs.zfs.vdev.min_aut= o_ashift > on /etc/sysctl.conf? > > Cheers, > > Ed Maste escreveu (sexta, 19/09/2025 =C3=A0(s) 17:03= ): > >> The branch main has been updated by emaste: >> >> URL: >> https://cgit.FreeBSD.org/src/commit/?id=3D87a7b35f04b60956e9aa192680ae80= 773ec38f14 >> >> commit 87a7b35f04b60956e9aa192680ae80773ec38f14 >> Author: Siva Mahadevan >> AuthorDate: 2025-07-15 16:45:24 +0000 >> Commit: Ed Maste >> CommitDate: 2025-09-19 16:02:57 +0000 >> >> bsdinstall: fix vfs.zfs.vdev.min_auto_ashift oid >> >> Signed-off-by: Siva Mahadevan >> PR: 266374 >> Pull request: https://github.com/freebsd/freebsd-src/pull/1851 >> Reviewed by: emaste >> Sponsored by: The FreeBSD Foundation >> --- >> usr.sbin/bsdinstall/scripts/zfsboot | 10 +++++----- >> 1 file changed, 5 insertions(+), 5 deletions(-) >> >> diff --git a/usr.sbin/bsdinstall/scripts/zfsboot >> b/usr.sbin/bsdinstall/scripts/zfsboot >> index aa05faa7d3dd..5fbf56ea59ac 100755 >> --- a/usr.sbin/bsdinstall/scripts/zfsboot >> +++ b/usr.sbin/bsdinstall/scripts/zfsboot >> @@ -69,7 +69,7 @@ f_include $BSDCFG_SHARE/variable.subr >> : ${ZFSBOOT_VDEV_TYPE:=3Dstripe} >> >> # >> -# Should we use sysctl(8) vfs.zfs.min_auto_ashift=3D12 to force 4K sect= ors? >> +# Should we use sysctl(8) vfs.zfs.vdev.min_auto_ashift=3D12 to force 4K >> sectors? >> # >> : ${ZFSBOOT_FORCE_4K_SECTORS=3D1} >> >> @@ -221,7 +221,7 @@ PRINTF_CONF=3D"printf '%s=3D\"%%s\"\\\n' %s >> \"%s\= "" >> PRINTF_FSTAB=3D'printf "$FSTAB_FMT" "%s" "%s" "%s" "%s" "%s" "%s" >> "%= s"' >> SHELL_TRUNCATE=3D':> "%s"' >> SWAP_GMIRROR_LABEL=3D'gmirror label swap %s' >> -SYSCTL_ZFS_MIN_ASHIFT_12=3D'sysctl vfs.zfs.min_auto_ashift=3D12' >> +SYSCTL_ZFS_MIN_ASHIFT_12=3D'sysctl vfs.zfs.vdev.min_auto_ashift=3D12' >> UMOUNT=3D'umount "%s"' >> ZFS_CREATE_WITH_OPTIONS=3D'zfs create %s "%s"' >> ZFS_MOUNT=3D'zfs mount "%s"' >> @@ -255,7 +255,7 @@ msg_encrypt_disks=3D"Encrypt Disks?" >> msg_encrypt_disks_help=3D"Use geli(8) to encrypt all data partitions" >> msg_error=3D"Error" >> msg_force_4k_sectors=3D"Force 4K Sectors?" >> -msg_force_4k_sectors_help=3D"Align partitions to 4K sector boundries an= d >> set vfs.zfs.min_auto_ashift=3D12" >> +msg_force_4k_sectors_help=3D"Align partitions to 4K sector boundries an= d >> set vfs.zfs.vdev.min_auto_ashift=3D12" >> msg_freebsd_installer=3D"$OSNAME Installer" >> msg_geli_password=3D"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=3D"Initializing encryption on selected disks,\n this wil= l >> take several seconds per disk" >> @@ -1099,7 +1099,7 @@ zfs_create_boot() >> # >> f_dprintf "$funcname: Preparing disk partitions for ZFS pool..." >> >> - # Force 4K sectors using vfs.zfs.min_auto_ashift=3D12 >> + # Force 4K sectors using vfs.zfs.vdev.min_auto_ashift=3D12 >> if [ "$ZFSBOOT_FORCE_4K_SECTORS" ]; then >> f_dprintf "$funcname: With 4K sectors..." >> f_eval_catch $funcname sysctl "$SYSCTL_ZFS_MIN_ASHIFT_12= " >> \ >> @@ -1382,7 +1382,7 @@ zfs_create_boot() >> >> if [ "$ZFSBOOT_FORCE_4K_SECTORS" ]; then >> f_eval_catch $funcname echo "$ECHO_APPEND" \ >> - 'vfs.zfs.min_auto_ashift=3D12' \ >> + 'vfs.zfs.vdev.min_auto_ashift=3D12' \ >> $BSDINSTALL_TMPETC/sysctl.conf.zfs || return $FAILU= RE >> fi >> >> >> > > -- > Nuno Teixeira > FreeBSD UNIX: Web: https://FreeBSD.org > --=20 Nuno Teixeira FreeBSD UNIX: Web: https://FreeBSD.org --000000000000e3ce8f063f43be31 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
(...)

Maybe this need to be fixed someho= w because values are different:

% sysctl -a | grep ashift
<118= >sysctl: unknown oid 'vfs.zfs.min_auto_ashift' at line 9
<= 118>sysctl: unknown oid 'vfs.zfs.min_auto_ashift' at line 9
&= lt;118>sysctl: unknown oid 'vfs.zfs.min_auto_ashift' at line 9<118>sysctl: unknown oid 'vfs.zfs.min_auto_ashift' at line = 9
<118>sysctl: unknown oid 'vfs.zfs.min_auto_ashift' at li= ne 9
vfs.zfs.vdev.max_auto_ashift: 14
vfs.zfs.vdev.min_auto_ashift: 9=
vfs.zfs.vdev.file.physical_ashift: 9
vfs.zfs.vdev.file.logical_ashif= t: 9

Nuno Teixeira <eduardo@freebsd.org> escreveu (s=C3=A1bado, 20/09/2025 =C3= =A0(s) 23:41):
<= div dir=3D"ltr">
Hello!

I've just upgraded= to a recent main and on boot i see:

`sysctl: unknown oid 'vfs.z= fs.min_auto_ashift' at line 9`

I remember this line i= n /etc/sysctl.conf for years:

```
#
# =C2=A0This file i= s read when going to multi-user and its contents piped thru
# =C2=A0``sy= sctl'' to adjust kernel values. =C2=A0``man 5 sysctl.conf''= for details.
#

# Uncomment this to prevent users from seeing inf= ormation about processes that
# are being run under another UID.
#sec= urity.bsd.see_other_uids=3D0
vfs.zfs.min_auto_ashift=3D12
```
Do we need to fix it from=C2=A0vfs.zfs.= min_auto_ashift ->=C2=A0vfs.zfs.vdev.min_a= uto_ashift on /etc/sysctl.conf?

Cheers,

Ed Maste <emaste@freebsd.org> escreveu (sexta, 19/09/2025 =C3=A0(s= ) 17:03):
The br= anch main has been updated by emaste:

URL: https://cgit.= FreeBSD.org/src/commit/?id=3D87a7b35f04b60956e9aa192680ae80773ec38f14
commit 87a7b35f04b60956e9aa192680ae80773ec38f14
Author:=C2=A0 =C2=A0 =C2=A0Siva Mahadevan <me@svmhdvn.name>
AuthorDate: 2025-07-15 16:45:24 +0000
Commit:=C2=A0 =C2=A0 =C2=A0Ed Maste <emaste@FreeBSD.org>
CommitDate: 2025-09-19 16:02:57 +0000

=C2=A0 =C2=A0 bsdinstall: fix vfs.zfs.vdev.min_auto_ashift oid

=C2=A0 =C2=A0 Signed-off-by: Siva Mahadevan <me@svmhdvn.name>
=C2=A0 =C2=A0 PR: 266374
=C2=A0 =C2=A0 Pull request: https://github.com/freeb= sd/freebsd-src/pull/1851
=C2=A0 =C2=A0 Reviewed by: emaste
=C2=A0 =C2=A0 Sponsored by: The FreeBSD Foundation
---
=C2=A0usr.sbin/bsdinstall/scripts/zfsboot | 10 +++++-----
=C2=A01 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/usr.sbin/bsdinstall/scripts/zfsboot b/usr.sbin/bsdinstall/scri= pts/zfsboot
index aa05faa7d3dd..5fbf56ea59ac 100755
--- a/usr.sbin/bsdinstall/scripts/zfsboot
+++ b/usr.sbin/bsdinstall/scripts/zfsboot
@@ -69,7 +69,7 @@ f_include $BSDCFG_SHARE/variable.subr
=C2=A0: ${ZFSBOOT_VDEV_TYPE:=3Dstripe}

=C2=A0#
-# Should we use sysctl(8) vfs.zfs.min_auto_ashift=3D12 to force 4K sectors= ?
+# Should we use sysctl(8) vfs.zfs.vdev.min_auto_ashift=3D12 to force 4K se= ctors?
=C2=A0#
=C2=A0: ${ZFSBOOT_FORCE_4K_SECTORS=3D1}

@@ -221,7 +221,7 @@ PRINTF_CONF=3D"printf '%s=3D\"%%s\"\= \\n' %s >> \"%s\""
=C2=A0PRINTF_FSTAB=3D'printf "$FSTAB_FMT" "%s" &quo= t;%s" "%s" "%s" "%s" "%s" >= > "%s"'
=C2=A0SHELL_TRUNCATE=3D':> "%s"'
=C2=A0SWAP_GMIRROR_LABEL=3D'gmirror label swap %s'
-SYSCTL_ZFS_MIN_ASHIFT_12=3D'sysctl vfs.zfs.min_auto_ashift=3D12' +SYSCTL_ZFS_MIN_ASHIFT_12=3D'sysctl vfs.zfs.vdev.min_auto_ashift=3D12&#= 39;
=C2=A0UMOUNT=3D'umount "%s"'
=C2=A0ZFS_CREATE_WITH_OPTIONS=3D'zfs create %s "%s"'
=C2=A0ZFS_MOUNT=3D'zfs mount "%s"'
@@ -255,7 +255,7 @@ msg_encrypt_disks=3D"Encrypt Disks?"
=C2=A0msg_encrypt_disks_help=3D"Use geli(8) to encrypt all data partit= ions"
=C2=A0msg_error=3D"Error"
=C2=A0msg_force_4k_sectors=3D"Force 4K Sectors?"
-msg_force_4k_sectors_help=3D"Align partitions to 4K sector boundries = and set vfs.zfs.min_auto_ashift=3D12"
+msg_force_4k_sectors_help=3D"Align partitions to 4K sector boundries = and set vfs.zfs.vdev.min_auto_ashift=3D12"
=C2=A0msg_freebsd_installer=3D"$OSNAME Installer"
=C2=A0msg_geli_password=3D"Enter a strong passphrase, used to protect = your encryption keys. You will be required to enter this passphrase each ti= me the system is booted"
=C2=A0msg_geli_setup=3D"Initializing encryption on selected disks,\n t= his will take several seconds per disk"
@@ -1099,7 +1099,7 @@ zfs_create_boot()
=C2=A0 =C2=A0 =C2=A0 =C2=A0 #
=C2=A0 =C2=A0 =C2=A0 =C2=A0 f_dprintf "$funcname: Preparing disk parti= tions for ZFS pool..."

-=C2=A0 =C2=A0 =C2=A0 =C2=A0# Force 4K sectors using vfs.zfs.min_auto_ashif= t=3D12
+=C2=A0 =C2=A0 =C2=A0 =C2=A0# Force 4K sectors using vfs.zfs.vdev.min_auto_= ashift=3D12
=C2=A0 =C2=A0 =C2=A0 =C2=A0 if [ "$ZFSBOOT_FORCE_4K_SECTORS" ]; t= hen
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 f_dprintf "$fu= ncname: With 4K sectors..."
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 f_eval_catch $funcn= ame sysctl "$SYSCTL_ZFS_MIN_ASHIFT_12" \
@@ -1382,7 +1382,7 @@ zfs_create_boot()

=C2=A0 =C2=A0 =C2=A0 =C2=A0 if [ "$ZFSBOOT_FORCE_4K_SECTORS" ]; t= hen
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 f_eval_catch $funcn= ame echo "$ECHO_APPEND" \
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 '= ;vfs.zfs.min_auto_ashift=3D12' \
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 '= ;vfs.zfs.vdev.min_auto_ashift=3D12' \
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0$BSDINSTALL_TMPETC/sysctl.conf.zfs || return $FAILURE
=C2=A0 =C2=A0 =C2=A0 =C2=A0 fi




--
Nuno Teixeira
=
FreeBSD UNIX:=C2=A0 <eduardo@FreeBSD.org>=C2=A0 =C2=A0Web:=C2=A0 https://Fr= eeBSD.org


--
Nuno Teixeira
=
FreeBSD UNIX:=C2=A0 <eduardo@FreeBSD.org>=C2=A0 =C2=A0Web:=C2=A0 https://Fr= eeBSD.org
--000000000000e3ce8f063f43be31-- From nobody Sun Sep 21 02:12:23 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cTqWm228Vz68lZx for ; Sun, 21 Sep 2025 02:12:36 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-il1-f174.google.com (mail-il1-f174.google.com [209.85.166.174]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cTqWm0Brpz41Br for ; Sun, 21 Sep 2025 02:12:36 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-il1-f174.google.com with SMTP id e9e14a558f8ab-4256f0444caso2236595ab.1 for ; Sat, 20 Sep 2025 19:12:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1758420755; x=1759025555; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=X2pMb11bUJeokBZEGm0E64a7mEkwOIq2flAJTTB22TA=; b=QA0T/tAeRW46YcIFOw/aFrMnpAz7bL/oUiatzIsxeI4EZZRO3SexylUJYgF7KKz2Hc xVpgTKKHPBA9iFyhovWV8E9d1OXmQWNqqZS9lMyYlHvCHIuv2k+vDm1mmKu5vBnP0K6e qRVb+bXYaeMjqFSJg+0wEBaNtM2pd7cvj44dc6fO73312LcOW5eEU/f7uwk9hmZQqwDk I44+2ILbitd2Q5xWtJWGp5WlUjCxVk+daSJGuLxnWTUUyCGgPlyuwFfIAap6PZ42SSnA AQCDrtBirzxjve9YpaeoIr9geJ8JXP/J/K8pbehH7DWFlf1Srzo+VKo5xL8sIIeR15Ev Ju6A== X-Forwarded-Encrypted: i=1; AJvYcCVK8zsopSdSTC18UfPd8MrGj124cMnq7kFe3KzY7YTfK61mBpk1BEfTjBkR2YuYW9h0z+CyTdBIoRYWfi0pT/FVJUJBzw==@freebsd.org X-Gm-Message-State: AOJu0YzEUwSZIWRubfuU6j6TEatZd51raT8PZO5WSYHyKVV4/Mo9ZABo TsZZ63KlvK8QwoWS4oS/UeWvv17QhjP2IPlFQEXS5D5if7IapTMO5AQVCdncNfSxFCOpiVSk0nb cgqVujw0KGMM3EcdvjMDQod7SUqI3HP1fFw== X-Gm-Gg: ASbGncsfdzV9AD8H06FnLRLvFaBQynodj3lUkvWu5MfH9Jk5cRn50bEUwyTtylK7tpE j2lE7U+S0uQClw6sXeuXlNZ6eELJziKMybZv7VTZim03PsTf3KgfdIOnltg/PbLgUkXPTfcCCsL BzTI/ei6z8wVcENXbqb3W1OlxjlRM/591wMfavDX44eUZQoIrldqeS4t+ZgD4ng9UE5TNMboSRA o9BxgYsiuWyDOMQOogvnUsdH0lsA4s3NHS7GIwpmw== X-Google-Smtp-Source: AGHT+IFbI4SQLnrzJAc7cOAOOED8KKIl3gbweHTRhZgDZqcebYYwmC/N/GvyCzdo6GQ4IWo6mJ1hlpPw5d+3/MBtLgc= X-Received: by 2002:a05:6e02:13ef:b0:424:81c1:9474 with SMTP id e9e14a558f8ab-42481c194fdmr94743435ab.24.1758420755010; Sat, 20 Sep 2025 19:12:35 -0700 (PDT) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 References: <202509191603.58JG3EF6037438@gitrepo.freebsd.org> In-Reply-To: From: Ed Maste Date: Sat, 20 Sep 2025 22:12:23 -0400 X-Gm-Features: AS18NWACqZwzxxAaHG0eFznbWr4KwoIJdAnkQ8NP3N4Dt8KEoak-DWOWeNw7gM8 Message-ID: Subject: Re: git: 87a7b35f04b6 - main - bsdinstall: fix vfs.zfs.vdev.min_auto_ashift oid To: Nuno Teixeira Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4cTqWm0Brpz41Br On Sat, 20 Sept 2025 at 18:41, Nuno Teixeira wrote: > > Hello! > > I've just upgraded to a recent main and on boot i see: > > `sysctl: unknown oid 'vfs.zfs.min_auto_ashift' at line 9` > > I remember this line in /etc/sysctl.conf for years: > > ``` > # > # This file is read when going to multi-user and its contents piped thru > # ``sysctl'' to adjust kernel values. ``man 5 sysctl.conf'' for details. > # > > # Uncomment this to prevent users from seeing information about processes that > # are being run under another UID. > #security.bsd.see_other_uids=0 > vfs.zfs.min_auto_ashift=12 > ``` > Do we need to fix it from vfs.zfs.min_auto_ashift -> vfs.zfs.vdev.min_auto_ashift on /etc/sysctl.conf? Short answer yes - the sysctl should be updated in /etc/sysctl.conf. There was backwards compatibility support for the old name but it was removed recently with an OpenZFS update. Unfortunately bsdinstall was also writing the old name into /etc/sysctl.conf until just now. We have some worth to do prior to 15.0 to address this situation. From nobody Sun Sep 21 03:07:56 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cTrlc3T6Mz68qBN; Sun, 21 Sep 2025 03:07:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cTrlc29xhz45DS; Sun, 21 Sep 2025 03:07:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758424076; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8LaP0Ti2H1ye2hLQcXho4lrZsGBUrJZLyiwiJ926XX8=; b=VguVY8Iv0vFGL8lX0++kUikjNHRTsPMWnwZ+CupRvzAnt9+pLJe0Vpmn14jUKSOvPRRku5 8vFQEcNWLExOGOZSP1qMp0CcYNKaen3HOhgMVeqHlP2NvFDZ3VxNLYaXL+Fzqym7EAXGfk iCg6pG1DPyx5CXOF1fDpqvoa4WqXfgudRGVeXT9trhxQyKg2yDrpmLOj4XbqWNs4CrIoDQ A7+FxoMQAqf5luhRRX4XckWDfnXy/mfQokTD+d3B5JUEISIVW7tE2mJScsEOVOxAE7Y2NZ yCoW7M3OL3PJGq3Td86tRKixM3sjR5+qVm5Roz2RW/jBbxJ3aqDG2CBs2Nf41w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758424076; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8LaP0Ti2H1ye2hLQcXho4lrZsGBUrJZLyiwiJ926XX8=; b=ucEYOB7e/19ISZKYABbHMB2M8hgqbVT9zZqJCZ/3upd3ipr3sRO7wfKkteNDundX+e7cdM 088LHkMFQOmSXQ8meWdQt6YoeTcbO3LPcbYZuG/udywPt6y1f3mAUC0ETbwX90pq7gD8Vz w3NOOARsb6Afn39/EqdJA+npvLYhVu4B+2qKuCMoSRYuS5znSn+PzBCPBxj5EHGnajTHdt 31c2wJqD8zvgpc5JMOvessVEpIBrNRmeA7yrE53qBgLKVtzoxW0iqHLsbQxBsgGGP7dfNT 1pak3LOwazZ1qkCCAqUCZHdLiX4C1mtK19HPTEc6lgd0oR76URHuVhL4AjPc2g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758424076; a=rsa-sha256; cv=none; b=NUKUYA7BBRQi13JWe9Ru4GoJtCPhf/FRpiQokMZ1AEFZym2Gy81l0P31mzlrRhNGbc2O/F k/uZQnN3tUFFyCMc13YOAV4AuJ4B1PdGgGCv5ozSB5/c5eW6YUZvBkCSCRrSC2ro5/p7oT X6FUDX8cv3R9JRSs7rYL+Yv/UOLl2MrfdzIvCYKJmgg14Ha3mpEHkxMgQ6cYnTwbcYvmqf yds1454RwrdLAZMvo9jNABTklzO5IzGsLXYkGyP2pyzZdOTOXUh6mHClz+tepz2BMJ+t3g DEDsbV1WV5I4jXBx7ZsloF6z6qZGaNJ02pK60kZP24Yc4FyRdcNy0wTokO1WAw== 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 4cTrlc1nH7zwxd; Sun, 21 Sep 2025 03:07:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58L37uQp087023; Sun, 21 Sep 2025 03:07:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58L37u0e087020; Sun, 21 Sep 2025 03:07:56 GMT (envelope-from git) Date: Sun, 21 Sep 2025 03:07:56 GMT Message-Id: <202509210307.58L37u0e087020@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 5c55b2f3ba6f - main - x86: directly use clflushopt mnemonic in cpufunc.h List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5c55b2f3ba6f48575496bde2d4d86272d10a8197 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=5c55b2f3ba6f48575496bde2d4d86272d10a8197 commit 5c55b2f3ba6f48575496bde2d4d86272d10a8197 Author: Konstantin Belousov AuthorDate: 2025-09-21 03:03:09 +0000 Commit: Konstantin Belousov CommitDate: 2025-09-21 03:04:58 +0000 x86: directly use clflushopt mnemonic in cpufunc.h We already use clflushopt in support.S, there is no reason to manually construct the encoding. Initially it was done because toolchains did not supported the (then) new instruction. Sponsored by: The FreeBSD Foundation MFC after: 1 week --- sys/amd64/include/cpufunc.h | 2 +- sys/i386/include/cpufunc.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/amd64/include/cpufunc.h b/sys/amd64/include/cpufunc.h index d180f5c76afb..e6c9f47ea261 100644 --- a/sys/amd64/include/cpufunc.h +++ b/sys/amd64/include/cpufunc.h @@ -76,7 +76,7 @@ static __inline void clflushopt(u_long addr) { - __asm __volatile(".byte 0x66;clflush %0" : : "m" (*(char *)addr)); + __asm __volatile("clflushopt %0" : : "m" (*(char *)addr)); } static __inline void diff --git a/sys/i386/include/cpufunc.h b/sys/i386/include/cpufunc.h index 4bed57b5afbf..b200588b0739 100644 --- a/sys/i386/include/cpufunc.h +++ b/sys/i386/include/cpufunc.h @@ -74,7 +74,7 @@ static __inline void clflushopt(u_long addr) { - __asm __volatile(".byte 0x66;clflush %0" : : "m" (*(char *)addr)); + __asm __volatile("clflushopt %0" : : "m" (*(char *)addr)); } static __inline void From nobody Sun Sep 21 08:29:02 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cTzt94C3Lz67kh8; Sun, 21 Sep 2025 08:29:05 +0000 (UTC) (envelope-from glebius@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cTzt93CkFz3JVH; Sun, 21 Sep 2025 08:29:05 +0000 (UTC) (envelope-from glebius@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758443345; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=KljZt/FW2m1MjYrZCIYejKY+UGVRx2OfUlE6syj+DKY=; b=YVpLGCD+rPjo3PI37VxhDWDijXp8H4qgzVb7UFmLuImCuG2JEuzjOTOGbW/5Aig3gXHTAs FhH2V7lGI7Ttzn9T6d2/FDfF/PfUg6AlY4k+jAFoaKUU3wWGth9B/zNpJa+jgXzPDIjwjw MQ+nAcCuEInYRtbUiLJw+/F5JO8bVXvZ3+rm5RT11XE1y+qcYSz1JT/mRF28dI/h5Yda3F cISMQeRUl3JEsd5UFzO1QEz5YSsCRtFp6jxceRmEJq9bf6oLMmfSrOC+FFgUEtstF9jy70 O2cSwYaEyOQj7/Xm4NPo/gCIZUjvbXv4sRrWLjRyx9E6vZu6urby7UhkiREFHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758443345; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=KljZt/FW2m1MjYrZCIYejKY+UGVRx2OfUlE6syj+DKY=; b=goRB88CmNmEk7Z00h8XzrcyVVJ/RVwwIWiLCAcD170uVc3Kq6QUvsJqpSmA52eEzkI/P/6 chDU2c1LzV0I9aPgSbOPdHy5bIVo+MXCcIp4CDp/thNO7CKJqwZpQ32UJZ3m5TGICK6RO8 J2YDXqdCOfgtomhFFYpTAASd6SVOQMUwk+YnX7740M7MR1qo7QQAdKr8sDC/QJWvmeI2eI JTM8dGAfcXdmmFvzpt+YHDgvFcAtJvdQzl1L6wsglxUjT5bzBobCGd2n2IboV0lbNNHbN9 vknNuCSfcT3T23g+4GoJuGNQQAb3koqwt3gN12xGp6s19CPzA3U/Cj0gAC6Oiw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758443345; a=rsa-sha256; cv=none; b=L9qVcuYleE/rh9ZV6pMMEOTlkx4khK5SHUUZEIqmlVFSbKCZC49Z4nJo5la6mMDspjEA8D f5Yr0QzEUbu56/IWl1CjqVe7l2E3rbaUn/vAgwPXxRgUIRBrePkTjbWO/uhyU+EcOqLLO1 SLqSEcQRlPMhcWJaZOU+XuVZDYwcq3JaDhb6B7yuVUUBriPgcf2h1y3V4cdLfam+Zq2ocp qYxn55SlbDwwSk3zKQk2YHis0ZXVeZxJJzwmFbESUAULZ6XhJY+udL0KztC/7h3oAWKxJG p7DjtaLkdQqlTdTcmu/41bQzTO4XgtmxCvrqI09babnff6GOevgn9AXRGnx6Sw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from cell.glebi.us (glebi.us [162.251.186.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: glebius) by smtp.freebsd.org (Postfix) with ESMTPSA id 4cTzt84qXTz1Cmp; Sun, 21 Sep 2025 08:29:04 +0000 (UTC) (envelope-from glebius@freebsd.org) Date: Sun, 21 Sep 2025 01:29:02 -0700 From: Gleb Smirnoff To: Adrian Chadd , bz@freebsd.org Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 785edcc2af5a - main - net80211: convert the rest of the native net80211 drivers to SEQNO_OFFLOAD Message-ID: References: <202509200047.58K0lcgE017026@gitrepo.freebsd.org> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202509200047.58K0lcgE017026@gitrepo.freebsd.org> Hi, On Sat, Sep 20, 2025 at 12:47:38AM +0000, Adrian Chadd wrote: A> commit 785edcc2af5ae32c24f5caf5b9552f62bdae33ee A> Author: Adrian Chadd A> AuthorDate: 2025-06-10 04:22:10 +0000 A> Commit: Adrian Chadd A> CommitDate: 2025-09-20 00:42:45 +0000 A> A> net80211: convert the rest of the native net80211 drivers to SEQNO_OFFLOAD A> A> * Convert the rest of the drivers to implement driver/offloaded sequence A> number handling. A> A> * For drivers that implement their own sequence number space handling A> for A-MPDU, only call ieee80211_output_seqno_assign() if the frame A> isn't tagged with M_AMPDU_MPDU, which mirrors the original net80211 A> sequence number behaviour. (Except of course, the assignment is A> now happening during final encap/transmit, not early in encap.) A> A> Locally tested (sta mode): A> A> * ath A> * iwn A> * bwi A> * bwn A> * iwm A> * otus A> * ral A> A> Differential Revision: https://reviews.freebsd.org/D50772 A> Okayed by: bz This commit broke my iwm(4) on Thinkpad X1 Carbon 7th Gen. The symptoms are that the interface can associate and even receive DHCP address, but after that all transmitted packets are lost. Any communication attempt results in ARP requests that are not seen by other devices on the network. Reverting this commit resolves the problem. I will be able to test patches tomorrow, please send them to me. If we are not able to resolve that before start of the stabweek which is this Monday, I'd like to get this reverted from main. -- Gleb Smirnoff From nobody Sun Sep 21 09:15:12 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cV0vP1QWpz67nbC; Sun, 21 Sep 2025 09:15: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 4cV0vP0Tpgz3MZN; Sun, 21 Sep 2025 09:15:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758446113; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PJLAZo447iIqtkF0m59JJkwxxxCEHAsadh9xMjWfgUw=; b=OoqpZKui39DqqDO/FyRbPQT6ExYYJ/6GoM1yF3AneQEMhH9Y39tA3ckirfh+tJgtoRpgPX 7c3RydC2xYxFtbtaUllZII66TBDn22Zac/ACh44oDAjgU3ib000gRD7Glpcj3s0+uL1Hm/ MoWUIZuIuVgBzUtSa76GChJq9vw2B6Mxgb+pMxX2R06JTsz3+6Z5gvtEp5Zo4keSFc6ET6 KNUN4yYSPJTSp0xQ82UZmF0vgLlko3k5C4TA4QsBvv5uUgn11ey57NCFT4Jjhr8I4RUsLS K2GJng7Q5zZsBiCDiC5oSG1w+MnIwcUgeorLqfgcKQ3fE++oU6D5ojzNFAUsJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758446113; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PJLAZo447iIqtkF0m59JJkwxxxCEHAsadh9xMjWfgUw=; b=VCMmoAjjwvxjD2WdOKLaQj00bGpnzFq1uCuq29YmXzH3M+5AP7f/kqQ2dNwFvDTDGkzsWy kWOW+EUPUbsHHwoLuKPlfVF42xhsFrbne54RGjellq03gkWOjgP+d/w4n/tkEbwQtgQAQm qcDWOxBcE/Zux7WM1oVcYBQ3zOG1CUrOTayu010REVcHHFjC4Bhr+ZxPfA/0FLwjjFcWwU JTmN7LRKwgiuje/YeMVk1SDM1RJaXT4CQWwt0LEwYsnKXCdjpNDhGChF6WwyR4Y6hKrmp5 FhHZfKIWQzdBg8Drv7MVESlc8nh1OoSUX2KnGoNRofBFeFhyB61ESlU2yqt1ZQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758446113; a=rsa-sha256; cv=none; b=Mv1naiyVeuuncAcMklkQrwIG3QbrtPOwd8MqnDg7lqmr5TdWaxq4oL0HUtEY7+b5AxHIDM r5bSYWkb6OsBb8DjIqmvc+mX89w7JHzbSqGNpkAaiKSnu8banLLSOYoUpdWTqjwRgAns2o itux2O3S8fnGhwDPLbiar5DBd+cshLi9FxXALPEfvyYEhtjeIgq/BNgXgpza9ZHDFWdj14 OC75//EAYFTfgQvYj5spghfhGjxxl5Z5FE4qo/OthKK3Gf4LKZr1bgsJ2+kuIc09cor6Iq INrG1Vm767EmDq+x/VMWA3iL3gVaiGoxXV1BTNXmaFxexEusdvc7svZrdrt3NQ== 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 4cV0vP04WKz172x; Sun, 21 Sep 2025 09:15: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 58L9FCGa081716; Sun, 21 Sep 2025 09:15:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58L9FCo2081712; Sun, 21 Sep 2025 09:15:12 GMT (envelope-from git) Date: Sun, 21 Sep 2025 09:15:12 GMT Message-Id: <202509210915.58L9FCo2081712@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Peter Holm Subject: git: 6ef1bf8f3460 - main - stress2: Do not follow symbolic links List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pho X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6ef1bf8f34605c1ffce1e5643e95213a9943c7df Auto-Submitted: auto-generated The branch main has been updated by pho: URL: https://cgit.FreeBSD.org/src/commit/?id=6ef1bf8f34605c1ffce1e5643e95213a9943c7df commit 6ef1bf8f34605c1ffce1e5643e95213a9943c7df Author: Peter Holm AuthorDate: 2025-09-21 09:12:46 +0000 Commit: Peter Holm CommitDate: 2025-09-21 09:12:46 +0000 stress2: Do not follow symbolic links --- tools/test/stress2/misc/rsync.sh | 2 +- tools/test/stress2/misc/rsync3.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/test/stress2/misc/rsync.sh b/tools/test/stress2/misc/rsync.sh index fa52f98c6f02..1e677c7c1f6c 100755 --- a/tools/test/stress2/misc/rsync.sh +++ b/tools/test/stress2/misc/rsync.sh @@ -31,7 +31,7 @@ if [ $s -eq 0 ]; then fi if [ $s -eq 0 ]; then - diff -rq /usr/src/sys $mntpoint/usr/src/sys > $log; s=$? + diff --no-dereference -rq /usr/src/sys $mntpoint/usr/src/sys > $log; s=$? [ $s -ne 0 ] && { echo "/usr/src $mntpoint/usr/src differ!"; head -10 $log; } fi diff --git a/tools/test/stress2/misc/rsync3.sh b/tools/test/stress2/misc/rsync3.sh index 1d77bdfbcaa5..e5e4db128b0f 100755 --- a/tools/test/stress2/misc/rsync3.sh +++ b/tools/test/stress2/misc/rsync3.sh @@ -30,7 +30,7 @@ if [ $s -eq 0 ]; then fi if [ $s -eq 0 ]; then - diff -rq /usr/src/sys $mntpoint/usr/src/sys > $log; s=$? + diff --no-dereference -rq /usr/src/sys $mntpoint/usr/src/sys > $log; s=$? [ $s -ne 0 ] && { echo "/usr/src $mntpoint/usr/src differ!"; head -10 $log; } fi From nobody Sun Sep 21 09:58:15 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cV1s51xgCz67rW6; Sun, 21 Sep 2025 09:58:17 +0000 (UTC) (envelope-from madpilot@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cV1s50sNvz3S84; Sun, 21 Sep 2025 09:58:17 +0000 (UTC) (envelope-from madpilot@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758448697; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=mU/P63n0mX1ly8/zOJImkxBaGNQBYIACRbnyNPz2hWQ=; b=AtHafsPRGM5goGex76306ceC0T+iQzwelDhEDPz0UB0erD9fRijIDjwFeAIBrij6htP10x 4GSi9EbJH/Xw0lOEiBasWqOoeNoAkIoChL19kOzaO/KUInKyGMJ+RQi8EbvxOg73i+pQbm KsKbEyWuz/FNY3+huT4/zxMiryhJJJ1Ns88XBUvRWu1gragcQDh74eaoMTiL8TjqUV9lry Tl6PDZbf9mDgSxI87NTgt3Eh+xmB272zlAR6lygyoxyFZeE0clYQrd6DOrf358Ia31Xsat 4vmYh6wBuTHSfPWULhKOcd4jS0iQCd5kUNT/oaHz4uhbLg+4L3reY2xhKJJvhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758448697; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=mU/P63n0mX1ly8/zOJImkxBaGNQBYIACRbnyNPz2hWQ=; b=cSYFVkbhUaLqetzL7OKUEApyA2SjnzR/E2M+12tu/4R5lhfDYhxLHc+vJIdY6XAJfj345L nvv/OAyCn239TVUK6W7hqy0vsz5+1+IwmkJyjmloZe5C51bW5zejgs4afW5A/OFF9mTseM k6GqdockKiG4tDLkmh6bOLAorZfpdQmjFoNsXtdSyqudo6MILVXB1TnoMTsKqXhmpHo8CI P27YYlXaewqbCidH/ZIM6io+qEgZrnFY8IrZDqLbqGkzcr9n9r5NZf7VVuXVJyo+o3Nfka AQr/q8QQCvkSAI+0BHRjmAH5LeLqoVR0OoKBI3cfnTD95BGK7eOryH8OFGLCyg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758448697; a=rsa-sha256; cv=none; b=SaoeJcLY9liegaWvXZ69rRHgmj4juCkqMHP4AXTPrYSPYsY1v6qPExNrBxvbdMdHl6cuQR H76eq+yiyCfTSO3kJ/hGG1sbht7slS0ZAtk6hC8sLSrubkn6bJ15MqBH4p5OYw5RggCdIn /XLv4+hotoTmDHayDyCKda3sFTAJpZhWdFYS3iHMtx8vAd2p2zElbOI8YvpeRjvssRXt1+ ZgfxRxfsLfsmJgQj6sxUI8PWIUDI8OA7jq4xpoFU9tLYudYuQefzFSNOp+uPA0ezjilXfO sOt+F+hURGve7d1X+mDpQV058OsHKTRKNjr022/4FqrbJL50FTS5A1YAxTW2eg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from [IPV6:2a01:e11:2002:4280::13:1] (unknown [IPv6:2a01:e11:2002:4280::13:1]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: madpilot/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4cV1s43hYtz1cT; Sun, 21 Sep 2025 09:58:16 +0000 (UTC) (envelope-from madpilot@FreeBSD.org) Message-ID: Date: Sun, 21 Sep 2025 11:58:15 +0200 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: Guido Falsi Subject: Re: git: 31ec8b6407fd - main - sys/netinet6: Implement RFC 7217 To: "Herbert J. Skuhra" Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202509201231.58KCVqBC047480@gitrepo.freebsd.org> <874iswhip4.wl-herbert@gojira.at> Content-Language: en-US, it, en-GB Autocrypt: addr=madpilot@FreeBSD.org; keydata= xsBNBE+G+l0BCADi/WBQ0aRJfnE7LBPsM0G3m/m3Yx7OPu4iYFvS84xawmRHtCNjWIntsxuX fptkmEo3Rsw816WUrek8dxoUAYdHd+EcpBcnnDzfDH5LW/TZ4gbrFezrHPdRp7wdxi23GN80 qPwHEwXuF0X4Wy5V0OO8B6VT/nA0ADYnBDhXS52HGIJ/GCUjgqJn+phDTdCFLvrSFdmgx4Wl c0W5Z1p5cmDF9l8L/hc959AeyNf7I9dXnjekGM9gVv7UDUYzCifR3U8T0fnfdMmS8NeI9NC+ wuREpRO4lKOkTnj9TtQJRiptlhcHQiAlG1cFqs7EQo57Tqq6cxD1FycZJLuC32bGbgalABEB AAHNIkd1aWRvIEZhbHNpIDxtYWRwaWxvdEBGcmVlQlNELm9yZz7CwHgEEwECACIFAk+G+3MC GwMGCwkIBwMCBhUIAgkKCwQWAgMBAh4BAheAAAoJEBrmhg5Wy9KT2uIIAIrawQ89TnqEhi2C OEQAhx3uqWZuNoS6NyiSgsRCmtSnT2GOgH4Ucbr/I37SkV1B3K6HkoL6lwN8Gjf5KOgLqmTi E1W3RTwS7l8PSvdnjM9i7g351R4mTijtxawB/JcQf/Kge3Yqr1V4g6H+wQXHUStmHThbupuN trzRphvR/e5ekT0FTyVfPmpcbm68i2bwZnKUex/TNIECBykYh8b+SYMLhENf2ayRjCIWS2Ad 7tnTKhMtnS5jtW6qjBy4RoTpQD6oR1xIgkTRlQ49roVCUfdHb+Y/kh+U9G1IcoNy4vkg9IfP dwpSfnP+a8j0AZ1hMnOLZ1fYoQrs+4gVLy8Fs7TOwU0EUxB7QQEQAKFhrDceoPdK/IHDSmoj 6SQYisvM7VdhcleS7E9DoEAVt7yMbf6HbbMVTTY6ckvwTWQssywLBXNVqxgc4WLJjzfUhgef +WE75M3+WFYlOVQLGZY/zEVgma1raYnOHNAOzeHLDmEXjbZP6vGAeDyBbGfQPpE7qGYZ7ube T3XwQO+PklcCrvOPj2ZPcAxGNS2xVU/LzONqCrJqLMJSIcCdsbiSP4G5PnDFHtMokaTY6OEr 8OEQfOAerhcHUa/z7Uu8YtmaqKH+QGkE/WEgaRqSiTnv0JOTD+DxehaqvoKPPZ++2NpCZMHB 2i6A/xifmQwEiIjEXtcueBRzkNUQkxhqZyS13SrhocL9ydtaVPBzZatAEjUDDEJmAMLVFs45 qfyhMiNapHJo2n3MW/E5omqCvEkDdWX/en3P7CK2TemeaDghMsgkNKax/z0wNo5UZCkOPOz0 xpNiUilOVbkuezZZNg65741qee2lfXhQIaZ66yT7hphc/N/z3PIAtLeze4u1VR2EXAuZ2sWA dlKCNTlJMsaU/x70BV11Wd/ypnVzM68dfdQIIAj1iMFAD/lXGlEUmKXg5Ov2VQDlTntQoanC YrAg+8CttPzjrydgLZFq3hrtQmfc0se5yv1WHS69+BsUOG09RvvawUDZxUjW19kyeN9THaNR gow3kSuArUp6zSmJABEBAAHCwF8EGAEIAAkFAlMQe0ECGwwACgkQGuaGDlbL0pMN5wgA4bCk X/qwEVC06ToeR6C2putmSWQMgpDaqrv65Hubo+QGmg2P4ewTYQQ4g6oYWS03qHxqVVWhKz7F jfrV+dH8qbCLfSgIcvdBha7ayGZVrsiuMLKGbw36fcmkZPpSDOfHcP0XH8Z+u9CWj0xUkTxA lZ/7i6gYSUpG2JWNtdmE/X8VVEyXusCLwy0K0BI60A/4dRTIX3C4QKrJ3ZbUXegz70ynjHf+ lQMZ9IZKASoRMuS5FozPQh6abvmwZEPdf5I9riUElzvHrqJ8Bx0t3Pujdoth+yNHpnBxrtO8 LkQdrQ58P0SwcaIX33T2U9pG8bhu5YVR88FQ8OQ0cEsPBpDncg== In-Reply-To: <874iswhip4.wl-herbert@gojira.at> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 9/21/25 00:17, Herbert J. Skuhra wrote: > On Sat, 20 Sep 2025 14:31:52 +0200, Guido Falsi wrote: >> >> The branch main has been updated by madpilot: >> >> URL: https://cgit.FreeBSD.org/src/commit/?id=31ec8b6407fdd5a87d70265762457c67ce618283 >> >> commit 31ec8b6407fdd5a87d70265762457c67ce618283 >> Author: Guido Falsi >> AuthorDate: 2025-09-20 12:26:41 +0000 >> Commit: Guido Falsi >> CommitDate: 2025-09-20 12:31:44 +0000 >> >> sys/netinet6: Implement RFC 7217 >> >> Implement RFC 7217 (A Method for Generating Semantically Opaque >> Interface Identifiers with IPv6 Stateless Address Autoconfiguration >> (SLAAC)) in our IPv6 stack. >> >> A new ifconfig `stableaddr` flag is added to enable the feature on >> interfaces, which defaults to on or off for new interfaces based >> on the sysctl `net.inet6.ip6.use_stableaddr` (off by default, so >> this commit causes no change in behavior with default settings). >> >> The algorithm follows the RFC in its logic, using SHA256-HMAC as >> the algorithm to derive addresses so as to provide code that can >> be leveraged by future implentations of RFC 8981, leveraging the >> `hostuuid` as the secret. >> >> The source of the hostidentifier can be configured using the sysctl >> `net.inet6.ip6.stableaddr_netifsource`, while the number of retries >> generating a new address in case of collision can be configured >> using the `net.inet6.ip6.stableaddr_maxretries` sysctl (default 3). >> >> Documentation about all these flags is added to the ifconfig(8) man >> page. >> >> Reviewed by: cognet, glebius, hrs >> Tested by: zarychtam@plan-b.pwste.edu.pl >> Approved by: cognet, glebius >> Relnotes: yes >> Differential Revision: https://reviews.freebsd.org/D49681 >> --- >> sbin/ifconfig/af_inet6.c | 2 + >> sbin/ifconfig/af_nd6.c | 1 + >> sbin/ifconfig/ifconfig.8 | 30 +++++ >> sys/netinet6/in6.h | 3 + >> sys/netinet6/in6_ifattach.c | 275 +++++++++++++++++++++++++++++++++++++------- >> sys/netinet6/in6_ifattach.h | 2 + >> sys/netinet6/in6_proto.c | 10 ++ >> sys/netinet6/ip6_input.c | 1 + >> sys/netinet6/ip6_var.h | 12 ++ >> sys/netinet6/nd6.c | 9 ++ >> sys/netinet6/nd6.h | 2 + >> sys/netinet6/nd6_nbr.c | 35 +++++- >> sys/netinet6/nd6_rtr.c | 128 +++++++++++++-------- >> usr.sbin/ndp/ndp.c | 7 ++ >> 14 files changed, 423 insertions(+), 94 deletions(-) > > This commit breaks security/netbird: > > Management: Disconnected, reason: create wg interface: error creating tun device: unable to get nd6 flags for tun0: invalid argument > Signal: Disconnected, reason: create wg interface: error creating tun device: unable to get nd6 flags for tun0: invalid argument > Thanks for reporting this, I'm going to take a look shortly, although I'm not sure why, since the functionality is disabled by default. -- Guido Falsi From nobody Sun Sep 21 10:44:42 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cV2tj07YFz67vV7; Sun, 21 Sep 2025 10:44:45 +0000 (UTC) (envelope-from madpilot@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cV2th4n2nz3Whm; Sun, 21 Sep 2025 10:44:44 +0000 (UTC) (envelope-from madpilot@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758451484; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=IOlaG6KiU5AWVv7NJrV2quv26Glr8zTJnOVRdgCwU7Q=; b=SOBe6m8+LD2TS2cuihuzfDgg6mDXfF55zhcB/8/toyeoadGUVvb+zzJ0TRRLe0Aejw44Xc pD658+w9/1Z/I/g+svPSu2DbZrgRBa4Cl9LVtqSkAFoY359GmAuSqa8zkIhA2VbgZF5slY u/dZaPJQWHwPFBb9sfyEyRwBVWTO+81IqMVbLuev5y7tuuH0mIe9oaDjsiuoHxTTmFttMK nhLnmc4OZKCCQnb1Bh9fjeUEgKwmwe0OMr1xWZIXR4/10Pm21YI4ZpfRoOEWAPfuJ5ARJe OijbCEzfLCGl21yBA44ftsXGDIk41gDUlgFYc6HNuBsONfsdeSI1z6f4ZkxjTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758451484; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=IOlaG6KiU5AWVv7NJrV2quv26Glr8zTJnOVRdgCwU7Q=; b=V2CjlLJa5269qckr56/mPUVluufSqGgpMl7aqLFZ7X0ZcLbTGvG8z0FOnCd2KmAY3IObrB VCE66EYIR/iiapsfqAOoH6YMBg2Vna2bCKFwjgV1eoHj2xAbl+r0G9FT2PCr7eyQodOFej 7c0+eLGBlo0regZUEKle/2l7j6MLNm5xVPBrEVOzlUvkUpt7P4AfcLrjG2qGGun45DJtlx nWQA+b29YQU2gTERdQ5kh+2vnsjuueAl0l/QaGxlOSOjk/Uwy1I0LHlXa5ulfmzZBVnQ14 NyAOXVsmTmQQWlLhQKBtkRJBjgAdgWtzjl0WVumjxrDtcimM34kiraDUFuEvCw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758451484; a=rsa-sha256; cv=none; b=SQAXsF+Uzv6J/LXOhmXyfXyJxlMj4Xtfo8UCSyh+VGeiIEPKYB7uIqQvVBP8Jv9xXPYayX 7jGSF8CPOmH8WiY4aGkR43zNZy99Cj5uOxrNFCokMxVjw4f8r4X6z1r3tV7cM4P73T+oCf 1J0fNiQfKMbnTwrJwhY2/pBOkwSKfmP2RIriKtg4S7Qq6+3KyQciESNT2RDLKzWK7ZE1ir YVVkQ7zJeGdlhBQFnv9X1lfLoJxE9FQ4SJyNXoEeMkiHnYPxtXHxWRaLW8cvdle3NEJ+Vh 7mnpaFEQvciTK5YzeLWPb7mesyez2VDiX9IQGrVqsfWQhOwBmsAIclhl1y0ysA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from [IPV6:2a01:e11:2002:4280::13:1] (unknown [IPv6:2a01:e11:2002:4280::13:1]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: madpilot/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4cV2th0XzWz1yK; Sun, 21 Sep 2025 10:44:43 +0000 (UTC) (envelope-from madpilot@FreeBSD.org) Message-ID: <07503de1-785e-4e4d-b4e4-0524aeb064e1@FreeBSD.org> Date: Sun, 21 Sep 2025 12:44:42 +0200 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: Guido Falsi Subject: Re: git: 31ec8b6407fd - main - sys/netinet6: Implement RFC 7217 To: "Herbert J. Skuhra" Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202509201231.58KCVqBC047480@gitrepo.freebsd.org> <874iswhip4.wl-herbert@gojira.at> Content-Language: en-US, it, en-GB Autocrypt: addr=madpilot@FreeBSD.org; keydata= xsBNBE+G+l0BCADi/WBQ0aRJfnE7LBPsM0G3m/m3Yx7OPu4iYFvS84xawmRHtCNjWIntsxuX fptkmEo3Rsw816WUrek8dxoUAYdHd+EcpBcnnDzfDH5LW/TZ4gbrFezrHPdRp7wdxi23GN80 qPwHEwXuF0X4Wy5V0OO8B6VT/nA0ADYnBDhXS52HGIJ/GCUjgqJn+phDTdCFLvrSFdmgx4Wl c0W5Z1p5cmDF9l8L/hc959AeyNf7I9dXnjekGM9gVv7UDUYzCifR3U8T0fnfdMmS8NeI9NC+ wuREpRO4lKOkTnj9TtQJRiptlhcHQiAlG1cFqs7EQo57Tqq6cxD1FycZJLuC32bGbgalABEB AAHNIkd1aWRvIEZhbHNpIDxtYWRwaWxvdEBGcmVlQlNELm9yZz7CwHgEEwECACIFAk+G+3MC GwMGCwkIBwMCBhUIAgkKCwQWAgMBAh4BAheAAAoJEBrmhg5Wy9KT2uIIAIrawQ89TnqEhi2C OEQAhx3uqWZuNoS6NyiSgsRCmtSnT2GOgH4Ucbr/I37SkV1B3K6HkoL6lwN8Gjf5KOgLqmTi E1W3RTwS7l8PSvdnjM9i7g351R4mTijtxawB/JcQf/Kge3Yqr1V4g6H+wQXHUStmHThbupuN trzRphvR/e5ekT0FTyVfPmpcbm68i2bwZnKUex/TNIECBykYh8b+SYMLhENf2ayRjCIWS2Ad 7tnTKhMtnS5jtW6qjBy4RoTpQD6oR1xIgkTRlQ49roVCUfdHb+Y/kh+U9G1IcoNy4vkg9IfP dwpSfnP+a8j0AZ1hMnOLZ1fYoQrs+4gVLy8Fs7TOwU0EUxB7QQEQAKFhrDceoPdK/IHDSmoj 6SQYisvM7VdhcleS7E9DoEAVt7yMbf6HbbMVTTY6ckvwTWQssywLBXNVqxgc4WLJjzfUhgef +WE75M3+WFYlOVQLGZY/zEVgma1raYnOHNAOzeHLDmEXjbZP6vGAeDyBbGfQPpE7qGYZ7ube T3XwQO+PklcCrvOPj2ZPcAxGNS2xVU/LzONqCrJqLMJSIcCdsbiSP4G5PnDFHtMokaTY6OEr 8OEQfOAerhcHUa/z7Uu8YtmaqKH+QGkE/WEgaRqSiTnv0JOTD+DxehaqvoKPPZ++2NpCZMHB 2i6A/xifmQwEiIjEXtcueBRzkNUQkxhqZyS13SrhocL9ydtaVPBzZatAEjUDDEJmAMLVFs45 qfyhMiNapHJo2n3MW/E5omqCvEkDdWX/en3P7CK2TemeaDghMsgkNKax/z0wNo5UZCkOPOz0 xpNiUilOVbkuezZZNg65741qee2lfXhQIaZ66yT7hphc/N/z3PIAtLeze4u1VR2EXAuZ2sWA dlKCNTlJMsaU/x70BV11Wd/ypnVzM68dfdQIIAj1iMFAD/lXGlEUmKXg5Ov2VQDlTntQoanC YrAg+8CttPzjrydgLZFq3hrtQmfc0se5yv1WHS69+BsUOG09RvvawUDZxUjW19kyeN9THaNR gow3kSuArUp6zSmJABEBAAHCwF8EGAEIAAkFAlMQe0ECGwwACgkQGuaGDlbL0pMN5wgA4bCk X/qwEVC06ToeR6C2putmSWQMgpDaqrv65Hubo+QGmg2P4ewTYQQ4g6oYWS03qHxqVVWhKz7F jfrV+dH8qbCLfSgIcvdBha7ayGZVrsiuMLKGbw36fcmkZPpSDOfHcP0XH8Z+u9CWj0xUkTxA lZ/7i6gYSUpG2JWNtdmE/X8VVEyXusCLwy0K0BI60A/4dRTIX3C4QKrJ3ZbUXegz70ynjHf+ lQMZ9IZKASoRMuS5FozPQh6abvmwZEPdf5I9riUElzvHrqJ8Bx0t3Pujdoth+yNHpnBxrtO8 LkQdrQ58P0SwcaIX33T2U9pG8bhu5YVR88FQ8OQ0cEsPBpDncg== In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 9/21/25 11:58, Guido Falsi wrote: > On 9/21/25 00:17, Herbert J. Skuhra wrote: >> On Sat, 20 Sep 2025 14:31:52 +0200, Guido Falsi wrote: >>> >>> The branch main has been updated by madpilot: >>> >>> URL: https://cgit.FreeBSD.org/src/commit/? >>> id=31ec8b6407fdd5a87d70265762457c67ce618283 >>> >>> commit 31ec8b6407fdd5a87d70265762457c67ce618283 >>> Author:     Guido Falsi >>> AuthorDate: 2025-09-20 12:26:41 +0000 >>> Commit:     Guido Falsi >>> CommitDate: 2025-09-20 12:31:44 +0000 >>> >>>      sys/netinet6: Implement RFC 7217 >>>      Implement RFC 7217 (A Method for Generating Semantically Opaque >>>      Interface Identifiers with IPv6 Stateless Address Autoconfiguration >>>      (SLAAC)) in our IPv6 stack. >>>      A new ifconfig `stableaddr` flag is added to enable the feature on >>>      interfaces, which defaults to on or off for new interfaces based >>>      on the sysctl `net.inet6.ip6.use_stableaddr` (off by default, so >>>      this commit causes no change in behavior with default settings). >>>      The algorithm follows the RFC in its logic, using SHA256-HMAC as >>>      the algorithm to derive addresses so as to provide code that can >>>      be leveraged by future implentations of RFC 8981, leveraging the >>>      `hostuuid` as the secret. >>>      The source of the hostidentifier can be configured using the sysctl >>>      `net.inet6.ip6.stableaddr_netifsource`, while the number of retries >>>      generating a new address in case of collision can be configured >>>      using the `net.inet6.ip6.stableaddr_maxretries` sysctl (default 3). >>>      Documentation about all these flags is added to the ifconfig(8) man >>>      page. >>>      Reviewed by:            cognet, glebius, hrs >>>      Tested by:              zarychtam@plan-b.pwste.edu.pl >>>      Approved by:            cognet, glebius >>>      Relnotes:               yes >>>      Differential Revision:  https://reviews.freebsd.org/D49681 >>> --- >>>   sbin/ifconfig/af_inet6.c    |   2 + >>>   sbin/ifconfig/af_nd6.c      |   1 + >>>   sbin/ifconfig/ifconfig.8    |  30 +++++ >>>   sys/netinet6/in6.h          |   3 + >>>   sys/netinet6/in6_ifattach.c | 275 +++++++++++++++++++++++++++++++++ >>> ++++------- >>>   sys/netinet6/in6_ifattach.h |   2 + >>>   sys/netinet6/in6_proto.c    |  10 ++ >>>   sys/netinet6/ip6_input.c    |   1 + >>>   sys/netinet6/ip6_var.h      |  12 ++ >>>   sys/netinet6/nd6.c          |   9 ++ >>>   sys/netinet6/nd6.h          |   2 + >>>   sys/netinet6/nd6_nbr.c      |  35 +++++- >>>   sys/netinet6/nd6_rtr.c      | 128 +++++++++++++-------- >>>   usr.sbin/ndp/ndp.c          |   7 ++ >>>   14 files changed, 423 insertions(+), 94 deletions(-) >> >> This commit breaks security/netbird: >> >> Management: Disconnected, reason: create wg interface: error creating >> tun device: unable to get nd6 flags for tun0: invalid argument >> Signal: Disconnected, reason: create wg interface: error creating tun >> device: unable to get nd6 flags for tun0: invalid argument >> > > Thanks for reporting this, > > I'm going to take a look shortly, although I'm not sure why, since the > functionality is disabled by default. > > Hi again, I'm going to try to reproduce this, but in the while, looking at the source code, the error comes from the wireguard-go package that is being used by netbird (we also have that in a port of its own BTW). The code there is manipulating the interface flags at a low level, but my commit modified that structure. There is some chance that simply forcing a rebuild and reinstall of the package will "fix" it. Have you tried that? If you already have, I'll go on and reproduce locally, if I can. -- Guido Falsi From nobody Sun Sep 21 11:49:12 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cV4Kx4cYfz680p2; Sun, 21 Sep 2025 11:49:57 +0000 (UTC) (envelope-from herbert@gojira.at) Received: from mout-p-201.mailbox.org (mout-p-201.mailbox.org [IPv6:2001:67c:2050:0:465::201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4cV4Kx2CKcz3bVK; Sun, 21 Sep 2025 11:49:57 +0000 (UTC) (envelope-from herbert@gojira.at) Authentication-Results: mx1.freebsd.org; none Received: from smtp202.mailbox.org (smtp202.mailbox.org [IPv6:2001:67c:2050:b231:465::202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-201.mailbox.org (Postfix) with ESMTPS id 4cV4Kg4JGwz9tBL; Sun, 21 Sep 2025 13:49:43 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gojira.at; s=MBO0001; t=1758455383; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Fx0n6RJ4iML3uNOmVUdRquJXnnViJlr5GVir0rVl+7c=; b=YvnBbqQveuU3TWrncxHvL5G1WXVOZE3nNQEPRF0V0qVQ4tm0sWvJiwjlWqAc+7/G7+7eJ5 lyeG4b9w7LXqhKyuoQkzXuucbK+pquC7sU6t5Z/nAA8y1btqsZJ6mLKI3DBwJb7swaqeI5 3E8o7eQ8bVnj49ue/CroNAJgwYEjRz83nKzNllxSn13EKWTRx/rxKbvz4y7LwYwz75dxbO qtTKNm5Qwkv89SpoCYFiMPYNVwaHM4EPew0uDW8dzDE+Oen/l5DHZP9pteESIaXCFiN2c2 mpjFb+hP3M4mAMTewTn/ONUCwmbAH4ZxB3IhkjcAAZhPSwH9Jp4YpjWSlwU6gw== Date: Sun, 21 Sep 2025 13:49:12 +0200 Message-ID: <87jz1sc9fr.wl-herbert@gojira.at> From: "Herbert J. Skuhra" To: Guido Falsi Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 31ec8b6407fd - main - sys/netinet6: Implement RFC 7217 In-Reply-To: <07503de1-785e-4e4d-b4e4-0524aeb064e1@FreeBSD.org> References: <202509201231.58KCVqBC047480@gitrepo.freebsd.org> <874iswhip4.wl-herbert@gojira.at> <07503de1-785e-4e4d-b4e4-0524aeb064e1@FreeBSD.org> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:199118, ipnet:2001:67c:2050::/48, country:DE] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4cV4Kx2CKcz3bVK On Sun, 21 Sep 2025 12:44:42 +0200, Guido Falsi wrote: >=20 > On 9/21/25 11:58, Guido Falsi wrote: > > On 9/21/25 00:17, Herbert J. Skuhra wrote: > >> On Sat, 20 Sep 2025 14:31:52 +0200, Guido Falsi wrote: > >>>=20 > >>> The branch main has been updated by madpilot: > >>>=20 > >>> URL: https://cgit.FreeBSD.org/src/commit/? > >>> id=3D31ec8b6407fdd5a87d70265762457c67ce618283 > >>>=20 > >>> commit 31ec8b6407fdd5a87d70265762457c67ce618283 > >>> Author:=A0=A0=A0=A0 Guido Falsi > >>> AuthorDate: 2025-09-20 12:26:41 +0000 > >>> Commit:=A0=A0=A0=A0 Guido Falsi > >>> CommitDate: 2025-09-20 12:31:44 +0000 > >>>=20 > >>> =A0=A0=A0=A0 sys/netinet6: Implement RFC 7217 > >>> =A0=A0=A0=A0 Implement RFC 7217 (A Method for Generating Semantically= Opaque > >>> =A0=A0=A0=A0 Interface Identifiers with IPv6 Stateless Address Autoco= nfiguration > >>> =A0=A0=A0=A0 (SLAAC)) in our IPv6 stack. > >>> =A0=A0=A0=A0 A new ifconfig `stableaddr` flag is added to enable the = feature on > >>> =A0=A0=A0=A0 interfaces, which defaults to on or off for new interfac= es based > >>> =A0=A0=A0=A0 on the sysctl `net.inet6.ip6.use_stableaddr` (off by def= ault, so > >>> =A0=A0=A0=A0 this commit causes no change in behavior with default se= ttings). > >>> =A0=A0=A0=A0 The algorithm follows the RFC in its logic, using SHA256= -HMAC as > >>> =A0=A0=A0=A0 the algorithm to derive addresses so as to provide code = that can > >>> =A0=A0=A0=A0 be leveraged by future implentations of RFC 8981, levera= ging the > >>> =A0=A0=A0=A0 `hostuuid` as the secret. > >>> =A0=A0=A0=A0 The source of the hostidentifier can be configured using= the sysctl > >>> =A0=A0=A0=A0 `net.inet6.ip6.stableaddr_netifsource`, while the number= of retries > >>> =A0=A0=A0=A0 generating a new address in case of collision can be con= figured > >>> =A0=A0=A0=A0 using the `net.inet6.ip6.stableaddr_maxretries` sysctl (= default 3). > >>> =A0=A0=A0=A0 Documentation about all these flags is added to the ifco= nfig(8) man > >>> =A0=A0=A0=A0 page. > >>> =A0=A0=A0=A0 Reviewed by:=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 cognet, gl= ebius, hrs > >>> =A0=A0=A0=A0 Tested by:=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 zarych= tam@plan-b.pwste.edu.pl > >>> =A0=A0=A0=A0 Approved by:=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 cognet, gl= ebius > >>> =A0=A0=A0=A0 Relnotes:=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 yes > >>> =A0=A0=A0=A0 Differential Revision:=A0 https://reviews.freebsd.org/D4= 9681 > >>> --- > >>> =A0 sbin/ifconfig/af_inet6.c=A0=A0=A0 |=A0=A0 2 + > >>> =A0 sbin/ifconfig/af_nd6.c=A0=A0=A0=A0=A0 |=A0=A0 1 + > >>> =A0 sbin/ifconfig/ifconfig.8=A0=A0=A0 |=A0 30 +++++ > >>> =A0 sys/netinet6/in6.h=A0=A0=A0=A0=A0=A0=A0=A0=A0 |=A0=A0 3 + > >>> =A0 sys/netinet6/in6_ifattach.c | 275 > >>> +++++++++++++++++++++++++++++++++ ++++------- > >>> =A0 sys/netinet6/in6_ifattach.h |=A0=A0 2 + > >>> =A0 sys/netinet6/in6_proto.c=A0=A0=A0 |=A0 10 ++ > >>> =A0 sys/netinet6/ip6_input.c=A0=A0=A0 |=A0=A0 1 + > >>> =A0 sys/netinet6/ip6_var.h=A0=A0=A0=A0=A0 |=A0 12 ++ > >>> =A0 sys/netinet6/nd6.c=A0=A0=A0=A0=A0=A0=A0=A0=A0 |=A0=A0 9 ++ > >>> =A0 sys/netinet6/nd6.h=A0=A0=A0=A0=A0=A0=A0=A0=A0 |=A0=A0 2 + > >>> =A0 sys/netinet6/nd6_nbr.c=A0=A0=A0=A0=A0 |=A0 35 +++++- > >>> =A0 sys/netinet6/nd6_rtr.c=A0=A0=A0=A0=A0 | 128 +++++++++++++-------- > >>> =A0 usr.sbin/ndp/ndp.c=A0=A0=A0=A0=A0=A0=A0=A0=A0 |=A0=A0 7 ++ > >>> =A0 14 files changed, 423 insertions(+), 94 deletions(-) > >>=20 > >> This commit breaks security/netbird: > >>=20 > >> Management: Disconnected, reason: create wg interface: error > >> creating tun device: unable to get nd6 flags for tun0: invalid > >> argument > >> Signal: Disconnected, reason: create wg interface: error creating > >> tun device: unable to get nd6 flags for tun0: invalid argument > >>=20 > >=20 > > Thanks for reporting this, > >=20 > > I'm going to take a look shortly, although I'm not sure why, since > > the functionality is disabled by default. > >=20 > >=20 >=20 > Hi again, >=20 > I'm going to try to reproduce this, but in the while, looking at the > source code, the error comes from the wireguard-go package that is > being used by netbird (we also have that in a port of its own BTW). >=20 > The code there is manipulating the interface flags at a low level, but > my commit modified that structure. There is some chance that simply > forcing a rebuild and reinstall of the package will "fix" it. >=20 > Have you tried that? >=20 > If you already have, I'll go on and reproduce locally, if I can. Yes, I've already rebuilt both go124 and netbird. Sorry I didn't mention this before. From nobody Sun Sep 21 13:16:24 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cV6Fj2gClz686Pc; Sun, 21 Sep 2025 13:16: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 4cV6Fj212lz3l0H; Sun, 21 Sep 2025 13:16:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758460585; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SWDdFQaqXYowrm1062geQhV2Ckjc8usvU3acEeFpsDg=; b=nZWbWAtI1OmxEWMDd3fbDvPQbDQhOkI2DBJ7JRtN8VdFjiGAl28gduF2SweLm65TjBVSqk uin33cVCrr6/3t9+Y3kBneuClnx5fR7uTHK+YZ4epRZDCyrn2/WmSVS6s0qtIglBujqV3j vVjDSAEtST95iB0KXu5g56SpJYBV7PdDP1h38CHOyciaIVyPrqi746v1sJiMOmluXh9WCi jTmIe4a7PVIq3tEsnViQwtu8KKRJ9HzgnIozhF/eVlG5ScQBBDon9L96WpooQjtywr3ZIK 2mRr4nzAOB1S/JGM+cmwiMCMcNYMsetK+/g6nORVafgXzKpH0t0wsg090rmOFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758460585; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SWDdFQaqXYowrm1062geQhV2Ckjc8usvU3acEeFpsDg=; b=JDe2NmLGmvDRk1SE3fMSFhpziPF6CaNH/E47NF3hPcDqmseCWxBiR3hrhbIkGtSjHjLT+i qVz81m5r9SGgr7wdAAOIzCUdCbuUys0jw2gHvDmnAoWUNu2UMn3B7J1NnJ0Kdqowyqpydf fEpa7j0IfjjIXPdL3cqd2H/B6bEBpBE92MmIGglPOgXOJsXBzxtoRmMhHSCkwdYfdO4f4s pvZNQg2GcT8zkSNF/eq8FhKm0eN/uS6H1RvxaxfbHdHtImwqvTMZdHexLTBpOvDlJVg7Pr WGphnfm7ZtnnOlvDX+taktEyQ/tic/aN6qkrd1YMgRhA1soMlkDS2FXbpx1x1Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758460585; a=rsa-sha256; cv=none; b=xX+nXv+5llrgmqFIPG/iPfRR/LiDIb5F/ijq2b/B7/VcVNvO/qI4qevlBADuTf00rMsNnu 8X40XwV+F8SCaUHRa6if/FY6AzFfJVe/HzINxV4xqAnJb4hTvCcx0FQSlGc+fIabss+0WI H36D/+s+phPMa4N3yu6pop4LO/9XUOre1x370YEigtynWZgbkZS/h6TZm15wUaMoIeO1IY X/s3Yy3APj/aepFjRof0DJDn5uht/6wDFoz3lwxF7Fx54M653fFAyJHZVM5pn3+Z3jwhFZ sODbgdw3Na0FfNPKGYbufSXrGaJPKQix8tHF62fp/qwZKPzDh89mp9z+CDI8QQ== 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 4cV6Fj16wrz17W; Sun, 21 Sep 2025 13:16: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 58LDGO9L033157; Sun, 21 Sep 2025 13:16:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58LDGOXO033154; Sun, 21 Sep 2025 13:16:24 GMT (envelope-from git) Date: Sun, 21 Sep 2025 13:16:24 GMT Message-Id: <202509211316.58LDGOXO033154@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Vladimir Kondratyev Subject: git: 1335bf5ce1c9 - main - moused(8): Add command line option to restrict interface type List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1335bf5ce1c9f0bf15c1fbed502f49e5a4950e32 Auto-Submitted: auto-generated The branch main has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=1335bf5ce1c9f0bf15c1fbed502f49e5a4950e32 commit 1335bf5ce1c9f0bf15c1fbed502f49e5a4950e32 Author: Vladimir Kondratyev AuthorDate: 2025-09-21 13:14:48 +0000 Commit: Vladimir Kondratyev CommitDate: 2025-09-21 13:14:48 +0000 moused(8): Add command line option to restrict interface type to evdev or sysmouse. It is required to avoid receiving of double events on hybrid devices supporting both interfaces like ums (4). MFC after: 1 day Reviewed by: glebius (via private chat) Differential Revision: https://reviews.freebsd.org/D52647 --- libexec/rc/rc.conf | 2 +- libexec/rc/rc.d/moused | 7 +++++-- usr.sbin/moused/moused/moused.8 | 31 +++++++++++++++++++++++++++---- usr.sbin/moused/moused/moused.c | 39 +++++++++++++++++++++++++++------------ 4 files changed, 60 insertions(+), 19 deletions(-) diff --git a/libexec/rc/rc.conf b/libexec/rc/rc.conf index 0ef3012892dd..b5482f081ce5 100644 --- a/libexec/rc/rc.conf +++ b/libexec/rc/rc.conf @@ -589,7 +589,7 @@ saver="NO" # screen saver: Uses /boot/kernel/${saver}_saver.ko moused_nondefault_enable="NO" # Treat non-default mice as enabled unless # specifically overridden in rc.conf(5). moused_enable="NO" # Run the mouse daemon. -moused_type="auto" # See man page for rc.conf(5) for available settings. +moused_type="evdev" # See man page for rc.conf(5) for available settings. moused_port="auto" # Set to your mouse port. moused_flags="" # Any additional flags to moused. mousechar_start="NO" # if 0xd0-0xd3 default range is occupied in your diff --git a/libexec/rc/rc.d/moused b/libexec/rc/rc.d/moused index aaf0dd0890a8..64e4f815eea9 100755 --- a/libexec/rc/rc.d/moused +++ b/libexec/rc/rc.d/moused @@ -16,6 +16,7 @@ start_cmd="moused_start" pidprefix="/var/run/moused" pidfile="${pidprefix}.pid" pidarg= +typearg= load_rc_config $name # doesn't make sense to run in a svcj: nojail keyword @@ -49,15 +50,17 @@ moused_start() eval myflags=\${moused_${ms}_flags-$moused_flags} eval myport=\${moused_${ms}_port-/dev/$ms} eval mytype=\${moused_${ms}_type-$moused_type} + if [ -n "$mytype" ] && check_kern_features evdev_support; then + typearg="-t ${mytype}" + fi else ms="default" myflags="$moused_flags" myport="$moused_port" - mytype="$moused_type" fi startmsg -n "Starting ${ms} moused" - /usr/sbin/moused ${myflags} -p ${myport} -t ${mytype} ${pidarg} + /usr/sbin/moused ${myflags} -p ${myport} ${typearg} ${pidarg} startmsg '.' mousechar_arg= diff --git a/usr.sbin/moused/moused/moused.8 b/usr.sbin/moused/moused/moused.8 index 96feeda336c9..2483f8a04b2a 100644 --- a/usr.sbin/moused/moused/moused.8 +++ b/usr.sbin/moused/moused/moused.8 @@ -49,7 +49,7 @@ .Op Fl m Ar N=M .Op Fl w Ar N .Op Fl z Ar target -.Op Fl t Ar mousetype +.Op Fl t Ar interfacetype .Op Fl l Ar level .Op Fl 3 Op Fl E Ar timeout .Op Fl T Ar distance Ns Op , Ns Ar time Ns Op , Ns Ar after @@ -329,9 +329,32 @@ or .Ar high . This option may not be supported by all the device. .It Fl t Ar type -Ignored. -Used for compatibiliy with legacy -.Nm . +Force the interface type of the mouse attached to the port. +You may explicitly specify a type listed below, or use +.Ar auto +to let the +.Nm +utility automatically select an appropriate protocol for the given +character device. +If you entirely omit this option in the command line, +.Fl t Ar auto +is assumed. +.Pp +Valid types for this option are listed below. +.Bl -tag -compact -width systemmouse +.It Ar evdev +Input event device usualy residing in +.Pa /dev/input . +.It Ar sysmouse +Traditional protocol used by e.g. +.Xr ums 4 +and +.Xr psm 4 +drivers. +.El +.Pp +Note that this option restricts usage of the given port rather then gives +a hint. .It Fl q Ar config Path to configuration file. .It Fl Q Ar quirks diff --git a/usr.sbin/moused/moused/moused.c b/usr.sbin/moused/moused/moused.c index acd6e5223685..36cb8cc27eab 100644 --- a/usr.sbin/moused/moused/moused.c +++ b/usr.sbin/moused/moused/moused.c @@ -448,6 +448,7 @@ static const char *config_file = CONFDIR "/moused.conf"; #endif static const char *quirks_path = QUIRKSDIR; static struct quirks_context *quirks; +static enum device_if force_if = DEVICE_IF_UNKNOWN; static int opt_rate = 0; static int opt_resolution = MOUSE_RES_UNKNOWN; @@ -529,7 +530,8 @@ main(int argc, char *argv[]) struct rodent *r; pid_t mpid; int c; - int i; + u_int i; + int n; u_long ul; char *errstr; @@ -552,26 +554,26 @@ main(int argc, char *argv[]) break; case 'a': - i = sscanf(optarg, "%lf,%lf", &opt_accelx, &opt_accely); - if (i == 0) { + n = sscanf(optarg, "%lf,%lf", &opt_accelx, &opt_accely); + if (n == 0) { warnx("invalid linear acceleration argument " "'%s'", optarg); usage(); } - if (i == 1) + if (n == 1) opt_accely = opt_accelx; break; case 'A': opt_exp_accel = true; - i = sscanf(optarg, "%lf,%lf", &opt_expoaccel, + n = sscanf(optarg, "%lf,%lf", &opt_expoaccel, &opt_expoffset); - if (i == 0) { + if (n == 0) { warnx("invalid exponential acceleration " "argument '%s'", optarg); usage(); } - if (i == 1) + if (n == 1) opt_expoffset = 1.0; break; @@ -646,8 +648,19 @@ main(int argc, char *argv[]) break; case 't': - if (strcmp(optarg, "auto") != 0) - warnx("ignore mouse type `%s'", optarg); + if (strcmp(optarg, "auto") == 0) { + force_if = DEVICE_IF_UNKNOWN; + break; + } + for (i = 0; i < nitems(rifs); i++) + if (strcmp(optarg, rifs[i].name) == 0) { + force_if = i; + break; + } + if (i == nitems(rifs)) { + warnx("no such interface type `%s'", optarg); + usage(); + } break; case 'w': @@ -1224,7 +1237,7 @@ usage(void) fprintf(stderr, "%s\n%s\n%s\n%s\n%s\n", "usage: moused [-dfg] [-I file] [-F rate] [-r resolution]", " [-VH [-U threshold]] [-a X[,Y]] [-C threshold] [-m N=M] [-w N]", - " [-z N] [-t ] [-l level] [-3 [-E timeout]]", + " [-z N] [-t ] [-l level] [-3 [-E timeout]]", " [-T distance[,time[,after]]] -p [-q config] [-Q quirks]", " moused [-d] -i -p "); exit(1); @@ -1338,9 +1351,11 @@ r_identify_if(int fd) { int dummy; - if (ioctl(fd, EVIOCGVERSION, &dummy) >= 0) + if ((force_if == DEVICE_IF_UNKNOWN || force_if == DEVICE_IF_EVDEV) && + ioctl(fd, EVIOCGVERSION, &dummy) >= 0) return (DEVICE_IF_EVDEV); - if (ioctl(fd, MOUSE_GETLEVEL, &dummy) >= 0) + if ((force_if == DEVICE_IF_UNKNOWN || force_if == DEVICE_IF_SYSMOUSE) && + ioctl(fd, MOUSE_GETLEVEL, &dummy) >= 0) return (DEVICE_IF_SYSMOUSE); return (DEVICE_IF_UNKNOWN); } From nobody Sun Sep 21 13:16:26 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cV6Fk384zz686LM; Sun, 21 Sep 2025 13:16: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 4cV6Fk1rPVz3kW7; Sun, 21 Sep 2025 13:16:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758460586; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=n6p0B0EKkAKYm3VRdXNJ/0TE/YXEM6g3LXxFazHu14c=; b=Lp+TpsJitkMQAs+uWqKIvDy0CSYFB78NwG7+lyDTCAHUULpog1vdHviZp6XCj6UxOLNgeB glXYeZhpyebTljqDKqxdl7I29mnWP8ixZiUwTAfKU4EHiNU9GU2w7o+A1twS0Q3KafFxre psDsInKWq6u4f7TsQYnbV6odiSbIXtJUH8RQDn0+1HAIo7La1voO/Kvs2NvJsbUugV90IZ tpKanNlW0TLJuJLPYghLr2CTQC8uwxfa04+U+CBbGkqB6lQ4xI0ldTk9iE1LGn3/q80rxa S71dssViPiDxQ73T1UHalqqSEoo9jlBAen3Z1Kj+Jk1HSHW587EzKPJ6xl7ixw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758460586; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=n6p0B0EKkAKYm3VRdXNJ/0TE/YXEM6g3LXxFazHu14c=; b=kB+5gOwuNyTFbGth0fjzFcTO7X+U1oXrrD1aWc53zhoEZg5S+EmDEyo8RzlQpazKbHfGwK YkHpwdBvsOELixrGjtLVWCmsJ1ZAJYkL3KjsHVZXfT2bGdd5l+ftv1riOZLEAuuk/m3ZmK Yg32UI1SGgG121DqE/TIJnuLxhtXuBsKm8q4TjoVWVyyVWVGjtGjS43Y4/gE55iXOK6RHT 1edW10tGcCrCUHx5MvGbRRpTGCDVCP+Jl4DGUbF8hvoB56nmDY2qkL9/g68dhsAfIi6sOt A9McNzgdRH8x4DYImHoqQ+HSveSALGfPBF+zpXViVIkR8hbAtVir6FTrDkXQCw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758460586; a=rsa-sha256; cv=none; b=CXbQ8jfz06++GJrfuUr1PifGZdTfGbHllErMBT8XTNzxv4dF0SgV4lNQjZTdH/N1EX4cyU j+o2iX/SQ4NOarOi3LcsZy8GtP7wkIBzjNyzpp5lGDPHwM0ZztSPCsr03q4ZI3KiLBi/RT +3yM3DZtQ84cA9+mE/CtFAJjLAAgANYHHaGBkd5NHeZ4EjMJ1DfAjpZduHpDhzier5UQ34 bx5V2S9QmhQ9NHojR9+U6C8feCEXKg2+0NRpHtbbHfaygywgMsCa3oAEpADx3h4Y5UT0iF MGvbK4/1Y4PnTqpF8AbY51DmzLh2X2Jq9yJi3bAL8Ct65gvn4F1nG8xf3fPcTA== 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 4cV6Fk1BWPz1Mx; Sun, 21 Sep 2025 13:16: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 58LDGQn1033190; Sun, 21 Sep 2025 13:16:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58LDGQw0033187; Sun, 21 Sep 2025 13:16:26 GMT (envelope-from git) Date: Sun, 21 Sep 2025 13:16:26 GMT Message-Id: <202509211316.58LDGQw0033187@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Vladimir Kondratyev Subject: git: 66e7f048f0c8 - main - moused(8): Start moused with devd List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 66e7f048f0c8e9e726738fadd9dc819bfda3cbfe Auto-Submitted: auto-generated The branch main has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=66e7f048f0c8e9e726738fadd9dc819bfda3cbfe commit 66e7f048f0c8e9e726738fadd9dc819bfda3cbfe Author: Vladimir Kondratyev AuthorDate: 2025-09-21 13:14:49 +0000 Commit: Vladimir Kondratyev CommitDate: 2025-09-21 13:14:49 +0000 moused(8): Start moused with devd It is appeared that currently starting of moused does not depend on moused_enable variable value in rc.conf. That leads to missing USB mice support in default configuration. Start moused in traditional per device mode with devd to follow POLA. One daemon per system mode still can be enabled with setting of moused_port="auto" moused_nondefault_enable="NO" variables in /etc/rc.conf To revert to sysmouse mode add moused_type="sysmouse" to /etc/rc.conf Reported by: many Requested by: glebius Reviewed by: glebius MFC after: 1 day Differential Revision: https://reviews.freebsd.org/D52430 --- libexec/rc/rc.conf | 4 ++-- libexec/rc/rc.d/moused | 11 ++++++----- sbin/devd/moused.conf | 9 +++++++++ 3 files changed, 17 insertions(+), 7 deletions(-) diff --git a/libexec/rc/rc.conf b/libexec/rc/rc.conf index b5482f081ce5..1220d060232d 100644 --- a/libexec/rc/rc.conf +++ b/libexec/rc/rc.conf @@ -586,11 +586,11 @@ font8x14="NO" # font 8x14 from /usr/share/{syscons,vt}/fonts/* (or NO). font8x8="NO" # font 8x8 from /usr/share/{syscons,vt}/fonts/* (or NO). blanktime="300" # blank time (in seconds) or "NO" to turn it off. saver="NO" # screen saver: Uses /boot/kernel/${saver}_saver.ko -moused_nondefault_enable="NO" # Treat non-default mice as enabled unless +moused_nondefault_enable="YES" # Treat non-default mice as enabled unless # specifically overridden in rc.conf(5). moused_enable="NO" # Run the mouse daemon. moused_type="evdev" # See man page for rc.conf(5) for available settings. -moused_port="auto" # Set to your mouse port. +moused_port="/dev/psm0" # Set to your mouse port. moused_flags="" # Any additional flags to moused. mousechar_start="NO" # if 0xd0-0xd3 default range is occupied in your # language code table, specify alternative range diff --git a/libexec/rc/rc.d/moused b/libexec/rc/rc.d/moused index 64e4f815eea9..35a26bd57275 100755 --- a/libexec/rc/rc.d/moused +++ b/libexec/rc/rc.d/moused @@ -28,9 +28,10 @@ moused_svcj="NO" # expected to be the mouse device. # if [ -n "$2" ]; then - eval moused_$2_enable=\${moused_$2_enable-${moused_nondefault_enable}} - rcvar="moused_${2}_enable" - pidfile="${pidprefix}.$2.pid" + ms=`basename $2` + eval moused_${ms}_enable=\${moused_${ms}_enable-${moused_nondefault_enable}} + rcvar="moused_${ms}_enable" + pidfile="${pidprefix}.${ms}.pid" pidarg="-I $pidfile" fi @@ -45,10 +46,10 @@ moused_start() # the moused_port variable, which if not defined sets it to the # passed in device name. # - ms=$1 + ms=`basename $1` if [ -n "$ms" ]; then eval myflags=\${moused_${ms}_flags-$moused_flags} - eval myport=\${moused_${ms}_port-/dev/$ms} + eval myport=\${moused_${ms}_port-/dev/$1} eval mytype=\${moused_${ms}_type-$moused_type} if [ -n "$mytype" ] && check_kern_features evdev_support; then typearg="-t ${mytype}" diff --git a/sbin/devd/moused.conf b/sbin/devd/moused.conf index ed1060ffdf2e..8821c2bb8375 100644 --- a/sbin/devd/moused.conf +++ b/sbin/devd/moused.conf @@ -33,3 +33,12 @@ notify 100 { action "service moused quietstop $cdev"; }; + +notify 100 { + match "system" "DEVFS"; + match "subsystem" "CDEV"; + match "type" "CREATE"; + match "cdev" "input/event[0-9]+"; + + action "service moused quietstart $cdev"; +}; From nobody Sun Sep 21 13:34:51 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cV6fz5Rmjz687dy; Sun, 21 Sep 2025 13:34: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 4cV6fz4kY0z3mVD; Sun, 21 Sep 2025 13:34:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758461691; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Jnqy8tRlZI3MbHvab3a9oLw6D0xKUmzxoTa8TqGtP48=; b=N19dCco84QOmZavoiFS3B0tS+iFgZD9SEOROWD79IfmGMj1yx559RN4CTM5X/L4jPyHFje Nzk6xQJXqmjpscNiGVv4tpTz94o1xh88lS6duetvy36L1R1nHR0CN+dOObWih+94mDf7s4 6kxzvYgarYqjDramiEgM/pPRqHS9zJPgu6mrDCQ7Q6uNcYnMdReYVy0uB2VFRODtPX6+gR Gtf/gMpCp51kchPYEULZAEHyvlC/uwCNZeoZeXqmy8EHpgMhpF3v69L1qUCoZEy/jGQ/6k 2a5xAlrsAUzZBcj1TGxzycq7bbRVhym9OpT5iqKBMGVBW1eb2D0CEpTylcWHXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758461691; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Jnqy8tRlZI3MbHvab3a9oLw6D0xKUmzxoTa8TqGtP48=; b=OwJZYaWWniU+sIgh/GCycbn17wz8/gUO8WBsPdsm0kzJiqIbdnHybd0FFo6OWeqK2QCjhS JoAwWcVnFYub3UKlz9NkZzcUEXNG8W2q90mujm3R1DsQ31PCPKZv6nWJ43sUvy/tNzk8ir CymbhQxopFdBEJJbdWPyTlGUzHCWPYCAA+Ho+7kn0xPlDnFBIJL2ufH2tYn7cm02tq8lB7 NmdTQWYpj96TbYeYKHReV7v+TL8n4CjDdv/orhCKjGnDE3Zx7dPV1HYAALW2hbjUvTksr7 f8HmMnwvJzrPNhZqiQ1TK3ffDzC6uUhZlp09wpgALGSLwU132nzE91gj/u4D4A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758461691; a=rsa-sha256; cv=none; b=al+JWCy/rmUUaFFhGO1EafjWBKZYuknNRaoN3jhLZvgdq7UR45mBQvesfniLkHzeZ1gIsU OanzZr1See/V78Um0H8zyMT0ziCtjR9m1EqBKX5hdciHPI99Y+4p2K4xPnYulF9yd+srCS 6yGP2gjN8gZAWL9Y4gXApxRTph4jI+bi/NPckdxrld8HbfUbauMUOoTWvDY4a7lxYxiGgu znMLen0ChfI3+NPM4oJEJwz56edg30HCyvoSHc5vLOJLyhAyd8ZH9VBKAUs+QECCN546wD vg71MAtm4jVHOr8mtNHJQ+5aKPqFqySY06s1I2rl42h0DyaqTiEDgmaECZhpfA== 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 4cV6fz4Fw0z1PP; Sun, 21 Sep 2025 13:34: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 58LDYprL070100; Sun, 21 Sep 2025 13:34:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58LDYpuR070097; Sun, 21 Sep 2025 13:34:51 GMT (envelope-from git) Date: Sun, 21 Sep 2025 13:34:51 GMT Message-Id: <202509211334.58LDYpuR070097@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 2b8bfdcad1f4 - main - Revert ".cirrus.yml: Reenable CI with pre-commit CI scripts" List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2b8bfdcad1f46076eaf40938634538fbcb13cb1c Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=2b8bfdcad1f46076eaf40938634538fbcb13cb1c commit 2b8bfdcad1f46076eaf40938634538fbcb13cb1c Author: Ed Maste AuthorDate: 2025-09-19 14:09:48 +0000 Commit: Ed Maste CommitDate: 2025-09-21 13:34:30 +0000 Revert ".cirrus.yml: Reenable CI with pre-commit CI scripts" This reverts commit 676d64ee8327851063d92d0dd6a4ceee6b3a25e6. These tests take a combined 3h to run and are consuming our montly Cirrus-CI credits in short order, before failing. In the PR markj reports that the failure appeared somewhere between: good: da64f6e047b5f6cd9b9e8450d19072cb0b6e44d0 bad: b197d2abcb6895d78bc9df8404e374397aa44748 Unfortunately, even after we find the offending commit and have a fix we still do not have sufficient monthly compute credit. Disable these tests for now, pending a solution to both issues. PR: 289696 Reviewed by: ngie Differential Revision: https://reviews.freebsd.org/D52618 --- .cirrus.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.cirrus.yml b/.cirrus.yml index 9ed08d750e2f..84efa04f1ccb 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -194,11 +194,13 @@ precommit_task: matrix: - name: amd64 smoke test using internal ci systems only_if: $CIRRUS_REPO_FULL_NAME != 'freebsd/freebsd-src' || $CIRRUS_BRANCH =~ 'pull/.*' + trigger_type: manual env: TARGET: amd64 TARGET_ARCH: amd64 - name: aarch64 smoke test using internal ci systems only_if: $CIRRUS_REPO_FULL_NAME != 'freebsd/freebsd-src' || $CIRRUS_BRANCH =~ 'pull/.*' + trigger_type: manual env: TARGET: arm64 TARGET_ARCH: aarch64 From nobody Sun Sep 21 16:02:24 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cV9xG1RGSz68Jh8; Sun, 21 Sep 2025 16:02:26 +0000 (UTC) (envelope-from madpilot@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cV9xG0ghXz43NQ; Sun, 21 Sep 2025 16:02:26 +0000 (UTC) (envelope-from madpilot@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758470546; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=ra1sMyGz3LF8Mlkb4KnP25hfrxGzmkzAAs+MOdUb58U=; b=XYyhT8H1Z2t3bfn3O4r4Nw/WCIoYIk1+wqHmjjh5tYgFWDAZLmwCThaQXWe2GpEV3kRN3y 1b207uJ4Izw35tUVYGHNrSrGON8E1Eo8N7URzuoWG7y2cHJX+3qJ06Duy0qWd2Ev7NFf2Z OtkEC1Iad+cHq4jatbhCblzXCLDgz37a1IJirJ8VlanpALvA9xPBMh7oBHg/n6YhZtPlOl 6YcPiR5IHe6sDeZj8UeNTcnWJtRf73DqMf6x1xxUzd9cFohCDB22vg19vL3MCjcn0CidjH HsGh75ClzAeQo/QHHb0yaIDTrbzsPqGS0GzhcIVtiFXbCeqXSWLUsRzKeEzn5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758470546; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=ra1sMyGz3LF8Mlkb4KnP25hfrxGzmkzAAs+MOdUb58U=; b=YwPvGInrLnpCe1g6B9dxzVQmhN5bkohOMCMbdlpfrPl7X4OCkmox5jhjm3sxXswNysEi3D aWznZHwnQiX3EBabCJxRgQKRz/U5QcZnJyEVPynUbPA2E1ex6mgfE1uFsOOPzc5Lj+EF9g 5poDdnFFr1sgMDsbp9P+04EJbgGZoodBLXXoGT2LpZURX/FDjB+jNlTKljh4EPdIQ52C0c bhftx/9FxEI4iBFRZjN1XWmHxJctefkqcDRXl8eXDNTPZpE7PZAzMyRqkPO3A8doYGLClN ao2pe7IYJ/jkFTWF7HMlcGHg59KKmyKHGmLABljE1S8R98clxzMnGzpy2YyXfA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758470546; a=rsa-sha256; cv=none; b=TM/14l1wmOHCashTFlhsIPz2FRIMoEvVXvwsgFmKmsRxuGsKZwb6KbrsvESslduT8fz76p vT84zpU/IdCpqhTg0ivWQwnpQpfrrHXX+m2mKZF8j4yV5faFeLEgULBvedE65f5aBjpiTs lVHqK5nezO2vDKild3M1g2V+xgA/Nte4Nlds5R9YzJ9F3zwtFAuM7CsRhg1JJSxW5H54na lxxH+a4Un6YVo7KxPPgYAImeQVkaP0S7jRMakqEncoF+VFO4DjgYkyLkWD7MMy6HQ1EU1G WZ+ch/GmbxeJY8DuR2v9/j1de778vkuKBEJl6qf3Te+tD01jfoPozYaUoJlTxw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from [IPV6:2a01:e11:2002:4280::13:1] (unknown [IPv6:2a01:e11:2002:4280::13:1]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: madpilot/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4cV9xF3dVpz80y; Sun, 21 Sep 2025 16:02:25 +0000 (UTC) (envelope-from madpilot@FreeBSD.org) Content-Type: multipart/mixed; boundary="------------VYB7agHpWOC16P85CAHYiZYR" Message-ID: <31da7dd5-ae67-4fb4-aa47-81e57f460c9d@FreeBSD.org> Date: Sun, 21 Sep 2025 18:02:24 +0200 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: Guido Falsi Subject: Re: git: 31ec8b6407fd - main - sys/netinet6: Implement RFC 7217 To: "Herbert J. Skuhra" Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202509201231.58KCVqBC047480@gitrepo.freebsd.org> <874iswhip4.wl-herbert@gojira.at> <07503de1-785e-4e4d-b4e4-0524aeb064e1@FreeBSD.org> <87jz1sc9fr.wl-herbert@gojira.at> Content-Language: en-US, it, en-GB Autocrypt: addr=madpilot@FreeBSD.org; keydata= xsBNBE+G+l0BCADi/WBQ0aRJfnE7LBPsM0G3m/m3Yx7OPu4iYFvS84xawmRHtCNjWIntsxuX fptkmEo3Rsw816WUrek8dxoUAYdHd+EcpBcnnDzfDH5LW/TZ4gbrFezrHPdRp7wdxi23GN80 qPwHEwXuF0X4Wy5V0OO8B6VT/nA0ADYnBDhXS52HGIJ/GCUjgqJn+phDTdCFLvrSFdmgx4Wl c0W5Z1p5cmDF9l8L/hc959AeyNf7I9dXnjekGM9gVv7UDUYzCifR3U8T0fnfdMmS8NeI9NC+ wuREpRO4lKOkTnj9TtQJRiptlhcHQiAlG1cFqs7EQo57Tqq6cxD1FycZJLuC32bGbgalABEB AAHNIkd1aWRvIEZhbHNpIDxtYWRwaWxvdEBGcmVlQlNELm9yZz7CwHgEEwECACIFAk+G+3MC GwMGCwkIBwMCBhUIAgkKCwQWAgMBAh4BAheAAAoJEBrmhg5Wy9KT2uIIAIrawQ89TnqEhi2C OEQAhx3uqWZuNoS6NyiSgsRCmtSnT2GOgH4Ucbr/I37SkV1B3K6HkoL6lwN8Gjf5KOgLqmTi E1W3RTwS7l8PSvdnjM9i7g351R4mTijtxawB/JcQf/Kge3Yqr1V4g6H+wQXHUStmHThbupuN trzRphvR/e5ekT0FTyVfPmpcbm68i2bwZnKUex/TNIECBykYh8b+SYMLhENf2ayRjCIWS2Ad 7tnTKhMtnS5jtW6qjBy4RoTpQD6oR1xIgkTRlQ49roVCUfdHb+Y/kh+U9G1IcoNy4vkg9IfP dwpSfnP+a8j0AZ1hMnOLZ1fYoQrs+4gVLy8Fs7TOwU0EUxB7QQEQAKFhrDceoPdK/IHDSmoj 6SQYisvM7VdhcleS7E9DoEAVt7yMbf6HbbMVTTY6ckvwTWQssywLBXNVqxgc4WLJjzfUhgef +WE75M3+WFYlOVQLGZY/zEVgma1raYnOHNAOzeHLDmEXjbZP6vGAeDyBbGfQPpE7qGYZ7ube T3XwQO+PklcCrvOPj2ZPcAxGNS2xVU/LzONqCrJqLMJSIcCdsbiSP4G5PnDFHtMokaTY6OEr 8OEQfOAerhcHUa/z7Uu8YtmaqKH+QGkE/WEgaRqSiTnv0JOTD+DxehaqvoKPPZ++2NpCZMHB 2i6A/xifmQwEiIjEXtcueBRzkNUQkxhqZyS13SrhocL9ydtaVPBzZatAEjUDDEJmAMLVFs45 qfyhMiNapHJo2n3MW/E5omqCvEkDdWX/en3P7CK2TemeaDghMsgkNKax/z0wNo5UZCkOPOz0 xpNiUilOVbkuezZZNg65741qee2lfXhQIaZ66yT7hphc/N/z3PIAtLeze4u1VR2EXAuZ2sWA dlKCNTlJMsaU/x70BV11Wd/ypnVzM68dfdQIIAj1iMFAD/lXGlEUmKXg5Ov2VQDlTntQoanC YrAg+8CttPzjrydgLZFq3hrtQmfc0se5yv1WHS69+BsUOG09RvvawUDZxUjW19kyeN9THaNR gow3kSuArUp6zSmJABEBAAHCwF8EGAEIAAkFAlMQe0ECGwwACgkQGuaGDlbL0pMN5wgA4bCk X/qwEVC06ToeR6C2putmSWQMgpDaqrv65Hubo+QGmg2P4ewTYQQ4g6oYWS03qHxqVVWhKz7F jfrV+dH8qbCLfSgIcvdBha7ayGZVrsiuMLKGbw36fcmkZPpSDOfHcP0XH8Z+u9CWj0xUkTxA lZ/7i6gYSUpG2JWNtdmE/X8VVEyXusCLwy0K0BI60A/4dRTIX3C4QKrJ3ZbUXegz70ynjHf+ lQMZ9IZKASoRMuS5FozPQh6abvmwZEPdf5I9riUElzvHrqJ8Bx0t3Pujdoth+yNHpnBxrtO8 LkQdrQ58P0SwcaIX33T2U9pG8bhu5YVR88FQ8OQ0cEsPBpDncg== In-Reply-To: <87jz1sc9fr.wl-herbert@gojira.at> This is a multi-part message in MIME format. --------------VYB7agHpWOC16P85CAHYiZYR Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 9/21/25 13:49, Herbert J. Skuhra wrote: > On Sun, 21 Sep 2025 12:44:42 +0200, Guido Falsi wrote: >> >> On 9/21/25 11:58, Guido Falsi wrote: >>> On 9/21/25 00:17, Herbert J. Skuhra wrote: >>>> On Sat, 20 Sep 2025 14:31:52 +0200, Guido Falsi wrote: >>>>> >>>>> The branch main has been updated by madpilot: >>>>> >>>>> URL: https://cgit.FreeBSD.org/src/commit/? >>>>> id=31ec8b6407fdd5a87d70265762457c67ce618283 >>>>> >>>>> commit 31ec8b6407fdd5a87d70265762457c67ce618283 >>>>> Author:     Guido Falsi >>>>> AuthorDate: 2025-09-20 12:26:41 +0000 >>>>> Commit:     Guido Falsi >>>>> CommitDate: 2025-09-20 12:31:44 +0000 >>>>> >>>>>      sys/netinet6: Implement RFC 7217 >>>>>      Implement RFC 7217 (A Method for Generating Semantically Opaque >>>>>      Interface Identifiers with IPv6 Stateless Address Autoconfiguration >>>>>      (SLAAC)) in our IPv6 stack. >>>>>      A new ifconfig `stableaddr` flag is added to enable the feature on >>>>>      interfaces, which defaults to on or off for new interfaces based >>>>>      on the sysctl `net.inet6.ip6.use_stableaddr` (off by default, so >>>>>      this commit causes no change in behavior with default settings). >>>>>      The algorithm follows the RFC in its logic, using SHA256-HMAC as >>>>>      the algorithm to derive addresses so as to provide code that can >>>>>      be leveraged by future implentations of RFC 8981, leveraging the >>>>>      `hostuuid` as the secret. >>>>>      The source of the hostidentifier can be configured using the sysctl >>>>>      `net.inet6.ip6.stableaddr_netifsource`, while the number of retries >>>>>      generating a new address in case of collision can be configured >>>>>      using the `net.inet6.ip6.stableaddr_maxretries` sysctl (default 3). >>>>>      Documentation about all these flags is added to the ifconfig(8) man >>>>>      page. >>>>>      Reviewed by:            cognet, glebius, hrs >>>>>      Tested by:              zarychtam@plan-b.pwste.edu.pl >>>>>      Approved by:            cognet, glebius >>>>>      Relnotes:               yes >>>>>      Differential Revision:  https://reviews.freebsd.org/D49681 >>>>> --- >>>>>   sbin/ifconfig/af_inet6.c    |   2 + >>>>>   sbin/ifconfig/af_nd6.c      |   1 + >>>>>   sbin/ifconfig/ifconfig.8    |  30 +++++ >>>>>   sys/netinet6/in6.h          |   3 + >>>>>   sys/netinet6/in6_ifattach.c | 275 >>>>> +++++++++++++++++++++++++++++++++ ++++------- >>>>>   sys/netinet6/in6_ifattach.h |   2 + >>>>>   sys/netinet6/in6_proto.c    |  10 ++ >>>>>   sys/netinet6/ip6_input.c    |   1 + >>>>>   sys/netinet6/ip6_var.h      |  12 ++ >>>>>   sys/netinet6/nd6.c          |   9 ++ >>>>>   sys/netinet6/nd6.h          |   2 + >>>>>   sys/netinet6/nd6_nbr.c      |  35 +++++- >>>>>   sys/netinet6/nd6_rtr.c      | 128 +++++++++++++-------- >>>>>   usr.sbin/ndp/ndp.c          |   7 ++ >>>>>   14 files changed, 423 insertions(+), 94 deletions(-) >>>> >>>> This commit breaks security/netbird: >>>> >>>> Management: Disconnected, reason: create wg interface: error >>>> creating tun device: unable to get nd6 flags for tun0: invalid >>>> argument >>>> Signal: Disconnected, reason: create wg interface: error creating >>>> tun device: unable to get nd6 flags for tun0: invalid argument >>>> >>> >>> Thanks for reporting this, >>> >>> I'm going to take a look shortly, although I'm not sure why, since >>> the functionality is disabled by default. >>> >>> >> >> Hi again, >> >> I'm going to try to reproduce this, but in the while, looking at the >> source code, the error comes from the wireguard-go package that is >> being used by netbird (we also have that in a port of its own BTW). >> >> The code there is manipulating the interface flags at a low level, but >> my commit modified that structure. There is some chance that simply >> forcing a rebuild and reinstall of the package will "fix" it. >> >> Have you tried that? >> >> If you already have, I'll go on and reproduce locally, if I can. > > Yes, I've already rebuilt both go124 and netbird. Sorry I didn't > mention this before. > Yes, I now see recompiling would not have helped in this case. A C program would have included the system include and noticed the change, but this software has hardcoded the struct in go code and requires patching. I'm attaching a simple patch for the ports tree for this port, it compiles but I've not tested it at runtime, could you try applying this patch to the ports tree and recompile the port, and report back? Please note this is not a proper patch for the ports tree, it just fixes the problem, but would break it for anyone else, I'll produce a proper patch for the ports tree once I have confirmed the approach woks. Thanks in advance! -- Guido Falsi --------------VYB7agHpWOC16P85CAHYiZYR Content-Type: text/x-patch; charset=UTF-8; name="0001-security-netbird-Test-fix.patch" Content-Disposition: attachment; filename="0001-security-netbird-Test-fix.patch" Content-Transfer-Encoding: base64 RnJvbSA1NDcwZjhlM2YwNWMyMWJiMDgxMmVlMDEwMGNhMzM3MmUyZjc1ZWRlIE1vbiBTZXAg MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBHdWlkbyBGYWxzaSA8bWFkcGlsb3RARnJlZUJTRC5v cmc+CkRhdGU6IFN1biwgMjEgU2VwIDIwMjUgMTc6NDc6MDggKzAyMDAKU3ViamVjdDogW1BB VENIXSBzZWN1cml0eS9uZXRiaXJkOiBUZXN0IGZpeAoKLS0tCiAuLi5uZG9yX2dvbGFuZy56 eDJjNC5jb21fd2lyZWd1YXJkX3R1bl90dW5fX2ZyZWVic2QuZ28gfCAxMCArKysrKysrKysr CiAxIGZpbGUgY2hhbmdlZCwgMTAgaW5zZXJ0aW9ucygrKQogY3JlYXRlIG1vZGUgMTAwNjQ0 IHNlY3VyaXR5L25ldGJpcmQvZmlsZXMvcGF0Y2gtdmVuZG9yX2dvbGFuZy56eDJjNC5jb21f d2lyZWd1YXJkX3R1bl90dW5fX2ZyZWVic2QuZ28KCmRpZmYgLS1naXQgYS9zZWN1cml0eS9u ZXRiaXJkL2ZpbGVzL3BhdGNoLXZlbmRvcl9nb2xhbmcuengyYzQuY29tX3dpcmVndWFyZF90 dW5fdHVuX19mcmVlYnNkLmdvIGIvc2VjdXJpdHkvbmV0YmlyZC9maWxlcy9wYXRjaC12ZW5k b3JfZ29sYW5nLnp4MmM0LmNvbV93aXJlZ3VhcmRfdHVuX3R1bl9fZnJlZWJzZC5nbwpuZXcg ZmlsZSBtb2RlIDEwMDY0NAppbmRleCAwMDAwMDAwMDAwMDAuLjUxM2IxMjE3ZmEyYwotLS0g L2Rldi9udWxsCisrKyBiL3NlY3VyaXR5L25ldGJpcmQvZmlsZXMvcGF0Y2gtdmVuZG9yX2dv bGFuZy56eDJjNC5jb21fd2lyZWd1YXJkX3R1bl90dW5fX2ZyZWVic2QuZ28KQEAgLTAsMCAr MSwxMCBAQAorLS0tIHZlbmRvci9nb2xhbmcuengyYzQuY29tL3dpcmVndWFyZC90dW4vdHVu X2ZyZWVic2QuZ28ub3JpZwkyMDI1LTA5LTIxIDExOjA0OjE3IFVUQworKysrIHZlbmRvci9n b2xhbmcuengyYzQuY29tL3dpcmVndWFyZC90dW4vdHVuX2ZyZWVic2QuZ28KK0BAIC02NSw2 ICs2NSw3IEBAIHR5cGUgbmQ2UmVxIHN0cnVjdCB7CisgCVJhbmRvbXNlZWQwICAgWzhdYnl0 ZQorIAlSYW5kb21zZWVkMSAgIFs4XWJ5dGUKKyAJUmFuZG9taWQgICAgICBbOF1ieXRlCisr CURhZF9mYWlsdXJlcyAgKnVpbnQ2NAorIH0KKyAKKyB0eXBlIE5hdGl2ZVR1biBzdHJ1Y3Qg ewotLSAKMi41MS4wCgo= --------------VYB7agHpWOC16P85CAHYiZYR-- From nobody Sun Sep 21 16:30:33 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cVBZV0gMVz68K9r; Sun, 21 Sep 2025 16:31:14 +0000 (UTC) (envelope-from herbert@gojira.at) Received: from mout-p-101.mailbox.org (mout-p-101.mailbox.org [IPv6:2001:67c:2050:0:465::101]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4cVBZT42vYz467V; Sun, 21 Sep 2025 16:31:13 +0000 (UTC) (envelope-from herbert@gojira.at) Authentication-Results: mx1.freebsd.org; none Received: from smtp202.mailbox.org (smtp202.mailbox.org [IPv6:2001:67c:2050:b231:465::202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-101.mailbox.org (Postfix) with ESMTPS id 4cVBZD27Jbz9svN; Sun, 21 Sep 2025 18:31:00 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gojira.at; s=MBO0001; t=1758472260; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=QreNOkWhrUY/DAQl1cvJfQtshV/hcMFF1NGifsIfw9Q=; b=13LdFWvjl414KF2uTXqt3Hr/9jD70hTQPr3eQHisUw78uo/Cdvpqo0MQuXvqoqKezrUjKC dWBxdloGr7KEWmfZ2up9lFyfJMxBvcM1Fftw2j/7q3Jbpv3UUSKubHSGFjd3jYD0Sup5XU ggLmRLb5C8PKQbxGkiD/DukqAoarhKNPDawo6vPSVlrNv4VPpYKpHawVMWmu5SfcI1/vkL QAkVPQrYSWyqrP2HRG0Nd31MGyvNnzDmw0XQkANsl8+fJRnXD+jY0vB+hr5IcLDNg1PdGj W7X5PLRhKaLCc5rqMe3X1hiEAq73h/+TwohsXac+Z+qfQJHdTTbufH8bkDuWIQ== Date: Sun, 21 Sep 2025 18:30:33 +0200 Message-ID: <87ikhbdaza.wl-herbert@gojira.at> From: "Herbert J. Skuhra" To: Guido Falsi Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 31ec8b6407fd - main - sys/netinet6: Implement RFC 7217 In-Reply-To: <31da7dd5-ae67-4fb4-aa47-81e57f460c9d@FreeBSD.org> References: <202509201231.58KCVqBC047480@gitrepo.freebsd.org> <874iswhip4.wl-herbert@gojira.at> <07503de1-785e-4e4d-b4e4-0524aeb064e1@FreeBSD.org> <87jz1sc9fr.wl-herbert@gojira.at> <31da7dd5-ae67-4fb4-aa47-81e57f460c9d@FreeBSD.org> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:199118, ipnet:2001:67c:2050::/48, country:DE] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4cVBZT42vYz467V On Sun, 21 Sep 2025 18:02:24 +0200, Guido Falsi wrote: > > Yes, I now see recompiling would not have helped in this case. > > A C program would have included the system include and noticed the > change, but this software has hardcoded the struct in go code and > requires patching. > > I'm attaching a simple patch for the ports tree for this port, it > compiles but I've not tested it at runtime, could you try applying > this patch to the ports tree and recompile the port, and report back? > > Please note this is not a proper patch for the ports tree, it just > fixes the problem, but would break it for anyone else, I'll produce a > proper patch for the ports tree once I have confirmed the approach > woks. > > Thanks in advance! > > -- > Guido Falsi > From 5470f8e3f05c21bb0812ee0100ca3372e2f75ede Mon Sep 17 00:00:00 2001 > From: Guido Falsi > Date: Sun, 21 Sep 2025 17:47:08 +0200 > Subject: [PATCH] security/netbird: Test fix > > --- > ...ndor_golang.zx2c4.com_wireguard_tun_tun__freebsd.go | 10 ++++++++++ > 1 file changed, 10 insertions(+) > create mode 100644 security/netbird/files/patch-vendor_golang.zx2c4.com_wireguard_tun_tun__freebsd.go > > diff --git a/security/netbird/files/patch-vendor_golang.zx2c4.com_wireguard_tun_tun__freebsd.go b/security/netbird/files/patch-vendor_golang.zx2c4.com_wireguard_tun_tun__freebsd.go > new file mode 100644 > index 000000000000..513b1217fa2c > --- /dev/null > +++ b/security/netbird/files/patch-vendor_golang.zx2c4.com_wireguard_tun_tun__freebsd.go > @@ -0,0 +1,10 @@ > +--- vendor/golang.zx2c4.com/wireguard/tun/tun_freebsd.go.orig 2025-09-21 11:04:17 UTC > ++++ vendor/golang.zx2c4.com/wireguard/tun/tun_freebsd.go > +@@ -65,6 +65,7 @@ type nd6Req struct { > + Randomseed0 [8]byte > + Randomseed1 [8]byte > + Randomid [8]byte > ++ Dad_failures *uint64 > + } > + > + type NativeTun struct { > -- > 2.51.0 Sorry, this patch doesn't resolve the issue. I get the same error. (Netbird still works with this patch on stable/15.) From nobody Sun Sep 21 16:50:17 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cVC0T3yj9z68MFv; Sun, 21 Sep 2025 16:50: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 4cVC0T3NZ8z47cw; Sun, 21 Sep 2025 16:50:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758473417; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=G4x3SUbYgLCMvPj8ihl5c3CIQdSdpUBnFkvxfck86HE=; b=pA8yJw30MZcDcOrWD8BqZmaHRFPPGQHL92JP0GKhfbobn8XH94gxQ64sr4q0173J/3mdyB TorBKyXGO5EIo8uQYLfLTbk5kAtJjLXoQt65sC6mn3glMy+S73Wan/xm/WwfHpcgGJm0rx ORDO3sU9mgCco33l0YdfVFtZ36ISEwbmKmo39C3WNjo/mXpccLTKvHKowCtfbp5nsoy1d8 3jnOB73ZdZTATY6X/JmMisWi9knjboaXsNXbCf3EBJQL0R/4rd7+46o3+nWld9YkpenL+i qL5O/ueDx7pQ/aadGhMHiSqEANJ/1moXHMpNvD5vzmQO1Njs93UjhYQYpz5dZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758473417; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=G4x3SUbYgLCMvPj8ihl5c3CIQdSdpUBnFkvxfck86HE=; b=itZ7SB6+CN0A8WSsNaAQw7rOAfu6Ri63Ji7jClmgiOGa1/jwygiF5z/6xQBO7/Gsof3z80 KIHTmUpC3c7M2sejRx21i1fQYeh6fEwAWKUnbgoFjvEZlk30SzMimC2tzwNpCNlBA/B74f maEHRbHPyUvP0Hkvz9f90e4hoHw7SYoi+Qt4VhHG7ep98Gx4gseiITu3Opqa6rAnUv8XvJ abymr2ODmI+hKXt8PXT8kEZXKapk44WQ/XRr5EI7krWpshy+DyH0zDe/SnoK4nrl13G9GB AUa9+i/de5VLwgj6qfBHzZ5KLb66aFZje9dgUbxH9BT6rjoz6MMBz47O01TTYQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758473417; a=rsa-sha256; cv=none; b=lR2X14f1TButojwc9e1mkH0/HnNhyBlmS5FJAA+unop9tG+99CDuWTrwtVzU2DzctwmgXW p5X5+3SRb1P/VfIODINvrZSSt11+NMJ0xsL8DHKwYJqmvnlhGdAuIyEwLqUx0Ss3Yey9M9 awPcry4QbIs+zjoe6Ooxf/DUR1QQEZpaFde3XSWkm1RFsXEpLSoo02VZo/YnP3xeTVod+R Vko+rz0QhbkIS2fN4eUvSiA6vs7AjrQFDGIPmXXOywLZgUGV0IXMxUaYfWN7XF8waOX29l 4iQM/dzZQhGjo2PZz+zJQO8riMMk4FUN1kqMJ0/iifoDyovwAchCrQ9zJJbc5Q== 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 4cVC0T2qDRz79n; Sun, 21 Sep 2025 16:50: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 58LGoHCc034601; Sun, 21 Sep 2025 16:50:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58LGoHwD034593; Sun, 21 Sep 2025 16:50:17 GMT (envelope-from git) Date: Sun, 21 Sep 2025 16:50:17 GMT Message-Id: <202509211650.58LGoHwD034593@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Zhenlei Huang Subject: git: 595acb29a35f - main - ifconfig: Display the IFCAP_HWSTATS capability without netlink List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 595acb29a35f36a4fc08b89d3a476f16c1d108b4 Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=595acb29a35f36a4fc08b89d3a476f16c1d108b4 commit 595acb29a35f36a4fc08b89d3a476f16c1d108b4 Author: Zhenlei Huang AuthorDate: 2025-09-21 16:47:45 +0000 Commit: Zhenlei Huang CommitDate: 2025-09-21 16:47:45 +0000 ifconfig: Display the IFCAP_HWSTATS capability without netlink This follows the commit 4cdc1f5421c5, which introduces the IFCAP_HWSTATS capability. Fixes: 4cdc1f5421c5 There are some high performance NICs that count statistics in hardware MFC after: 3 days --- sbin/ifconfig/ifconfig.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sbin/ifconfig/ifconfig.c b/sbin/ifconfig/ifconfig.c index 41d2f4603983..9aeb4a09ef49 100644 --- a/sbin/ifconfig/ifconfig.c +++ b/sbin/ifconfig/ifconfig.c @@ -1663,6 +1663,7 @@ static const char *IFCAPBITS[] = { [20] = "NETMAP", [21] = "RXCSUM_IPV6", [22] = "TXCSUM_IPV6", + [23] = "HWSTATS", [24] = "TXRTLMT", [25] = "HWRXTSTMP", [26] = "MEXTPG", From nobody Sun Sep 21 16:50:18 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cVC0V54ktz68Lny; Sun, 21 Sep 2025 16:50: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 4cVC0V49lYz47lk; Sun, 21 Sep 2025 16:50:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758473418; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7FeG0m5FnVHxoWebZ2DgfIC+pHjtJUdsni6VqHneA4A=; b=RyyTmMPMDFQ0RwEavjWhwzZ3RocTy0olNSJDnNSLdbW6ElsMBq61pmweNplNVNGCIdluXb Xe30l1l6CtyEvafO/T8NbXr0Xfl1o9dkc8+WvP3pd5XOb3Y7MAUm/pBWzIzRPpEv3cWlKg JH/yajmmYB4C9/YQTZu2q95LVch/GUI4L79SfnuyzeMnsNdQCJ3CvyxTNhC1p2GXAsNCDP iffuYtCMcKKkMXVDTrd91ma6pc6KDfhVsONs3ws7CMb2qsIceM3oX8JblN21lwcnc+pQyN ahBiR9ZnSY6L4L9TSDkOlqx8V2AfviB1ZZTYEws+fMXAel32jYIghiPC29aWmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758473418; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7FeG0m5FnVHxoWebZ2DgfIC+pHjtJUdsni6VqHneA4A=; b=iY8LPXikf6+5zHhpq0CjKgX4t2suwLLJM6EmfzS6Dvs3mVnLf4ytl5dkrqsSphIpBDewOo 36Odzc94TfeyoA8El5st1P6hN5GWRhLIUvP6hUOY0d06coNQ3WeGOMxin/XPE9aRgVvLp7 O8ey+ElpgAhml6UvtxhuECY38pZqq3rRQWW8MAuTUXdSKE1Zc3mLN3lNpAjPdZmYzMc3rV 3KiBCWKq9rdfSCcuRX/KmKzeubF7P0eUz/ERE+ZMzhgyI1X2BpHK0aW2mCSmslKylFYufI 65XEBRPWHAUn5ULHD8rJbjqyANAKkTboRN8OC5eH7UBwcEC7cfubQD9T6VrhmQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758473418; a=rsa-sha256; cv=none; b=BATHrObOOl0Gpz54G+eG45zMz0CCvzS7iBcrMh4YjGAKZNjxupwrCisDn0Jgub1h3Wh2ZM 1HaRhlChDh1T+tv0TVAB3Tc33ReqY1Bv+t7s2ubmFkWvOYXNKqp6TzEkm5kyzbhzdN46vh g6FD5vzvh+6raOTVKKPf/WPV1yTJkC2XTPVwB2Gqn1AvP7iW7PlctrjU5UC6M92jJGMWVa FWFtWwKc3AzyyqGlgtOPazoZ4RK64rkN50k5lOOpx8EU4akb57Dqb7CbQ34uEgzbvUD9n8 kecSlVfEwaCpM2JXr3ayK7Zkmx1NTAwtzmv41pIOtfTtFcduEA+6Gm5W8RJiuw== 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 4cVC0V3lt4z6cF; Sun, 21 Sep 2025 16:50: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 58LGoIcJ035035; Sun, 21 Sep 2025 16:50:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58LGoIIh035032; Sun, 21 Sep 2025 16:50:18 GMT (envelope-from git) Date: Sun, 21 Sep 2025 16:50:18 GMT Message-Id: <202509211650.58LGoIIh035032@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Zhenlei Huang Subject: git: 0c1684dd456e - main - ifconfig: Display the IFCAP_NV capability without netlink List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0c1684dd456e3df306b359b04e61f9f2048d9ff2 Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=0c1684dd456e3df306b359b04e61f9f2048d9ff2 commit 0c1684dd456e3df306b359b04e61f9f2048d9ff2 Author: Zhenlei Huang AuthorDate: 2025-09-21 16:47:45 +0000 Commit: Zhenlei Huang CommitDate: 2025-09-21 16:47:45 +0000 ifconfig: Display the IFCAP_NV capability without netlink This follows the commit 051e7d78b039, which introduces the IFCAP_NV capability. Fixes: 051e7d78b039 Kernel-side infrastructure to implement nvlist-based set/get ifcaps MFC after: 3 days --- sbin/ifconfig/ifconfig.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sbin/ifconfig/ifconfig.c b/sbin/ifconfig/ifconfig.c index 9aeb4a09ef49..d4c8cbd29d18 100644 --- a/sbin/ifconfig/ifconfig.c +++ b/sbin/ifconfig/ifconfig.c @@ -1658,6 +1658,7 @@ static const char *IFCAPBITS[] = { [14] = "TOE4", [15] = "TOE6", [16] = "VLAN_HWFILTER", + [17] = "NV", [18] = "VLAN_HWTSO", [19] = "LINKSTATE", [20] = "NETMAP", From nobody Sun Sep 21 17:17:51 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cVCcX4WtCz68PMk for ; Sun, 21 Sep 2025 17:18:04 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-qk1-f176.google.com (mail-qk1-f176.google.com [209.85.222.176]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cVCcX29dWz3D74 for ; Sun, 21 Sep 2025 17:18:04 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-qk1-f176.google.com with SMTP id af79cd13be357-826fe3b3e2bso390719185a.0 for ; Sun, 21 Sep 2025 10:18:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1758475083; x=1759079883; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=9d1SNNKLJnhMlyk9P2ED2Z9gB7FVsYvu5nLHdMH8OLQ=; b=OVMpV9nSiw0jpaJYH+yDX4n0BAaw8+3AAcx9PodOrRickPN/2lJg8ej7bTMQv/uq8A /C37WF4tqG+H+ldL4hU+nlZ9DvRTpq3Rk077XU0suV0ISHM+ez8myYGKrDFQQbx0fIXc cCpQMQimY/th6XWIWw1ldBaGymNYBAsE6L8uqQEff8NNtywhFjUlmEEMxxzEUuenN5lz vAL+fT76rV5iocC5s0zI3eLQ2q5Fo4oOa1TkmQEdde1HpvhXFqlwzbpyHIOJNAIwodme y+V7DlOkK96NBiFovLXDP8Zhuf+G/jzIgh2uEKs8bGJ2vRW+FhkMwbf6DIBHvC7yj5fD 4+RA== X-Forwarded-Encrypted: i=1; AJvYcCVAL3v88BTuaTIDwYOL51vu84WzUWbMaDZ163Hku1d7bQTAR2n3zd67OxS+OII+tgsSyv974nO2/Q0wPzuaqoSHFk7fbg==@freebsd.org X-Gm-Message-State: AOJu0YyoxmZjBUbjKFncN3HWCri2xfFj/xR4XgyS6GISc7GqquuIJQg1 HYnzRlqfwNhvcEt+ejUVVthOeC5rDuy+h2lx3hazM1v/9YgXcc7BKZPK3o1/zCWfkvZu7qlN6Zp 6F53Wlx//Giid7mxVWaiPl4WV5LDtoIg= X-Gm-Gg: ASbGncs57kOhP2jJnnshiS5cR3nXzx8iePxSYTbKIEd1VRTQlyNUjIVwpMvd8+7RUN1 hGOFYK+WoowMfsWbCrcYB2VbcMptQ4yL7udDBPMWLfcjSL1ExWNSk0EyuFFZS4mgHm9x/QbNBFV Xml4ZCpT1ZbYwIeFLEUBFcvRQJrMRl/w2I8XtibMhRdYUZNfj1kXiHdNo+RZjGVj0jkpRWnKxfn /yRf9Y= X-Google-Smtp-Source: AGHT+IESn7uyuTtXUvgAHGSSP+7Y/J8JANJCO/ccaxfu1VjuUKv+OuLKJEYOxzA7YISS2HIa6zHtp+euxSrlKS+MbyI= X-Received: by 2002:a05:620a:a81b:b0:84b:4091:160c with SMTP id af79cd13be357-84b40911657mr48055385a.65.1758475082943; Sun, 21 Sep 2025 10:18:02 -0700 (PDT) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 References: <202509200047.58K0lcgE017026@gitrepo.freebsd.org> In-Reply-To: From: Adrian Chadd Date: Sun, 21 Sep 2025 10:17:51 -0700 X-Gm-Features: AS18NWC_H9aoQ4jzpzAz92JQy6US8Qkupkp_vdYOvR_3u2OstgtH-URGrX3zjKM Message-ID: Subject: Re: git: 785edcc2af5a - main - net80211: convert the rest of the native net80211 drivers to SEQNO_OFFLOAD To: Gleb Smirnoff Cc: bz@freebsd.org, src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="000000000000aa5141063f52e24e" X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; TAGGED_FROM(0.00)[] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4cVCcX29dWz3D74 --000000000000aa5141063f52e24e Content-Type: text/plain; charset="UTF-8" On Sun, 21 Sept 2025 at 01:29, Gleb Smirnoff wrote: > Hi, > > On Sat, Sep 20, 2025 at 12:47:38AM +0000, Adrian Chadd wrote: > A> commit 785edcc2af5ae32c24f5caf5b9552f62bdae33ee > A> Author: Adrian Chadd > A> AuthorDate: 2025-06-10 04:22:10 +0000 > A> Commit: Adrian Chadd > A> CommitDate: 2025-09-20 00:42:45 +0000 > A> > A> net80211: convert the rest of the native net80211 drivers to > SEQNO_OFFLOAD > A> > A> * Convert the rest of the drivers to implement driver/offloaded > sequence > A> number handling. > A> > A> * For drivers that implement their own sequence number space > handling > A> for A-MPDU, only call ieee80211_output_seqno_assign() if the frame > A> isn't tagged with M_AMPDU_MPDU, which mirrors the original > net80211 > A> sequence number behaviour. (Except of course, the assignment is > A> now happening during final encap/transmit, not early in encap.) > A> > A> Locally tested (sta mode): > A> > A> * ath > A> * iwn > A> * bwi > A> * bwn > A> * iwm > A> * otus > A> * ral > A> > A> Differential Revision: https://reviews.freebsd.org/D50772 > A> Okayed by: bz > > This commit broke my iwm(4) on Thinkpad X1 Carbon 7th Gen. > > The symptoms are that the interface can associate and even receive DHCP > address, but after that all transmitted packets are lost. Any > communication > attempt results in ARP requests that are not seen by other devices on the > network. Reverting this commit resolves the problem. > > I will be able to test patches tomorrow, please send them to me. > > If we are not able to resolve that before start of the stabweek which is > this > Monday, I'd like to get this reverted from main. > Yup, I figured it out pretty quickly after it was first reported. See: https://reviews.freebsd.org/D52652 It looks like different generations of firmware/chipsets have different expectations for sequence numbers being present. I'm going to land this once kevans (and/or you?) test it out and OK it. Sorry! -a > > -- > Gleb Smirnoff > --000000000000aa5141063f52e24e Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Sun, 21 Sept= 2025 at 01:29, Gleb Smirnoff <gl= ebius@freebsd.org> wrote:
=C2=A0 Hi,

On Sat, Sep 20, 2025 at 12:47:38AM +0000, Adrian Chadd wrote:
A> commit 785edcc2af5ae32c24f5caf5b9552f62bdae33ee
A> Author:=C2=A0 =C2=A0 =C2=A0Adrian Chadd <adrian@FreeBSD.org> A> AuthorDate: 2025-06-10 04:22:10 +0000
A> Commit:=C2=A0 =C2=A0 =C2=A0Adrian Chadd <adrian@FreeBSD.org> A> CommitDate: 2025-09-20 00:42:45 +0000
A>
A>=C2=A0 =C2=A0 =C2=A0net80211: convert the rest of the native net80211 = drivers to SEQNO_OFFLOAD
A>=C2=A0 =C2=A0 =C2=A0
A>=C2=A0 =C2=A0 =C2=A0* Convert the rest of the drivers to implement dri= ver/offloaded sequence
A>=C2=A0 =C2=A0 =C2=A0 =C2=A0number handling.
A>=C2=A0 =C2=A0 =C2=A0
A>=C2=A0 =C2=A0 =C2=A0* For drivers that implement their own sequence nu= mber space handling
A>=C2=A0 =C2=A0 =C2=A0 =C2=A0for A-MPDU, only call ieee80211_output_seqn= o_assign() if the frame
A>=C2=A0 =C2=A0 =C2=A0 =C2=A0isn't tagged with M_AMPDU_MPDU, which m= irrors the original net80211
A>=C2=A0 =C2=A0 =C2=A0 =C2=A0sequence number behaviour.=C2=A0 (Except of= course, the assignment is
A>=C2=A0 =C2=A0 =C2=A0 =C2=A0now happening during final encap/transmit, = not early in encap.)
A>=C2=A0 =C2=A0 =C2=A0
A>=C2=A0 =C2=A0 =C2=A0Locally tested (sta mode):
A>=C2=A0 =C2=A0 =C2=A0
A>=C2=A0 =C2=A0 =C2=A0* ath
A>=C2=A0 =C2=A0 =C2=A0* iwn
A>=C2=A0 =C2=A0 =C2=A0* bwi
A>=C2=A0 =C2=A0 =C2=A0* bwn
A>=C2=A0 =C2=A0 =C2=A0* iwm
A>=C2=A0 =C2=A0 =C2=A0* otus
A>=C2=A0 =C2=A0 =C2=A0* ral
A>=C2=A0 =C2=A0 =C2=A0
A>=C2=A0 =C2=A0 =C2=A0Differential Revision:=C2=A0 https://revi= ews.freebsd.org/D50772
A>=C2=A0 =C2=A0 =C2=A0Okayed by: bz

This commit broke my iwm(4) on Thinkpad X1 Carbon 7th Gen.

The symptoms are that the interface can associate and even receive DHCP
address, but after that all transmitted packets are lost.=C2=A0 Any communi= cation
attempt results in ARP requests that are not seen by other devices on the network.=C2=A0 Reverting this commit resolves the problem.

I will be able to test patches tomorrow, please send them to me.

If we are not able to resolve that before start of the stabweek which is th= is
Monday, I'd like to get this reverted from main.
<= br>
Yup, I figured it out pretty quickly after it was first repor= ted.


It looks like different generations of firmware/chipsets have different ex= pectations for
sequence numbers being present. I'm going to l= and this once kevans (and/or you?)
test it out and OK it.

Sorry!



=
-a
=C2=A0

--
Gleb Smirnoff
--000000000000aa5141063f52e24e-- From nobody Sun Sep 21 17:18:20 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cVCd56hqxz68PL0 for ; Sun, 21 Sep 2025 17:18:33 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-qk1-f179.google.com (mail-qk1-f179.google.com [209.85.222.179]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cVCd45GhZz3DPr for ; Sun, 21 Sep 2025 17:18:32 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=freebsd.org (policy=none); spf=pass (mx1.freebsd.org: domain of adrian.chadd@gmail.com designates 209.85.222.179 as permitted sender) smtp.mailfrom=adrian.chadd@gmail.com Received: by mail-qk1-f179.google.com with SMTP id af79cd13be357-8498f5194deso32096285a.1 for ; Sun, 21 Sep 2025 10:18:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1758475112; x=1759079912; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=YpPpJ+AU6Aur2Mpv0/h3A+2Dn9TGa2E7968blYL6+UE=; b=lxbhaT9sUiSDHsIwzpEnghDhcDY9S7dCvWR4muB1bw8rkeIwoI9ZNPdCMbtc6ZrIAf YeJm4XKgjkSAw63CfEvA5uhE5j+0Ws1Sbhfy242SM0L8kl83Hc7t1fkOrmDK0z7se89G aer+VYVZK3F0Zeiin+nT6xwTEIKQ9qsGNkdolC6f1oOE7X/D2JW1+tfWFfAQNswtUVLN C69oRnNNXngB0+4Asa2aTqTe2xBDi2+NZDQFB9yoRKDUdjCwsma5w7CJp/BRW6342aYl 6miiGCyDGTrbHFiStXdnqLxnFlu0hTBZCbOOpNaV/+IpMGOXrYWPoxs0UDLI/6dkpOtu 6IOA== X-Forwarded-Encrypted: i=1; AJvYcCX1O8Z4tYzLkodkmb1ebclRviMmQJDlMYlbB6vjorIA2x/2cuzD/H28IbyCIZrFcSh8qNVcNw88LbUu+DxG3yiFQwsa/Q==@freebsd.org X-Gm-Message-State: AOJu0YzFzjEa93cq/NG0TTo+EUi3ZO6Nd0yCnsvUIr0C22zpIjN3fQfI Ria6j5fjzTgAeAoZx31GSXTEDQ2a5jyou4xS93s7998d05L0Nr4vEo7VWgTELdGFi2usQND8icD X1+0VJVwTyc2XqfodBCzeMjBAFDulIzM= X-Gm-Gg: ASbGnctiGLMTAHhA99fOHDckwyTV4xhr8c1PRFm8nRsJNRk3qus26jPMwg2xIt9fwbq paNsHrpVVpnwrdCTtLZ6vq+0cvgNj3QMYTJRL+Ap96YMbwSFXzDplcAEuKrOLOQHgv4JGB983HU alppJf8I6vBuLczp8K6Fitp3RvJMsa170fvv5bNXyrQC3cerouJZfMyXNK3i4XN9m2Ov6pTy1q3 atc/Nk= X-Google-Smtp-Source: AGHT+IGg6hpHfmPTNrWRsvD26aUekVmNo1R5vS6ucVAHbLdSldKXGcEAvwZpSY6zQOj/xxq2eNgArGY1Mx18vQbqHJ0= X-Received: by 2002:a05:620a:a484:b0:82c:556:eae1 with SMTP id af79cd13be357-83bab470303mr1171158885a.46.1758475112011; Sun, 21 Sep 2025 10:18:32 -0700 (PDT) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 References: <202509200047.58K0lcgE017026@gitrepo.freebsd.org> In-Reply-To: From: Adrian Chadd Date: Sun, 21 Sep 2025 10:18:20 -0700 X-Gm-Features: AS18NWC8Sbv8ULeefFlvGVL9ZCI7O3E_x9_5-FowFEGHZsQBupobSOPUVOK-4Mg Message-ID: Subject: Re: git: 785edcc2af5a - main - net80211: convert the rest of the native net80211 drivers to SEQNO_OFFLOAD To: Gleb Smirnoff Cc: bz@freebsd.org, src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="00000000000065dd7b063f52e417" X-Spamd-Bar: / X-Spamd-Result: default: False [0.91 / 15.00]; NEURAL_HAM_SHORT(-0.99)[-0.992]; NEURAL_SPAM_MEDIUM(0.99)[0.989]; NEURAL_SPAM_LONG(0.81)[0.810]; FORGED_SENDER(0.30)[adrian@freebsd.org,adrianchadd@gmail.com]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17:c]; DMARC_POLICY_SOFTFAIL(0.10)[freebsd.org : SPF not aligned (relaxed), No valid DKIM,none]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; TO_DN_SOME(0.00)[]; RCVD_COUNT_ONE(0.00)[1]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_HAS_DN(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ARC_NA(0.00)[]; MISSING_XM_UA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.222.179:from]; RCPT_COUNT_FIVE(0.00)[5]; TAGGED_FROM(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; FROM_NEQ_ENVFROM(0.00)[adrian@freebsd.org,adrianchadd@gmail.com]; PREVIOUSLY_DELIVERED(0.00)[dev-commits-src-main@freebsd.org]; MLMMJ_DEST(0.00)[dev-commits-src-main@freebsd.org]; RCVD_TLS_LAST(0.00)[]; R_DKIM_NA(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[209.85.222.179:from] X-Rspamd-Queue-Id: 4cVCd45GhZz3DPr --00000000000065dd7b063f52e417 Content-Type: text/plain; charset="UTF-8" oh wait this is on iwm, not iwx? interesting! Ok, lemme go do the same thing to sequence numbers and iwm. stay tuned. -a --00000000000065dd7b063f52e417 Content-Type: text/html; charset="UTF-8"
oh wait this is on iwm, not iwx? interesting!

Ok, lemme go do the same thing to sequence numbers and iwm. stay tuned.



-a

--00000000000065dd7b063f52e417-- From nobody Sun Sep 21 17:24:05 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cVClp6B2Wz68Qqj for ; Sun, 21 Sep 2025 17:24:22 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-qk1-f179.google.com (mail-qk1-f179.google.com [209.85.222.179]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cVClp3LWkz3FbP for ; Sun, 21 Sep 2025 17:24:17 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=freebsd.org (policy=none); spf=pass (mx1.freebsd.org: domain of adrian.chadd@gmail.com designates 209.85.222.179 as permitted sender) smtp.mailfrom=adrian.chadd@gmail.com Received: by mail-qk1-f179.google.com with SMTP id af79cd13be357-80b7a6b2b47so321226585a.0 for ; Sun, 21 Sep 2025 10:24:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1758475457; x=1759080257; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Tr7CflBoVFQG7FUN+GNSr1fsrlb51hx9hkWk7JYUHJw=; b=eEzwKWydSBpXNHO006ch/dpaUUKIWR2b4KHid1dsYgSHrlSHrTylXtNHg2MOa5TIFg t07eb2R38ST4JW3O/kFCLH/ixIW7hGH9bniWHRCCHgcXWeO93jLDan8gl1r0OKJn7J4h QvFCitU3I+kCAVgae0KiYpLmP8+iblOuOfKre6GYt1QU9W4K5HD99Mo6iA/cWuJLepTd wRJ44KeLoqRUpL+UsVnm9mK/PjjNljrWM6fodvnp0lZznox8dFGvt+bGjvOf8Z08nAvE lWR9R9/zy8TaTZ7Ftpg/8vC5FIPQOBKRebkV3HUfQrY4LqkJ6HHF6TVEBzAMi3pVXmhM Owqg== X-Forwarded-Encrypted: i=1; AJvYcCUfv2fxXXO9XCBNnb66GaxLarGWQ5rvOXvTtY/E4Jjfn8fpxFh21GpHUPqBkst6GbK3pHkYq56FuCoS2D2WCOJ3rpz2zQ==@freebsd.org X-Gm-Message-State: AOJu0Yw6r2llZWQg0QbcudWb/JiADYhJR/P489yR139cEORrZ0D1TvET 656QdBrkM2OejAUaSICR3a2ecJPerhwpLcVmepMj1pojkZDVQsElA17Qhr9tG3yQu+beFp9/umn dvGsudxI+2lIioENdlGxMuEdoHC1BxZnbTp4j X-Gm-Gg: ASbGncv0xJd5sh7nTkjsce3RrAE2Co9a850BPSj5NhJ9OHT5V/V0jEH9oTNMZzH57Ir B0WR3pVg01Zz+QH/qeXKOg6eoX6lanGporHEpYmz2i8uxJrnaenUeJSmJmQjEU3DiAoWFeGP5Uz N84cP4IcudOODOkdRon7DMg+uYxB+Re2+T9049jqIlxxSgqpJZLQfzpJOuY79ZdH4TCj1Do28QN AtyMx0= X-Google-Smtp-Source: AGHT+IFGU+0h5YYTHMMh7Vdq1Z1HSICtVta3IItAY+ejbjKi3N19Z8GK7oNbOgJayxPSKWpapQ4BENmXgjhnSuc6Ctw= X-Received: by 2002:a05:620a:3708:b0:7e3:495a:2982 with SMTP id af79cd13be357-83b9685470fmr1066283585a.0.1758475456653; Sun, 21 Sep 2025 10:24:16 -0700 (PDT) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 References: <202509200047.58K0lcgE017026@gitrepo.freebsd.org> In-Reply-To: From: Adrian Chadd Date: Sun, 21 Sep 2025 10:24:05 -0700 X-Gm-Features: AS18NWDEfdIylFHX2rkBdKIrSGXJNrn-at3HyM7SaHSR9J2oHIX7V5vKvhe9_yA Message-ID: Subject: Re: git: 785edcc2af5a - main - net80211: convert the rest of the native net80211 drivers to SEQNO_OFFLOAD To: Gleb Smirnoff Cc: bz@freebsd.org, src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="000000000000f0b066063f52f882" X-Spamd-Bar: -- X-Spamd-Result: default: False [-2.83 / 15.00]; NEURAL_HAM_LONG(-1.00)[-0.999]; NEURAL_HAM_SHORT(-0.99)[-0.994]; NEURAL_HAM_MEDIUM(-0.94)[-0.936]; FORGED_SENDER(0.30)[adrian@freebsd.org,adrianchadd@gmail.com]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17:c]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; DMARC_POLICY_SOFTFAIL(0.10)[freebsd.org : SPF not aligned (relaxed), No valid DKIM,none]; FREEMAIL_ENVFROM(0.00)[gmail.com]; TO_DN_SOME(0.00)[]; ARC_NA(0.00)[]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.222.179:from]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RCVD_COUNT_ONE(0.00)[1]; R_DKIM_NA(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-main@freebsd.org]; RCVD_IN_DNSWL_NONE(0.00)[209.85.222.179:from]; FROM_NEQ_ENVFROM(0.00)[adrian@freebsd.org,adrianchadd@gmail.com]; FROM_HAS_DN(0.00)[]; MISSING_XM_UA(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[dev-commits-src-main@freebsd.org]; TAGGED_FROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; RCPT_COUNT_FIVE(0.00)[5] X-Rspamd-Queue-Id: 4cVClp3LWkz3FbP --000000000000f0b066063f52f882 Content-Type: text/plain; charset="UTF-8" hi! ok, please try: https://reviews.freebsd.org/D52664 that should bring the explicit sequence number assignment back for all iwm(4) NICs, even if firmware then overrides it. -adrian On Sun, 21 Sept 2025 at 10:18, Adrian Chadd wrote: > oh wait this is on iwm, not iwx? interesting! > > Ok, lemme go do the same thing to sequence numbers and iwm. stay tuned. > > > > -a > > --000000000000f0b066063f52f882 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
hi!


that should bring the explicit sequence nu= mber assignment back for all iwm(4) NICs, even if firmware then overrides i= t.



-adrian


On Sun, 21 Sept 2025 at 10:18, Adrian Chad= d <adrian@freebsd.org> wrot= e:
oh wait this is on iwm, not iwx? interesting!

=
Ok, lemme go do the same thing to sequence numbers and iwm. stay tuned= .



-a

<= /div>
--000000000000f0b066063f52f882-- From nobody Sun Sep 21 17:47:39 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cVDGg2qPPz67jpj; Sun, 21 Sep 2025 17:47: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 4cVDGg293hz3HF1; Sun, 21 Sep 2025 17:47:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758476859; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vRCxEYvrAC4vwHZ5DZTqZAcXcNKPdmx9Rm8GnkErU8M=; b=cy39P4MjHIhYWu4+BuucIZMN212f5hUM0bWRSyDwvZ3ndt8HbsEtjumO3tTJqQBFC3+9D8 uba+5/l3qH3sYqpCSOud/X8VWNqPMveQJnzZqaEoU8oOWpD78WYFGn/Kw3ukR1iDxHZ8Fs /L5+3AivLzGklhtdnZBBt0YiZT5rND2ATrLxxe+LNngZIs4gd5hstwElUhmuOBJgBCTljc pwURAwTvATZgp00or1zKQ5FdUWwZebBWDyQ7sVpoujnhtFS7eQOix34pgnjsGXEKXXIhQE 1dzzrql6RkRErN3+0c4sGt42uXey+c4Hj2m7HpAPrn+//ZBkgKDxIYWOgxEZGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758476859; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vRCxEYvrAC4vwHZ5DZTqZAcXcNKPdmx9Rm8GnkErU8M=; b=QORfPDd5yP15ZmbzzyC6FZ/ANs9F057ADUBZZDVVpZrYq9o1zfyyh/nsghlIAckg3slGDA dBgh2IwOlB/U3GOnUVCjRbYTZXw3VTNx5vNqR9sztMIVuywy3nsoExPsueuCKQH1BkxFhW w6rJ7hTKJrtqFogH+bum5chkGl668arXeXpqdf2wrnjp5uUYvAOAlBVh5BHTP0vu/W6Sap xGgRa0Y+yyy+6dVtt5ld+gz2USzTzd1Nu4PgRTiPvXhQoVaOkEsaHS5AFgfjETSu/0dZPv raMOM1Lqwndq7RH1hdXeIuSYLoSmqA+/Wi9h1aBhdpq77G+drUMqWicomLJASw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758476859; a=rsa-sha256; cv=none; b=MbxbrbWMbnhnOIB6NqFoi/Cm3DYsJYQtmJIdbne2TujaVI5WGKiZaiXCInIb7EMVoIV9Kg GqVm1c5P4/OBDKGCIumK3fJco3UA+zr2oDARm4bwuA34IfpPCHjUQMkDqMt3Cm0Av7m5Jr HYZcHJUQ9XYScR/2jfj5SqEvHQlsI/cgiMwURu6MVhfx/PUlXicXmxtChboKbiKH0TOxk7 N4T80k1/TfPiziF24lg7/iq41V48G3UWBaapN/Mx49UeQc/V7hMQBcys8AQEgnpSBIfERU e5LScj4pSlXqEf/S6m9HoIvCIhbPFL7qR276kpzJWfo3pJIz2TWaALVtwh9Jaw== 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 4cVDGg1grDz8cl; Sun, 21 Sep 2025 17:47: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 58LHldxq038316; Sun, 21 Sep 2025 17:47:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58LHldQe038313; Sun, 21 Sep 2025 17:47:39 GMT (envelope-from git) Date: Sun, 21 Sep 2025 17:47:39 GMT Message-Id: <202509211747.58LHldQe038313@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Adrian Chadd Subject: git: 522455887078 - main - iwx: re-add sequence numbers for non-AMPDU, preserving previous behaviour List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: adrian X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 52245588707851f3175551bf3934e206ca2b6ad7 Auto-Submitted: auto-generated The branch main has been updated by adrian: URL: https://cgit.FreeBSD.org/src/commit/?id=52245588707851f3175551bf3934e206ca2b6ad7 commit 52245588707851f3175551bf3934e206ca2b6ad7 Author: Adrian Chadd AuthorDate: 2025-09-21 01:55:00 +0000 Commit: Adrian Chadd CommitDate: 2025-09-21 17:47:18 +0000 iwx: re-add sequence numbers for non-AMPDU, preserving previous behaviour I received a report on freebsd-wireless@ that traffic stopped working. It seems that although my AX210 is fine with this change, the AX201/22000 hardware/firmware seems to require it. There's a bit to set in the TX command to force the FW to set the sequence control. We only set a few flags, and we don't set that. So, add the sequence number allocation where encryption is performed. Locally tested: * AX210, STA mode * AX201, STA mode Differential Revision: https://reviews.freebsd.org/D52652 Reviewed by: kevans Tested by: kevans --- sys/dev/iwx/if_iwx.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/dev/iwx/if_iwx.c b/sys/dev/iwx/if_iwx.c index 3b29c8e78b97..8422fcb787c3 100644 --- a/sys/dev/iwx/if_iwx.c +++ b/sys/dev/iwx/if_iwx.c @@ -5673,8 +5673,9 @@ iwx_tx(struct iwx_softc *sc, struct mbuf *m, struct ieee80211_node *ni) if (rinfo == NULL) return EINVAL; - /* Offloaded sequence number assignment */ - /* Note: Should be done in firmware on all supported devices */ + /* Offloaded sequence number assignment; non-AMPDU case */ + if ((m->m_flags & M_AMPDU_MPDU) == 0) + ieee80211_output_seqno_assign(ni, -1, m); /* Radiotap */ if (ieee80211_radiotap_active_vap(vap)) { From nobody Sun Sep 21 18:09:54 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cVDmQ2wymz67l1C; Sun, 21 Sep 2025 18:09:58 +0000 (UTC) (envelope-from glebius@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cVDmQ1yklz3Jrh; Sun, 21 Sep 2025 18:09:58 +0000 (UTC) (envelope-from glebius@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758478198; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=xOtPHpMNRY7tjacQqnDhVqg9pyubbFTR8TdQSx1tcv8=; b=K48auRULQh1H5sbU+vPbTylozJpTolADFNYKZH0iBMonm83YRoeA9PDrjclYj0084McxDW C0rJkO0yqggK/fIdX3zs+Y1uN0Ue6ZI5vJDmhBiskEMz02KcNw0Jyhu56NHPtcbDXQvbf7 KLOz0pO+4OorRCT7hKPrM3DldAN+IjMdymL2RBR8QVF80YD+oeAXAGutxf2ZkeWOEjKy/H vl/4QH7pvX5dCR3cRzYIm3h1Vm6AuEs4Qbu694F1QcBnL+YEYPS+Fuxg2m7m83K2rRvnrE hB+QDV6R6uOYM2mECn81SSgJpPk6svnrMbtQZzrgnSFeSjnarOlI8zE4SRXYoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758478198; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=xOtPHpMNRY7tjacQqnDhVqg9pyubbFTR8TdQSx1tcv8=; b=uIqTRgC4cp4gXZBEFneK5YqeBNZkw4hJSe/x9NiJM2jQv3yUxTfYoI39LsSuqhQSuyXJkD Z4oD8glpvXcyQyJKIF+6Iqar5XqDqfWduemZxRtwHgGgPQAALpwdaE9anzHzFMG+VIje5p TK1mgwsaepyZw+cN40QXDC665zzGa8boRhdJRmhjG0FJJhoiwO1ECObEaTQHOiBat5GznC FJIeWWbuSZm5CDKvu9S60lA0zX9JmjpUnI9UWfUihEoYt2p5DppNI+pPnZ8rAVP366gL99 wV2l/yWgpnPoNbIRw1SgARL6NYO/Xv8jXXAvgx+bYFtlp+5cQvmdndzsduON7g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758478198; a=rsa-sha256; cv=none; b=jdWLuLW5Y5tjqV+LEWbINur3puzVGuOM77GF/Gd0xvBATG6q//5h2a37prKf9wV1QSb5s/ gl+5AagQeuENMI8Tb2X0Vy+NQXaQYB97Vw6O/wAF8Z71NLgSkm/HnJeec0ZRqw7R4rcx/p MTr63SdwUdgi++h6A4NehEpPShpgQjFyrvcKev3fO5i8/8jwDex9lKhwH1Meif0vOnInVR QB9+1sGH18s3OULGONrVL0B2Vzlx2Jok8B19X3jgdYrb80opQAfSnkj5XcagY0tj7BXSV3 4bj5ugU3s0o4og3WHP5UR1RgpfB+HMEcFbDz6TgP6Kf6oRqcimMxRRlbdzPdng== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from cell.glebi.us (glebi.us [162.251.186.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: glebius) by smtp.freebsd.org (Postfix) with ESMTPSA id 4cVDmP3Zc7z9SH; Sun, 21 Sep 2025 18:09:57 +0000 (UTC) (envelope-from glebius@freebsd.org) Date: Sun, 21 Sep 2025 11:09:54 -0700 From: Gleb Smirnoff To: Adrian Chadd Cc: bz@freebsd.org, src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 785edcc2af5a - main - net80211: convert the rest of the native net80211 drivers to SEQNO_OFFLOAD Message-ID: References: <202509200047.58K0lcgE017026@gitrepo.freebsd.org> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Sun, Sep 21, 2025 at 10:24:05AM -0700, Adrian Chadd wrote: A> hi! A> A> ok, please try: https://reviews.freebsd.org/D52664 A> A> that should bring the explicit sequence number assignment back for all A> iwm(4) NICs, even if firmware then overrides it. Yes, applying that on top of unmodified main makes iwm(4) work again. Thanks! -- Gleb Smirnoff From nobody Sun Sep 21 18:31:10 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cVFDt71WRz67mGB; Sun, 21 Sep 2025 18:31:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cVFDt3bD0z3M4w; Sun, 21 Sep 2025 18:31:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758479470; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=X8vEbreALVD9NfIcdBhDaKrb2MM4Z4ySjApMO+k+aO0=; b=iyacW8T9hM9lVN08wyKsLssyt2eBQpjedzKZH+eRAVFu9/UvIbyfgq+1dz8iyKxPZT/t5y 2+TDKylMu+dWECKrqWjylVZMh1Vk6hMKRGM2S9tcJ4dl0dMjzAWUIA6+YBDpAfAiVsYJcp KHsS19l1QgA/hlsK5WDYVsas6H6MthJU3+MpF1v5PQIDnrfDzY9aiRWMLFY6zwYxO0oDJu RNhoQxk6tpDcF0Kc8O9GOQphSnm2c/H1vaFdeRNTLgYYLJIzjFV5hpe4dq19KMNABAjyFh 4h0XxZvoNeEE/w5cdxaN0KeJ904NkURaR3HdCKFfA/Al08FC32H8hpTmYmR1Nw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758479470; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=X8vEbreALVD9NfIcdBhDaKrb2MM4Z4ySjApMO+k+aO0=; b=yflclXEz9t/IUNzeq6CPNSaYBoxgl6V72Zw65fBaVecfBxDdfVuTA4wk9qdWxbU4gwCJQV wTqw1X3LFdSbKzG+r7+GRSaIfqClnR3JNhLQ7U5qTgVj2rAE7EUp3GxzdYEs+0KjUzAJuq dok7jKG1UBqlLnxxL3OCmIZA+d5FdwObJcHNqGdN6NBIMJa/dlk4hktkHn5oJe8KJkoPZN Tw1HI5WYME0754ID5VoV+x8dy3+zRMIt8i+65Enqyq+QVvp3TDT0zK1rMfZ1SfWIurqt8r minQVV8tXOJIbGG4KjKEZog3JGrVSNUOCoKl56ad2P5ocTGUvg3+uF2Kulraug== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758479470; a=rsa-sha256; cv=none; b=q42qv8DwnpOS0+DfsvktUSIrgOEJ0hjEi86LEP0bfv7F6oKEGSKuqObAxYxxQIWUML1AF3 GwyWDM3x5RytzlvsTXYwliX1T2zs0V3e0caCwUO9Y2Ovv+rN9CstrsHJ34xBWh6KfefIQY gjLvO4zgGEI5LKc3aEHHwpxNZITPAMDkN1H2gCQIsWjqS7GlTLWAeua6+u6XX0GhAout0A HKxM2LYUgL48IXRC8lsizbL/UDECCi7qSBZrC62PhaIW0qC+Kqx6QNoP7nUEgs0tVCtn5F 3K7/QDIAsRXoIyn1XpAcbsXGxG/jDUGnt3J90ehXEZcYIcmS4ASPZlN/sSmbgQ== 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 4cVFDt3B1Rz9Vc; Sun, 21 Sep 2025 18:31: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 58LIVAFn024226; Sun, 21 Sep 2025 18:31:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58LIVA4w024223; Sun, 21 Sep 2025 18:31:10 GMT (envelope-from git) Date: Sun, 21 Sep 2025 18:31:10 GMT Message-Id: <202509211831.58LIVA4w024223@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Adrian Chadd Subject: git: 5e49712ca8fe - main - iwm: assign sequence numbers even if we ask the firmware to override List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: adrian X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5e49712ca8fef53262f2f6769c119f27e0e175ee Auto-Submitted: auto-generated The branch main has been updated by adrian: URL: https://cgit.FreeBSD.org/src/commit/?id=5e49712ca8fef53262f2f6769c119f27e0e175ee commit 5e49712ca8fef53262f2f6769c119f27e0e175ee Author: Adrian Chadd AuthorDate: 2025-09-21 17:21:34 +0000 Commit: Adrian Chadd CommitDate: 2025-09-21 18:30:46 +0000 iwm: assign sequence numbers even if we ask the firmware to override I've had a report of this breaking without the sequence number assigned (from glebius@) so, similar to iwx work, let's just re-add it here. Reported by: glebius Differential Revision: https://reviews.freebsd.org/D52664 Reviewed by: glebius Tested by: glebius --- sys/dev/iwm/if_iwm.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/dev/iwm/if_iwm.c b/sys/dev/iwm/if_iwm.c index 9f590f11864c..6840c6a4d00a 100644 --- a/sys/dev/iwm/if_iwm.c +++ b/sys/dev/iwm/if_iwm.c @@ -3773,6 +3773,10 @@ iwm_tx(struct iwm_softc *sc, struct mbuf *m, struct ieee80211_node *ni, int ac) rinfo = iwm_tx_fill_cmd(sc, in, m, tx); + /* Offloaded sequence number assignment; non-AMPDU case */ + if ((m->m_flags & M_AMPDU_MPDU) == 0) + ieee80211_output_seqno_assign(ni, -1, m); + /* Encrypt the frame if need be. */ if (wh->i_fc[1] & IEEE80211_FC1_PROTECTED) { /* Retrieve key for TX && do software encryption. */ From nobody Sun Sep 21 18:56:56 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cVFpg0S5wz67pGB; Sun, 21 Sep 2025 18:56:59 +0000 (UTC) (envelope-from glebius@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cVFpf73lYz3NFh; Sun, 21 Sep 2025 18:56:58 +0000 (UTC) (envelope-from glebius@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758481019; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=FKvFhi9OSgPMykEtLoUsmuADvdqChonvLzcj/D8u4lI=; b=YS1FpCxbXG+yjLdvD4AOWYhBzk/shahxBFFFR+dTrfN6zMw9JZ7eouONL+wgvKVqcghGYJ 1VisxLe4mwWgoEns7c19pSZK3V1OB/0jBI6JTq4byvI88FEUFx+HH3xGvFiaCsOMcAFq1l erj5IlS82EwGa0jjwuCYlVsTTzpL/7EAh9qNhrb5tBboKkNUcfHf9DHkh2COHGBYtDNgb2 onWIXMN/8aHr8c5a1ss0nNSH5eD1bCGk4fH+maXiIMGvoEua8oAml+d1gV8TrkCZVflyct UGfjbDmGT352i0Ig4nFhiaK8sa7f/WHNHdRTjTlmQmv9/BdkW8ZoMRFQbWsjBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758481019; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=FKvFhi9OSgPMykEtLoUsmuADvdqChonvLzcj/D8u4lI=; b=KBr7eTdc1rMmOwV9CAvYNdMa+Ty+942JS1yDOukDMUiOVrVeXt32XDyTW426q1Y6Z5ZooP U3mOdUNshByf4qRBSWa+l/OpGP9p7hJhhiDER+33EHemyl7Dp4QrkbfNoLJmVKAvwUMY1V vGuhWMroWvrILGVZ0SX13TdilgZp7kD6GJrwCvj8B1DmZZMIYIJO7SgiVfHNcRdgkVlQG8 uUWYcc1g3tPVPSa+dLzEQZCNhFpGDlGsdPZNC8GtQqMLY72nt9ZeWfGI21iFcB3Uenonqr cOu18+3ZgrywO+JU8m9/Mx6XcxSoOQGgGad8kjL6oJu5AKNj3A93V75T8+yO2g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758481019; a=rsa-sha256; cv=none; b=Mwl1V9EDtv4UMP1ie+JSCA/YpEyrUZTgR7AiIvwTuRIYDvm/d6U9NOhu98LTOH+T4+gBuk MIFKWd1qG22w+piPqz/R2AYs5pqrxrhO3EqB4wbhhJ+T++z8qr+VTi7t9DP2vVOXgCLqom iPO6vD+bznekXkmF6Nay6YK1EmdOHiW3XmvHQ+nDa4Bh0c/92JEbmKGjSG2b68ZJkjwJLi +GTqvNVpqQB8hIbKb8GWe15LVcSma2qHjDx+bC8K3761yWsaRk8lk41lU+4CRhAiHmaUie b9J/qLyPYsBQkConmNTuLVDu5gc7gjRQFaizjRQgnRxv3PaE2wfPVarpRZtCYQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from cell.glebi.us (glebi.us [162.251.186.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: glebius) by smtp.freebsd.org (Postfix) with ESMTPSA id 4cVFpf2XHKzCQm; Sun, 21 Sep 2025 18:56:58 +0000 (UTC) (envelope-from glebius@freebsd.org) Date: Sun, 21 Sep 2025 11:56:56 -0700 From: Gleb Smirnoff To: Guido Falsi Cc: "Herbert J. Skuhra" , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 31ec8b6407fd - main - sys/netinet6: Implement RFC 7217 Message-ID: References: <202509201231.58KCVqBC047480@gitrepo.freebsd.org> <874iswhip4.wl-herbert@gojira.at> <07503de1-785e-4e4d-b4e4-0524aeb064e1@FreeBSD.org> <87jz1sc9fr.wl-herbert@gojira.at> <31da7dd5-ae67-4fb4-aa47-81e57f460c9d@FreeBSD.org> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <31da7dd5-ae67-4fb4-aa47-81e57f460c9d@FreeBSD.org> On Sun, Sep 21, 2025 at 06:02:24PM +0200, Guido Falsi wrote: G> A C program would have included the system include and noticed the change, G> but this software has hardcoded the struct in go code and requires G> patching. G> G> I'm attaching a simple patch for the ports tree for this port, it compiles G> but I've not tested it at runtime, could you try applying this patch to the G> ports tree and recompile the port, and report back? G> G> Please note this is not a proper patch for the ports tree, it just fixes G> the problem, but would break it for anyone else, I'll produce a proper G> patch for the ports tree once I have confirmed the approach woks. Is struct nd_ifinfo something that is used as argument to ioctl(2)? If so, then adding counter_u64_t into it is not correct. I would suggest to not revert the change as a whole, but remove the counter only and bring struct nd_ifinfo back to original. The counter should probably go into struct in6_ifextra that is pointed by if->if_afdata[AF_INET6]. -- Gleb Smirnoff From nobody Sun Sep 21 19:08:58 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cVG4l2mt4z67pWw for ; Sun, 21 Sep 2025 19:09:11 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-qk1-f181.google.com (mail-qk1-f181.google.com [209.85.222.181]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cVG4l0rWHz3Q31 for ; Sun, 21 Sep 2025 19:09:11 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-qk1-f181.google.com with SMTP id af79cd13be357-84ab207c37cso12180085a.2 for ; Sun, 21 Sep 2025 12:09:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1758481750; x=1759086550; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=f+Dk329eAv3xaaweZyTZsjwgU5MulD61ye9iEdIC230=; b=Z2TxeXGMRLwooqw8f+fj3AEkDGCSO0wf9SOgMUAQbvDfkLhl4iTzutnuYL8SwixNZb whySD7rVKFapVXyKZaEQNrBrTCxNgyCNZZpefHo05GVQQOj+m2ImU2x3Zc09o0O0G+Ib BVWhyYjuae5fpron9mgKhtBiG/V8hBxt6J6l8wGSeNOH/V9Tqvg8sw9lS6E/eucotyex QYmqXbVywozQ5A/T2t8CUgDboemGNJb6Il8H+YCtrJiYJKKuZntnN5zPR57XO/HqZ5j5 89incbfJ3hk8m418f4sEHPmYQjf83G3PTGaxhyqRcvty2AQQBwjThXn0qo9yb+69qdos 7cBg== X-Forwarded-Encrypted: i=1; AJvYcCUlCQvfe6Z2dZswlpkSLspnjOljLeGv4rBD48XiR7sUA+kRtUV0bvmPr2a9ZVJxzK+TiWlSE/Wm60xpv+X8EfsZ1d53NA==@freebsd.org X-Gm-Message-State: AOJu0Yx35ZfwSgPDpCVpr9Z/eipEphChZKi6QOYwqsHxSX5qj9EwhlEa FimDZEmOC6xFtH5Q3AeNL8FGXMjQfcYM0wK6PWWMH5efex85V/jqR+YGsNA3wb7U7iGG6e0RSeq 6lgJVM3vE/6NBxmJ51FIFLQwb5rXOS5o= X-Gm-Gg: ASbGncucHqBfsklbNxAtovtmmIJb/xNLYpDujaFiEIf260HHC1EzWNgOYVNvB1E7EWi KLsXdREuKjg5vom0i2AU+9fZ5vwQM6ubdzVqs0EriyJHHIYOT/2TNpX2UQ07IM9IzAYhCLB+8Yf /OMfZN5HEdKgIRH2rm91GFH+m+jqa95QtpF6SPT0wQktb89Cn8v7oxVk4pExOK2JlLbeUMEj1Vr OjyM1I= X-Google-Smtp-Source: AGHT+IFQNSkxiZEhNOnR1WW4D23gQxO0Cv82VDI2vBzhyhOmMG9kJAbPR8E0NxkVnvybERBpZ6eXIG4OWhzhb8m1NiQ= X-Received: by 2002:a05:620a:4393:b0:82a:8f4c:2d27 with SMTP id af79cd13be357-83baa616f30mr1223660885a.40.1758481750310; Sun, 21 Sep 2025 12:09:10 -0700 (PDT) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 References: <202509200047.58K0lcgE017026@gitrepo.freebsd.org> In-Reply-To: From: Adrian Chadd Date: Sun, 21 Sep 2025 12:08:58 -0700 X-Gm-Features: AS18NWAp0cSmze08pbMdjPXgvSTezTUBUSSCVNGd8GPFSAcH-2QSituJHKoXEnI Message-ID: Subject: Re: git: 785edcc2af5a - main - net80211: convert the rest of the native net80211 drivers to SEQNO_OFFLOAD To: Gleb Smirnoff Cc: bz@freebsd.org, src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="00000000000012458b063f5470ab" X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; TAGGED_FROM(0.00)[] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4cVG4l0rWHz3Q31 --00000000000012458b063f5470ab Content-Type: text/plain; charset="UTF-8" On Sun, 21 Sept 2025 at 11:09, Gleb Smirnoff wrote: > On Sun, Sep 21, 2025 at 10:24:05AM -0700, Adrian Chadd wrote: > A> hi! > A> > A> ok, please try: https://reviews.freebsd.org/D52664 > A> > A> that should bring the explicit sequence number assignment back for all > A> iwm(4) NICs, even if firmware then overrides it. > > Yes, applying that on top of unmodified main makes iwm(4) work again. > > Thanks! > Heh, thanks for poking me about it so quickly :-) -adrian --00000000000012458b063f5470ab Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Sun, 21 Sept= 2025 at 11:09, Gleb Smirnoff <gl= ebius@freebsd.org> wrote:
On Sun, Sep 21, 2025 at 10:24:05AM -0700, Adrian Chadd wro= te:
A> hi!
A>
A> ok, please try: https://reviews.freebsd.org/D52664
A>
A> that should bring the explicit sequence number assignment back for al= l
A> iwm(4) NICs, even if firmware then overrides it.

Yes, applying that on top of unmodified main makes iwm(4) work again.

Thanks!

Heh, thanks for poking me about= it so quickly :-)



-= adrian
--00000000000012458b063f5470ab-- From nobody Sun Sep 21 19:17:15 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cVGG63yB0z67qS7; Sun, 21 Sep 2025 19:17:18 +0000 (UTC) (envelope-from madpilot@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cVGG637m0z3QXP; Sun, 21 Sep 2025 19:17:18 +0000 (UTC) (envelope-from madpilot@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758482238; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=FxTThHbm7EyHQrZOIpcyAnh33A8o30JEiV4sxPXkFus=; b=Bm5tJex59J8NllNxECjn8MJnnj+m0eRHQLvEGi/vsoVsuPdA4GqqzdbSHz53tFBxGCXCaV WjN6UBKQKz/V5q2NV1jqf5qvtYSf3ksHLZANmCHiUqvWuvNfH03wRKd+THB7yoBZ1prcF3 DsXW9DiO98gZgi6g+F4HO4zYtLE3ryL6SvT/l3wq3fYwtTjr299RCIoRqE/PyDdiRwe3bX /ranBA+KXB3/9fDBw2hpsM4X8gN35/eXTybrf2QGi7MtK7AXFpOwDBNskqDmRTP1WdxB+a leaV19LqVURmEmw4Epxky4oW0YC6QKzNWb95tXBM2p9KLubnBR9JYsDIpwK0OQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758482238; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=FxTThHbm7EyHQrZOIpcyAnh33A8o30JEiV4sxPXkFus=; b=Orm2byBYuPY2iqgyizQDodYv2JACD7Cx8pnyQ8YhBUWML4YHVwk8EZh6zYd69KQ2h7Gcrr eFYpSWgrzkxYFWiMLoc9UHfS//OQh2F3KR8hJc8EbYZ06CNELbcZVb5vsVzU2ob7Mlrooq B44wc4OGsnbp31HwabFscvr4txaPC7vC0/LyiABMdVftMeMCKWCbGT+QwEaPHp6hrsei9C wHK1yuLscO57d4HoLUQknX2CfNo8gtOnM6ncad6LNGAJyYAypcbbuVFU/QYDW8DuUOEMO+ M4SXWYusphYDIMkQTS5nHpqUW3vvm4rc/m16yaqU2L5fvc3apC00FJWCRFMZPw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758482238; a=rsa-sha256; cv=none; b=OPqUyYxy2hc37RPDmCAnLO/XyTyad+jWsYmHe2Jvv/qBvccG5hWK/xzyuFtY1rkt4m7ArJ uZF7tkAjTlPZTZjbxyr1SD6KSYv89SgNcLoP/cSY0sSMiC3gqBpQSK2fqVTOZuvvWOEDBJ 4B9zpn0l8tCUl2DRF2l+fTp+KrJoBdH7hW/6T4QEfqOQCSwD2lL5Dp+dIsv79N62UhoTub Go/X6wXWDZdX89UkKhyk0BFwKh17sFvPFzdKO2Pjdd15llEWHC5hShlIH5b8JY09n9gbKH Wt0dSVHFfe7UULC18CNDhd21Ic/BomlHZ9xZ8WflffvV33pFebu0FwDprc8iOA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from [IPV6:2a01:e11:2002:4280:ab9b:8bf1:ec36:413a] (unknown [IPv6:2a01:e11:2002:4280:ab9b:8bf1:ec36:413a]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: madpilot/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4cVGG55DlPzCrh; Sun, 21 Sep 2025 19:17:17 +0000 (UTC) (envelope-from madpilot@FreeBSD.org) Message-ID: <909b3e33-0639-4abc-915f-073cd0f304da@FreeBSD.org> Date: Sun, 21 Sep 2025 21:17:15 +0200 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 31ec8b6407fd - main - sys/netinet6: Implement RFC 7217 To: Gleb Smirnoff Cc: "Herbert J. Skuhra" , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202509201231.58KCVqBC047480@gitrepo.freebsd.org> <874iswhip4.wl-herbert@gojira.at> <07503de1-785e-4e4d-b4e4-0524aeb064e1@FreeBSD.org> <87jz1sc9fr.wl-herbert@gojira.at> <31da7dd5-ae67-4fb4-aa47-81e57f460c9d@FreeBSD.org> Content-Language: en-US From: Guido Falsi Autocrypt: addr=madpilot@FreeBSD.org; keydata= xsBNBE+G+l0BCADi/WBQ0aRJfnE7LBPsM0G3m/m3Yx7OPu4iYFvS84xawmRHtCNjWIntsxuX fptkmEo3Rsw816WUrek8dxoUAYdHd+EcpBcnnDzfDH5LW/TZ4gbrFezrHPdRp7wdxi23GN80 qPwHEwXuF0X4Wy5V0OO8B6VT/nA0ADYnBDhXS52HGIJ/GCUjgqJn+phDTdCFLvrSFdmgx4Wl c0W5Z1p5cmDF9l8L/hc959AeyNf7I9dXnjekGM9gVv7UDUYzCifR3U8T0fnfdMmS8NeI9NC+ wuREpRO4lKOkTnj9TtQJRiptlhcHQiAlG1cFqs7EQo57Tqq6cxD1FycZJLuC32bGbgalABEB AAHNIkd1aWRvIEZhbHNpIDxtYWRwaWxvdEBGcmVlQlNELm9yZz7CwHgEEwECACIFAk+G+3MC GwMGCwkIBwMCBhUIAgkKCwQWAgMBAh4BAheAAAoJEBrmhg5Wy9KT2uIIAIrawQ89TnqEhi2C OEQAhx3uqWZuNoS6NyiSgsRCmtSnT2GOgH4Ucbr/I37SkV1B3K6HkoL6lwN8Gjf5KOgLqmTi E1W3RTwS7l8PSvdnjM9i7g351R4mTijtxawB/JcQf/Kge3Yqr1V4g6H+wQXHUStmHThbupuN trzRphvR/e5ekT0FTyVfPmpcbm68i2bwZnKUex/TNIECBykYh8b+SYMLhENf2ayRjCIWS2Ad 7tnTKhMtnS5jtW6qjBy4RoTpQD6oR1xIgkTRlQ49roVCUfdHb+Y/kh+U9G1IcoNy4vkg9IfP dwpSfnP+a8j0AZ1hMnOLZ1fYoQrs+4gVLy8Fs7TOwU0EUxB7QQEQAKFhrDceoPdK/IHDSmoj 6SQYisvM7VdhcleS7E9DoEAVt7yMbf6HbbMVTTY6ckvwTWQssywLBXNVqxgc4WLJjzfUhgef +WE75M3+WFYlOVQLGZY/zEVgma1raYnOHNAOzeHLDmEXjbZP6vGAeDyBbGfQPpE7qGYZ7ube T3XwQO+PklcCrvOPj2ZPcAxGNS2xVU/LzONqCrJqLMJSIcCdsbiSP4G5PnDFHtMokaTY6OEr 8OEQfOAerhcHUa/z7Uu8YtmaqKH+QGkE/WEgaRqSiTnv0JOTD+DxehaqvoKPPZ++2NpCZMHB 2i6A/xifmQwEiIjEXtcueBRzkNUQkxhqZyS13SrhocL9ydtaVPBzZatAEjUDDEJmAMLVFs45 qfyhMiNapHJo2n3MW/E5omqCvEkDdWX/en3P7CK2TemeaDghMsgkNKax/z0wNo5UZCkOPOz0 xpNiUilOVbkuezZZNg65741qee2lfXhQIaZ66yT7hphc/N/z3PIAtLeze4u1VR2EXAuZ2sWA dlKCNTlJMsaU/x70BV11Wd/ypnVzM68dfdQIIAj1iMFAD/lXGlEUmKXg5Ov2VQDlTntQoanC YrAg+8CttPzjrydgLZFq3hrtQmfc0se5yv1WHS69+BsUOG09RvvawUDZxUjW19kyeN9THaNR gow3kSuArUp6zSmJABEBAAHCwF8EGAEIAAkFAlMQe0ECGwwACgkQGuaGDlbL0pMN5wgA4bCk X/qwEVC06ToeR6C2putmSWQMgpDaqrv65Hubo+QGmg2P4ewTYQQ4g6oYWS03qHxqVVWhKz7F jfrV+dH8qbCLfSgIcvdBha7ayGZVrsiuMLKGbw36fcmkZPpSDOfHcP0XH8Z+u9CWj0xUkTxA lZ/7i6gYSUpG2JWNtdmE/X8VVEyXusCLwy0K0BI60A/4dRTIX3C4QKrJ3ZbUXegz70ynjHf+ lQMZ9IZKASoRMuS5FozPQh6abvmwZEPdf5I9riUElzvHrqJ8Bx0t3Pujdoth+yNHpnBxrtO8 LkQdrQ58P0SwcaIX33T2U9pG8bhu5YVR88FQ8OQ0cEsPBpDncg== In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 9/21/25 20:56, Gleb Smirnoff wrote: > On Sun, Sep 21, 2025 at 06:02:24PM +0200, Guido Falsi wrote: > G> A C program would have included the system include and noticed the change, > G> but this software has hardcoded the struct in go code and requires > G> patching. > G> > G> I'm attaching a simple patch for the ports tree for this port, it compiles > G> but I've not tested it at runtime, could you try applying this patch to the > G> ports tree and recompile the port, and report back? > G> > G> Please note this is not a proper patch for the ports tree, it just fixes > G> the problem, but would break it for anyone else, I'll produce a proper > G> patch for the ports tree once I have confirmed the approach woks. > > Is struct nd_ifinfo something that is used as argument to ioctl(2)? > If so, then adding counter_u64_t into it is not correct. > > I would suggest to not revert the change as a whole, but remove the > counter only and bring struct nd_ifinfo back to original. The counter > should probably go into struct in6_ifextra that is pointed by > if->if_afdata[AF_INET6]. Thanks for the feedback and suggestion! You are definitely right! I'm in the process to create a review for such a change shortly, I'll post it as soon as I'm able to have the code tested. -- Guido Falsi From nobody Sun Sep 21 22:36:41 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cVLh96CJMz685kg; Sun, 21 Sep 2025 22:36: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 4cVLh95VZ4z3nW5; Sun, 21 Sep 2025 22:36:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758494201; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BewbwyR0DlqH2sCug3Q1V8YM2tyS2vm2BKcfDRRJc94=; b=C1qf44mAOARUlNyEzhSQDbQiD7Nkj0o72mvIkrMCFxpDMRZXpY8QrqJ1aOY/nnIuOYNZOA hYVcpATnOz50E7k2Uc/38Xf+ed5993JFTbLFExxctx2zWiMrEmt7GyWGRma2U1FygW4AHn PM1fYJxHjQ6e+P28R4rokqchN7teOjsjs56QeFhAyQDsmIqQwMK0wp5uX+rR897yIv1HfK Z/QLjO40MOcSobenRhiXo4KlPn3UCrfzBrQVKjE28gdv17fJr01+tylC5AVNnMXmJ1Sz4z v9kn4I4zkr7jRhSGUGMM+SF95gT6TY7GEH5XMF3xi4/JkYnfA00eykRmJZuZBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758494201; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BewbwyR0DlqH2sCug3Q1V8YM2tyS2vm2BKcfDRRJc94=; b=Ll9CwF0NS+SfL+puBypckpG/miqXaJ0WWZmb9C2SUvEcGwJiFupZgiHSgDb1OxG4cUhG1J BAW8AyAOioP+ECtL6wYYUpzrSSaT8YYQWHDNHwUYf3obxIeUMlqNN/QkLEnJziFXlaSr3C xe4l4ha73ivXCX9NOeElz4QqSDFOJu0YGud0p7iqjJeGTuP0a8SBNH5kh23JxLsZu83xHt BQLFQYeLQDz8eumquGH45j1YYJf0ljXHobRhWuHUDzgRgUFkAMQ/BC7csjXw+8evKG1bA2 mrJBq4u//gQxDEQNpM9hwMU9QkcSUJYPMJpAuDXTl+BydMVYhpXbt9Xhxk0HPg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758494201; a=rsa-sha256; cv=none; b=I/+VtbMwNZAct+bA+pjwykjXu/yqqDWETILZG0sz0k55S1sW20ZfkiovTt1j9xCcW6ipeS edtgBycPGLxtDByORpeO7R5RtSJFT0zG0HAMda+DtyDl1Wluk/hGnzE3GysLcuP99xkLda hV2nDkvIGxbYL2+ZtTppxxQ0Y6DZFoa8bed9e/JRJhyTxeIK+oEB+nfzjI1W1YWptqTkTh dU1I/h1oXaiQoL9hUE2XDjoA13XMwbIrR3gh3P/NXgwQF1HkbvJyglQ/w5trVH6eGlhF0F 0CAYe5P3xbFuOYK+1ky8MSlIGZmdZCAK2U4a7U+FlIUJ4Vepe42DlVW5ppPGOg== 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 4cVLh94gsdzYr9; Sun, 21 Sep 2025 22:36: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 58LMafS0081717; Sun, 21 Sep 2025 22:36:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58LMafnt081714; Sun, 21 Sep 2025 22:36:41 GMT (envelope-from git) Date: Sun, 21 Sep 2025 22:36:41 GMT Message-Id: <202509212236.58LMafnt081714@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Enji Cooper Subject: git: 52c4b76d1dd3 - main - crypto/openssl: fix importing new versions from pristine trees List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 52c4b76d1dd385fbe33b78172e39a10749b83d13 Auto-Submitted: auto-generated The branch main has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=52c4b76d1dd385fbe33b78172e39a10749b83d13 commit 52c4b76d1dd385fbe33b78172e39a10749b83d13 Author: Enji Cooper AuthorDate: 2025-09-17 05:57:32 +0000 Commit: Enji Cooper CommitDate: 2025-09-21 22:36:24 +0000 crypto/openssl: fix importing new versions from pristine trees Prior to this change, CC was not being passed through to Configure, which was resulting in failures when Configure was running compiler checks. Pass through CC via `WRK_ENV` to Configure so the compiler is defined properly as part of the initial build. MFC after: 1 month Fixes: d18058b7b850 ("crypto/openssl: apply polish to new vendor import process") Differential Revision: https://reviews.freebsd.org/D52595 --- crypto/openssl/BSDmakefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/crypto/openssl/BSDmakefile b/crypto/openssl/BSDmakefile index 514c87ae3a8e..d260808ffac3 100644 --- a/crypto/openssl/BSDmakefile +++ b/crypto/openssl/BSDmakefile @@ -12,7 +12,9 @@ LCRYPTO_SRC= ${SRCTOP}/crypto/openssl LCRYPTO_DOC= ${LCRYPTO_SRC}/doc CAT?= /bin/cat +CC?= cc GMAKE?= gmake +LD?= ld MV?= /bin/mv PERL?= perl SETENVI= /usr/bin/env -i @@ -26,10 +28,13 @@ CONFIGURATION_H_ORIG= ${CONFIGURATION_H}.orig .ORDER: configure patch all LOCALBASE= /usr/local -WRK_ENV= PATH=${LOCALBASE}/bin:/bin:/usr/bin +WRK_ENV= CC=${CC} \ + LD=${LD} \ + PATH=${LOCALBASE}/bin:/bin:/usr/bin configure: @(cd ${.CURDIR} && ${SETENVI} \ + ${WRK_ENV} \ ${PERL} ./Configure \ disable-aria \ disable-egd \ From nobody Sun Sep 21 23:00:42 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cVMCz4KLkz687GP; Sun, 21 Sep 2025 23:00:47 +0000 (UTC) (envelope-from glebius@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cVMCz3nsCz3rJC; Sun, 21 Sep 2025 23:00:47 +0000 (UTC) (envelope-from glebius@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758495647; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=MjyrDH/EMziLBHeQ3tceZDwIiA4ZndGBrxyTbEhFTKA=; b=luber+Yo/GPn8E7AQPn3NaAy5gmyJiEhkecUwF+BLsMaLjW02f7R6xs7dnebsCFvWZrdYL qudcGg+vn4OLMDekV5MsGITlEB6bjuBI3rA2AUFd58t1fRYFaNDGgNWTYINjQNr2oozSCw UHXpmLg/6HACDF/DiQ7FkspspH8awMOzxVohof9lU/CpASL4ynigAEKOLOI54PJewaRCp0 /xlMDU0AL0D6TSnHo89SMmft7E/7gtmppif/iGVprF8wb/5bBulpL8gMnFmLkReelABRNU ZPgxYG2Ejk5/BNmCPNO5wDr8JpMDUG2jjGrLA/BmdJ0dpEKkCmz5At0AUShN1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758495647; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=MjyrDH/EMziLBHeQ3tceZDwIiA4ZndGBrxyTbEhFTKA=; b=Dzmu05/QOTcAAdMyPkGaIdqk8zyRlgANob8y/h46vgeJZNWsBCbLEHKEEpxxFcMZljxHEb uDkFDuwpZGndMyja2c1+Nv4tuGvNjlGAkmDH/urkO+DxASnKxSk6qMS2H0BPFuJuFOmjVf +K7c9mEd0N0rj0Hy0r21WimG+1VKSbBUhvYHlniRW1POkDqMfdCQ6LwyqKDtNVS+Yth+9Q +6Wm0+A7QhO8H/qC1d3PIrWQoa/sfXcXMrai6A/32/hSanFe5j+dY9PUcaThIPgU4N2GH1 sDiH0+a75Zz8MALalFtuwBHpnsdccNABM9C55DR+kjMGw7aR/CWJnWUC4Ljtsg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758495647; a=rsa-sha256; cv=none; b=nyCRbhthwo873nzQ4VqeALSMUFFGzQRABr2/Lh8qJheFEnDwHFDuPivcX4lyUoQr6NlK8a VuHeccVJt6jGbtkOETht9UNXLMomxlERikeXC3pMeDOFe9rDtTRbzr2hlNbzzFdetFYpdP i65MkJOUEnW5HcZVP9cu6+GwZapWpvdz5l/qMoSaIRgibX0MfZg8I2HfaAJeb9VpIy9fEu U5KieaksbCUF6ww2kiIwCXgdNQx9krYGMQVWlr7RxMiN+r3otrXthJjHeZl3QXHZT0BUb3 20dzSD2nfkjS0IgeMNva70BChLeJcKuBO8c58VtXl97Y0f8/+B2oRrTQsWrHbA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from cell.glebi.us (glebi.us [162.251.186.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: glebius) by smtp.freebsd.org (Postfix) with ESMTPSA id 4cVMCy49ZKzHyk; Sun, 21 Sep 2025 23:00:46 +0000 (UTC) (envelope-from glebius@freebsd.org) Date: Sun, 21 Sep 2025 16:00:42 -0700 From: Gleb Smirnoff To: Guido Falsi Cc: "Herbert J. Skuhra" , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 31ec8b6407fd - main - sys/netinet6: Implement RFC 7217 Message-ID: References: <202509201231.58KCVqBC047480@gitrepo.freebsd.org> <874iswhip4.wl-herbert@gojira.at> <07503de1-785e-4e4d-b4e4-0524aeb064e1@FreeBSD.org> <87jz1sc9fr.wl-herbert@gojira.at> <31da7dd5-ae67-4fb4-aa47-81e57f460c9d@FreeBSD.org> <909b3e33-0639-4abc-915f-073cd0f304da@FreeBSD.org> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <909b3e33-0639-4abc-915f-073cd0f304da@FreeBSD.org> On Sun, Sep 21, 2025 at 09:17:15PM +0200, Guido Falsi wrote: G> > Is struct nd_ifinfo something that is used as argument to ioctl(2)? G> > If so, then adding counter_u64_t into it is not correct. G> > G> > I would suggest to not revert the change as a whole, but remove the G> > counter only and bring struct nd_ifinfo back to original. The counter G> > should probably go into struct in6_ifextra that is pointed by G> > if->if_afdata[AF_INET6]. G> G> Thanks for the feedback and suggestion! G> G> You are definitely right! I'm in the process to create a review for such a G> change shortly, I'll post it as soon as I'm able to have the code tested. As long as Herbert confirms that the patch fixes the issue for him, please consider the change as approved by an src committer and please push it. We want to enter the stabweek that starts tomorrow without a ABI breakage. -- Gleb Smirnoff