From nobody Mon Apr 6 03:49:15 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fpwLP5CNSz6YYgc; Mon, 06 Apr 2026 03:49:17 +0000 (UTC) (envelope-from fluffy@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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fpwLP4YL7z3jR0; Mon, 06 Apr 2026 03:49:17 +0000 (UTC) (envelope-from fluffy@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775447357; 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=cmI/c5C5LoKWhGvuN4O1CrUXj6ujezNtPwgGpEgRGAY=; b=u5x6Wiyub9ufacS+Zg9Xcb09Vbx948qwvMh/tZBG6D4n01x0aNKboBBYUWGveFF3WAD38P cymv5N1tR/1QmClSAjpSgMxLDhN+u9+w8q4b1Ah59i1zKPlHs3L+bgtSOpp+bV7LKN4qmI gYMbFMOhiEebFq+xDOX7XZM1N1sxTHaATJveTOIUOfS58asgo9nS1pkFgfy1L5RyAIrnUD AQYpWuIFqzEndGkc/z/aJShnsj19RnuwnMWXG/xr7b+XSj4JxAoXJKrXrIF23GhB3ba7Np 4YxrTa1OYhoGuhw50H7EiuZ2yFhrx6O9iQzPRI2C8OWM49GglAVkowt8bU7ShQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775447357; a=rsa-sha256; cv=none; b=jQn0wDqDJcfmDiKENYY79okAtqskSIlSVT55Pyw+gLPuNq98ZZmGm9bQ1iIpICT6kITFyy YO6a645hFrdxu7gp5T97nIPSf/qFEYVrCDwsPs6I3ciIhKKtfxnIvzg+KA8L/ErooI3vT8 llYQGfMCA32vMi50mue4UE8ekJdpN9fqWCpcx/w8PXYTJm402YoFSo34RFN7pCodHra9uT XZ+GzeWavW5bb1aJgYkXy3fZAkRkTFpMz1tHSveSfDiXEPxxTfArhKKPqffvHphNF8R/pT Bpa9olT/NDy8PsvGxSLGxT9e1oQD/yzYag3/zz9MaA00E6ZuXY0QDvkqM9XfjA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775447357; 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=cmI/c5C5LoKWhGvuN4O1CrUXj6ujezNtPwgGpEgRGAY=; b=HJHbEVsfCHGSrfQxgrOphoE+VnioKpV7tOJSRo87IFFVPvoqDS+IQbZhqkFGqXPrwIH0Dg MdMclvzhDsnWa9HT+Q+2/1hjoVeeFI1bUAxbEhliHyQgyKkjFrJJnZ7H4f1OOSId9L6zjN JUDfbzIbyUVzZrYbc11rLGGboT43SK89P35G0d/pypNMC1cPSir7ip5tLEWx3FwljlasQC YJF/JjVKIWgmn8YcdJWY13pLK71EoIAprcfO1dVRn7kUHrY9f4pEM6DyCZ/k6Pb20hzkTJ +gyvmfZinLFQqZ929Pvb1KOQDVefgbc7KTZQhtmFNkOg94jEL/uaR+YPxitpYg== Received: from [2a05:3580:e727:cd00::10:0] (unknown [IPv6:2a05:3580:e727:cd00:f12f:a04f:e6c3:f02f]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: fluffy) by smtp.freebsd.org (Postfix) with ESMTPSA id 4fpwLN6QL0ztmY; Mon, 06 Apr 2026 03:49:16 +0000 (UTC) (envelope-from fluffy@FreeBSD.org) Date: Mon, 6 Apr 2026 06:49:15 +0300 From: Dima Panov To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org, Enji Cooper Message-ID: In-Reply-To: <697e7de2.42768.a2d8647@gitrepo.freebsd.org> References: <697e7de2.42768.a2d8647@gitrepo.freebsd.org> Subject: git: f25b8c9fb4f5 - main - openssl: import 3.5.5 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="69d32d3b_6b8b4567_cca2" --69d32d3b_6b8b4567_cca2 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Hello! latest openssl 3.5.x updates in base missed openssl/ml_kem.h include to install Now we have consumers in portstree which use this include if detect openssl>=3.5 Check latest security/libssh: FAILED: [code=1] src/CMakeFiles/ssh.dir/mlkem_crypto.c.o /usr/local/libexec/ccache/cc -DLIBSSH_EXPORTS -I/wrkdirs/usr/ports/security/libssh/work/.build/src -I/wrkdirs/usr/ports/security/libssh/work/libssh-0.12.0/src -I/wrkdirs/usr/ports/security/libssh/work/l /wrkdirs/usr/ports/security/libssh/work/libssh-0.12.0/src/mlkem_crypto.c:31:10: fatal error: 'openssl/ml_kem.h' file not found 31 | #include | ^~~~~~~~~~~~~~~~~~ 1 error generated. stable/15 is also affected On 01.02.2026 01:10, Enji Cooper wrote: > The branch main has been updated by ngie: > > URL: https://cgit.FreeBSD.org/src/commit/?id=f25b8c9fb4f58cf61adb47d7570abe7caa6d385d > > commit f25b8c9fb4f58cf61adb47d7570abe7caa6d385d > Merge: fe81e3944c08 808413da28df > Author: Enji Cooper > AuthorDate: 2026-01-31 22:00:39 +0000 > Commit: Enji Cooper > CommitDate: 2026-01-31 22:00:39 +0000 > > openssl: import 3.5.5 > > This change adds OpenSSL 3.5.5 from upstream [1]. > > The 3.5.5 artifact was been verified via PGP key [2] and by SHA256 checksum [3]. > > This is a security release, but also contains several bugfixes. All of > the CVE-worthy issues have already been addressed on the target > branch(es), so the net-result is that this is a bugfix release. > > More information about the release (from a high level) can be found in > the release notes [4]. > > MFC after: 1 week > > 1. https://github.com/openssl/openssl/releases/download/openssl-3.5.5/openssl-3.5.5.tar.gz > 2. https://github.com/openssl/openssl/releases/download/openssl-3.5.5/openssl-3.5.5.tar.gz.asc > 3. https://github.com/openssl/openssl/releases/download/openssl-3.5.5/openssl-3.5.5.tar.gz.sha256 > 4. https://github.com/openssl/openssl/blob/openssl-3.5.5/NEWS.md > > Merge commit '808413da28df9fb93e1f304e6016b15e660f54c8' > > -- Sincerely, Dima (fluffy@FreeBSD.org, https://t.me/FluffyBSD, @fluffy:matrix-dev.freebsd.org) (desktop, kde, x11, office, ports-secteam)@FreeBSD team --69d32d3b_6b8b4567_cca2 Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline
Hello=21

latest openssl 3.5.x updates in base missed= openssl/ml=5Fkem.h include to install

Now we have consumers in = portstree which use this include if detect openssl>=3D3.5

Che= ck latest security/libssh:

=46AILED: =5Bcode=3D1=5D src/CMake=46= iles/ssh.dir/mlkem=5Fcrypto.c.o
/usr/local/libexec/ccache/cc -DLIBSSH= =5FEXPORTS -I/wrkdirs/usr/ports/security/libssh/work/.build/src -I/wrkdir= s/usr/ports/security/libssh/work/libssh-0.12.0/src -I/wrkdirs/usr/ports/s= ecurity/libssh/work/l
/wrkdirs/usr/ports/security/libssh/work/libssh-= 0.12.0/src/mlkem=5Fcrypto.c:31:10: fatal error: 'openssl/ml=5Fkem.h' file= not found
31 =7C =23include <openssl/ml=5Fkem.h>
=7C =5E= =7E=7E=7E=7E=7E=7E=7E=7E=7E=7E=7E=7E=7E=7E=7E=7E=7E
1 error generated= .


stable/15 is also affected


On 01.02.2026 01= :10, Enji Cooper wrote:
The branch main= has been updated by ngie:

URL: https://cgit.=46reeBSD.org/src/c= ommit/=3Fid=3Df25b8c9fb4f58cf61adb47d7570abe7caa6d385d

commit f2= 5b8c9fb4f58cf61adb47d7570abe7caa6d385d
Merge: fe81e3944c08 808413da28= df
Author: Enji Cooper <ngie=40=46reeBSD.org>
AuthorDate: 2= 026-01-31 22:00:39 +0000
Commit: Enji Cooper <ngie=40=46reeBSD.org= >
CommitDate: 2026-01-31 22:00:39 +0000

openssl: import 3= .5.5

This change adds OpenSSL 3.5.5 from upstream =5B1=5D.
=
The 3.5.5 artifact was been verified via PGP key =5B2=5D and by SHA25= 6 checksum =5B3=5D.

This is a security release, but also contain= s several bugfixes. All of
the CVE-worthy issues have already been ad= dressed on the target
branch(es), so the net-result is that this is a= bugfix release.

More information about the release (from a high= level) can be found in
the release notes =5B4=5D.

M=46C aft= er: 1 week

1. https://github.com/openssl/openssl/releases/downlo= ad/openssl-3.5.5/openssl-3.5.5.tar.gz
2. https://github.com/openssl/o= penssl/releases/download/openssl-3.5.5/openssl-3.5.5.tar.gz.asc
3. ht= tps://github.com/openssl/openssl/releases/download/openssl-3.5.5/openssl-= 3.5.5.tar.gz.sha256
4. https://github.com/openssl/openssl/blob/openss= l-3.5.5/NEWS.md

Merge commit '808413da28df9fb93e1f304e6016b15e66= 0f54c8'



--
Sincerely,
Dima (fluff= y=40=46reeBSD.org, https://t.me/=46luffyBSD, =40fluffy:matrix-dev.freebsd= .org)
(desktop, kde, x11, office, ports-secteam)=40=46reeBSD team
--69d32d3b_6b8b4567_cca2-- From nobody Mon Apr 6 14:11:10 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fqB7y6qqdz6Y5Xv for ; Mon, 06 Apr 2026 14:11: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fqB7y5vXDz3mJy for ; Mon, 06 Apr 2026 14:11:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775484670; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WVdVIwedqwYCHd+x5s6vfgW3FF3rQAJCSOnsrUqq00Y=; b=oC/PL+hmFqRO2paYeta6BUUGX5JNJTZze4Bv1eRfMqgTs51eWeay/SPFu67qep0ZaMB5zJ sCVQfv8eu/Nedq1Or1QVvggRiR8ZKX53ILwOAhrF2MJvMtEieDUv8RRhL3wwSuebqvcVG5 4fLNwmJbwwvDHV95ve2BGLoVbmGzDNDaB3On2qJ/l2FP2/RqLdkVk/yrQyZ8SrQbRQ6GTM YgtSWZmc4TB/VPzXHfwAZCjP5ti2GE0Cp3pYDKQjSMfYNpa49SUepnT8mKG6b0Ns4E1LMI Cgz1c2y/WnOdIjijNn6IfBgIu97ejrx3kbY67F5Ti19eGFoyIsCYyNj04W6HsA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775484670; a=rsa-sha256; cv=none; b=k8/HLNL2qwm3V33EXN0Mi9nG1E5dHtfF/3CEhW06l9LdnLRHnqjO5GP6k7bmVtY0vKgako QqEKp3vmeB3POqUAZwDabSkib8KsbnW2fzgWjJcvciqSoiWffWt0O0xx2YQbAEZ++dCb56 U2czCnr8cM/wnwi1d9vPE5+kvchDa76LPWYZRskWJwOt68X8AIGJaeQ0lEgOuG4XxVGTjA QnT24grXN3FykrKZxAHOhbw1n8/x7X2EiwsiR5euKB+HlAn7jU2F3qSUOZtfn/FWOEh0X5 F5x/ukjRY9MBDUH0q/Q7a5Udu5ABXRzj+qfM5AarZeiXZlF1jzZvZbXHv93QnA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775484670; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WVdVIwedqwYCHd+x5s6vfgW3FF3rQAJCSOnsrUqq00Y=; b=RBIrWmvrCpF3nN8wTL8eoqnmdSGrc+nRn9XVvuAaF4si7p6Mcz3KQgIMu5MD9ln9bXDcIO 24JjOQR5/iCf8E1VRIjzBORmyYdm+2IH1R8rxuAPxMYwIl+vHG9XI4ZhIsbuJ3oEUV7s8G XRYTBs9b3CpzFIFWuKShl3eF5fJg5Iu0+FK2p9sqypHlHG1sQrNBKJIz8pxbWjTy83N3t1 EjqqeD+tGWTbCI/j6bO7tYSt1UDVV5Ds4IWr0JESMZpv5ALfHZJRSGRNyTDGs+jysJpTLS NLfZjE+1UB/vPdtC+FW3ivLQeVsNpN9LlFIDsU+fRYcRaoGqBnO9ks5ZAlRKwQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fqB7y5Tnwzx0q for ; Mon, 06 Apr 2026 14:11:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3a0c8 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 06 Apr 2026 14:11:10 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Rick Macklem Subject: git: e6db4dd9d721 - main - nfsid.h: Put the nfsd_idargs structure in a new .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: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e6db4dd9d7216067388ae91ac73c3917a93f9420 Auto-Submitted: auto-generated Date: Mon, 06 Apr 2026 14:11:10 +0000 Message-Id: <69d3befe.3a0c8.411e4b5@gitrepo.freebsd.org> The branch main has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=e6db4dd9d7216067388ae91ac73c3917a93f9420 commit e6db4dd9d7216067388ae91ac73c3917a93f9420 Author: Rick Macklem AuthorDate: 2026-04-06 14:09:01 +0000 Commit: Rick Macklem CommitDate: 2026-04-06 14:09:01 +0000 nfsid.h: Put the nfsd_idargs structure in a new .h This patch moves the definition of the nfsd_idargs structure out of nfs.h and into a new file called nfsid.h. This is being done so that it can be included in nfs_diskless.c in a future commit. There should be no semantics change from this commit. MFC after: 1 week Fixes: 8b9775912cbc ("nfs_diskless: Add support for an NFSv4 root fs") --- sys/fs/nfs/nfs.h | 23 --------------- sys/fs/nfs/nfs_commonport.c | 1 + sys/fs/nfs/nfs_commonsubs.c | 1 + sys/fs/nfs/nfs_var.h | 1 - sys/fs/nfs/nfsid.h | 67 ++++++++++++++++++++++++++++++++++++++++++++ usr.sbin/nfsuserd/nfsuserd.c | 1 + 6 files changed, 70 insertions(+), 24 deletions(-) diff --git a/sys/fs/nfs/nfs.h b/sys/fs/nfs/nfs.h index 7903542be91d..b30e4f17b7c5 100644 --- a/sys/fs/nfs/nfs.h +++ b/sys/fs/nfs/nfs.h @@ -235,18 +235,6 @@ struct nfscbd_args { u_short port; /* Port# for callbacks */ }; -struct nfsd_idargs { - int nid_flag; /* Flags (see below) */ - uid_t nid_uid; /* user/group id */ - gid_t nid_gid; - int nid_usermax; /* Upper bound on user name cache */ - int nid_usertimeout;/* User name timeout (minutes) */ - u_char *nid_name; /* Name */ - int nid_namelen; /* and its length */ - gid_t *nid_grps; /* and the list */ - int nid_ngroup; /* Size of groups list */ -}; - struct nfsd_oidargs { int nid_flag; /* Flags (see below) */ uid_t nid_uid; /* user/group id */ @@ -391,17 +379,6 @@ struct nfsreferral { #define NFSLCK_WANTBITS \ (NFSLCK_WANTWDELEG | NFSLCK_WANTRDELEG | NFSLCK_WANTNODELEG) -/* And bits for nid_flag */ -#define NFSID_INITIALIZE 0x0001 -#define NFSID_ADDUID 0x0002 -#define NFSID_DELUID 0x0004 -#define NFSID_ADDUSERNAME 0x0008 -#define NFSID_DELUSERNAME 0x0010 -#define NFSID_ADDGID 0x0020 -#define NFSID_DELGID 0x0040 -#define NFSID_ADDGROUPNAME 0x0080 -#define NFSID_DELGROUPNAME 0x0100 - /* * fs.nfs sysctl(3) identifiers */ diff --git a/sys/fs/nfs/nfs_commonport.c b/sys/fs/nfs/nfs_commonport.c index 44fcbe2d5722..dbc2b3b942e9 100644 --- a/sys/fs/nfs/nfs_commonport.c +++ b/sys/fs/nfs/nfs_commonport.c @@ -40,6 +40,7 @@ * to this BSD variant. */ #include +#include #include #include #include diff --git a/sys/fs/nfs/nfs_commonsubs.c b/sys/fs/nfs/nfs_commonsubs.c index 950288027d76..78e2fbb72bdb 100644 --- a/sys/fs/nfs/nfs_commonsubs.c +++ b/sys/fs/nfs/nfs_commonsubs.c @@ -43,6 +43,7 @@ #include "opt_inet6.h" #include +#include #include #include diff --git a/sys/fs/nfs/nfs_var.h b/sys/fs/nfs/nfs_var.h index 145cbf984464..2f81905f6c36 100644 --- a/sys/fs/nfs/nfs_var.h +++ b/sys/fs/nfs/nfs_var.h @@ -119,7 +119,6 @@ int nfsrv_delegupdate(struct nfsrv_descript *, nfsquad_t, nfsv4stateid_t *, vnode_t, int, struct ucred *, NFSPROC_T *, int *); int nfsrv_releaselckown(struct nfsstate *, nfsquad_t, NFSPROC_T *); void nfsrv_zapclient(struct nfsclient *, NFSPROC_T *); -int nfssvc_idname(struct nfsd_idargs *); void nfsrv_servertimer(void * __unused); int nfsrv_getclientipaddr(struct nfsrv_descript *, struct nfsclient *); void nfsrv_setupstable(NFSPROC_T *); diff --git a/sys/fs/nfs/nfsid.h b/sys/fs/nfs/nfsid.h new file mode 100644 index 000000000000..bd9807ca1acc --- /dev/null +++ b/sys/fs/nfs/nfsid.h @@ -0,0 +1,67 @@ +/*- + * SPDX-License-Identifier: BSD-3-Clause + * + * Copyright (c) 1989, 1993 + * The Regents of the University of California. All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Rick Macklem at The University of Guelph. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#ifndef _NFS_NFSID_H_ +#define _NFS_NFSID_H_ + +/* Definitions for id<-->name mapping. */ +struct nfsd_idargs { + int nid_flag; /* Flags (see below) */ + uid_t nid_uid; /* user/group id */ + gid_t nid_gid; + int nid_usermax; /* Upper bound on user name cache */ + int nid_usertimeout;/* User name timeout (minutes) */ + u_char *nid_name; /* Name */ + int nid_namelen; /* and its length */ + gid_t *nid_grps; /* and the list */ + int nid_ngroup; /* Size of groups list */ +}; + +/* And bits for nid_flag */ +#define NFSID_INITIALIZE 0x0001 +#define NFSID_ADDUID 0x0002 +#define NFSID_DELUID 0x0004 +#define NFSID_ADDUSERNAME 0x0008 +#define NFSID_DELUSERNAME 0x0010 +#define NFSID_ADDGID 0x0020 +#define NFSID_DELGID 0x0040 +#define NFSID_ADDGROUPNAME 0x0080 +#define NFSID_DELGROUPNAME 0x0100 +#define NFSID_SYSSPACE 0x0200 + +#if defined(_KERNEL) || defined(KERNEL) +int nfssvc_idname(struct nfsd_idargs *); +#endif + +#endif /* _NFS_NFSID_H */ diff --git a/usr.sbin/nfsuserd/nfsuserd.c b/usr.sbin/nfsuserd/nfsuserd.c index 058253beaf95..9326dd9018e0 100644 --- a/usr.sbin/nfsuserd/nfsuserd.c +++ b/usr.sbin/nfsuserd/nfsuserd.c @@ -50,6 +50,7 @@ #include #include #include +#include #include #include From nobody Mon Apr 6 15:56:36 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fqDTf5W0Pz6YFxV; Mon, 06 Apr 2026 15:56:38 +0000 (UTC) (envelope-from fluffy@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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fqDTf534qz3xv3; Mon, 06 Apr 2026 15:56:38 +0000 (UTC) (envelope-from fluffy@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775490998; 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=2jHa5ayFeGa5ibSc3Mc7MxtmHI7oAHbLGmjMuDG0eXc=; b=Kal5+iYnu1ObZ46+aLFfR9GpRPUdYMsOB4J39ZxaIEDZuz+yqpkBX8/NgzZ5sjvrqZ2poE PLHtVR1Wn5nlSUK8gaPYijTBiki4sxw2xDabW9xktjl+ZfO0xjy2ttgxKsvIjLBD9it3Vh t99+q2zOKdUgUQf3x0hXG5mxf18CWRlppXp3LLjCy2E4ClDawlGTO7lYSrT7ageub1BfQW oVij8r03YwAzwwSv8EAv1bLgqb9behM9gHhMNiaMlEX3sHBRh8ZM0BpFKu+3JmVkksygD7 +SlBPjiRPHoqAIXltlKezfiyEJQF36yqbJkqBg1deFARSi1kgZwSuFANgZDF+Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775490998; a=rsa-sha256; cv=none; b=BSh9cUFJwrK14z/8Nn/ghzdztEsjmn8XNfVaUPkbbmA3V1Fgqp1yh8NW6xhwUNGSpkgOz6 qAmTA5L21eHFV/upZJpaE87jlDei8mJrCJZbg1S3vmY3+OmQJYKD40S92EV0EtLuwg0MCI Evhm2xarq9u73lTHTwFxZoOAQathOXOm/YXQYUm9qZ4F1OtZvFmutJdDsFT3LTECGriNmh 0Atx6oRq4mQ+3RKg1OwXryxJ65XtmldjaHu6n9xIu6FgnpkNqOmFHOLVm3e+9HsFqxPZxw 6IAvOw6sN1+UKX0ym9+pPULhDlorWc/osafUSwI9daLXQdI0vAPU6PZyjIF18A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775490998; 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=2jHa5ayFeGa5ibSc3Mc7MxtmHI7oAHbLGmjMuDG0eXc=; b=M2N1D6GSylwsF1P5Ixw4Ukq9jorEHHURuhNlurEl+YFfSGCvrT600WSuaik1fB48vG4HGt qzRbWhPiXDfEN74s9PSajY06+S2cv4X+iPQwuS7nRLHv1O2F3SrBn2f8hzi4Z64GGVvQK+ Z6Wei+qfwFBpqdSi8rvWxEanlJnTA2azLonfazVb7zomKVBmSv4/Pl2Zfe7WZI+3YkkvwA jzRrUjIVNMNbgN4FcD3ETyvVGyMBos5UAsNznWv4EYQqJsSFJfLyhWS9hlopspunOOMZI4 OY4r8bIv8K7GPz+X6D9G0ch21xRB+0k57mvB5hg6l70zdm2cvB98bQ2F0eYrMA== Received: from [2a05:3580:e727:cd00::10:0] (unknown [IPv6:2a05:3580:e727:cd00:6028:73dc:5e69:9ca0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: fluffy) by smtp.freebsd.org (Postfix) with ESMTPSA id 4fqDTd6MQhz19NT; Mon, 06 Apr 2026 15:56:37 +0000 (UTC) (envelope-from fluffy@FreeBSD.org) Date: Mon, 6 Apr 2026 18:56:36 +0300 From: Dima Panov To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org, Konstantin Belousov Message-ID: <1f2ad4f0-a4ab-4f15-a779-5f1a6db9912b@FreeBSD.org> In-Reply-To: <69caafbb.408c4.7b20a1e1@gitrepo.freebsd.org> References: <69caafbb.408c4.7b20a1e1@gitrepo.freebsd.org> Subject: git: 3a01e1e1a50c - main - msun/aarch64: convert fenv functions to proper linkage List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: 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="69d3d7b4_6b8b4567_d4c2" --69d3d7b4_6b8b4567_d4c2 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Hello! This breaks most of libm consumers llvm/flang: =============== FAILED: [code=1] bin/flang-20 : && /usr/local/libexec/ccache/c++ -O2 -pipe -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -isystem /usr/local/include -fPIC -fno-semantic-interposition -fvisibility-inline s-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-s emi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupport ed -fdiagnostics-color -ffunction-sections -fdata-sections -Wno-deprecated-copy -Wno-string-conversion -Wno-ctad-maybe-unsupported -Wno-unused-command-line-argument -Wstring-conversion -Wcover ed-switch-default -Wno-nested-anon-types -O2 -pipe -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -isystem /usr/local/include -DNDEBUG -Wl,--color-diagnostics -Wl,--expor t-dynamic -Wl,-z,origin -Wl,--gc-sections -Xlinker --dependency-file=tools/flang/tools/flang-driver/CMakeFiles/flang.dir/link.d tools/flang/tools/flang-driver/CMakeFiles/flang.dir/driver.cpp.o tools/ flang/tools/flang-driver/CMakeFiles/flang.dir/fc1_main.cpp.o -o bin/flang-20 -L/wrkdirs/usr/ports/devel/llvm20/work-default/.build/./lib -Wl,-rpath,"\$ORIGIN/../lib:/wrkdirs/usr/ports/devel/llvm20/work- default/.build/./lib:/wrkdirs/usr/ports/devel/llvm20/work-default/.build/lib:" -lpthread lib/libflangFrontend.a lib/libflangFrontendTool.a lib/libFortranLower.a lib/libFortranSemantics.a lib/libFo rtranSupport.a lib/libflangPasses.a lib/libHLFIRTransforms.a lib/libFIRTransforms.a lib/libFIROpenACCSupport.a lib/libFlangOpenMPTransforms.a lib/libFIRCodeGen.a lib/libFIRAnalysis.a lib/libFIRB uilder.a lib/libCUFDialect.a lib/libFortranEvaluate.a lib/libFortranParser.a lib/libFortranCommon.a lib/libFortranDecimal.a lib/libFIRSupport.a lib/libHLFIRDialect.a lib/libFIRDialect.a lib/lib FIRDialectSupport.a lib/libCUFAttrs.a lib/libclang-cpp.so.20.1 lib/libMLIR.so.20.1 lib/libLLVM.so.20.1 && : ld: error: undefined symbol: feholdexcept > > > referenced by host.cpp > > > host.cpp.o:(Fortran::evaluate::host::HostFloatingPointEnvironment::SetUpHostFloatingPointEnvironment(Fortran::evaluate::FoldingContext&)) in archive lib/libFortranEvaluate.a ld: error: undefined symbol: fegetenv > > > referenced by host.cpp > > > host.cpp.o:(Fortran::evaluate::host::HostFloatingPointEnvironment::SetUpHostFloatingPointEnvironment(Fortran::evaluate::FoldingContext&)) in archive lib/libFortranEvaluate.a > > > did you mean: fesetenv > > > defined in: /usr/lib/libm.so c++: error: linker command failed with exit code 1 (use -v to see invocation) =============== All of math/py-numpy1 consumers (math/Imath for example): =============== -- Configuring imathnumpy module Traceback (most recent call last): File "/usr/local/lib/python3.11/site-packages/numpy/core/__init__.py", line 24, in from . import multiarray File "/usr/local/lib/python3.11/site-packages/numpy/core/multiarray.py", line 10, in from . import overrides File "/usr/local/lib/python3.11/site-packages/numpy/core/overrides.py", line 8, in from numpy.core._multiarray_umath import ( ImportError: /usr/local/lib/python3.11/site-packages/numpy/core/_multiarray_umath.cpython-311.so: Undefined symbol "feraiseexcept" During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/local/lib/python3.11/site-packages/numpy/__init__.py", line 130, in from numpy.__config__ import show as show_config File "/usr/local/lib/python3.11/site-packages/numpy/__config__.py", line 4, in from numpy.core._multiarray_umath import ( File "/usr/local/lib/python3.11/site-packages/numpy/core/__init__.py", line 50, in raise ImportError(msg) ImportError: =============== On 30.03.2026 20:15, Konstantin Belousov wrote: > The branch main has been updated by kib: > > URL: https://cgit.FreeBSD.org/src/commit/?id=3a01e1e1a50cb9a9594aac2148dc920a6b295428 > > commit 3a01e1e1a50cb9a9594aac2148dc920a6b295428 > Author: Konstantin Belousov > AuthorDate: 2026-03-28 23:13:44 +0000 > Commit: Konstantin Belousov > CommitDate: 2026-03-30 16:57:00 +0000 > > msun/aarch64: convert fenv functions to proper linkage > > namely > fegetexceptflag(3) > fesetexceptflag(3) > feraiseexcept(3) > fetestexcept(3) > fegetround(3) > fesetround(3) > fegetenv(3) > feholdexcept(3) > fesetenv(3) > feupdateenv(3) > feenableexcept(3) > fedisableexcept(3) > fegetexcept(3) > > PR: 277958 > Reviewed by: dim > Sponsored by: The FreeBSD Foundation > MFC after: 1 week > Differential revision: https://reviews.freebsd.org/D56139 > --- > lib/msun/aarch64/fenv.c | 72 ++++++++++++++++++++++++++++++++++++++++--------- > lib/msun/aarch64/fenv.h | 41 +++++++++++++++++++++------- > 2 files changed, 90 insertions(+), 23 deletions(-) > > diff --git a/lib/msun/aarch64/fenv.c b/lib/msun/aarch64/fenv.c > index 4c54656be7d3..5d626f66516f 100644 > --- a/lib/msun/aarch64/fenv.c > +++ b/lib/msun/aarch64/fenv.c > @@ -44,16 +44,62 @@ int > return (__feclearexcept_int(excepts)); > } > > -extern inline int fegetexceptflag(fexcept_t *__flagp, int __excepts); > -extern inline int fesetexceptflag(const fexcept_t *__flagp, int __excepts); > -extern inline int feraiseexcept(int __excepts); > -extern inline int fetestexcept(int __excepts); > -extern inline int fegetround(void); > -extern inline int fesetround(int __round); > -extern inline int fegetenv(fenv_t *__envp); > -extern inline int feholdexcept(fenv_t *__envp); > -extern inline int fesetenv(const fenv_t *__envp); > -extern inline int feupdateenv(const fenv_t *__envp); > -extern inline int feenableexcept(int __mask); > -extern inline int fedisableexcept(int __mask); > -extern inline int fegetexcept(void); > +int > +(fegetexceptflag)(fexcept_t *flagp, int excepts) > +{ > + return (__fegetexceptflag_int(flagp, excepts)); > +} > + > +int > +(fesetexceptflag)(const fexcept_t *flagp, int excepts) > +{ > + return (__fesetexceptflag_int(flagp, excepts)); > +} > + > +int > +(feraiseexcept)(int excepts) > +{ > + return (__feraiseexcept_int(excepts)); > +} > + > +int > +(fetestexcept)(int excepts) > +{ > + return (__fetestexcept_int(excepts)); > +} > + > +int > +(fegetround)(void) > +{ > + return (__fegetround_int()); > +} > + > +int > +(fesetround)(int round) > +{ > + return (__fesetround_int(round)); > +} > + > +int > +(fegetenv)(fenv_t *envp) > +{ > + return (__fegetenv_int(envp)); > +} > + > +int > +(feholdexcept)(fenv_t *envp) > +{ > + return (__feholdexcept_int(envp)); > +} > + > +int > +(fesetenv)(const fenv_t *envp) > +{ > + return (__fesetenv_int(envp)); > +} > + > +int > +(feupdateenv)(const fenv_t *envp) > +{ > + return (__feupdateenv_int(envp)); > +} > diff --git a/lib/msun/aarch64/fenv.h b/lib/msun/aarch64/fenv.h > index d125978b887b..32a03ee1eb49 100644 > --- a/lib/msun/aarch64/fenv.h > +++ b/lib/msun/aarch64/fenv.h > @@ -82,7 +82,28 @@ extern const fenv_t __fe_dfl_env; > #define __msr_fpsr(__r) __asm __volatile("msr fpsr, %0" : : "r" (__r)) > > int feclearexcept(int); > +int fegetexceptflag(fexcept_t *, int); > +int fesetexceptflag(const fexcept_t *, int); > +int feraiseexcept(int); > +int fetestexcept(int); > +int fegetround(void); > +int fesetround(int); > +int fegetenv(fenv_t *); > +int feholdexcept(fenv_t *); > +int fesetenv(const fenv_t *); > +int feupdateenv(const fenv_t *); > + > #define feclearexcept(a) __feclearexcept_int(a) > +#define fegetexceptflag(e, a) __fegetexceptflag_int(e, a) > +#define fesetexceptflag(e, a) __fesetexceptflag_int(e, a) > +#define feraiseexcept(a) __feraiseexcept_int(a) > +#define fetestexcept(a) __fetestexcept_int(a) > +#define fegetround() __fegetround_int() > +#define fesetround(a) __fesetround_int(a) > +#define fegetenv(e) __fegetenv_int(e) > +#define feholdexcept(e) __feholdexcept_int(e) > +#define fesetenv(e) __fesetenv_int(e) > +#define feupdateenv(e) __feupdateenv_int(e) > > __fenv_static inline int > __feclearexcept_int(int __excepts) > @@ -96,7 +117,7 @@ __feclearexcept_int(int __excepts) > } > > __fenv_static inline int > -fegetexceptflag(fexcept_t *__flagp, int __excepts) > +__fegetexceptflag_int(fexcept_t *__flagp, int __excepts) > { > fexcept_t __r; > > @@ -106,7 +127,7 @@ fegetexceptflag(fexcept_t *__flagp, int __excepts) > } > > __fenv_static inline int > -fesetexceptflag(const fexcept_t *__flagp, int __excepts) > +__fesetexceptflag_int(const fexcept_t *__flagp, int __excepts) > { > fexcept_t __r; > > @@ -118,7 +139,7 @@ fesetexceptflag(const fexcept_t *__flagp, int __excepts) > } > > __fenv_static inline int > -feraiseexcept(int __excepts) > +__feraiseexcept_int(int __excepts) > { > fexcept_t __r; > > @@ -129,7 +150,7 @@ feraiseexcept(int __excepts) > } > > __fenv_static inline int > -fetestexcept(int __excepts) > +__fetestexcept_int(int __excepts) > { > fexcept_t __r; > > @@ -138,7 +159,7 @@ fetestexcept(int __excepts) > } > > __fenv_static inline int > -fegetround(void) > +__fegetround_int(void) > { > fenv_t __r; > > @@ -147,7 +168,7 @@ fegetround(void) > } > > __fenv_static inline int > -fesetround(int __round) > +__fesetround_int(int __round) > { > fenv_t __r; > > @@ -161,7 +182,7 @@ fesetround(int __round) > } > > __fenv_static inline int > -fegetenv(fenv_t *__envp) > +__fegetenv_int(fenv_t *__envp) > { > __uint64_t fpcr; > __uint64_t fpsr; > @@ -174,7 +195,7 @@ fegetenv(fenv_t *__envp) > } > > __fenv_static inline int > -feholdexcept(fenv_t *__envp) > +__feholdexcept_int(fenv_t *__envp) > { > fenv_t __r; > > @@ -191,7 +212,7 @@ feholdexcept(fenv_t *__envp) > } > > __fenv_static inline int > -fesetenv(const fenv_t *__envp) > +__fesetenv_int(const fenv_t *__envp) > { > > __msr_fpcr((*__envp) >> 32); > @@ -200,7 +221,7 @@ fesetenv(const fenv_t *__envp) > } > > __fenv_static inline int > -feupdateenv(const fenv_t *__envp) > +__feupdateenv_int(const fenv_t *__envp) > { > fexcept_t __r; > > -- Sincerely, Dima (fluffy@FreeBSD.org, https://t.me/FluffyBSD, @fluffy:matrix-dev.freebsd.org) (desktop, kde, x11, office, ports-secteam)@FreeBSD team --69d3d7b4_6b8b4567_d4c2 Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline
Hello=21

This breaks most of libm consumers
llvm/flang:
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
=46AIL= ED: =5Bcode=3D1=5D bin/flang-20
: && /usr/local/libexec/ccach= e/c++ -O2 -pipe -fstack-protector-strong -isystem /usr/local/include -fno= -strict-aliasing -isystem /usr/local/include -fPIC -fno-semantic-interpos= ition -fvisibility-inline
s-hidden -Werror=3Ddate-time -Werror=3Dungu= arded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-string= s -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++= 98-compat-extra-s
emi -Wimplicit-fallthrough -Wcovered-switch-default= -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsugges= t-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsu= pport
ed -fdiagnostics-color -ffunction-sections -fdata-sections -Wno= -deprecated-copy -Wno-string-conversion -Wno-ctad-maybe-unsupported -Wno-= unused-command-line-argument -Wstring-conversion -Wcover
ed-switch-de= fault -Wno-nested-anon-types -O2 -pipe -fstack-protector-strong -isystem = /usr/local/include -fno-strict-aliasing -isystem /usr/local/include -DNDE= BUG -Wl,--color-diagnostics -Wl,--expor
t-dynamic -Wl,-z,origin -Wl,-= -gc-sections -Xlinker --dependency-file=3Dtools/flang/tools/flang-driver/= CMake=46iles/flang.dir/link.d tools/flang/tools/flang-driver/CMake=46iles= /flang.dir/driver.cpp.o tools/
flang/tools/flang-driver/CMake=46iles/= flang.dir/fc1=5Fmain.cpp.o -o bin/flang-20 -L/wrkdirs/usr/ports/devel/llv= m20/work-default/.build/./lib -Wl,-rpath,=22=5C=24ORIGIN/../lib:/wrkdirs/= usr/ports/devel/llvm20/work-
default/.build/./lib:/wrkdirs/usr/ports/= devel/llvm20/work-default/.build/lib:=22 -lpthread lib/libflang=46rontend= .a lib/libflang=46rontendTool.a lib/lib=46ortranLower.a lib/lib=46ortranS= emantics.a lib/lib=46o
rtranSupport.a lib/libflangPasses.a lib/libHL=46= IRTransforms.a lib/lib=46IRTransforms.a lib/lib=46IROpenACCSupport.a lib/= lib=46langOpenMPTransforms.a lib/lib=46IRCodeGen.a lib/lib=46IRAnalysis.a= lib/lib=46IRB
uilder.a lib/libCU=46Dialect.a lib/lib=46ortranEvaluat= e.a lib/lib=46ortranParser.a lib/lib=46ortranCommon.a lib/lib=46ortranDec= imal.a lib/lib=46IRSupport.a lib/libHL=46IRDialect.a lib/lib=46IRDialect.= a lib/lib
=46IRDialectSupport.a lib/libCU=46Attrs.a lib/libclang-cpp.= so.20.1 lib/libMLIR.so.20.1 lib/libLLVM.so.20.1 && :
ld: erro= r: undefined symbol: feholdexcept
referenced by host= .cpp
host.cpp.o:(=46ortran::evaluate::host::Host=46loatingPointEnviro= nment::SetUpHost=46loatingPointEnvironment(=46ortran::evaluate::=46olding= Context&)) in archive lib/lib=46ortranEvaluate.a

ld: error: undefined symbol: fegetenv
referenced by host.cpp
host.cpp.o:(=46ortran::evaluate:= :host::Host=46loatingPointEnvironment::SetUpHost=46loatingPointEnvironmen= t(=46ortran::evaluate::=46oldingContext&)) in archive lib/lib=46ortra= nEvaluate.a
did you mean: fesetenv
defined in: /usr/lib/libm.so <= br>
c++: error: linker command fail= ed with exit code 1 (use -v to see invocation)
=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D

All of math/py-numpy1 consumers (math/Imat= h for example):
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
-- = Configuring imathnumpy module
Traceback (most recent call last):
= =46ile =22/usr/local/lib/python3.11/site-packages/numpy/core/=5F=5Finit=5F= =5F.py=22, line 24, in <module>
from . import multiarray
= =46ile =22/usr/local/lib/python3.11/site-packages/numpy/core/multiarray.p= y=22, line 10, in <module>
from . import overrides
=46ile= =22/usr/local/lib/python3.11/site-packages/numpy/core/overrides.py=22, l= ine 8, in <module>
from numpy.core.=5Fmultiarray=5Fumath impor= t (
ImportError: /usr/local/lib/python3.11/site-packages/numpy/core/=5F= multiarray=5Fumath.cpython-311.so: Undefined symbol =22feraiseexcept=22 <= br>
During handling of the above exception, another exception occurre= d:

Traceback (most recent call last):
=46ile =22/usr/local/= lib/python3.11/site-packages/numpy/=5F=5Finit=5F=5F.py=22, line 130, in &= lt;module>
from numpy.=5F=5Fconfig=5F=5F import show as show=5Fco= nfig
=46ile =22/usr/local/lib/python3.11/site-packages/numpy/=5F=5Fc= onfig=5F=5F.py=22, line 4, in <module>
from numpy.core.=5Fmult= iarray=5Fumath import (
=46ile =22/usr/local/lib/python3.11/site-pac= kages/numpy/core/=5F=5Finit=5F=5F.py=22, line 50, in <module>
= raise ImportError(msg)
ImportError:
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D



On 30.03.2026 20:15, Konstantin Belous= ov wrote:
The branch main has been upda= ted by kib:

URL: https://cgit.=46reeBSD.org/src/commit/=3Fid=3D3= a01e1e1a50cb9a9594aac2148dc920a6b295428

commit 3a01e1e1a50cb9a95= 94aac2148dc920a6b295428
Author: Konstantin Belousov <kib=40=46reeB= SD.org>
AuthorDate: 2026-03-28 23:13:44 +0000
Commit: Konstant= in Belousov <kib=40=46reeBSD.org>
CommitDate: 2026-03-30 16:57:= 00 +0000

msun/aarch64: convert fenv functions to proper linkage =

namely
fegetexceptflag(3)
fesetexceptflag(3)
feraise= except(3)
fetestexcept(3)
fegetround(3)
fesetround(3)
feg= etenv(3)
feholdexcept(3)
fesetenv(3)
feupdateenv(3)
feena= bleexcept(3)
fedisableexcept(3)
fegetexcept(3)

PR: 27795= 8
Reviewed by: dim
Sponsored by: The =46reeBSD =46oundation
M= =46C after: 1 week
Differential revision: https://reviews.freebsd.org= /D56139
---
lib/msun/aarch64/fenv.c =7C 72 ++++++++++++++++++++++= ++++++++++++++++++---------
lib/msun/aarch64/fenv.h =7C 41 ++++++++++= +++++++++++-------
2 files changed, 90 insertions(+), 23 deletions(-)=

diff --git a/lib/msun/aarch64/fenv.c b/lib/msun/aarch64/fenv.c =
index 4c54656be7d3..5d626f66516f 100644
--- a/lib/msun/aarch64/fe= nv.c
+++ b/lib/msun/aarch64/fenv.c
=40=40 -44,16 +44,62 =40=40 in= t
return (=5F=5Ffeclearexcept=5Fint(excepts));
=7D

-ext= ern inline int fegetexceptflag(fexcept=5Ft *=5F=5Fflagp, int =5F=5Fexcept= s);
-extern inline int fesetexceptflag(const fexcept=5Ft *=5F=5Fflagp= , int =5F=5Fexcepts);
-extern inline int feraiseexcept(int =5F=5Fexce= pts);
-extern inline int fetestexcept(int =5F=5Fexcepts);
-extern= inline int fegetround(void);
-extern inline int fesetround(int =5F=5F= round);
-extern inline int fegetenv(fenv=5Ft *=5F=5Fenvp);
-exter= n inline int feholdexcept(fenv=5Ft *=5F=5Fenvp);
-extern inline int f= esetenv(const fenv=5Ft *=5F=5Fenvp);
-extern inline int feupdateenv(c= onst fenv=5Ft *=5F=5Fenvp);
-extern inline int feenableexcept(int =5F= =5Fmask);
-extern inline int fedisableexcept(int =5F=5Fmask);
-ex= tern inline int fegetexcept(void);
+int
+(fegetexceptflag)(fexcep= t=5Ft *flagp, int excepts)
+=7B
+ return (=5F=5Ffegetexceptflag=5F= int(flagp, excepts));
+=7D
+
+int
+(fesetexceptflag)(cons= t fexcept=5Ft *flagp, int excepts)
+=7B
+ return (=5F=5Ffesetexce= ptflag=5Fint(flagp, excepts));
+=7D
+
+int
+(feraiseexcep= t)(int excepts)
+=7B
+ return (=5F=5Fferaiseexcept=5Fint(excepts)= );
+=7D
+
+int
+(fetestexcept)(int excepts)
+=7B
= + return (=5F=5Ffetestexcept=5Fint(excepts));
+=7D
+
+int +(fegetround)(void)
+=7B
+ return (=5F=5Ffegetround=5Fint()); +=7D
+
+int
+(fesetround)(int round)
+=7B
+ return = (=5F=5Ffesetround=5Fint(round));
+=7D
+
+int
+(fegetenv)(= fenv=5Ft *envp)
+=7B
+ return (=5F=5Ffegetenv=5Fint(envp));
+= =7D
+
+int
+(feholdexcept)(fenv=5Ft *envp)
+=7B
+ ret= urn (=5F=5Ffeholdexcept=5Fint(envp));
+=7D
+
+int
+(feset= env)(const fenv=5Ft *envp)
+=7B
+ return (=5F=5Ffesetenv=5Fint(en= vp));
+=7D
+
+int
+(feupdateenv)(const fenv=5Ft *envp) +=7B
+ return (=5F=5Ffeupdateenv=5Fint(envp));
+=7D
diff --= git a/lib/msun/aarch64/fenv.h b/lib/msun/aarch64/fenv.h
index d125978= b887b..32a03ee1eb49 100644
--- a/lib/msun/aarch64/fenv.h
+++ b/li= b/msun/aarch64/fenv.h
=40=40 -82,7 +82,28 =40=40 extern const fenv=5F= t =5F=5Ffe=5Fdfl=5Fenv;
=23define =5F=5Fmsr=5Ffpsr(=5F=5Fr) =5F=5Fasm= =5F=5Fvolatile(=22msr fpsr, %0=22 : : =22r=22 (=5F=5Fr))

int fe= clearexcept(int);
+int fegetexceptflag(fexcept=5Ft *, int);
+int = fesetexceptflag(const fexcept=5Ft *, int);
+int feraiseexcept(int); <= br>+int fetestexcept(int);
+int fegetround(void);
+int fesetround= (int);
+int fegetenv(fenv=5Ft *);
+int feholdexcept(fenv=5Ft *); =
+int fesetenv(const fenv=5Ft *);
+int feupdateenv(const fenv=5Ft = *);
+
=23define feclearexcept(a) =5F=5Ffeclearexcept=5Fint(a) +=23define fegetexceptflag(e, a) =5F=5Ffegetexceptflag=5Fint(e, a)
+= =23define fesetexceptflag(e, a) =5F=5Ffesetexceptflag=5Fint(e, a)
+=23= define feraiseexcept(a) =5F=5Fferaiseexcept=5Fint(a)
+=23define fetes= texcept(a) =5F=5Ffetestexcept=5Fint(a)
+=23define fegetround() =5F=5F= fegetround=5Fint()
+=23define fesetround(a) =5F=5Ffesetround=5Fint(a)=
+=23define fegetenv(e) =5F=5Ffegetenv=5Fint(e)
+=23define fehold= except(e) =5F=5Ffeholdexcept=5Fint(e)
+=23define fesetenv(e) =5F=5Ffe= setenv=5Fint(e)
+=23define feupdateenv(e) =5F=5Ffeupdateenv=5Fint(e) =

=5F=5Ffenv=5Fstatic inline int
=5F=5Ffeclearexcept=5Fint(int= =5F=5Fexcepts)
=40=40 -96,7 +117,7 =40=40 =5F=5Ffeclearexcept=5Fint(= int =5F=5Fexcepts)
=7D

=5F=5Ffenv=5Fstatic inline int
-f= egetexceptflag(fexcept=5Ft *=5F=5Fflagp, int =5F=5Fexcepts)
+=5F=5Ffe= getexceptflag=5Fint(fexcept=5Ft *=5F=5Fflagp, int =5F=5Fexcepts)
=7B =
fexcept=5Ft =5F=5Fr;

=40=40 -106,7 +127,7 =40=40 fegetexcep= tflag(fexcept=5Ft *=5F=5Fflagp, int =5F=5Fexcepts)
=7D

=5F=5F= fenv=5Fstatic inline int
-fesetexceptflag(const fexcept=5Ft *=5F=5Ffl= agp, int =5F=5Fexcepts)
+=5F=5Ffesetexceptflag=5Fint(const fexcept=5F= t *=5F=5Fflagp, int =5F=5Fexcepts)
=7B
fexcept=5Ft =5F=5Fr;
=
=40=40 -118,7 +139,7 =40=40 fesetexceptflag(const fexcept=5Ft *=5F=5F= flagp, int =5F=5Fexcepts)
=7D

=5F=5Ffenv=5Fstatic inline int=
-feraiseexcept(int =5F=5Fexcepts)
+=5F=5Fferaiseexcept=5Fint(int= =5F=5Fexcepts)
=7B
fexcept=5Ft =5F=5Fr;

=40=40 -129,7 = +150,7 =40=40 feraiseexcept(int =5F=5Fexcepts)
=7D

=5F=5Ffen= v=5Fstatic inline int
-fetestexcept(int =5F=5Fexcepts)
+=5F=5Ffet= estexcept=5Fint(int =5F=5Fexcepts)
=7B
fexcept=5Ft =5F=5Fr;
=
=40=40 -138,7 +159,7 =40=40 fetestexcept(int =5F=5Fexcepts)
=7D =

=5F=5Ffenv=5Fstatic inline int
-fegetround(void)
+=5F=5F= fegetround=5Fint(void)
=7B
fenv=5Ft =5F=5Fr;

=40=40 -14= 7,7 +168,7 =40=40 fegetround(void)
=7D

=5F=5Ffenv=5Fstatic i= nline int
-fesetround(int =5F=5Fround)
+=5F=5Ffesetround=5Fint(in= t =5F=5Fround)
=7B
fenv=5Ft =5F=5Fr;

=40=40 -161,7 +182= ,7 =40=40 fesetround(int =5F=5Fround)
=7D

=5F=5Ffenv=5Fstati= c inline int
-fegetenv(fenv=5Ft *=5F=5Fenvp)
+=5F=5Ffegetenv=5Fin= t(fenv=5Ft *=5F=5Fenvp)
=7B
=5F=5Fuint64=5Ft fpcr;
=5F=5Fui= nt64=5Ft fpsr;
=40=40 -174,7 +195,7 =40=40 fegetenv(fenv=5Ft *=5F=5Fe= nvp)
=7D

=5F=5Ffenv=5Fstatic inline int
-feholdexcept(fe= nv=5Ft *=5F=5Fenvp)
+=5F=5Ffeholdexcept=5Fint(fenv=5Ft *=5F=5Fenvp) <= br>=7B
fenv=5Ft =5F=5Fr;

=40=40 -191,7 +212,7 =40=40 fehold= except(fenv=5Ft *=5F=5Fenvp)
=7D

=5F=5Ffenv=5Fstatic inline = int
-fesetenv(const fenv=5Ft *=5F=5Fenvp)
+=5F=5Ffesetenv=5Fint(c= onst fenv=5Ft *=5F=5Fenvp)
=7B

=5F=5Fmsr=5Ffpcr((*=5F=5Fenv= p) >> 32);
=40=40 -200,7 +221,7 =40=40 fesetenv(const fenv=5Ft = *=5F=5Fenvp)
=7D

=5F=5Ffenv=5Fstatic inline int
-feupdat= eenv(const fenv=5Ft *=5F=5Fenvp)
+=5F=5Ffeupdateenv=5Fint(const fenv=5F= t *=5F=5Fenvp)
=7B
fexcept=5Ft =5F=5Fr;



--
Sincerely,
Dima (fluffy=40=46reeBSD.org, https://t.me/= =46luffyBSD, =40fluffy:matrix-dev.freebsd.org)
(desktop, kde, x11, of= fice, ports-secteam)=40=46reeBSD team

--69d3d7b4_6b8b4567_d4c2-- From nobody Mon Apr 6 16:07:38 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fqDkf2KDRz6YH1f; Mon, 06 Apr 2026 16:07:54 +0000 (UTC) (envelope-from kib@freebsd.org) 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 4fqDkd3MgXz40Dv; Mon, 06 Apr 2026 16:07:53 +0000 (UTC) (envelope-from kib@freebsd.org) Authentication-Results: mx1.freebsd.org; none Received: from tom.home (kib@localhost [127.0.0.1] (may be forged)) by kib.kiev.ua (8.18.1/8.18.1) with ESMTP id 636G7cVK031264; Mon, 6 Apr 2026 19:07:41 +0300 (EEST) (envelope-from kib@freebsd.org) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 636G7cVK031264 Received: (from kostik@localhost) by tom.home (8.18.1/8.18.1/Submit) id 636G7c08031262; Mon, 6 Apr 2026 19:07:38 +0300 (EEST) (envelope-from kib@freebsd.org) X-Authentication-Warning: tom.home: kostik set sender to kib@freebsd.org using -f Date: Mon, 6 Apr 2026 19:07:38 +0300 From: Konstantin Belousov To: Dima Panov Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org, Konstantin Belousov Subject: Re: git: 3a01e1e1a50c - main - msun/aarch64: convert fenv functions to proper linkage Message-ID: References: <69caafbb.408c4.7b20a1e1@gitrepo.freebsd.org> <1f2ad4f0-a4ab-4f15-a779-5f1a6db9912b@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: <1f2ad4f0-a4ab-4f15-a779-5f1a6db9912b@FreeBSD.org> X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham autolearn_force=no version=4.0.2 X-Spam-Checker-Version: SpamAssassin 4.0.2 (2025-08-27) on tom.home X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US] X-Rspamd-Queue-Id: 4fqDkd3MgXz40Dv X-Spamd-Bar: ---- On Mon, Apr 06, 2026 at 06:56:36PM +0300, Dima Panov wrote: > Hello! > > This breaks most of libm consumers > > llvm/flang: > =============== > FAILED: [code=1] bin/flang-20 > : && /usr/local/libexec/ccache/c++ -O2 -pipe -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -isystem /usr/local/include -fPIC -fno-semantic-interposition -fvisibility-inline > s-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-s > emi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupport > ed -fdiagnostics-color -ffunction-sections -fdata-sections -Wno-deprecated-copy -Wno-string-conversion -Wno-ctad-maybe-unsupported -Wno-unused-command-line-argument -Wstring-conversion -Wcover > ed-switch-default -Wno-nested-anon-types -O2 -pipe -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -isystem /usr/local/include -DNDEBUG -Wl,--color-diagnostics -Wl,--expor > t-dynamic -Wl,-z,origin -Wl,--gc-sections -Xlinker --dependency-file=tools/flang/tools/flang-driver/CMakeFiles/flang.dir/link.d tools/flang/tools/flang-driver/CMakeFiles/flang.dir/driver.cpp.o tools/ > flang/tools/flang-driver/CMakeFiles/flang.dir/fc1_main.cpp.o -o bin/flang-20 -L/wrkdirs/usr/ports/devel/llvm20/work-default/.build/./lib -Wl,-rpath,"\$ORIGIN/../lib:/wrkdirs/usr/ports/devel/llvm20/work- > default/.build/./lib:/wrkdirs/usr/ports/devel/llvm20/work-default/.build/lib:" -lpthread lib/libflangFrontend.a lib/libflangFrontendTool.a lib/libFortranLower.a lib/libFortranSemantics.a lib/libFo > rtranSupport.a lib/libflangPasses.a lib/libHLFIRTransforms.a lib/libFIRTransforms.a lib/libFIROpenACCSupport.a lib/libFlangOpenMPTransforms.a lib/libFIRCodeGen.a lib/libFIRAnalysis.a lib/libFIRB > uilder.a lib/libCUFDialect.a lib/libFortranEvaluate.a lib/libFortranParser.a lib/libFortranCommon.a lib/libFortranDecimal.a lib/libFIRSupport.a lib/libHLFIRDialect.a lib/libFIRDialect.a lib/lib > FIRDialectSupport.a lib/libCUFAttrs.a lib/libclang-cpp.so.20.1 lib/libMLIR.so.20.1 lib/libLLVM.so.20.1 && : > ld: error: undefined symbol: feholdexcept This is strange. Could you show me the output of e.g. readelf --dyn_syms /lib/libm.so.5 | grep feholdexcept The best would be the output from the command like above for each missing symbol. > > > > referenced by host.cpp > > > > host.cpp.o:(Fortran::evaluate::host::HostFloatingPointEnvironment::SetUpHostFloatingPointEnvironment(Fortran::evaluate::FoldingContext&)) in archive lib/libFortranEvaluate.a > > ld: error: undefined symbol: fegetenv > > > > referenced by host.cpp > > > > host.cpp.o:(Fortran::evaluate::host::HostFloatingPointEnvironment::SetUpHostFloatingPointEnvironment(Fortran::evaluate::FoldingContext&)) in archive lib/libFortranEvaluate.a > > > > did you mean: fesetenv > > > > defined in: /usr/lib/libm.so > c++: error: linker command failed with exit code 1 (use -v to see invocation) > =============== > > All of math/py-numpy1 consumers (math/Imath for example): > =============== > -- Configuring imathnumpy module > Traceback (most recent call last): > File "/usr/local/lib/python3.11/site-packages/numpy/core/__init__.py", line 24, in > from . import multiarray > File "/usr/local/lib/python3.11/site-packages/numpy/core/multiarray.py", line 10, in > from . import overrides > File "/usr/local/lib/python3.11/site-packages/numpy/core/overrides.py", line 8, in > from numpy.core._multiarray_umath import ( > ImportError: /usr/local/lib/python3.11/site-packages/numpy/core/_multiarray_umath.cpython-311.so: Undefined symbol "feraiseexcept" > > During handling of the above exception, another exception occurred: > > Traceback (most recent call last): > File "/usr/local/lib/python3.11/site-packages/numpy/__init__.py", line 130, in > from numpy.__config__ import show as show_config > File "/usr/local/lib/python3.11/site-packages/numpy/__config__.py", line 4, in > from numpy.core._multiarray_umath import ( > File "/usr/local/lib/python3.11/site-packages/numpy/core/__init__.py", line 50, in > raise ImportError(msg) > ImportError: > =============== From nobody Mon Apr 6 16:25:18 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fqF6p6l27z6YJ9L; Mon, 06 Apr 2026 16:25:22 +0000 (UTC) (envelope-from fluffy@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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fqF6p6F25z41tZ; Mon, 06 Apr 2026 16:25:22 +0000 (UTC) (envelope-from fluffy@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775492722; 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=YvebGKc+MhxJZ5o7PH3NZdBWiEYnvl70SmymP97XrLM=; b=leSWQs95Vjbvm/D+BDwEOSDtIKS2DH4AzN1ynnoFPfE0rtCjb6QExSllfrVoJ6HAaQ3soQ A0jdXZVIyh+eYtCZ5EBXZtZ3gKgFIhdXEAz6FtAZsSDNeUClNhgxt8E2VQ77dz4hJf8M1s 7AfolwsQAm1BnuJmU4VTL56sqMQ9VcM6YquqPeeJDQ0Dgz8GNH50Xgz38XHMMkzdrOjCFp OguD7a6TPcruFkXPr614/ymU1PcOFFrMEi3Sbq2i+9IKDvbm8m0fLMf5+fN9wg9fpWZOa3 I73gyQwhWv4rdpZ4lhPl5xj8qHd6jjzN3GIjKJWr/JWG7H/vaY6TQUTv/a1SFA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775492722; a=rsa-sha256; cv=none; b=Eq4/MEpQeMyLmXtSY4x/mQ9sgHd1BITCUWYePsp1IQUKdCiQPeRVOdEQSsdgg/yvDirV+B 92JXzhE2fZXcfqJL12elZU5QFvqzzBVt9VqdkKyum7HLS6Ez5Qc7CKkMfClBHB8AQd3zXg KaANHQhqphrchBWF4EGsoEsA+8Hs4TfeY5CNBVZ+M8+C9OECCg/3hDibPVQnjvR4qKoSDF Py5YndwTx2ZoDwPSdHlKpSf3O53cdO5Fb0aP0XNA68XwzoHCTiwbz0YmSil6TnYfouM4GB DXlS6kvFWKj70In0trS7qAmomVYGRrl9ZVY34MbR5ctaMhk7h4NorB22pttPOA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775492722; 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=YvebGKc+MhxJZ5o7PH3NZdBWiEYnvl70SmymP97XrLM=; b=QsmQ2Djf9E7a/WiCweTauk5BK9bdSVWg0DLKKx73qT5XAc78wtRv5F6zHLb7RJvt+D3JdA UFJg6aspqp2zxYieR2xM7/LnpxzGlbxio92/+KXKMo0YRsxJ7sheseB0Uq78TlgJTli9Vz Q5DAk4o+bdVcRpp4Lr6EWG3dmcWkXP6vpXme8FbGFfPlh7/lNuKq48gn31EyHmEZwRDxaz SJhesC2WlEwgjbWGULss1Kvk2FIG7LoLSb/kNG/4vR0zAzmScJznXyQvOdr+W77pa6/9KQ cSEL5ENXL8EWJUl+XsZAKk4+m3b0x60Ktuz/a8SQluaK+wEE5P1nU5S96rVfdQ== Received: from [2a05:3580:e727:cd00::10:0] (unknown [IPv6:2a05:3580:e727:cd00:6028:73dc:5e69:9ca0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: fluffy) by smtp.freebsd.org (Postfix) with ESMTPSA id 4fqF6n6hFsz1Bt2; Mon, 06 Apr 2026 16:25:21 +0000 (UTC) (envelope-from fluffy@FreeBSD.org) Date: Mon, 6 Apr 2026 19:25:18 +0300 From: Dima Panov To: Konstantin Belousov Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Message-ID: <8022afad-9cee-4ade-8b56-ef5b7feb6e16@FreeBSD.org> In-Reply-To: References: <69caafbb.408c4.7b20a1e1@gitrepo.freebsd.org> <1f2ad4f0-a4ab-4f15-a779-5f1a6db9912b@FreeBSD.org> Subject: git: 3a01e1e1a50c - main - msun/aarch64: convert fenv functions to proper linkage List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: 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="69d3de6e_66334873_d4c2" --69d3de6e_66334873_d4c2 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline On 06.04.2026 19:07, Konstantin Belousov wrote: > On Mon, Apr 06, 2026 at 06:56:36PM +0300, Dima Panov wrote: > > Hello! > > > > This breaks most of libm consumers > > > > llvm/flang: > > =============== > > FAILED: [code=1] bin/flang-20 > > : && /usr/local/libexec/ccache/c++ -O2 -pipe -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -isystem /usr/local/include -fPIC -fno-semantic-interposition -fvisibility-inline > > s-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-s > > emi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupport > > ed -fdiagnostics-color -ffunction-sections -fdata-sections -Wno-deprecated-copy -Wno-string-conversion -Wno-ctad-maybe-unsupported -Wno-unused-command-line-argument -Wstring-conversion -Wcover > > ed-switch-default -Wno-nested-anon-types -O2 -pipe -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -isystem /usr/local/include -DNDEBUG -Wl,--color-diagnostics -Wl,--expor > > t-dynamic -Wl,-z,origin -Wl,--gc-sections -Xlinker --dependency-file=tools/flang/tools/flang-driver/CMakeFiles/flang.dir/link.d tools/flang/tools/flang-driver/CMakeFiles/flang.dir/driver.cpp.o tools/ > > flang/tools/flang-driver/CMakeFiles/flang.dir/fc1_main.cpp.o -o bin/flang-20 -L/wrkdirs/usr/ports/devel/llvm20/work-default/.build/./lib -Wl,-rpath,"\$ORIGIN/../lib:/wrkdirs/usr/ports/devel/llvm20/work- > > default/.build/./lib:/wrkdirs/usr/ports/devel/llvm20/work-default/.build/lib:" -lpthread lib/libflangFrontend.a lib/libflangFrontendTool.a lib/libFortranLower.a lib/libFortranSemantics.a lib/libFo > > rtranSupport.a lib/libflangPasses.a lib/libHLFIRTransforms.a lib/libFIRTransforms.a lib/libFIROpenACCSupport.a lib/libFlangOpenMPTransforms.a lib/libFIRCodeGen.a lib/libFIRAnalysis.a lib/libFIRB > > uilder.a lib/libCUFDialect.a lib/libFortranEvaluate.a lib/libFortranParser.a lib/libFortranCommon.a lib/libFortranDecimal.a lib/libFIRSupport.a lib/libHLFIRDialect.a lib/libFIRDialect.a lib/lib > > FIRDialectSupport.a lib/libCUFAttrs.a lib/libclang-cpp.so.20.1 lib/libMLIR.so.20.1 lib/libLLVM.so.20.1 && : > > ld: error: undefined symbol: feholdexcept > > This is strange. Could you show me the output of e.g. > readelf --dyn_syms /lib/libm.so.5 | grep feholdexcept > The best would be the output from the command like above for each missing > symbol. missing :( FreeBSD 16.0-CURRENT #0 main-cf1f21572897: Mon Apr 6 13:45:02 MSK 2026 root@aarch64:/ # readelf --dyn-syms /lib/libm.so.5 | grep feholdexcept root@aarch64:/ # full list of symbols: Symbol table '.dynsym' contains 306 entries: Num: Value Size Type Bind Vis Ndx Name 0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND 1: 0000000000000000 0 FUNC WEAK DEFAULT UND __cxa_finalize@FBSD_1.0 2: 0000000000000000 0 FUNC GLOBAL DEFAULT UND ldexp@FBSD_1.0 3: 0000000000000000 0 OBJECT GLOBAL DEFAULT UND __stack_chk_guard@FBSD_1.0 4: 0000000000000000 0 FUNC GLOBAL DEFAULT UND __stack_chk_fail@FBSD_1.0 5: 0000000000000000 0 FUNC GLOBAL DEFAULT UND __isinf@FBSD_1.0 6: 0000000000000000 0 FUNC GLOBAL DEFAULT UND __isinff@FBSD_1.0 7: 0000000000000000 0 FUNC GLOBAL DEFAULT UND memset@FBSD_1.0 8: 0000000000000000 0 OBJECT GLOBAL DEFAULT UND __mb_sb_limit@FBSD_1.0 9: 0000000000000000 0 TLS GLOBAL DEFAULT UND _ThreadRuneLocale@FBSD_1.3 10: 0000000000000000 0 OBJECT GLOBAL DEFAULT UND _CurrentRuneLocale@FBSD_1.0 11: 0000000000000000 0 FUNC GLOBAL DEFAULT UND __fpclassifyl@FBSD_1.0 12: 0000000000000000 0 FUNC GLOBAL DEFAULT UND __isinfl@FBSD_1.0 13: 000000000003414c 544 FUNC GLOBAL DEFAULT 14 nanf@@FBSD_1.1 14: 0000000000045a78 152 FUNC GLOBAL DEFAULT 14 fminl@@FBSD_1.0 15: 0000000000045b10 156 FUNC GLOBAL DEFAULT 14 fminimuml@@FBSD_1.9 16: 000000000003c104 380 FUNC GLOBAL DEFAULT 14 atanhl@@FBSD_1.3 17: 000000000004adfc 44 FUNC GLOBAL DEFAULT 14 casin@@FBSD_1.3 18: 0000000000037b78 728 FUNC GLOBAL DEFAULT 14 sinpif@@FBSD_1.7 19: 000000000004151c 1256 FUNC GLOBAL DEFAULT 14 cosl@@FBSD_1.1 20: 000000000002eb20 284 FUNC GLOBAL DEFAULT 14 sinhf@@FBSD_1.0 21: 0000000000033c88 96 FUNC GLOBAL DEFAULT 14 logb@@FBSD_1.0 22: 0000000000047544 208 FUNC GLOBAL DEFAULT 14 scalbnl@@FBSD_1.0 23: 00000000000336c4 104 FUNC GLOBAL DEFAULT 14 llroundl@@FBSD_1.0 24: 0000000000047378 196 FUNC GLOBAL DEFAULT 14 rintl@@FBSD_1.1 25: 000000000004cacc 100 FUNC GLOBAL DEFAULT 14 cproj@@FBSD_1.1 26: 0000000000029570 1000 FUNC GLOBAL DEFAULT 14 y0@@FBSD_1.0 27: 0000000000030404 16 FUNC GLOBAL DEFAULT 14 cargf@@FBSD_1.1 28: 0000000000033014 8 FUNC GLOBAL DEFAULT 14 fmax@@FBSD_1.0 29: 0000000000046c00 100 FUNC GLOBAL DEFAULT 14 nanl@@FBSD_1.1 30: 000000000002c200 1552 FUNC GLOBAL DEFAULT 14 lgammaf_r@@FBSD_1.0 31: 000000000002a4f0 988 FUNC GLOBAL DEFAULT 14 y1@@FBSD_1.0 32: 000000000003301c 8 FUNC GLOBAL DEFAULT 14 fmaxf@@FBSD_1.0 33: 000000000004c7c4 8 FUNC GLOBAL DEFAULT 14 cimag@@FBSD_1.0 34: 000000000002d098 524 FUNC GLOBAL DEFAULT 14 logf@@FBSD_1.0 35: 0000000000028d40 12 FUNC GLOBAL DEFAULT 14 gamma@@FBSD_1.0 36: 0000000000029d60 1016 FUNC GLOBAL DEFAULT 14 y0f@@FBSD_1.0 37: 0000000000048f74 1872 FUNC GLOBAL DEFAULT 14 sinpil@@FBSD_1.7 38: 000000000004ae28 616 FUNC GLOBAL DEFAULT 14 cacos@@FBSD_1.3 39: 000000000004d44c 44 FUNC GLOBAL DEFAULT 14 ctanf@@FBSD_1.3 40: 0000000000030244 432 FUNC GLOBAL DEFAULT 14 atanf@@FBSD_1.0 41: 000000000002ec3c 8 FUNC GLOBAL DEFAULT 14 sqrt@@FBSD_1.0 42: 000000000004c7cc 8 FUNC GLOBAL DEFAULT 14 cimagf@@FBSD_1.0 43: 0000000000037060 1000 FUNC GLOBAL DEFAULT 14 cospi@@FBSD_1.7 44: 000000000002885c 804 FUNC GLOBAL DEFAULT 14 fmod@@FBSD_1.0 45: 000000000002b9c0 328 FUNC GLOBAL DEFAULT 14 ynf@@FBSD_1.0 46: 0000000000032114 820 FUNC GLOBAL DEFAULT 14 erfcf@@FBSD_1.0 47: 000000000003ed24 1564 FUNC GLOBAL DEFAULT 14 sinhl@@FBSD_1.3 48: 000000000004d0c8 436 FUNC GLOBAL DEFAULT 14 ctanh@@FBSD_1.3 49: 00000000000280c8 204 FUNC GLOBAL DEFAULT 14 atanh@@FBSD_1.0 50: 000000000002b084 1028 FUNC GLOBAL DEFAULT 14 jn@@FBSD_1.0 51: 000000000002e8a8 144 FUNC GLOBAL DEFAULT 14 scalb@@FBSD_1.0 52: 0000000000027754 196 FUNC GLOBAL DEFAULT 14 acoshf@@FBSD_1.0 53: 000000000002c1f4 12 FUNC GLOBAL DEFAULT 14 lgammaf@@FBSD_1.0 54: 0000000000030414 16 FUNC GLOBAL DEFAULT 14 cargl@@FBSD_1.1 55: 0000000000030c94 20 FUNC GLOBAL DEFAULT 14 copysign@@FBSD_1.0 56: 000000000004c588 292 FUNC GLOBAL DEFAULT 14 cexp@@FBSD_1.2 57: 000000000004d09c 44 FUNC GLOBAL DEFAULT 14 csinf@@FBSD_1.3 58: 000000000003372c 680 FUNC GLOBAL DEFAULT 14 log1p@@FBSD_1.0 59: 0000000000027a4c 372 FUNC GLOBAL DEFAULT 14 asinf@@FBSD_1.0 60: 0000000000033004 8 FUNC GLOBAL DEFAULT 14 fma@@FBSD_1.0 61: 0000000000034ff8 28 FUNC GLOBAL DEFAULT 14 scalbln@@FBSD_1.0 62: 0000000000045944 152 FUNC GLOBAL DEFAULT 14 fmaxl@@FBSD_1.0 63: 0000000000033ce8 84 FUNC GLOBAL DEFAULT 14 logbf@@FBSD_1.0 64: 000000000004613c 804 FUNC GLOBAL DEFAULT 14 logl@@FBSD_1.3 65: 000000000004cb9c 640 FUNC GLOBAL DEFAULT 14 csinh@@FBSD_1.3 66: 000000000002fe74 232 FUNC GLOBAL DEFAULT 14 asinh@@FBSD_1.0 67: 00000000000330cc 160 FUNC GLOBAL DEFAULT 14 fmaximumf@@FBSD_1.9 68: 000000000003317c 168 FUNC GLOBAL DEFAULT 14 fminimum@@FBSD_1.9 69: 0000000000033560 28 FUNC GLOBAL DEFAULT 14 __isnanf@@FBSD_1.2 70: 0000000000036fcc 132 FUNC GLOBAL DEFAULT 14 truncf@@FBSD_1.0 71: 0000000000040190 1372 FUNC GLOBAL DEFAULT 14 atanl@@FBSD_1.1 72: 000000000004c7d4 8 FUNC GLOBAL DEFAULT 14 cimagl@@FBSD_1.0 73: 000000000004ce1c 44 FUNC GLOBAL DEFAULT 14 csin@@FBSD_1.3 74: 000000000004331c 3700 FUNC GLOBAL DEFAULT 14 erfcl@@FBSD_1.3 75: 000000000004cb30 96 FUNC GLOBAL DEFAULT 14 cprojf@@FBSD_1.1 76: 0000000000030710 172 FUNC GLOBAL DEFAULT 14 ceilf@@FBSD_1.0 77: 0000000000036efc 208 FUNC GLOBAL DEFAULT 14 trunc@@FBSD_1.0 78: 000000000002bb14 1760 FUNC GLOBAL DEFAULT 14 lgamma_r@@FBSD_1.0 79: 0000000000030524 188 FUNC GLOBAL DEFAULT 14 cbrtf@@FBSD_1.0 80: 0000000000033d98 92 FUNC GLOBAL DEFAULT 14 lrintf@@FBSD_1.0 81: 0000000000036dfc 228 FUNC GLOBAL DEFAULT 14 tanhf@@FBSD_1.0 82: 000000000003705c 4 FUNC GLOBAL DEFAULT 14 dremf@@FBSD_1.0 83: 000000000003aa40 352 FUNC GLOBAL DEFAULT 14 acoshl@@FBSD_1.3 84: 000000000003ce38 12 FUNC GLOBAL DEFAULT 14 lgammal@@FBSD_1.3 85: 000000000003333c 100 FUNC GLOBAL DEFAULT 14 frexpf@@FBSD_1.0 86: 000000000003b5bc 2012 FUNC GLOBAL DEFAULT 14 asinl@@FBSD_1.1 87: 0000000000035164 12 FUNC GLOBAL DEFAULT 14 __signbit@@FBSD_1.0 88: 0000000000033658 92 FUNC GLOBAL DEFAULT 14 llrintf@@FBSD_1.0 89: 0000000000034010 316 FUNC GLOBAL DEFAULT 14 nan@@FBSD_1.1 90: 0000000000045c58 204 FUNC GLOBAL DEFAULT 14 logbl@@FBSD_1.1 91: 000000000004b42c 768 FUNC GLOBAL DEFAULT 14 casinhf@@FBSD_1.3 92: 0000000000032d20 44 FUNC GLOBAL DEFAULT 14 fdim@@FBSD_1.0 93: 000000000003357c 36 FUNC GLOBAL DEFAULT 14 __isnanl@@FBSD_1.0 94: 00000000000335bc 28 FUNC GLOBAL DEFAULT 14 __isnormalf@@FBSD_1.0 95: 00000000000459dc 156 FUNC GLOBAL DEFAULT 14 fmaximuml@@FBSD_1.9 96: 000000000004a6b4 336 FUNC GLOBAL DEFAULT 14 truncl@@FBSD_1.0 97: 000000000004c804 192 FUNC GLOBAL DEFAULT 14 cpow@@FBSD_1.5 98: 000000000004ce48 596 FUNC GLOBAL DEFAULT 14 csinhf@@FBSD_1.3 99: 0000000000029164 1036 FUNC GLOBAL DEFAULT 14 j0@@FBSD_1.0 100: 000000000002ca3c 456 FUNC GLOBAL DEFAULT 14 log10@@FBSD_1.0 101: 0000000000032d18 8 FUNC GLOBAL DEFAULT 14 fabsf@@FBSD_1.0 102: 0000000000042230 104 FUNC GLOBAL DEFAULT 14 cprojl@@FBSD_1.1 103: 000000000004c2e0 20 FUNC GLOBAL DEFAULT 14 ccos@@FBSD_1.3 104: 000000000002a158 920 FUNC GLOBAL DEFAULT 14 j1@@FBSD_1.0 105: 000000000002ec4c 28 FUNC GLOBAL DEFAULT 14 feclearexcept@@FBSD_1.3 106: 0000000000040940 628 FUNC GLOBAL DEFAULT 14 ceill@@FBSD_1.0 107: 000000000004b400 44 FUNC GLOBAL DEFAULT 14 catan@@FBSD_1.3 108: 000000000002ecc8 12 FUNC GLOBAL DEFAULT 14 fetestexcept@@FBSD_1.3 109: 00000000000305e0 304 FUNC GLOBAL DEFAULT 14 ceil@@FBSD_1.0 110: 0000000000038914 112 FUNC GLOBAL DEFAULT 14 lrintl@@FBSD_1.1 111: 00000000000406ec 596 FUNC GLOBAL DEFAULT 14 cbrtl@@FBSD_1.2 112: 00000000000496c4 1556 FUNC GLOBAL DEFAULT 14 tanhl@@FBSD_1.3 113: 000000000004c574 20 FUNC GLOBAL DEFAULT 14 ccosf@@FBSD_1.3 114: 00000000000332c4 120 FUNC GLOBAL DEFAULT 14 frexp@@FBSD_1.0 115: 000000000002746c 544 FUNC GLOBAL DEFAULT 14 acosf@@FBSD_1.0 116: 0000000000029958 1032 FUNC GLOBAL DEFAULT 14 j0f@@FBSD_1.0 117: 0000000000033528 24 FUNC GLOBAL DEFAULT 14 __isfinitef@@FBSD_1.0 118: 0000000000045bac 172 FUNC GLOBAL DEFAULT 14 frexpl@@FBSD_1.0 119: 0000000000028d4c 4 FUNC GLOBAL DEFAULT 14 gamma_r@@FBSD_1.0 120: 0000000000031a54 920 FUNC GLOBAL DEFAULT 14 erfc@@FBSD_1.0 121: 0000000000034600 296 FUNC GLOBAL DEFAULT 14 nexttowardf@@FBSD_1.0 122: 00000000000382d4 1432 FUNC GLOBAL DEFAULT 14 tanpif@@FBSD_1.7 123: 00000000000388a4 112 FUNC GLOBAL DEFAULT 14 llrintl@@FBSD_1.1 124: 00000000000396b0 748 FUNC GLOBAL DEFAULT 14 casinhl@@FBSD_1.5 125: 000000000004c008 44 FUNC GLOBAL DEFAULT 14 catanf@@FBSD_1.3 126: 000000000004c034 684 FUNC GLOBAL DEFAULT 14 ccosh@@FBSD_1.3 127: 0000000000033510 24 FUNC GLOBAL DEFAULT 14 __isfinite@@FBSD_1.0 128: 000000000002768c 200 FUNC GLOBAL DEFAULT 14 acosh@@FBSD_1.0 129: 000000000002b6a8 792 FUNC GLOBAL DEFAULT 14 jnf@@FBSD_1.0 130: 000000000002bb08 12 FUNC GLOBAL DEFAULT 14 lgamma@@FBSD_1.0 131: 00000000000335d8 36 FUNC GLOBAL DEFAULT 14 __isnormall@@FBSD_1.0 132: 0000000000035190 44 FUNC GLOBAL DEFAULT 14 significand@@FBSD_1.0 133: 000000000003888c 24 FUNC GLOBAL DEFAULT 14 fabsl@@FBSD_1.0 134: 000000000004b104 764 FUNC GLOBAL DEFAULT 14 catanh@@FBSD_1.3 135: 00000000000333a0 116 FUNC GLOBAL DEFAULT 14 ilogb@@FBSD_1.0 136: 00000000000339d4 692 FUNC GLOBAL DEFAULT 14 log1pf@@FBSD_1.0 137: 000000000002cd84 432 FUNC GLOBAL DEFAULT 14 log2@@FBSD_1.2 138: 00000000000307bc 620 FUNC GLOBAL DEFAULT 14 clog@@FBSD_1.5 139: 0000000000031dec 808 FUNC GLOBAL DEFAULT 14 erff@@FBSD_1.0 140: 0000000000034f24 104 FUNC GLOBAL DEFAULT 14 round@@FBSD_1.0 141: 0000000000027bc0 668 FUNC GLOBAL DEFAULT 14 atan2@@FBSD_1.0 142: 000000000003441c 280 FUNC GLOBAL DEFAULT 14 nextafter@@FBSD_1.0 143: 000000000004ba1c 44 FUNC GLOBAL DEFAULT 14 casinf@@FBSD_1.3 144: 000000000004cb90 4 FUNC GLOBAL DEFAULT 14 creal@@FBSD_1.0 145: 0000000000028644 536 FUNC GLOBAL DEFAULT 14 expf@@FBSD_1.0 146: 0000000000028d60 552 FUNC GLOBAL DEFAULT 14 hypot@@FBSD_1.0 147: 0000000000033540 32 FUNC GLOBAL DEFAULT 14 __isfinitel@@FBSD_1.0 148: 000000000003aba0 2588 FUNC GLOBAL DEFAULT 14 acosl@@FBSD_1.1 149: 0000000000028420 548 FUNC GLOBAL DEFAULT 14 exp@@FBSD_1.0 150: 0000000000028d5c 4 FUNC GLOBAL DEFAULT 14 gammaf_r@@FBSD_1.0 151: 0000000000032df8 28 FUNC GLOBAL DEFAULT 14 finite@@FBSD_1.0 152: 000000000003aa14 44 FUNC GLOBAL DEFAULT 14 catanl@@FBSD_1.5 153: 0000000000046c64 448 FUNC GLOBAL DEFAULT 14 nexttowardl@@FBSD_1.0 154: 000000000004a174 920 FUNC GLOBAL DEFAULT 14 tanpil@@FBSD_1.7 155: 000000000004a808 760 FUNC GLOBAL DEFAULT 14 casinh@@FBSD_1.3 156: 000000000002ec44 8 FUNC GLOBAL DEFAULT 14 sqrtf@@FBSD_1.0 157: 00000000000343a0 52 FUNC GLOBAL DEFAULT 14 nearbyintf@@FBSD_1.0 158: 000000000002cc04 384 FUNC GLOBAL DEFAULT 14 log10f@@FBSD_1.0 159: 000000000004bd2c 732 FUNC GLOBAL DEFAULT 14 catanhf@@FBSD_1.3 160: 0000000000028348 216 FUNC GLOBAL DEFAULT 14 coshf@@FBSD_1.0 161: 00000000000351e8 956 FUNC GLOBAL DEFAULT 14 sin@@FBSD_1.0 162: 0000000000037448 1024 FUNC GLOBAL DEFAULT 14 cospif@@FBSD_1.7 163: 0000000000045d24 1048 FUNC GLOBAL DEFAULT 14 log1pl@@FBSD_1.3 164: 00000000000426b4 3176 FUNC GLOBAL DEFAULT 14 erfl@@FBSD_1.3 165: 000000000004d2a8 420 FUNC GLOBAL DEFAULT 14 ctanhf@@FBSD_1.3 166: 000000000002cf34 356 FUNC GLOBAL DEFAULT 14 log2f@@FBSD_1.2 167: 000000000002da60 1816 FUNC GLOBAL DEFAULT 14 powf@@FBSD_1.0 168: 000000000002e938 204 FUNC GLOBAL DEFAULT 14 scalbf@@FBSD_1.0 169: 0000000000030a28 620 FUNC GLOBAL DEFAULT 14 clogf@@FBSD_1.5 170: 000000000003a060 44 FUNC GLOBAL DEFAULT 14 casinl@@FBSD_1.5 171: 000000000002ecd4 12 FUNC GLOBAL DEFAULT 14 fegetround@@FBSD_1.3 172: 000000000003138c 488 FUNC GLOBAL DEFAULT 14 csqrt@@FBSD_1.1 173: 0000000000033d3c 92 FUNC GLOBAL DEFAULT 14 lrint@@FBSD_1.0 174: 0000000000044460 764 FUNC GLOBAL DEFAULT 14 expl@@FBSD_1.3 175: 0000000000046e24 344 FUNC GLOBAL DEFAULT 14 nexttoward@@FBSD_1.0 176: 000000000004d27c 44 FUNC GLOBAL DEFAULT 14 ctan@@FBSD_1.3 177: 0000000000027e5c 620 FUNC GLOBAL DEFAULT 14 atan2f@@FBSD_1.0 178: 000000000004cb94 4 FUNC GLOBAL DEFAULT 14 crealf@@FBSD_1.0 179: 0000000000032a18 768 FUNC GLOBAL DEFAULT 14 expm1f@@FBSD_1.0 180: 0000000000028f88 476 FUNC GLOBAL DEFAULT 14 hypotf@@FBSD_1.0 181: 00000000000343d4 72 FUNC GLOBAL DEFAULT 14 nearbyintl@@FBSD_1.1 182: 000000000003f340 948 FUNC GLOBAL DEFAULT 14 sqrtl@@FBSD_1.1 183: 0000000000009170 8 OBJECT GLOBAL DEFAULT 11 __fe_dfl_env@@FBSD_1.0 184: 000000000003a4bc 1368 FUNC GLOBAL DEFAULT 14 catanhl@@FBSD_1.5 185: 0000000000046460 976 FUNC GLOBAL DEFAULT 14 log10l@@FBSD_1.3 186: 00000000000266cc 1860 FUNC GLOBAL DEFAULT 14 tgamma@@FBSD_1.0 187: 000000000002ac80 1028 FUNC GLOBAL DEFAULT 14 y1f@@FBSD_1.0 188: 000000000002d2a4 1980 FUNC GLOBAL DEFAULT 14 pow@@FBSD_1.0 189: 000000000003316c 8 FUNC GLOBAL DEFAULT 14 fmin@@FBSD_1.0 190: 00000000000350dc 136 FUNC GLOBAL DEFAULT 14 ldexpf@@FBSD_1.0 191: 000000000003c280 1440 FUNC GLOBAL DEFAULT 14 coshl@@FBSD_1.3 192: 0000000000041a04 2092 FUNC GLOBAL DEFAULT 14 cospil@@FBSD_1.7 193: 0000000000028d50 12 FUNC GLOBAL DEFAULT 14 gammaf@@FBSD_1.0 194: 0000000000030cbc 976 FUNC GLOBAL DEFAULT 14 cos@@FBSD_1.0 195: 000000000003e02c 3244 FUNC GLOBAL DEFAULT 14 powl@@FBSD_1.3 196: 0000000000040f9c 1408 FUNC GLOBAL DEFAULT 14 clogl@@FBSD_1.5 197: 0000000000046830 976 FUNC GLOBAL DEFAULT 14 log2l@@FBSD_1.3 198: 000000000004ba48 628 FUNC GLOBAL DEFAULT 14 cacosf@@FBSD_1.3 199: 00000000000316e4 880 FUNC GLOBAL DEFAULT 14 erf@@FBSD_1.0 200: 0000000000037050 4 FUNC GLOBAL DEFAULT 14 cabs@@FBSD_1.0 201: 000000000003504c 144 FUNC GLOBAL DEFAULT 14 scalbn@@FBSD_1.0 202: 000000000003bd98 876 FUNC GLOBAL DEFAULT 14 atan2l@@FBSD_1.1 203: 000000000003ce44 4584 FUNC GLOBAL DEFAULT 14 lgammal_r@@FBSD_1.4 204: 000000000004b090 116 FUNC GLOBAL DEFAULT 14 cacosh@@FBSD_1.3 205: 000000000004cb98 4 FUNC GLOBAL DEFAULT 14 creall@@FBSD_1.0 206: 000000000002ec68 28 FUNC GLOBAL DEFAULT 14 fegetexceptflag@@FBSD_1.3 207: 000000000002ece0 48 FUNC GLOBAL DEFAULT 14 fesetround@@FBSD_1.3 208: 0000000000036ee0 28 FUNC GLOBAL DEFAULT 14 tgammaf@@FBSD_1.1 209: 000000000003ca84 948 FUNC GLOBAL DEFAULT 14 hypotl@@FBSD_1.1 210: 000000000004475c 2252 FUNC GLOBAL DEFAULT 14 expm1l@@FBSD_1.3 211: 0000000000027818 564 FUNC GLOBAL DEFAULT 14 asin@@FBSD_1.0 212: 0000000000035dbc 1368 FUNC GLOBAL DEFAULT 14 sincosf@@FBSD_1.5 213: 0000000000033414 80 FUNC GLOBAL DEFAULT 14 ilogbf@@FBSD_1.0 214: 0000000000034f8c 108 FUNC GLOBAL DEFAULT 14 roundf@@FBSD_1.0 215: 0000000000047544 208 FUNC GLOBAL DEFAULT 14 ldexpl@@FBSD_1.0 216: 00000000000303f4 16 FUNC GLOBAL DEFAULT 14 carg@@FBSD_1.1 217: 0000000000033df4 8 FUNC GLOBAL DEFAULT 14 lround@@FBSD_1.0 218: 0000000000033dfc 8 FUNC GLOBAL DEFAULT 14 lroundf@@FBSD_1.0 219: 000000000003a08c 868 FUNC GLOBAL DEFAULT 14 cacosl@@FBSD_1.5 220: 000000000002c810 556 FUNC GLOBAL DEFAULT 14 log@@FBSD_1.0 221: 0000000000031574 368 FUNC GLOBAL DEFAULT 14 csqrtf@@FBSD_1.1 222: 00000000000336b4 8 FUNC GLOBAL DEFAULT 14 llround@@FBSD_1.0 223: 0000000000034d64 332 FUNC GLOBAL DEFAULT 14 rint@@FBSD_1.0 224: 0000000000034534 204 FUNC GLOBAL DEFAULT 14 nextafterf@@FBSD_1.0 225: 0000000000038a94 1976 FUNC GLOBAL DEFAULT 14 tgammal@@FBSD_1.3 226: 000000000004bcbc 112 FUNC GLOBAL DEFAULT 14 cacoshf@@FBSD_1.3 227: 0000000000037848 816 FUNC GLOBAL DEFAULT 14 sinpi@@FBSD_1.7 228: 0000000000033560 28 FUNC WEAK DEFAULT 14 isnanf@@FBSD_1.0 229: 0000000000032448 420 FUNC GLOBAL DEFAULT 14 exp2@@FBSD_1.0 230: 0000000000033464 172 FUNC GLOBAL DEFAULT 14 ilogbl@@FBSD_1.0 231: 000000000004743c 264 FUNC GLOBAL DEFAULT 14 roundl@@FBSD_1.0 232: 0000000000047aec 5256 FUNC GLOBAL DEFAULT 14 sincosl@@FBSD_1.5 233: 000000000004c2f4 640 FUNC GLOBAL DEFAULT 14 ccoshf@@FBSD_1.3 234: 00000000000271c0 684 FUNC GLOBAL DEFAULT 14 acos@@FBSD_1.0 235: 0000000000034b00 612 FUNC GLOBAL DEFAULT 14 remquof@@FBSD_1.0 236: 00000000000369ec 808 FUNC GLOBAL DEFAULT 14 tanf@@FBSD_1.0 237: 000000000002ff5c 244 FUNC GLOBAL DEFAULT 14 asinhf@@FBSD_1.0 238: 0000000000035170 12 FUNC GLOBAL DEFAULT 14 __signbitf@@FBSD_1.0 239: 0000000000033e04 104 FUNC GLOBAL DEFAULT 14 lroundl@@FBSD_1.0 240: 0000000000033e6c 120 FUNC GLOBAL DEFAULT 14 modff@@FBSD_1.0 241: 000000000004c7dc 8 FUNC GLOBAL DEFAULT 14 conj@@FBSD_1.0 242: 0000000000030424 256 FUNC GLOBAL DEFAULT 14 cbrt@@FBSD_1.0 243: 0000000000032e2c 304 FUNC GLOBAL DEFAULT 14 floor@@FBSD_1.0 244: 0000000000036d14 232 FUNC GLOBAL DEFAULT 14 tanh@@FBSD_1.0 245: 0000000000037058 4 FUNC GLOBAL DEFAULT 14 drem@@FBSD_1.0 246: 00000000000335fc 92 FUNC GLOBAL DEFAULT 14 llrint@@FBSD_1.0 247: 0000000000042298 1052 FUNC GLOBAL DEFAULT 14 csqrtl@@FBSD_1.1 248: 0000000000036314 824 FUNC GLOBAL DEFAULT 14 sinf@@FBSD_1.0 249: 000000000003664c 928 FUNC GLOBAL DEFAULT 14 tan@@FBSD_1.0 250: 000000000003a3f0 204 FUNC GLOBAL DEFAULT 14 cacoshl@@FBSD_1.5 251: 0000000000046c64 448 FUNC GLOBAL DEFAULT 14 nextafterl@@FBSD_1.0 252: 000000000002a8cc 948 FUNC GLOBAL DEFAULT 14 j1f@@FBSD_1.0 253: 000000000004c7e4 8 FUNC GLOBAL DEFAULT 14 conjf@@FBSD_1.0 254: 000000000002ea04 284 FUNC GLOBAL DEFAULT 14 sinh@@FBSD_1.0 255: 0000000000046f7c 1020 FUNC GLOBAL DEFAULT 14 remquol@@FBSD_1.1 256: 0000000000049cd8 1180 FUNC GLOBAL DEFAULT 14 tanl@@FBSD_1.1 257: 000000000004c6ac 280 FUNC GLOBAL DEFAULT 14 cexpf@@FBSD_1.2 258: 0000000000032f5c 168 FUNC GLOBAL DEFAULT 14 floorf@@FBSD_1.0 259: 0000000000035014 28 FUNC GLOBAL DEFAULT 14 scalblnf@@FBSD_1.0 260: 000000000003517c 20 FUNC GLOBAL DEFAULT 14 __signbitl@@FBSD_1.0 261: 0000000000037054 4 FUNC GLOBAL DEFAULT 14 cabsf@@FBSD_1.0 262: 0000000000038984 272 FUNC GLOBAL DEFAULT 14 modfl@@FBSD_1.0 263: 000000000003fff4 412 FUNC GLOBAL DEFAULT 14 asinhl@@FBSD_1.3 264: 000000000003271c 764 FUNC GLOBAL DEFAULT 14 expm1@@FBSD_1.0 265: 000000000002e620 348 FUNC GLOBAL DEFAULT 14 remainder@@FBSD_1.0 266: 000000000002ed64 24 FUNC GLOBAL DEFAULT 14 fesetenv@@FBSD_1.3 252: 000000000002a8cc 948 FUNC GLOBAL DEFAULT 14 j1f@@FBSD_1.0 253: 000000000004c7e4 8 FUNC GLOBAL DEFAULT 14 conjf@@FBSD_1.0 254: 000000000002ea04 284 FUNC GLOBAL DEFAULT 14 sinh@@FBSD_1.0 255: 0000000000046f7c 1020 FUNC GLOBAL DEFAULT 14 remquol@@FBSD_1.1 256: 0000000000049cd8 1180 FUNC GLOBAL DEFAULT 14 tanl@@FBSD_1.1 257: 000000000004c6ac 280 FUNC GLOBAL DEFAULT 14 cexpf@@FBSD_1.2 258: 0000000000032f5c 168 FUNC GLOBAL DEFAULT 14 floorf@@FBSD_1.0 259: 0000000000035014 28 FUNC GLOBAL DEFAULT 14 scalblnf@@FBSD_1.0 260: 000000000003517c 20 FUNC GLOBAL DEFAULT 14 __signbitl@@FBSD_1.0 261: 0000000000037054 4 FUNC GLOBAL DEFAULT 14 cabsf@@FBSD_1.0 262: 0000000000038984 272 FUNC GLOBAL DEFAULT 14 modfl@@FBSD_1.0 263: 000000000003fff4 412 FUNC GLOBAL DEFAULT 14 asinhl@@FBSD_1.3 264: 000000000003271c 764 FUNC GLOBAL DEFAULT 14 expm1@@FBSD_1.0 265: 000000000002e620 348 FUNC GLOBAL DEFAULT 14 remainder@@FBSD_1.0 266: 000000000002ed64 24 FUNC GLOBAL DEFAULT 14 fesetenv@@FBSD_1.3 267: 0000000000032e14 24 FUNC GLOBAL DEFAULT 14 finitef@@FBSD_1.0 268: 000000000003300c 8 FUNC GLOBAL DEFAULT 14 fmaf@@FBSD_1.0 269: 00000000000335a0 28 FUNC GLOBAL DEFAULT 14 __isnormal@@FBSD_1.0 270: 0000000000047614 1240 FUNC GLOBAL DEFAULT 14 sinl@@FBSD_1.1 271: 0000000000030ca8 20 FUNC GLOBAL DEFAULT 14 copysignf@@FBSD_1.0 272: 0000000000032d4c 44 FUNC GLOBAL DEFAULT 14 fdimf@@FBSD_1.0 273: 000000000004c7ec 24 FUNC GLOBAL DEFAULT 14 conjl@@FBSD_1.0 274: 000000000004c8c4 192 FUNC GLOBAL DEFAULT 14 cpowf@@FBSD_1.5 275: 000000000002e77c 300 FUNC GLOBAL DEFAULT 14 remainderf@@FBSD_1.0 276: 00000000000325ec 304 FUNC GLOBAL DEFAULT 14 exp2f@@FBSD_1.0 277: 0000000000040bb4 1000 FUNC GLOBAL DEFAULT 14 cexpl@@FBSD_1.7 278: 0000000000028b80 448 FUNC GLOBAL DEFAULT 14 fmodf@@FBSD_1.0 279: 0000000000035030 28 FUNC GLOBAL DEFAULT 14 scalblnl@@FBSD_1.0 280: 00000000000351bc 44 FUNC GLOBAL DEFAULT 14 significandf@@FBSD_1.0 281: 0000000000037e50 1156 FUNC GLOBAL DEFAULT 14 tanpi@@FBSD_1.7 282: 0000000000045028 640 FUNC GLOBAL DEFAULT 14 floorl@@FBSD_1.0 283: 000000000004a804 4 FUNC GLOBAL DEFAULT 14 cabsl@@FBSD_1.1 284: 0000000000033174 8 FUNC GLOBAL DEFAULT 14 fminf@@FBSD_1.0 285: 0000000000033224 160 FUNC GLOBAL DEFAULT 14 fminimumf@@FBSD_1.9 286: 00000000000452a8 1316 FUNC GLOBAL DEFAULT 14 fmal@@FBSD_1.0 287: 0000000000030050 500 FUNC GLOBAL DEFAULT 14 atan@@FBSD_1.0 288: 0000000000028194 200 FUNC GLOBAL DEFAULT 14 atanhf@@FBSD_1.0 289: 000000000002b488 544 FUNC GLOBAL DEFAULT 14 yn@@FBSD_1.0 290: 000000000003108c 768 FUNC GLOBAL DEFAULT 14 cosf@@FBSD_1.0 291: 0000000000033024 168 FUNC GLOBAL DEFAULT 14 fmaximum@@FBSD_1.9 292: 000000000003436c 52 FUNC GLOBAL DEFAULT 14 nearbyint@@FBSD_1.0 293: 000000000006f93c 4 OBJECT GLOBAL DEFAULT 24 signgam@@FBSD_1.0 294: 0000000000032d78 128 FUNC GLOBAL DEFAULT 14 fdiml@@FBSD_1.0 295: 0000000000034728 984 FUNC GLOBAL DEFAULT 14 remquo@@FBSD_1.0 296: 000000000003886c 32 FUNC GLOBAL DEFAULT 14 copysignl@@FBSD_1.0 297: 000000000004c984 328 FUNC GLOBAL DEFAULT 14 cpowl@@FBSD_1.5 298: 000000000002825c 236 FUNC GLOBAL DEFAULT 14 cosh@@FBSD_1.0 299: 00000000000350dc 136 FUNC GLOBAL DEFAULT 14 scalbnf@@FBSD_1.0 300: 000000000003ecd8 76 FUNC GLOBAL DEFAULT 14 remainderl@@FBSD_1.1 301: 0000000000044190 720 FUNC GLOBAL DEFAULT 14 exp2l@@FBSD_1.1 302: 00000000000355a4 2072 FUNC GLOBAL DEFAULT 14 sincos@@FBSD_1.5 303: 00000000000336bc 8 FUNC GLOBAL DEFAULT 14 llroundf@@FBSD_1.0 304: 0000000000034eb0 116 FUNC GLOBAL DEFAULT 14 rintf@@FBSD_1.0 305: 000000000003c820 612 FUNC GLOBAL DEFAULT 14 fmodl@@FBSD_1.1 > > > > > > referenced by host.cpp > > > > > host.cpp.o:(Fortran::evaluate::host::HostFloatingPointEnvironment::SetUpHostFloatingPointEnvironment(Fortran::evaluate::FoldingContext&)) in archive lib/libFortranEvaluate.a > > > > ld: error: undefined symbol: fegetenv > > > > > referenced by host.cpp > > > > > host.cpp.o:(Fortran::evaluate::host::HostFloatingPointEnvironment::SetUpHostFloatingPointEnvironment(Fortran::evaluate::FoldingContext&)) in archive lib/libFortranEvaluate.a > > > > > did you mean: fesetenv > > > > > defined in: /usr/lib/libm.so > > c++: error: linker command failed with exit code 1 (use -v to see invocation) > > =============== > > > > All of math/py-numpy1 consumers (math/Imath for example): > > =============== > > -- Configuring imathnumpy module > > Traceback (most recent call last): > > File "/usr/local/lib/python3.11/site-packages/numpy/core/__init__.py", line 24, in > > from . import multiarray > > File "/usr/local/lib/python3.11/site-packages/numpy/core/multiarray.py", line 10, in > > from . import overrides > > File "/usr/local/lib/python3.11/site-packages/numpy/core/overrides.py", line 8, in > > from numpy.core._multiarray_umath import ( > > ImportError: /usr/local/lib/python3.11/site-packages/numpy/core/_multiarray_umath.cpython-311.so: Undefined symbol "feraiseexcept" > > > > During handling of the above exception, another exception occurred: > > > > Traceback (most recent call last): > > File "/usr/local/lib/python3.11/site-packages/numpy/__init__.py", line 130, in > > from numpy.__config__ import show as show_config > > File "/usr/local/lib/python3.11/site-packages/numpy/__config__.py", line 4, in > > from numpy.core._multiarray_umath import ( > > File "/usr/local/lib/python3.11/site-packages/numpy/core/__init__.py", line 50, in > > raise ImportError(msg) > > ImportError: > > =============== > -- Sincerely, Dima (fluffy@FreeBSD.org, https://t.me/FluffyBSD, @fluffy:matrix-dev.freebsd.org) (desktop, kde, x11, office, ports-secteam)@FreeBSD team --69d3de6e_66334873_d4c2 Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline


On 06.04.2026 19:07, Konstantin Belousov wrote:
=
On Mon, Apr 06, 2026 at 06:56:36PM +0300, D= ima Panov wrote:
Hello=21

This= breaks most of libm consumers

llvm/flang:
=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D
=46AILED: =5Bcode=3D1=5D bin/flang-20 : && /usr/local/libexec/ccache/c++ -O2 -pipe -fstack-protector-s= trong -isystem /usr/local/include -fno-strict-aliasing -isystem /usr/loca= l/include -fPIC -fno-semantic-interposition -fvisibility-inline
s-hid= den -Werror=3Ddate-time -Werror=3Dunguarded-availability-new -Wall -Wextr= a -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initi= alizers -pedantic -Wno-long-long -Wc++98-compat-extra-s
emi -Wimplici= t-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-d= tor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmi= sleading-indentation -Wctad-maybe-unsupport
ed -fdiagnostics-color -f= function-sections -fdata-sections -Wno-deprecated-copy -Wno-string-conver= sion -Wno-ctad-maybe-unsupported -Wno-unused-command-line-argument -Wstri= ng-conversion -Wcover
ed-switch-default -Wno-nested-anon-types -O2 -p= ipe -fstack-protector-strong -isystem /usr/local/include -fno-strict-alia= sing -isystem /usr/local/include -DNDEBUG -Wl,--color-diagnostics -Wl,--e= xpor
t-dynamic -Wl,-z,origin -Wl,--gc-sections -Xlinker --dependency-= file=3Dtools/flang/tools/flang-driver/CMake=46iles/flang.dir/link.d tools= /flang/tools/flang-driver/CMake=46iles/flang.dir/driver.cpp.o tools/
= flang/tools/flang-driver/CMake=46iles/flang.dir/fc1=5Fmain.cpp.o -o bin/f= lang-20 -L/wrkdirs/usr/ports/devel/llvm20/work-default/.build/./lib -Wl,-= rpath,=22=5C=24ORIGIN/../lib:/wrkdirs/usr/ports/devel/llvm20/work-
de= fault/.build/./lib:/wrkdirs/usr/ports/devel/llvm20/work-default/.build/li= b:=22 -lpthread lib/libflang=46rontend.a lib/libflang=46rontendTool.a lib= /lib=46ortranLower.a lib/lib=46ortranSemantics.a lib/lib=46o
rtranSup= port.a lib/libflangPasses.a lib/libHL=46IRTransforms.a lib/lib=46IRTransf= orms.a lib/lib=46IROpenACCSupport.a lib/lib=46langOpenMPTransforms.a lib/= lib=46IRCodeGen.a lib/lib=46IRAnalysis.a lib/lib=46IRB
uilder.a lib/l= ibCU=46Dialect.a lib/lib=46ortranEvaluate.a lib/lib=46ortranParser.a lib/= lib=46ortranCommon.a lib/lib=46ortranDecimal.a lib/lib=46IRSupport.a lib/= libHL=46IRDialect.a lib/lib=46IRDialect.a lib/lib
=46IRDialectSupport= .a lib/libCU=46Attrs.a lib/libclang-cpp.so.20.1 lib/libMLIR.so.20.1 lib/l= ibLLVM.so.20.1 && :
ld: error: undefined symbol: feholdexcept=

This is strange. Could you show me the output of e= .g.
readelf --dyn=5Fsyms /lib/libm.so.5 =7C grep feholdexcept
Th= e best would be the output from the command like above for each missing <= br>symbol.

missing :(

=46reeBSD 16.0-CURRE= NT =230 main-cf1f21572897: Mon Apr 6 13:45:02 MSK 2026

root=40aa= rch64:/ =23 readelf --dyn-syms /lib/libm.so.5 =7C grep feholdexcept
r= oot=40aarch64:/ =23

full list of symbols:

Symbol table = '.dynsym' contains 306 entries:
Num: Value Size Type Bind Vis Ndx Na= me
0: 0000000000000000 0 NOTYPE LOCAL DE=46AULT UND
1: 00000000= 00000000 0 =46UNC WEAK DE=46AULT UND =5F=5Fcxa=5Ffinalize=40=46BSD=5F1.0 =
2: 0000000000000000 0 =46UNC GLOBAL DE=46AULT UND ldexp=40=46BSD=5F1= .0
3: 0000000000000000 0 OBJECT GLOBAL DE=46AULT UND =5F=5Fstack=5Fc= hk=5Fguard=40=46BSD=5F1.0
4: 0000000000000000 0 =46UNC GLOBAL DE=46A= ULT UND =5F=5Fstack=5Fchk=5Ffail=40=46BSD=5F1.0
5: 0000000000000000 = 0 =46UNC GLOBAL DE=46AULT UND =5F=5Fisinf=40=46BSD=5F1.0
6: 00000000= 00000000 0 =46UNC GLOBAL DE=46AULT UND =5F=5Fisinff=40=46BSD=5F1.0
7= : 0000000000000000 0 =46UNC GLOBAL DE=46AULT UND memset=40=46BSD=5F1.0 8: 0000000000000000 0 OBJECT GLOBAL DE=46AULT UND =5F=5Fmb=5Fsb=5Flimi= t=40=46BSD=5F1.0
9: 0000000000000000 0 TLS GLOBAL DE=46AULT UND =5FT= hreadRuneLocale=40=46BSD=5F1.3
10: 0000000000000000 0 OBJECT GLOBAL = DE=46AULT UND =5FCurrentRuneLocale=40=46BSD=5F1.0
11: 00000000000000= 00 0 =46UNC GLOBAL DE=46AULT UND =5F=5Ffpclassifyl=40=46BSD=5F1.0
12= : 0000000000000000 0 =46UNC GLOBAL DE=46AULT UND =5F=5Fisinfl=40=46BSD=5F= 1.0
13: 000000000003414c 544 =46UNC GLOBAL DE=46AULT 14 nanf=40=40=46= BSD=5F1.1
14: 0000000000045a78 152 =46UNC GLOBAL DE=46AULT 14 fminl=40= =40=46BSD=5F1.0
15: 0000000000045b10 156 =46UNC GLOBAL DE=46AULT 14 = fminimuml=40=40=46BSD=5F1.9
16: 000000000003c104 380 =46UNC GLOBAL D= E=46AULT 14 atanhl=40=40=46BSD=5F1.3
17: 000000000004adfc 44 =46UNC = GLOBAL DE=46AULT 14 casin=40=40=46BSD=5F1.3
18: 0000000000037b78 728= =46UNC GLOBAL DE=46AULT 14 sinpif=40=40=46BSD=5F1.7
19: 00000000000= 4151c 1256 =46UNC GLOBAL DE=46AULT 14 cosl=40=40=46BSD=5F1.1
20: 000= 000000002eb20 284 =46UNC GLOBAL DE=46AULT 14 sinhf=40=40=46BSD=5F1.0
= 21: 0000000000033c88 96 =46UNC GLOBAL DE=46AULT 14 logb=40=40=46BSD=5F1.= 0
22: 0000000000047544 208 =46UNC GLOBAL DE=46AULT 14 scalbnl=40=40=46= BSD=5F1.0
23: 00000000000336c4 104 =46UNC GLOBAL DE=46AULT 14 llroun= dl=40=40=46BSD=5F1.0
24: 0000000000047378 196 =46UNC GLOBAL DE=46AUL= T 14 rintl=40=40=46BSD=5F1.1
25: 000000000004cacc 100 =46UNC GLOBAL = DE=46AULT 14 cproj=40=40=46BSD=5F1.1
26: 0000000000029570 1000 =46UN= C GLOBAL DE=46AULT 14 y0=40=40=46BSD=5F1.0
27: 0000000000030404 16 =46= UNC GLOBAL DE=46AULT 14 cargf=40=40=46BSD=5F1.1
28: 0000000000033014= 8 =46UNC GLOBAL DE=46AULT 14 fmax=40=40=46BSD=5F1.0
29: 00000000000= 46c00 100 =46UNC GLOBAL DE=46AULT 14 nanl=40=40=46BSD=5F1.1
30: 0000= 00000002c200 1552 =46UNC GLOBAL DE=46AULT 14 lgammaf=5Fr=40=40=46BSD=5F1.= 0
31: 000000000002a4f0 988 =46UNC GLOBAL DE=46AULT 14 y1=40=40=46BSD= =5F1.0
32: 000000000003301c 8 =46UNC GLOBAL DE=46AULT 14 fmaxf=40=40= =46BSD=5F1.0
33: 000000000004c7c4 8 =46UNC GLOBAL DE=46AULT 14 cimag= =40=40=46BSD=5F1.0
34: 000000000002d098 524 =46UNC GLOBAL DE=46AULT = 14 logf=40=40=46BSD=5F1.0
35: 0000000000028d40 12 =46UNC GLOBAL DE=46= AULT 14 gamma=40=40=46BSD=5F1.0
36: 0000000000029d60 1016 =46UNC GLO= BAL DE=46AULT 14 y0f=40=40=46BSD=5F1.0
37: 0000000000048f74 1872 =46= UNC GLOBAL DE=46AULT 14 sinpil=40=40=46BSD=5F1.7
38: 000000000004ae2= 8 616 =46UNC GLOBAL DE=46AULT 14 cacos=40=40=46BSD=5F1.3
39: 0000000= 00004d44c 44 =46UNC GLOBAL DE=46AULT 14 ctanf=40=40=46BSD=5F1.3
40: = 0000000000030244 432 =46UNC GLOBAL DE=46AULT 14 atanf=40=40=46BSD=5F1.0 <= br> 41: 000000000002ec3c 8 =46UNC GLOBAL DE=46AULT 14 sqrt=40=40=46BSD=5F= 1.0
42: 000000000004c7cc 8 =46UNC GLOBAL DE=46AULT 14 cimagf=40=40=46= BSD=5F1.0
43: 0000000000037060 1000 =46UNC GLOBAL DE=46AULT 14 cospi= =40=40=46BSD=5F1.7
44: 000000000002885c 804 =46UNC GLOBAL DE=46AULT = 14 fmod=40=40=46BSD=5F1.0
45: 000000000002b9c0 328 =46UNC GLOBAL DE=46= AULT 14 ynf=40=40=46BSD=5F1.0
46: 0000000000032114 820 =46UNC GLOBAL= DE=46AULT 14 erfcf=40=40=46BSD=5F1.0
47: 000000000003ed24 1564 =46U= NC GLOBAL DE=46AULT 14 sinhl=40=40=46BSD=5F1.3
48: 000000000004d0c8 = 436 =46UNC GLOBAL DE=46AULT 14 ctanh=40=40=46BSD=5F1.3
49: 000000000= 00280c8 204 =46UNC GLOBAL DE=46AULT 14 atanh=40=40=46BSD=5F1.0
50: 0= 00000000002b084 1028 =46UNC GLOBAL DE=46AULT 14 jn=40=40=46BSD=5F1.0
= 51: 000000000002e8a8 144 =46UNC GLOBAL DE=46AULT 14 scalb=40=40=46BSD=5F= 1.0
52: 0000000000027754 196 =46UNC GLOBAL DE=46AULT 14 acoshf=40=40= =46BSD=5F1.0
53: 000000000002c1f4 12 =46UNC GLOBAL DE=46AULT 14 lgam= maf=40=40=46BSD=5F1.0
54: 0000000000030414 16 =46UNC GLOBAL DE=46AUL= T 14 cargl=40=40=46BSD=5F1.1
55: 0000000000030c94 20 =46UNC GLOBAL D= E=46AULT 14 copysign=40=40=46BSD=5F1.0
56: 000000000004c588 292 =46U= NC GLOBAL DE=46AULT 14 cexp=40=40=46BSD=5F1.2
57: 000000000004d09c 4= 4 =46UNC GLOBAL DE=46AULT 14 csinf=40=40=46BSD=5F1.3
58: 00000000000= 3372c 680 =46UNC GLOBAL DE=46AULT 14 log1p=40=40=46BSD=5F1.0
59: 000= 0000000027a4c 372 =46UNC GLOBAL DE=46AULT 14 asinf=40=40=46BSD=5F1.0
= 60: 0000000000033004 8 =46UNC GLOBAL DE=46AULT 14 fma=40=40=46BSD=5F1.0 =
61: 0000000000034ff8 28 =46UNC GLOBAL DE=46AULT 14 scalbln=40=40=46B= SD=5F1.0
62: 0000000000045944 152 =46UNC GLOBAL DE=46AULT 14 fmaxl=40= =40=46BSD=5F1.0
63: 0000000000033ce8 84 =46UNC GLOBAL DE=46AULT 14 l= ogbf=40=40=46BSD=5F1.0
64: 000000000004613c 804 =46UNC GLOBAL DE=46A= ULT 14 logl=40=40=46BSD=5F1.3
65: 000000000004cb9c 640 =46UNC GLOBAL= DE=46AULT 14 csinh=40=40=46BSD=5F1.3
66: 000000000002fe74 232 =46UN= C GLOBAL DE=46AULT 14 asinh=40=40=46BSD=5F1.0
67: 00000000000330cc 1= 60 =46UNC GLOBAL DE=46AULT 14 fmaximumf=40=40=46BSD=5F1.9
68: 000000= 000003317c 168 =46UNC GLOBAL DE=46AULT 14 fminimum=40=40=46BSD=5F1.9
= 69: 0000000000033560 28 =46UNC GLOBAL DE=46AULT 14 =5F=5Fisnanf=40=40=46= BSD=5F1.2
70: 0000000000036fcc 132 =46UNC GLOBAL DE=46AULT 14 truncf= =40=40=46BSD=5F1.0
71: 0000000000040190 1372 =46UNC GLOBAL DE=46AULT= 14 atanl=40=40=46BSD=5F1.1
72: 000000000004c7d4 8 =46UNC GLOBAL DE=46= AULT 14 cimagl=40=40=46BSD=5F1.0
73: 000000000004ce1c 44 =46UNC GLOB= AL DE=46AULT 14 csin=40=40=46BSD=5F1.3
74: 000000000004331c 3700 =46= UNC GLOBAL DE=46AULT 14 erfcl=40=40=46BSD=5F1.3
75: 000000000004cb30= 96 =46UNC GLOBAL DE=46AULT 14 cprojf=40=40=46BSD=5F1.1
76: 00000000= 00030710 172 =46UNC GLOBAL DE=46AULT 14 ceilf=40=40=46BSD=5F1.0
77: = 0000000000036efc 208 =46UNC GLOBAL DE=46AULT 14 trunc=40=40=46BSD=5F1.0 <= br> 78: 000000000002bb14 1760 =46UNC GLOBAL DE=46AULT 14 lgamma=5Fr=40=40= =46BSD=5F1.0
79: 0000000000030524 188 =46UNC GLOBAL DE=46AULT 14 cbr= tf=40=40=46BSD=5F1.0
80: 0000000000033d98 92 =46UNC GLOBAL DE=46AULT= 14 lrintf=40=40=46BSD=5F1.0
81: 0000000000036dfc 228 =46UNC GLOBAL = DE=46AULT 14 tanhf=40=40=46BSD=5F1.0
82: 000000000003705c 4 =46UNC G= LOBAL DE=46AULT 14 dremf=40=40=46BSD=5F1.0
83: 000000000003aa40 352 = =46UNC GLOBAL DE=46AULT 14 acoshl=40=40=46BSD=5F1.3
84: 000000000003= ce38 12 =46UNC GLOBAL DE=46AULT 14 lgammal=40=40=46BSD=5F1.3
85: 000= 000000003333c 100 =46UNC GLOBAL DE=46AULT 14 frexpf=40=40=46BSD=5F1.0 86: 000000000003b5bc 2012 =46UNC GLOBAL DE=46AULT 14 asinl=40=40=46BSD=5F= 1.1
87: 0000000000035164 12 =46UNC GLOBAL DE=46AULT 14 =5F=5Fsignbit= =40=40=46BSD=5F1.0
88: 0000000000033658 92 =46UNC GLOBAL DE=46AULT 1= 4 llrintf=40=40=46BSD=5F1.0
89: 0000000000034010 316 =46UNC GLOBAL D= E=46AULT 14 nan=40=40=46BSD=5F1.1
90: 0000000000045c58 204 =46UNC GL= OBAL DE=46AULT 14 logbl=40=40=46BSD=5F1.1
91: 000000000004b42c 768 =46= UNC GLOBAL DE=46AULT 14 casinhf=40=40=46BSD=5F1.3
92: 0000000000032d= 20 44 =46UNC GLOBAL DE=46AULT 14 fdim=40=40=46BSD=5F1.0
93: 00000000= 0003357c 36 =46UNC GLOBAL DE=46AULT 14 =5F=5Fisnanl=40=40=46BSD=5F1.0 94: 00000000000335bc 28 =46UNC GLOBAL DE=46AULT 14 =5F=5Fisnormalf=40=40= =46BSD=5F1.0
95: 00000000000459dc 156 =46UNC GLOBAL DE=46AULT 14 fma= ximuml=40=40=46BSD=5F1.9
96: 000000000004a6b4 336 =46UNC GLOBAL DE=46= AULT 14 truncl=40=40=46BSD=5F1.0
97: 000000000004c804 192 =46UNC GLO= BAL DE=46AULT 14 cpow=40=40=46BSD=5F1.5
98: 000000000004ce48 596 =46= UNC GLOBAL DE=46AULT 14 csinhf=40=40=46BSD=5F1.3
99: 000000000002916= 4 1036 =46UNC GLOBAL DE=46AULT 14 j0=40=40=46BSD=5F1.0
100: 00000000= 0002ca3c 456 =46UNC GLOBAL DE=46AULT 14 log10=40=40=46BSD=5F1.0
101:= 0000000000032d18 8 =46UNC GLOBAL DE=46AULT 14 fabsf=40=40=46BSD=5F1.0 102: 0000000000042230 104 =46UNC GLOBAL DE=46AULT 14 cprojl=40=40=46BS= D=5F1.1
103: 000000000004c2e0 20 =46UNC GLOBAL DE=46AULT 14 ccos=40=40= =46BSD=5F1.3
104: 000000000002a158 920 =46UNC GLOBAL DE=46AULT 14 j1= =40=40=46BSD=5F1.0
105: 000000000002ec4c 28 =46UNC GLOBAL DE=46AULT = 14 feclearexcept=40=40=46BSD=5F1.3
106: 0000000000040940 628 =46UNC = GLOBAL DE=46AULT 14 ceill=40=40=46BSD=5F1.0
107: 000000000004b400 44= =46UNC GLOBAL DE=46AULT 14 catan=40=40=46BSD=5F1.3
108: 00000000000= 2ecc8 12 =46UNC GLOBAL DE=46AULT 14 fetestexcept=40=40=46BSD=5F1.3
1= 09: 00000000000305e0 304 =46UNC GLOBAL DE=46AULT 14 ceil=40=40=46BSD=5F1.= 0
110: 0000000000038914 112 =46UNC GLOBAL DE=46AULT 14 lrintl=40=40=46= BSD=5F1.1
111: 00000000000406ec 596 =46UNC GLOBAL DE=46AULT 14 cbrtl= =40=40=46BSD=5F1.2
112: 00000000000496c4 1556 =46UNC GLOBAL DE=46AUL= T 14 tanhl=40=40=46BSD=5F1.3
113: 000000000004c574 20 =46UNC GLOBAL = DE=46AULT 14 ccosf=40=40=46BSD=5F1.3
114: 00000000000332c4 120 =46UN= C GLOBAL DE=46AULT 14 frexp=40=40=46BSD=5F1.0
115: 000000000002746c = 544 =46UNC GLOBAL DE=46AULT 14 acosf=40=40=46BSD=5F1.0
116: 00000000= 00029958 1032 =46UNC GLOBAL DE=46AULT 14 j0f=40=40=46BSD=5F1.0
117: = 0000000000033528 24 =46UNC GLOBAL DE=46AULT 14 =5F=5Fisfinitef=40=40=46BS= D=5F1.0
118: 0000000000045bac 172 =46UNC GLOBAL DE=46AULT 14 frexpl=40= =40=46BSD=5F1.0
119: 0000000000028d4c 4 =46UNC GLOBAL DE=46AULT 14 g= amma=5Fr=40=40=46BSD=5F1.0
120: 0000000000031a54 920 =46UNC GLOBAL D= E=46AULT 14 erfc=40=40=46BSD=5F1.0
121: 0000000000034600 296 =46UNC = GLOBAL DE=46AULT 14 nexttowardf=40=40=46BSD=5F1.0
122: 0000000000038= 2d4 1432 =46UNC GLOBAL DE=46AULT 14 tanpif=40=40=46BSD=5F1.7
123: 00= 000000000388a4 112 =46UNC GLOBAL DE=46AULT 14 llrintl=40=40=46BSD=5F1.1 <= br> 124: 00000000000396b0 748 =46UNC GLOBAL DE=46AULT 14 casinhl=40=40=46= BSD=5F1.5
125: 000000000004c008 44 =46UNC GLOBAL DE=46AULT 14 catanf= =40=40=46BSD=5F1.3
126: 000000000004c034 684 =46UNC GLOBAL DE=46AULT= 14 ccosh=40=40=46BSD=5F1.3
127: 0000000000033510 24 =46UNC GLOBAL D= E=46AULT 14 =5F=5Fisfinite=40=40=46BSD=5F1.0
128: 000000000002768c 2= 00 =46UNC GLOBAL DE=46AULT 14 acosh=40=40=46BSD=5F1.0
129: 000000000= 002b6a8 792 =46UNC GLOBAL DE=46AULT 14 jnf=40=40=46BSD=5F1.0
130: 00= 0000000002bb08 12 =46UNC GLOBAL DE=46AULT 14 lgamma=40=40=46BSD=5F1.0 131: 00000000000335d8 36 =46UNC GLOBAL DE=46AULT 14 =5F=5Fisnormall=40=40= =46BSD=5F1.0
132: 0000000000035190 44 =46UNC GLOBAL DE=46AULT 14 sig= nificand=40=40=46BSD=5F1.0
133: 000000000003888c 24 =46UNC GLOBAL DE= =46AULT 14 fabsl=40=40=46BSD=5F1.0
134: 000000000004b104 764 =46UNC = GLOBAL DE=46AULT 14 catanh=40=40=46BSD=5F1.3
135: 00000000000333a0 1= 16 =46UNC GLOBAL DE=46AULT 14 ilogb=40=40=46BSD=5F1.0
136: 000000000= 00339d4 692 =46UNC GLOBAL DE=46AULT 14 log1pf=40=40=46BSD=5F1.0
137:= 000000000002cd84 432 =46UNC GLOBAL DE=46AULT 14 log2=40=40=46BSD=5F1.2 <= br> 138: 00000000000307bc 620 =46UNC GLOBAL DE=46AULT 14 clog=40=40=46BSD= =5F1.5
139: 0000000000031dec 808 =46UNC GLOBAL DE=46AULT 14 erff=40=40= =46BSD=5F1.0
140: 0000000000034f24 104 =46UNC GLOBAL DE=46AULT 14 ro= und=40=40=46BSD=5F1.0
141: 0000000000027bc0 668 =46UNC GLOBAL DE=46A= ULT 14 atan2=40=40=46BSD=5F1.0
142: 000000000003441c 280 =46UNC GLOB= AL DE=46AULT 14 nextafter=40=40=46BSD=5F1.0
143: 000000000004ba1c 44= =46UNC GLOBAL DE=46AULT 14 casinf=40=40=46BSD=5F1.3
144: 0000000000= 04cb90 4 =46UNC GLOBAL DE=46AULT 14 creal=40=40=46BSD=5F1.0
145: 000= 0000000028644 536 =46UNC GLOBAL DE=46AULT 14 expf=40=40=46BSD=5F1.0
= 146: 0000000000028d60 552 =46UNC GLOBAL DE=46AULT 14 hypot=40=40=46BSD=5F= 1.0
147: 0000000000033540 32 =46UNC GLOBAL DE=46AULT 14 =5F=5Fisfini= tel=40=40=46BSD=5F1.0
148: 000000000003aba0 2588 =46UNC GLOBAL DE=46= AULT 14 acosl=40=40=46BSD=5F1.1
149: 0000000000028420 548 =46UNC GLO= BAL DE=46AULT 14 exp=40=40=46BSD=5F1.0
150: 0000000000028d5c 4 =46UN= C GLOBAL DE=46AULT 14 gammaf=5Fr=40=40=46BSD=5F1.0
151: 000000000003= 2df8 28 =46UNC GLOBAL DE=46AULT 14 finite=40=40=46BSD=5F1.0
152: 000= 000000003aa14 44 =46UNC GLOBAL DE=46AULT 14 catanl=40=40=46BSD=5F1.5
= 153: 0000000000046c64 448 =46UNC GLOBAL DE=46AULT 14 nexttowardl=40=40=46= BSD=5F1.0
154: 000000000004a174 920 =46UNC GLOBAL DE=46AULT 14 tanpi= l=40=40=46BSD=5F1.7
155: 000000000004a808 760 =46UNC GLOBAL DE=46AUL= T 14 casinh=40=40=46BSD=5F1.3
156: 000000000002ec44 8 =46UNC GLOBAL = DE=46AULT 14 sqrtf=40=40=46BSD=5F1.0
157: 00000000000343a0 52 =46UNC= GLOBAL DE=46AULT 14 nearbyintf=40=40=46BSD=5F1.0
158: 000000000002c= c04 384 =46UNC GLOBAL DE=46AULT 14 log10f=40=40=46BSD=5F1.0
159: 000= 000000004bd2c 732 =46UNC GLOBAL DE=46AULT 14 catanhf=40=40=46BSD=5F1.3 160: 0000000000028348 216 =46UNC GLOBAL DE=46AULT 14 coshf=40=40=46BSD= =5F1.0
161: 00000000000351e8 956 =46UNC GLOBAL DE=46AULT 14 sin=40=40= =46BSD=5F1.0
162: 0000000000037448 1024 =46UNC GLOBAL DE=46AULT 14 c= ospif=40=40=46BSD=5F1.7
163: 0000000000045d24 1048 =46UNC GLOBAL DE=46= AULT 14 log1pl=40=40=46BSD=5F1.3
164: 00000000000426b4 3176 =46UNC G= LOBAL DE=46AULT 14 erfl=40=40=46BSD=5F1.3
165: 000000000004d2a8 420 = =46UNC GLOBAL DE=46AULT 14 ctanhf=40=40=46BSD=5F1.3
166: 00000000000= 2cf34 356 =46UNC GLOBAL DE=46AULT 14 log2f=40=40=46BSD=5F1.2
167: 00= 0000000002da60 1816 =46UNC GLOBAL DE=46AULT 14 powf=40=40=46BSD=5F1.0 168: 000000000002e938 204 =46UNC GLOBAL DE=46AULT 14 scalbf=40=40=46BSD= =5F1.0
169: 0000000000030a28 620 =46UNC GLOBAL DE=46AULT 14 clogf=40= =40=46BSD=5F1.5
170: 000000000003a060 44 =46UNC GLOBAL DE=46AULT 14 = casinl=40=40=46BSD=5F1.5
171: 000000000002ecd4 12 =46UNC GLOBAL DE=46= AULT 14 fegetround=40=40=46BSD=5F1.3
172: 000000000003138c 488 =46UN= C GLOBAL DE=46AULT 14 csqrt=40=40=46BSD=5F1.1
173: 0000000000033d3c = 92 =46UNC GLOBAL DE=46AULT 14 lrint=40=40=46BSD=5F1.0
174: 000000000= 0044460 764 =46UNC GLOBAL DE=46AULT 14 expl=40=40=46BSD=5F1.3
175: 0= 000000000046e24 344 =46UNC GLOBAL DE=46AULT 14 nexttoward=40=40=46BSD=5F1= .0
176: 000000000004d27c 44 =46UNC GLOBAL DE=46AULT 14 ctan=40=40=46= BSD=5F1.3
177: 0000000000027e5c 620 =46UNC GLOBAL DE=46AULT 14 atan2= f=40=40=46BSD=5F1.0
178: 000000000004cb94 4 =46UNC GLOBAL DE=46AULT = 14 crealf=40=40=46BSD=5F1.0
179: 0000000000032a18 768 =46UNC GLOBAL = DE=46AULT 14 expm1f=40=40=46BSD=5F1.0
180: 0000000000028f88 476 =46U= NC GLOBAL DE=46AULT 14 hypotf=40=40=46BSD=5F1.0
181: 00000000000343d= 4 72 =46UNC GLOBAL DE=46AULT 14 nearbyintl=40=40=46BSD=5F1.1
182: 00= 0000000003f340 948 =46UNC GLOBAL DE=46AULT 14 sqrtl=40=40=46BSD=5F1.1 183: 0000000000009170 8 OBJECT GLOBAL DE=46AULT 11 =5F=5Ffe=5Fdfl=5Fenv= =40=40=46BSD=5F1.0
184: 000000000003a4bc 1368 =46UNC GLOBAL DE=46AUL= T 14 catanhl=40=40=46BSD=5F1.5
185: 0000000000046460 976 =46UNC GLOB= AL DE=46AULT 14 log10l=40=40=46BSD=5F1.3
186: 00000000000266cc 1860 = =46UNC GLOBAL DE=46AULT 14 tgamma=40=40=46BSD=5F1.0
187: 00000000000= 2ac80 1028 =46UNC GLOBAL DE=46AULT 14 y1f=40=40=46BSD=5F1.0
188: 000= 000000002d2a4 1980 =46UNC GLOBAL DE=46AULT 14 pow=40=40=46BSD=5F1.0
= 189: 000000000003316c 8 =46UNC GLOBAL DE=46AULT 14 fmin=40=40=46BSD=5F1.0=
190: 00000000000350dc 136 =46UNC GLOBAL DE=46AULT 14 ldexpf=40=40=46= BSD=5F1.0
191: 000000000003c280 1440 =46UNC GLOBAL DE=46AULT 14 cosh= l=40=40=46BSD=5F1.3
192: 0000000000041a04 2092 =46UNC GLOBAL DE=46AU= LT 14 cospil=40=40=46BSD=5F1.7
193: 0000000000028d50 12 =46UNC GLOBA= L DE=46AULT 14 gammaf=40=40=46BSD=5F1.0
194: 0000000000030cbc 976 =46= UNC GLOBAL DE=46AULT 14 cos=40=40=46BSD=5F1.0
195: 000000000003e02c = 3244 =46UNC GLOBAL DE=46AULT 14 powl=40=40=46BSD=5F1.3
196: 00000000= 00040f9c 1408 =46UNC GLOBAL DE=46AULT 14 clogl=40=40=46BSD=5F1.5
197= : 0000000000046830 976 =46UNC GLOBAL DE=46AULT 14 log2l=40=40=46BSD=5F1.3=
198: 000000000004ba48 628 =46UNC GLOBAL DE=46AULT 14 cacosf=40=40=46= BSD=5F1.3
199: 00000000000316e4 880 =46UNC GLOBAL DE=46AULT 14 erf=40= =40=46BSD=5F1.0
200: 0000000000037050 4 =46UNC GLOBAL DE=46AULT 14 c= abs=40=40=46BSD=5F1.0
201: 000000000003504c 144 =46UNC GLOBAL DE=46A= ULT 14 scalbn=40=40=46BSD=5F1.0
202: 000000000003bd98 876 =46UNC GLO= BAL DE=46AULT 14 atan2l=40=40=46BSD=5F1.1
203: 000000000003ce44 4584= =46UNC GLOBAL DE=46AULT 14 lgammal=5Fr=40=40=46BSD=5F1.4
204: 00000= 0000004b090 116 =46UNC GLOBAL DE=46AULT 14 cacosh=40=40=46BSD=5F1.3
= 205: 000000000004cb98 4 =46UNC GLOBAL DE=46AULT 14 creall=40=40=46BSD=5F1= .0
206: 000000000002ec68 28 =46UNC GLOBAL DE=46AULT 14 fegetexceptfl= ag=40=40=46BSD=5F1.3
207: 000000000002ece0 48 =46UNC GLOBAL DE=46AUL= T 14 fesetround=40=40=46BSD=5F1.3
208: 0000000000036ee0 28 =46UNC GL= OBAL DE=46AULT 14 tgammaf=40=40=46BSD=5F1.1
209: 000000000003ca84 94= 8 =46UNC GLOBAL DE=46AULT 14 hypotl=40=40=46BSD=5F1.1
210: 000000000= 004475c 2252 =46UNC GLOBAL DE=46AULT 14 expm1l=40=40=46BSD=5F1.3
211= : 0000000000027818 564 =46UNC GLOBAL DE=46AULT 14 asin=40=40=46BSD=5F1.0 =
212: 0000000000035dbc 1368 =46UNC GLOBAL DE=46AULT 14 sincosf=40=40=46= BSD=5F1.5
213: 0000000000033414 80 =46UNC GLOBAL DE=46AULT 14 ilogbf= =40=40=46BSD=5F1.0
214: 0000000000034f8c 108 =46UNC GLOBAL DE=46AULT= 14 roundf=40=40=46BSD=5F1.0
215: 0000000000047544 208 =46UNC GLOBAL= DE=46AULT 14 ldexpl=40=40=46BSD=5F1.0
216: 00000000000303f4 16 =46U= NC GLOBAL DE=46AULT 14 carg=40=40=46BSD=5F1.1
217: 0000000000033df4 = 8 =46UNC GLOBAL DE=46AULT 14 lround=40=40=46BSD=5F1.0
218: 000000000= 0033dfc 8 =46UNC GLOBAL DE=46AULT 14 lroundf=40=40=46BSD=5F1.0
219: = 000000000003a08c 868 =46UNC GLOBAL DE=46AULT 14 cacosl=40=40=46BSD=5F1.5 =
220: 000000000002c810 556 =46UNC GLOBAL DE=46AULT 14 log=40=40=46BSD= =5F1.0
221: 0000000000031574 368 =46UNC GLOBAL DE=46AULT 14 csqrtf=40= =40=46BSD=5F1.1
222: 00000000000336b4 8 =46UNC GLOBAL DE=46AULT 14 l= lround=40=40=46BSD=5F1.0
223: 0000000000034d64 332 =46UNC GLOBAL DE=46= AULT 14 rint=40=40=46BSD=5F1.0
224: 0000000000034534 204 =46UNC GLOB= AL DE=46AULT 14 nextafterf=40=40=46BSD=5F1.0
225: 0000000000038a94 1= 976 =46UNC GLOBAL DE=46AULT 14 tgammal=40=40=46BSD=5F1.3
226: 000000= 000004bcbc 112 =46UNC GLOBAL DE=46AULT 14 cacoshf=40=40=46BSD=5F1.3
= 227: 0000000000037848 816 =46UNC GLOBAL DE=46AULT 14 sinpi=40=40=46BSD=5F= 1.7
228: 0000000000033560 28 =46UNC WEAK DE=46AULT 14 isnanf=40=40=46= BSD=5F1.0
229: 0000000000032448 420 =46UNC GLOBAL DE=46AULT 14 exp2=40= =40=46BSD=5F1.0
230: 0000000000033464 172 =46UNC GLOBAL DE=46AULT 14= ilogbl=40=40=46BSD=5F1.0
231: 000000000004743c 264 =46UNC GLOBAL DE= =46AULT 14 roundl=40=40=46BSD=5F1.0
232: 0000000000047aec 5256 =46UN= C GLOBAL DE=46AULT 14 sincosl=40=40=46BSD=5F1.5
233: 000000000004c2f= 4 640 =46UNC GLOBAL DE=46AULT 14 ccoshf=40=40=46BSD=5F1.3
234: 00000= 000000271c0 684 =46UNC GLOBAL DE=46AULT 14 acos=40=40=46BSD=5F1.0
23= 5: 0000000000034b00 612 =46UNC GLOBAL DE=46AULT 14 remquof=40=40=46BSD=5F= 1.0
236: 00000000000369ec 808 =46UNC GLOBAL DE=46AULT 14 tanf=40=40=46= BSD=5F1.0
237: 000000000002ff5c 244 =46UNC GLOBAL DE=46AULT 14 asinh= f=40=40=46BSD=5F1.0
238: 0000000000035170 12 =46UNC GLOBAL DE=46AULT= 14 =5F=5Fsignbitf=40=40=46BSD=5F1.0
239: 0000000000033e04 104 =46UN= C GLOBAL DE=46AULT 14 lroundl=40=40=46BSD=5F1.0
240: 0000000000033e6= c 120 =46UNC GLOBAL DE=46AULT 14 modff=40=40=46BSD=5F1.0
241: 000000= 000004c7dc 8 =46UNC GLOBAL DE=46AULT 14 conj=40=40=46BSD=5F1.0
242: = 0000000000030424 256 =46UNC GLOBAL DE=46AULT 14 cbrt=40=40=46BSD=5F1.0 243: 0000000000032e2c 304 =46UNC GLOBAL DE=46AULT 14 floor=40=40=46BSD= =5F1.0
244: 0000000000036d14 232 =46UNC GLOBAL DE=46AULT 14 tanh=40=40= =46BSD=5F1.0
245: 0000000000037058 4 =46UNC GLOBAL DE=46AULT 14 drem= =40=40=46BSD=5F1.0
246: 00000000000335fc 92 =46UNC GLOBAL DE=46AULT = 14 llrint=40=40=46BSD=5F1.0
247: 0000000000042298 1052 =46UNC GLOBAL= DE=46AULT 14 csqrtl=40=40=46BSD=5F1.1
248: 0000000000036314 824 =46= UNC GLOBAL DE=46AULT 14 sinf=40=40=46BSD=5F1.0
249: 000000000003664c= 928 =46UNC GLOBAL DE=46AULT 14 tan=40=40=46BSD=5F1.0
250: 000000000= 003a3f0 204 =46UNC GLOBAL DE=46AULT 14 cacoshl=40=40=46BSD=5F1.5
251= : 0000000000046c64 448 =46UNC GLOBAL DE=46AULT 14 nextafterl=40=40=46BSD=5F= 1.0
252: 000000000002a8cc 948 =46UNC GLOBAL DE=46AULT 14 j1f=40=40=46= BSD=5F1.0
253: 000000000004c7e4 8 =46UNC GLOBAL DE=46AULT 14 conjf=40= =40=46BSD=5F1.0
254: 000000000002ea04 284 =46UNC GLOBAL DE=46AULT 14= sinh=40=40=46BSD=5F1.0
255: 0000000000046f7c 1020 =46UNC GLOBAL DE=46= AULT 14 remquol=40=40=46BSD=5F1.1
256: 0000000000049cd8 1180 =46UNC = GLOBAL DE=46AULT 14 tanl=40=40=46BSD=5F1.1
257: 000000000004c6ac 280= =46UNC GLOBAL DE=46AULT 14 cexpf=40=40=46BSD=5F1.2
258: 00000000000= 32f5c 168 =46UNC GLOBAL DE=46AULT 14 floorf=40=40=46BSD=5F1.0
259: 0= 000000000035014 28 =46UNC GLOBAL DE=46AULT 14 scalblnf=40=40=46BSD=5F1.0 =
260: 000000000003517c 20 =46UNC GLOBAL DE=46AULT 14 =5F=5Fsignbitl=40= =40=46BSD=5F1.0
261: 0000000000037054 4 =46UNC GLOBAL DE=46AULT 14 c= absf=40=40=46BSD=5F1.0
262: 0000000000038984 272 =46UNC GLOBAL DE=46= AULT 14 modfl=40=40=46BSD=5F1.0
263: 000000000003fff4 412 =46UNC GLO= BAL DE=46AULT 14 asinhl=40=40=46BSD=5F1.3
264: 000000000003271c 764 = =46UNC GLOBAL DE=46AULT 14 expm1=40=40=46BSD=5F1.0
265: 000000000002= e620 348 =46UNC GLOBAL DE=46AULT 14 remainder=40=40=46BSD=5F1.0
266:= 000000000002ed64 24 =46UNC GLOBAL DE=46AULT 14 fesetenv=40=40=46BSD=5F1.= 3
252: 000000000002a8cc 948 =46UNC GLOBAL DE=46AULT 14 j1f=40=40=46B= SD=5F1.0
253: 000000000004c7e4 8 =46UNC GLOBAL DE=46AULT 14 conjf=40= =40=46BSD=5F1.0
254: 000000000002ea04 284 =46UNC GLOBAL DE=46AULT 14= sinh=40=40=46BSD=5F1.0
255: 0000000000046f7c 1020 =46UNC GLOBAL DE=46= AULT 14 remquol=40=40=46BSD=5F1.1
256: 0000000000049cd8 1180 =46UNC = GLOBAL DE=46AULT 14 tanl=40=40=46BSD=5F1.1
257: 000000000004c6ac 280= =46UNC GLOBAL DE=46AULT 14 cexpf=40=40=46BSD=5F1.2
258: 00000000000= 32f5c 168 =46UNC GLOBAL DE=46AULT 14 floorf=40=40=46BSD=5F1.0
259: 0= 000000000035014 28 =46UNC GLOBAL DE=46AULT 14 scalblnf=40=40=46BSD=5F1.0 =
260: 000000000003517c 20 =46UNC GLOBAL DE=46AULT 14 =5F=5Fsignbitl=40= =40=46BSD=5F1.0
261: 0000000000037054 4 =46UNC GLOBAL DE=46AULT 14 c= absf=40=40=46BSD=5F1.0
262: 0000000000038984 272 =46UNC GLOBAL DE=46= AULT 14 modfl=40=40=46BSD=5F1.0
263: 000000000003fff4 412 =46UNC GLO= BAL DE=46AULT 14 asinhl=40=40=46BSD=5F1.3
264: 000000000003271c 764 = =46UNC GLOBAL DE=46AULT 14 expm1=40=40=46BSD=5F1.0
265: 000000000002= e620 348 =46UNC GLOBAL DE=46AULT 14 remainder=40=40=46BSD=5F1.0
266:= 000000000002ed64 24 =46UNC GLOBAL DE=46AULT 14 fesetenv=40=40=46BSD=5F1.= 3
267: 0000000000032e14 24 =46UNC GLOBAL DE=46AULT 14 finitef=40=40=46= BSD=5F1.0
268: 000000000003300c 8 =46UNC GLOBAL DE=46AULT 14 fmaf=40= =40=46BSD=5F1.0
269: 00000000000335a0 28 =46UNC GLOBAL DE=46AULT 14 = =5F=5Fisnormal=40=40=46BSD=5F1.0
270: 0000000000047614 1240 =46UNC G= LOBAL DE=46AULT 14 sinl=40=40=46BSD=5F1.1
271: 0000000000030ca8 20 =46= UNC GLOBAL DE=46AULT 14 copysignf=40=40=46BSD=5F1.0
272: 00000000000= 32d4c 44 =46UNC GLOBAL DE=46AULT 14 fdimf=40=40=46BSD=5F1.0
273: 000= 000000004c7ec 24 =46UNC GLOBAL DE=46AULT 14 conjl=40=40=46BSD=5F1.0
= 274: 000000000004c8c4 192 =46UNC GLOBAL DE=46AULT 14 cpowf=40=40=46BSD=5F= 1.5
275: 000000000002e77c 300 =46UNC GLOBAL DE=46AULT 14 remainderf=40= =40=46BSD=5F1.0
276: 00000000000325ec 304 =46UNC GLOBAL DE=46AULT 14= exp2f=40=40=46BSD=5F1.0
277: 0000000000040bb4 1000 =46UNC GLOBAL DE= =46AULT 14 cexpl=40=40=46BSD=5F1.7
278: 0000000000028b80 448 =46UNC = GLOBAL DE=46AULT 14 fmodf=40=40=46BSD=5F1.0
279: 0000000000035030 28= =46UNC GLOBAL DE=46AULT 14 scalblnl=40=40=46BSD=5F1.0
280: 00000000= 000351bc 44 =46UNC GLOBAL DE=46AULT 14 significandf=40=40=46BSD=5F1.0 281: 0000000000037e50 1156 =46UNC GLOBAL DE=46AULT 14 tanpi=40=40=46BSD= =5F1.7
282: 0000000000045028 640 =46UNC GLOBAL DE=46AULT 14 floorl=40= =40=46BSD=5F1.0
283: 000000000004a804 4 =46UNC GLOBAL DE=46AULT 14 c= absl=40=40=46BSD=5F1.1
284: 0000000000033174 8 =46UNC GLOBAL DE=46AU= LT 14 fminf=40=40=46BSD=5F1.0
285: 0000000000033224 160 =46UNC GLOBA= L DE=46AULT 14 fminimumf=40=40=46BSD=5F1.9
286: 00000000000452a8 131= 6 =46UNC GLOBAL DE=46AULT 14 fmal=40=40=46BSD=5F1.0
287: 00000000000= 30050 500 =46UNC GLOBAL DE=46AULT 14 atan=40=40=46BSD=5F1.0
288: 000= 0000000028194 200 =46UNC GLOBAL DE=46AULT 14 atanhf=40=40=46BSD=5F1.0 289: 000000000002b488 544 =46UNC GLOBAL DE=46AULT 14 yn=40=40=46BSD=5F1= .0
290: 000000000003108c 768 =46UNC GLOBAL DE=46AULT 14 cosf=40=40=46= BSD=5F1.0
291: 0000000000033024 168 =46UNC GLOBAL DE=46AULT 14 fmaxi= mum=40=40=46BSD=5F1.9
292: 000000000003436c 52 =46UNC GLOBAL DE=46AU= LT 14 nearbyint=40=40=46BSD=5F1.0
293: 000000000006f93c 4 OBJECT GLO= BAL DE=46AULT 24 signgam=40=40=46BSD=5F1.0
294: 0000000000032d78 128= =46UNC GLOBAL DE=46AULT 14 fdiml=40=40=46BSD=5F1.0
295: 00000000000= 34728 984 =46UNC GLOBAL DE=46AULT 14 remquo=40=40=46BSD=5F1.0
296: 0= 00000000003886c 32 =46UNC GLOBAL DE=46AULT 14 copysignl=40=40=46BSD=5F1.0=
297: 000000000004c984 328 =46UNC GLOBAL DE=46AULT 14 cpowl=40=40=46= BSD=5F1.5
298: 000000000002825c 236 =46UNC GLOBAL DE=46AULT 14 cosh=40= =40=46BSD=5F1.0
299: 00000000000350dc 136 =46UNC GLOBAL DE=46AULT 14= scalbnf=40=40=46BSD=5F1.0
300: 000000000003ecd8 76 =46UNC GLOBAL DE= =46AULT 14 remainderl=40=40=46BSD=5F1.1
301: 0000000000044190 720 =46= UNC GLOBAL DE=46AULT 14 exp2l=40=40=46BSD=5F1.1
302: 00000000000355a= 4 2072 =46UNC GLOBAL DE=46AULT 14 sincos=40=40=46BSD=5F1.5
303: 0000= 0000000336bc 8 =46UNC GLOBAL DE=46AULT 14 llroundf=40=40=46BSD=5F1.0
= 304: 0000000000034eb0 116 =46UNC GLOBAL DE=46AULT 14 rintf=40=40=46BSD=5F= 1.0
305: 000000000003c820 612 =46UNC GLOBAL DE=46AULT 14 fmodl=40=40= =46BSD=5F1.1





<= blockquote type=3D=22cite=22>
referenced by host.cpp
= host.cpp.o:(=46ortran::evaluate::host::Host=46loatingPointEnvironment::Se= tUpHost=46loatingPointEnvironment(=46ortran::evaluate::=46oldingContext&a= mp;)) in archive lib/lib=46ortranEvaluate.a

ld: error: undefined symbol: fegetenv
referenced by host.cpp
host.cpp.o:(=46ortran::evaluate::host::Ho= st=46loatingPointEnvironment::SetUpHost=46loatingPointEnvironment(=46ortr= an::evaluate::=46oldingContext&)) in archive lib/lib=46ortranEvaluate= .a
did you mean: fesetenv
defined in: /usr/lib/libm.so
c++: error: linker command failed with e= xit code 1 (use -v to see invocation)
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D

All of math/py-numpy1 consumers (math/Imath for exa= mple):
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
-- Configuri= ng imathnumpy module
Traceback (most recent call last):
=46ile =22= /usr/local/lib/python3.11/site-packages/numpy/core/=5F=5Finit=5F=5F.py=22= , line 24, in <module>
from . import multiarray
=46ile =22/= usr/local/lib/python3.11/site-packages/numpy/core/multiarray.py=22, line = 10, in <module>
from . import overrides
=46ile =22/usr/loca= l/lib/python3.11/site-packages/numpy/core/overrides.py=22, line 8, in <= ;module>
from numpy.core.=5Fmultiarray=5Fumath import (
Import= Error: /usr/local/lib/python3.11/site-packages/numpy/core/=5Fmultiarray=5F= umath.cpython-311.so: Undefined symbol =22feraiseexcept=22

Durin= g handling of the above exception, another exception occurred:

T= raceback (most recent call last):
=46ile =22/usr/local/lib/python3.11= /site-packages/numpy/=5F=5Finit=5F=5F.py=22, line 130, in <module> =
from numpy.=5F=5Fconfig=5F=5F import show as show=5Fconfig
=46ile= =22/usr/local/lib/python3.11/site-packages/numpy/=5F=5Fconfig=5F=5F.py=22= , line 4, in <module>
from numpy.core.=5Fmultiarray=5Fumath imp= ort (
=46ile =22/usr/local/lib/python3.11/site-packages/numpy/core/=5F= =5Finit=5F=5F.py=22, line 50, in <module>
raise ImportError(msg= )
ImportError:
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
=


--
Sincerely,
Dima (fluffy=40= =46reeBSD.org, https://t.me/=46luffyBSD, =40fluffy:matrix-dev.freebsd.org= )
(desktop, kde, x11, office, ports-secteam)=40=46reeBSD team
--69d3de6e_66334873_d4c2-- From nobody Mon Apr 6 16:45:06 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fqFYq5nQ4z6YKyV; Mon, 06 Apr 2026 16:45:19 +0000 (UTC) (envelope-from kib@freebsd.org) 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 4fqFYq2C31z43ZG; Mon, 06 Apr 2026 16:45:19 +0000 (UTC) (envelope-from kib@freebsd.org) Authentication-Results: mx1.freebsd.org; none Received: from tom.home (kib@localhost [127.0.0.1] (may be forged)) by kib.kiev.ua (8.18.1/8.18.1) with ESMTP id 636Gj6Us032629; Mon, 6 Apr 2026 19:45:09 +0300 (EEST) (envelope-from kib@freebsd.org) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 636Gj6Us032629 Received: (from kostik@localhost) by tom.home (8.18.1/8.18.1/Submit) id 636Gj6lj032628; Mon, 6 Apr 2026 19:45:06 +0300 (EEST) (envelope-from kib@freebsd.org) X-Authentication-Warning: tom.home: kostik set sender to kib@freebsd.org using -f Date: Mon, 6 Apr 2026 19:45:06 +0300 From: Konstantin Belousov To: Dima Panov Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 3a01e1e1a50c - main - msun/aarch64: convert fenv functions to proper linkage Message-ID: References: <69caafbb.408c4.7b20a1e1@gitrepo.freebsd.org> <1f2ad4f0-a4ab-4f15-a779-5f1a6db9912b@FreeBSD.org> <8022afad-9cee-4ade-8b56-ef5b7feb6e16@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: <8022afad-9cee-4ade-8b56-ef5b7feb6e16@FreeBSD.org> X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham autolearn_force=no version=4.0.2 X-Spam-Checker-Version: SpamAssassin 4.0.2 (2025-08-27) on tom.home X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US] X-Rspamd-Queue-Id: 4fqFYq2C31z43ZG X-Spamd-Bar: ---- On Mon, Apr 06, 2026 at 07:25:18PM +0300, Dima Panov wrote: > > > On 06.04.2026 19:07, Konstantin Belousov wrote: > > On Mon, Apr 06, 2026 at 06:56:36PM +0300, Dima Panov wrote: > > > Hello! > > > > > > This breaks most of libm consumers > > > > > > llvm/flang: > > > =============== > > > FAILED: [code=1] bin/flang-20 > > > : && /usr/local/libexec/ccache/c++ -O2 -pipe -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -isystem /usr/local/include -fPIC -fno-semantic-interposition -fvisibility-inline > > > s-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-s > > > emi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupport > > > ed -fdiagnostics-color -ffunction-sections -fdata-sections -Wno-deprecated-copy -Wno-string-conversion -Wno-ctad-maybe-unsupported -Wno-unused-command-line-argument -Wstring-conversion -Wcover > > > ed-switch-default -Wno-nested-anon-types -O2 -pipe -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -isystem /usr/local/include -DNDEBUG -Wl,--color-diagnostics -Wl,--expor > > > t-dynamic -Wl,-z,origin -Wl,--gc-sections -Xlinker --dependency-file=tools/flang/tools/flang-driver/CMakeFiles/flang.dir/link.d tools/flang/tools/flang-driver/CMakeFiles/flang.dir/driver.cpp.o tools/ > > > flang/tools/flang-driver/CMakeFiles/flang.dir/fc1_main.cpp.o -o bin/flang-20 -L/wrkdirs/usr/ports/devel/llvm20/work-default/.build/./lib -Wl,-rpath,"\$ORIGIN/../lib:/wrkdirs/usr/ports/devel/llvm20/work- > > > default/.build/./lib:/wrkdirs/usr/ports/devel/llvm20/work-default/.build/lib:" -lpthread lib/libflangFrontend.a lib/libflangFrontendTool.a lib/libFortranLower.a lib/libFortranSemantics.a lib/libFo > > > rtranSupport.a lib/libflangPasses.a lib/libHLFIRTransforms.a lib/libFIRTransforms.a lib/libFIROpenACCSupport.a lib/libFlangOpenMPTransforms.a lib/libFIRCodeGen.a lib/libFIRAnalysis.a lib/libFIRB > > > uilder.a lib/libCUFDialect.a lib/libFortranEvaluate.a lib/libFortranParser.a lib/libFortranCommon.a lib/libFortranDecimal.a lib/libFIRSupport.a lib/libHLFIRDialect.a lib/libFIRDialect.a lib/lib > > > FIRDialectSupport.a lib/libCUFAttrs.a lib/libclang-cpp.so.20.1 lib/libMLIR.so.20.1 lib/libLLVM.so.20.1 && : > > > ld: error: undefined symbol: feholdexcept > > > > This is strange. Could you show me the output of e.g. > > readelf --dyn_syms /lib/libm.so.5 | grep feholdexcept > > The best would be the output from the command like above for each missing > > symbol. > > missing :( > > FreeBSD 16.0-CURRENT #0 main-cf1f21572897: Mon Apr 6 13:45:02 MSK 2026 > > root@aarch64:/ # readelf --dyn-syms /lib/libm.so.5 | grep feholdexcept > root@aarch64:/ # Hm, ok, perhaps I understand. These symbols where never exported from libm, and it just happens that they were compiled into the binaries itself due to extern inline. So the proper fix for consumers that want the symbols is to export them from libm.so. > > full list of symbols: > > Symbol table '.dynsym' contains 306 entries: It is practically impossible to get the missed symbols from the list of present symbols. Try this, if there is something else missed, add the symbols to msun/aarch64/Symbol.map. I did not even tried to (cross-) compile. I will think how to get the complete list to export, meantime. This should also be problem on any arch that provides non-standard fenv functions. commit 7573286180010304ca982d09ce5a980740e1e35e Author: Konstantin Belousov Date: Mon Apr 6 19:41:23 2026 +0300 lib/msun: export arch-specific fenv methods diff --git a/lib/msun/Makefile b/lib/msun/Makefile index 5112337f6297..b6e77fed5d9c 100644 --- a/lib/msun/Makefile +++ b/lib/msun/Makefile @@ -115,6 +115,10 @@ LIBC_ARCH=${MACHINE_CPUARCH} CFLAGS+= -I${.CURDIR}/src -I${LIBC_SRCTOP}/include \ -I${LIBC_SRCTOP}/${LIBC_ARCH} SYM_MAPS+= ${.CURDIR}/Symbol.map +ARCH_MAP= ${.CURDIR}/${LIBC_ARCH}/Symbol.map +.if exists(${ARCH_MAP}) +SYM_MAPS+= ${ARCH_MAP} +.endif VERSION_DEF= ${LIBC_SRCTOP}/Versions.def SYMBOL_MAPS= ${SYM_MAPS} diff --git a/lib/msun/aarch64/Symbol.map b/lib/msun/aarch64/Symbol.map new file mode 100644 index 000000000000..d24d7820ba98 --- /dev/null +++ b/lib/msun/aarch64/Symbol.map @@ -0,0 +1,5 @@ +FBSD_1.9 { + fegetenv; + feholdexcept; + feraiseexcept; +}; From nobody Mon Apr 6 16:58:37 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fqFsF3mB5z6YLjf; Mon, 06 Apr 2026 16:58:41 +0000 (UTC) (envelope-from fluffy@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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fqFsF1Q5dz45xn; Mon, 06 Apr 2026 16:58:41 +0000 (UTC) (envelope-from fluffy@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775494721; 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=p449E5QIpfHRBzBLOxPaBiBMIt9Ehxh0ddj0XkWjj3Y=; b=IIrM7xYfuVqutei+s4+kTdwZIkYw9JYdPG+EsQC0yGRT+XzOqHreJU++WEVeMn24lAdkt1 hC6NM0qrJujbFYG+jgrLNq7SBRw+MF6YUH6tQS1XU/FH5u9Qx4hIwH1JMgd7itpicbc+lP 7vH+kbD0Llq434VQA08b2KnyBOU0Alu1erekvrbD+psVAXCL2DNMEpZjP1tC0Xxyl+cBDd UG86Y/dHyWuEhHcW9vsyNm9wKCIOOjYkpMLyx0eXwyAx2OWm4x61Bqbco2sB3FMQpQzwX7 AvNbozp77ZKfCoj4xcUi0YFXFKM3/9GRtadjML1eMJbjPFsI+To7/5acxqmgfg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775494721; a=rsa-sha256; cv=none; b=ej+//xBglfS3Ay834quX3t6alwpAp36Antc69oiWEKgbBv3DpMvUthV+hNmOcGHl4r/ewQ lIDhWHevKUiYY+BcC2MGmBCFaF/9D/yx0tLsEehRAaUM74IEQhlXi1nkj7iWViIgOD7zMn ZMKY3YoAHk5M6nBds0HZMT308zno8b4W02PngtHCFOnQ4EPJeTPit+Es3hQRCqa2p2yKwj KPDzyUEemyQGZRhS5ySCW7ucv5pbZhFDV+2Df1ULhFsrz0mGvf6HTAPUBTQAEmaSCmy98f aY3jGQa4kORic+tRE1w6dgmOF76TNKF6r2Mi513SKHgYbMZJLKuN33J3nkUyWA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775494721; 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=p449E5QIpfHRBzBLOxPaBiBMIt9Ehxh0ddj0XkWjj3Y=; b=wh0tnhfn2842KrhWEhNoN2qrk7wFdOdMuNMf1LWl9iXfF2FirXEFuisyNNw6pNQfV3pgvw kHmJuNDTtqxNp6pY9upV70/mulZ5U3pw81eNaaRMC7C9fxMohhOrfjboJMeThmfA8sNgBm NS6ulPbOnFzrdQD+M1ldXEfpWdCBNXXsi/CJH8P2YT6ydD9/WyhV/Lw7i9tp08SK4o0wtW /CoJXqPhGiyPmtQG455Jr7O0B7m5UF8yJYWddfUE9q9JYbcaYUzyrFCq5tLEY3w2fxJWDR uSVXfZrnLlWeO/AIf5eVbaioAkvH3+hlPDWYRbTyjJimz44RtojSxlMj+qT7nQ== Received: from [2a05:3580:e727:cd00::10:0] (unknown [IPv6:2a05:3580:e727:cd00:6028:73dc:5e69:9ca0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: fluffy) by smtp.freebsd.org (Postfix) with ESMTPSA id 4fqFsD3bR5z1CqG; Mon, 06 Apr 2026 16:58:40 +0000 (UTC) (envelope-from fluffy@FreeBSD.org) Date: Mon, 6 Apr 2026 19:58:37 +0300 From: Dima Panov To: Konstantin Belousov Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Message-ID: In-Reply-To: References: <69caafbb.408c4.7b20a1e1@gitrepo.freebsd.org> <1f2ad4f0-a4ab-4f15-a779-5f1a6db9912b@FreeBSD.org> <8022afad-9cee-4ade-8b56-ef5b7feb6e16@FreeBSD.org> Subject: git: 3a01e1e1a50c - main - msun/aarch64: convert fenv functions to proper linkage List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: 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="69d3e63d_2ae8944a_d4c2" --69d3e63d_2ae8944a_d4c2 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline On 06.04.2026 19:45, Konstantin Belousov wrote: > On Mon, Apr 06, 2026 at 07:25:18PM +0300, Dima Panov wrote: > > > > > > On 06.04.2026 19:07, Konstantin Belousov wrote: > > > On Mon, Apr 06, 2026 at 06:56:36PM +0300, Dima Panov wrote: > > > > Hello! > > > > > > > > This breaks most of libm consumers > > > > > > > > llvm/flang: > > > > =============== > > > > FAILED: [code=1] bin/flang-20 > > > > : && /usr/local/libexec/ccache/c++ -O2 -pipe -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -isystem /usr/local/include -fPIC -fno-semantic-interposition -fvisibility-inline > > > > s-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-s > > > > emi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupport > > > > ed -fdiagnostics-color -ffunction-sections -fdata-sections -Wno-deprecated-copy -Wno-string-conversion -Wno-ctad-maybe-unsupported -Wno-unused-command-line-argument -Wstring-conversion -Wcover > > > > ed-switch-default -Wno-nested-anon-types -O2 -pipe -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -isystem /usr/local/include -DNDEBUG -Wl,--color-diagnostics -Wl,--expor > > > > t-dynamic -Wl,-z,origin -Wl,--gc-sections -Xlinker --dependency-file=tools/flang/tools/flang-driver/CMakeFiles/flang.dir/link.d tools/flang/tools/flang-driver/CMakeFiles/flang.dir/driver.cpp.o tools/ > > > > flang/tools/flang-driver/CMakeFiles/flang.dir/fc1_main.cpp.o -o bin/flang-20 -L/wrkdirs/usr/ports/devel/llvm20/work-default/.build/./lib -Wl,-rpath,"\$ORIGIN/../lib:/wrkdirs/usr/ports/devel/llvm20/work- > > > > default/.build/./lib:/wrkdirs/usr/ports/devel/llvm20/work-default/.build/lib:" -lpthread lib/libflangFrontend.a lib/libflangFrontendTool.a lib/libFortranLower.a lib/libFortranSemantics.a lib/libFo > > > > rtranSupport.a lib/libflangPasses.a lib/libHLFIRTransforms.a lib/libFIRTransforms.a lib/libFIROpenACCSupport.a lib/libFlangOpenMPTransforms.a lib/libFIRCodeGen.a lib/libFIRAnalysis.a lib/libFIRB > > > > uilder.a lib/libCUFDialect.a lib/libFortranEvaluate.a lib/libFortranParser.a lib/libFortranCommon.a lib/libFortranDecimal.a lib/libFIRSupport.a lib/libHLFIRDialect.a lib/libFIRDialect.a lib/lib > > > > FIRDialectSupport.a lib/libCUFAttrs.a lib/libclang-cpp.so.20.1 lib/libMLIR.so.20.1 lib/libLLVM.so.20.1 && : > > > > ld: error: undefined symbol: feholdexcept > > > > > > This is strange. Could you show me the output of e.g. > > > readelf --dyn_syms /lib/libm.so.5 | grep feholdexcept > > > The best would be the output from the command like above for each missing > > > symbol. > > > > missing :( > > > > FreeBSD 16.0-CURRENT #0 main-cf1f21572897: Mon Apr 6 13:45:02 MSK 2026 > > > > root@aarch64:/ # readelf --dyn-syms /lib/libm.so.5 | grep feholdexcept > > root@aarch64:/ # > Hm, ok, perhaps I understand. > These symbols where never exported from libm, and it just happens that > they were compiled into the binaries itself due to extern inline. > So the proper fix for consumers that want the symbols is to export them > from libm.so. > > > > > full list of symbols: > > > > Symbol table '.dynsym' contains 306 entries: > > It is practically impossible to get the missed symbols from the list of > present symbols. Try this, if there is something else missed, add the > symbols to msun/aarch64/Symbol.map. I did not even tried to (cross-) > compile. > > I will think how to get the complete list to export, meantime. > This should also be problem on any arch that provides non-standard fenv > functions. > > commit 7573286180010304ca982d09ce5a980740e1e35e > Author: Konstantin Belousov > Date: Mon Apr 6 19:41:23 2026 +0300 > > lib/msun: export arch-specific fenv methods > > diff --git a/lib/msun/Makefile b/lib/msun/Makefile > index 5112337f6297..b6e77fed5d9c 100644 > --- a/lib/msun/Makefile > +++ b/lib/msun/Makefile > @@ -115,6 +115,10 @@ LIBC_ARCH=${MACHINE_CPUARCH} > CFLAGS+= -I${.CURDIR}/src -I${LIBC_SRCTOP}/include \ > -I${LIBC_SRCTOP}/${LIBC_ARCH} > SYM_MAPS+= ${.CURDIR}/Symbol.map > +ARCH_MAP= ${.CURDIR}/${LIBC_ARCH}/Symbol.map > +.if exists(${ARCH_MAP}) > +SYM_MAPS+= ${ARCH_MAP} > +.endif > > VERSION_DEF= ${LIBC_SRCTOP}/Versions.def > SYMBOL_MAPS= ${SYM_MAPS} > diff --git a/lib/msun/aarch64/Symbol.map b/lib/msun/aarch64/Symbol.map > new file mode 100644 > index 000000000000..d24d7820ba98 > --- /dev/null > +++ b/lib/msun/aarch64/Symbol.map > @@ -0,0 +1,5 @@ > +FBSD_1.9 { > + fegetenv; > + feholdexcept; > + feraiseexcept; > +}; May be better way is repeat map from msun/arm/Symbol.map? amd64 is also equal to it here. FBSD_1.9 { fesetexceptflag; feraiseexcept; fegetenv; feholdexcept; feupdateenv; feenableexcept; fedisableexcept; fegetexcept; }; Started build with your diff anyway, will see on result -- Sincerely, Dima (fluffy@FreeBSD.org, https://t.me/FluffyBSD, @fluffy:matrix-dev.freebsd.org) (desktop, kde, x11, office, ports-secteam)@FreeBSD team --69d3e63d_2ae8944a_d4c2 Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline


On 06.04.2026 19:45, Konstantin Belousov wrote:
=
On Mon, Apr 06, 2026 at 07:25:18PM +0300, D= ima Panov wrote:


On 06.04.202= 6 19:07, Konstantin Belousov wrote:
On = Mon, Apr 06, 2026 at 06:56:36PM +0300, Dima Panov wrote:
Hello=21

This breaks most of libm consumers
llvm/flang:
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
= =46AILED: =5Bcode=3D1=5D bin/flang-20
: && /usr/local/libexec= /ccache/c++ -O2 -pipe -fstack-protector-strong -isystem /usr/local/includ= e -fno-strict-aliasing -isystem /usr/local/include -fPIC -fno-semantic-in= terposition -fvisibility-inline
s-hidden -Werror=3Ddate-time -Werror=3D= unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-st= rings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -= Wc++98-compat-extra-s
emi -Wimplicit-fallthrough -Wcovered-switch-def= ault -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsu= ggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-= unsupport
ed -fdiagnostics-color -ffunction-sections -fdata-sections = -Wno-deprecated-copy -Wno-string-conversion -Wno-ctad-maybe-unsupported -= Wno-unused-command-line-argument -Wstring-conversion -Wcover
ed-switc= h-default -Wno-nested-anon-types -O2 -pipe -fstack-protector-strong -isys= tem /usr/local/include -fno-strict-aliasing -isystem /usr/local/include -= DNDEBUG -Wl,--color-diagnostics -Wl,--expor
t-dynamic -Wl,-z,origin -= Wl,--gc-sections -Xlinker --dependency-file=3Dtools/flang/tools/flang-dri= ver/CMake=46iles/flang.dir/link.d tools/flang/tools/flang-driver/CMake=46= iles/flang.dir/driver.cpp.o tools/
flang/tools/flang-driver/CMake=46i= les/flang.dir/fc1=5Fmain.cpp.o -o bin/flang-20 -L/wrkdirs/usr/ports/devel= /llvm20/work-default/.build/./lib -Wl,-rpath,=22=5C=24ORIGIN/../lib:/wrkd= irs/usr/ports/devel/llvm20/work-
default/.build/./lib:/wrkdirs/usr/po= rts/devel/llvm20/work-default/.build/lib:=22 -lpthread lib/libflang=46ron= tend.a lib/libflang=46rontendTool.a lib/lib=46ortranLower.a lib/lib=46ort= ranSemantics.a lib/lib=46o
rtranSupport.a lib/libflangPasses.a lib/li= bHL=46IRTransforms.a lib/lib=46IRTransforms.a lib/lib=46IROpenACCSupport.= a lib/lib=46langOpenMPTransforms.a lib/lib=46IRCodeGen.a lib/lib=46IRAnal= ysis.a lib/lib=46IRB
uilder.a lib/libCU=46Dialect.a lib/lib=46ortranE= valuate.a lib/lib=46ortranParser.a lib/lib=46ortranCommon.a lib/lib=46ort= ranDecimal.a lib/lib=46IRSupport.a lib/libHL=46IRDialect.a lib/lib=46IRDi= alect.a lib/lib
=46IRDialectSupport.a lib/libCU=46Attrs.a lib/libclan= g-cpp.so.20.1 lib/libMLIR.so.20.1 lib/libLLVM.so.20.1 && :
ld= : error: undefined symbol: feholdexcept

This is str= ange. Could you show me the output of e.g.
readelf --dyn=5Fsyms /lib/= libm.so.5 =7C grep feholdexcept
The best would be the output from the= command like above for each missing
symbol.

mi= ssing :(

=46reeBSD 16.0-CURRENT =230 main-cf1f21572897: Mon Apr = 6 13:45:02 MSK 2026

root=40aarch64:/ =23 readelf --dyn-syms /lib= /libm.so.5 =7C grep feholdexcept
root=40aarch64:/ =23
Hm, ok, perhaps I understand.
These symbols where never exported fr= om libm, and it just happens that
they were compiled into the binarie= s itself due to extern inline.
So the proper fix for consumers that w= ant the symbols is to export them
from libm.so.


full list of symbols:

Symbol table '.dyns= ym' contains 306 entries:

It is practically impossi= ble to get the missed symbols from the list of
present symbols. Try t= his, if there is something else missed, add the
symbols to msun/aarch= 64/Symbol.map. I did not even tried to (cross-)
compile.

I w= ill think how to get the complete list to export, meantime.
This shou= ld also be problem on any arch that provides non-standard fenv
functi= ons.

commit 7573286180010304ca982d09ce5a980740e1e35e
Author:= Konstantin Belousov <kib=40=46reeBSD.org>
Date: Mon Apr 6 19:4= 1:23 2026 +0300

lib/msun: export arch-specific fenv methods
=
diff --git a/lib/msun/Makefile b/lib/msun/Makefile
index 5112337= f6297..b6e77fed5d9c 100644
--- a/lib/msun/Makefile
+++ b/lib/msun= /Makefile
=40=40 -115,6 +115,10 =40=40 LIBC=5FARCH=3D=24=7BMACHINE=5F= CPUARCH=7D
C=46LAGS+=3D -I=24=7B.CURDIR=7D/src -I=24=7BLIBC=5FSRCTOP=7D= /include =5C
-I=24=7BLIBC=5FSRCTOP=7D/=24=7BLIBC=5FARCH=7D
SYM=5F= MAPS+=3D =24=7B.CURDIR=7D/Symbol.map
+ARCH=5FMAP=3D =24=7B.CURDIR=7D/= =24=7BLIBC=5FARCH=7D/Symbol.map
+.if exists(=24=7BARCH=5FMAP=7D)
= +SYM=5FMAPS+=3D =24=7BARCH=5FMAP=7D
+.endif

VERSION=5FDE=46=3D= =24=7BLIBC=5FSRCTOP=7D/Versions.def
SYMBOL=5FMAPS=3D =24=7BSYM=5FMAP= S=7D
diff --git a/lib/msun/aarch64/Symbol.map b/lib/msun/aarch64/Symb= ol.map
new file mode 100644
index 000000000000..d24d7820ba98
= --- /dev/null
+++ b/lib/msun/aarch64/Symbol.map
=40=40 -0,0 +1,5 = =40=40
+=46BSD=5F1.9 =7B
+ fegetenv;
+ feholdexcept;
+ fe= raiseexcept;
+=7D;

May be better way is repeat = map from msun/arm/Symbol.map=3F amd64 is also equal to it here.
=46BS= D=5F1.9 =7B
fesetexceptflag;
feraiseexcept;
fegetenv;
= feholdexcept;
feupdateenv;
feenableexcept;
fedisableexcep= t;
fegetexcept;
=7D;


Started build with your diff = anyway, will see on result

--
Sincerely,
Dima (fluffy=40= =46reeBSD.org, https://t.me/=46luffyBSD, =40fluffy:matrix-dev.freebsd.org= )
(desktop, kde, x11, office, ports-secteam)=40=46reeBSD team
--69d3e63d_2ae8944a_d4c2-- From nobody Mon Apr 6 17:00:25 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fqFvF6DcBz6YM3d for ; Mon, 06 Apr 2026 17:00: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fqFvF5Vhwz46WG for ; Mon, 06 Apr 2026 17:00:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775494825; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YOvYs2VBG7i57nHT/Ra0M2p2lrOCTpSCg+AOWXNO3hY=; b=BN6Li5SH2dsmMn9sJ9KSo6i7thcBFMV5o7xuiCvKXOpYUDLBBr1KM3520mkNLhyojKW1Vz z2YglN1pGL40O78HbJjdMfr409DhqtHwqpGSkcw5qD1Ql44f+uzFf5XRw66wlrAtBvjrz3 gcbzFQUWl/5FPYhx3em4jwDYmCnk/0b/gMqfxNuJWeqHDnv+IaOBqfLyFs1JBf7jpaTu4H EZs+xVdcgL4lbMUXkkxG2OsIMDF7fD7BubhLn1Hj3w4Sd/ZiNdmBlVVQ1qFe4FHuYqrGNT 3gfboCI2VS59OMP6xq6SzTWlGpyezV1BLldiHX5T7HW5WACta2NfFayTiDKxEg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775494825; a=rsa-sha256; cv=none; b=RPdnUcW7667qLlgYvuH3QIg4QZSR69fxsANQvK9HTjO/EdXcfrW0PodfQBZD4hKaf55Qeg Wxw1dKSP0Zsy4vNj3e2HwUk9Rc0UwiEQEvv4PSZdoe0iyopcwUB2JWNQHG7iRVWPnIMT6G gBg0awpjmxBc4pZQBoYhKrYGFzTCE9YfbxAlpN1L/Yx+8Bs3f8DNca0ppe0JnADP7tqeVC +D0yLxARc4clSFTS31tWule1ROxkcrDPnnIa1ni/ENvX7PAEkWZUTX+d4j54Jc17f8ZYgS cFKNeKQcQY+OFN/lOsu+I6D/XDGnML/SSQ6833kT7D0o5dCZOPob/gmSVXPBJg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775494825; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YOvYs2VBG7i57nHT/Ra0M2p2lrOCTpSCg+AOWXNO3hY=; b=IgrmZYpu+5KaHEihUxzaCRyGp2wBCUMPXYolppNUSjhf9ZI6l93dfAC41tXHRDSD7+COi5 GdR2XM/lCovNr1mWJRE9Jm7llQGhHQ5bhFdMRDfSV8ThuLXGRvTAKXFb3JJRdYgXAAxpAA gP6Jq0C0naY831lqQvq2O/qboFoqbNskP0UaRicASmU1Mxp4iwVxRvI52LC6Uay+489TUW WFzCP5TpugUwtNCMqfPz195yKMLxXYDjOkkDO4u/Hnrq6UlyY2d9FPI0L5IjGd618uRIgs pIPYi/RNu3nLbULft0HrW071Ty4d/MTvXbhqf4yFkFFVE5rZVw63M0Go4SFAXQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fqFvF56Pqz11yY for ; Mon, 06 Apr 2026 17:00:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1cf0c by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 06 Apr 2026 17:00:25 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 7764e9ca28a9 - main - fmax.3: Add caveat for going beyond C std requirements List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: 7764e9ca28a9702aed4ba7391e055ec2fcf35c41 Auto-Submitted: auto-generated Date: Mon, 06 Apr 2026 17:00:25 +0000 Message-Id: <69d3e6a9.1cf0c.4efc1da3@gitrepo.freebsd.org> The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=7764e9ca28a9702aed4ba7391e055ec2fcf35c41 commit 7764e9ca28a9702aed4ba7391e055ec2fcf35c41 Author: Ed Maste AuthorDate: 2026-04-02 21:59:42 +0000 Commit: Ed Maste CommitDate: 2026-04-06 17:00:15 +0000 fmax.3: Add caveat for going beyond C std requirements libm's fmax and fmin family of functions treat +0.0 as greater than -0.0. This is not required by the C standard, so the user may not see this behaviour due to compiler optimization. PR: 294214 Reviewed by: fuz Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56230 --- lib/msun/man/fmax.3 | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/lib/msun/man/fmax.3 b/lib/msun/man/fmax.3 index 25fc9b6d518a..873a19375ce5 100644 --- a/lib/msun/man/fmax.3 +++ b/lib/msun/man/fmax.3 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd June 29, 2004 +.Dd April 6, 2026 .Dt FMAX 3 .Os .Sh NAME @@ -68,10 +68,6 @@ functions return the smaller of .Fa x and .Fa y . -They treat -.Li +0.0 -as being larger than -.Li -0.0 . If one argument is an \*(Na, then the other argument is returned. If both arguments are \*(Nas, then the result is an \*(Na. These routines do not raise any floating-point exceptions. @@ -90,6 +86,13 @@ and .Fn fminl functions conform to .St -isoC-99 . +.Sh CAVEATS +The library implementations of these functions treat +.Li +0.0 +as being larger than +.Li -0.0 . +This behavior is not specified by the C standard, is not portable, +and may not occur in light of compiler optimizations. .Sh HISTORY These routines first appeared in .Fx 5.3 . From nobody Mon Apr 6 17:05:21 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fqG1C5Qy4z6YMY3; Mon, 06 Apr 2026 17:05:35 +0000 (UTC) (envelope-from kib@freebsd.org) 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 4fqG1C2yZMz47Ky; Mon, 06 Apr 2026 17:05:35 +0000 (UTC) (envelope-from kib@freebsd.org) Authentication-Results: mx1.freebsd.org; none Received: from tom.home (kib@localhost [127.0.0.1] (may be forged)) by kib.kiev.ua (8.18.1/8.18.1) with ESMTP id 636H5Luk033516; Mon, 6 Apr 2026 20:05:24 +0300 (EEST) (envelope-from kib@freebsd.org) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 636H5Luk033516 Received: (from kostik@localhost) by tom.home (8.18.1/8.18.1/Submit) id 636H5LF4033515; Mon, 6 Apr 2026 20:05:21 +0300 (EEST) (envelope-from kib@freebsd.org) X-Authentication-Warning: tom.home: kostik set sender to kib@freebsd.org using -f Date: Mon, 6 Apr 2026 20:05:21 +0300 From: Konstantin Belousov To: Dima Panov Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 3a01e1e1a50c - main - msun/aarch64: convert fenv functions to proper linkage Message-ID: References: <69caafbb.408c4.7b20a1e1@gitrepo.freebsd.org> <1f2ad4f0-a4ab-4f15-a779-5f1a6db9912b@FreeBSD.org> <8022afad-9cee-4ade-8b56-ef5b7feb6e16@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: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham autolearn_force=no version=4.0.2 X-Spam-Checker-Version: SpamAssassin 4.0.2 (2025-08-27) on tom.home X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US] X-Rspamd-Queue-Id: 4fqG1C2yZMz47Ky X-Spamd-Bar: ---- On Mon, Apr 06, 2026 at 07:58:37PM +0300, Dima Panov wrote: > > > On 06.04.2026 19:45, Konstantin Belousov wrote: > > On Mon, Apr 06, 2026 at 07:25:18PM +0300, Dima Panov wrote: > > > > > > > > > On 06.04.2026 19:07, Konstantin Belousov wrote: > > > > On Mon, Apr 06, 2026 at 06:56:36PM +0300, Dima Panov wrote: > > > > > Hello! > > > > > > > > > > This breaks most of libm consumers > > > > > > > > > > llvm/flang: > > > > > =============== > > > > > FAILED: [code=1] bin/flang-20 > > > > > : && /usr/local/libexec/ccache/c++ -O2 -pipe -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -isystem /usr/local/include -fPIC -fno-semantic-interposition -fvisibility-inline > > > > > s-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-s > > > > > emi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupport > > > > > ed -fdiagnostics-color -ffunction-sections -fdata-sections -Wno-deprecated-copy -Wno-string-conversion -Wno-ctad-maybe-unsupported -Wno-unused-command-line-argument -Wstring-conversion -Wcover > > > > > ed-switch-default -Wno-nested-anon-types -O2 -pipe -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -isystem /usr/local/include -DNDEBUG -Wl,--color-diagnostics -Wl,--expor > > > > > t-dynamic -Wl,-z,origin -Wl,--gc-sections -Xlinker --dependency-file=tools/flang/tools/flang-driver/CMakeFiles/flang.dir/link.d tools/flang/tools/flang-driver/CMakeFiles/flang.dir/driver.cpp.o tools/ > > > > > flang/tools/flang-driver/CMakeFiles/flang.dir/fc1_main.cpp.o -o bin/flang-20 -L/wrkdirs/usr/ports/devel/llvm20/work-default/.build/./lib -Wl,-rpath,"\$ORIGIN/../lib:/wrkdirs/usr/ports/devel/llvm20/work- > > > > > default/.build/./lib:/wrkdirs/usr/ports/devel/llvm20/work-default/.build/lib:" -lpthread lib/libflangFrontend.a lib/libflangFrontendTool.a lib/libFortranLower.a lib/libFortranSemantics.a lib/libFo > > > > > rtranSupport.a lib/libflangPasses.a lib/libHLFIRTransforms.a lib/libFIRTransforms.a lib/libFIROpenACCSupport.a lib/libFlangOpenMPTransforms.a lib/libFIRCodeGen.a lib/libFIRAnalysis.a lib/libFIRB > > > > > uilder.a lib/libCUFDialect.a lib/libFortranEvaluate.a lib/libFortranParser.a lib/libFortranCommon.a lib/libFortranDecimal.a lib/libFIRSupport.a lib/libHLFIRDialect.a lib/libFIRDialect.a lib/lib > > > > > FIRDialectSupport.a lib/libCUFAttrs.a lib/libclang-cpp.so.20.1 lib/libMLIR.so.20.1 lib/libLLVM.so.20.1 && : > > > > > ld: error: undefined symbol: feholdexcept > > > > > > > > This is strange. Could you show me the output of e.g. > > > > readelf --dyn_syms /lib/libm.so.5 | grep feholdexcept > > > > The best would be the output from the command like above for each missing > > > > symbol. > > > > > > missing :( > > > > > > FreeBSD 16.0-CURRENT #0 main-cf1f21572897: Mon Apr 6 13:45:02 MSK 2026 > > > > > > root@aarch64:/ # readelf --dyn-syms /lib/libm.so.5 | grep feholdexcept > > > root@aarch64:/ # > > Hm, ok, perhaps I understand. > > These symbols where never exported from libm, and it just happens that > > they were compiled into the binaries itself due to extern inline. > > So the proper fix for consumers that want the symbols is to export them > > from libm.so. > > > > > > > > full list of symbols: > > > > > > Symbol table '.dynsym' contains 306 entries: > > > > It is practically impossible to get the missed symbols from the list of > > present symbols. Try this, if there is something else missed, add the > > symbols to msun/aarch64/Symbol.map. I did not even tried to (cross-) > > compile. > > > > I will think how to get the complete list to export, meantime. > > This should also be problem on any arch that provides non-standard fenv > > functions. > > > > commit 7573286180010304ca982d09ce5a980740e1e35e > > Author: Konstantin Belousov > > Date: Mon Apr 6 19:41:23 2026 +0300 > > > > lib/msun: export arch-specific fenv methods > > > > diff --git a/lib/msun/Makefile b/lib/msun/Makefile > > index 5112337f6297..b6e77fed5d9c 100644 > > --- a/lib/msun/Makefile > > +++ b/lib/msun/Makefile > > @@ -115,6 +115,10 @@ LIBC_ARCH=${MACHINE_CPUARCH} > > CFLAGS+= -I${.CURDIR}/src -I${LIBC_SRCTOP}/include \ > > -I${LIBC_SRCTOP}/${LIBC_ARCH} > > SYM_MAPS+= ${.CURDIR}/Symbol.map > > +ARCH_MAP= ${.CURDIR}/${LIBC_ARCH}/Symbol.map > > +.if exists(${ARCH_MAP}) > > +SYM_MAPS+= ${ARCH_MAP} > > +.endif > > > > VERSION_DEF= ${LIBC_SRCTOP}/Versions.def > > SYMBOL_MAPS= ${SYM_MAPS} > > diff --git a/lib/msun/aarch64/Symbol.map b/lib/msun/aarch64/Symbol.map > > new file mode 100644 > > index 000000000000..d24d7820ba98 > > --- /dev/null > > +++ b/lib/msun/aarch64/Symbol.map > > @@ -0,0 +1,5 @@ > > +FBSD_1.9 { > > + fegetenv; > > + feholdexcept; > > + feraiseexcept; > > +}; > > May be better way is repeat map from msun/arm/Symbol.map? amd64 is also equal to it here. > FBSD_1.9 { > fesetexceptflag; > feraiseexcept; > fegetenv; > feholdexcept; > feupdateenv; > feenableexcept; > fedisableexcept; > fegetexcept; > }; > > Started build with your diff anyway, will see on result Indeed. Also I suspect that msun/arm/Makefile.inc needs a fix to not list the Symbol.map twice, it is relevant for lib32 on aarch64. Updated patch below. commit 3a280c3bae0b3b9b76c19259ef9e7890fb7e38f1 Author: Konstantin Belousov Date: Mon Apr 6 19:41:23 2026 +0300 lib/msun: export arch-specific fenv methods Reported by: fluffy diff --git a/lib/msun/Makefile b/lib/msun/Makefile index 5112337f6297..b6e77fed5d9c 100644 --- a/lib/msun/Makefile +++ b/lib/msun/Makefile @@ -115,6 +115,10 @@ LIBC_ARCH=${MACHINE_CPUARCH} CFLAGS+= -I${.CURDIR}/src -I${LIBC_SRCTOP}/include \ -I${LIBC_SRCTOP}/${LIBC_ARCH} SYM_MAPS+= ${.CURDIR}/Symbol.map +ARCH_MAP= ${.CURDIR}/${LIBC_ARCH}/Symbol.map +.if exists(${ARCH_MAP}) +SYM_MAPS+= ${ARCH_MAP} +.endif VERSION_DEF= ${LIBC_SRCTOP}/Versions.def SYMBOL_MAPS= ${SYM_MAPS} diff --git a/lib/msun/aarch64/Symbol.map b/lib/msun/aarch64/Symbol.map new file mode 100644 index 000000000000..b468c814ff06 --- /dev/null +++ b/lib/msun/aarch64/Symbol.map @@ -0,0 +1,10 @@ +FBSD_1.9 { + fesetexceptflag; + feraiseexcept; + fegetenv; + feholdexcept; + feupdateenv; + feenableexcept; + fedisableexcept; + fegetexcept; +}; diff --git a/lib/msun/arm/Makefile.inc b/lib/msun/arm/Makefile.inc index 6e3ddb351dd3..e155f1a2cae4 100644 --- a/lib/msun/arm/Makefile.inc +++ b/lib/msun/arm/Makefile.inc @@ -1,5 +1,4 @@ LDBL_PREC = 53 -SYM_MAPS += ${.CURDIR}/arm/Symbol.map .if defined(CPUTYPE) && ${CPUTYPE:M*soft*} != "" ARCH_SRCS = fenv-softfp.c fenv-vfp.c From nobody Mon Apr 6 17:12:55 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fqG9g53YDz6YN67 for ; Mon, 06 Apr 2026 17:12: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fqG9g4GjDz49sp for ; Mon, 06 Apr 2026 17:12:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775495575; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rxnJbHFhOG9XOpYeVmWDUjezICuwKBvqK//pKw0G1h0=; b=Jj44iBCPfakLoE+Gami2z26xXUrZpRVq1kFDdOdvrK17CdsPwvZZBHi1toMsQm/6njr1+z N+2gwGKu8UuPwIwolu2jLHMDmShoXrBBy9WMN2Vus2TqxXYrGnhvdPMGycU+YbrEQ0PYsk SWx+xkx93Z5F+UfrhiLaRp94ALEmrJRk4ZnNxym0o71/38+31dtH4s0CkupkFe8AcwouDF 1AZWBEdP4saKR32AkUynuLo8cVcanknKULqcgCA+25Ve5qbTfOLpRzzkYnkoQjWwUK2rDc yg4Tk/4IgL8jcIkkfwMB+CF4dLH/iIeKtLrtkrGZaAiQgZvMyicuNvznz9TDmg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775495575; a=rsa-sha256; cv=none; b=gwvOvAS6tJut9/AoKt6MorUltYc6AxXGhHUzWP3De74/kgrOSDqv7Tc49yjqjXg05gW70b EhhJ50ssVHJ5Rx6zEq+aJKoaAnA0Cv8n8Pjfi98ZLwXZvwvdrZshf2N26M+mCnpZH+etNF 38XpMuJaSNG4GLkKqKuxLksJuWqBOrMmsBvpG2uEE4Tb4adLyeMxYZ/952ehSXVVHbOqgQ NFShJM1iXceT/Eb9ZPywsNGLji4TrQgtU8Im4R9OcNG6zgU5USoOqtjoPyf2Mo1ELOZV/S dgorMixo2CC3zRxOvFynbx+hbp59EJvWZnQzzSDzfb4Tq+UOMqwAMDNrxSvYoA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775495575; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rxnJbHFhOG9XOpYeVmWDUjezICuwKBvqK//pKw0G1h0=; b=GsP34tIOVS6DsaZ+UweTc3L/r08vHFKg2xqipw4IQNsMcsvqDzqEcG7drAm0f3pYVtAsJ7 enIBTuV66bEY586h3tuGtJr/1jZk89JziQxaOe6Ltp1LrHLA3BLiRs4rfnFYd50okNhdIf W1wqamCmflNlcylQamRKjfG78az9q49KP0DZjDf4mMmqVz8tpqXggXSVw8l3ivgdq9v0J/ tmJ5WnU4xurTyEPqiSglltHXBrx/Y6M+Aj2eqFF0nP0thX4sVPbHk4oh61DuhI5Mx2JhIo gdHFZEFfvPFpcHELqfRqsyPrk0+kjdMT9cdz7habS1A046yU6qoAl2FEub9CwQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fqG9g3tKgz11sf for ; Mon, 06 Apr 2026 17:12:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1e1bf by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 06 Apr 2026 17:12:55 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: 63d0e3e3aa24 - main - packages: Fix build with libucl 0.9.3 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 63d0e3e3aa2483420f828686336d6615616363d5 Auto-Submitted: auto-generated Date: Mon, 06 Apr 2026 17:12:55 +0000 Message-Id: <69d3e997.1e1bf.5a04303e@gitrepo.freebsd.org> The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=63d0e3e3aa2483420f828686336d6615616363d5 commit 63d0e3e3aa2483420f828686336d6615616363d5 Author: Lexi Winter AuthorDate: 2026-04-06 17:11:22 +0000 Commit: Lexi Winter CommitDate: 2026-04-06 17:12:38 +0000 packages: Fix build with libucl 0.9.3 In libucl 0.9.3, macros and includes are disabled by default when creating a new UCL parser. This breaks the package build, which relies on includes. Fix this by explicitly passing zero flags to ucl.parser(). MFC after: 3 days Fixes: abda442d92fd ("contrib/libucl: Import libucl 0.9.3") Reviewed by: kevans, bapt Reported by: freebsd@walstatt-de.de Sponsored by: https://www.patreon.com/bsdivy Differential Revision: https://reviews.freebsd.org/D56266 --- release/packages/generate-set-ucl.lua | 2 +- release/packages/generate-ucl.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/release/packages/generate-set-ucl.lua b/release/packages/generate-set-ucl.lua index 9ba7026b75df..7a1cddda7be1 100755 --- a/release/packages/generate-set-ucl.lua +++ b/release/packages/generate-set-ucl.lua @@ -16,7 +16,7 @@ substituted as UCL variables. local ucl = require("ucl") -- This parser is the output UCL we want to build. -local parser = ucl.parser() +local parser = ucl.parser(0) if #arg < 1 then io.stderr:write(arg[0] .. ": missing template filename\n") diff --git a/release/packages/generate-ucl.lua b/release/packages/generate-ucl.lua index 19a9a95d5d38..aaaa4375dd4d 100755 --- a/release/packages/generate-ucl.lua +++ b/release/packages/generate-ucl.lua @@ -124,7 +124,7 @@ local pkgprefix = nil local pkgversion = nil -- This parser is the output UCL we want to build. -local parser = ucl.parser() +local parser = ucl.parser(0) -- Set any $VARIABLES from the command line in the parser. This causes ucl to -- automatically replace them when we load the source ucl. From nobody Mon Apr 6 17:22:46 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fqGP25nvdz6YNb8 for ; Mon, 06 Apr 2026 17:22: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fqGP24x3sz3CjX for ; Mon, 06 Apr 2026 17:22:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775496166; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Bq/9Hjmn+7Q8xI4H/wws8EpUVI0OgjKKbb3PNozALH4=; b=lYSk20es4/R0p+7v1S9p9LWsfuijJm3Pc25tmKBtR1eMpQBbGy3KHMfpG4sBWWxoq8ZZol DUm5X1dCnloW4k+ua5BAse1cdz3JhG5TjgnnE7d2JhWplk3GEnMP8ShppAqQNzrV4hhxIE sqSA58oRMwDUeaMSKZEUzW8qQr5yHvlmUZk1leipIWkL1+idU8C/7Gy49sRgxToV+Ot87h mtPqhVerCf8TeIBff57abWXVK+y484lJaCJxrClVekKYz8Bx1x63t85XW5USHZwxzh0SEq 4VtkIKE/Fz8STfc77Rdn/zo1WqhX4Qs02AcYN7ShrhjN9cvrNJ56EbWJLQACjA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775496166; a=rsa-sha256; cv=none; b=fWH96LPTtQWkUCszxImDHAfpSXdxWkpT99fVhsAcO+Lsv5EYIkP2+sl3HV6lnfEaHBHaNg CI5KHFvVncZC2xObwwjyFqFZBkD/twlYIfT6v2VQ3v9dbpMKo2D4Lbv/LxB+tcaUnAOSPV KkJA8wLom19tIM8Qf2qFW28zJ29FNpfZ917LEIiVWu7547v8Vz3TAhOrEXxaS+ygBe7+9o 63y3oGBBVbhKR+aNvrkQ18d2YdPaUX9eJaTwS/w366ZHkGg/BS4ClGQC6NFLUoxJIHdvrT 6G39ISOGqIOIqXfqcFgCiC2A0LaTSscdgigG9T2HXm1pYes7ttspgCVRVdhrqg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775496166; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Bq/9Hjmn+7Q8xI4H/wws8EpUVI0OgjKKbb3PNozALH4=; b=RXVz2xFtPrURqS/G2Jm4CKw8Deg2dQtfLIeYlfLYHPvY8h4gWqK4NtmhLTNqIK8+SKTEvV Ch5CJTfJEpXJ0IHmloeiv1pM6eQx/yKcR+2dtL08wkr+ae1G08jD6aSA0GU58Zc3ecjnL2 qL8XHnmLuDqOQBjjCY0tk+yzab5A/cLeQE7wQCcS+jSTIvtUch//VBcz1T1Q3OSYaA0php LAu1noZUivuLoMcJ88b3OJB8I086m9rPiuteR7V9TB5+mYsB5VapbJ8VgX4TgzzVFCEO9b jk605DAFUH3R2oimZCZRge8LXVbdurrOIFR3KrLSehpE/4sTuLjsgU2vLUjS+g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fqGP24LfSz136w for ; Mon, 06 Apr 2026 17:22:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1f204 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 06 Apr 2026 17:22:46 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Cochard Subject: git: c5961b6fcfe0 - main - yes: fix argv test race between fork and exec List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olivier X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c5961b6fcfe0f3587be11187a9c666a7fa200f4b Auto-Submitted: auto-generated Date: Mon, 06 Apr 2026 17:22:46 +0000 Message-Id: <69d3ebe6.1f204.7943777e@gitrepo.freebsd.org> The branch main has been updated by olivier: URL: https://cgit.FreeBSD.org/src/commit/?id=c5961b6fcfe0f3587be11187a9c666a7fa200f4b commit c5961b6fcfe0f3587be11187a9c666a7fa200f4b Author: Olivier Cochard AuthorDate: 2026-04-06 17:17:49 +0000 Commit: Olivier Cochard CommitDate: 2026-04-06 17:22:25 +0000 yes: fix argv test race between fork and exec The argv test checks ps(1) output immediately after backgrounding yes(1), but the forked child briefly shows the parent shell's argv before exec(2) replaces it. This caused intermittent failures where ps(1) captured the atf shell wrapper command line instead of "yes y". Approved by: des Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D56231 --- usr.bin/yes/tests/yes_test.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/usr.bin/yes/tests/yes_test.sh b/usr.bin/yes/tests/yes_test.sh index f4c04e186536..797ac5f6ac9f 100644 --- a/usr.bin/yes/tests/yes_test.sh +++ b/usr.bin/yes/tests/yes_test.sh @@ -52,6 +52,8 @@ argv_body() { yes y >/dev/null & local pid=$! + # Wait for yes(1) to exec before checking args + sleep 0.1 atf_check -o inline:"yes y\n" ps -o args= $pid kill $pid wait From nobody Mon Apr 6 17:25:02 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fqGRj5tgPz6YNfp; Mon, 06 Apr 2026 17:25:05 +0000 (UTC) (envelope-from fluffy@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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fqGRj3MsPz3DrL; Mon, 06 Apr 2026 17:25:05 +0000 (UTC) (envelope-from fluffy@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775496305; 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=9zv4/FGn53YqOpYcWlrKGc1aMWRnWpiDvyBaPn4UGec=; b=D9sc2aMZS68xZT/sSYdyy5uwv1ztrm5r/v66b3Hd3U/ruNumDcYl6aw1NclLxwatPke7+O 85NDzbpgrKHVaFKBAA8OlM/c2sR5DBf+9jRpbkK8FK7i8sieclobyxeZ4e76LXDsziRX7R jhmfUy6XX06uwWdj9c3tfeLaGE1BHU80hU9LrmTcQ8vMEmpvwXYFRKsYoRIcSYSnkJahpU ku3UTmYdYiWIq++G/IQtpX13PUQiyI5fcRDW84XBAbtG7PQ/0ntxzhfeM4VLzTmkI8ymYE KrDUTB5dQyA6ml6KDIiuMW0dcR3YD06+JqhchSVoxnhfhYQC/038p2uwgrtb6Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775496305; a=rsa-sha256; cv=none; b=LLlVimg3RKwiwp5bSlk0FUjgNwgqh88r+mExpYTD3Tn5OziKbmThdpU/xQ+ibkCWyCQYDO DuFNNuXkbz8prtto6V0QeUhtkt3emi0Oe+LmEvLYNFTZNY4EKHTJQrMlbTNIK5YvfQcBgL 6oTtF4lIchA03GKVSw4AM6AlGrFd4uaLhejD0Id7/ZwkkGgG7/o9rwo7LVtbpAxciEiFmV lu/l3fYeRvkLfqRC0OqflHbADl2XJsAQsedgOC7I+QfgdB3KF1de28EibqgNi7vaf9tpAR 5xZgTZQXGk4jU+iSRpXQqWnwi1DvJl/Ijdv6dQqtWxGQ0mb+VYG5nFFgp8r/LA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775496305; 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=9zv4/FGn53YqOpYcWlrKGc1aMWRnWpiDvyBaPn4UGec=; b=jY/XN6wXCz17sRlZlKU7H10ruMvqDX+CZA/brGnovfplNUUgz72C2sWDpX7u/20OkquIDp VQlyDtJgQCQMCRoy0Wsw6nrgB8oGDroRgCg943iF0XZ1x5udrhG/7EOcavMNzfKVcWReQh jl2VTaer9QcmWRXJy2Kh+T6sqeMwKDaGm1qQMr4wP+3dKeuOdvOcG+JzM15bC1PEAB4AJQ Vb8ItTOW5XMFEE/tPUp5Rx2QklHXsSFDEuBWqNahJa7h9vaSTOFXsxtZ1v+YIhdo1DDiy7 6Sv0S/mGboMkQ3u3PLdxGnvU44D6oABzx9IEcHH3gpGb4Hjr0o2E1J1qpzZAiw== Received: from [2a05:3580:e727:cd00::10:0] (unknown [IPv6:2a05:3580:e727:cd00:6028:73dc:5e69:9ca0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: fluffy) by smtp.freebsd.org (Postfix) with ESMTPSA id 4fqGRh3nlczVV; Mon, 06 Apr 2026 17:25:04 +0000 (UTC) (envelope-from fluffy@FreeBSD.org) Date: Mon, 6 Apr 2026 20:25:02 +0300 From: Dima Panov To: Konstantin Belousov Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Message-ID: <31e15546-79b2-4109-998e-c5f981957044@FreeBSD.org> In-Reply-To: References: <69caafbb.408c4.7b20a1e1@gitrepo.freebsd.org> <1f2ad4f0-a4ab-4f15-a779-5f1a6db9912b@FreeBSD.org> <8022afad-9cee-4ade-8b56-ef5b7feb6e16@FreeBSD.org> Subject: git: 3a01e1e1a50c - main - msun/aarch64: convert fenv functions to proper linkage List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: 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="69d3ec6e_46e87ccd_d4c2" --69d3ec6e_46e87ccd_d4c2 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline On 06.04.2026 20:05, Konstantin Belousov wrote: > diff --git a/lib/msun/arm/Makefile.inc b/lib/msun/arm/Makefile.inc > index 6e3ddb351dd3..e155f1a2cae4 100644 > --- a/lib/msun/arm/Makefile.inc > +++ b/lib/msun/arm/Makefile.inc > @@ -1,5 +1,4 @@ > LDBL_PREC = 53 > -SYM_MAPS += ${.CURDIR}/arm/Symbol.map Nope, amd64 is also have Symbol.map included in Makefile.inc --- a/lib/msun/aarch64/Makefile.inc +++ b/lib/msun/aarch64/Makefile.inc @@ -12,3 +12,5 @@ CFLAGS+=-DUSE_BUILTIN_FMIN CFLAGS+=-DUSE_BUILTIN_SQRTF CFLAGS+=-DUSE_BUILTIN_SQRT + +SYM_MAPS += ${.CURDIR}/aarch64/Symbol.map and no need to patch msun/Makefile with additional checks/includes -- Sincerely, Dima (fluffy@FreeBSD.org, https://t.me/FluffyBSD, @fluffy:matrix-dev.freebsd.org) (desktop, kde, x11, office, ports-secteam)@FreeBSD team --69d3ec6e_46e87ccd_d4c2 Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline


On 06.04.2026 20:05, Konstantin Belousov wrote:
=
diff --git a/lib/msun/arm/Makefile.inc b/li= b/msun/arm/Makefile.inc
index 6e3ddb351dd3..e155f1a2cae4 100644
-= -- a/lib/msun/arm/Makefile.inc
+++ b/lib/msun/arm/Makefile.inc
=40= =40 -1,5 +1,4 =40=40
LDBL=5FPREC =3D 53
-SYM=5FMAPS +=3D =24=7B.C= URDIR=7D/arm/Symbol.map

Nope, amd64 is also have Sy= mbol.map included in Makefile.inc

--- a/lib/msun/aarch64/Makefil= e.inc
+++ b/lib/msun/aarch64/Makefile.inc
=40=40 -12,3 +12,5 =40=40= C=46LAGS+=3D-DUSE=5FBUILTIN=5F=46MIN

C=46LAGS+=3D-DUSE=5FBUILT= IN=5FSQRT=46
C=46LAGS+=3D-DUSE=5FBUILTIN=5FSQRT
+
+SYM=5FMAP= S +=3D =24=7B.CURDIR=7D/aarch64/Symbol.map

and no need to patch = msun/Makefile with additional checks/includes

--
Sincerely, =
Dima (fluffy=40=46reeBSD.org, https://t.me/=46luffyBSD, =40fluffy:mat= rix-dev.freebsd.org)
(desktop, kde, x11, office, ports-secteam)=40=46= reeBSD team

--69d3ec6e_46e87ccd_d4c2-- From nobody Mon Apr 6 17:32:52 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fqGcz6tx5z6YPN9; Mon, 06 Apr 2026 17:33:07 +0000 (UTC) (envelope-from kib@freebsd.org) 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 4fqGcz1kk1z3GrH; Mon, 06 Apr 2026 17:33:07 +0000 (UTC) (envelope-from kib@freebsd.org) Authentication-Results: mx1.freebsd.org; none Received: from tom.home (kib@localhost [127.0.0.1] (may be forged)) by kib.kiev.ua (8.18.1/8.18.1) with ESMTP id 636HWqLB034817; Mon, 6 Apr 2026 20:32:55 +0300 (EEST) (envelope-from kib@freebsd.org) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 636HWqLB034817 Received: (from kostik@localhost) by tom.home (8.18.1/8.18.1/Submit) id 636HWq9C034816; Mon, 6 Apr 2026 20:32:52 +0300 (EEST) (envelope-from kib@freebsd.org) X-Authentication-Warning: tom.home: kostik set sender to kib@freebsd.org using -f Date: Mon, 6 Apr 2026 20:32:52 +0300 From: Konstantin Belousov To: Dima Panov Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 3a01e1e1a50c - main - msun/aarch64: convert fenv functions to proper linkage Message-ID: References: <69caafbb.408c4.7b20a1e1@gitrepo.freebsd.org> <1f2ad4f0-a4ab-4f15-a779-5f1a6db9912b@FreeBSD.org> <8022afad-9cee-4ade-8b56-ef5b7feb6e16@FreeBSD.org> <31e15546-79b2-4109-998e-c5f981957044@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: <31e15546-79b2-4109-998e-c5f981957044@FreeBSD.org> X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham autolearn_force=no version=4.0.2 X-Spam-Checker-Version: SpamAssassin 4.0.2 (2025-08-27) on tom.home X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US] X-Rspamd-Queue-Id: 4fqGcz1kk1z3GrH X-Spamd-Bar: ---- On Mon, Apr 06, 2026 at 08:25:02PM +0300, Dima Panov wrote: > > > On 06.04.2026 20:05, Konstantin Belousov wrote: > > diff --git a/lib/msun/arm/Makefile.inc b/lib/msun/arm/Makefile.inc > > index 6e3ddb351dd3..e155f1a2cae4 100644 > > --- a/lib/msun/arm/Makefile.inc > > +++ b/lib/msun/arm/Makefile.inc > > @@ -1,5 +1,4 @@ > > LDBL_PREC = 53 > > -SYM_MAPS += ${.CURDIR}/arm/Symbol.map > > Nope, amd64 is also have Symbol.map included in Makefile.inc > > --- a/lib/msun/aarch64/Makefile.inc > +++ b/lib/msun/aarch64/Makefile.inc > @@ -12,3 +12,5 @@ CFLAGS+=-DUSE_BUILTIN_FMIN > > CFLAGS+=-DUSE_BUILTIN_SQRTF > CFLAGS+=-DUSE_BUILTIN_SQRT > + > +SYM_MAPS += ${.CURDIR}/aarch64/Symbol.map > > and no need to patch msun/Makefile with additional checks/includes It can be done generically, so it is better to be done that way. The patch is preliminary anyway, I will do the pass over all arches. From nobody Mon Apr 6 17:41:40 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fqGyG3j0xz6YR8w; Mon, 06 Apr 2026 17:48:06 +0000 (UTC) (envelope-from fluffy@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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fqGyG1xMVz3Hrs; Mon, 06 Apr 2026 17:48:06 +0000 (UTC) (envelope-from fluffy@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775497686; 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=kDLtqY3AuWrlGAEJ7OsHsRqcMtIPcCeRVcnjmcAPV2s=; b=R8rNBBdgBVfs/uYqDYfzx0CUJ2cgzB2ZxHhse39qgg+bCN3sEwLzNSs/L8uOFDb4ww59uN gcXj6THw3Md7vAsIQ9Go3FD+8l/NtOVHvNSQeDwjMXkiLCNSWQsl5GHVE1esjU0mG47kbT Sfyh8Gn7s7TiwD35i3x77PgNRtmy/4F+2mFqiSsIcbrLHNdxIEiYI9HGmKgXVr7Zb6hO3Z 0ddV5XSzIR7whSIjLGhcifN5n9hl/1vuSaJhKoUP6PidE+NNXMQtGHldhjgUe55hwk5QKY ERBVqZoeQasznlG7n+ggeo/73L8Nu+o4Gd6VXCOEC3lU9CEzgriyTOxsKE5tIA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775497686; a=rsa-sha256; cv=none; b=eEgugXy4TsFzXfy0qkhQrcPlOgKgWi4MrqIR352Yb3+42t34NW768//kIUr8Sdc39qqkcX xuzSieu8FseS1bfcYQq0OofucFZWdQqx2Ce0qPvVQHVAN0wzhMOotliEFDKMv0fR+9lHhB xaYfR4aDwV3TxuHaGgeoNwnA1tN76JiaVpe6S87UKw7LsiLsmOz4pkZnawsULPDru/Kk5X Oq/FJSt0ck6ijOaVj0QFog+fxEL/N1B8S5AnzY+PLDE04vKdsWhHVojShilWb0gyiSYo+h erTnm1tO6DkSdMnUnDFHTKGXz4xrmDavaZMhQ2iBw8zcqkYux9h91LMIv7P5nw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775497686; 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=kDLtqY3AuWrlGAEJ7OsHsRqcMtIPcCeRVcnjmcAPV2s=; b=SZx0oy24B0yvJV0MsF/QvdOj8zcHbz+5j2CCt/uoevUGAmMXXRnYg2+wkpnbD0z6XdBfq2 6DwXESP86geRVqLD3JO0u/K/zGQlLXWWFaXgQezkbKjVT7XeO9+hp0flTnVi51j70rGKKI pwa5GaLTbhc2oooM/oHRIt5JzuVsg0CnYv4UZKBsI14YVAnQBm9PH24zhZOkZMlKskFuqk k8zGDdEHk8oXvxEimSXGvry+mv0rRWJf4LuFzCgH13k7XUVc8AMjVu/0qo6zM4oW9HHxXJ 5LWsO7cPzCYXje4dXBiPqDlpLieeKDrbvn912xBtru9HcGvBuq2xwsvGL+PI3g== Received: from [2a05:3580:e727:cd00::10:0] (unknown [IPv6:2a05:3580:e727:cd00:6028:73dc:5e69:9ca0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: fluffy) by smtp.freebsd.org (Postfix) with ESMTPSA id 4fqGyF1yz9z1Cqy; Mon, 06 Apr 2026 17:48:05 +0000 (UTC) (envelope-from fluffy@FreeBSD.org) Date: Mon, 6 Apr 2026 20:41:40 +0300 From: Dima Panov To: Konstantin Belousov Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Message-ID: <724be016-85a3-4dfa-8b18-abcfe384b0fc@FreeBSD.org> In-Reply-To: References: <69caafbb.408c4.7b20a1e1@gitrepo.freebsd.org> <1f2ad4f0-a4ab-4f15-a779-5f1a6db9912b@FreeBSD.org> <8022afad-9cee-4ade-8b56-ef5b7feb6e16@FreeBSD.org> Subject: git: 3a01e1e1a50c - main - msun/aarch64: convert fenv functions to proper linkage List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: 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="69d3f054_2eb141f2_d4c2" --69d3f054_2eb141f2_d4c2 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline On 06.04.2026 20:05, Konstantin Belousov wrote: > On Mon, Apr 06, 2026 at 07:58:37PM +0300, Dima Panov wrote: > > > > > > On 06.04.2026 19:45, Konstantin Belousov wrote: > > > On Mon, Apr 06, 2026 at 07:25:18PM +0300, Dima Panov wrote: > > > > > > > > > > > > On 06.04.2026 19:07, Konstantin Belousov wrote: > > > > > On Mon, Apr 06, 2026 at 06:56:36PM +0300, Dima Panov wrote: > > > > > > Hello! > > > > > > > > > > > > This breaks most of libm consumers > > > > > > > > > > > > llvm/flang: > > > > > > =============== > > > > > > FAILED: [code=1] bin/flang-20 > > > > > > : && /usr/local/libexec/ccache/c++ -O2 -pipe -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -isystem /usr/local/include -fPIC -fno-semantic-interposition -fvisibility-inline > > > > > > s-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-s > > > > > > emi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupport > > > > > > ed -fdiagnostics-color -ffunction-sections -fdata-sections -Wno-deprecated-copy -Wno-string-conversion -Wno-ctad-maybe-unsupported -Wno-unused-command-line-argument -Wstring-conversion -Wcover > > > > > > ed-switch-default -Wno-nested-anon-types -O2 -pipe -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -isystem /usr/local/include -DNDEBUG -Wl,--color-diagnostics -Wl,--expor > > > > > > t-dynamic -Wl,-z,origin -Wl,--gc-sections -Xlinker --dependency-file=tools/flang/tools/flang-driver/CMakeFiles/flang.dir/link.d tools/flang/tools/flang-driver/CMakeFiles/flang.dir/driver.cpp.o tools/ > > > > > > flang/tools/flang-driver/CMakeFiles/flang.dir/fc1_main.cpp.o -o bin/flang-20 -L/wrkdirs/usr/ports/devel/llvm20/work-default/.build/./lib -Wl,-rpath,"\$ORIGIN/../lib:/wrkdirs/usr/ports/devel/llvm20/work- > > > > > > default/.build/./lib:/wrkdirs/usr/ports/devel/llvm20/work-default/.build/lib:" -lpthread lib/libflangFrontend.a lib/libflangFrontendTool.a lib/libFortranLower.a lib/libFortranSemantics.a lib/libFo > > > > > > rtranSupport.a lib/libflangPasses.a lib/libHLFIRTransforms.a lib/libFIRTransforms.a lib/libFIROpenACCSupport.a lib/libFlangOpenMPTransforms.a lib/libFIRCodeGen.a lib/libFIRAnalysis.a lib/libFIRB > > > > > > uilder.a lib/libCUFDialect.a lib/libFortranEvaluate.a lib/libFortranParser.a lib/libFortranCommon.a lib/libFortranDecimal.a lib/libFIRSupport.a lib/libHLFIRDialect.a lib/libFIRDialect.a lib/lib > > > > > > FIRDialectSupport.a lib/libCUFAttrs.a lib/libclang-cpp.so.20.1 lib/libMLIR.so.20.1 lib/libLLVM.so.20.1 && : > > > > > > ld: error: undefined symbol: feholdexcept > > > > > > > > > > This is strange. Could you show me the output of e.g. > > > > > readelf --dyn_syms /lib/libm.so.5 | grep feholdexcept > > > > > The best would be the output from the command like above for each missing > > > > > symbol. > > > > > > > > missing :( > > > > > > > > FreeBSD 16.0-CURRENT #0 main-cf1f21572897: Mon Apr 6 13:45:02 MSK 2026 > > > > > > > > root@aarch64:/ # readelf --dyn-syms /lib/libm.so.5 | grep feholdexcept > > > > root@aarch64:/ # > > > Hm, ok, perhaps I understand. > > > These symbols where never exported from libm, and it just happens that > > > they were compiled into the binaries itself due to extern inline. > > > So the proper fix for consumers that want the symbols is to export them > > > from libm.so. > > > > > > > > > > > full list of symbols: > > > > > > > > Symbol table '.dynsym' contains 306 entries: > > > > > > It is practically impossible to get the missed symbols from the list of > > > present symbols. Try this, if there is something else missed, add the > > > symbols to msun/aarch64/Symbol.map. I did not even tried to (cross-) > > > compile. > > > > > > I will think how to get the complete list to export, meantime. > > > This should also be problem on any arch that provides non-standard fenv > > > functions. > > > > > > commit 7573286180010304ca982d09ce5a980740e1e35e > > > Author: Konstantin Belousov > > > Date: Mon Apr 6 19:41:23 2026 +0300 > > > > > > lib/msun: export arch-specific fenv methods > > > > > > diff --git a/lib/msun/Makefile b/lib/msun/Makefile > > > index 5112337f6297..b6e77fed5d9c 100644 > > > --- a/lib/msun/Makefile > > > +++ b/lib/msun/Makefile > > > @@ -115,6 +115,10 @@ LIBC_ARCH=${MACHINE_CPUARCH} > > > CFLAGS+= -I${.CURDIR}/src -I${LIBC_SRCTOP}/include \ > > > -I${LIBC_SRCTOP}/${LIBC_ARCH} > > > SYM_MAPS+= ${.CURDIR}/Symbol.map > > > +ARCH_MAP= ${.CURDIR}/${LIBC_ARCH}/Symbol.map > > > +.if exists(${ARCH_MAP}) > > > +SYM_MAPS+= ${ARCH_MAP} > > > +.endif > > > > > > VERSION_DEF= ${LIBC_SRCTOP}/Versions.def > > > SYMBOL_MAPS= ${SYM_MAPS} > > > diff --git a/lib/msun/aarch64/Symbol.map b/lib/msun/aarch64/Symbol.map > > > new file mode 100644 > > > index 000000000000..d24d7820ba98 > > > --- /dev/null > > > +++ b/lib/msun/aarch64/Symbol.map > > > @@ -0,0 +1,5 @@ > > > +FBSD_1.9 { > > > + fegetenv; > > > + feholdexcept; > > > + feraiseexcept; > > > +}; > > > > May be better way is repeat map from msun/arm/Symbol.map? amd64 is also equal to it here. > > FBSD_1.9 { > > fesetexceptflag; > > feraiseexcept; > > fegetenv; > > feholdexcept; > > feupdateenv; > > feenableexcept; > > fedisableexcept; > > fegetexcept; > > }; > > > > Started build with your diff anyway, will see on result > > Indeed. Also I suspect that msun/arm/Makefile.inc needs a fix to not list > the Symbol.map twice, it is relevant for lib32 on aarch64. Updated patch > below. > > commit 3a280c3bae0b3b9b76c19259ef9e7890fb7e38f1 > Author: Konstantin Belousov > Date: Mon Apr 6 19:41:23 2026 +0300 > > lib/msun: export arch-specific fenv methods > > Reported by: fluffy > > diff --git a/lib/msun/Makefile b/lib/msun/Makefile > index 5112337f6297..b6e77fed5d9c 100644 > --- a/lib/msun/Makefile > +++ b/lib/msun/Makefile > @@ -115,6 +115,10 @@ LIBC_ARCH=${MACHINE_CPUARCH} > CFLAGS+= -I${.CURDIR}/src -I${LIBC_SRCTOP}/include \ > -I${LIBC_SRCTOP}/${LIBC_ARCH} > SYM_MAPS+= ${.CURDIR}/Symbol.map > +ARCH_MAP= ${.CURDIR}/${LIBC_ARCH}/Symbol.map > +.if exists(${ARCH_MAP}) > +SYM_MAPS+= ${ARCH_MAP} > +.endif > > VERSION_DEF= ${LIBC_SRCTOP}/Versions.def > SYMBOL_MAPS= ${SYM_MAPS} > diff --git a/lib/msun/aarch64/Symbol.map b/lib/msun/aarch64/Symbol.map > new file mode 100644 > index 000000000000..b468c814ff06 > --- /dev/null > +++ b/lib/msun/aarch64/Symbol.map > @@ -0,0 +1,10 @@ > +FBSD_1.9 { > + fesetexceptflag; > + feraiseexcept; > + fegetenv; > + feholdexcept; > + feupdateenv; > + feenableexcept; > + fedisableexcept; > + fegetexcept; > +}; > diff --git a/lib/msun/arm/Makefile.inc b/lib/msun/arm/Makefile.inc > index 6e3ddb351dd3..e155f1a2cae4 100644 > --- a/lib/msun/arm/Makefile.inc > +++ b/lib/msun/arm/Makefile.inc > @@ -1,5 +1,4 @@ > LDBL_PREC = 53 > -SYM_MAPS += ${.CURDIR}/arm/Symbol.map > > .if defined(CPUTYPE) && ${CPUTYPE:M*soft*} != "" > ARCH_SRCS = fenv-softfp.c fenv-vfp.c --- lib/msun__L --- --- libm.so.5.full --- Building shared library libm.so.5 cc -target aarch64-unknown-freebsd16.0 --sysroot=/usr/obj/opt/poudriere/jails/16c/usr/src/arm64.aarch64/tmp -B/usr/obj/opt/poudriere/jails/16c/usr/src/arm64.aarch64/tmp/usr/bin -Wl,-zrelro -Wl,--versio n-script=Version.map -Wl,--no-undefined-version -fstack-protector-strong -shared -Wl,-x -Wl,--fatal-warnings -Wl,--warn-shared-textrel -o libm.so.5.full -Wl,-soname,libm.so.5 b_tgamma.pico e_acos.pi co e_acosf.pico e_acosh.pico e_acoshf.pico e_asin.pico e_asinf.pico e_atan2.pico e_atan2f.pico e_atanh.pico e_atanhf.pico e_cosh.pico e_coshf.pico e_exp.pico e_expf.pico e_fmod.pico e_fmodf.pico e_gamma .pico e_gamma_r.pico e_gammaf.pico e_gammaf_r.pico e_hypot.pico e_hypotf.pico e_j0.pico e_j0f.pico e_j1.pico e_j1f.pico e_jn.pico e_jnf.pico e_lgamma.pico e_lgamma_r.pico e_lgammaf.pico e_lgammaf_r.pico e_log.pico e_log10.pico e_log10f.pico e_log2.pico e_log2f.pico e_logf.pico e_pow.pico e_powf.pico e_rem_pio2.pico e_rem_pio2f.pico e_remainder.pico e_remainderf.pico e_scalb.pico e_scalbf.pico e_sinh.p ico e_sinhf.pico e_sqrt.pico e_sqrtf.pico fenv.pico k_cos.pico k_cosf.pico k_exp.pico k_expf.pico k_rem_pio2.pico k_sin.pico k_sinf.pico k_tan.pico k_tanf.pico s_asinh.pico s_asinhf.pico s_atan.pico s_a tanf.pico s_carg.pico s_cargf.pico s_cargl.pico s_cbrt.pico s_cbrtf.pico s_ceil.pico s_ceilf.pico s_clog.pico s_clogf.pico s_copysign.pico s_copysignf.pico s_cos.pico s_cosf.pico s_csqrt.pico s_csqrtf.p ico s_erf.pico s_erff.pico s_exp2.pico s_exp2f.pico s_expm1.pico s_expm1f.pico s_fabsf.pico s_fdim.pico s_finite.pico s_finitef.pico s_floor.pico s_floorf.pico s_fma.pico s_fmaf.pico s_fmax.pico s_fmaxf .pico s_fmaximum.pico s_fmaximumf.pico s_fmin.pico s_fminf.pico s_fminimum.pico s_fminimumf.pico s_frexp.pico s_frexpf.pico s_ilogb.pico s_ilogbf.pico s_ilogbl.pico s_isfinite.pico s_isnan.pico s_isnorm al.pico s_llrint.pico s_llrintf.pico s_llround.pico s_llroundf.pico s_llroundl.pico s_log1p.pico s_log1pf.pico s_logb.pico s_logbf.pico s_lrint.pico s_lrintf.pico s_lround.pico s_lroundf.pico s_lroundl. pico s_modff.pico s_nan.pico s_nearbyint.pico s_nextafter.pico s_nextafterf.pico s_nexttowardf.pico s_remquo.pico s_remquof.pico s_rint.pico s_rintf.pico s_round.pico s_roundf.pico s_scalbln.pico s_scal bn.pico s_scalbnf.pico s_signbit.pico s_signgam.pico s_significand.pico s_significandf.pico s_sin.pico s_sincos.pico s_sincosf.pico s_sinf.pico s_tan.pico s_tanf.pico s_tanh.pico s_tanhf.pico s_tgammaf. pico s_trunc.pico s_truncf.pico w_cabs.pico w_cabsf.pico w_drem.pico w_dremf.pico s_cospi.pico s_cospif.pico s_sinpi.pico s_sinpif.pico s_tanpi.pico s_tanpif.pico s_copysignl.pico s_fabsl.pico s_llrintl .pico s_lrintl.pico s_modfl.pico b_tgammal.pico catrigl.pico e_acoshl.pico e_acosl.pico e_asinl.pico e_atan2l.pico e_atanhl.pico e_coshl.pico e_fmodl.pico e_hypotl.pico e_lgammal.pico e_lgammal_r.pico e _powl.pico e_remainderl.pico e_sinhl.pico e_sqrtl.pico invtrig.pico k_cosl.pico k_sinl.pico k_tanl.pico s_asinhl.pico s_atanl.pico s_cbrtl.pico s_ceill.pico s_cexpl.pico s_clogl.pico s_cosl.pico s_cospi l.pico s_cprojl.pico s_csqrtl.pico s_erfl.pico s_exp2l.pico s_expl.pico s_floorl.pico s_fmal.pico s_fmaxl.pico s_fmaximuml.pico s_fminl.pico s_fminimuml.pico s_frexpl.pico s_logbl.pico s_logl.pico s_nan l.pico s_nextafterl.pico s_nexttoward.pico s_remquol.pico s_rintl.pico s_roundl.pico s_scalbnl.pico s_sinl.pico s_sincosl.pico s_sinpil.pico s_tanhl.pico s_tanl.pico s_tanpil.pico s_truncl.pico w_cabsl. pico catrig.pico catrigf.pico s_ccosh.pico s_ccoshf.pico s_cexp.pico s_cexpf.pico s_cimag.pico s_cimagf.pico s_cimagl.pico s_conj.pico s_conjf.pico s_conjl.pico s_cpow.pico s_cpowf.pico s_cpowl.pico s_c proj.pico s_cprojf.pico s_creal.pico s_crealf.pico s_creall.pico s_csinh.pico s_csinhf.pico s_ctanh.pico s_ctanhf.pico ld: error: version script assignment of 'FBSD_1.9' to symbol 'feenableexcept' failed: symbol not defined ld: error: version script assignment of 'FBSD_1.9' to symbol 'fedisableexcept' failed: symbol not defined ld: error: version script assignment of 'FBSD_1.9' to symbol 'fegetexcept' failed: symbol not defined cc: error: linker command failed with exit code 1 (use -v to see invocation) *** [libm.so.5.full] Error code 1 make[4]: stopped making "all" in /opt/poudriere/jails/16c/usr/src/lib/msun make[4]: 1 error make[4]: stopped making "all" in /opt/poudriere/jails/16c/usr/src/lib/msun make[3]: stopped making "_prebuild_libs" in /opt/poudriere/jails/16c/usr/src Will restart build with deleted these 3 symbols from map -- Sincerely, Dima (fluffy@FreeBSD.org, https://t.me/FluffyBSD, @fluffy:matrix-dev.freebsd.org) (desktop, kde, x11, office, ports-secteam)@FreeBSD team --69d3f054_2eb141f2_d4c2 Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline


On 06.04.2026 20:05, Konstantin Belousov wrote:
=
On Mon, Apr 06, 2026 at 07:58:37PM +0300, D= ima Panov wrote:


On 06.04.202= 6 19:45, Konstantin Belousov wrote:
On = Mon, Apr 06, 2026 at 07:25:18PM +0300, Dima Panov wrote:


On 06.04.2026 19:07, Konstantin Belousov wrot= e:
On Mon, Apr 06, 2026 at 06:56:36PM += 0300, Dima Panov wrote:
Hello=21
<= br>This breaks most of libm consumers

llvm/flang:
=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
=46AILED: =5Bcode=3D1=5D bin/flang-= 20
: && /usr/local/libexec/ccache/c++ -O2 -pipe -fstack-prote= ctor-strong -isystem /usr/local/include -fno-strict-aliasing -isystem /us= r/local/include -fPIC -fno-semantic-interposition -fvisibility-inline s-hidden -Werror=3Ddate-time -Werror=3Dunguarded-availability-new -Wall = -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field= -initializers -pedantic -Wno-long-long -Wc++98-compat-extra-s
emi -Wi= mplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-vir= tual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversio= n -Wmisleading-indentation -Wctad-maybe-unsupport
ed -fdiagnostics-co= lor -ffunction-sections -fdata-sections -Wno-deprecated-copy -Wno-string-= conversion -Wno-ctad-maybe-unsupported -Wno-unused-command-line-argument = -Wstring-conversion -Wcover
ed-switch-default -Wno-nested-anon-types = -O2 -pipe -fstack-protector-strong -isystem /usr/local/include -fno-stric= t-aliasing -isystem /usr/local/include -DNDEBUG -Wl,--color-diagnostics -= Wl,--expor
t-dynamic -Wl,-z,origin -Wl,--gc-sections -Xlinker --depen= dency-file=3Dtools/flang/tools/flang-driver/CMake=46iles/flang.dir/link.d= tools/flang/tools/flang-driver/CMake=46iles/flang.dir/driver.cpp.o tools= /
flang/tools/flang-driver/CMake=46iles/flang.dir/fc1=5Fmain.cpp.o -o= bin/flang-20 -L/wrkdirs/usr/ports/devel/llvm20/work-default/.build/./lib= -Wl,-rpath,=22=5C=24ORIGIN/../lib:/wrkdirs/usr/ports/devel/llvm20/work- =
default/.build/./lib:/wrkdirs/usr/ports/devel/llvm20/work-default/.bu= ild/lib:=22 -lpthread lib/libflang=46rontend.a lib/libflang=46rontendTool= .a lib/lib=46ortranLower.a lib/lib=46ortranSemantics.a lib/lib=46o
rt= ranSupport.a lib/libflangPasses.a lib/libHL=46IRTransforms.a lib/lib=46IR= Transforms.a lib/lib=46IROpenACCSupport.a lib/lib=46langOpenMPTransforms.= a lib/lib=46IRCodeGen.a lib/lib=46IRAnalysis.a lib/lib=46IRB
uilder.a= lib/libCU=46Dialect.a lib/lib=46ortranEvaluate.a lib/lib=46ortranParser.= a lib/lib=46ortranCommon.a lib/lib=46ortranDecimal.a lib/lib=46IRSupport.= a lib/libHL=46IRDialect.a lib/lib=46IRDialect.a lib/lib
=46IRDialectS= upport.a lib/libCU=46Attrs.a lib/libclang-cpp.so.20.1 lib/libMLIR.so.20.1= lib/libLLVM.so.20.1 && :
ld: error: undefined symbol: fehold= except

This is strange. Could you show me the outpu= t of e.g.
readelf --dyn=5Fsyms /lib/libm.so.5 =7C grep feholdexcept <= br>The best would be the output from the command like above for each miss= ing
symbol.

missing :(

=46reeBSD 16.0-= CURRENT =230 main-cf1f21572897: Mon Apr 6 13:45:02 MSK 2026

root= =40aarch64:/ =23 readelf --dyn-syms /lib/libm.so.5 =7C grep feholdexcept =
root=40aarch64:/ =23
Hm, ok, perhaps I understand. <= br>These symbols where never exported from libm, and it just happens that=
they were compiled into the binaries itself due to extern inline. So the proper fix for consumers that want the symbols is to export them=
from libm.so.


full list = of symbols:

Symbol table '.dynsym' contains 306 entries:

It is practically impossible to get the missed symbols fro= m the list of
present symbols. Try this, if there is something else m= issed, add the
symbols to msun/aarch64/Symbol.map. I did not even tri= ed to (cross-)
compile.

I will think how to get the complete= list to export, meantime.
This should also be problem on any arch th= at provides non-standard fenv
functions.

commit 757328618001= 0304ca982d09ce5a980740e1e35e
Author: Konstantin Belousov <kib=40=46= reeBSD.org>
Date: Mon Apr 6 19:41:23 2026 +0300

lib/msun:= export arch-specific fenv methods

diff --git a/lib/msun/Makefil= e b/lib/msun/Makefile
index 5112337f6297..b6e77fed5d9c 100644
---= a/lib/msun/Makefile
+++ b/lib/msun/Makefile
=40=40 -115,6 +115,1= 0 =40=40 LIBC=5FARCH=3D=24=7BMACHINE=5FCPUARCH=7D
C=46LAGS+=3D -I=24=7B= .CURDIR=7D/src -I=24=7BLIBC=5FSRCTOP=7D/include =5C
-I=24=7BLIBC=5FSR= CTOP=7D/=24=7BLIBC=5FARCH=7D
SYM=5FMAPS+=3D =24=7B.CURDIR=7D/Symbol.m= ap
+ARCH=5FMAP=3D =24=7B.CURDIR=7D/=24=7BLIBC=5FARCH=7D/Symbol.map +.if exists(=24=7BARCH=5FMAP=7D)
+SYM=5FMAPS+=3D =24=7BARCH=5FMAP=7D=
+.endif

VERSION=5FDE=46=3D =24=7BLIBC=5FSRCTOP=7D/Versions.= def
SYMBOL=5FMAPS=3D =24=7BSYM=5FMAPS=7D
diff --git a/lib/msun/aa= rch64/Symbol.map b/lib/msun/aarch64/Symbol.map
new file mode 100644 <= br>index 000000000000..d24d7820ba98
--- /dev/null
+++ b/lib/msun/= aarch64/Symbol.map
=40=40 -0,0 +1,5 =40=40
+=46BSD=5F1.9 =7B
= + fegetenv;
+ feholdexcept;
+ feraiseexcept;
+=7D;

May be better way is repeat map from msun/arm/Symbol.map=3F a= md64 is also equal to it here.
=46BSD=5F1.9 =7B
fesetexceptflag; =
feraiseexcept;
fegetenv;
feholdexcept;
feupdateenv;
f= eenableexcept;
fedisableexcept;
fegetexcept;
=7D;

St= arted build with your diff anyway, will see on result
<= br>Indeed. Also I suspect that msun/arm/Makefile.inc needs a fix to not l= ist
the Symbol.map twice, it is relevant for lib32 on aarch64. Update= d patch
below.

commit 3a280c3bae0b3b9b76c19259ef9e7890fb7e38= f1
Author: Konstantin Belousov <kib=40=46reeBSD.org>
Date: = Mon Apr 6 19:41:23 2026 +0300

lib/msun: export arch-specific fen= v methods

Reported by: fluffy

diff --git a/lib/msun/Mak= efile b/lib/msun/Makefile
index 5112337f6297..b6e77fed5d9c 100644 --- a/lib/msun/Makefile
+++ b/lib/msun/Makefile
=40=40 -115,6 +1= 15,10 =40=40 LIBC=5FARCH=3D=24=7BMACHINE=5FCPUARCH=7D
C=46LAGS+=3D -I= =24=7B.CURDIR=7D/src -I=24=7BLIBC=5FSRCTOP=7D/include =5C
-I=24=7BLI= BC=5FSRCTOP=7D/=24=7BLIBC=5FARCH=7D
SYM=5FMAPS+=3D =24=7B.CURDIR=7D/S= ymbol.map
+ARCH=5FMAP=3D =24=7B.CURDIR=7D/=24=7BLIBC=5FARCH=7D/Symbol= .map
+.if exists(=24=7BARCH=5FMAP=7D)
+SYM=5FMAPS+=3D =24=7BARCH=5F= MAP=7D
+.endif

VERSION=5FDE=46=3D =24=7BLIBC=5FSRCTOP=7D/Ver= sions.def
SYMBOL=5FMAPS=3D =24=7BSYM=5FMAPS=7D
diff --git a/lib/m= sun/aarch64/Symbol.map b/lib/msun/aarch64/Symbol.map
new file mode 10= 0644
index 000000000000..b468c814ff06
--- /dev/null
+++ b/lib= /msun/aarch64/Symbol.map
=40=40 -0,0 +1,10 =40=40
+=46BSD=5F1.9 =7B=
+ fesetexceptflag;
+ feraiseexcept;
+ fegetenv;
+ fehold= except;
+ feupdateenv;
+ feenableexcept;
+ fedisableexcept; <= br>+ fegetexcept;
+=7D;
diff --git a/lib/msun/arm/Makefile.inc b/= lib/msun/arm/Makefile.inc
index 6e3ddb351dd3..e155f1a2cae4 100644 --- a/lib/msun/arm/Makefile.inc
+++ b/lib/msun/arm/Makefile.inc
= =40=40 -1,5 +1,4 =40=40
LDBL=5FPREC =3D 53
-SYM=5FMAPS +=3D =24=7B= .CURDIR=7D/arm/Symbol.map

.if defined(CPUTYPE) && =24=7B= CPUTYPE:M*soft*=7D =21=3D =22=22
ARCH=5FSRCS =3D fenv-softfp.c fenv-v= fp.c


--- lib/msun=5F=5FL ---
--- libm.so.5= .full ---
Building shared library libm.so.5
cc -target aarch64-un= known-freebsd16.0 --sysroot=3D/usr/obj/opt/poudriere/jails/16c/usr/src/ar= m64.aarch64/tmp -B/usr/obj/opt/poudriere/jails/16c/usr/src/arm64.aarch64/= tmp/usr/bin -Wl,-zrelro -Wl,--versio
n-script=3DVersion.map -Wl,--no-= undefined-version -fstack-protector-strong -shared -Wl,-x -Wl,--fatal-war= nings -Wl,--warn-shared-textrel -o libm.so.5.full -Wl,-soname,libm.so.5 b= =5Ftgamma.pico e=5Facos.pi
co e=5Facosf.pico e=5Facosh.pico e=5Facosh= f.pico e=5Fasin.pico e=5Fasinf.pico e=5Fatan2.pico e=5Fatan2f.pico e=5Fat= anh.pico e=5Fatanhf.pico e=5Fcosh.pico e=5Fcoshf.pico e=5Fexp.pico e=5Fex= pf.pico e=5Ffmod.pico e=5Ffmodf.pico e=5Fgamma
.pico e=5Fgamma=5Fr.pi= co e=5Fgammaf.pico e=5Fgammaf=5Fr.pico e=5Fhypot.pico e=5Fhypotf.pico e=5F= j0.pico e=5Fj0f.pico e=5Fj1.pico e=5Fj1f.pico e=5Fjn.pico e=5Fjnf.pico e=5F= lgamma.pico e=5Flgamma=5Fr.pico e=5Flgammaf.pico e=5Flgammaf=5Fr.pico e=5Flog.pico e=5Flog10.pico e=5Flog10f.pico e=5Flog2.pico e=5Flog2f.pic= o e=5Flogf.pico e=5Fpow.pico e=5Fpowf.pico e=5Frem=5Fpio2.pico e=5Frem=5F= pio2f.pico e=5Fremainder.pico e=5Fremainderf.pico e=5Fscalb.pico e=5Fscal= bf.pico e=5Fsinh.p
ico e=5Fsinhf.pico e=5Fsqrt.pico e=5Fsqrtf.pico fe= nv.pico k=5Fcos.pico k=5Fcosf.pico k=5Fexp.pico k=5Fexpf.pico k=5Frem=5Fp= io2.pico k=5Fsin.pico k=5Fsinf.pico k=5Ftan.pico k=5Ftanf.pico s=5Fasinh.= pico s=5Fasinhf.pico s=5Fatan.pico s=5Fa
tanf.pico s=5Fcarg.pico s=5F= cargf.pico s=5Fcargl.pico s=5Fcbrt.pico s=5Fcbrtf.pico s=5Fceil.pico s=5F= ceilf.pico s=5Fclog.pico s=5Fclogf.pico s=5Fcopysign.pico s=5Fcopysignf.p= ico s=5Fcos.pico s=5Fcosf.pico s=5Fcsqrt.pico s=5Fcsqrtf.p
ico s=5Fer= f.pico s=5Ferff.pico s=5Fexp2.pico s=5Fexp2f.pico s=5Fexpm1.pico s=5Fexpm= 1f.pico s=5Ffabsf.pico s=5Ffdim.pico s=5Ffinite.pico s=5Ffinitef.pico s=5F= floor.pico s=5Ffloorf.pico s=5Ffma.pico s=5Ffmaf.pico s=5Ffmax.pico s=5Ff= maxf
.pico s=5Ffmaximum.pico s=5Ffmaximumf.pico s=5Ffmin.pico s=5Ffmi= nf.pico s=5Ffminimum.pico s=5Ffminimumf.pico s=5Ffrexp.pico s=5Ffrexpf.pi= co s=5Filogb.pico s=5Filogbf.pico s=5Filogbl.pico s=5Fisfinite.pico s=5Fi= snan.pico s=5Fisnorm
al.pico s=5Fllrint.pico s=5Fllrintf.pico s=5Fllr= ound.pico s=5Fllroundf.pico s=5Fllroundl.pico s=5Flog1p.pico s=5Flog1pf.p= ico s=5Flogb.pico s=5Flogbf.pico s=5Flrint.pico s=5Flrintf.pico s=5Flroun= d.pico s=5Flroundf.pico s=5Flroundl.
pico s=5Fmodff.pico s=5Fnan.pico= s=5Fnearbyint.pico s=5Fnextafter.pico s=5Fnextafterf.pico s=5Fnexttoward= f.pico s=5Fremquo.pico s=5Fremquof.pico s=5Frint.pico s=5Frintf.pico s=5F= round.pico s=5Froundf.pico s=5Fscalbln.pico s=5Fscal
bn.pico s=5Fscal= bnf.pico s=5Fsignbit.pico s=5Fsigngam.pico s=5Fsignificand.pico s=5Fsigni= ficandf.pico s=5Fsin.pico s=5Fsincos.pico s=5Fsincosf.pico s=5Fsinf.pico = s=5Ftan.pico s=5Ftanf.pico s=5Ftanh.pico s=5Ftanhf.pico s=5Ftgammaf.
= pico s=5Ftrunc.pico s=5Ftruncf.pico w=5Fcabs.pico w=5Fcabsf.pico w=5Fdrem= .pico w=5Fdremf.pico s=5Fcospi.pico s=5Fcospif.pico s=5Fsinpi.pico s=5Fsi= npif.pico s=5Ftanpi.pico s=5Ftanpif.pico s=5Fcopysignl.pico s=5Ffabsl.pic= o s=5Fllrintl
.pico s=5Flrintl.pico s=5Fmodfl.pico b=5Ftgammal.pico c= atrigl.pico e=5Facoshl.pico e=5Facosl.pico e=5Fasinl.pico e=5Fatan2l.pico= e=5Fatanhl.pico e=5Fcoshl.pico e=5Ffmodl.pico e=5Fhypotl.pico e=5Flgamma= l.pico e=5Flgammal=5Fr.pico e
=5Fpowl.pico e=5Fremainderl.pico e=5Fsi= nhl.pico e=5Fsqrtl.pico invtrig.pico k=5Fcosl.pico k=5Fsinl.pico k=5Ftanl= .pico s=5Fasinhl.pico s=5Fatanl.pico s=5Fcbrtl.pico s=5Fceill.pico s=5Fce= xpl.pico s=5Fclogl.pico s=5Fcosl.pico s=5Fcospi
l.pico s=5Fcprojl.pic= o s=5Fcsqrtl.pico s=5Ferfl.pico s=5Fexp2l.pico s=5Fexpl.pico s=5Ffloorl.p= ico s=5Ffmal.pico s=5Ffmaxl.pico s=5Ffmaximuml.pico s=5Ffminl.pico s=5Ffm= inimuml.pico s=5Ffrexpl.pico s=5Flogbl.pico s=5Flogl.pico s=5Fnan
l.p= ico s=5Fnextafterl.pico s=5Fnexttoward.pico s=5Fremquol.pico s=5Frintl.pi= co s=5Froundl.pico s=5Fscalbnl.pico s=5Fsinl.pico s=5Fsincosl.pico s=5Fsi= npil.pico s=5Ftanhl.pico s=5Ftanl.pico s=5Ftanpil.pico s=5Ftruncl.pico w=5F= cabsl.
pico catrig.pico catrigf.pico s=5Fccosh.pico s=5Fccoshf.pico s= =5Fcexp.pico s=5Fcexpf.pico s=5Fcimag.pico s=5Fcimagf.pico s=5Fcimagl.pic= o s=5Fconj.pico s=5Fconjf.pico s=5Fconjl.pico s=5Fcpow.pico s=5Fcpowf.pic= o s=5Fcpowl.pico s=5Fc
proj.pico s=5Fcprojf.pico s=5Fcreal.pico s=5Fc= realf.pico s=5Fcreall.pico s=5Fcsinh.pico s=5Fcsinhf.pico s=5Fctanh.pico = s=5Fctanhf.pico
ld: error: version script assignment of '=46BSD=5F1.9= ' to symbol 'feenableexcept' failed: symbol not defined
ld: error: ve= rsion script assignment of '=46BSD=5F1.9' to symbol 'fedisableexcept' fai= led: symbol not defined
ld: error: version script assignment of '=46B= SD=5F1.9' to symbol 'fegetexcept' failed: symbol not defined
cc: erro= r: linker command failed with exit code 1 (use -v to see invocation)
= *** =5Blibm.so.5.full=5D Error code 1

make=5B4=5D: stopped makin= g =22all=22 in /opt/poudriere/jails/16c/usr/src/lib/msun
make=5B4=5D:= 1 error

make=5B4=5D: stopped making =22all=22 in /opt/poudriere= /jails/16c/usr/src/lib/msun

make=5B3=5D: stopped making =22=5Fpr= ebuild=5Flibs=22 in /opt/poudriere/jails/16c/usr/src


Will r= estart build with deleted these 3 symbols from map

--
Sincer= ely,
Dima (fluffy=40=46reeBSD.org, https://t.me/=46luffyBSD, =40fluff= y:matrix-dev.freebsd.org)
(desktop, kde, x11, office, ports-secteam)=40= =46reeBSD team

--69d3f054_2eb141f2_d4c2-- From nobody Mon Apr 6 17:59:03 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fqHCC27znz6YS1X; Mon, 06 Apr 2026 17:59:19 +0000 (UTC) (envelope-from kib@freebsd.org) 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 4fqHCB5Mscz3KVB; Mon, 06 Apr 2026 17:59:18 +0000 (UTC) (envelope-from kib@freebsd.org) Authentication-Results: mx1.freebsd.org; none Received: from tom.home (kib@localhost [127.0.0.1] (may be forged)) by kib.kiev.ua (8.18.1/8.18.1) with ESMTP id 636Hx3EQ035977; Mon, 6 Apr 2026 20:59:06 +0300 (EEST) (envelope-from kib@freebsd.org) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 636Hx3EQ035977 Received: (from kostik@localhost) by tom.home (8.18.1/8.18.1/Submit) id 636Hx3iN035976; Mon, 6 Apr 2026 20:59:03 +0300 (EEST) (envelope-from kib@freebsd.org) X-Authentication-Warning: tom.home: kostik set sender to kib@freebsd.org using -f Date: Mon, 6 Apr 2026 20:59:03 +0300 From: Konstantin Belousov To: Dima Panov Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 3a01e1e1a50c - main - msun/aarch64: convert fenv functions to proper linkage Message-ID: References: <69caafbb.408c4.7b20a1e1@gitrepo.freebsd.org> <1f2ad4f0-a4ab-4f15-a779-5f1a6db9912b@FreeBSD.org> <8022afad-9cee-4ade-8b56-ef5b7feb6e16@FreeBSD.org> <724be016-85a3-4dfa-8b18-abcfe384b0fc@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: <724be016-85a3-4dfa-8b18-abcfe384b0fc@FreeBSD.org> X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham autolearn_force=no version=4.0.2 X-Spam-Checker-Version: SpamAssassin 4.0.2 (2025-08-27) on tom.home X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US] X-Rspamd-Queue-Id: 4fqHCB5Mscz3KVB X-Spamd-Bar: ---- On Mon, Apr 06, 2026 at 08:41:40PM +0300, Dima Panov wrote: > > > On 06.04.2026 20:05, Konstantin Belousov wrote: > > On Mon, Apr 06, 2026 at 07:58:37PM +0300, Dima Panov wrote: > > > > > > > > > On 06.04.2026 19:45, Konstantin Belousov wrote: > > > > On Mon, Apr 06, 2026 at 07:25:18PM +0300, Dima Panov wrote: > > > > > > > > > > > > > > > On 06.04.2026 19:07, Konstantin Belousov wrote: > > > > > > On Mon, Apr 06, 2026 at 06:56:36PM +0300, Dima Panov wrote: > > > > > > > Hello! > > > > > > > > > > > > > > This breaks most of libm consumers > > > > > > > > > > > > > > llvm/flang: > > > > > > > =============== > > > > > > > FAILED: [code=1] bin/flang-20 > > > > > > > : && /usr/local/libexec/ccache/c++ -O2 -pipe -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -isystem /usr/local/include -fPIC -fno-semantic-interposition -fvisibility-inline > > > > > > > s-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-s > > > > > > > emi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupport > > > > > > > ed -fdiagnostics-color -ffunction-sections -fdata-sections -Wno-deprecated-copy -Wno-string-conversion -Wno-ctad-maybe-unsupported -Wno-unused-command-line-argument -Wstring-conversion -Wcover > > > > > > > ed-switch-default -Wno-nested-anon-types -O2 -pipe -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -isystem /usr/local/include -DNDEBUG -Wl,--color-diagnostics -Wl,--expor > > > > > > > t-dynamic -Wl,-z,origin -Wl,--gc-sections -Xlinker --dependency-file=tools/flang/tools/flang-driver/CMakeFiles/flang.dir/link.d tools/flang/tools/flang-driver/CMakeFiles/flang.dir/driver.cpp.o tools/ > > > > > > > flang/tools/flang-driver/CMakeFiles/flang.dir/fc1_main.cpp.o -o bin/flang-20 -L/wrkdirs/usr/ports/devel/llvm20/work-default/.build/./lib -Wl,-rpath,"\$ORIGIN/../lib:/wrkdirs/usr/ports/devel/llvm20/work- > > > > > > > default/.build/./lib:/wrkdirs/usr/ports/devel/llvm20/work-default/.build/lib:" -lpthread lib/libflangFrontend.a lib/libflangFrontendTool.a lib/libFortranLower.a lib/libFortranSemantics.a lib/libFo > > > > > > > rtranSupport.a lib/libflangPasses.a lib/libHLFIRTransforms.a lib/libFIRTransforms.a lib/libFIROpenACCSupport.a lib/libFlangOpenMPTransforms.a lib/libFIRCodeGen.a lib/libFIRAnalysis.a lib/libFIRB > > > > > > > uilder.a lib/libCUFDialect.a lib/libFortranEvaluate.a lib/libFortranParser.a lib/libFortranCommon.a lib/libFortranDecimal.a lib/libFIRSupport.a lib/libHLFIRDialect.a lib/libFIRDialect.a lib/lib > > > > > > > FIRDialectSupport.a lib/libCUFAttrs.a lib/libclang-cpp.so.20.1 lib/libMLIR.so.20.1 lib/libLLVM.so.20.1 && : > > > > > > > ld: error: undefined symbol: feholdexcept > > > > > > > > > > > > This is strange. Could you show me the output of e.g. > > > > > > readelf --dyn_syms /lib/libm.so.5 | grep feholdexcept > > > > > > The best would be the output from the command like above for each missing > > > > > > symbol. > > > > > > > > > > missing :( > > > > > > > > > > FreeBSD 16.0-CURRENT #0 main-cf1f21572897: Mon Apr 6 13:45:02 MSK 2026 > > > > > > > > > > root@aarch64:/ # readelf --dyn-syms /lib/libm.so.5 | grep feholdexcept > > > > > root@aarch64:/ # > > > > Hm, ok, perhaps I understand. > > > > These symbols where never exported from libm, and it just happens that > > > > they were compiled into the binaries itself due to extern inline. > > > > So the proper fix for consumers that want the symbols is to export them > > > > from libm.so. > > > > > > > > > > > > > > full list of symbols: > > > > > > > > > > Symbol table '.dynsym' contains 306 entries: > > > > > > > > It is practically impossible to get the missed symbols from the list of > > > > present symbols. Try this, if there is something else missed, add the > > > > symbols to msun/aarch64/Symbol.map. I did not even tried to (cross-) > > > > compile. > > > > > > > > I will think how to get the complete list to export, meantime. > > > > This should also be problem on any arch that provides non-standard fenv > > > > functions. > > > > > > > > commit 7573286180010304ca982d09ce5a980740e1e35e > > > > Author: Konstantin Belousov > > > > Date: Mon Apr 6 19:41:23 2026 +0300 > > > > > > > > lib/msun: export arch-specific fenv methods > > > > > > > > diff --git a/lib/msun/Makefile b/lib/msun/Makefile > > > > index 5112337f6297..b6e77fed5d9c 100644 > > > > --- a/lib/msun/Makefile > > > > +++ b/lib/msun/Makefile > > > > @@ -115,6 +115,10 @@ LIBC_ARCH=${MACHINE_CPUARCH} > > > > CFLAGS+= -I${.CURDIR}/src -I${LIBC_SRCTOP}/include \ > > > > -I${LIBC_SRCTOP}/${LIBC_ARCH} > > > > SYM_MAPS+= ${.CURDIR}/Symbol.map > > > > +ARCH_MAP= ${.CURDIR}/${LIBC_ARCH}/Symbol.map > > > > +.if exists(${ARCH_MAP}) > > > > +SYM_MAPS+= ${ARCH_MAP} > > > > +.endif > > > > > > > > VERSION_DEF= ${LIBC_SRCTOP}/Versions.def > > > > SYMBOL_MAPS= ${SYM_MAPS} > > > > diff --git a/lib/msun/aarch64/Symbol.map b/lib/msun/aarch64/Symbol.map > > > > new file mode 100644 > > > > index 000000000000..d24d7820ba98 > > > > --- /dev/null > > > > +++ b/lib/msun/aarch64/Symbol.map > > > > @@ -0,0 +1,5 @@ > > > > +FBSD_1.9 { > > > > + fegetenv; > > > > + feholdexcept; > > > > + feraiseexcept; > > > > +}; > > > > > > May be better way is repeat map from msun/arm/Symbol.map? amd64 is also equal to it here. > > > FBSD_1.9 { > > > fesetexceptflag; > > > feraiseexcept; > > > fegetenv; > > > feholdexcept; > > > feupdateenv; > > > feenableexcept; > > > fedisableexcept; > > > fegetexcept; > > > }; > > > > > > Started build with your diff anyway, will see on result > > > > Indeed. Also I suspect that msun/arm/Makefile.inc needs a fix to not list > > the Symbol.map twice, it is relevant for lib32 on aarch64. Updated patch > > below. > > > > commit 3a280c3bae0b3b9b76c19259ef9e7890fb7e38f1 > > Author: Konstantin Belousov > > Date: Mon Apr 6 19:41:23 2026 +0300 > > > > lib/msun: export arch-specific fenv methods > > > > Reported by: fluffy > > > > diff --git a/lib/msun/Makefile b/lib/msun/Makefile > > index 5112337f6297..b6e77fed5d9c 100644 > > --- a/lib/msun/Makefile > > +++ b/lib/msun/Makefile > > @@ -115,6 +115,10 @@ LIBC_ARCH=${MACHINE_CPUARCH} > > CFLAGS+= -I${.CURDIR}/src -I${LIBC_SRCTOP}/include \ > > -I${LIBC_SRCTOP}/${LIBC_ARCH} > > SYM_MAPS+= ${.CURDIR}/Symbol.map > > +ARCH_MAP= ${.CURDIR}/${LIBC_ARCH}/Symbol.map > > +.if exists(${ARCH_MAP}) > > +SYM_MAPS+= ${ARCH_MAP} > > +.endif > > > > VERSION_DEF= ${LIBC_SRCTOP}/Versions.def > > SYMBOL_MAPS= ${SYM_MAPS} > > diff --git a/lib/msun/aarch64/Symbol.map b/lib/msun/aarch64/Symbol.map > > new file mode 100644 > > index 000000000000..b468c814ff06 > > --- /dev/null > > +++ b/lib/msun/aarch64/Symbol.map > > @@ -0,0 +1,10 @@ > > +FBSD_1.9 { > > + fesetexceptflag; > > + feraiseexcept; > > + fegetenv; > > + feholdexcept; > > + feupdateenv; > > + feenableexcept; > > + fedisableexcept; > > + fegetexcept; > > +}; > > diff --git a/lib/msun/arm/Makefile.inc b/lib/msun/arm/Makefile.inc > > index 6e3ddb351dd3..e155f1a2cae4 100644 > > --- a/lib/msun/arm/Makefile.inc > > +++ b/lib/msun/arm/Makefile.inc > > @@ -1,5 +1,4 @@ > > LDBL_PREC = 53 > > -SYM_MAPS += ${.CURDIR}/arm/Symbol.map > > > > .if defined(CPUTYPE) && ${CPUTYPE:M*soft*} != "" > > ARCH_SRCS = fenv-softfp.c fenv-vfp.c > > --- lib/msun__L --- > --- libm.so.5.full --- > Building shared library libm.so.5 > cc -target aarch64-unknown-freebsd16.0 --sysroot=/usr/obj/opt/poudriere/jails/16c/usr/src/arm64.aarch64/tmp -B/usr/obj/opt/poudriere/jails/16c/usr/src/arm64.aarch64/tmp/usr/bin -Wl,-zrelro -Wl,--versio > n-script=Version.map -Wl,--no-undefined-version -fstack-protector-strong -shared -Wl,-x -Wl,--fatal-warnings -Wl,--warn-shared-textrel -o libm.so.5.full -Wl,-soname,libm.so.5 b_tgamma.pico e_acos.pi > co e_acosf.pico e_acosh.pico e_acoshf.pico e_asin.pico e_asinf.pico e_atan2.pico e_atan2f.pico e_atanh.pico e_atanhf.pico e_cosh.pico e_coshf.pico e_exp.pico e_expf.pico e_fmod.pico e_fmodf.pico e_gamma > .pico e_gamma_r.pico e_gammaf.pico e_gammaf_r.pico e_hypot.pico e_hypotf.pico e_j0.pico e_j0f.pico e_j1.pico e_j1f.pico e_jn.pico e_jnf.pico e_lgamma.pico e_lgamma_r.pico e_lgammaf.pico e_lgammaf_r.pico > e_log.pico e_log10.pico e_log10f.pico e_log2.pico e_log2f.pico e_logf.pico e_pow.pico e_powf.pico e_rem_pio2.pico e_rem_pio2f.pico e_remainder.pico e_remainderf.pico e_scalb.pico e_scalbf.pico e_sinh.p > ico e_sinhf.pico e_sqrt.pico e_sqrtf.pico fenv.pico k_cos.pico k_cosf.pico k_exp.pico k_expf.pico k_rem_pio2.pico k_sin.pico k_sinf.pico k_tan.pico k_tanf.pico s_asinh.pico s_asinhf.pico s_atan.pico s_a > tanf.pico s_carg.pico s_cargf.pico s_cargl.pico s_cbrt.pico s_cbrtf.pico s_ceil.pico s_ceilf.pico s_clog.pico s_clogf.pico s_copysign.pico s_copysignf.pico s_cos.pico s_cosf.pico s_csqrt.pico s_csqrtf.p > ico s_erf.pico s_erff.pico s_exp2.pico s_exp2f.pico s_expm1.pico s_expm1f.pico s_fabsf.pico s_fdim.pico s_finite.pico s_finitef.pico s_floor.pico s_floorf.pico s_fma.pico s_fmaf.pico s_fmax.pico s_fmaxf > .pico s_fmaximum.pico s_fmaximumf.pico s_fmin.pico s_fminf.pico s_fminimum.pico s_fminimumf.pico s_frexp.pico s_frexpf.pico s_ilogb.pico s_ilogbf.pico s_ilogbl.pico s_isfinite.pico s_isnan.pico s_isnorm > al.pico s_llrint.pico s_llrintf.pico s_llround.pico s_llroundf.pico s_llroundl.pico s_log1p.pico s_log1pf.pico s_logb.pico s_logbf.pico s_lrint.pico s_lrintf.pico s_lround.pico s_lroundf.pico s_lroundl. > pico s_modff.pico s_nan.pico s_nearbyint.pico s_nextafter.pico s_nextafterf.pico s_nexttowardf.pico s_remquo.pico s_remquof.pico s_rint.pico s_rintf.pico s_round.pico s_roundf.pico s_scalbln.pico s_scal > bn.pico s_scalbnf.pico s_signbit.pico s_signgam.pico s_significand.pico s_significandf.pico s_sin.pico s_sincos.pico s_sincosf.pico s_sinf.pico s_tan.pico s_tanf.pico s_tanh.pico s_tanhf.pico s_tgammaf. > pico s_trunc.pico s_truncf.pico w_cabs.pico w_cabsf.pico w_drem.pico w_dremf.pico s_cospi.pico s_cospif.pico s_sinpi.pico s_sinpif.pico s_tanpi.pico s_tanpif.pico s_copysignl.pico s_fabsl.pico s_llrintl > .pico s_lrintl.pico s_modfl.pico b_tgammal.pico catrigl.pico e_acoshl.pico e_acosl.pico e_asinl.pico e_atan2l.pico e_atanhl.pico e_coshl.pico e_fmodl.pico e_hypotl.pico e_lgammal.pico e_lgammal_r.pico e > _powl.pico e_remainderl.pico e_sinhl.pico e_sqrtl.pico invtrig.pico k_cosl.pico k_sinl.pico k_tanl.pico s_asinhl.pico s_atanl.pico s_cbrtl.pico s_ceill.pico s_cexpl.pico s_clogl.pico s_cosl.pico s_cospi > l.pico s_cprojl.pico s_csqrtl.pico s_erfl.pico s_exp2l.pico s_expl.pico s_floorl.pico s_fmal.pico s_fmaxl.pico s_fmaximuml.pico s_fminl.pico s_fminimuml.pico s_frexpl.pico s_logbl.pico s_logl.pico s_nan > l.pico s_nextafterl.pico s_nexttoward.pico s_remquol.pico s_rintl.pico s_roundl.pico s_scalbnl.pico s_sinl.pico s_sincosl.pico s_sinpil.pico s_tanhl.pico s_tanl.pico s_tanpil.pico s_truncl.pico w_cabsl. > pico catrig.pico catrigf.pico s_ccosh.pico s_ccoshf.pico s_cexp.pico s_cexpf.pico s_cimag.pico s_cimagf.pico s_cimagl.pico s_conj.pico s_conjf.pico s_conjl.pico s_cpow.pico s_cpowf.pico s_cpowl.pico s_c > proj.pico s_cprojf.pico s_creal.pico s_crealf.pico s_creall.pico s_csinh.pico s_csinhf.pico s_ctanh.pico s_ctanhf.pico > ld: error: version script assignment of 'FBSD_1.9' to symbol 'feenableexcept' failed: symbol not defined > ld: error: version script assignment of 'FBSD_1.9' to symbol 'fedisableexcept' failed: symbol not defined > ld: error: version script assignment of 'FBSD_1.9' to symbol 'fegetexcept' failed: symbol not defined > cc: error: linker command failed with exit code 1 (use -v to see invocation) > *** [libm.so.5.full] Error code 1 > > make[4]: stopped making "all" in /opt/poudriere/jails/16c/usr/src/lib/msun > make[4]: 1 error > > make[4]: stopped making "all" in /opt/poudriere/jails/16c/usr/src/lib/msun > > make[3]: stopped making "_prebuild_libs" in /opt/poudriere/jails/16c/usr/src > > Will restart build with deleted these 3 symbols from map No, I provided the symbols in the updated D56283. From nobody Mon Apr 6 18:35:14 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fqJ0k1KXdz6YVrL for ; Mon, 06 Apr 2026 18:35:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fqJ0k14fRz3Pcv for ; Mon, 06 Apr 2026 18:35:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775500518; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nyD9cdNOGXPQKkFxw5Nt1cQW5tBdgat7Arm2/RWt6C4=; b=vEYOb8nRUVKOXVvh8CTuJ6B/E6XUYLRyHkGROWzvoX9byLzlmps8s9KSd2xmmWNDrwwvO8 goVM8nQaveYMuQTZBAZSzzEoodsF7WZSp5qHez1FpqJFMrYuVczwdvGoD5gsZg53GwLA2s s7WbF5+4hgNglp4J9MonyiOhgYvSo2fZ6hRvExj6NJ4eN6j97j4/MwLYOaTYVVkBWgpSYf F5sYxVxuZH1T1OfgE1g3Tra7krYz5/1FDmfpMrKhaWqFL7SK+qduhCrd5bS4Jc9KiJkJd1 rFu1D8wSWNQOCvmgIdfl8+UycUP7+lf2gAcAB0tEqABLXa88R8C30FbbwqRPpQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775500518; a=rsa-sha256; cv=none; b=N0qdtkberPhQBgLbd+kuPQToED12FRUYSeRXieHBQ7qQU0a2ij8h16RA4dXJNsuA68pI74 xA7ZiUaOFBe7EoHtxwP7KvEfskTK7sMtyK/ND74DiHIz1fBG7sHdmgPkh9M7owEKLogiFL n5yzeKcGZkgZWtiGfWXDwxgGOEB/0Na/Bj0B27r6YCjp13ptt48+zwqoClSC83Su5rHZVW 4pCGbzFsqu0IDRhWjrtfv1HtKVgaxgY8g7nkynrqsIOWxWGdiFC/2J+AZ1xA2Hn2jT7n/q llqHhXdmkStW5ACU2hcWD1WUj/bwpq9jeb/n75XhMhz7GDm79sOYp2QX2trRqQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775500518; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nyD9cdNOGXPQKkFxw5Nt1cQW5tBdgat7Arm2/RWt6C4=; b=ZIjgVG8xZ5jpFnbOgMgcCwSnD3Hg9g072mE5/Mw73539zcPa4FqPEf1IfEU98g9ByUhMG7 l8kdYF9R/pmhZ8NgzFWbzt5GAFdnRlVMnkfOKGmzVwHeBHbKuUtfu20lPw95znFNdhOkU9 PkcQK5dLhs6lYC3QvYTk4hZsGu9buzHW4iBpRSYp3BjrKwQ0c+O4bQ1FpH16GJsxCaMPt0 ubhxAV3Tv3G8yMUOM8tJqiM6/FU5Wqpg79rkb/ufkPxa8tPHLvVEO/tnL6kGLz1TeY9A7R zlH7S8YtEKFwC4NSC+zqbij1VLNoHtclFy5B86drfXQdCXwNnPaV+lqV2GrCAQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fqJ0k0PZLz14c1 for ; Mon, 06 Apr 2026 18:35:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2750e by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 06 Apr 2026 18:35:14 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Simon J. Gerraty Subject: git: 34a3834eadd0 - main - Merge bmake-20260313 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 34a3834eadd03bec7703b8fbf9123f27b1114986 Auto-Submitted: auto-generated Date: Mon, 06 Apr 2026 18:35:14 +0000 Message-Id: <69d3fce2.2750e.44af483@gitrepo.freebsd.org> The branch main has been updated by sjg: URL: https://cgit.FreeBSD.org/src/commit/?id=34a3834eadd03bec7703b8fbf9123f27b1114986 commit 34a3834eadd03bec7703b8fbf9123f27b1114986 Merge: c5961b6fcfe0 fe271bdb43cf Author: Simon J. Gerraty AuthorDate: 2026-04-06 18:29:01 +0000 Commit: Simon J. Gerraty CommitDate: 2026-04-06 18:32:43 +0000 Merge bmake-20260313 Merge commit 'fe271bdb43cf88ee129d94c0e286fe618fd28e89' contrib/bmake/ChangeLog | 82 ++++++++++++++++ contrib/bmake/LICENSE | 4 +- contrib/bmake/Makefile | 19 ++-- contrib/bmake/VERSION | 2 +- contrib/bmake/bmake.1 | 105 +++++++++------------ contrib/bmake/bmake.cat1 | 70 +++++++------- contrib/bmake/job.c | 59 +++++++++++- contrib/bmake/job.h | 3 +- contrib/bmake/main.c | 21 +++-- contrib/bmake/make.1 | 105 +++++++++------------ contrib/bmake/make.c | 5 +- contrib/bmake/make.h | 16 +++- contrib/bmake/meta.c | 77 +++++---------- contrib/bmake/mk/ChangeLog | 38 ++++++++ contrib/bmake/mk/dirdeps.mk | 7 +- contrib/bmake/mk/install-mk | 4 +- contrib/bmake/mk/meta.autodep.mk | 4 +- contrib/bmake/mk/meta.stage.mk | 9 +- contrib/bmake/mk/meta2deps.py | 19 ++-- contrib/bmake/mk/meta2deps.sh | 6 +- contrib/bmake/mk/rust.mk | 21 +++-- contrib/bmake/mk/sys.dirdeps.mk | 15 ++- contrib/bmake/mk/sys.mk | 5 +- contrib/bmake/mk/sys.vars.mk | 38 ++++---- contrib/bmake/os.sh | 8 +- contrib/bmake/parse.c | 54 ++--------- contrib/bmake/str.h | 58 ++++++------ contrib/bmake/suff.c | 12 +-- contrib/bmake/unit-tests/Makefile | 33 +++++-- contrib/bmake/unit-tests/cmd-errors-jobs.exp | 12 +-- contrib/bmake/unit-tests/cmd-errors-lint.exp | 6 +- contrib/bmake/unit-tests/cmd-errors.exp | 6 +- contrib/bmake/unit-tests/cond-func-exists.mk | 16 +++- contrib/bmake/unit-tests/cond-undef-lint.mk | 4 +- contrib/bmake/unit-tests/directive-dinclude.mk | 2 +- contrib/bmake/unit-tests/directive-export-gmake.mk | 11 ++- .../bmake/unit-tests/directive-hyphen-include.mk | 2 +- .../bmake/unit-tests/directive-include-guard.mk | 2 +- contrib/bmake/unit-tests/directive-include.mk | 2 +- contrib/bmake/unit-tests/directive-sinclude.mk | 2 +- contrib/bmake/unit-tests/gnode-submake.exp | 20 ++-- contrib/bmake/unit-tests/gnode-submake.mk | 4 +- contrib/bmake/unit-tests/lint.exp | 2 +- contrib/bmake/unit-tests/moderrs.exp | 80 ++++++++-------- contrib/bmake/unit-tests/opt-chdir.mk | 6 +- contrib/bmake/unit-tests/opt-debug-graph1.exp | 1 + contrib/bmake/unit-tests/opt-debug-graph2.exp | 1 + contrib/bmake/unit-tests/opt-debug-graph3.exp | 1 + contrib/bmake/unit-tests/opt-debug-jobs.exp | 1 + contrib/bmake/unit-tests/opt-jobs-internal.exp | 8 +- contrib/bmake/unit-tests/opt-jobs-internal.mk | 27 ++++-- contrib/bmake/unit-tests/opt-where-am-i.mk | 6 +- contrib/bmake/unit-tests/opt.exp | 14 +-- contrib/bmake/unit-tests/opt.mk | 4 +- contrib/bmake/unit-tests/sh-errctl.exp | 1 + contrib/bmake/unit-tests/suff-main-several.exp | 1 + contrib/bmake/unit-tests/suff-transform-debug.exp | 1 + contrib/bmake/unit-tests/var-recursive.exp | 2 +- contrib/bmake/unit-tests/var-scope-local.exp | 10 ++ contrib/bmake/unit-tests/var-scope-local.mk | 47 ++++++++- contrib/bmake/unit-tests/varmisc.exp | 18 ++-- contrib/bmake/unit-tests/varmod-assign.exp | 12 +-- contrib/bmake/unit-tests/varmod-hash.exp | 6 +- contrib/bmake/unit-tests/varmod-loop-delete.exp | 12 ++- contrib/bmake/unit-tests/varmod-loop-delete.mk | 48 +++++++++- contrib/bmake/unit-tests/varmod-select-words.exp | 24 ++--- contrib/bmake/unit-tests/varmod-subst-regex.exp | 30 +++--- contrib/bmake/unit-tests/varmod-subst-regex.mk | 47 +++++---- contrib/bmake/unit-tests/varmod-subst.exp | 7 +- contrib/bmake/unit-tests/varmod-subst.mk | 18 +++- .../unit-tests/varname-dot-make-save_dollars.mk | 12 +-- .../bmake/unit-tests/varname-make_stack_trace.exp | 22 +++-- .../bmake/unit-tests/varname-make_stack_trace.mk | 36 ++++++- contrib/bmake/var.c | 70 ++++++++------ usr.bin/bmake/Makefile | 19 ++-- usr.bin/bmake/Makefile.config | 2 +- usr.bin/bmake/unit-tests/Makefile | 33 +++++-- 77 files changed, 1000 insertions(+), 617 deletions(-) diff --cc contrib/bmake/Makefile index ba2b2e742d35,000000000000..9aed55e67b6f mode 100644,000000..100644 --- a/contrib/bmake/Makefile +++ b/contrib/bmake/Makefile @@@ -1,266 -1,0 +1,273 @@@ - # $Id: Makefile,v 1.133 2025/03/08 20:12:56 sjg Exp $ ++# $Id: Makefile,v 1.137 2026/03/13 15:37:22 sjg Exp $ + +PROG = bmake + +SRCS = \ + arch.c \ + buf.c \ + compat.c \ + cond.c \ + dir.c \ + for.c \ + hash.c \ + job.c \ + lst.c \ + main.c \ + make.c \ + make_malloc.c \ + meta.c \ + metachar.c \ + parse.c \ + str.c \ + suff.c \ + targ.c \ + trace.c \ + util.c \ + var.c + +.MAIN: all + - MAN = ${PROG}.1 - SRCS.${MAN} = ${srcdir}/make.1 - +.-include "VERSION" +.-include "Makefile.inc" + +# this file gets generated by configure +.-include "Makefile.config" + +.if !empty(LIBOBJS) +SRCS += ${LIBOBJS:T:.o=.c} +.endif + +# just in case +prefix ?= /usr +srcdir ?= ${.PARSEDIR} +srcdir := ${srcdir} + ++MAN ?= ${PROG}.1 ++SRCS.${MAN} ?= ${srcdir}/make.1 ++ +DEFAULT_SYS_PATH ?= ${prefix}/share/mk + +CPPFLAGS += -DUSE_META +CFLAGS += ${CPPFLAGS} +CFLAGS += -D_PATH_DEFSYSPATH=\"${DEFAULT_SYS_PATH}\" +CFLAGS += -I. -I${srcdir} ${XDEFS} -DMAKE_NATIVE +CFLAGS += ${COPTS.${.ALLSRC:M*.c:T:u}} +COPTS.main.c += "-DMAKE_VERSION=\"${_MAKE_VERSION}\"" + - .for x in FORCE_MAKE_OS FORCE_MACHINE FORCE_MACHINE_ARCH ++# bmake defaults to the traditional behavior ++MAKE_SAVE_DOLLARS_DEFAULT ?= no ++ ++VARS.main += FORCE_MAKE_OS FORCE_MACHINE FORCE_MACHINE_ARCH \ ++ MAKE_SAVE_DOLLARS_DEFAULT \ ++ ++.for x in ${VARS.main} +.ifdef $x +COPTS.main.c += "-D$x=\"${$x}\"" +.endif +.endfor + +# meta mode can be useful even without filemon +# should be set by now +USE_FILEMON ?= no +.if ${USE_FILEMON:tl} != "no" +.PATH: ${srcdir}/filemon +SRCS += filemon_${USE_FILEMON}.c +COPTS.meta.c += -DUSE_FILEMON -DUSE_FILEMON_${USE_FILEMON:tu} +COPTS.job.c += ${COPTS.meta.c} + +.if ${USE_FILEMON} == "dev" +FILEMON_H ?= /usr/include/dev/filemon/filemon.h +.if exists(${FILEMON_H}) && ${FILEMON_H:T} == "filemon.h" +COPTS.filemon_dev.c += -DHAVE_FILEMON_H -I${FILEMON_H:H} +.endif +.elif ${USE_FILEMON} == "ktrace" +COPTS.filemon_ktrace.c += -Wno-error=unused-parameter +.endif + +.endif # USE_FILEMON + +.PATH: ${srcdir} + +# start-delete1 for bsd.after-import.mk +# we skip a lot of this when building as part of FreeBSD etc. + +# list of OS's which are derrived from BSD4.4 +BSD44_LIST = NetBSD FreeBSD OpenBSD DragonFly MirBSD Bitrig +# we are... +OS := ${.MAKE.OS:U${uname -s:L:sh}} +# are we 4.4BSD ? +isBSD44 := ${BSD44_LIST:M${OS}} + +.if ${isBSD44} == "" && ${OS:NCygwin:NDarwin:NLinux} != "" +MANTARGET ?= cat +.if ${MACHINE} == "sun386" +# even I don't have one of these anymore :-) +CFLAGS += -DPORTAR +.elif ${OS} != "SunOS" +# assume the worst +SRCS += sigcompat.c +CFLAGS += -DSIGNAL_FLAGS=SA_RESTART +.endif +.else +MANTARGET ?= man +.endif + +# turn this on by default - ignored if we are root +WITH_INSTALL_AS_USER = + +# suppress with -DWITHOUT_* +OPTIONS_DEFAULT_YES += \ + AUTOCONF_MK \ + INSTALL_MK \ + PROG_LINK \ + TESTS \ + +OPTIONS_DEFAULT_NO += \ + GEN_MAN \ + PROG_VERSION \ + +.if ${PROG} != "make" || ${srcdir} != ${.CURDIR} || !exists(${srcdir}/${MAN}) +WITH_GEN_MAN = 1 +.endif + +# process options now +.include + +.if ${MK_PROG_VERSION} == "yes" +PROG_NAME = ${PROG}-${_MAKE_VERSION} +.if ${MK_PROG_LINK} == "yes" +SYMLINKS += ${PROG_NAME} ${BINDIR}/${PROG} +.endif +.endif + +EXTRACT_MAN = no +# end-delete1 + +.if make(obj) || make(clean) +SUBDIR.${MK_TESTS} += unit-tests +.endif + +MAN1 = ${MAN} + +.if ${MK_GEN_MAN:Uno} == "yes" + +# we use this to generate ${MAN} +.include <${srcdir}/mk/genfiles.mk> + +.if ${PROG} != "make" +CLEANFILES += my.history +SED_CMDS.${MAN} += \ + -e '/^.Dt/s/MAKE/${PROG:tu}/' \ + -e '/^.Nm/s/make/${PROG}/' \ + +.endif + +.if ${CLEANFILES:U:Mmy.history} != "" +${MAN}: my.history +my.history: + @(echo ".Nm"; \ + echo "is derived from NetBSD"; \ + echo ".Xr make 1 ."; \ + echo "It uses autoconf to facilitate portability to other platforms."; \ + echo ".Pp") > $@ + +SED_CMDS.${MAN} += \ + -e '/^.Sh HISTORY/rmy.history' \ + -e '/^.Sh HISTORY/,/BUGS/s,^.Nm,make,' \ + +.endif + +.if ${.MAKE.OS:N*BSD} != "" +# assume .Nx is not supported +SED_CMDS.${MAN} += -e 's/^\.Nx/NetBSD/' +.endif + +# watch out for a late change of PROG +.if !empty(SRCS.${MAN}) +.NOPATH: ${MAN} +${MAN}: ${SRCS.${MAN}} _GENFILES_USE + +all man beforeinstall: ${MAN} +_mfromdir = . +.endif +.endif # MK_GEN_MAN + +MANTARGET ?= cat +MANDEST ?= ${MANDIR}/${MANTARGET}1 + +.if ${MANTARGET} == "cat" +_mfromdir = ${srcdir} +.endif + +.include + +CPPFLAGS += -DMAKE_NATIVE -DHAVE_CONFIG_H +COPTS.var.c += -Wno-cast-qual +COPTS.job.c += -Wno-format-nonliteral +COPTS.parse.c += -Wno-format-nonliteral +COPTS.var.c += -Wno-format-nonliteral + +# Force these +SHAREDIR = ${SHAREDIR.bmake:U${prefix}/share} +BINDIR = ${BINDIR.bmake:U${prefix}/bin} +MANDIR = ${MANDIR.bmake:U${SHAREDIR}/man} + - ${OBJS}: config.h ++${OBJS}: .META config.h ++${PROG}: .META + +# start-delete2 for bsd.after-import.mk + +# make sure that MAKE_VERSION gets updated. +main.o: ${srcdir}/VERSION + +.if ${MK_AUTOCONF_MK} == "yes" +CONFIGURE_DEPS += ${.CURDIR}/VERSION +# we do not need or want the generated makefile +CONFIGURE_ARGS += --without-makefile +AUTOCONF_GENERATED_MAKEFILE = Makefile.config +.include +.endif +SHARE_MK ?= ${SHAREDIR}/mk +MKSRC = ${srcdir}/mk +INSTALL ?= ${srcdir}/install-sh + +.if ${MK_INSTALL_MK} == "yes" +install: install-mk +.endif + +beforeinstall: + test -d ${DESTDIR}${BINDIR} || ${INSTALL} -m ${DIRMODE} -d ${DESTDIR}${BINDIR} + test -d ${DESTDIR}${MANDEST} || ${INSTALL} -m ${DIRMODE} -d ${DESTDIR}${MANDEST} + +install-mk: +.if exists(${MKSRC}/install-mk) + test -d ${DESTDIR}${SHARE_MK} || ${INSTALL} -m ${DIRMODE} -d ${DESTDIR}${SHARE_MK} + sh ${MKSRC}/install-mk -v -m ${NONBINMODE} ${DESTDIR}${SHARE_MK} +.else + @echo need to unpack mk.tar.gz under ${srcdir} or set MKSRC; false +.endif +# end-delete2 + +# A simple unit-test driver to help catch regressions +TEST_MAKE ?= ${.OBJDIR}/${PROG:T} +accept test: .NOMETA + cd ${.CURDIR}/unit-tests && \ + MAKEFLAGS= ${TEST_MAKE} -r -m / ${.TARGET} ${TESTS:DTESTS=${TESTS:Q}} + + +.if make(test) && ${MK_AUTO_OBJ} == "yes" +# The test target above visits unit-tests with -r -m / +# which prevents MK_AUTO_OBJ doing its job +# so do it here +.if defined(MAKEOBJDIRPREFIX) || ${MAKEOBJDIR:U:M*/*} != "" +_utobj = ${.OBJDIR}/unit-tests +.else +_utobj = ${.CURDIR}/unit-tests/${MAKEOBJDIR:Uobj} +.endif +utobj: .NOMETA + @test -d ${_utobj} && exit 0; \ + echo "[Creating ${_utobj}...]"; \ + umask ${OBJDIR_UMASK:U002}; \ + mkdir -p ${_utobj} +test: utobj +.endif diff --cc contrib/bmake/mk/meta2deps.sh index d9c20464cafe,000000000000..66e16b81d776 mode 100755,000000..100755 --- a/contrib/bmake/mk/meta2deps.sh +++ b/contrib/bmake/mk/meta2deps.sh @@@ -1,485 -1,0 +1,485 @@@ +#!/bin/sh + +# NAME: +# meta2deps.sh - extract useful info from .meta files +# +# SYNOPSIS: +# meta2deps.sh SB="SB" "meta" ... +# +# DESCRIPTION: +# This script looks each "meta" file and extracts the +# information needed to deduce build and src dependencies. +# +# To do this, we extract the 'CWD' record as well as all the +# syscall traces which describe 'R'ead, 'C'hdir and 'E'xec +# syscalls. +# +# The typical meta file looks like:: +#.nf +# +# # Meta data file "path" +# CMD "command-line" +# CWD "cwd" +# TARGET "target" +# -- command output -- +# -- filemon acquired metadata -- +# # buildmon version 2 +# V 2 +# E "pid" "path" +# R "pid" "path" +# C "pid" "cwd" +# R "pid" "path" +# X "pid" "status" +#.fi +# +# The fact that all the syscall entry lines start with a single +# character make these files quite easy to process using sed(1). +# +# To simplify the logic the 'CWD' line is made to look like a +# normal 'C'hdir entry, and "cwd" is remembered so that it can +# be prefixed to any "path" which is not absolute. +# +# If the "path" being read ends in '.srcrel' it is the content +# of (actually the first line of) that file that we are +# interested in. +# +# Any "path" which lies outside of the sandbox "SB" is generally +# not of interest and is ignored. +# +# The output, is a set of absolute paths with "SB" like: +#.nf +# +# $SB/obj-i386/bsd/include +# $SB/obj-i386/bsd/lib/csu/i386 +# $SB/obj-i386/bsd/lib/libc +# $SB/src/bsd/include +# $SB/src/bsd/sys/i386/include +# $SB/src/bsd/sys/sys +# $SB/src/pan-release/rtsock +# $SB/src/pfe-shared/include/jnx +#.fi +# +# Which can then be further processed by 'gendirdeps.mk' +# +# If we are passed 'DPDEPS='"dpdeps", then for each src file +# outside of "CURDIR" we read, we output a line like: +#.nf +# +# DPDEPS_$path += $RELDIR +#.fi +# +# with "$path" geting turned into reldir's, so that we can end +# up with a list of all the directories which depend on each src +# file in another directory. This can allow for efficient yet +# complete testing of changes. + + +# RCSid: - # $Id: meta2deps.sh,v 1.25 2025/11/11 18:08:02 sjg Exp $ ++# $Id: meta2deps.sh,v 1.26 2025/12/08 17:34:02 sjg Exp $ + +# SPDX-License-Identifier: BSD-2-Clause +# +# Copyright (c) 2011-2025, Simon J. Gerraty +# Copyright (c) 2010-2013, Juniper Networks, Inc. +# 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 COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +case ",$DEBUG_SH," in +*,meta2deps*) set -x;; +esac + +meta2src() { + cat /dev/null "$@" | + sed -n '/^R .*\.[chyl]$/s,^..[0-9]* ,,p' | + sort -u +} + +meta2dirs() { + cat /dev/null "$@" | + sed -n '/^R .*\/.*\.[a-z0-9][^\/]*$/s,^..[0-9]* \(.*\)/[^/]*$,\1,p' | + sort -u +} + +add_list() { + sep=' ' + suffix= + while : + do + case "$1" in + "|") sep="$1"; shift;; + -s) suffix="$2"; shift 2;; + *) break;; + esac + done + name=$1 + shift + eval list="\$$name" + for top in "$@" + do + case "$sep$list$sep" in + *"$sep$top$suffix$sep"*) continue;; + esac + list="${list:+$list$sep}$top$suffix" + done + eval "$name=\"$list\"" +} + +# some Linux systems have deprecated egrep in favor of grep -E +# but not everyone supports that +case "`echo bmake | egrep 'a|b' 2>&1`" in +bmake) ;; +*) egrep() { grep -E "$@"; } +esac + +_excludes_f() { + egrep -v "$EXCLUDES" +} + +error() { + echo "ERROR: $@" >&2 + exit 1 +} + +meta2deps() { + DPDEPS= + SRCTOPS=$SRCTOP + OBJROOTS= + EXCLUDES= + while : + do + case "$1" in + *=*) eval export "$1"; shift;; + -a) MACHINE_ARCH=$2; shift 2;; + -m) MACHINE=$2; shift 2;; + -C) CURDIR=$2; shift 2;; + -H) HOST_TARGET=$2; shift 2;; + -S) add_list SRCTOPS $2; shift 2;; + -O) add_list OBJROOTS $2; shift 2;; + -X) add_list EXCLUDES '|' $2; shift 2;; + -R) RELDIR=$2; shift 2;; + -T) TARGET_SPEC=$2; shift 2;; + *) break;; + esac + done + + _th= _o= + case "$MACHINE" in + host) _ht=$HOST_TARGET;; + esac + + for o in $OBJROOTS + do + case "$MACHINE,/$o/" in + host,*$HOST_TARGET*) ;; + *$MACHINE*|*${TARGET_SPEC:-$MACHINE}*) ;; + *) add_list _o $o; continue;; + esac + for x in $_ht $TARGET_SPEC $MACHINE + do + case "$o" in + "") continue;; + */$x/) add_list _o ${o%$x/}; o=;; + */$x) add_list _o ${o%$x}; o=;; + *$x/) add_list _o ${o%$x/}; o=;; + *$x) add_list _o ${o%$x}; o=;; + esac + done + done + OBJROOTS="$_o" + + case "$OBJTOP" in + "") + for o in $OBJROOTS + do + OBJTOP=$o${TARGET_SPEC:-$MACHINE} + break + done + ;; + esac + src_re= + obj_re= + add_list '|' -s '/*' src_re $SRCTOPS + add_list '|' -s '*' obj_re $OBJROOTS + + [ -z "$RELDIR" ] && unset DPDEPS + tf=/tmp/m2d$$-$USER + rm -f $tf.* + trap 'rm -f $tf.*; trap 0' 0 + + > $tf.dirdep + > $tf.qual + > $tf.srcdep + > $tf.srcrel + > $tf.dpdeps + + seenit= + seensrc= + lpid= + case "$EXCLUDES" in + "") _excludes=cat;; + *) _excludes=_excludes_f;; + esac + # handle @list files + case "$@" in + *@[!.]*) + for f in "$@" + do + case "$f" in + *.meta) cat $f;; + @*) xargs cat < ${f#@};; + *) cat $f;; + esac + done + ;; + *) cat /dev/null "$@";; + esac 2> /dev/null | + sed -e 's,^CWD,C C,;/^[#CREFLMVWX] /!d' -e "s,',,g" | + $_excludes | ( version=no epids= xpids= eof_token=no + while read op pid path path2 + do + : op=$op pid=$pid path=$path path2=$path2 + # first a sanity check - filemon on Linux is not very reliable + # path2 should only be non-empty for op L or M + # and it should not contain spaces. - # It will also be non-empty for # Meta line - # which tells us which meta_file we are processing ++ # It will also be non-empty for # Meta line ++ # which tells us which meta_file we are processing + case "$op,$path2" in + \#*,*.meta) # new file, reset some vars + version=no epids= xpids= eof_token=no lpid= + meta_file=`set -- $path2; echo $2` + continue + ;; + \#*) ;; # ok + [LM],) error "missing path2 in: '$op $pid $path'";; + [LMX],*" "*) error "wrong number of words in: '$op $pid $path $path2'";; + *,|[LMX],*) ;; # ok + *) error "wrong number of words in: '$op $pid $path $path2'";; + esac + # we track cwd and ldir (of interest) per pid + # CWD is bmake's cwd + : lpid=$lpid,pid=$pid + case "$lpid,$pid" in + ,C) CWD=$path cwd=$path ldir=$path + if [ -z "$SB" ]; then + SB=`echo $CWD | sed 's,/obj.*,,'` + fi + SRCTOP=${SRCTOP:-$SB/src} + case "$verion" in + no) ;; # ignore + 0) error "no filemon data: $meta_file";; + *) ;; + esac + version=0 + case "$eof_token" in + no) ;; # ignore + 0) error "truncated filemon data: $meta_file";; + esac + eof_token=0 + continue + ;; + $pid,$pid) ;; + [1-9]*) + case "$lpid" in + "") ;; + *) eval ldir_$lpid=$ldir;; + esac + eval ldir=\${ldir_$pid:-$CWD} cwd=\${cwd_$pid:-$CWD} + lpid=$pid + ;; + esac + + : op=$op path=$path + case "$op,$path" in + V,*) version=$pid; continue;; + W,*srcrel|*.dirdep) continue;; + C,*) + case "$path" in + /*) cwd=$path;; + *) cwd=`cd $cwd/$path 2> /dev/null && /bin/pwd`;; + esac + # watch out for temp dirs that no longer exist + test -d ${cwd:-/dev/null/no/such} || cwd=$CWD + eval cwd_$pid=$cwd + continue + ;; + F,*) # $path is new pid + eval cwd_$path=$cwd ldir_$path=$ldir + continue + ;; + \#,bye) eof_token=1; continue;; + \#*) continue;; + *) dir=${path%/*} + case "$op" in + E) # setid apps get no tracing so we won't see eXit + case `'ls' -l $path 2> /dev/null | sed 's, .*,,'` in + *s*) ;; + *) epids="$epids $pid";; + esac + ;; + X) xpids="$xpids $pid"; continue;; + esac + case "$path" in + $src_re|$obj_re) ;; + /*/stage/*) ;; + /*) continue;; + *) + rlist="$ldir/$path $cwd/$path" + case "$op,$path" in + [ML],../*) rlist="$rlist $path2/$path `dirname $path2`/$path";; + esac + for path in $rlist + do + test -e $path && break + done + dir=${path%/*} + ;; + esac + ;; + esac + # avoid repeating ourselves... + case "$DPDEPS,$seensrc," in + ,*) + case ",$seenit," in + *,$dir,*) continue;; + esac + ;; + *,$path,*) continue;; + esac + # canonicalize if needed + case "/$dir/" in + */../*|*/./*) + rdir=$dir + dir=`cd $dir 2> /dev/null && /bin/pwd` + seen="$rdir,$dir" + ;; + *) seen=$dir;; + esac + case "$dir" in + ${CURDIR:-.}|"") continue;; + $src_re) + # avoid repeating ourselves... + case "$DPDEPS,$seensrc," in + ,*) + case ",$seenit," in + *,$dir,*) continue;; + esac + ;; + esac + ;; + *) + case ",$seenit," in + *,$dir,*) continue;; + esac + ;; + esac + if [ -d $path ]; then + case "$path" in + */..) ldir=${dir%/*};; + *) ldir=$path;; + esac + continue + fi + [ -f $path ] || continue + case "$dir" in + $CWD) continue;; # ignore + $src_re) + seenit="$seenit,$seen" + echo $dir >> $tf.srcdep + case "$DPDEPS,$reldir,$seensrc," in + ,*) ;; + *) seensrc="$seensrc,$path" + echo "DPDEPS_$dir/${path##*/} += $RELDIR" >> $tf.dpdeps + ;; + esac + continue + ;; + esac + # if there is a .dirdep we cannot skip + # just because we've seen the dir before. + if [ -s $path.dirdep ]; then + # this file contains: + # '# ${RELDIR}.' + echo $path.dirdep >> $tf.qual + continue + elif [ -s $dir.dirdep ]; then + echo $dir.dirdep >> $tf.qual + seenit="$seenit,$seen" + continue + fi + seenit="$seenit,$seen" + case "$dir" in + $obj_re) + echo $dir;; + esac + done > $tf.dirdep + : version=$version + case "$version" in + 0) error "no filemon data: $meta_file";; + esac + : eof_token=$eof_token + case "$eof_token" in + 0) error "truncated filemon data: $meta_file";; + esac + for p in $epids + do + : p=$p + case " $xpids " in + *" $p "*) ;; + *) error "missing eXit for pid $p: $meta_file";; + esac + done ) || exit 1 + _nl=echo + for f in $tf.dirdep $tf.qual $tf.srcdep + do + [ -s $f ] || continue + case $f in + *qual) # a list of .dirdep files + # we can prefix everything with $OBJTOP to + # tell gendirdeps.mk that these are + # DIRDEP entries, since they are already + # qualified with . as needed. + # We strip .$MACHINE though + xargs cat < $f | sort -u | + sed "s,^# ,,;s,^,$OBJTOP/,;s,\.${TARGET_SPEC:-$MACHINE}\$,,;s,\.$MACHINE\$,," + ;; + *) sort -u $f;; + esac + _nl=: + done + if [ -s $tf.dpdeps ]; then + case "$DPDEPS" in + */*) ;; + *) echo > $DPDEPS;; # the echo is needed! + esac + sort -u $tf.dpdeps | + sed "s,${SRCTOP}/,,;s,${SB_BACKING_SB:-$SB}/src/,," >> $DPDEPS + fi + # ensure we produce _something_ else egrep -v gets upset + $_nl +} + +case /$0 in +*/meta2dep*) meta2deps "$@";; +*/meta2dirs*) meta2dirs "$@";; +*/meta2src*) meta2src "$@";; +esac diff --cc contrib/bmake/os.sh index 86ec86bc4929,f854e83967bb..f854e83967bb mode 100755,100644..100644 --- a/contrib/bmake/os.sh +++ b/contrib/bmake/os.sh diff --cc usr.bin/bmake/Makefile index a8bcdfd9f859,000000000000..8d23bb8dd203 mode 100644,000000..100644 --- a/usr.bin/bmake/Makefile +++ b/usr.bin/bmake/Makefile @@@ -1,203 -1,0 +1,210 @@@ +# This is a generated file, do NOT edit! +# See contrib/bmake/bsd.after-import.mk +# + +SRCTOP?= ${.CURDIR:H:H} + +# look here first for config.h +CFLAGS+= -I${.CURDIR} + +# for after-import +CLEANDIRS+= FreeBSD +CLEANFILES+= bootstrap + - # $Id: Makefile,v 1.133 2025/03/08 20:12:56 sjg Exp $ ++# $Id: Makefile,v 1.137 2026/03/13 15:37:22 sjg Exp $ + +PROG?= ${.CURDIR:T} + +SRCS= \ + arch.c \ + buf.c \ + compat.c \ + cond.c \ + dir.c \ + for.c \ + hash.c \ + job.c \ + lst.c \ + main.c \ + make.c \ + make_malloc.c \ + meta.c \ + metachar.c \ + parse.c \ + str.c \ + suff.c \ + targ.c \ + trace.c \ + util.c \ + var.c + +.MAIN: all + - MAN= ${PROG}.1 - SRCS.${MAN}= ${srcdir}/make.1 - +.-include "Makefile.inc" + +# this file gets generated by configure +.-include "Makefile.config" + +.if !empty(LIBOBJS) +SRCS+= ${LIBOBJS:T:.o=.c} +.endif + +# just in case +prefix?= /usr +srcdir?= ${.PARSEDIR} +srcdir:= ${srcdir} + ++MAN?= ${PROG}.1 ++SRCS.${MAN}?= ${srcdir}/make.1 ++ +DEFAULT_SYS_PATH?= ${prefix}/share/mk + +CPPFLAGS+= -DUSE_META +CFLAGS+= ${CPPFLAGS} +CFLAGS+= -D_PATH_DEFSYSPATH=\"${DEFAULT_SYS_PATH}\" +CFLAGS+= -I. -I${srcdir} ${XDEFS} -DMAKE_NATIVE +CFLAGS+= ${COPTS.${.ALLSRC:M*.c:T:u}} +COPTS.main.c+= "-DMAKE_VERSION=\"${_MAKE_VERSION}\"" + - .for x in FORCE_MAKE_OS FORCE_MACHINE FORCE_MACHINE_ARCH ++# bmake defaults to the traditional behavior ++MAKE_SAVE_DOLLARS_DEFAULT?= no ++ ++VARS.main+= FORCE_MAKE_OS FORCE_MACHINE FORCE_MACHINE_ARCH \ ++ MAKE_SAVE_DOLLARS_DEFAULT \ ++ ++.for x in ${VARS.main} +.ifdef $x +COPTS.main.c+= "-D$x=\"${$x}\"" +.endif +.endfor + +# meta mode can be useful even without filemon +# should be set by now +USE_FILEMON?= no +.if ${USE_FILEMON:tl} != "no" +.PATH: ${srcdir}/filemon +SRCS+= filemon_${USE_FILEMON}.c +COPTS.meta.c+= -DUSE_FILEMON -DUSE_FILEMON_${USE_FILEMON:tu} +COPTS.job.c+= ${COPTS.meta.c} + +.if ${USE_FILEMON} == "dev" +FILEMON_H?= /usr/include/dev/filemon/filemon.h +.if exists(${FILEMON_H}) && ${FILEMON_H:T} == "filemon.h" +COPTS.filemon_dev.c+= -DHAVE_FILEMON_H -I${FILEMON_H:H} +.endif +.elif ${USE_FILEMON} == "ktrace" +COPTS.filemon_ktrace.c+= -Wno-error=unused-parameter +.endif + *** 1124 LINES SKIPPED *** From nobody Mon Apr 6 18:50:19 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fqJL367jnz6YWbg for ; Mon, 06 Apr 2026 18:50: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fqJL35T8Pz3R24 for ; Mon, 06 Apr 2026 18:50:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775501419; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lKGgV6AsaCBBRDuWO+94MbmqYJPRfpeJ0IZrYZfZNsQ=; b=C/NUjcNzY1INbVXqdYHSzqh25wz7XgWCUCUWQJZ7XS2SIOICUrhsZpuC/jDDA8Ee2Dwa+2 brpEPMrVQXIj7LEdCO7PQfYGI+QC+FtSxJXNtm0lFuX8RvzUwl9wC68IBTyHOo1QFT8aJL TcOjSgxE3MU8I4JZolYVTCFgPA16bnG2K8cSYrq1dpH/IvJzixEiMopgE6rC4rNbyQG9N8 2rdNAgoqTRceFrlzif+KQ0QjHlgn3Fc7N8jRoWk1idi1bkYZJ3KPDIOyvyd2wjWThBhCFI g6RMekgAP9PzS7lzqFk8WSVysV1F2G00gItgjD/m9CoLaallqJ5dsaIvSj5R6A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775501419; a=rsa-sha256; cv=none; b=pfae76lJo/Q6cAJMQZnU0RFOZLIPxCN29INs+OtaVorwnEfL7lcF4ncj7x/gb8QMe5ACZY 9gSYbjXvbXpN4hBtEpiq3TTSCjwsQk3d3h8bJ3Yusj0vd81vCt2k49DhLlqxJ6ogXmP0PE lKDqIavjobHBeJgg7EXwmAa6Lyxg2JHfFu1LXhMygR2+l3g/iZFJMFpYbon9EW6nmdWEkN 7yDxmqgeOp0QFSjVG88PTxOnhPVbO3iCeKtBM8OL6YfWrta9foudcD0ilI7T5/gvbSga8W NpaIEGVILOvdFX9rixCqb4yQjBqIOAiTM9B1JJQnHTRuT+Vt12rLuMjj5DDH0A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775501419; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lKGgV6AsaCBBRDuWO+94MbmqYJPRfpeJ0IZrYZfZNsQ=; b=pDXUrHwoXhJITqGuVnuLwl0rX+OYCjSPyGHLnVrPnGv+j6ensX9l7vv4loD5sPgo+760cd 9XFiLglIaaL6UX6Wh1aJkmgl7g586Iy5GgbuoE9qs6FR3Lq8rpB8r59J57z+s87iQqwDm6 0sCTagNra1hT9a3EOfR5CizbbaAn2U4idmZYmmOpc6ZksON0IQy90FfUr0dk7PaVeBUBpV nlemFZaqjEgmVPDG/HXBfu3GJ+T18awj5zgP7JrWYh8Ax6eEnKo0CsDqA9yZbnPJY3Aet1 yTtwWmaArFXy2ALn/NS/m8O/reKnumWAbKlsAoJ/L4atq3MZyExikANEDZIUrw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fqJL34v5zz158X for ; Mon, 06 Apr 2026 18:50:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 305a2 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 06 Apr 2026 18:50:19 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Simon J. Gerraty Subject: git: b2751d956e5b - main - We also get _HOST_OSREL from host-target.mk List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b2751d956e5b32507bb63aff2db3e5d6b3b38ad1 Auto-Submitted: auto-generated Date: Mon, 06 Apr 2026 18:50:19 +0000 Message-Id: <69d4006b.305a2.2b90229f@gitrepo.freebsd.org> The branch main has been updated by sjg: URL: https://cgit.FreeBSD.org/src/commit/?id=b2751d956e5b32507bb63aff2db3e5d6b3b38ad1 commit b2751d956e5b32507bb63aff2db3e5d6b3b38ad1 Author: Simon J. Gerraty AuthorDate: 2026-04-06 18:50:11 +0000 Commit: Simon J. Gerraty CommitDate: 2026-04-06 18:50:11 +0000 We also get _HOST_OSREL from host-target.mk --- share/mk/local.sys.env.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/mk/local.sys.env.mk b/share/mk/local.sys.env.mk index 79a8a775f5c2..4a46a2c5f569 100644 --- a/share/mk/local.sys.env.mk +++ b/share/mk/local.sys.env.mk @@ -63,7 +63,7 @@ ECHO_TRACE?= true .include "src.sys.env.mk" .-include -.if !defined(HOST_TARGET) || !defined(HOST_MACHINE) +.if !defined(HOST_TARGET) || !defined(HOST_MACHINE) || !defined(_HOST_OSREL) # we need HOST_TARGET etc below. .include .export HOST_TARGET From nobody Mon Apr 6 19:55:24 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fqKn833N8z6Ycxh for ; Mon, 06 Apr 2026 19:55: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fqKn82HMHz3Z8r for ; Mon, 06 Apr 2026 19:55:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775505324; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9Te/deV1W8og85vGq+9iJaa+Y9+yNXnYlHqWrKApr1k=; b=BkGgBbWgpZtZeT7m6eT8VlplPLut5tCiR4ggI7CaILM67H2C9CBY64Owb6w1Poj4ETM2Gw kP5gNKFGTJSpNDcy4tsDzP5TxQL/8J8G6KGK+rMQWAxA6ZjNXNdkCgLeM5zOccPDrlJgRg I2odxwunDExYLiYVyrFSaf4/ZOuqcUjULCYE7JsE1S68fsGiEgflzVREHUuMszJQoFp2Cc ZKbbrzUB66t219d5pqEkN2AvUYFEQDe8V1VznMWTz7LpnWrmyERu4Ibx6poojGTEoV8zQi igSjhvlYTu1g+UMxU5fS7mKO5JpfcFJUVeeHptOctrpO4dXcQruHzdMqYaeSgQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775505324; a=rsa-sha256; cv=none; b=ABt30RuVrjdJ2QnwHvLtaxU8OaPAtLoIZg9Nicy4m+7ilv7ZR/15aRMQtwtT3jzpysMEKm lY7q4xBK6VqWfad9hz1thtzhYRuNZdD1ncLUOH+289+84hOhv8gNzwUVPskDe37NNOQi0p EFqLrw7PfJ6jVPqpYjPZu/e4FP3nmxkW7owWzUaV9+e6Gm3xEnLzUZ3RfGWeTGYQK2Um/n 9cgq/WBWZ/+1uD4xGi+vOlm6G+lL+m+BZl9016uSXxpqVg5pPcsV2XVeqlEXk8Q/iZ1iHs 65BXUi+DG2thEGEoN6QWQpuSrYQ2xpuEJL/qiwqyIXNYCWY1/BcHjd3ugHXbuA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775505324; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9Te/deV1W8og85vGq+9iJaa+Y9+yNXnYlHqWrKApr1k=; b=C4Mbw5YwbTSi3+xSbVUZgKSwQ9jyiufcO6h37v5AvFgRRTtgPExm0X2tA7nhEktWeA7h36 V1nxHSSgmy1iu7DO7Ebrqe8Smob4CS0trd54TuPM43OusA/yyYEJNKu3kKIrKRzXVfM8TM YV6UJEP3xlfs/IJjUFiRYljnmrP9xRGv6FnkCzkH5B0Zm1BmFOHa6m1+dD42WcjX/P3S+f OGLgkNVHX/99xFGqSpJbPwTzP6m6Go+wS75ghVrWsQK4Ekk/B00VkXJ2hUia7dIOAXBOln XXxVL++V722vK9R0qSIp+By4IaCy+96UhuTxXR6fRkI/+mSTnemBN8i6vjsfFQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fqKn8154Xz16TQ for ; Mon, 06 Apr 2026 19:55:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 37520 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 06 Apr 2026 19:55:24 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jean-=?utf-8?Q?S=C3=A9bast?==?utf-8?Q?ien P=C3=A9?=dron Subject: git: 362136ed4987 - main - linuxkpi: Add `strtomem()` and `strtomem_pad()` List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 362136ed4987230269740f54531f6a945f00d135 Auto-Submitted: auto-generated Date: Mon, 06 Apr 2026 19:55:24 +0000 Message-Id: <69d40fac.37520.432a3668@gitrepo.freebsd.org> The branch main has been updated by dumbbell: URL: https://cgit.FreeBSD.org/src/commit/?id=362136ed4987230269740f54531f6a945f00d135 commit 362136ed4987230269740f54531f6a945f00d135 Author: Jean-Sébastien Pédron AuthorDate: 2026-03-02 23:04:09 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2026-04-06 19:28:08 +0000 linuxkpi: Add `strtomem()` and `strtomem_pad()` The DRM generic code started to use `strtomem_pad()` in Linux 6.11. Reviewed by: bz Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D55729 --- sys/compat/linuxkpi/common/include/linux/string.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/string.h b/sys/compat/linuxkpi/common/include/linux/string.h index f7b64560d254..0b858e7af623 100644 --- a/sys/compat/linuxkpi/common/include/linux/string.h +++ b/sys/compat/linuxkpi/common/include/linux/string.h @@ -303,6 +303,22 @@ memcpy_and_pad(void *dst, size_t dstlen, const void *src, size_t len, int ch) } } +#define strtomem(dst, src) do { \ + size_t dstlen = ARRAY_SIZE(dst); \ + size_t srclen = __builtin_object_size(src, 1); \ + srclen = MIN(srclen, dstlen); \ + srclen = strnlen(src, srclen); \ + memcpy(dst, src, srclen); \ +} while (0) + +#define strtomem_pad(dst, src, pad) do { \ + size_t dstlen = ARRAY_SIZE(dst); \ + size_t srclen = __builtin_object_size(src, 1); \ + srclen = MIN(srclen, dstlen); \ + srclen = strnlen(src, srclen); \ + memcpy_and_pad(dst, dstlen, src, srclen, pad); \ +} while (0) + #define memset_startat(ptr, bytepat, smember) \ ({ \ uint8_t *_ptr = (uint8_t *)(ptr); \ From nobody Mon Apr 6 19:55:25 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fqKn92xncz6Ycgd for ; Mon, 06 Apr 2026 19:55: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fqKn91bYbz3Z6W for ; Mon, 06 Apr 2026 19:55:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775505325; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gZBZ2RguPDT4hGXCtdnDRxZgINczd7nXieZ7f+q5gRU=; b=S+OjELiAkNTXuLU5VOySMzTgA98QE2tjTewrmErcQ74mD5mGOXzQTkXWHz+OJCaBSgbZdC E0ZevlwtKaauNJ2NUkYvm0ij6GkdI798jj835rA+rI0/a8RCbQM8Qm2BrJlNPzAAymhLOV wC4shGYBT9rn2ZRTMcYHBV/aixTnRoOjoYrRdpQZQZSVQHtI3votBgu2sdmhnM0Rs3ugSY 84GoU7eHB0xmIctJYX+DNybL0GyN3UtfMo1T4StWWMhdQ9qHc9Y1XjFf+9qRnDso5EKlIM pSbqqA82YI+YHJSj5FYaOm/zORGCgPR34ir6J0EoldsAJSMuZJDGo/hxXZjRvw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775505325; a=rsa-sha256; cv=none; b=qtIZ7qWuiv8QkDbFbzMKCzxJYynbH3g84h35KgOFRdeAc9zI9n8k70QzePWazFx7z6euZE XlRjf4cTs0pSllf+k2mOs35LUmWLaWK9Kap/PwyzN14cWPH1LPRVxTBZnbttZGwDF4P5Cu qmZRakLUZ7/qLk+/GJMTzA5BKNJzKDeVkOozQeKIAc5HTl7zBMrtz7tdWwkLilV1ltf5kL ujV52LsHjG3dsiGomKyadwVvmCDd72MOyPVxmPMUdHnpCmaGKz96z0p6k340lLsPxxb8Bo zRKhDEeC6Bp8600ARvhzNiXTbECZy31mVC9EZ47thMwPRl1vnemstgWfHOtN0Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775505325; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gZBZ2RguPDT4hGXCtdnDRxZgINczd7nXieZ7f+q5gRU=; b=YaH8UwNlaZ183i4LnizISV1nu2VXyMbySNNQrZJ+Syz68LzU8OTFLsGM0HIqUeBc5xfBji RTlnfCOwXI/mjcqybh7NWnFE+pH9yCPjkf+s0keh75vbZjvnBxwFRc+qMbzjpng5sSj2H1 ZHQqKg/rn7b73L5gcj2hbCAtv2/QFLv1ENKC4KRpu33C8G81Hs+BK+LM5EeUhBwn/ED1Xi Sr6rzFmaeMgi9HLUkc1hbrLEoJrEqSX97/6JO7EjLmRf+t+x8oTPyZEOi9QOhOc5ofHNHD g392/dy+osyV7FWBaOA6rUQaLLgeJdDIIkx+Y5FPIPzLGFyQuaYA189+xSb/ug== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fqKn91613z16Rh for ; Mon, 06 Apr 2026 19:55:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 38480 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 06 Apr 2026 19:55:25 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jean-=?utf-8?Q?S=C3=A9bast?==?utf-8?Q?ien P=C3=A9?=dron Subject: git: 8af854ea479a - main - linuxkpi: Move `_RET_IP_` to List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8af854ea479a140a6e284d74e481d0b547408df2 Auto-Submitted: auto-generated Date: Mon, 06 Apr 2026 19:55:25 +0000 Message-Id: <69d40fad.38480.feef35e@gitrepo.freebsd.org> The branch main has been updated by dumbbell: URL: https://cgit.FreeBSD.org/src/commit/?id=8af854ea479a140a6e284d74e481d0b547408df2 commit 8af854ea479a140a6e284d74e481d0b547408df2 Author: Jean-Sébastien Pédron AuthorDate: 2026-03-02 23:06:54 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2026-04-06 19:28:08 +0000 linuxkpi: Move `_RET_IP_` to This matches the declaration on Linux. Reviewed by: bz, emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D55730 --- .../linuxkpi/common/include/linux/instruction_pointer.h | 13 +++++++++++++ sys/compat/linuxkpi/common/include/linux/kernel.h | 3 +-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/instruction_pointer.h b/sys/compat/linuxkpi/common/include/linux/instruction_pointer.h new file mode 100644 index 000000000000..9dc16781808a --- /dev/null +++ b/sys/compat/linuxkpi/common/include/linux/instruction_pointer.h @@ -0,0 +1,13 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2021 Neel Chauhan + * Copyright (c) 2026 The FreeBSD Foundation + */ + +#ifndef _LINUXKPI_LINUX_INSTRUCTION_POINTER_H_ +#define _LINUXKPI_LINUX_INSTRUCTION_POINTER_H_ + +#define _RET_IP_ __builtin_return_address(0) + +#endif /* _LINUXKPI_LINUX_INSTRUCTION_POINTER_H_ */ diff --git a/sys/compat/linuxkpi/common/include/linux/kernel.h b/sys/compat/linuxkpi/common/include/linux/kernel.h index 11a13cbd49b4..880d2f67c517 100644 --- a/sys/compat/linuxkpi/common/include/linux/kernel.h +++ b/sys/compat/linuxkpi/common/include/linux/kernel.h @@ -55,6 +55,7 @@ #include #include #include +#include #include #include @@ -267,8 +268,6 @@ extern int linuxkpi_debug; #define u64_to_user_ptr(val) ((void *)(uintptr_t)(val)) -#define _RET_IP_ __builtin_return_address(0) - #define offsetofend(t, m) \ (offsetof(t, m) + sizeof((((t *)0)->m))) From nobody Mon Apr 6 19:55:26 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fqKnB4v1Yz6YcmY for ; Mon, 06 Apr 2026 19:55: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fqKnB2PBjz3YwT for ; Mon, 06 Apr 2026 19:55:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775505326; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LG0QpAHKWgH4SNq0Q216u553ZaH6GqlmoVJprqOmDs4=; b=vyDMJ/Ghe0PYDOsarfH81NePcVPqYnChqxkNBUy0DgxcHWO/lZbbGFOD5rDZKDSiDy1e/c HhFsN2HCbozdzu9XB4zjTPTHT9QvexLXRhJJQ2pRXrbRPTHBmOEEcnp002I6tV0pUhdn/t 2Yw/IoLaOSNr/cP2+/lOkWv4pd2VrzCLcex6shisyWvQBg8xTvPWeLjSlLcJnSbmzT1nr1 N0cGUkid+BueVLH3hECO60Kaap7QxHqR0lyUxEgA6HeZenH792tOQ0+LeU5IYtKlGysgp1 EUiJkfHnkbQAtQQIWnnpea++iOykyhy8FEQz4pPdWgvncKYcL/02GFSfKvutHw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775505326; a=rsa-sha256; cv=none; b=UPBFWyTOq+lQKWYy9LZ2cKrC0njvvUBVyElMcFxYQ3QgP71lhdsuWZrzbqKcy+f9yIZDrL Wk7nqitBnTmivZL9hL3MG6XlkqjuVz3NIEIjs6LH8jf2u1hetkwu+2cViTFy8casNZFJPu Xyj7zSYCyX0BT7N8fHFoK05bE87W03nJ8MMOv+no7RcFsH+dPVFA2g9GcqwwLA/sL7x85n X2E02F+9VWkoRFzT2F4Xi1YjGWvSsgj2dZzEgPVAIwkRFSoHrNQD+igfmFK8qb5R+6DUo2 9LfnOS6scyQbfTJF7uVsBDif09FzWorvakMesUd3SdAP3dxFfE5FYnxWfAlmzg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775505326; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LG0QpAHKWgH4SNq0Q216u553ZaH6GqlmoVJprqOmDs4=; b=Lf5mVfTnVWqYuWYSbGM/sO8ryYly90u200F0QxNO1/a1F9g5XOjIG0GdIRO3VQTwpmoNXg oZm0IKp6VUyRXgjFDk+Ya1Q2KFU7DdvMnh2JIOg7F6goD4ZkFkNaPdPe5P+eQ1x6GBBGQ6 VMMkLDRJsliEcgKhsdgOzXICaMJSrFluUv6zgpJCkahldoz4dmZxS94xe0sOJ5gxvkL4dw OUevTdGKzrkYBe8GZEnq5Aszu5goWy3LhyExmfeVxzrddK0EfDC6urjAJI/pDUPX+Wak20 XSQI2TvFYj7G7svLn5oOtYIvgM/i9dL9QoSKLBTwHDf3PwhdwG7qGuRC8rjRLg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fqKnB1yBqz16Rj for ; Mon, 06 Apr 2026 19:55:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 37990 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 06 Apr 2026 19:55:26 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jean-=?utf-8?Q?S=C3=A9bast?==?utf-8?Q?ien P=C3=A9?=dron Subject: git: 56251304258a - main - linuxkpi: Define `_THIS_IP_` List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 56251304258a50fe31bac5cd7da74a4d25497606 Auto-Submitted: auto-generated Date: Mon, 06 Apr 2026 19:55:26 +0000 Message-Id: <69d40fae.37990.1176276f@gitrepo.freebsd.org> The branch main has been updated by dumbbell: URL: https://cgit.FreeBSD.org/src/commit/?id=56251304258a50fe31bac5cd7da74a4d25497606 commit 56251304258a50fe31bac5cd7da74a4d25497606 Author: Jean-Sébastien Pédron AuthorDate: 2026-03-02 23:09:02 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2026-04-06 19:28:08 +0000 linuxkpi: Define `_THIS_IP_` For now, the macro is not implemented and it returns 0. The DRM generic code started to use it in Linux 6.11. Reviewed by: bz, emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D55731 --- sys/compat/linuxkpi/common/include/linux/instruction_pointer.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/instruction_pointer.h b/sys/compat/linuxkpi/common/include/linux/instruction_pointer.h index 9dc16781808a..200a8c3f1d5e 100644 --- a/sys/compat/linuxkpi/common/include/linux/instruction_pointer.h +++ b/sys/compat/linuxkpi/common/include/linux/instruction_pointer.h @@ -10,4 +10,6 @@ #define _RET_IP_ __builtin_return_address(0) +#define _THIS_IP_ ((unsigned long)0) /* TODO: _THIS_IP_ not implemented. */ + #endif /* _LINUXKPI_LINUX_INSTRUCTION_POINTER_H_ */ From nobody Mon Apr 6 19:55:27 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fqKnC5J2hz6YcjD for ; Mon, 06 Apr 2026 19:55: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fqKnC3SkHz3YwZ for ; Mon, 06 Apr 2026 19:55:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775505327; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4nOuqSxqWwar9wUh/AaEdnKdWhG/87fex0QzIjsBcCo=; b=cmj0RJ4WxCzU6wEjOr3AeenQxLzNq+Wo9TSu0bTQtowwjI698ckMkG6kWxaZKThcOoK6nh v4l6PWiM29Ffwdwro0iNsUfiEUNhYlaTL2YRvjdWxc+h1SK3mK42/b/iwkdw56axNItAXV 1egDzOSwHaf1svcZ2cZT/yq3RH+wwaM8scN14UL79kAk+2Hj0ibtWOXOrBtEpb4dtdT4DF q6FnA3SbptNapI/XtwLZ5O7W+m12Mo5U9YyIeVOMPGbMzHsu18hHTsqkEXOG6uf2PIbTAp eUA+U2fSLvkNFj44hCBc74s3tGVFnokr70ZRgv2Jf90VQJUtnwJptjcs35bFjw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775505327; a=rsa-sha256; cv=none; b=Vs/hT5Dcg057cJmsDFfpZxMEM2r2bqR6YoYu9rIKwJcWk+DOphFZEGnAXrNeMWGGbfKLPZ itKVxrpC/cbeOfxacj/46bM2DhneeGzVR+391a7yKKqhQB4A3SuOQvDjzXZc1G+ad13rMF VcRsrCDMH4Q67/X1HonxNwvYdsKIZ+aeDtqLbQhCSEC1W3KS5FLFt2jO/96YXPHMXBigs2 fdqsxzTtdqLWOdB3f3byFBWzhvgjag4sFPPGtBpskXzgFYBEVUYMkL0+VLqabP2S7VdQ22 ySvQW/hgJ0+gNrfSGax/tlh9HGEKgNzRKeXEddBKBiHwfcNOgWkAWkv4OANaNA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775505327; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4nOuqSxqWwar9wUh/AaEdnKdWhG/87fex0QzIjsBcCo=; b=bk9uZEmh+n5PafgG6a6p3GrvkxdHPdQDZrd2c0xdRXDDm2r9ujoVj1s6vVmOZVDCIKkP9y cbbbcxCQsuJCIUPXYFmZaKDNKdGSWkjJb6aV9kdo7h6yjjcblpR3Vd8ZMtrfAWCNHo2kxi L6kTwlQGc+x/KrZrFWDu6V3sp15YHv2WTzPyWxxgtWLz9bHaiq35W/iq3p1+Zfz8zznCO5 m0ZV7k6TnyHzTEh8O/IUIFIIHY7OcQkPvOtafmebe9xsPoL2Xx13HEKa8SezEDTFJMXuSj ySCNisGKLLncwRHV5daP0zownwuKZZ2RlMfcgv1aHoYK4fY07Mf+iJEP9AUYRQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fqKnC2sygz16G6 for ; Mon, 06 Apr 2026 19:55:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 374ac by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 06 Apr 2026 19:55:27 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jean-=?utf-8?Q?S=C3=A9bast?==?utf-8?Q?ien P=C3=A9?=dron Subject: git: f2ad06a0801a - main - linuxkpi: Add mising functions in List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f2ad06a0801aaa987a40b8374b6baa8f510cb77a Auto-Submitted: auto-generated Date: Mon, 06 Apr 2026 19:55:27 +0000 Message-Id: <69d40faf.374ac.42083007@gitrepo.freebsd.org> The branch main has been updated by dumbbell: URL: https://cgit.FreeBSD.org/src/commit/?id=f2ad06a0801aaa987a40b8374b6baa8f510cb77a commit f2ad06a0801aaa987a40b8374b6baa8f510cb77a Author: Jean-Sébastien Pédron AuthorDate: 2026-03-02 23:50:55 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2026-04-06 19:28:08 +0000 linuxkpi: Add mising functions in The DRM generic code started to use `kmsg_dump_get_buffer()` and `kmsg_dump_rewind()` in Linux 6.11. Reviewed by: bz, emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D55732 --- .../linuxkpi/common/include/linux/kmsg_dump.h | 42 ++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/kmsg_dump.h b/sys/compat/linuxkpi/common/include/linux/kmsg_dump.h index 25f96b304f59..539981c54d1b 100644 --- a/sys/compat/linuxkpi/common/include/linux/kmsg_dump.h +++ b/sys/compat/linuxkpi/common/include/linux/kmsg_dump.h @@ -25,6 +25,11 @@ enum kmsg_dump_reason { KMSG_DUMP_MAX }; +struct kmsg_dump_iter { + uint64_t cur_seq; + uint64_t next_seq; +}; + struct kmsg_dumper { struct list_head list; void (*dump)(struct kmsg_dumper *dumper, enum kmsg_dump_reason reason); @@ -32,6 +37,36 @@ struct kmsg_dumper { bool registered; }; +static inline void +kmsg_dump(enum kmsg_dump_reason reason) +{ + pr_debug("TODO"); +} + +static inline bool +kmsg_dump_get_line(struct kmsg_dump_iter *iter, bool syslog, + const char *line, size_t size, size_t *len) +{ + pr_debug("TODO"); + + return (false); +} + +static inline bool +kmsg_dump_get_buffer(struct kmsg_dump_iter *iter, bool syslog, + char *buf, size_t size, size_t *len) +{ + pr_debug("TODO"); + + return (false); +} + +static inline void +kmsg_dump_rewind(struct kmsg_dump_iter *iter) +{ + pr_debug("TODO"); +} + static inline int kmsg_dump_register(struct kmsg_dumper *dumper) { @@ -48,4 +83,11 @@ kmsg_dump_unregister(struct kmsg_dumper *dumper) return (-EINVAL); } +static inline const char * +kmsg_dump_reason_str(enum kmsg_dump_reason reason) +{ + pr_debug("TODO"); + + return ("Unknown"); +} #endif From nobody Mon Apr 6 19:55:28 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fqKnF17Tnz6YcjG for ; Mon, 06 Apr 2026 19:55:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fqKnD4CzZz3Z5c for ; Mon, 06 Apr 2026 19:55:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775505328; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=d3h7wG0BDLGu0+2vbmcwgm2KkZlkeT5hTtFzSOnl+hs=; b=CsONxA9UiZi6YvLP43rg+2OQWbDlLoT1PXuOdFSGTKrygHJYKSuNGHBPatqLP5MR6VXmDS jtBLnHVS57rNzuAMI9JLbhyl4/pQLPVzgym2SOJ5JapPVTJVnIZXWeCTqg9KOjb+9POEhf uWcmk25UqAsU5nitnUCtB7QdCC5J2HA6fh8JphRtO0ZeShGJvA2a8T0fAnvQGNC/bou1n9 zVS5LSGPv/D1jreTzwOotjU8wxmg3UEv/JUKlA+p0womPiZaKLz+l2plCj4n+S8B2DfW60 3IxbjjpmgQThaDu7fYA5vim8jg+87NQaoRxILCc39SaXCkSprn4NrQjOZ8eIlw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775505328; a=rsa-sha256; cv=none; b=O1LBmfcN2kgdhNxtohuj4lQ7wnLB0JSoadRPGBmO2GJuciGIikRBmladC+CuU+hP/qO8pi 3Wu4sot7gq7N/024aHJxSYvIJZkgLmSofj40IQtbupgJj5nd39ajUkmhvCCx4yx6UyTN/8 rEGTvnoHaWVXEBz3w8UCRTHFGirW0wRiMhVHwGCrq75a3EOXhGnlpCZOjAMK2zCKXJc/oi 9Hun4rJ4ydvzKO6A59h4cvNbaqy4DgPRz89b7V6+b3mipfIS2K+NC6VwkY1zrr4WSrRyOh 4k+XxrV84fzMtpNz71OFHzVEhuh3SQ59VFRXeTU0ARgXPoNK1xJSuhY36WEIuw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775505328; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=d3h7wG0BDLGu0+2vbmcwgm2KkZlkeT5hTtFzSOnl+hs=; b=lmANT4bbUtgL9G/9Zs/n5K7jvzhdWcQYh8ZkJzAZes5jiEHCUpVsbl72RkRKPT0yqjY5Q8 ImjuDtHFeEnyHQAG2MHCNwXRHzUyupBgquTVCY70oROxTV41no8JQCy3IdKtMnclMyEb9L atr9KaA8DvvkY2IBxdkSqFvExdo7QI/PQVnb6bOErNpvKlBfxsGQ8inLWBxl3QnzU65psR k4sMvV/FG3oqPXO/fJhX/+10p2YTvhWN4DMMb7l6BTaGeBPDTbt+hmmT+BtXXylkeChTkb OyqrPzS4Rc/yPia0Uef3Quv5BvMnt9LsK1HTKFHVxoIH7HGkdwxBabRh/bZSbw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fqKnD3mp2z16ht for ; Mon, 06 Apr 2026 19:55:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 37d19 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 06 Apr 2026 19:55:28 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jean-=?utf-8?Q?S=C3=A9bast?==?utf-8?Q?ien P=C3=A9?=dron Subject: git: 7bf93680807e - main - linuxkpi: Define `CONFIG_PGTABLE_LEVELS` List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7bf93680807e518853262f3f961f88eb8ec03c83 Auto-Submitted: auto-generated Date: Mon, 06 Apr 2026 19:55:28 +0000 Message-Id: <69d40fb0.37d19.49bc1b51@gitrepo.freebsd.org> The branch main has been updated by dumbbell: URL: https://cgit.FreeBSD.org/src/commit/?id=7bf93680807e518853262f3f961f88eb8ec03c83 commit 7bf93680807e518853262f3f961f88eb8ec03c83 Author: Jean-Sébastien Pédron AuthorDate: 2026-03-04 20:34:37 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2026-04-06 19:28:09 +0000 linuxkpi: Define `CONFIG_PGTABLE_LEVELS` This is a kernel configuration constant that is expected to be defined. The DRM generic code started to use it in Linux 6.11. Reviewed by: bz Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D55733 --- sys/compat/linuxkpi/common/include/linux/kconfig.h | 35 ++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/kconfig.h b/sys/compat/linuxkpi/common/include/linux/kconfig.h index c1d186b56e1f..529d41991900 100644 --- a/sys/compat/linuxkpi/common/include/linux/kconfig.h +++ b/sys/compat/linuxkpi/common/include/linux/kconfig.h @@ -73,4 +73,39 @@ #define IS_REACHABLE(_x) (IS_BUILTIN(_x) || \ (IS_MODULE(_x) && IS_BUILTIN(MODULE))) +/* + * On Linux, the CONFIG_PGTABLE_LEVELS value is defined by the config/build + * system. Here, we take the per-architecture default value defined in + * `arch/$ARCH/Kconfig` files upstream. + */ +#if defined(__amd64__) + +#define CONFIG_PGTABLE_LEVELS 4 + +#elif defined(__aarch64__) + +#define CONFIG_PGTABLE_LEVELS 4 + +#elif defined(__i386__) + +#define CONFIG_PGTABLE_LEVELS 2 + +#elif defined(__powerpc__) + +#if defined(__powerpc64__) +#define CONFIG_PGTABLE_LEVELS 4 +#else +#define CONFIG_PGTABLE_LEVELS 2 +#endif + +#elif defined(__riscv) + +#if defined(__riscv_xlen) && __riscv_xlen == 64 +#define CONFIG_PGTABLE_LEVELS 5 +#else +#define CONFIG_PGTABLE_LEVELS 2 +#endif + +#endif + #endif /* _LINUXKPI_LINUX_KCONFIG_H_ */ From nobody Mon Apr 6 19:55:29 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fqKnG0Lbdz6Yd1B for ; Mon, 06 Apr 2026 19:55: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fqKnF5PZDz3Z9X for ; Mon, 06 Apr 2026 19:55:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775505329; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1X7zSR78yzz9JNx1oFLvMmXFoGT9JgSQxYxWmd/39qw=; b=FdzYTzooc8+Q+wezOTZKPv5xXE6jn8xlFW1kWL+L0b0QCNuXNmR01n9A5su84wu6xghNbY Kf4zLe2AnEtUfcl0ls5WB0fNnHqDZ1IYKvZ5D/O6z4CQAwffofFijK2/pt8w4Cw8ItTCG5 olElWRK+nzzo+Gcnd+9mnZthJ+kORgaEbjgjBEBKXNmZ4kLH0HQZHT4LQwVSE/kSuswDsA fKfILu8AfoRrbc9h2/Vh2NbiAFXHaWBsDCHQsewlOqcYjbmpMrHkLAVW0XwG8ps8gfyG+c dVKl2tfnDV/uezyGJ5xz1V/nYqIeg/moMEuxbN9b0QsASmqtA71AmSBK5XLvIw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775505329; a=rsa-sha256; cv=none; b=uYZj952hHjAC1BiDEMYjD44pMM6J2V2vunsehHSFaePxb3p+E4wEde46c6kXcEdF2Ohju6 ULBK+nsl3qCb/ANZkORx0PhWseVz5x3qKg2zVMArg/6EtIHRiT/bVJCYiyqAtxqkcTEHmE Bgro8FyTHkdM5DcyWFMDUz0ODAlYUNsDt7WnHrCriLabhGaPheJx8F7m+QRBvSrUuSEyKg mPCWz4OXsKJrDJqAY59apnPaEEw50MU11M7/MHohhGo0Inxc1ppcq3HkzyLFjtjUKFK9f7 P2a+5tItYie1Gyx2+yU4GPdEMnKRPz3id7tYBV27fyJtT1zSkHeQTNanndMe/Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775505329; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1X7zSR78yzz9JNx1oFLvMmXFoGT9JgSQxYxWmd/39qw=; b=UAD35Q+GQTvdDrXJraQn6VYisX/vRT5NGylTtwMQeNNaIpS/nc0O1IYdyX90kKU/fo6Utf tiLbRPMWOaJ+tzrcZVDGX7AKseRMB11ZBm4qKr36CytjavHP0uBmV4PnBK8qAkJfy4fRzd wqm8GLxRiLIU76rq1vgIFkHYDiLmIWtqnBLkRwIOqK+MRGytGRqKgRAtiARglwnwtZOMJT PYfVnZTGfvywcvlPd4bax8nWfMQNC2wii7QsxC/ZKJi2EOkvLn4g6wBK9n2WqMhCZ4sEnD vTkgp1noeQxfJYcoE8og7Hzz1TOD0GHOUCzMWRPbcxxygr8SUdbqRSR2A+cfZQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fqKnF4f9vz16hw for ; Mon, 06 Apr 2026 19:55:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 38484 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 06 Apr 2026 19:55:29 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jean-=?utf-8?Q?S=C3=A9bast?==?utf-8?Q?ien P=C3=A9?=dron Subject: git: be92ad6b12a5 - main - linuxkpi: Define `PMD_SHIFT` List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: be92ad6b12a5046cecf25477e7a3e88f70e5daee Auto-Submitted: auto-generated Date: Mon, 06 Apr 2026 19:55:29 +0000 Message-Id: <69d40fb1.38484.124717d5@gitrepo.freebsd.org> The branch main has been updated by dumbbell: URL: https://cgit.FreeBSD.org/src/commit/?id=be92ad6b12a5046cecf25477e7a3e88f70e5daee commit be92ad6b12a5046cecf25477e7a3e88f70e5daee Author: Jean-Sébastien Pédron AuthorDate: 2026-03-04 20:36:20 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2026-04-06 19:28:09 +0000 linuxkpi: Define `PMD_SHIFT` For now, only define it for x86 architectures. The DRM generic code started to use it in Linux 6.11. Reviewed by: bz, emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D55734 --- sys/compat/linuxkpi/common/include/asm/pgtable.h | 34 ++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/asm/pgtable.h b/sys/compat/linuxkpi/common/include/asm/pgtable.h index 865662d587db..166d6142d51c 100644 --- a/sys/compat/linuxkpi/common/include/asm/pgtable.h +++ b/sys/compat/linuxkpi/common/include/asm/pgtable.h @@ -53,6 +53,40 @@ typedef struct page *pgtable_t; #define _PAGE_PWT (((pteval_t) 1) << _PAGE_BIT_PWT) #define _PAGE_PCD (((pteval_t) 1) << _PAGE_BIT_PCD) #define _PAGE_PAT (((pteval_t) 1) << _PAGE_BIT_PAT) + +/* + * On Linux, the value of `PMD_SHIFT` is hard-coded to 21. This corresponds to + * the FreeBSD `PDRSHIFT` constant. + */ +#define PMD_SHIFT PDRSHIFT + +#elif defined(__aarch64__) + +/* + * On Linux, the value of `PMD_SHIFT` is computed from `CONFIG_PGTABLE_LEVELS`. + * The result corresponds to one of the FreeBSD `L*_SHIFT` constants. Here, we + * take the value 21 computed from `CONFIG_PGTABLE_LEVELS = 4`, the default on + * aarch64, which equals to `L2_SHIFT`. + */ +#define PMD_SHIFT L2_SHIFT + +#elif defined(__powerpc__) + +/* + * On Linux, the value of `PMD_SHIFT` is the addition of `PAGE_SHIFT` and + * `PTE_INDEX_SIZE` (hard-coded to 9). The result corresponds to the FreeBSD + * `L3_PAGE_SIZE_SHIFT` constant. + */ +#define PMD_SHIFT L3_PAGE_SIZE_SHIFT + +#elif defined(__riscv) + +/* + * On Linux, the value of `PMD_SHIFT` is hard-coded to 21. This corresponds to + * the FreeBSD `L2_SHIFT` constant. + */ +#define PMD_SHIFT L2_SHIFT + #endif #endif /* _LINUXKPI_ASM_PGTABLE_H_ */ From nobody Mon Apr 6 19:55:30 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fqKnH1BXfz6Yd7M for ; Mon, 06 Apr 2026 19:55: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fqKnG5zvqz3ZG3 for ; Mon, 06 Apr 2026 19:55:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775505330; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qXriXF2H5Zj2fhYmjMG3Ul0drR+BigOkiTrzkjvr/UI=; b=AfVinv1Cxezwif4tHD5kVo7nmID7goO5hRdFW83elcc3BQhgxdUr15xauZjljOTk5K0yJC i3Kygp4vwG9hWNzWImfBy+G+fE3//M7T/qaxSkD81HNrES9xgihbNURHx93a8KcjougTQ8 xzuF67kXmSomcNEm5r+15/4FtA0KEWzMLS1wdIC6gv+a+NTAYS9iG/0jQJjezlhnhCn3jg AM6VRzNM+j/jdWq+gXxu54aYiTBwoKk0p4WajpkI6Afi+ZkqModGYAR13Fon8Cy1IliYzD gJTGYftczKGfxcprZ2JZYFTpH6FwBDe09mMuUQTl63YkYWSoOvykV19ULjkPcA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775505330; a=rsa-sha256; cv=none; b=ZUncF/eeoV4lAgW5NrQZEUTO62mQf8Jh/OWDTtvlf/PdbVfwaowhAy4oQ6Yca2qp0gp6qG kCyBbJK3qV2HlM7zQEAclEYzzqHZN8P8EDSiMpWYR5o4rY1LIJ2Q+25jBTEkM5AV64bdQo /RCv6j8+dCtF9HzM2902we+ow6XxKbRpPK8zPWik8h9a/Q68bA37X6CgJuqZY3rqGkAhic YAxBJyvGj2cZPLpkGt0Iw3jePE36YJ8KcqBbYg9POhRuumaNmTr2MODKrb0VsiLGQR/gAw q4okpxriiwCa27nHs6o8TTUW9avYLZvd4wNw6HQn/l5ZL3s52WGJuiQ7jx9/+Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775505330; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qXriXF2H5Zj2fhYmjMG3Ul0drR+BigOkiTrzkjvr/UI=; b=Za6m+rDWMFsomPGjX91w8jsvstdWsQaT+CKhXAtBeu4YqDv1GRFnihxoEQSyE4RFrtZEM9 90vPK7SzvDjC65lD1drTPGy2FFa/208y5Z3OSbg2nxAv3/cOvkop295hJksQQ3KXvUWw6D HpbH8mQiaFDXZTN2Vnsxts6abYVPScNZxJmSrPdfusV7f+GJGGgfp8ID80IMinG8uMsKA1 6VBl+WAKAji9wi00DOiLpvxGTEt12HPKzB3vMyRiPF7e74huwBFKrLsW4zwqI9bEx+cVTX qmky0znXGfQ96TRsB6ut9Tj2nluUeuZVw+TJ7r/GqIe6ROc3VMw/TuvG+5jc6A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fqKnG5Wybz16G8 for ; Mon, 06 Apr 2026 19:55:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 38383 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 06 Apr 2026 19:55:30 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jean-=?utf-8?Q?S=C3=A9bast?==?utf-8?Q?ien P=C3=A9?=dron Subject: git: ca6ea6df1f92 - main - linuxkpi: Add List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ca6ea6df1f9241346d043a2091484ac9ced6580e Auto-Submitted: auto-generated Date: Mon, 06 Apr 2026 19:55:30 +0000 Message-Id: <69d40fb2.38383.7ee0946d@gitrepo.freebsd.org> The branch main has been updated by dumbbell: URL: https://cgit.FreeBSD.org/src/commit/?id=ca6ea6df1f9241346d043a2091484ac9ced6580e commit ca6ea6df1f9241346d043a2091484ac9ced6580e Author: Jean-Sébastien Pédron AuthorDate: 2026-03-04 20:49:50 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2026-04-06 19:28:09 +0000 linuxkpi: Add It only defines the `struct linux_logo` structure for now. It does not define any actual logo. Reviewed by: bz, emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D55735 --- sys/compat/linuxkpi/common/include/linux/linux_logo.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/linux_logo.h b/sys/compat/linuxkpi/common/include/linux/linux_logo.h new file mode 100644 index 000000000000..cb60ba50f6a5 --- /dev/null +++ b/sys/compat/linuxkpi/common/include/linux/linux_logo.h @@ -0,0 +1,19 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2026 The FreeBSD Foundation + */ + +#ifndef _LINUXKPI_LINUX_LINUX_LOGO_H_ +#define _LINUXKPI_LINUX_LINUX_LOGO_H_ + +struct linux_logo { + int type; + unsigned int width; + unsigned int height; + unsigned int clutsize; + const unsigned char *clut; + const unsigned char *data; +}; + +#endif /* _LINUXKPI_LINUX_LINUX_LOGO_H_ */ From nobody Mon Apr 6 19:55:32 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fqKnK33lwz6YdB8 for ; Mon, 06 Apr 2026 19:55: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fqKnK0LDtz3ZCt for ; Mon, 06 Apr 2026 19:55:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775505333; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vXvMZoHHgMvGnhsVvo8dDk5qdBRD1a+CvNUpj8ZJeXg=; b=LOBKn0AwVuxAqxFZZnytZlC1A/R6bdIuXnlfB11aRTFw5FCe20Q0NxRjdlLFhcG72V3zaX j3g5Q8mRLebAnPEHRCR4GiclN/XFAXQXto67tznxlrUxorjVANBKhsNyUuydp6TtD1C9Ut MFnTznKHuZIsbTyZdTnUzEWNdd5rQvfGvfxeoHprZEUX1hPZCBuHA5gt2f1aWnUeUGaEEN nXqcYgNXWYa8YLJ7MCMbx0apElXfuNTFVYMA+liZgbhl4DIxyu05GwfR/TC8Sk+Cn9iKZC Av6iau8wg6ufTXZPPGX7d2IQgYL7F7GTv30s/RIMYjNBCIKGqVodpB5vLTuEHw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775505333; a=rsa-sha256; cv=none; b=SPWWs22bDq0TqmQ8waqeTaz2dkoVCJ5rcr9gIS6KeeOMfHZRhGmszw8vbntEVPLbCQzTGf wYTAQ9FFlvXo8NoJiRz4l2d3Jhi194ILXU5NysjQ3P8NEqnbA51s9YlR/S5AQ54yJMQjco mcWWaKArf0nu5NfCsi5cBvTj71HgfnJZrzof+MWmfQayMPiFVgplotb5apIyK3k7+SmP8G bpwlyQ3+IbqbbQVZvBMZSXTDoX63HNyVN+KjWc0KrqAiKy9EBXWSD7J9YvW6R29CFrwWNH JYBpky1Mmrd/z/PVR9QkZKQkwa1iz32zSntdQbDqAilRupnVjpi59gKwUt6cUg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775505333; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vXvMZoHHgMvGnhsVvo8dDk5qdBRD1a+CvNUpj8ZJeXg=; b=YSDT6EfN/w/9QFMQQggEHNS8A3G3gUC+UAPa9D/5dBtcN1+6p/xtX8kluySc8wKneEtlZ6 pycGCQ1MIHC46o5YyYcb3EOwzlgtM4XxX8y8NS2nd8ZQLE/73/CB2JeF8DEQhQzMVtNkdC SsvA0qQwyAYsGh4XVcDmkypSFlXJSTRRyVPhMKgkQUoKbjg5Q1u14VUqKfeTc9W/AQ1DIn LHP26M5+awOu/zQnsOYasFeVOFpn2xJF+vzdyGzReT1iN7D65DeFo8FOvjfrGPPzqMv7mT ljcpU7J5NxDFCrJBSG1+33BwLS+pusxUnP+3nVioKmZ+cnDu0uzjByk/V5IdkA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fqKnJ6wYLz16mT for ; Mon, 06 Apr 2026 19:55:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 373cf by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 06 Apr 2026 19:55:32 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jean-=?utf-8?Q?S=C3=A9bast?==?utf-8?Q?ien P=C3=A9?=dron Subject: git: ddf89d899b8d - main - linuxkpi: Add field `flags` to `struct resource` List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ddf89d899b8d2d0e26c1a22c92f3ac1eddeac9f6 Auto-Submitted: auto-generated Date: Mon, 06 Apr 2026 19:55:32 +0000 Message-Id: <69d40fb4.373cf.468251e8@gitrepo.freebsd.org> The branch main has been updated by dumbbell: URL: https://cgit.FreeBSD.org/src/commit/?id=ddf89d899b8d2d0e26c1a22c92f3ac1eddeac9f6 commit ddf89d899b8d2d0e26c1a22c92f3ac1eddeac9f6 Author: Jean-Sébastien Pédron AuthorDate: 2026-03-08 09:44:12 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2026-04-06 19:28:10 +0000 linuxkpi: Add field `flags` to `struct resource` This in the Linux version of `struct resource`, not the FreeBSD native structure. The amdgpu DRM driver started to use it in Linux 6.11. Reviewed by: bz Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D55737 --- sys/compat/linuxkpi/common/include/linux/ioport.h | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/compat/linuxkpi/common/include/linux/ioport.h b/sys/compat/linuxkpi/common/include/linux/ioport.h index 763af2de7c4f..68f28cec4ec4 100644 --- a/sys/compat/linuxkpi/common/include/linux/ioport.h +++ b/sys/compat/linuxkpi/common/include/linux/ioport.h @@ -41,6 +41,7 @@ struct resource { resource_size_t start; resource_size_t end; const char *name; + unsigned long flags; }; static inline resource_size_t From nobody Mon Apr 6 19:55:31 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fqKnJ1TPbz6Yd1F for ; Mon, 06 Apr 2026 19:55: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fqKnJ0BH3z3Z7T for ; Mon, 06 Apr 2026 19:55:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775505332; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rWB6ZWBb2hwwnNSk5TKdp7Nr+Ov8Xshk0PlJEA9i4s0=; b=cjZxi+/kX++6/HHnXBt49OqZt0jd3lZk/d5nujh7X5k+SPmNJWuu1IsVVb4Fap3T4mzm/K TmpkCOLPPoWaw86Y+XoppTX9kn86Ic6+IGVkyo2wk3/4XJQ7D8t8WENpIzCsx+RRXprkm3 jnOXS+YFuS3nsMN52znljWcZ6Kg1V0ojM0LX8Zt6jxS/RYeX+siiAiFyq9ZhUIHxHKvKc3 boS+xWGgMLHTszV4zMylzRQkZlt9nnrRSpsenGT3pKaBa0Xkp+3zVXS1WYphhocR39KMKO cxo7wfzlyL2u7dAdA2xQ0al10UkTIENDOlBj1Eu2V4u51bF4Kp50wro6zIRzmw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775505332; a=rsa-sha256; cv=none; b=sOMmE0g0PUjDGA4TKb/rRDfe5EV/b6OpsGOy7sB+W4FhHyFBxlbgDwR6h06EEyAeBADni5 zd9yFxi0X3FshmcJpkZOCBPWhyh4id4TnBp0fH+FU57SCUxZfo/hDt9jTB6rNRjyUI2I4C qNVP793ytjbd57Gja1HaKqv+IumavmJk92+zSk45R5p7kPydX1hfmw60B/GJgP6lODvrnV eMqjFOekh6VSQPfL0y9OU1wGbqo1wF9m5UgNJXvkPm5eYSNGJA+vLSF8MNCKAQv6q9TBj5 58/sZEuFjm4cuym5YAWxPbmDgfAv0GDxkdA56kwRKaYloLcO6z14Wp2vuIN89A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775505332; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rWB6ZWBb2hwwnNSk5TKdp7Nr+Ov8Xshk0PlJEA9i4s0=; b=qat4+0YxwEv33AhjEO1mJjdZxfAm+9hiXLHLukh1vsmPmeakzZW/oX4pSTlCfcb49DzB0C O0mrvQ6U8xpWbM2nK0WsPyuqwyd5RseNMDKp6xlYqKEJ1nwaxcnD2lkcxVbIerTrllzdg7 Q5lXIeYPe56Wm9xA+bLh8hEtPid8p1rT4wYzraUPvVjh3B59aOGSpxE5zySBGtXgGE0Sa4 TgK4WNekQoT7rvss+ZCQVLwm7NKkpUr6eVPEqEMZk7xJvV0Vnlc51z5RCiFePRip+BLjHY vZcxYDRRQ1kRYn2R/XJoH3DFN2akB/VGRvbNXzxnlEADIJrKWk2komrdUa+nWQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fqKnH61nNz16v0 for ; Mon, 06 Apr 2026 19:55:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 36648 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 06 Apr 2026 19:55:31 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jean-=?utf-8?Q?S=C3=A9bast?==?utf-8?Q?ien P=C3=A9?=dron Subject: git: 356d6f47d3b5 - main - linuxkpi: Add List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 356d6f47d3b54b34aaba9e60aa551f3d615d0e2f Auto-Submitted: auto-generated Date: Mon, 06 Apr 2026 19:55:31 +0000 Message-Id: <69d40fb3.36648.27830016@gitrepo.freebsd.org> The branch main has been updated by dumbbell: URL: https://cgit.FreeBSD.org/src/commit/?id=356d6f47d3b54b34aaba9e60aa551f3d615d0e2f commit 356d6f47d3b54b34aaba9e60aa551f3d615d0e2f Author: Jean-Sébastien Pédron AuthorDate: 2026-03-08 09:40:38 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2026-04-06 19:28:09 +0000 linuxkpi: Add To be exact, there was a dummy file with no content before. This commit defines `struct mfd_cell` and adds two function stubs. The function stubs are not implemented but still return success. They log a message to indicate they need to be implemented. Also, unlike Linux, includes . This works around the fact that we can't include from , due to a conflict with the FreeBSD-native `struct resource`. The amdgpu DRM driver started to use it in Linux 6.11. Reviewed by: bz, emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D55736 --- .../linuxkpi/common/include/linux/mfd/core.h | 49 ++++++++++++++++++++++ sys/compat/linuxkpi/dummy/include/linux/mfd/core.h | 0 2 files changed, 49 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/mfd/core.h b/sys/compat/linuxkpi/common/include/linux/mfd/core.h new file mode 100644 index 000000000000..1a69a3803b5d --- /dev/null +++ b/sys/compat/linuxkpi/common/include/linux/mfd/core.h @@ -0,0 +1,49 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2026 The FreeBSD Foundation + */ + +#ifndef _LINUXKPI_LINUX_MFD_CORE_H_ +#define _LINUXKPI_LINUX_MFD_CORE_H_ + +#include + +/* + * is not included by Linux, but we need it here to get the + * definition of `struct resource`. + * + * At least the amdgpu DRM driver (amdgpu_isp.c at the time of this writing) + * needs the structure without including this header: it relies on an implicit + * include of from , which we can't have due to + * conflict with the FreeBSD native `struct resource`. + */ +#include + +#include /* pr_debug */ + +struct resource; +struct mfd_cell { + const char *name; + void *platform_data; + size_t pdata_size; + int num_resources; + const struct resource *resources; +}; + +static inline int +mfd_add_hotplug_devices(struct device *parent, + const struct mfd_cell *cells, int n_devs) +{ + pr_debug("%s: TODO\n", __func__); + + return (0); +} + +static inline void +mfd_remove_devices(struct device *parent) +{ + pr_debug("%s: TODO\n", __func__); +} + +#endif /* _LINUXKPI_LINUX_MFD_CORE_H_ */ diff --git a/sys/compat/linuxkpi/dummy/include/linux/mfd/core.h b/sys/compat/linuxkpi/dummy/include/linux/mfd/core.h deleted file mode 100644 index e69de29bb2d1..000000000000 From nobody Mon Apr 6 19:55:34 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fqKnL3xjdz6Yd1K for ; Mon, 06 Apr 2026 19:55: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fqKnL1KZqz3ZP5 for ; Mon, 06 Apr 2026 19:55:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775505334; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FVeYyX2f8mjAsU2yhydofxmDQAG9ZzAB2+176Vj/IS4=; b=AhLabOzBENaaunTdd8vjb85OEIdLMeogkbstkpB05LZfH0tXGz/1P8tDkkA5mMfCdNI5ks /4YLvf9ib9CnRb4B9P/g9s9kwtYWuOxJkeYisk+kfBxkgVKnb5B4fGtaVYmRNrJ+vpDsuD ySPbMs2PUAgVIBbT2i+9vIgJQY0xWJSTxKsxH5RbfRGfyMkH6ZecaPRpDkCyZ2UwlvGCwz MQH8WMU5JCsW3VzlsbMsf47gw9uJmcyoJCakNvmqMEJgzUqAkWG6vZTBiaOVOHSblLOFeU y/nkOoI5Em0pV5wKtmoawKmHgUBY6Y8zQdvEcb7qFBy9V5USCeAInxxrO+d24w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775505334; a=rsa-sha256; cv=none; b=a5E75Qv+xZH1n7eFvgZwD6j0d1XA22wOb8IoYyD9HQYNeEt8AjTUoL7QxhW1A+L7eS6SHF faPPbcbPKmiVjtz42jfswqaCzrSBWgKfXrkS+Ja6cPl72MUz6E/LbNzTFVKC2KDZHRhjJQ r/iMM9Zzq6YzVHL/FVS1bxaO7QQC6J6AmV7aZIc7YLYwEuRMP+h8PpuGWguZ+m+toQ8eUF qqD1NrkuNSL/LRgo6clXMDxvNvYGYc9hc4SwJUE7heaJ8/wXEzR6vzx4+4BYOjOBFBdO0J Z3MA1WU+G2kiMF98XdwaNmD+5q1Za5Es7jMpeb1dLIMBH3f6VtPy3FOejMss5A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775505334; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FVeYyX2f8mjAsU2yhydofxmDQAG9ZzAB2+176Vj/IS4=; b=fpy26VAhLXM2URjBsKuf72d97mU2XH6tNyR32ppyz6vYgsmiYfZ7DuFCXANGtu2mz6HKWK xg54U2qpUbRAkgf0cwRb+hVmp61BcoYlp6TXXrxgw/fDyHg0Am4CE8PXzHF8ImRgpv6PL/ QW+ntDPcImDfzIElm6LqtrsDKPN8D+FL0SE9sOR8D+f/jTof12ZFw9qP6VltXhFLNmrA4s 1zFRz1TEanjZjC6Fg/MD42Fic91QTmocpK6D7JXuT/AYK89aeRDCb1DmlfcS2VXZUIl8G3 W+Kp7qWQxMC23LC+4M0CGvGo/4UGCzlFErMNrAZMtkcg5vp7+e22g16XNen0hQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fqKnL0mFcz16hx for ; Mon, 06 Apr 2026 19:55:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 36e54 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 06 Apr 2026 19:55:34 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jean-=?utf-8?Q?S=C3=A9bast?==?utf-8?Q?ien P=C3=A9?=dron Subject: git: 91e54839545f - main - linuxkpi: Document why can't include List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 91e54839545f6cb91bb1a5f768ddd6c1e2420b48 Auto-Submitted: auto-generated Date: Mon, 06 Apr 2026 19:55:34 +0000 Message-Id: <69d40fb6.36e54.4435c7cb@gitrepo.freebsd.org> The branch main has been updated by dumbbell: URL: https://cgit.FreeBSD.org/src/commit/?id=91e54839545f6cb91bb1a5f768ddd6c1e2420b48 commit 91e54839545f6cb91bb1a5f768ddd6c1e2420b48 Author: Jean-Sébastien Pédron AuthorDate: 2026-03-08 09:45:48 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2026-04-06 19:28:10 +0000 linuxkpi: Document why can't include Reviewed by: bz, emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D55738 --- sys/compat/linuxkpi/common/include/linux/pci.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/pci.h b/sys/compat/linuxkpi/common/include/linux/pci.h index ccbd425de5da..ba68a9ee0dc3 100644 --- a/sys/compat/linuxkpi/common/include/linux/pci.h +++ b/sys/compat/linuxkpi/common/include/linux/pci.h @@ -60,6 +60,17 @@ #include #include +/* + * should be included here, like Linux, but we can't have that + * because Linux `struct resource` definition would conflict with FreeBSD + * native definition. + * + * At least the amdgpu DRM driver (amdgpu_isp.c at the time of this writing) + * relies on this indirect include to get the definition of Linux `struct + * resource`. As a workaround, we include from + * . + */ + #include /* pr_debug */ struct pci_device_id { From nobody Mon Apr 6 19:55:35 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fqKnM5Kmgz6YdBC for ; Mon, 06 Apr 2026 19:55: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fqKnM2LvFz3ZMM for ; Mon, 06 Apr 2026 19:55:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775505335; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pv4e1DQ1xz/DyF1o1kiBnkB9MwSOfVsOtao4mvfCTwo=; b=V/IP/33KV4BWHuVJkPCv7imfjc2Djj9G+N7vt6z4PcqiyQqbRu+7CHuYUBiQuQ+oL7TQx6 M2YrSHR/ViqwDcLHCwxShyHIBxNAzD/JxmOddt+YnqfQ2kkGYAAF1HhEVv1uID6R1oooeX AR6todjW9oL2QDNZyOMHyOhQ4412JnK4NFzgVOVHuUz/+kQ/E/vrje5O9o4Alr5KcnLxeG n8rmG28ZPgfzJZj7SEWG4iR15arjEjXu5YGiQMC5N1ITlP/4QMItwATw7M0J9MdxaDAb6l a9+A8V/uJzdWB2kYHUyV+HZu2lPpF4izkgu0FCZqmHEEDuViukNthEgmf52tIw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775505335; a=rsa-sha256; cv=none; b=ROn1beA00QNZBf8nVSGXNUXCxZY6TDc3Bs78LTzXFVH3OKiW9YxdI2Qf+nGojIku1YQ3+3 gcVNhcUpBsuoupsdIQis9ehFMT2dSrOc2V7VO4jQqjHXk3IyKosphA7He2+zScIkcZceX8 vx8So6DgDmWz7X+bzaQhDhnJxYpB6R4igoEx7u6jYsA01zcQEQMAjPYj6HnKaeTkzHvM9R keMVFPwNNKlZ3IIauZFsx5iiiSw68pNHpp2/YcBB4xjkgEGACqojbTygK6KUSxo3joyqSL ZpwVKAxNj0i6h2dH6x8J0hJUcPx2c2juMQ1e6gKN9K89M5rRDEKTfel02ETnpA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775505335; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pv4e1DQ1xz/DyF1o1kiBnkB9MwSOfVsOtao4mvfCTwo=; b=svWDVgq09YwSFl2U7TIBdvp4ff7IOI6M/y6Uu3VrBJHPWcztdiOjXsXlRtW+FS/xt13bn9 E4x5p4dyra4A4j8Cw1LHP+G11pQwHoH96pACMcnkONCakOsC4cQ8Ki6e3zC/lkAbGfUGq6 36SV/qcflWkCiuG3tRZopoiIz6SqttEb3qaOo0mRUsRrm08V0ukdYoCAWk3Sx5xJI6p4kv 1BKFIDlp6P6efX7blN5F5u5sQicWn4s7NvjfAFpMPAtA44KXLoKZoZDABTDjjJ2kZCyj57 vYjr+iUis2ZnEb1LRXFHuDVN3wMDEgEE0o91bmVyMN8nyqv4ZBvQLmeBsF5Zjg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fqKnM1dpbz16Ph for ; Mon, 06 Apr 2026 19:55:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 374b0 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 06 Apr 2026 19:55:35 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jean-=?utf-8?Q?S=C3=A9bast?==?utf-8?Q?ien P=C3=A9?=dron Subject: git: ece26db020db - main - linuxkpi: Define `MIN_T()` and `MAX_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: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ece26db020db3a21b1a4c6b608f77a9ed5be5924 Auto-Submitted: auto-generated Date: Mon, 06 Apr 2026 19:55:35 +0000 Message-Id: <69d40fb7.374b0.136d4d07@gitrepo.freebsd.org> The branch main has been updated by dumbbell: URL: https://cgit.FreeBSD.org/src/commit/?id=ece26db020db3a21b1a4c6b608f77a9ed5be5924 commit ece26db020db3a21b1a4c6b608f77a9ed5be5924 Author: Jean-Sébastien Pédron AuthorDate: 2026-03-08 11:18:22 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2026-04-06 19:28:10 +0000 linuxkpi: Define `MIN_T()` and `MAX_T()` There are the same as `MIN()` and `MAX()` except that they take a type to cast both arguments to compare. The DRM generic code started to use it in Linux 6.11. Reviewed by: bz, emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D55739 --- sys/compat/linuxkpi/common/include/linux/minmax.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/minmax.h b/sys/compat/linuxkpi/common/include/linux/minmax.h index fb8eb6f704b4..5040d7f9141e 100644 --- a/sys/compat/linuxkpi/common/include/linux/minmax.h +++ b/sys/compat/linuxkpi/common/include/linux/minmax.h @@ -60,6 +60,9 @@ type __max2 = (y); \ __max1 > __max2 ? __max1 : __max2; }) +#define MIN_T(type, x, y) MIN((type)(x), (type)(y)) +#define MAX_T(type, x, y) MAX((type)(x), (type)(y)) + #define clamp_t(type, _x, min, max) min_t(type, max_t(type, _x, min), max) #define clamp(x, lo, hi) min(max(x, lo), hi) #define clamp_val(val, lo, hi) clamp_t(typeof(val), val, lo, hi) From nobody Mon Apr 6 19:55:36 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fqKnN6PCYz6Yd63 for ; Mon, 06 Apr 2026 19:55: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fqKnN3Pjkz3ZHB for ; Mon, 06 Apr 2026 19:55:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775505336; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=70FIh6mkD5e49rOT8nCMOGI2AWwDO/re8FbMfXkzjqo=; b=Z33jehL0LiBQmtRFALBPRs8mmb/HbPYl1TXLVDI2cw7Jub6NMmO9vDcI8U18caC0P9MBQr YJgKcKAy/9es4jcMx+Sl11SeKxWAL7szCMR2LoY5PuihAcvjj2m4M+HgNSbsdK+TmvquFs cs6tj7TaYozSQ69IrKxA8OP/hH3h/n+FUkWY5npf+fEkId2xVUsNzjFet5c15McJE7dM6R BMwdttcBhfW2f+cDmX8zRezcB8ePFGi/FtHQ7Ol5rSDt3CU+B5ipmB3qUe8B8l+x3rXRyT 1nbgnA9nXMqE6MqbOECJISOsfOwIm7W5T/A8RE/g7pqdl3wXBG+EB9JjgZdzJw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775505336; a=rsa-sha256; cv=none; b=HpQXW1EzAaJ82pDh8Sp19XcKFOaK/vFWc4iRGPVeRD35gOtJfKlqSgcgN0S0lkTHcbB5h6 9TCRMo7k36cu8khKEBq9GJz4nOtv68YOcO5jeiu3BNOm7UhX0hB84CHyHAvxTXOd9QwHfs umfOfhgm92K2CCLRjA3cVDKLXWbVFHyglJBeKzy3ZoqfBzq14F0mxmcJvF7i9Y2kloNgWs FDEJBGCmo2s6SI9EvFcNroL6pNbNnODiv1vm/VpWNhuo9CIIXlMYDLZQUAyqW3VIMZ5OeT FXy1dT84AaBP4WDAVJ6mPuRHBtgo79p3uoHFy7GVCiJkeDKLeFFB8xJmpmQE9A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775505336; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=70FIh6mkD5e49rOT8nCMOGI2AWwDO/re8FbMfXkzjqo=; b=aM81N86D3x+tL3hIviL19NpiSmwCKuHUfQdJ5/AJs2bClqWBNP7ZThvBPWEj5m2AXjkuRG VjYxb5iNC1KZeV2nyDepuCb/98abOQiY7kVa7HkIo4/WINb8jaCS5jdHrJLQg07pqYkJpn XgKzqEB7WPPodwf8suVaFioohNoY+KOAQrebb2V2iO5gcN85ukvzL5njajkeim1ys8ubjt zPn2rO2Mt8pGk7wePORhgjXgh9YlM+FF2T6tUeYBrsW3o4IP5xjf8YgQOEoFN3a1Cxg4er k4tLxGrVCgnYgMJIx+t1tZoHgBVNHti6wTyjk72TjoPYIHFT2VYPWP10HNh7dA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fqKnN2Y43z16dp for ; Mon, 06 Apr 2026 19:55:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 38401 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 06 Apr 2026 19:55:36 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jean-=?utf-8?Q?S=C3=A9bast?==?utf-8?Q?ien P=C3=A9?=dron Subject: git: 5ee604b2446f - main - linuxkpi: Define missing `SZ_*` below 1 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: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5ee604b2446fa0f3fb949b21a587884ad65b5737 Auto-Submitted: auto-generated Date: Mon, 06 Apr 2026 19:55:36 +0000 Message-Id: <69d40fb8.38401.741afa6c@gitrepo.freebsd.org> The branch main has been updated by dumbbell: URL: https://cgit.FreeBSD.org/src/commit/?id=5ee604b2446fa0f3fb949b21a587884ad65b5737 commit 5ee604b2446fa0f3fb949b21a587884ad65b5737 Author: Jean-Sébastien Pédron AuthorDate: 2026-03-08 11:23:54 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2026-04-06 19:28:10 +0000 linuxkpi: Define missing `SZ_*` below 1 kib The amdgpu DRM driver started to use it in Linux 6.11. Reviewed by: bz, emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D55740 --- sys/compat/linuxkpi/common/include/linux/sizes.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/sizes.h b/sys/compat/linuxkpi/common/include/linux/sizes.h index d8a6e75192f6..430ad3ec427d 100644 --- a/sys/compat/linuxkpi/common/include/linux/sizes.h +++ b/sys/compat/linuxkpi/common/include/linux/sizes.h @@ -29,6 +29,17 @@ #ifndef _LINUXKPI_LINUX_SIZES_H_ #define _LINUXKPI_LINUX_SIZES_H_ +#define SZ_1 1 +#define SZ_2 2 +#define SZ_4 4 +#define SZ_8 8 +#define SZ_16 16 +#define SZ_32 32 +#define SZ_64 64 +#define SZ_128 128 +#define SZ_256 256 +#define SZ_512 512 + #define SZ_1K (1024 * 1) #define SZ_2K (1024 * 2) #define SZ_4K (1024 * 4) From nobody Mon Apr 6 19:55:37 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fqKnQ09gwz6Yd1T for ; Mon, 06 Apr 2026 19:55: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fqKnP4VfDz3ZVH for ; Mon, 06 Apr 2026 19:55:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775505337; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vFzbEj8G1aKeHerYXXdhnRIezLgNX+S6WkoTNk3Jid0=; b=paesnt5fZbJdzYrLXLJNk+eERn61QJnnYYbECZyoJUsMABaFibU5FVKYYBz6pidoz867o/ zacypjy5yGJOU1xrXDaJep4A4VkH6HorWgAKEOlOCh2+xISDLN/FZPBQZHtcqaIogibqh3 McxfNntWuHrGFs58DlDxiy+Pd0afUpGQNcm9fkvhaSIx+4J2Cm5h6J6SFmy1ppgKacc8sO zTxDOq2+XCwK2txZpPQUVxqWQ0K/tTtxa6TiN0OadST50xO8Jf2JBkIbtZgb8dAart+e9G wPGCR/ndOwfsd8fL/6MatrlTpGGKlTNj0kGUuu+lK0mRsmDDqCfXkOli0WcokA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775505337; a=rsa-sha256; cv=none; b=g5lAB3USoPvAE/VllGNOpaxOYKWFKxgE9WFPZDXDNQm9/NXF9tH/msO3hj6gHZ3vpCjY+f 0+JUdvPIJ5lD52F7qApqB9O15US2F78UWgZ+EZHpbrg/0FyYWTQv4WnBg4AL29KgKIOy4Q V+GaorrwPh5VywuG40cvU96mO/pTmCId2uS/nbhNDd5LwG23mgp8HdX5Pyt02x2P6X7s5h TXUowgzDeB4+AvVfiLWWLDHNeeDvh0nbxylpQJqVsnIWmO4APmh/mJfzSpEvXpPU8wMgPX tXYeWujXn+iz/+WMALYDZJ3VwLOa6xQfb8CNjE1Nh8ach5hDk0QswyAQXFxheg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775505337; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vFzbEj8G1aKeHerYXXdhnRIezLgNX+S6WkoTNk3Jid0=; b=lmKmsTrjOVXZT3PG0491vW2smyWnDZiEHo21bNUT0nZl3ytFFOFjvXNxDpN0DpF8nMItGt ScOd5yFf2r5/D6d59KXFVg0C7JUDA5DeWAQGqO7bATvXoYmQOPHVuWiJobLdqR3qRvyLnV NtremWeLdTmGMSwkQqrXd2dfGYbMepVJTO3MFAa0LWvf1Jacpo3NezN0b3uuhCgLPKVXkS HPOPIzYheCuflB9r6KDDYl8J7Z91kDGadUP3kLnBLHbwyODc0ZpnhEQ6WMw86v8oxgWB5F 0+0MNFGa8DTvpMWUvZXnI0rU+k25OYyA+06GE2dQhxZMpk177NT1txM9OMuSfQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fqKnP3vPBz16v2 for ; Mon, 06 Apr 2026 19:55:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 38387 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 06 Apr 2026 19:55:37 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jean-=?utf-8?Q?S=C3=A9bast?==?utf-8?Q?ien P=C3=A9?=dron Subject: git: 0eaa57625d0f - main - linuxkpi: Add List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0eaa57625d0fbe9960eabbaaedd522acdf673648 Auto-Submitted: auto-generated Date: Mon, 06 Apr 2026 19:55:37 +0000 Message-Id: <69d40fb9.38387.70b18fca@gitrepo.freebsd.org> The branch main has been updated by dumbbell: URL: https://cgit.FreeBSD.org/src/commit/?id=0eaa57625d0fbe9960eabbaaedd522acdf673648 commit 0eaa57625d0fbe9960eabbaaedd522acdf673648 Author: Jean-Sébastien Pédron AuthorDate: 2026-03-09 19:04:12 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2026-04-06 19:28:11 +0000 linuxkpi: Add This is used by the i915 DRM driver for some time to log more details about a GPU error, but the code was commented out. Reviewed by: emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56282 --- sys/compat/linuxkpi/common/include/linux/ascii85.h | 46 ++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/ascii85.h b/sys/compat/linuxkpi/common/include/linux/ascii85.h new file mode 100644 index 000000000000..06777a130e41 --- /dev/null +++ b/sys/compat/linuxkpi/common/include/linux/ascii85.h @@ -0,0 +1,46 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2026 The FreeBSD Foundation + */ + +#ifndef _LINUXKPI_LINUX_ASCII85_H_ +#define _LINUXKPI_LINUX_ASCII85_H_ + +#include + +#define ASCII85_BUFSZ 6 + +static inline long +ascii85_encode_len(long in_len) +{ + long out_len; + + out_len = howmany(in_len, 4); + + return (out_len); +} + +static inline const char * +ascii85_encode(uint32_t in, char *out) +{ + int i; + + if (in == 0) { + out[0] = 'z'; + out[1] = '\0'; + return (out); + } + + for (i = ASCII85_BUFSZ - 2; i >= 0; i--) { + out[i] = in % 85; + out[i] += 33; + + in /= 85; + } + out[ASCII85_BUFSZ - 1] = '\0'; + + return (out); +} + +#endif /* _LINUXKPI_LINUX_ASCII85_H_ */ From nobody Mon Apr 6 19:55:38 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fqKnR1xnNz6Yd66 for ; Mon, 06 Apr 2026 19:55: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fqKnQ4XLhz3ZDr for ; Mon, 06 Apr 2026 19:55:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775505338; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7x3Z7KI0+23oBsOBsLO8GdSHYfRGFfNoEkxBi0oOYxQ=; b=P3DFxt7eBNQ8qd/RCiGv8LaVHwQ5VHzHaz7qBofSn0ash1Rsud/Uz8sCaf0ua9MGUn7zNN Nmjd/gwUXrKVzLyqcRF32/1BYjnJlV+xrpJ7a992CbxN2l8X3JBC05Gof3XFVmhLhpLRge 1xHDOuWQ+3FQrRb51IHzmxoSeYe7agZPDv60GfrBqLVyGa6z2RvHQl4Nl959MIv0hc3QNU BykFHYgr2fGRVyJcfLlV3VV+xNAafEKMPDCv9XFKWN71sboh+oAg4zW1/IlO2iqwOYgVq/ nAEkMeQW5bXIE+SDR9G0iL/5s9QAGYKujvCrVUJ+TRLZAPMCSKIXyNhByO645g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775505338; a=rsa-sha256; cv=none; b=k5OAq+fW5SVkG7ndAb+geeVNRMaywDnLtWNXIuwDMtfrdgIKN6vIrIUWEbZYwybv+3azop 9kLq/MuogPnp+Wpxnwgfe7+p4RctQeOk/R4y1hzt47CJU/dpMcp7D3GfBHsb8BeFc2TwyF 5cYhjvVwoqIExV4Awg6K9q+7588qQBdC/zyHNYsKKoIjvMpKAwTRNoH+i7uCmlo0fKC/sU 5hrgdWeoUEv3su0bb4p0BWajXEzqrMAWArRidowaklcgUZhs81SphkDDwTsMg64qKfHGgw aMpNNO9frPprNRhY8Y5bR6JEshc1fhf6eP8N6D0LCdaQ4oEeI7y3/koFKBsCQQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775505338; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7x3Z7KI0+23oBsOBsLO8GdSHYfRGFfNoEkxBi0oOYxQ=; b=mMAUutwO5qS+UQp62JhsarQGc6faOTK+U3Uy4mkrA9NXVB2SzjO1rLymg889wZTOkml1X2 Ypq3y1OaZXkNq7Wh30m5KS5CjQMQ/F2NsgxdzkQwzlOCTG2H8oAD5B7rQjRE3M0cncKZJf GW16BaR3t+FTTpWp5TZjOu5nm3WXm7Zl9iT4RmrzCTCykV2Qq7nPO/oABauqpOJpq+D+9J n5gAweYPKu6Q9KoE2CN4u8a7YiKNIbiz3Wz+W+pQlwpMN2m8MlxmY2j+f9xdUUOzPSJuP7 X+grQipNIYDFJNAdSVPIrWPUwrlCNgWl5JZodQvWbMbHem9Ekd/08iW6WPtF0Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fqKnQ3zH6z16v4 for ; Mon, 06 Apr 2026 19:55:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 38405 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 06 Apr 2026 19:55:38 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jean-=?utf-8?Q?S=C3=A9bast?==?utf-8?Q?ien P=C3=A9?=dron Subject: git: 36fe65cc7a31 - main - Bump __FreeBSD_version to 1600015 after linuxkpi changes for DRM 6.11 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 36fe65cc7a31962e80a45d8b0fa6a401653a3deb Auto-Submitted: auto-generated Date: Mon, 06 Apr 2026 19:55:38 +0000 Message-Id: <69d40fba.38405.d0657ed@gitrepo.freebsd.org> The branch main has been updated by dumbbell: URL: https://cgit.FreeBSD.org/src/commit/?id=36fe65cc7a31962e80a45d8b0fa6a401653a3deb commit 36fe65cc7a31962e80a45d8b0fa6a401653a3deb Author: Jean-Sébastien Pédron AuthorDate: 2026-04-06 19:29:01 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2026-04-06 19:30:29 +0000 Bump __FreeBSD_version to 1600015 after linuxkpi changes for DRM 6.11 As of this commit, all changes to linuxkpi required by the DRM drivers from Linux 6.11 were committed. Sponsored by: The FreeBSD Foundation --- sys/sys/param.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/sys/param.h b/sys/sys/param.h index 91b4657e717f..6142165d1c99 100644 --- a/sys/sys/param.h +++ b/sys/sys/param.h @@ -74,7 +74,7 @@ * cannot include sys/param.h and should only be updated here. */ #undef __FreeBSD_version -#define __FreeBSD_version 1600014 +#define __FreeBSD_version 1600015 /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From nobody Tue Apr 7 04:34:21 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fqYHy0CcRz6Yhq7 for ; Tue, 07 Apr 2026 04:34:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fqYHx6hY9z3bS1 for ; Tue, 07 Apr 2026 04:34:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775536461; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=E+rwqFOMR1RHRP+xGhIvqIinOFd4WEtc9JH6yljcpa0=; b=FNaKbEylDgH4epE4U5jW9ABZzGJgegDZ1sd89tDPyiEcKmTB9w1dOL93NTl6B6CSEqu6x3 qCSfF8xjqN8b7+gcFbVdH5l4u/B8yP85RaL0bJ70fjUralEjlWWOFv1JYMR49pNamcNsT+ EOYKQPL1uDWA6NTBmSpIEETlE19WAY/ZJiKntGL7nfqAKhsiUnt1Ozx4/iQUXdlQ3o4UDu tZuUS8hY5RCn5m2pkrcToZ/HDt/yxqYllHU60Rex6JOFMiySlinRz29My0EBFUoT9OPR5T lqY+jxfAnX3wASBOA3XUZ6Sx7Te0GeZe60bAYvWGgLbhO+n4ak0dY2ZRrKw8VA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775536461; a=rsa-sha256; cv=none; b=rYVugt9RKlo/IrJb9Z6f71HPt4IMQgeXFK9b1Y9u38PTULGArXS/VVbBNNTPdaFYRxwcoG L2eeJz8peJzB7yRyDKX4PDrpYjS5vjFXLGM5xAUHdaQzsD//gJ8jzb4VPn5EmSOY9jMq/l ZuFHts6on4vIL4axFgC8r0FaaTbHMGZyM9uuYVWW/IidxwOCrzuYZ25nrDcGstTS4OCdxy XJb3vn96jrAHELTZqboN7o6GQdNvQt+ogviBlhrRRqRt3+XmzJbX54Uv9g4u4xluW70xMz wMiZbJ230MRmL46PaZdBCCrG5+EoKjX4/GhVuXIwL430vLRPo311WVqhNeSc1g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775536461; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=E+rwqFOMR1RHRP+xGhIvqIinOFd4WEtc9JH6yljcpa0=; b=IWwlXoaH1hG98HRfmGFkpVgKF9AZ3RvT+NQs1mLuQiuX1kfDunBfAlsydFcEjxU48Bb4/p JXTzL3jXEDAL1YmJWRBsDocrQnS0N8+7amEn5XKWq378oGCvtp7as0QzeQyXIGwkwsFueW LkTIQyUi5X8R7nFiVk+bDIlP/Ncslk/oX+FMl2ZVhOeagWJDjkIPmTrYCpIbMth1Qnz+OC nkFLZSFD6bSfy/es5WK4okc7NqRSxIiJmv1ipKjkkaLWIky2PPUws4jIJHWhqk3NWs+QiM PuW3D834KkRcezr9ulj2DOPXMn/VVuns6KUMOmGF3xGkBVLxfdlE1L4yAiN2rg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fqYHx5wsLz8Qr for ; Tue, 07 Apr 2026 04:34:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1e05d by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 07 Apr 2026 04:34:21 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Zhenlei Huang Subject: git: 00d96da231d0 - main - ifnet: Add some sanity 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: zlei X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 00d96da231d007673a1672452748d8ea4f6788ae Auto-Submitted: auto-generated Date: Tue, 07 Apr 2026 04:34:21 +0000 Message-Id: <69d4894d.1e05d.df35661@gitrepo.freebsd.org> The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=00d96da231d007673a1672452748d8ea4f6788ae commit 00d96da231d007673a1672452748d8ea4f6788ae Author: Zhenlei Huang AuthorDate: 2026-04-07 04:33:05 +0000 Commit: Zhenlei Huang CommitDate: 2026-04-07 04:33:05 +0000 ifnet: Add some sanity checks To be more robust since the checking is now performed where the interface is referenced. While here, remove a redundant check from if_vmove_loan(). Reviewed by: kp, glebius, pouria MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D55875 --- sys/net/if.c | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/sys/net/if.c b/sys/net/if.c index bdb5671c1afb..519b23750b52 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -428,8 +428,12 @@ VNET_SYSINIT(vnet_if_init, SI_SUB_INIT_IF, SI_ORDER_SECOND, vnet_if_init, static void if_link_ifnet(struct ifnet *ifp) { - IFNET_WLOCK(); + + MPASS(refcount_load(&ifp->if_refcount) > 0); + MPASS(ifp->if_vnet == curvnet); + MPASS(ifindex_table[ifp->if_index].ife_ifnet == ifp); + CK_STAILQ_INSERT_TAIL(&V_ifnet, ifp, if_link); #ifdef VIMAGE curvnet->vnet_ifcnt++; @@ -446,6 +450,10 @@ if_unlink_ifnet(struct ifnet *ifp, bool vmove) IFNET_WLOCK(); CK_STAILQ_FOREACH(iter, &V_ifnet, if_link) if (iter == ifp) { + MPASS(refcount_load(&ifp->if_refcount) > 0); + MPASS(ifp->if_vnet == curvnet); + MPASS(ifindex_table[ifp->if_index].ife_ifnet == ifp); + CK_STAILQ_REMOVE(&V_ifnet, ifp, ifnet, if_link); #ifdef VIMAGE curvnet->vnet_ifcnt--; @@ -1189,8 +1197,6 @@ if_vmove_loan(struct thread *td, struct ifnet *ifp, char *ifname, int jid) struct ifnet *difp; bool found; - MPASS(ifindex_table[ifp->if_index].ife_ifnet == ifp); - /* Try to find the prison within our visibility. */ sx_slock(&allprison_lock); pr = prison_find_child(td->td_ucred->cr_prison, jid); @@ -2109,14 +2115,13 @@ ifunit_ref(const char *name) NET_EPOCH_ENTER(et); CK_STAILQ_FOREACH(ifp, &V_ifnet, if_link) { if (strncmp(name, ifp->if_xname, IFNAMSIZ) == 0 && - !(ifp->if_flags & IFF_DYING)) + !(ifp->if_flags & IFF_DYING)) { + MPASS(ifp->if_vnet == curvnet); + MPASS(ifindex_table[ifp->if_index].ife_ifnet == ifp); + if_ref(ifp); break; + } } - if (ifp != NULL) { - if_ref(ifp); - MPASS(ifindex_table[ifp->if_index].ife_ifnet == ifp); - } - NET_EPOCH_EXIT(et); return (ifp); } @@ -2129,8 +2134,12 @@ ifunit(const char *name) NET_EPOCH_ENTER(et); CK_STAILQ_FOREACH(ifp, &V_ifnet, if_link) { - if (strncmp(name, ifp->if_xname, IFNAMSIZ) == 0) + if (strncmp(name, ifp->if_xname, IFNAMSIZ) == 0) { + MPASS(refcount_load(&ifp->if_refcount) > 0); + MPASS(ifp->if_vnet == curvnet); + MPASS(ifindex_table[ifp->if_index].ife_ifnet == ifp); break; + } } NET_EPOCH_EXIT(et); return (ifp); From nobody Tue Apr 7 10:23:18 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fqj2Z5pmSz6Xy3W for ; Tue, 07 Apr 2026 10:23: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fqj2Z5FGNz4FQp for ; Tue, 07 Apr 2026 10: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=1775557398; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VA3GB/akE+c7QuFcXgZ7qZ3OMh7/S9z9SBr85oPgb1U=; b=R3OqqO/aZ6P7KksBkNSBm/BEz8pXaAk0YVYsI/frY68a7ppbOZQtFVkrC5c86UelgV4MTp uXhb5MWIQ1UEekaVg5xfYzIAoh18aZoHOpR3w2Io+3yC/oNryf1lsm6T4BuFcjGjEIn8NF Hno5tI4cmMhwK+oFeYbOPL4iD93WfKR/IdpfLqzD4eBTh3Fy8LeHSX2/aw6a6X7mfRQo+8 QTqmlw5hkc1IQ7CSh20ebZWwIgfWk9b8J/vQ/VQWF4eCj8XCemeMtKMyvIc6GyVVJLU/Pz UQ46TcuXjwxKWUrfQ5SwwqQrhkIdkdUmoYXAbyasZwbfwJFCZ+CZIn6VWNmcQQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775557398; a=rsa-sha256; cv=none; b=RSTLqbmdTUpcQdurf1lu0s8hMnRXhfvUaPBSYT/ZufdwnbntsvlOXOhtThDNeIF44lnpEr j1L7J/ZavMfXufemi+rPiyOtmOHc+nkYFkLbL1mabNrxs7aMTTidBC1J3hhAsunHUvy7im MOwiI68hQxaEFMpcZp7Bq6bLKy9mUcaOeOEDWkTarM+rGY25tKjxfEiGvN9CE2Ry2pdh+f tYK/oun8iCwAlAPp7JLzMs/l0MEPZ4FhP5nsb/vOrdohMF5Hk8oNm+mvz7PIXg000cUC8q fFSrvweKNCdV75hhF/Uy6AlxbvRPGXXKEAUC5U2yXF7bejhDMkLuulXwiy7LZA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775557398; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VA3GB/akE+c7QuFcXgZ7qZ3OMh7/S9z9SBr85oPgb1U=; b=ePbO5yZIHaxG24jPvFQPoP8/JLKWzeoZ+vbxfwYzEsH/4IIq45R8nw5hEaN/XjaE1pZZTg 252r3i3P3hUyaT+6Fzd00a/dmTG3UKvXb2gFWwQyhN/VPcuFW/Ew3e4K43iFf5RsIpa2fh Jn8sFF5JGdSnYmM3cw+cu1uUOhTnOj8mec/LD1Kg99vuKLveQBaVN6nAoPTo7X3HDjpw8T 0LF6bP0Aj/0r1PzhmCt9ZHbqXdu6iHtdO6vr409ikE+61Xzru6PqWkFHMxBnT7K1TTnFVE /A/xDC3XgUCljJXHHXOFg/Ly4xw1/a1kzMe/WWorGXNrn6cdz/RSZDledt/3KQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fqj2Z4f2lzcGy for ; Tue, 07 Apr 2026 10:23:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1bf06 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 07 Apr 2026 10:23:18 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: 31749859525b - main - netstat(1): '-w': Banners to appear before a new statistics line, not after List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: 31749859525b2b79634dc7c066c3563be5b1e3fd Auto-Submitted: auto-generated Date: Tue, 07 Apr 2026 10:23:18 +0000 Message-Id: <69d4db16.1bf06.7c7788b7@gitrepo.freebsd.org> The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=31749859525b2b79634dc7c066c3563be5b1e3fd commit 31749859525b2b79634dc7c066c3563be5b1e3fd Author: Olivier Certner AuthorDate: 2026-04-02 19:13:02 +0000 Commit: Olivier Certner CommitDate: 2026-04-07 09:23:09 +0000 netstat(1): '-w': Banners to appear before a new statistics line, not after Recurring banners except the first are printed just after the latest interval's statistics line, giving the false impression that the latter are omitted. It is also better to print a new banner only if it is going to be followed by a new line of statistics, in case netstat(1) is interrupted or we have reached the number of iterations specified by '-q'. Fix this by pushing printing these banners inside the loop producing statistics lines, after having waited for the next interval. The first banner is printed before the loop, as we want it to be printed immediately at launch, even if at this point we do not have statistics to display (we have to wait for an interval to compute these, as they are based on a difference). While here, remove the 'goto' spaghetti by putting banner printing into its own private function and using a proper infinite loop in sidewaysintpr(). While here, document the why of the 21 statistics line span between two banners. While here, check for the number of output lines of statistics once such a line has effectively been printed. This allows to remove the internal incrementation performed when reading '-w''s argument, which was a hack to compensate the misplaced check. While here, in the manual page, simplify the description of the '-w' mode and mention that passing 0 to '-q' means "no count limit". Reviewed by: glebius Fixes: 84c1edcbad7d ("Rewrite netstat/if.c to use ...") Fixes: bf10ffe1d3a9 ("Add a new option, -q howmany, ...") MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56227 --- usr.bin/netstat/if.c | 146 +++++++++++++++++++++++++++------------------- usr.bin/netstat/main.c | 2 - usr.bin/netstat/netstat.1 | 22 +++---- 3 files changed, 93 insertions(+), 77 deletions(-) diff --git a/usr.bin/netstat/if.c b/usr.bin/netstat/if.c index 7ee03eb3689b..637aa4738d40 100644 --- a/usr.bin/netstat/if.c +++ b/usr.bin/netstat/if.c @@ -396,7 +396,7 @@ intpr(void (*pfunc)(char *), int af) u_int npkt_len = 8, nbyte_len = 10, nerr_len = 5; if (interval) - return sidewaysintpr(); + return (sidewaysintpr()); if (getifaddrs(&ifap) != 0) xo_err(EX_OSERR, "getifaddrs"); @@ -652,6 +652,21 @@ catchalarm(int signo __unused) signalled = true; } +static void +running_stats_banner(void) +{ + xo_emit("{T:/%17s} {T:/%14s} {T:/%16s}\n", "input", + interface != NULL ? interface : "(Total)", "output"); + xo_emit("{T:/%10s} {T:/%5s} {T:/%5s} {T:/%10s} {T:/%10s} {T:/%5s} " + "{T:/%10s} {T:/%5s}", + "packets", "errs", "idrops", "bytes", "packets", "errs", "bytes", + "colls"); + if (dflag) + xo_emit(" {T:/%5.5s}", "drops"); + xo_emit("\n"); + xo_flush(); +} + /* * Print a running summary of interface statistics. * Repeat display every interval seconds, showing statistics @@ -675,71 +690,82 @@ sidewaysintpr(void) interval_it.it_interval.tv_usec = 0; interval_it.it_value = interval_it.it_interval; setitimer(ITIMER_REAL, &interval_it, NULL); + xo_open_list("interface-statistics"); -banner: - xo_emit("{T:/%17s} {T:/%14s} {T:/%16s}\n", "input", - interface != NULL ? interface : "(Total)", "output"); - xo_emit("{T:/%10s} {T:/%5s} {T:/%5s} {T:/%10s} {T:/%10s} {T:/%5s} " - "{T:/%10s} {T:/%5s}", - "packets", "errs", "idrops", "bytes", "packets", "errs", "bytes", - "colls"); - if (dflag) - xo_emit(" {T:/%5.5s}", "drops"); - xo_emit("\n"); - xo_flush(); + /* + * We print the first banner right away, even if we'll have to wait for + * the specified interval to get the first statistics line. Next + * banners will be printed only when the next statistics line is + * available. + */ + running_stats_banner(); + /* Number of written statistics line since latest banner. */ line = 0; -loop: - if ((noutputs != 0) && (--noutputs == 0)) { - xo_close_list("interface-statistics"); - return; - } - oldmask = sigblock(sigmask(SIGALRM)); - while (!signalled) - sigpause(0); - signalled = false; - sigsetmask(oldmask); - line++; - - fill_iftot(new); - - xo_open_instance("stats"); - show_stat("lu", 10, "received-packets", - new->ift_ip - old->ift_ip, 1, 1); - show_stat("lu", 5, "received-errors", - new->ift_ie - old->ift_ie, 1, 1); - show_stat("lu", 5, "dropped-packets", - new->ift_id - old->ift_id, 1, 1); - show_stat("lu", 10, "received-bytes", - new->ift_ib - old->ift_ib, 1, 0); - show_stat("lu", 10, "sent-packets", - new->ift_op - old->ift_op, 1, 1); - show_stat("lu", 5, "send-errors", - new->ift_oe - old->ift_oe, 1, 1); - show_stat("lu", 10, "sent-bytes", - new->ift_ob - old->ift_ob, 1, 0); - show_stat("NRSlu", 5, "collisions", - new->ift_co - old->ift_co, 1, 1); - if (dflag) - show_stat("LSlu", 5, "dropped-packets", - new->ift_od - old->ift_od, 1, 1); - xo_close_instance("stats"); - xo_emit("\n"); - xo_flush(); + for (;;) { + /* Wait for next interval. */ + oldmask = sigblock(sigmask(SIGALRM)); + while (!signalled) + sigpause(0); + signalled = false; + sigsetmask(oldmask); - if (new == &ift[0]) { - new = &ift[1]; - old = &ift[0]; - } else { - new = &ift[0]; - old = &ift[1]; - } + fill_iftot(new); - if (line == 21) - goto banner; - else - goto loop; + /* + * We want that, on a 24-line display, when the previous banner + * reaches exactly the top of the screen, a new banner is + * printed before the next statistics line. This ensures that + * at least one banner is visible on screen at all time + * (provided the screen has at least 24 lines). Since the + * banner takes 2 lines, and the last screen line is occupied by + * the cursor, it's after having written 21 statistics lines + * that we must output the banner. + */ + if (line == 21) { + running_stats_banner(); + line = 0; + } + ++line; + + xo_open_instance("stats"); + show_stat("lu", 10, "received-packets", + new->ift_ip - old->ift_ip, 1, 1); + show_stat("lu", 5, "received-errors", + new->ift_ie - old->ift_ie, 1, 1); + show_stat("lu", 5, "dropped-packets", + new->ift_id - old->ift_id, 1, 1); + show_stat("lu", 10, "received-bytes", + new->ift_ib - old->ift_ib, 1, 0); + show_stat("lu", 10, "sent-packets", + new->ift_op - old->ift_op, 1, 1); + show_stat("lu", 5, "send-errors", + new->ift_oe - old->ift_oe, 1, 1); + show_stat("lu", 10, "sent-bytes", + new->ift_ob - old->ift_ob, 1, 0); + show_stat("NRSlu", 5, "collisions", + new->ift_co - old->ift_co, 1, 1); + if (dflag) + show_stat("LSlu", 5, "dropped-packets", + new->ift_od - old->ift_od, 1, 1); + xo_close_instance("stats"); + xo_emit("\n"); + xo_flush(); + + if ((noutputs != 0) && (--noutputs == 0)) { + xo_close_list("interface-statistics"); + return; + } + + if (new == &ift[0]) { + new = &ift[1]; + old = &ift[0]; + } else { + new = &ift[0]; + old = &ift[1]; + } + } /* NOTREACHED */ } diff --git a/usr.bin/netstat/main.c b/usr.bin/netstat/main.c index 79830049948a..d81e7c5e8307 100644 --- a/usr.bin/netstat/main.c +++ b/usr.bin/netstat/main.c @@ -389,8 +389,6 @@ main(int argc, char *argv[]) break; case 'q': noutputs = atoi(optarg); - if (noutputs != 0) - noutputs++; break; case 'r': rflag = true; diff --git a/usr.bin/netstat/netstat.1 b/usr.bin/netstat/netstat.1 index 1931c38a1fad..a726c703752f 100644 --- a/usr.bin/netstat/netstat.1 +++ b/usr.bin/netstat/netstat.1 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd July 16, 2025 +.Dd April 3, 2026 .Dt NETSTAT 1 .Os .Sh NAME @@ -355,23 +355,14 @@ See At intervals of .Ar wait seconds, display the information regarding packet traffic on all -configured network interfaces or a single -.Ar interface . +configured network interfaces, or a single +.Ar interface +if +.Fl I +is specified. .Pp -When -.Nm -is invoked with the -.Fl w -option and a -.Ar wait -interval argument, it displays a running count of statistics related to -network interfaces. An obsolescent version of this option used a numeric parameter with no option, and is currently supported for backward compatibility. -By default, this display summarizes information for all interfaces. -Information for a specific interface may be displayed with the -.Fl I Ar interface -option. .Bl -tag -width indent .It Fl I Ar interface Only show information regarding @@ -398,6 +389,7 @@ See Exit after .Ar howmany outputs. +A value of zero indicates no limit, and is the default. .It Fl j Ar jail Run inside a jail. See From nobody Tue Apr 7 11:04:34 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fqjyC2kwWz6Y2Nx for ; Tue, 07 Apr 2026 11:04: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fqjyB5SH2z4JjY for ; Tue, 07 Apr 2026 11:04:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775559874; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yTNhVpzHu5Egl5MDgqTlkUWOM8e4RSN2C38qrikKuWg=; b=i6HznXaWeGjjISQFu4JhJccMMIOh8EqsdBEPzIAsE1AUMUVrMNOOF7C05Yzn5/edMFCyDt /upf403+w8r7mAuztUshP8g3/lKn7uR8nuLDEwk+jowmLBv6RIskoHFrL+Ce2EuCMbAa8I gXquRn/Oz+/Gagl7QkydEs961bWYHWsJXyy1k8kRJDrjIwmPmYWcrWxwdHY7X5wlFrtAb5 kBFeRo6x2JDVlSnpmr8y3hjYWne5lnyr4AM0sOy5SxUgRMvTvtCqYydeOmhYow76xmun9m QG+9/xoXL15CEO7DEJ+1UQ4C8v8LgDoO+xOUHu7W6C8MTzOGgQX9XBcKV9JWkA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775559874; a=rsa-sha256; cv=none; b=KSHip1nV7vTKSECfzQSJE7G/NYYQvVzLkH4o51bCRpXQpUO4Mnf7camiCS63tSp0nnzX5i sJnxcg6uWR0U1peRpVJnZWea79FTzDvtVbTfgWsr5E0Vte2vBN7qibQd5Kv/zfkFD1tIrw dlxVMolIS7DIUXCyQ9F8ft9BprhhRkoNDKdGaaBgut846sup/54xqf+LJtgayhxCMXHtze DyoUd2Ri2RWkZlirf0mxu4+XV6tUaX1WnqkvCap2ws8oJQ80Y9XvmwMK8mhQUrpt/a1Re7 I6lijQN7LiZnPZjvXAKFsBLRtny+vLn+yEgaArHUt9XKW5ES+Wyl78nzkbI2cA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775559874; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yTNhVpzHu5Egl5MDgqTlkUWOM8e4RSN2C38qrikKuWg=; b=fmpB1Nb4/IY3zdSlXrTw0PtPEgJMcqW+9+A3cOgVgJao2ltWLJ+LqBmHu29rD80B8BffnR afkql09lbvqun0cQi9sS6ZE5j1Q7FNhCZ+ow483LsRY2N4tYQllgZg1zaixWjFLfwQRTsc LQ3Q/SjT2fGvordpskUeu0bDNnrGl/tQd3QqdzY08vL35DlrTgem0DbuvDuneyvAvLigpX wNfO5qbpAoaPBGaL8auYZTBb4f0xqyBbbHY3cD489PMVu6zUGLq3jjTVjTCTUW2VUSfuEa 6eCnY6WCjLSPTtru37J0XegbrQht1sVKrSdxTC+sllB28Ic4GEaVA1UVdIMGQQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fqjyB3t8nzdBh for ; Tue, 07 Apr 2026 11:04:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1f5f7 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 07 Apr 2026 11:04:34 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: 359d6e31afe3 - main - packages: Always use the bootstrap flua List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: 359d6e31afe3d28addedf9a8f550b382a5faa478 Auto-Submitted: auto-generated Date: Tue, 07 Apr 2026 11:04:34 +0000 Message-Id: <69d4e4c2.1f5f7.c266c17@gitrepo.freebsd.org> The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=359d6e31afe3d28addedf9a8f550b382a5faa478 commit 359d6e31afe3d28addedf9a8f550b382a5faa478 Author: Lexi Winter AuthorDate: 2026-04-07 10:42:44 +0000 Commit: Lexi Winter CommitDate: 2026-04-07 10:42:44 +0000 packages: Always use the bootstrap flua To avoid breaking the build due to incompatible changes in flua or lua libraries on the host, use the bootstrap flua for the package build. MFC after: 2 weeks Reviewed by: kevans, emaste Sponsored by: https://www.patreon.com/bsdivy Differential Revision: https://reviews.freebsd.org/D56271 --- Makefile.inc1 | 21 +++++++++++---------- release/packages/create-sets.sh | 2 +- release/packages/generate-ucl.sh | 2 +- 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index a976daabbaef..1edab54eeea0 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -2162,7 +2162,7 @@ _repodir: .PHONY create-packages-world: _pkgbootstrap _repodir .PHONY ${_+_}@cd ${.CURDIR}; \ - ${MAKE} -f Makefile.inc1 \ + PATH="${TMPPATH}" ${MAKE} -f Makefile.inc1 \ DESTDIR=${WSTAGEDIR} \ PKG_VERSION=${PKG_VERSION} create-world-packages @@ -2171,13 +2171,13 @@ create-packages-world: _pkgbootstrap _repodir .PHONY .ORDER: create-packages-source create-packages-sets create-packages-sets: _pkgbootstrap _repodir .PHONY ${_+_}@cd ${.CURDIR}; \ - ${MAKE} -f Makefile.inc1 \ + PATH="${TMPPATH}" ${MAKE} -f Makefile.inc1 \ DESTDIR=${WSTAGEDIR} \ PKG_VERSION=${PKG_VERSION} create-sets-packages create-packages-kernel: _pkgbootstrap _repodir .PHONY ${_+_}@cd ${.CURDIR}; \ - ${MAKE} -f Makefile.inc1 \ + PATH="${TMPPATH}" ${MAKE} -f Makefile.inc1 \ DESTDIR=${KSTAGEDIR} \ PKG_VERSION=${PKG_VERSION} DISTDIR=kernel \ SOURCE_DATE_EPOCH=${SOURCE_DATE_EPOCH} \ @@ -2191,7 +2191,7 @@ create-packages-sets-repo: .PHONY create-packages-sets sign-packages create-packages-source: _pkgbootstrap _repodir .PHONY ${_+_}@cd ${.CURDIR}; \ - ${MAKE} -f Makefile.inc1 \ + PATH="${TMPPATH}" ${MAKE} -f Makefile.inc1 \ DESTDIR=${SSTAGEDIR} \ PKG_VERSION=${PKG_VERSION} \ SOURCE_DATE_EPOCH=${SOURCE_DATE_EPOCH} \ @@ -2206,7 +2206,7 @@ create-source-src-package: _pkgbootstrap .PHONY ( echo "@override_prefix /usr/src" ; \ ${GIT_CMD} ls-files --recurse-submodules ":!:sys/" ) \ > ${SSTAGEDIR}/src.plist - ${SRCDIR}/release/packages/generate-ucl.lua \ + flua ${SRCDIR}/release/packages/generate-ucl.lua \ PKGNAME "src" \ PKGGENNAME "src" \ VERSION "${PKG_VERSION}" \ @@ -2232,7 +2232,7 @@ create-source-src-sys-package: _pkgbootstrap .PHONY ( echo "@override_prefix /usr/src" ; \ ${GIT_CMD} ls-files --recurse-submodules "sys/" ) \ > ${SSTAGEDIR}/src-sys.plist - ${SRCDIR}/release/packages/generate-ucl.lua \ + flua ${SRCDIR}/release/packages/generate-ucl.lua \ PKGNAME "src-sys" \ PKGGENNAME "src-sys" \ VERSION "${PKG_VERSION}" \ @@ -2264,7 +2264,8 @@ create-world-packages: _pkgbootstrap .PHONY echo "_PKGS+= $${pkgname}" ; \ done > ${WSTAGEDIR}/packages.mk ${_+_}@cd ${.CURDIR}; \ - ${MAKE} -f Makefile.inc1 create-world-packages-jobs \ + PATH="${TMPPATH}" ${MAKE} -f Makefile.inc1 \ + create-world-packages-jobs \ SOURCE_DATE_EPOCH=${SOURCE_DATE_EPOCH} \ .MAKE.JOB.PREFIX= @@ -2324,7 +2325,7 @@ _debug=-dbg create-dtb-package: .PHONY @if [ -f ${KSTAGEDIR}/${DISTDIR}/dtb.plist ]; then \ - ${SRCDIR}/release/packages/generate-ucl.lua \ + flua ${SRCDIR}/release/packages/generate-ucl.lua \ PKGNAME "dtb" \ PKGGENNAME "dtb" \ VERSION "${PKG_VERSION}" \ @@ -2358,7 +2359,7 @@ create-kernel-packages-flavor${flavor:C,^""$,${_default_flavor},}: _pkgbootstrap ${METALOG_SORT_CMD} ${KSTAGEDIR}/kernel.meta | \ awk -f ${SRCDIR}/release/scripts/mtree-to-plist.awk \ -v kernel=yes -v _kernconf=${INSTALLKERNEL} ; \ - ${SRCDIR}/release/packages/generate-ucl.lua \ + flua ${SRCDIR}/release/packages/generate-ucl.lua \ PKGNAME "kernel-${INSTALLKERNEL:tl}${flavor}" \ PKGGENNAME "kernel" \ VERSION "${PKG_VERSION}" \ @@ -2400,7 +2401,7 @@ create-kernel-packages-extra-flavor${flavor:C,^""$,${_default_flavor},}-${_kerne ${METALOG_SORT_CMD} ${KSTAGEDIR}/kernel.${_kernel}.meta | \ awk -f ${SRCDIR}/release/scripts/mtree-to-plist.awk \ -v kernel=yes -v _kernconf=${_kernel} ; \ - ${SRCDIR}/release/packages/generate-ucl.lua \ + flua ${SRCDIR}/release/packages/generate-ucl.lua \ PKGNAME "kernel-${_kernel:tl}${flavor}" \ PKGGENNAME "kernel" \ FORCEINCLUDE "kernel${flavor}" \ diff --git a/release/packages/create-sets.sh b/release/packages/create-sets.sh index 3780e8ee46c6..46dfd543619c 100755 --- a/release/packages/create-sets.sh +++ b/release/packages/create-sets.sh @@ -57,7 +57,7 @@ for set in $(echo $SETS | tr ' ' '\n' | sort | uniq); do setvar="$(echo "$set" | tr - _)" eval deps=\"\$PKGS_${setvar}\" - "${srcdir}/release/packages/generate-set-ucl.lua" \ + flua "${srcdir}/release/packages/generate-set-ucl.lua" \ "${srcdir}/release/packages/set-template.ucl" \ PKGNAME "$set" \ SET_DEPENDS "$deps" \ diff --git a/release/packages/generate-ucl.sh b/release/packages/generate-ucl.sh index a08840d5b321..de6bc7a70eb3 100755 --- a/release/packages/generate-ucl.sh +++ b/release/packages/generate-ucl.sh @@ -82,7 +82,7 @@ main() { fi cap_arg="$( make -f ${srctree}/share/mk/bsd.endian.mk -VCAP_MKDB_ENDIAN )" - ${srctree}/release/packages/generate-ucl.lua \ + flua ${srctree}/release/packages/generate-ucl.lua \ VERSION "${PKG_VERSION}" \ PKGNAME "${origname}" \ PKGGENNAME "${outname}" \ From nobody Tue Apr 7 11:04:33 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fqjyB29Bnz6Y2MZ for ; Tue, 07 Apr 2026 11:04: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fqjy93t5Dz4Jty for ; Tue, 07 Apr 2026 11:04:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775559873; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xWf8rLga5Ceg2pUHdsaOqmRAY5qPi6Vs01K+YnHqa2g=; b=OasaH4n34LERnnkZsQ5svXLwXbN7aisxy++2zTjOz98RSZl+lluWgQR/RvQ5w3fRZmJDHA H7/bJJp4MnEm3G1iJs2b4ycn0MC8ahc/9pBhRBAusrxIKAUhqY1bwnQWi2WZQ/u05A5OJa RXBKjdr2+n3LLp5WdrO4tv8zfzlntA5fIuIppBKpg9zhzMA8boKQroRprvnhFGv+4QnEwi a+tZ6FI46gfA2R1FYTFP3j8QMk91kOFhPiW1I6N8jpXKFCakE8+FDkV/eLOcnx2xfy+Iqt fJFtuhNnhj4V71z1kT8yMgMC9cK2Xu2ljTP/0lL8+mNlitqXgqPtSJ7iPQOH6Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775559873; a=rsa-sha256; cv=none; b=A9WAN1YoQYQfj6hitEyphgmkPoh4RoOuZwXqD6j8v0v7RGFPH66bawaXbQxpngeAIACWmO szbmiU6uT+8EfnisPVzkCX2LdjVOOstQuxhfOqwXutwEespa+WRWHn8cRmkkxJEzaApqci ebgAdM50Jq2k6iH1v9B65gPQVW/98y9Ay6wr38CXS2LpUMU9oDnxLUFxKj/n4EOQx/q2nO WKtGfpnGQYEfJD0dQJfVymQjmzvpGDViD4t5yF169o685+HXPck/6ChQArsLZb0u5+GPX1 0ahWxz5UlnTI9cI4tK8MigXghAf1k7tZMMekBPdPQ5/KbR4wjHyniBbVM+Kbzg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775559873; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xWf8rLga5Ceg2pUHdsaOqmRAY5qPi6Vs01K+YnHqa2g=; b=bSx27Hkp+xi2fZZ1vRZxGBbhbtjP84+WjO6XWWJ7pkyjqdViezsyUvCyy2btM5RMAYlXp8 S5qGS5B9Cxx0F5txHmYXb6ZucBDsSqqSSrSJfuT6+zF/HIxOlB5+CUqVY6/K/Ol/gNy/Y+ HxIEvu5C5ynuOhv8iViS5Aye2CRKATbOBWk6hfKCfGwPfHhJiGEI/qEapGQczU80Ma4oo/ wILUmuO6VbAtkJjtj9WKImxnBNEFwC0jv92Xk69U1mtU0o/VUaXj9014tZZBLuhJcg5+Fo XGAAHBWmAVbHtNV+4l9cPwocjiNL1UH9Ie0Vo8wTg/lkF0W7ORL1ce8pJ9251w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fqjy93QTNzcj0 for ; Tue, 07 Apr 2026 11:04:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1e7db by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 07 Apr 2026 11:04:33 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: 50de0bf50512 - main - flua: Always build as a bootstrap tool List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: 50de0bf50512aa98d18f21ac1347941396596944 Auto-Submitted: auto-generated Date: Tue, 07 Apr 2026 11:04:33 +0000 Message-Id: <69d4e4c1.1e7db.33fbe374@gitrepo.freebsd.org> The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=50de0bf50512aa98d18f21ac1347941396596944 commit 50de0bf50512aa98d18f21ac1347941396596944 Author: Lexi Winter AuthorDate: 2026-04-07 10:41:53 +0000 Commit: Lexi Winter CommitDate: 2026-04-07 10:41:53 +0000 flua: Always build as a bootstrap tool We want to use flua from the source tree (not the host) during package build, firstly to protect us from breaking changes in lua or libucl, and secondly to allow (in future) cross-building of packages from Linux or macOS. Since we don't know if the user will be building packages during the bootstrap phase, and because flua is fairly small and generally useful, build it as a bootstrap tool unconditionally. MFC after: 2 weeks Reviewed by: kevans, emaste Sponsored by: https://www.patreon.com/bsdivy Differential Revision: https://reviews.freebsd.org/D56270 --- Makefile.inc1 | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index 92e01389b4cd..a976daabbaef 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -2614,17 +2614,11 @@ _bt_libkldelf_depend=${_bt}-lib/libkldelf _kldxref= usr.sbin/kldxref ${_bt}-usr.sbin/kldxref: ${_bt_libelf_depend} ${_bt_libkldelf_depend} -# flua is required to regenerate syscall files. It first appeared during the -# 13.0-CURRENT cycle, thus needs to be built on -older releases and stable -# branches. -.if ${BOOTSTRAPPING} < 1300059 +# flua is required to regenerate syscall files, and for the pkgbase build. +# To protect us from changes in newer versions of flua or lua libraries +# that might be installed on the host, always bootstrap it. ${_bt}-libexec/flua: ${_bt}-lib/liblua -_flua= lib/liblua libexec/flua -.if ${BOOTSTRAPPING} == 0 -_flua+= lib/libmd lib/libucl lib/libyaml ${_bt}-libexec/flua: ${_bt}-lib/libmd ${_bt}-lib/libucl ${_bt}-lib/libyaml -.endif # BOOTSTRAPPING == 0 -.endif # r245440 mtree -N support added # r313404 requires sha384.h for libnetbsd, added to libmd in r292782 @@ -2911,7 +2905,11 @@ bootstrap-tools: ${_bt}-links .PHONY ${_elftoolchain_libs} \ ${_libkldelf} \ ${_kldxref} \ + lib/liblua \ + lib/libmd \ lib/libopenbsd \ + lib/libucl \ + lib/libyaml \ usr.bin/mandoc \ usr.bin/rpcgen \ ${_yacc} \ @@ -2921,7 +2919,7 @@ bootstrap-tools: ${_bt}-links .PHONY usr.bin/xinstall \ ${_gensnmptree} \ usr.sbin/config \ - ${_flua} \ + libexec/flua \ ${_crunchide} \ ${_crunchgen} \ ${_etdump} \ From nobody Tue Apr 7 11:05:44 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fqjzf0w1lz6Y2cN for ; Tue, 07 Apr 2026 11:05: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fqjzd5yRVz4KTV for ; Tue, 07 Apr 2026 11:05:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775559949; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+NqEiW43VSci+n3xpLC/boeyE4XjZtQH/jCYEX+Fa1Y=; b=T52eothvanPAfJ1NRtulEUKKCQbOq2dSnlemucQuciFwUWTIa4gf3HdFvNaUyfJESLjjuj DSz5dppPhkelidjKaLUSB4nfLcAaLH32TeVUMeMoAGxRxZReWRiPY4AK28mprpiQuxhF4s qHWbAwj5VbmrLTQiAzZmHzdkxzD2/6XFHdvSf9ss3KgStVADLNPaDYl9uWyeTtBprGX4Yr E7qONFaF1fhwQl2I5iVIdaXbEEShMZ8/kaPgv1MmwdsErLBpQ53vyTTFhD6lmmP3vj9U+N hJcMQkhiU6sdJSR/whvOCvKa/S2mNLN7ZVrmiSn/Dd5Ooe0ivFHZjjRpZuN7ag== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775559949; a=rsa-sha256; cv=none; b=A5DElkbBR063szJ9KjbPAhpbzIKKOB5zW2T2HxkSIPuiPwYV4yebjBqQ/sbmo5ohZxJpbn NvV2XZOz3/KFDaKvW0rtTpwpGNghukBS0H+KdKigLFxJKTQh4aMX+2f6MyQd8NQWRBgff8 XXhBgclQ2hf4brYFj93rD61sjNcUV5oetkaf+5q2TEtJOjiiNozqohoGVRXBG08nr3BQWE V93LBSSxXH2eFlJ3PFuqpyTCHhl8SIsLOvWmu9atl/BCfG98lk4b/muKXazMi/2vFJComg yooi+mmI3YZlvwJ/dzv8OclOc5Im7gcNHY5+pthqy4EdREyyIeLRz1fhDtaqcA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775559949; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+NqEiW43VSci+n3xpLC/boeyE4XjZtQH/jCYEX+Fa1Y=; b=yFi+oVgAkfSAbyE0DhajX7ZJ4WT3cyLIYz0YAyRNDCIt6BPwEsq9hTJPfRX93iGXOTr7wE MMcw0bjPNwus6Q8+Rak/4StJxP+UnIOwi6542zIYzfLXDORBJTybLnmUjRJoSroX8Ha75J avt8bMfyw781EqH6kdHQvlDNsG32FiV8l3ve+r3Uj7mcXLzjnDub6B86vfOPteytctYwou wQ6d0vCmGplc+Lg8thkQEqXYigFNqLTRdvyNrNr/4sZbxFY5+2CGKxfodjKKot4zhX+D/h oa3GnL+nXsDM/bCtlsJfmtJ5iyuuzNpl8ASWD1zFcuSnx1uz0ZSUyOFasdw4KQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fqjzd5GwrzdRf for ; Tue, 07 Apr 2026 11:05:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 20581 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 07 Apr 2026 11:05:44 +0000 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=B8rg?=rav Subject: git: a09d06bc5bff - main - libc: Add missing MLINK for stravis(3) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a09d06bc5bff64baab76220a66c3501b89899134 Auto-Submitted: auto-generated Date: Tue, 07 Apr 2026 11:05:44 +0000 Message-Id: <69d4e508.20581.736b722d@gitrepo.freebsd.org> The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=a09d06bc5bff64baab76220a66c3501b89899134 commit a09d06bc5bff64baab76220a66c3501b89899134 Author: Dag-Erling Smørgrav AuthorDate: 2026-04-07 11:04:37 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-04-07 11:04:49 +0000 libc: Add missing MLINK for stravis(3) MFC after: 1 week Fixes: 8dfeba04eb36 ("Update to a June 8th snapshot of (un)vis form NetBSD.") Reviewed by: ziaee Differential Revision: https://reviews.freebsd.org/D56260 --- lib/libc/gen/Makefile.inc | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/libc/gen/Makefile.inc b/lib/libc/gen/Makefile.inc index c36c4e10f2dc..c31f789fd1d1 100644 --- a/lib/libc/gen/Makefile.inc +++ b/lib/libc/gen/Makefile.inc @@ -562,6 +562,7 @@ MLINKS+=unvis.3 strunvis.3 \ unvis.3 strunvisx.3 MLINKS+=vis.3 nvis.3 \ vis.3 snvis.3 \ + vis.3 stravis.3 \ vis.3 strenvisx.3 \ vis.3 strnunvis.3 \ vis.3 strnunvisx.3 \ From nobody Tue Apr 7 13:16:47 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fqmtm1rMGz6YF1y for ; Tue, 07 Apr 2026 13:16:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fqmtl6fVvz3QxS for ; Tue, 07 Apr 2026 13:16:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775567807; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ashs5lFhyr0Pym+rhlipvxvbdPekYL62D7WkO6ab56w=; b=cjrMhE9rvpNkMpQWBfHNHqCp15Mps244e35RSGgTgPLNr9CBrghhMcCtd1urYm1L7dTEms CIongGG4agD5bt09pos/WEU1lDySSS6MOpiIL8N6h4cKy00/LcNFUOtgYsVrg7cbhgNSXR t96ZrZoUwB5J7rNOqzxF3LJevsGgawPZ389bB4+q67jxGqYgHFiyxKa3jxsAfFmLbVPJ0Q soTU4dANiADMcd6BcgSQcLk1ybHkNPfdstI7odCTco5cXU15eeXP01VeQLYpwlgznLXDzu ZxSBYj2faj4Qp3DhuwulgNRlP/ZEcniyZgJql9d0sAFwhRt1F5S1PXVTj+cUyA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775567807; a=rsa-sha256; cv=none; b=vcblVzr+HiqaKX7J0owDWvg1+RJNrgw+Djq/aGfUlWK3JnfwlmWaGucYPuToT8hDY95z65 VQP+5R2u5ZTw2E7NjO1oa802NJ7qbJ9M1q96cQ2+1NYAgq8XFfn3gTXKM0xoglhXl/EBtF XErqHuJFNoplYRWDTukuBWHsLCg+fXXOyv3DSSe9a/ipXi3q711ZVMcit5ZU/aBNumIGAq Js0vk89ptfE/kO8YbBZmYDmHidp8K2v57Sr3Vkhnu1h5t9rmTi/eUn7AccPwRMWhBgRjAK EIFnPF6xx7fMaOP99HkhCHhF8/TjpHzmNbXfyZIA6c0R9i43Se9G4/lw5Nev9Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775567807; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ashs5lFhyr0Pym+rhlipvxvbdPekYL62D7WkO6ab56w=; b=DYyuUuatEJ/U/A7mYYACucZkWFoyisrNkSFUuDHwLujFi41e5EjNDRWyL5zvsOuseEYBr6 4gCKm+s7lolJYWR/Zen9DIJtlTX72AjXrIjrFwqC8Qv37qqsQ5YU7iygOSWoC778qaWWgi ttzp5BTa/tASKx4pEZ+K9bVIFzVotYPhhvmfrjtBOWyc127nLeP03yKNz+88GbSRTeO5U5 cXDah7WvZsSCASWS+1m5sL2JGCrjZyj2+0tL1XpAxYHnbSA7u5Klvn0kBnSJNl4lnRXUFq rXrQjNJ2yywz1shM7g1pmr6BAfh4z8K3UuqPzydLwUuzGiKf/p521FBlyuOOMg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fqmtl5FXRzhKH for ; Tue, 07 Apr 2026 13:16:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 346cf by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 07 Apr 2026 13:16:47 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: febb0da5bf4b - main - libfido2: Update to 1.16.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: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: febb0da5bf4bc99828ebede7abcb039514ac367a Auto-Submitted: auto-generated Date: Tue, 07 Apr 2026 13:16:47 +0000 Message-Id: <69d503bf.346cf.6702261d@gitrepo.freebsd.org> The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=febb0da5bf4bc99828ebede7abcb039514ac367a commit febb0da5bf4bc99828ebede7abcb039514ac367a Merge: a09d06bc5bff fadebab18d4b Author: Ed Maste AuthorDate: 2026-04-07 13:14:41 +0000 Commit: Ed Maste CommitDate: 2026-04-07 13:14:41 +0000 libfido2: Update to 1.16.0 Sponsored by: The FreeBSD Foundation contrib/libfido2/.actions/build-bsd | 6 +- .../.actions/build-linux-i686-w64-mingw32-gcc | 6 +- .../libfido2/.actions/build-linux-openssl3-clang | 6 +- contrib/libfido2/.actions/build-linux-openssl3-gcc | 6 +- .../build-linux-openssl3-i686-w64-mingw32-gcc | 10 +- contrib/libfido2/.actions/build-osx-clang | 3 +- contrib/libfido2/.actions/fuzz-linux | 13 +- contrib/libfido2/.actions/run-shellcheck | 25 + .../libfido2/.github/workflows/alpine_builds.yml | 4 +- contrib/libfido2/.github/workflows/bsd_builds.yml | 9 +- contrib/libfido2/.github/workflows/cifuzz_oss.yml | 6 +- .../libfido2/.github/workflows/codeql-analysis.yml | 8 +- .../libfido2/.github/workflows/linux_builds.yml | 15 +- contrib/libfido2/.github/workflows/linux_fuzz.yml | 6 +- .../libfido2/.github/workflows/macos_builds.yml | 4 +- contrib/libfido2/.github/workflows/openssl3.yml | 14 +- contrib/libfido2/.github/workflows/shellcheck.yml | 27 + contrib/libfido2/CMakeLists.txt | 12 +- contrib/libfido2/LICENSE | 2 +- contrib/libfido2/NEWS | 28 +- contrib/libfido2/README.adoc | 6 +- contrib/libfido2/SECURITY.md | 2 +- contrib/libfido2/examples/README.adoc | 3 +- contrib/libfido2/examples/cred.c | 29 +- contrib/libfido2/fuzz/CMakeLists.txt | 13 +- contrib/libfido2/fuzz/Dockerfile | 2 +- contrib/libfido2/fuzz/Makefile | 6 +- contrib/libfido2/fuzz/export.gnu | 6 + contrib/libfido2/fuzz/functions.txt | 1096 ++++++++++---------- contrib/libfido2/fuzz/fuzz_attobj.c | 333 ++++++ contrib/libfido2/fuzz/fuzz_cred.c | 13 +- contrib/libfido2/fuzz/libfuzzer.c | 1 + contrib/libfido2/fuzz/mutator_aux.c | 6 + contrib/libfido2/fuzz/report.tgz | Bin 361946 -> 372600 bytes contrib/libfido2/fuzz/summary.txt | 94 +- contrib/libfido2/man/CMakeLists.txt | 8 +- contrib/libfido2/man/check.sh | 1 + contrib/libfido2/man/fido2-assert.1 | 6 +- contrib/libfido2/man/fido2-cred.1 | 14 +- contrib/libfido2/man/fido_cred_new.3 | 54 +- contrib/libfido2/man/fido_cred_set_authdata.3 | 48 +- contrib/libfido2/regress/CMakeLists.txt | 31 +- contrib/libfido2/regress/cred.c | 1068 +++++++++++++++++-- contrib/libfido2/regress/dev.c | 234 +---- contrib/libfido2/regress/extern.h | 17 + contrib/libfido2/regress/mock.c | 182 ++++ contrib/libfido2/src/CMakeLists.txt | 8 +- contrib/libfido2/src/aes256.c | 6 +- contrib/libfido2/src/bio.c | 11 +- contrib/libfido2/src/cbor.c | 105 +- contrib/libfido2/src/cred.c | 143 ++- contrib/libfido2/src/credman.c | 11 +- contrib/libfido2/src/dev.c | 11 +- contrib/libfido2/src/export.gnu | 6 + contrib/libfido2/src/export.llvm | 6 + contrib/libfido2/src/export.msvc | 6 + contrib/libfido2/src/extern.h | 24 +- contrib/libfido2/src/fido.h | 8 +- contrib/libfido2/src/fido/param.h | 9 +- contrib/libfido2/src/fido/types.h | 20 +- contrib/libfido2/src/hid_linux.c | 36 +- contrib/libfido2/src/hid_netbsd.c | 6 +- contrib/libfido2/src/hid_osx.c | 40 +- contrib/libfido2/src/nfc.c | 98 +- contrib/libfido2/src/pin.c | 2 + contrib/libfido2/src/random.c | 12 +- contrib/libfido2/src/rs1.c | 53 +- contrib/libfido2/src/rs256.c | 53 +- contrib/libfido2/src/u2f.c | 1 + contrib/libfido2/src/winhello.c | 58 +- contrib/libfido2/tools/cred_make.c | 14 +- contrib/libfido2/tools/credman.c | 7 +- contrib/libfido2/tools/fido2-cred.c | 4 +- contrib/libfido2/tools/fido2-unprot.sh | 39 +- contrib/libfido2/tools/include_check.sh | 17 +- contrib/libfido2/tools/test.sh | 145 +-- contrib/libfido2/tools/token.c | 9 + contrib/libfido2/udev/check.sh | 4 +- contrib/libfido2/windows/build.ps1 | 41 +- contrib/libfido2/windows/const.ps1 | 17 +- contrib/libfido2/windows/cygwin.ps1 | 11 +- contrib/libfido2/windows/release.ps1 | 22 +- 82 files changed, 3140 insertions(+), 1406 deletions(-) diff --cc contrib/libfido2/.actions/run-shellcheck index 000000000000,063a5e0d1f1a..063a5e0d1f1a mode 000000,100755..100755 --- a/contrib/libfido2/.actions/run-shellcheck +++ b/contrib/libfido2/.actions/run-shellcheck diff --cc contrib/libfido2/.github/workflows/shellcheck.yml index 000000000000,cdda760ae2b6..cdda760ae2b6 mode 000000,100644..100644 --- a/contrib/libfido2/.github/workflows/shellcheck.yml +++ b/contrib/libfido2/.github/workflows/shellcheck.yml diff --cc contrib/libfido2/fuzz/fuzz_attobj.c index 000000000000,4fddc0f461a9..4fddc0f461a9 mode 000000,100644..100644 --- a/contrib/libfido2/fuzz/fuzz_attobj.c +++ b/contrib/libfido2/fuzz/fuzz_attobj.c diff --cc contrib/libfido2/fuzz/report.tgz index 9c01263576f1,7f89eb355310..7f89eb355310 Binary files differ diff --cc contrib/libfido2/regress/extern.h index 000000000000,8bab9d4ae667..8bab9d4ae667 mode 000000,100644..100644 --- a/contrib/libfido2/regress/extern.h +++ b/contrib/libfido2/regress/extern.h diff --cc contrib/libfido2/regress/mock.c index 000000000000,cfaeffc9a3d9..cfaeffc9a3d9 mode 000000,100644..100644 --- a/contrib/libfido2/regress/mock.c +++ b/contrib/libfido2/regress/mock.c From nobody Tue Apr 7 13:54:44 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fqnkX5pfFz6YJRV for ; Tue, 07 Apr 2026 13:54: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fqnkX3Hlqz3W7w for ; Tue, 07 Apr 2026 13:54:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775570084; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=R+4ZkBphbtblkUtZ7AU0uOeVFwpolXUKmglvAbSiMOg=; b=Aoc8niIZSntZRdaGNc/eM69utpOawrRSSk5+ijYWhP3y1UExPl6s4N/3lnsfhqgvKrg07k 7l6/mNVU0Dp3vK/e+1AMW7WUpB+Khh/h1OC1yeCCNspahBpgmL3rji6503uwwm+MtSK5yd FCafNkNurfFarqAhmONJGJH5pFDpLB1aWbtyA9uUQMleGkRoT7iSKRbCVOq23wYwo2VGZ4 aZxZ44kR0bjM/a0g0w2Bz30hPxkFfsW1e3gVSecQ70BSye5vWBl+Z/Q7rJ/PHHzkoqLXIV S59b2mAyRXUHATquChMcHp88aQ2kjvsX7DMcVoBfmH+N3FWATC1iQT2kOv+x8Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775570084; a=rsa-sha256; cv=none; b=wn5eo05QHMWW8asVSEb+AYRHsgdKloSEfSVlqOGRT5b6fESaPsRG72Qgk3l6IABPa0WJAf s0N3PwBy6hfALLD/zMY/bMfzhQ0G4P+BDhXbHZ2dhYrel+zIeBgJc8Tek8tYlXHxMOJyLu NmEUXlf/AjOlkLJgfBaMCDrhfC+QpUGaEMItpeSln484OTZk0qb3kaRe74WnH5PlTcYaOf a7+aTzycrPtwMmtrN/njJlDfK6vmTFMaVyeh8fOuzP2fjWxxAjMYwJR3LlqByx8rCkzqkX zB2qMVbVqLJMz2Pbru8XvlpGNuMabJ1l7MD2FJeeqTrRQRbtGOP1UrnkJjwQJw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775570084; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=R+4ZkBphbtblkUtZ7AU0uOeVFwpolXUKmglvAbSiMOg=; b=j8ZyYPld9599cbUEeIudSZF1vpx90ozTXveg3yXXpXjYtEO7DQcVoWIfB0g98ktASga53F d8cOlbac6HzkqupJ2B32UBpyM2SOV2Fta3oiul+rx0gfuXjZt62a0F1ItgQ6wCW/1kxSrY +4hZNAkb2e9M37egM2KFEvt2WbIkIMGO8ByclePUfO6HPBEzanJSs0IQkM+unSZgeLKxmq mjxJPBvIgMXbuiuk38awJDGYcmvGEWy1mrrqUEaQltw8rcguLN7dps+1bkW/0bMsnz9L5j dVDfdPriMncspNVd39lPfxeztyY7tg249kxtsAbkfiZd0Sh3Yi2ABODkMlzk3A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fqnkX260QzjdY for ; Tue, 07 Apr 2026 13:54:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3aa01 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 07 Apr 2026 13:54:44 +0000 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=B8rg?=rav Subject: git: 8244dd326265 - main - tunefs: Better fix for arm64 alignment issues List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: 8244dd326265867293b2286efc3d571f06ef0dab Auto-Submitted: auto-generated Date: Tue, 07 Apr 2026 13:54:44 +0000 Message-Id: <69d50ca4.3aa01.23788f2e@gitrepo.freebsd.org> The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=8244dd326265867293b2286efc3d571f06ef0dab commit 8244dd326265867293b2286efc3d571f06ef0dab Author: Dag-Erling Smørgrav AuthorDate: 2026-04-07 13:54:28 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-04-07 13:54:28 +0000 tunefs: Better fix for arm64 alignment issues Rather than trust that the compiler will lay out the stack frame the way we expect it to, use a union to force the correct alignment. MFC after: 1 week Fixes: 616f47f176c3 ("tunefs: Fix alignment warning on arm64") Reviewed by: kevans, mckusick Differential Revision: https://reviews.freebsd.org/D56245 --- sbin/tunefs/tunefs.c | 64 ++++++++++++++++++++++++++++++---------------------- 1 file changed, 37 insertions(+), 27 deletions(-) diff --git a/sbin/tunefs/tunefs.c b/sbin/tunefs/tunefs.c index 56f343a5a4db..56160dafce28 100644 --- a/sbin/tunefs/tunefs.c +++ b/sbin/tunefs/tunefs.c @@ -44,6 +44,7 @@ #include #include +#include #include #include #include @@ -51,6 +52,7 @@ #include #include #include +#include #include #include #include @@ -72,6 +74,11 @@ static int journal_alloc(int64_t size); static void journal_clear(void); static void sbdirty(void); +typedef union { + char buf[MAXBSIZE]; + struct direct dir; +} dirblock; + int main(int argc, char *argv[]) { @@ -631,16 +638,17 @@ journal_balloc(void) static ino_t dir_search(ufs2_daddr_t blk, int bytes) { - char block[MAXBSIZE]; + dirblock block; struct direct *dp; int off; - if (bread(&disk, fsbtodb(&sblock, blk), block, bytes) <= 0) { + if (bread(&disk, fsbtodb(&sblock, blk), &block, bytes) <= 0) { warn("Failed to read dir block"); return (-1); } for (off = 0; off < bytes; off += dp->d_reclen) { - dp = (struct direct *)(uintptr_t)&block[off]; + assert(off % alignof(struct direct) == 0); + dp = (struct direct *)(uintptr_t)(block.buf + off); if (dp->d_reclen == 0) break; if (dp->d_ino == 0) @@ -700,12 +708,13 @@ journal_findfile(void) } static void -dir_clear_block(const char *block, off_t off) +dir_clear_block(const dirblock *block, off_t off) { struct direct *dp; for (; off < sblock.fs_bsize; off += DIRBLKSIZ) { - dp = (struct direct *)(uintptr_t)&block[off]; + assert(off % alignof(struct direct) == 0); + dp = (struct direct *)(uintptr_t)(block + off); dp->d_ino = 0; dp->d_reclen = DIRBLKSIZ; dp->d_type = DT_UNKNOWN; @@ -721,21 +730,23 @@ static int dir_insert(ufs2_daddr_t blk, off_t off, ino_t ino) { struct direct *dp; - char block[MAXBSIZE]; + dirblock block; - if (bread(&disk, fsbtodb(&sblock, blk), block, sblock.fs_bsize) <= 0) { + assert((size_t)sblock.fs_bsize <= sizeof(block)); + if (bread(&disk, fsbtodb(&sblock, blk), &block, sblock.fs_bsize) <= 0) { warn("Failed to read dir block"); return (-1); } - bzero(&block[off], sblock.fs_bsize - off); - dp = (struct direct *)(uintptr_t)&block[off]; + assert(off % alignof(struct direct) == 0); + bzero(block.buf + off, sblock.fs_bsize - off); + dp = (struct direct *)(uintptr_t)(block.buf + off); dp->d_ino = ino; dp->d_reclen = DIRBLKSIZ; dp->d_type = DT_REG; dp->d_namlen = strlen(SUJ_FILE); bcopy(SUJ_FILE, &dp->d_name, strlen(SUJ_FILE)); - dir_clear_block(block, off + DIRBLKSIZ); - if (bwrite(&disk, fsbtodb(&sblock, blk), block, sblock.fs_bsize) <= 0) { + dir_clear_block(&block, off + DIRBLKSIZ); + if (bwrite(&disk, fsbtodb(&sblock, blk), &block, sblock.fs_bsize) <= 0) { warn("Failed to write dir block"); return (-1); } @@ -749,15 +760,16 @@ dir_insert(ufs2_daddr_t blk, off_t off, ino_t ino) static int dir_extend(ufs2_daddr_t blk, ufs2_daddr_t nblk, off_t size, ino_t ino) { - char block[MAXBSIZE]; + dirblock block; - if (bread(&disk, fsbtodb(&sblock, blk), block, + assert((size_t)sblock.fs_bsize <= sizeof(block)); + if (bread(&disk, fsbtodb(&sblock, blk), &block, roundup(size, sblock.fs_fsize)) <= 0) { warn("Failed to read dir block"); return (-1); } - dir_clear_block(block, size); - if (bwrite(&disk, fsbtodb(&sblock, nblk), block, sblock.fs_bsize) + dir_clear_block(&block, size); + if (bwrite(&disk, fsbtodb(&sblock, nblk), &block, sblock.fs_bsize) <= 0) { warn("Failed to write dir block"); return (-1); @@ -846,19 +858,17 @@ journal_insertfile(ino_t ino) static int indir_fill(ufs2_daddr_t blk, int level, int *resid) { - char indirbuf[MAXBSIZE]; - ufs1_daddr_t *bap1; - ufs2_daddr_t *bap2; + union { + char buf[MAXBSIZE]; + ufs1_daddr_t ufs1; + ufs2_daddr_t ufs2; + } indir = { 0 }; + ufs1_daddr_t *bap1 = &indir.ufs1; + ufs2_daddr_t *bap2 = &indir.ufs2; ufs2_daddr_t nblk; - int ncnt; - int cnt; - int i; + int cnt = 0, ncnt; - bzero(indirbuf, sizeof(indirbuf)); - bap1 = (ufs1_daddr_t *)(uintptr_t)indirbuf; - bap2 = (void *)bap1; - cnt = 0; - for (i = 0; i < NINDIR(&sblock) && *resid != 0; i++) { + for (int i = 0; i < NINDIR(&sblock) && *resid != 0; i++) { nblk = journal_balloc(); if (nblk <= 0) return (-1); @@ -875,7 +885,7 @@ indir_fill(ufs2_daddr_t blk, int level, int *resid) } else (*resid)--; } - if (bwrite(&disk, fsbtodb(&sblock, blk), indirbuf, + if (bwrite(&disk, fsbtodb(&sblock, blk), indir.buf, sblock.fs_bsize) <= 0) { warn("Failed to write indirect"); return (-1); From nobody Tue Apr 7 14:41:36 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fqpmc3rQpz6YMZn for ; Tue, 07 Apr 2026 14:41: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fqpmc3HBKz3fyP for ; Tue, 07 Apr 2026 14:41:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775572896; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jMg5oXww/o2whRoHDZMWS9acz9HHL1XygxIdZsk/Y0s=; b=hOOp91k7BOhW2YrxDjBiwP5LvjcnNrSrXmmtNq2DG+f2o+E/El9x4d35gWwRl2oZo7m4P3 6Olwhev29Bv4O3HFhsZj283Yc/q6DBH1a81UvbaOqfLiKJH9wdWpSyoT393LvwTtT6QkO1 f5cGN7RVy6WbFCLRVY9tVRNIMtj/mqilyrJagZg+pBKXjXu/t7Cbry5DbRlIFM+g5negOP MMjIQDr97YnUKuqOFx/k22j3P+RfQgh0JrsfIpgEmKN2wzEwuVltV+fEokCe3oSk7Z4ETP luLYhEB8crtpD0akmL4YlVEPu23Ql0Tfh5RGS3k8W8AwQjtVRuFYHUB1vACFxQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775572896; a=rsa-sha256; cv=none; b=ejy1n6aEHW3YfH6dWTuonuKuGEO31KV8xBuRCa2rJfu3ukXH+qciOWkBniTW+IvKEQ4mZk lT+VyTN9AVFsBAv8w/OEewOgKG+F5eTYednkxA2qP0W5CUUa+nVPkSPgG99L8Lz3M9/QYi GNmroInuY2MibvbPUu+pqDpzSKiTt61YL1riUELAFAB1z5SGVuWh8Sm15BdAgmz5w0zu7i +/LEtE2CGICd8plBF24XZmeX7WSUlloWyEQQ2n9ak8kQUj8A0WeoU1Y1VZSm26eUqO/bBd LWYQU3zFyBanz479Ogp/Pn7C4yBZ46C264y2o9tREv7WjGUngfH/X3uLzhslxA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775572896; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jMg5oXww/o2whRoHDZMWS9acz9HHL1XygxIdZsk/Y0s=; b=IxOcQr8H0AjTowxoJbPRrK5DlGPa8tlDGZUUtoDm7jk8zL87kzsOZp5Sf6XOPMG13nmGcN zjufeY92Xdn0DEX7nuaHYIsN+gVys6GysnqlkKm72YWqCgon7hJFUai9Yjm6L1TNPTQltS 1yC92F6jq+blHPZoMYR5atKcL1SbSJRlWAMlddXklil4FzRdh8lVLLi/unvXSyqmaGEtSO c8YJXBcX1pefA9exM95ZI7h+vAC7Gloqe44aUUUQthK7Dn1tNaESjfNjsWxaozuKHPs1Wl rhcEcJe+cjJF/gx+WwUjGxIrUpXR3XrVvjqA/zqj0n2ls2x6efhtq3OnN3rb6g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fqpmc2pWjzkgx for ; Tue, 07 Apr 2026 14:41:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3eba1 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 07 Apr 2026 14:41:36 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Bojan Novk=?utf-8?Q?ovi=C4=87?= Subject: git: cff675e83cdb - main - netstat: Add -F support for -g List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bnovkov X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cff675e83cdb6c9027e94df9d010439e42e27dee Auto-Submitted: auto-generated Date: Tue, 07 Apr 2026 14:41:36 +0000 Message-Id: <69d517a0.3eba1.376d3d7e@gitrepo.freebsd.org> The branch main has been updated by bnovkov: URL: https://cgit.FreeBSD.org/src/commit/?id=cff675e83cdb6c9027e94df9d010439e42e27dee commit cff675e83cdb6c9027e94df9d010439e42e27dee Author: Bojan Novković AuthorDate: 2026-03-26 09:39:10 +0000 Commit: Bojan Novković CommitDate: 2026-04-07 14:39:51 +0000 netstat: Add -F support for -g This change adds the ability to examine the contents of multicast routing tables for other FIBs without the need for executing `netstat` with `setfib(1)`. MFC after: 3 days Sponsored by: Klara, Inc. Sponsored by: Stormshield Differential Revision: https://reviews.freebsd.org/D56205 Reviewed by: glebius, markj, zlei --- usr.bin/netstat/main.c | 2 ++ usr.bin/netstat/netstat.1 | 13 ++++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/usr.bin/netstat/main.c b/usr.bin/netstat/main.c index d81e7c5e8307..0084426540f6 100644 --- a/usr.bin/netstat/main.c +++ b/usr.bin/netstat/main.c @@ -550,6 +550,8 @@ main(int argc, char *argv[]) if (gflag) { + if (fib != -1 && setfib(fib) < 0) + xo_errx(EX_DATAERR, "setfib: %s", strerror(errno)); xo_open_container("statistics"); xo_set_version(NETSTAT_XO_VERSION); if (sflag) { diff --git a/usr.bin/netstat/netstat.1 b/usr.bin/netstat/netstat.1 index a726c703752f..5c7f2336c06b 100644 --- a/usr.bin/netstat/netstat.1 +++ b/usr.bin/netstat/netstat.1 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd April 3, 2026 +.Dd April 7, 2026 .Dt NETSTAT 1 .Os .Sh NAME @@ -94,6 +94,7 @@ .Op Fl j Ar jail .Op Fl -libxo .Op Fl 46W +.Op Fl F Ar fibnum .Op Fl f Ar address_family .It Nm Fl gs .Op Fl j Ar jail @@ -738,6 +739,7 @@ See .Nm .Fl g .Op Fl 46W +.Op Fl F Ar fibnum .Op Fl f Ar address_family .Op Fl M Ar core .Op Fl N Ar system @@ -764,6 +766,15 @@ See .Sx GENERAL OPTIONS . .It Fl W Avoid truncating addresses even if this causes some fields to overflow. +.It Fl F +Display the routing table with the number +.Ar fibnum . +If the specified +.Ar fibnum +is -1 or +.Fl F +is not specified, +the default routing table is displayed. .It Fl f Ar protocol_family Filter by .Ar protocol_family . From nobody Tue Apr 7 15:26:23 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fqqmH4vRzz6YRMy for ; Tue, 07 Apr 2026 15:26: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fqqmH2zwRz3nLl for ; Tue, 07 Apr 2026 15:26:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775575583; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0Z7XJIn0nKl2x5oGBIm3rYTPA6CejG7M23kEP7+XzDo=; b=LsdCvf4VUmgxkp6rf2Oi2JP0GPrQla3HpeiBqDxNnaT4yoMBHdQ93nb8FfYfz4QiTX18Pl xYMiUrBKGLKNtS9U1j2YZtJIMpL5CRMLFK3mPx7zxQc5h+9KFn558EH7uBm7/Ekq+MpV7D tPqzpax+nMMrbB3ZSDXrdht6BBfAvgxf9B3QNFuGPKNLIJJdJ/kaxrzLqism0wCxhYjMKf HTiOJmNJZYNbkq85X3BURYJDHo/JlfrB1PMhxqEVvwC5czg5fp3wb/dWj0W6oaAA8uAwab MFbp/iALHTor9FEgM43BhTrQ7icoUMdxJjXKLezSQqH5PB/eVgIUR3yHYxW5wg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775575583; a=rsa-sha256; cv=none; b=KjShD3tWV9uAe1Rp+387QIuhbujbxuwX96Vz5HfgYLZIz2U22nbHZany4zvV07z/yH2105 TE+HHnz7rel6I/w1DAuSLu4YhQxA2c83iRxsjrfvwAFmRFpFRtjTua27NZwxghb0nSHPnr FjY58UEutYB7V5D1jqYNfwCKq4BbUFCE8E9M3RlZqFioRdRsOApVCUE9X6FYMwuBFgvJ++ J9lPBmZqJXIsbqvcz0YdRfA9hc2qsW5pLHs0qP/jSOeftXbeK1nk312TCc+1/aE2cGDiXN NHRJwM6VRx+4MmajmhMI981mFYbB4euj8Jy0Rm3bD66QuYiWhCh2bGZc+pmWYQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775575583; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0Z7XJIn0nKl2x5oGBIm3rYTPA6CejG7M23kEP7+XzDo=; b=tV5/FahgTplOsr42iFoL1t1lOqTxXxEkAivML50CBA6+ZHeqVTH+wotuBfeQSRPx0HkjDX /0uaTFsYVxdOrHajxemDFD3thaJwCGKCbsRMI6GnjJJVUzUOmNmuU6RpzUG7NU7HnTK8uc znTOx8mPBb67a5G4yA1dI5i+gU1D7DDfvmYNKAgZJEzm6Z3c0qC00rbI3BrXr5xtpyPk9x et4n0Luz3h8w26BHohEn+et0wXpzeCLCxXaY2kiC0lZTgz7oT0AlBtbP5ftcfIl/3gTY5u QlkSuDtDi/0I+ydiL+hyBbevP6SP8zPFnwnZGaq+PVbWT4ua67k28tgkSvluyw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fqqmH2K84zmBd for ; Tue, 07 Apr 2026 15:26:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 41ec0 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 07 Apr 2026 15:26:23 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 6642ba36f186 - main - pf tests: explicitly test zeroing counters within 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: 6642ba36f1860599a4c5562dc24f5dff080bbb42 Auto-Submitted: auto-generated Date: Tue, 07 Apr 2026 15:26:23 +0000 Message-Id: <69d5221f.41ec0.ba5f2e2@gitrepo.freebsd.org> The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=6642ba36f1860599a4c5562dc24f5dff080bbb42 commit 6642ba36f1860599a4c5562dc24f5dff080bbb42 Author: Kristof Provost AuthorDate: 2026-04-07 14:07:45 +0000 Commit: Kristof Provost CommitDate: 2026-04-07 14:58:32 +0000 pf tests: explicitly test zeroing counters within an anchor While here fix the match pattern in the existing test. Sponsored by: Rubicon Communications, LLC ("Netgate") --- tests/sys/netpfil/pf/anchor.sh | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/tests/sys/netpfil/pf/anchor.sh b/tests/sys/netpfil/pf/anchor.sh index f321c742788e..df4a1660d797 100644 --- a/tests/sys/netpfil/pf/anchor.sh +++ b/tests/sys/netpfil/pf/anchor.sh @@ -352,8 +352,20 @@ counter_body() # Generate traffic atf_check -s exit:0 -o ignore ping -c 1 192.0.2.1 atf_check -s exit:0 -e ignore \ - -o match:'[ Evaluations: 1 Packets: 2 Bytes: 168 States: 1 ]' \ + -o match:'\[ Evaluations: 1 Packets: 2 Bytes: 168 States: 1 \]' \ jexec alcatraz pfctl -sr -vv + + # Zero counters outside of the anchor + jexec alcatraz pfctl -sr -vv -z + atf_check -s exit:0 -e ignore \ + -o match:'\[ Evaluations: 1 Packets: 2 Bytes: 168 States: 1 \]' \ + jexec alcatraz pfctl -sr -vv -a "foo" + + # Zero the anchor's counters + jexec alcatraz pfctl -sr -vv -z -a "foo" + atf_check -s exit:0 -e ignore \ + -o match:'\[ Evaluations: 0 Packets: 0 Bytes: 0 States: 1 \]' \ + jexec alcatraz pfctl -sr -vv -a "foo" } counter_cleanup() From nobody Tue Apr 7 15:44:50 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fqr9Z64qzz6YSv9 for ; Tue, 07 Apr 2026 15:44: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fqr9Z5dh0z3q9K for ; Tue, 07 Apr 2026 15:44:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775576690; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GiSWAwhnB23g94RvqERICPyPTia3et8jUQMav63gHJM=; b=fU+4WrsFtNdm4fu9yHqcS6ts9OpKsq/0tMudgyqAc5jybz73lfywYEUMXSwQiVXfc3e6H6 aqvrDdvkqSLy3hukYMTMgKP5RKH/vsRTcpyGz7CRVH5xOCZb+SOhMT9g9Ci+1veVWDuCp5 EHC6cmzynG0ppjWwWInpjmZr7RTWnr8gThAJDiBqGSFLpBelDvkC5WyyLHMoCf8Ce4JJSz Ewi99IU10whez8hTcomVMTpIlqohMBq5atXJsxdS4xs5JaEskto1tTctmWPr6I0fpg2aWE YUzZayjjG3RMcyB8to1GLA4uL3SxAVkNh4MvfFAamLFi5cndUNdEQYxEzYAegA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775576690; a=rsa-sha256; cv=none; b=NWFBq7zH8zQEoW1wINfOBVd8G4DyjPPsqiIAKsF3cHGMZqpPcnSg6pQA7XohmhGgJdfNtl vBdI/pS6efP31Ieff0jBuZ2sXbKO9g5/IrLnPYkQQDNGPVK+L+1dyk9wxs9kfQCHldg5ml EzIsR+0hB075KvERs8GEZUpFgMBERKqZVMniTybrEsxpsjDZmLBngcLZzByUI76DLB5bwA 29njKWNzSOhYexM5tHggD9FBJiWpQop7lGqqU+uAgkD5KjQ0al2fIuCmpi4vqXfAHBc8Wj m29vwJ6tMJngC48EB+EO+zOaB/Au041B7pcb38b6mxFihlQ/RAoyr+pPRDhi6Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775576690; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GiSWAwhnB23g94RvqERICPyPTia3et8jUQMav63gHJM=; b=oa5NaJxAUZVr0aghv5D4EPkyvYeUyU44dU/FDzSz66HD8F8RYGdPPleQypfFEQM3cftUSS Faco+8yRkR00n20+cMvzB4x7jwYOADdQQmosi/lBqi6MQQz6X3gE6VDjTIlN6BWR7obcSn 4EGRxQSrn+q56s65xo7+Xa8jtSIFoNEnp1Zh1hF5Hln5VuIWekMSZ0gshzGxcVDElgFcjF YPyw9GOEdBcpcnAHnGjcK+VTej77KDovQW610rKfDotJOQZyf2UJgb/5o2YmF3E5TpITVx Hy2K7FRZoLr56x80nXq+k316oOehTHQ8CwBXPE4ZqQ05FgIhs0FzLK1IG8qPGA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fqr9Z4mxRzlnP for ; Tue, 07 Apr 2026 15:44:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 45017 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 07 Apr 2026 15:44:50 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: f369d4148b93 - main - sound: Mark some snd_fmt* functions as static List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: f369d4148b93410fe7f8ea989f66790403d23ce8 Auto-Submitted: auto-generated Date: Tue, 07 Apr 2026 15:44:50 +0000 Message-Id: <69d52672.45017.547f3c8e@gitrepo.freebsd.org> The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=f369d4148b93410fe7f8ea989f66790403d23ce8 commit f369d4148b93410fe7f8ea989f66790403d23ce8 Author: Christos Margiolis AuthorDate: 2026-04-07 15:44:15 +0000 Commit: Christos Margiolis CommitDate: 2026-04-07 15:44:15 +0000 sound: Mark some snd_fmt* functions as static Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D56238 --- sys/dev/sound/pcm/feeder.c | 6 +++--- sys/dev/sound/pcm/feeder.h | 3 --- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/sys/dev/sound/pcm/feeder.c b/sys/dev/sound/pcm/feeder.c index 2a7f54e5d30f..af6e367895a0 100644 --- a/sys/dev/sound/pcm/feeder.c +++ b/sys/dev/sound/pcm/feeder.c @@ -181,7 +181,7 @@ feeder_find(struct pcm_channel *c, u_int32_t type) #define score_val(s1) ((s1) & 0x3f00) #define score_cse(s1) ((s1) & 0x7f) -u_int32_t +static u_int32_t snd_fmtscore(u_int32_t fmt) { u_int32_t ret; @@ -257,13 +257,13 @@ snd_fmtbestfunc(u_int32_t fmt, u_int32_t *fmts, int cheq) return best; } -u_int32_t +static u_int32_t snd_fmtbestbit(u_int32_t fmt, u_int32_t *fmts) { return snd_fmtbestfunc(fmt, fmts, 0); } -u_int32_t +static u_int32_t snd_fmtbestchannel(u_int32_t fmt, u_int32_t *fmts) { return snd_fmtbestfunc(fmt, fmts, 1); diff --git a/sys/dev/sound/pcm/feeder.h b/sys/dev/sound/pcm/feeder.h index 834df463295d..e1e91d468455 100644 --- a/sys/dev/sound/pcm/feeder.h +++ b/sys/dev/sound/pcm/feeder.h @@ -63,9 +63,6 @@ struct pcm_feeder { void feeder_register(void *p); struct feeder_class *feeder_getclass(u_int32_t type); -u_int32_t snd_fmtscore(u_int32_t fmt); -u_int32_t snd_fmtbestbit(u_int32_t fmt, u_int32_t *fmts); -u_int32_t snd_fmtbestchannel(u_int32_t fmt, u_int32_t *fmts); u_int32_t snd_fmtbest(u_int32_t fmt, u_int32_t *fmts); int feeder_add(struct pcm_channel *c, struct feeder_class *fc, From nobody Tue Apr 7 15:44:51 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fqr9c0qGxz6YSS0 for ; Tue, 07 Apr 2026 15:44: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fqr9b61VJz3qFk for ; Tue, 07 Apr 2026 15:44:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775576691; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=M6PNfkO1xdiJAWRHw8NRg3SFlO/+dzJa/fQ+kMkUlOQ=; b=wZmDMn3I4k3T8h66jXqzTV7Ffdy5VFaF0Hq5XQmY7VbMKCgolYpETRivbJH5zezfUkshoM 2iXCFD4ruOnWbHvSGJ+H90wmDj5Zdgc4nBg9qiJp1WoTw/X1aXcLYpDhQyspdmL8Ge8vnT /meEQP1V3PLS8c4B+ZV8t/EHbNwgV82aG78/12auOnPtvfn/XlnTWDkqRFGrJYel5674OA u2sRHschttM3CFTHRsmau2w6eO2//2Paoc8UPWlw/eF+nn46yZn1/4KmK5gloDWsPCHKlc UYdFbNtLooj2uXK6Q19CyUOsyOwP2LwIjKCQNDhC33sK1H09xT1qdALOPhkEow== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775576691; a=rsa-sha256; cv=none; b=sP8r8zvgAnLfpGEMCouZEGITdcXKqZpwDHkjUHowYzAy/8FOumOb6vTPFxrzGByc3fzVln GKsw1Ad7LOtRY0DxIDPfulo8/8wGt0mMbRcDqdPrwih7l2FQPQ4W4yRvDmYJgJadxSSaoR LhxFvn8VbwP05vkHEEFiC1QJr7NJ4cam34Nr4Z6OoxAF0e4SYiegY9g+k25mYkjk7bSy1G TMgw9ewVEP9jZmuLFb6v7PJx3QLjqLWXNgbFSuOGfBy1pPf1hXkoQAS/SzhGHrGr14IvIi xeL/PAXaPdzi6e7yHzVagMUtVCTVYLapTf1sYAHqONcx269N3c0OcB3RXDvTbw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775576691; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=M6PNfkO1xdiJAWRHw8NRg3SFlO/+dzJa/fQ+kMkUlOQ=; b=lOYqC2LDLOleqGE9ljSVsessnNX9F5LJmN+6pPBlE84AzvQPMunp93s2Y2mayqwOV4nKpp MZVA0u7znWtaewyAgds7Vjh6LJ3VRkzGKvrqkmhYIheU3y6yxrqUlBo1EeRDbsoD/XWd2p cYvEmAaa7Xu3f6yuVfzxnFYrm/mcZiDrwLEoRhKL5oEA1oSTBDXrj+MbaIQ/7PT7SYAn70 X0x0w12X7p1y+E1dZOXqlCwxltksgoNA7GJoPOqTb+5rDiWhQCZM73Rfv73Sgt7hTm9rzD i52kW4oqMJWIxFcWO03LGRqcjx0hTqClBe5S3w7BUUvFRoLrbvfuJ2W7bJXWxA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fqr9b5WwQzmVT for ; Tue, 07 Apr 2026 15:44:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 4464e by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 07 Apr 2026 15:44:51 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: 2d84c8a3d3d6 - main - sound: Retire unused CHN_N_* defines List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2d84c8a3d3d673081c803f8aadc4eae8f6a221d8 Auto-Submitted: auto-generated Date: Tue, 07 Apr 2026 15:44:51 +0000 Message-Id: <69d52673.4464e.6b5c6e2e@gitrepo.freebsd.org> The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=2d84c8a3d3d673081c803f8aadc4eae8f6a221d8 commit 2d84c8a3d3d673081c803f8aadc4eae8f6a221d8 Author: Christos Margiolis AuthorDate: 2026-04-07 15:44:21 +0000 Commit: Christos Margiolis CommitDate: 2026-04-07 15:44:21 +0000 sound: Retire unused CHN_N_* defines These still haven't been implemented by the original author, and there doesn't seem to be much use for them anyway. Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D56239 --- sys/dev/sound/pcm/channel.c | 26 +------------------------- sys/dev/sound/pcm/channel.h | 7 ++----- 2 files changed, 3 insertions(+), 30 deletions(-) diff --git a/sys/dev/sound/pcm/channel.c b/sys/dev/sound/pcm/channel.c index 67bbfba28177..c9edce27c8cd 100644 --- a/sys/dev/sound/pcm/channel.c +++ b/sys/dev/sound/pcm/channel.c @@ -2351,31 +2351,7 @@ chn_notify(struct pcm_channel *c, u_int32_t flags) */ run = (CHN_STARTED(c)) ? 1 : 0; if (run) - flags &= CHN_N_VOLUME | CHN_N_TRIGGER; - - if (flags & CHN_N_RATE) { - /* - * XXX I'll make good use of this someday. - * However this is currently being superseded by - * the availability of CHN_F_VCHAN_DYNAMIC. - */ - } - - if (flags & CHN_N_FORMAT) { - /* - * XXX I'll make good use of this someday. - * However this is currently being superseded by - * the availability of CHN_F_VCHAN_DYNAMIC. - */ - } - - if (flags & CHN_N_VOLUME) { - /* - * XXX I'll make good use of this someday, though - * soft volume control is currently pretty much - * integrated. - */ - } + flags &= CHN_N_TRIGGER; if (flags & CHN_N_BLOCKSIZE) { /* diff --git a/sys/dev/sound/pcm/channel.h b/sys/dev/sound/pcm/channel.h index f964480369a1..6fa4338dce4a 100644 --- a/sys/dev/sound/pcm/channel.h +++ b/sys/dev/sound/pcm/channel.h @@ -405,11 +405,8 @@ enum { -#define CHN_N_RATE 0x00000001 -#define CHN_N_FORMAT 0x00000002 -#define CHN_N_VOLUME 0x00000004 -#define CHN_N_BLOCKSIZE 0x00000008 -#define CHN_N_TRIGGER 0x00000010 +#define CHN_N_BLOCKSIZE 0x00000001 +#define CHN_N_TRIGGER 0x00000002 #define CHN_LATENCY_MIN 0 #define CHN_LATENCY_MAX 10 From nobody Tue Apr 7 15:44:52 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fqr9d3YRdz6YSqB for ; Tue, 07 Apr 2026 15:44: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fqr9c6sdCz3qNh for ; Tue, 07 Apr 2026 15:44:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775576693; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dlo7hJaKyzcGAl/DnZhh8M5iTkrbdvatKsNO1Uv+Fg4=; b=kSnBnhGuP8Y4z7Pfh6K3UvhXGrzgpqHJeXHMkLRm+GkLHu7XoQl/OFkZAgEJdBcpEV8H2P 1VG9lNtvE+gy9nBUIxRvlro0XNnZkZhxNYQd98pQVeQpJMbM3PYm4H6dSieK84j5giXF/J j6owh0/938LmenqdbAGIC+6WLPPgTNTVAgIQLl7jbWWA9OZ7LMmn/SeFEOgY82zkYl2lxt 1J+BS9S0GuTeLq7o1lyPmMflmowG3weCMnfnWbNMNVl6ZWCZD0V7Qnzc13Nef3lzDMWGbD G9/mMdYKyzDTm5WkpRzNLBW1aEuLf9s1cH1zLMu4rqP44+sr2KLRJZC2YKOs9w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775576693; a=rsa-sha256; cv=none; b=evFOwd3DAFihgzLPNfDkg46qu5FNDpKwcQTGyHRQ88nd7gkG9CghIqYuVqaSIrkcDte3x6 YKxYVT+GKOtfSHsUrJwgH8tVltVF5KLUb9OPwlCxTPHtDccvP3Z2L1kJMSA0eTHogjDoIh hUaJkJ65JJ26ZOD+2fdFWuFLWjM2tANDmfHSk1/C79PH2yC7yAKw0g1wrWIOW5x8+Kheol s9bB5IkqV67yltQxN9GPeVSe9kH75uPJ6k5ghy69iowSJ92RmoASJNVhibB/P824iM8ftC vzjUJJOCcWLkJwPft9sMQT5RLRCfNt3+O1tISOW+OEWSNSS4igntkXim9Nqe+g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775576693; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dlo7hJaKyzcGAl/DnZhh8M5iTkrbdvatKsNO1Uv+Fg4=; b=OOHCa5lHXGZAihiU5FRhVEamJo6S27ZLjHZuzypN/GWR3WCm3xvC71yhzhzqFqh54Cj9yq bcsrLhFp13l5Seth+ry9m0UT3KBRR3Ur4GGS7Knf1zDVOSMWAlrH4lTgYO9pIkZ4PUg2lq Pm+y0q4+rVo3hxm7MVYw0Gz5UUvc39MsyWqkqGfNjHxinp9qQucHYgCy2Mfgpyz8AvG/+w sqJkX27j3cVMPPlcURyxRFYczsuNcEnUMmymCxDSo38aNzPUpq8BO3hWj5Xj38S+h3jMFF G4vNHAeDn80CIRdKjkbOIMPJGseODfudQ2K47s/mJJkFw2LbbQdAzjNu6UShNw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fqr9c6K1xzmRx for ; Tue, 07 Apr 2026 15:44:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 42a6e by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 07 Apr 2026 15:44:52 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: 8b18fc456bb1 - main - sound: Simplify parts of chn_notify() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: 8b18fc456bb136112e166508a9182718cdd44be2 Auto-Submitted: auto-generated Date: Tue, 07 Apr 2026 15:44:52 +0000 Message-Id: <69d52674.42a6e.137ef8b7@gitrepo.freebsd.org> The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=8b18fc456bb136112e166508a9182718cdd44be2 commit 8b18fc456bb136112e166508a9182718cdd44be2 Author: Christos Margiolis AuthorDate: 2026-04-07 15:44:29 +0000 Commit: Christos Margiolis CommitDate: 2026-04-07 15:44:29 +0000 sound: Simplify parts of chn_notify() Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D56240 --- sys/dev/sound/pcm/channel.c | 47 +++++++++++++++++++-------------------------- 1 file changed, 20 insertions(+), 27 deletions(-) diff --git a/sys/dev/sound/pcm/channel.c b/sys/dev/sound/pcm/channel.c index c9edce27c8cd..9b71d93ac7f9 100644 --- a/sys/dev/sound/pcm/channel.c +++ b/sys/dev/sound/pcm/channel.c @@ -2349,7 +2349,7 @@ chn_notify(struct pcm_channel *c, u_int32_t flags) * If the hwchan is running, we can't change its rate, format or * blocksize */ - run = (CHN_STARTED(c)) ? 1 : 0; + run = CHN_STARTED(c); if (run) flags &= CHN_N_TRIGGER; @@ -2360,16 +2360,17 @@ chn_notify(struct pcm_channel *c, u_int32_t flags) chn_setlatency(c, chn_latency); } - if ((flags & CHN_N_TRIGGER) && !(c->flags & CHN_F_VCHAN_DYNAMIC)) { - nrun = CHN_EMPTY(c, children.busy) ? 0 : 1; - if (nrun && !run) - err = chn_start(c, 1); - if (!nrun && run) - chn_abort(c); - flags &= ~CHN_N_TRIGGER; - } - if (flags & CHN_N_TRIGGER) { + if (!(c->flags & CHN_F_VCHAN_DYNAMIC)) { + nrun = !CHN_EMPTY(c, children.busy); + if (nrun && !run) + err = chn_start(c, 1); + if (!nrun && run) + chn_abort(c); + + return (err); + } + if (c->direction == PCMDIR_PLAY) { vchanformat = &c->parentsnddev->pvchanformat; vchanrate = &c->parentsnddev->pvchanrate; @@ -2378,7 +2379,6 @@ chn_notify(struct pcm_channel *c, u_int32_t flags) vchanrate = &c->parentsnddev->rvchanrate; } - /* Dynamic Virtual Channel */ if (!(c->flags & CHN_F_VCHAN_ADAPTIVE)) { bestformat = *vchanformat; bestspeed = *vchanrate; @@ -2394,6 +2394,7 @@ chn_notify(struct pcm_channel *c, u_int32_t flags) vpflags = 0; CHN_FOREACH(ch, c, children.busy) { + nrun++; CHN_LOCK(ch); if ((ch->format & AFMT_PASSTHROUGH) && snd_fmtvalid(ch->format, caps->fmtlist)) { @@ -2401,7 +2402,6 @@ chn_notify(struct pcm_channel *c, u_int32_t flags) bestspeed = ch->speed; CHN_UNLOCK(ch); vpflags = CHN_F_PASSTHROUGH; - nrun++; break; } if ((ch->flags & CHN_F_EXCLUSIVE) && vpflags == 0) { @@ -2416,13 +2416,11 @@ chn_notify(struct pcm_channel *c, u_int32_t flags) } CHN_UNLOCK(ch); vpflags = CHN_F_EXCLUSIVE; - nrun++; continue; } if (!(c->flags & CHN_F_VCHAN_ADAPTIVE) || vpflags != 0) { CHN_UNLOCK(ch); - nrun++; continue; } if (ch->speed > bestspeed) { @@ -2433,7 +2431,6 @@ chn_notify(struct pcm_channel *c, u_int32_t flags) besthwformat = snd_fmtbest(ch->format, caps->fmtlist); if (!(besthwformat & AFMT_VCHAN)) { CHN_UNLOCK(ch); - nrun++; continue; } if (AFMT_CHANNEL(besthwformat) > @@ -2444,7 +2441,6 @@ chn_notify(struct pcm_channel *c, u_int32_t flags) AFMT_BIT(besthwformat) > AFMT_BIT(bestformat)) bestformat = besthwformat; CHN_UNLOCK(ch); - nrun++; } if (bestformat == 0) @@ -2464,17 +2460,16 @@ chn_notify(struct pcm_channel *c, u_int32_t flags) c->devinfo, bestspeed); err = chn_reset(c, bestformat, bestspeed); } - if (err == 0 && dirty) { - CHN_FOREACH(ch, c, children.busy) { - CHN_LOCK(ch); - if (VCHAN_SYNC_REQUIRED(ch)) - vchan_sync(ch); - CHN_UNLOCK(ch); - } - } if (err == 0) { - if (dirty) + if (dirty) { + CHN_FOREACH(ch, c, children.busy) { + CHN_LOCK(ch); + if (VCHAN_SYNC_REQUIRED(ch)) + vchan_sync(ch); + CHN_UNLOCK(ch); + } c->flags |= CHN_F_DIRTY; + } err = chn_start(c, 1); } } @@ -2491,8 +2486,6 @@ chn_notify(struct pcm_channel *c, u_int32_t flags) vchan_sync(ch); CHN_UNLOCK(ch); } - } - if (err == 0) { c->flags |= CHN_F_DIRTY; err = chn_start(c, 1); } From nobody Tue Apr 7 15:44:54 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fqr9f3LG9z6YSbH for ; Tue, 07 Apr 2026 15:44: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fqr9f0fQgz3q01 for ; Tue, 07 Apr 2026 15:44:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775576694; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SrUE6uIKA82OM4rao6w40yI7u8RG1s5XTF8ZDNBWXAc=; b=gEMaJzjy/hC5cFIFfMVNXb2lL7YQ6b8Cmb9J0U/hSza52hUneyRAQmhMxCogiaZbY8SXkS hQsUxZ0WJWBX/Jt7ViVFqEwy/tgZ2DQNuY5+0hqivQYPTjQwxDwkgiVajqEClR4nG0uipp Je6ztA4yF8+Z2zH3LY36q4savg6c4bK+XBWr4TJygJ9opLocRCjUoIKXYlh0r0YJSQbf6Z kSTCtUH+pAeggHX/t4eDzXU5LIMYzcQFkNJkHD47Mqjyq4AQ90iB6zqNrzBOSWUNwePcwG idyOUMLIWo2PtONWYzg6aAR6CyVKmuqazNd9Q7oSRhk+bh1wxpkvL7IZEiumBg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775576694; a=rsa-sha256; cv=none; b=Cq96ka8L6/TprdUUxivB7hAizxtBkSnAvgFoFEjUIFwaT9CvfW5uDt9Tl5R039/09KTWkf jqwvSzrv6RoDaE2wtpmo+TSs9zxEDFgKbEBQW3znTEzu4wSwKkQHTxs6rjyujGERsW97AV 31harLgqPCWvTeU4bX2sjQkKCdFCFqK/r9o31vtGDAb+h2RrXag1jx9Jt0PlLiNltTsfYU 21sm++cMKmsdtBzuKBab5rCx1+0Rs7jTNM/PyU9tNv89OKRGzSjEc5l+ChSrxox1qQQ5qX Xnow/rYjQccrmVigr9Z+szDarW3zEO2sX3/bBh9zxS61+DHYz/ZxB1fBMDK7Ww== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775576694; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SrUE6uIKA82OM4rao6w40yI7u8RG1s5XTF8ZDNBWXAc=; b=WpzzjKJCZo1G21qucS91q2G8K2peigdpVJbOgu6gcxmW97r4gNtgeoQsVwQAx5gJmXO7gi hr3GUzKS1hltRqlV129WAVP+FDwyXWTunmJD+5+C5x0qj/QHGRQvRjH/b+92dvE3EvNf1E r/0PtQOQKXk0GlAtjVTg/TXvP8vGD4y65LiTtRgw7AWhtDpe0Hu0uGti8OIWuGWFK9Ht8M MnSyGLZnPVMiLQy/6hkbWrBdjxHk6nbNncEyoBfyssVCtzLWu8fvzxmIebe/76UqRYvpQA L3h/C0yS+jZ4bxTexZ/dbm5B+JinmIGJBtj9V2MFp9DDZ16I7dvR07fflySI2w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fqr9f03kjzmD3 for ; Tue, 07 Apr 2026 15:44:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 4509a by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 07 Apr 2026 15:44:54 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: 66a82f5fa471 - main - sound: De-macro array definitions in chn_calclatency() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: 66a82f5fa471b8eda018b7566c3725a6742dfc0c Auto-Submitted: auto-generated Date: Tue, 07 Apr 2026 15:44:54 +0000 Message-Id: <69d52676.4509a.61dd7a0a@gitrepo.freebsd.org> The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=66a82f5fa471b8eda018b7566c3725a6742dfc0c commit 66a82f5fa471b8eda018b7566c3725a6742dfc0c Author: Christos Margiolis AuthorDate: 2026-04-07 15:44:34 +0000 Commit: Christos Margiolis CommitDate: 2026-04-07 15:44:34 +0000 sound: De-macro array definitions in chn_calclatency() Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D56263 --- sys/dev/sound/pcm/channel.c | 37 ++++++++++++++++--------------------- 1 file changed, 16 insertions(+), 21 deletions(-) diff --git a/sys/dev/sound/pcm/channel.c b/sys/dev/sound/pcm/channel.c index 9b71d93ac7f9..0b940fe4e843 100644 --- a/sys/dev/sound/pcm/channel.c +++ b/sys/dev/sound/pcm/channel.c @@ -1748,19 +1748,6 @@ round_blksz(u_int32_t v, int round) * aggressively through possibly real time programming technique. * */ -#define CHN_LATENCY_PBLKCNT_REF \ - {{1, 2, 3, 4, 5, 5, 4, 3, 2, 1, 1}, \ - {1, 2, 3, 4, 5, 5, 4, 3, 2, 1, 1}} -#define CHN_LATENCY_PBUFSZ_REF \ - {{7, 9, 12, 13, 14, 15, 15, 15, 15, 15, 16}, \ - {11, 12, 13, 14, 15, 16, 16, 16, 16, 16, 17}} - -#define CHN_LATENCY_RBLKCNT_REF \ - {{9, 8, 7, 6, 5, 5, 4, 3, 2, 1, 1}, \ - {9, 8, 7, 6, 5, 5, 4, 3, 2, 1, 1}} -#define CHN_LATENCY_RBUFSZ_REF \ - {{14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 16}, \ - {15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 17}} #define CHN_LATENCY_DATA_REF 192000 /* 48khz stereo 16bit ~ 48000 x 2 x 2 */ @@ -1768,14 +1755,22 @@ static int chn_calclatency(int dir, int latency, int bps, u_int32_t datarate, u_int32_t max, int *rblksz, int *rblkcnt) { - static int pblkcnts[CHN_LATENCY_PROFILE_MAX + 1][CHN_LATENCY_MAX + 1] = - CHN_LATENCY_PBLKCNT_REF; - static int pbufszs[CHN_LATENCY_PROFILE_MAX + 1][CHN_LATENCY_MAX + 1] = - CHN_LATENCY_PBUFSZ_REF; - static int rblkcnts[CHN_LATENCY_PROFILE_MAX + 1][CHN_LATENCY_MAX + 1] = - CHN_LATENCY_RBLKCNT_REF; - static int rbufszs[CHN_LATENCY_PROFILE_MAX + 1][CHN_LATENCY_MAX + 1] = - CHN_LATENCY_RBUFSZ_REF; + static int pblkcnts[CHN_LATENCY_PROFILE_MAX + 1][CHN_LATENCY_MAX + 1] = { + {1, 2, 3, 4, 5, 5, 4, 3, 2, 1, 1}, + {1, 2, 3, 4, 5, 5, 4, 3, 2, 1, 1} + }; + static int pbufszs[CHN_LATENCY_PROFILE_MAX + 1][CHN_LATENCY_MAX + 1] = { + {7, 9, 12, 13, 14, 15, 15, 15, 15, 15, 16}, + {11, 12, 13, 14, 15, 16, 16, 16, 16, 16, 17} + }; + static int rblkcnts[CHN_LATENCY_PROFILE_MAX + 1][CHN_LATENCY_MAX + 1] = { + {9, 8, 7, 6, 5, 5, 4, 3, 2, 1, 1}, + {9, 8, 7, 6, 5, 5, 4, 3, 2, 1, 1} + }; + static int rbufszs[CHN_LATENCY_PROFILE_MAX + 1][CHN_LATENCY_MAX + 1] = { + {14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 16}, + {15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 17} + }; u_int32_t bufsz; int lprofile, blksz, blkcnt; From nobody Tue Apr 7 15:44:55 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fqr9g6Ch7z6YSqH for ; Tue, 07 Apr 2026 15:44: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fqr9g1SRVz3qM3 for ; Tue, 07 Apr 2026 15:44:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775576695; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=k+PAWIAI6wGokY7rNQjSy5djzQxTNrtU1eMdArk4BYs=; b=UwlO+A1d2vIkCCz/SmukIkhcclyz2ngEMWU7z2vjN8qCSjv9y67/B0FwvW318QmdaKXJqd HRWBdMy2aFiifkb8/rjLS+JzgeB56B8oKnGtn3IIEQ0skbmVPuD17QLS0pySRtFm45RbO9 ic0VMbHBPQ0ww88sqYQs1Yf7WdRX4sMARnB5YKJm7QJNvID2y08Ufuj2pBvPPyej/VWkA3 UByLL9m7IJtExU/euTRX77mJZSCa2wenbpSJL8oMDz3nvpW8HhRPlb2ORyF/eUquP3p4lg 2GI9ai1fW1SNm+zdiFSk+uM9lFc6Q79p7ThANnik/5Lp6hCkaqE2R88HDeOsEg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775576695; a=rsa-sha256; cv=none; b=H2isvH4tdk6/RDjyyE4ptNj8q74Q5A77I4es8aH7dazUHP9XgoqOiwCWIoemBpZ48LS1ES G71vWRrgpS/vwa1x5LyBJyejWbKxOJ3EZ6fzPf0n7vsaugDeeyNKIE2n7ouGpIi43CXmKp YWPQsIW9PlPoWQj5YN+mYULddLSfq16/oyMHhMaIeToxJ7fbbIV66W3OklglFgPXFTdvpb 5ZGnLxmp/jazLqwUIJ0BB4gsLCEf2eXrPGn8b6ls/6ZrpK7+tV49ak48OFfs+oHfZjlY6U mD9hO7rav3PIGh8W74wUyAXqvB/pdgh/a9P5syrTLzZ2lKENd51n8Qsboy2jKA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775576695; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=k+PAWIAI6wGokY7rNQjSy5djzQxTNrtU1eMdArk4BYs=; b=NAFQjJ0lNQkuGcCFHOBuo4R+t5c80F0VRmb5TkTbYMtfeLoRXOrGkE9jcF1KfWkHgJTpFB 5WZL8LsyRihDDKt7LVAScmMc8ArlonIJxgPttaEHieUZUAnnpEVdyt3WBr286bxPr6iI5t 8d0Eamn7L6HkX/LpOVKCuZLP+FhEKRifSwFzi7UWqGUyABbFWmvxvVw+2xPnfC35wQr3Ox YUHV6v5kgNtpJYkhrO71oGh+Vn5ygDZNQQS7AUxyi722bNGKVPAt2lDA8yt2xf3fCm8Mqi mZi6uD7/me3mNtf9TsGJCpjPROY23CGF5+ChNTI1R4o7/1JTHJIfsxhmuZYPCw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fqr9g0d7TzmRy for ; Tue, 07 Apr 2026 15:44:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 44560 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 07 Apr 2026 15:44:55 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: 8007a78bfe1f - main - sound: Make chn_reset() control flow clearer List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: 8007a78bfe1f41b7055f8677f8ac9ae4cc2fbc7c Auto-Submitted: auto-generated Date: Tue, 07 Apr 2026 15:44:55 +0000 Message-Id: <69d52677.44560.6b8b5e1e@gitrepo.freebsd.org> The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=8007a78bfe1f41b7055f8677f8ac9ae4cc2fbc7c commit 8007a78bfe1f41b7055f8677f8ac9ae4cc2fbc7c Author: Christos Margiolis AuthorDate: 2026-04-07 15:44:39 +0000 Commit: Christos Margiolis CommitDate: 2026-04-07 15:44:39 +0000 sound: Make chn_reset() control flow clearer I think this is cleaner than playing around with return values. Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D56264 --- sys/dev/sound/pcm/channel.c | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/sys/dev/sound/pcm/channel.c b/sys/dev/sound/pcm/channel.c index 0b940fe4e843..c1e0d8d3bc52 100644 --- a/sys/dev/sound/pcm/channel.c +++ b/sys/dev/sound/pcm/channel.c @@ -1059,7 +1059,7 @@ snd_afmt2str(uint32_t afmt, char *buf, size_t len) int chn_reset(struct pcm_channel *c, uint32_t fmt, uint32_t spd) { - int r; + int err; CHN_LOCKASSERT(c); c->feedcount = 0; @@ -1071,23 +1071,26 @@ chn_reset(struct pcm_channel *c, uint32_t fmt, uint32_t spd) c->flags |= (pcm_getflags(c->dev) & SD_F_BITPERFECT) ? CHN_F_BITPERFECT : 0; - r = CHANNEL_RESET(c->methods, c->devinfo); - if (r == 0 && fmt != 0 && spd != 0) { - r = chn_setparam(c, fmt, spd); + if ((err = CHANNEL_RESET(c->methods, c->devinfo))) + return (err); + + if (fmt != 0 && spd != 0) { + if ((err = chn_setparam(c, fmt, spd))) + return (err); fmt = 0; spd = 0; } - if (r == 0 && fmt != 0) - r = chn_setformat(c, fmt); - if (r == 0 && spd != 0) - r = chn_setspeed(c, spd); - if (r == 0) - r = chn_setlatency(c, chn_latency); - if (r == 0) { - chn_resetbuf(c); - r = CHANNEL_RESETDONE(c->methods, c->devinfo); - } - return r; + if (fmt != 0 && (err = chn_setformat(c, fmt))) + return (err); + if (spd != 0 && (err = chn_setspeed(c, spd))) + return (err); + + if ((err = chn_setlatency(c, chn_latency))) + return (err); + + chn_resetbuf(c); + + return (CHANNEL_RESETDONE(c->methods, c->devinfo)); } static struct unrhdr * From nobody Tue Apr 7 15:53:23 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fqrMR3f12z6YTYq for ; Tue, 07 Apr 2026 15:53: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fqrMR1hLBz3vVN for ; Tue, 07 Apr 2026 15:53:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775577203; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KH3Zk00vO1wlWXkCUSPkU9LoH+P+EMaaYJQ58+4cRKs=; b=nULEqhEDlUfyb2b9h8ufagNcqfbcueXowa2In+31YaK53NZC1CBYDcNlJdJ+NkrrvyXoQA bBDv4+BXUXA4zdZ1IqY3zLApuLl6WIzpuc0WxV6pO+3L7ZIYfMHOs334pNMBjlboecOCZr ayQV+nSRa/erio+t13y6FoasKLDXJ/gm7tkHKcE7BgLpZiXPpN42WnUCy2vj4H7RK3c/6k Q37ZCmHeaipYpuHfNVmvD7QTCGqP3rT/NbadU0D4BsEFOSXXVZ1IkP7Uop8DHfaVhGTJXa UNaQLVc1ENvDYzR6gE/8zRzvhiWKeOg0jdYTZrtYxqQmwSTRTG9D4uq1IycynQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775577203; a=rsa-sha256; cv=none; b=LY6Tn0YjnVk7BWqjrQpHLHTZUe4DZe/yvLiO3vZ7H6lu4IfKsZSxDUCfta1HHY6ZYNpLdy biWCuZAfcFOYAl0lrQg0EhavtqoCafuozU17WAEO1xgmlpnUGo/WfvyFrHvYaOD21TpSkj Osoi0HjGlYv7Y1ZCSjq8M3Pl1BvVjcF4uzO3a1oWVSspXTIbYEobfpUCTSJLhLivcMBopi 2YVV630k5KxjFzB1F/ETzk/fr7Jz8IK35+DfZc1FLMXVtbR7ULpmlN5PAGMmT6w8kesHX9 yPvGF++GdHB2/FsZiPdpCELjeFPv+4Qm5PEe0mwBx4fJ0CjgMJcUHejW6Dag7w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775577203; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KH3Zk00vO1wlWXkCUSPkU9LoH+P+EMaaYJQ58+4cRKs=; b=C71yV9ufiQqijyHF7MTFsSc4+IMFYwn9n4eaFajK90m7mPZEkxbswRZBqDIUKhfU6ZJTIo dTUU+jmmJMkvIc0nwhOCPZuo6uvRbjbwnuJ/2xvoCwinPbWMCZSXlIZIWdHfGIPAjkCByg YY4VNDvzhcVpMX+9j8JmomF7+rctq2hqOz7yKCC914exlCCxMJeUw1jC77ZWWspLnzXv1z 9BzU0kzzLowRZUBVUAS6xrKumXPBqUhIt/PAbmKqyD4UmAdIzGnW4oyOagP0C/7wm3Hppw NKcOsaHzitsSTnaBNr4/vb9XE57TIW8mcZ/L24mJI2m9WgLsdvBbC0KpA+X2vw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fqrMR1FWmzn0h for ; Tue, 07 Apr 2026 15:53:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 44567 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 07 Apr 2026 15:53:23 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Rick Macklem Subject: git: 53b4ae3bf0f7 - main - nfs_diskless: Fix handling of nfsuserd case for NFSv4 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 53b4ae3bf0f7e625d51fa263a5bd3859792d61e3 Auto-Submitted: auto-generated Date: Tue, 07 Apr 2026 15:53:23 +0000 Message-Id: <69d52873.44567.319317b4@gitrepo.freebsd.org> The branch main has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=53b4ae3bf0f7e625d51fa263a5bd3859792d61e3 commit 53b4ae3bf0f7e625d51fa263a5bd3859792d61e3 Author: Rick Macklem AuthorDate: 2026-04-07 15:50:21 +0000 Commit: Rick Macklem CommitDate: 2026-04-07 15:50:21 +0000 nfs_diskless: Fix handling of nfsuserd case for NFSv4 Commit 8b9775912cbc added support for an NFSv4 mounted root file system, but only if the NFSv4 configuration used id numbers in the strings. This patch adds support for the case where the NFSv4 configuration uses name<-->id mappings via nfsuserd(8) by priming the mapping cache with just enough entries so that it works until the nfsuserd(8) is running. They are listed in nfs_prime_userd[] in sys/fs/nfs/nfs_commonsubs.c. The entries in nfs_prime_userd[] are also wired into the kernel's cache for name<-->id mappings when nfsuserd(8) starts up. This is necessary, since an upcall to the nfsuserd(8) daemon for a mapping when looking up the path to the passwd/group database files (/etc) will hang the system, due to a vnode lock being held on the entry in the path which blocks nfsuserd(8) from accessing files. To enable this case, the following must be put in the NFS root file system's /boot/loader.conf: boot.nfsroot.options="nfsv4" boot.nfsroot.user_domain="" where must be the same as nfsuserd uses (usually set via the -domain flag). If boot.nfsroot.user_domain does not exist or is the empty string, ids is strings is configured. MFC after: 1 week Requested by: Dan Shelton Fixes: 8b9775912cbc ("nfs_diskless: Add support for an NFSv4 root fs") --- sys/fs/nfs/nfs_commonsubs.c | 76 +++++++++++++++++++++++++++++++++++++++------ sys/fs/nfs/nfsid.h | 13 ++++++++ sys/fs/nfs/nfsrvstate.h | 1 + sys/nfs/nfs_diskless.c | 44 ++++++++++++++++++++++++++ 4 files changed, 124 insertions(+), 10 deletions(-) diff --git a/sys/fs/nfs/nfs_commonsubs.c b/sys/fs/nfs/nfs_commonsubs.c index 78e2fbb72bdb..39d7cb447d6a 100644 --- a/sys/fs/nfs/nfs_commonsubs.c +++ b/sys/fs/nfs/nfs_commonsubs.c @@ -70,6 +70,7 @@ struct nfsreqhead nfsd_reqq; int nfsrv_lease = NFSRV_LEASE; int ncl_mbuf_mlen = MLEN; int nfsrv_doflexfile = 0; +bool nfs_nfsv4root = false; NFSNAMEIDMUTEX; NFSSOCKMUTEX; extern int nfsrv_lughashsize; @@ -80,6 +81,21 @@ extern struct nfsdevicehead nfsrv_devidhead; extern struct nfsstatsv1 nfsstatsv1; extern uint32_t nfs_srvmaxio; +/* + * Define just enough NFSv4 id<-->name mappings to make things work + * until the nfsuserd(8) is running. + * XXX These name/ids must be kept the same as what is in /etc/passwd + * and /etc/group. + */ +struct nfs_prime_userd nfs_prime_userd[] = { + { NFSID_INITIALIZE, UID_NOBODY, GID_NOGROUP, NULL }, + { NFSID_ADDUID, UID_ROOT, GID_NOGROUP, "root" }, + { NFSID_ADDUID, UID_BIN, GID_NOGROUP, "bin" }, + { NFSID_ADDGID, UID_NOBODY, GID_WHEEL, "wheel" }, + { NFSID_ADDGID, UID_NOBODY, GID_OPERATOR, "operator" }, + { 0, 0, 0, NULL }, +}; + NFSD_VNET_DEFINE(int, nfsd_enable_stringtouid) = 0; NFSD_VNET_DEFINE(struct nfssockreq, nfsrv_nfsuserdsock); NFSD_VNET_DEFINE(nfsuserd_state, nfsrv_nfsuserd) = NOTRUNNING; @@ -233,6 +249,7 @@ static int nfsrv_skipace(struct nfsrv_descript *nd, acl_type_t, int *acesizep); static void nfsv4_wanted(struct nfsv4lock *lp); static uint32_t nfsv4_filesavail(struct statfs *, struct mount *); static int nfsrv_getuser(int procnum, uid_t uid, gid_t gid, char *name); +static bool nfs_in_prime(int flag, uid_t uid, gid_t gid); static void nfsrv_removeuser(struct nfsusrgrp *usrp, int isuser); static int nfsrv_getrefstr(struct nfsrv_descript *, u_char **, u_char **, int *, int *); @@ -3667,7 +3684,8 @@ tryagain: mtx_lock(&hp->mtx); TAILQ_FOREACH(usrp, &hp->lughead, lug_numhash) { if (usrp->lug_uid == uid) { - if (usrp->lug_expiry < NFSD_MONOSEC) + if (!usrp->lug_wired && + usrp->lug_expiry < NFSD_MONOSEC) break; /* * If the name doesn't already have an '@' @@ -3759,7 +3777,8 @@ tryagain: mtx_lock(&hp->mtx); TAILQ_FOREACH(usrp, &hp->lughead, lug_numhash) { if (usrp->lug_uid == uid) { - if (usrp->lug_expiry < NFSD_MONOSEC) + if (!usrp->lug_wired && + usrp->lug_expiry < NFSD_MONOSEC) break; if (usrp->lug_cred != NULL) { newcred = crhold(usrp->lug_cred); @@ -3859,7 +3878,8 @@ tryagain: TAILQ_FOREACH(usrp, &hp->lughead, lug_namehash) { if (usrp->lug_namelen == len && !NFSBCMP(usrp->lug_name, str, len)) { - if (usrp->lug_expiry < NFSD_MONOSEC) + if (!usrp->lug_wired && + usrp->lug_expiry < NFSD_MONOSEC) break; hp2 = NFSUSERHASH(usrp->lug_uid); mtx_lock(&hp2->mtx); @@ -3936,7 +3956,8 @@ tryagain: mtx_lock(&hp->mtx); TAILQ_FOREACH(usrp, &hp->lughead, lug_numhash) { if (usrp->lug_gid == gid) { - if (usrp->lug_expiry < NFSD_MONOSEC) + if (!usrp->lug_wired && + usrp->lug_expiry < NFSD_MONOSEC) break; /* * If the name doesn't already have an '@' @@ -4081,7 +4102,8 @@ tryagain: TAILQ_FOREACH(usrp, &hp->lughead, lug_namehash) { if (usrp->lug_namelen == len && !NFSBCMP(usrp->lug_name, str, len)) { - if (usrp->lug_expiry < NFSD_MONOSEC) + if (!usrp->lug_wired && + usrp->lug_expiry < NFSD_MONOSEC) break; hp2 = NFSGROUPHASH(usrp->lug_gid); mtx_lock(&hp2->mtx); @@ -4282,6 +4304,23 @@ out: return (error); } +/* Check to see if the uid/gid is in the nfs_prime_userd list. */ +static bool +nfs_in_prime(int flag, uid_t uid, gid_t gid) +{ + int i; + + for (i = 0; nfs_prime_userd[i].flag != 0; i++) { + if ((nfs_prime_userd[i].flag & flag) == NFSID_ADDUID && + nfs_prime_userd[i].uid == uid) + return (true); + if ((nfs_prime_userd[i].flag & flag) == NFSID_ADDGID && + nfs_prime_userd[i].gid == gid) + return (true); + } + return (false); +} + /* * This function is called from the nfssvc(2) system call, to update the * kernel user/group name list(s) for the V4 owner and ownergroup attributes. @@ -4305,7 +4344,11 @@ nfssvc_idname(struct nfsd_idargs *nidp) } if (nidp->nid_flag & NFSID_INITIALIZE) { cp = malloc(nidp->nid_namelen + 1, M_NFSSTRING, M_WAITOK); - error = copyin(nidp->nid_name, cp, nidp->nid_namelen); + error = 0; + if ((nidp->nid_flag & NFSID_SYSSPACE) == 0) + error = copyin(nidp->nid_name, cp, nidp->nid_namelen); + else + NFSBCOPY(nidp->nid_name, cp, nidp->nid_namelen); if (error != 0) { free(cp, M_NFSSTRING); goto out; @@ -4403,8 +4446,12 @@ nfssvc_idname(struct nfsd_idargs *nidp) */ newusrp = malloc(sizeof(struct nfsusrgrp) + nidp->nid_namelen, M_NFSUSERGROUP, M_WAITOK | M_ZERO); - error = copyin(nidp->nid_name, newusrp->lug_name, - nidp->nid_namelen); + error = 0; + if ((nidp->nid_flag & NFSID_SYSSPACE) == 0) + error = copyin(nidp->nid_name, newusrp->lug_name, + nidp->nid_namelen); + else + NFSBCOPY(nidp->nid_name, newusrp->lug_name, nidp->nid_namelen); if (error == 0 && nidp->nid_ngroup > 0 && (nidp->nid_flag & NFSID_ADDUID) != 0) { grps = NULL; @@ -4522,7 +4569,11 @@ nfssvc_idname(struct nfsd_idargs *nidp) newusrp->lug_expiry = NFSD_MONOSEC + nidp->nid_usertimeout; else newusrp->lug_expiry = NFSD_MONOSEC + 5; + newusrp->lug_wired = false; if (nidp->nid_flag & (NFSID_ADDUID | NFSID_ADDUSERNAME)) { + if (nfs_nfsv4root && nfs_in_prime(NFSID_ADDUID, nidp->nid_uid, + nidp->nid_gid)) + newusrp->lug_wired = true; newusrp->lug_uid = nidp->nid_uid; thp = NFSUSERHASH(newusrp->lug_uid); mtx_assert(&thp->mtx, MA_OWNED); @@ -4532,6 +4583,9 @@ nfssvc_idname(struct nfsd_idargs *nidp) TAILQ_INSERT_TAIL(&thp->lughead, newusrp, lug_namehash); atomic_add_int(&NFSD_VNET(nfsrv_usercnt), 1); } else if (nidp->nid_flag & (NFSID_ADDGID | NFSID_ADDGROUPNAME)) { + if (nfs_nfsv4root && nfs_in_prime(NFSID_ADDGID, nidp->nid_uid, + nidp->nid_gid)) + newusrp->lug_wired = true; newusrp->lug_gid = nidp->nid_gid; thp = NFSGROUPHASH(newusrp->lug_gid); mtx_assert(&thp->mtx, MA_OWNED); @@ -4580,7 +4634,8 @@ nfssvc_idname(struct nfsd_idargs *nidp) TAILQ_FOREACH_SAFE(usrp, &NFSD_VNET(nfsuserhash)[i].lughead, lug_numhash, nusrp) - if (usrp->lug_expiry < NFSD_MONOSEC) + if (!usrp->lug_wired && + usrp->lug_expiry < NFSD_MONOSEC) nfsrv_removeuser(usrp, 1); } for (i = 0; i < nfsrv_lughashsize; i++) { @@ -4610,7 +4665,8 @@ nfssvc_idname(struct nfsd_idargs *nidp) TAILQ_FOREACH_SAFE(usrp, &NFSD_VNET(nfsgrouphash)[i].lughead, lug_numhash, nusrp) - if (usrp->lug_expiry < NFSD_MONOSEC) + if (!usrp->lug_wired && + usrp->lug_expiry < NFSD_MONOSEC) nfsrv_removeuser(usrp, 0); } for (i = 0; i < nfsrv_lughashsize; i++) { diff --git a/sys/fs/nfs/nfsid.h b/sys/fs/nfs/nfsid.h index bd9807ca1acc..349fdecfc596 100644 --- a/sys/fs/nfs/nfsid.h +++ b/sys/fs/nfs/nfsid.h @@ -61,6 +61,19 @@ struct nfsd_idargs { #define NFSID_SYSSPACE 0x0200 #if defined(_KERNEL) || defined(KERNEL) +/* + * Define just enough NFSv4 id<-->name mappings to make things work + * until the nfsuserd(8) is running. + * XXX These name/ids must be kept the same as what is in /etc/passwd + * and /etc/group. + */ +struct nfs_prime_userd { + int flag; + uid_t uid; + gid_t gid; + char *nam; +}; + int nfssvc_idname(struct nfsd_idargs *); #endif diff --git a/sys/fs/nfs/nfsrvstate.h b/sys/fs/nfs/nfsrvstate.h index cc19ed6fa1d2..858c52ec6218 100644 --- a/sys/fs/nfs/nfsrvstate.h +++ b/sys/fs/nfs/nfsrvstate.h @@ -317,6 +317,7 @@ struct nfsusrgrp { } lug_un; struct ucred *lug_cred; /* Cred. with groups list */ int lug_namelen; /* Name length */ + bool lug_wired; /* Wired into cache */ u_char lug_name[1]; /* malloc'd correct length */ }; #define lug_uid lug_un.un_uid diff --git a/sys/nfs/nfs_diskless.c b/sys/nfs/nfs_diskless.c index d5278612d8d9..32dd7f3e997f 100644 --- a/sys/nfs/nfs_diskless.c +++ b/sys/nfs/nfs_diskless.c @@ -54,6 +54,7 @@ #include #include #include +#include #define NFS_IFACE_TIMEOUT_SECS 10 /* Timeout for interface to appear. */ @@ -70,6 +71,9 @@ struct nfs_diskless nfs_diskless = { { { 0 } } }; struct nfsv3_diskless nfsv3_diskless = { { { 0 } } }; int nfs_diskless_valid = 0; +extern struct nfs_prime_userd nfs_prime_userd[]; +extern bool nfs_nfsv4root; + /* * Validate/sanity check a rsize/wsize parameter. */ @@ -292,11 +296,51 @@ match_done: return; } } else { + struct nfsd_idargs nid; + int ret; + /* * For NFSv4, the file handle is derived from the * boot.nfsroot.path during mounting by NFSv4. */ nd3->root_fhsize = 0; + nfs_nfsv4root = true; + + /* + * Prime the id<-->name mappings just enough to + * make things work until the nfsuserd(8) daemon + * is started, if the nfsuserd_domain is set to a + * non-empty string. + */ + if ((cp = kern_getenv("boot.nfsroot.user_domain")) != + NULL) { + for (cnt = 0; *cp != '\0' && + nfs_prime_userd[cnt].flag != 0; cnt++) { + nid.nid_flag = + nfs_prime_userd[cnt].flag | + NFSID_SYSSPACE; + if (nfs_prime_userd[cnt].flag == + NFSID_INITIALIZE) { + nid.nid_name = cp; + nid.nid_usermax = 10; + } else { + nid.nid_name = + nfs_prime_userd[cnt].nam; + nid.nid_usertimeout = 3600; + } + nid.nid_namelen = strlen(nid.nid_name); + nid.nid_uid = nfs_prime_userd[cnt].uid; + nid.nid_gid = nfs_prime_userd[cnt].gid; + nid.nid_ngroup = 0; + nid.nid_grps = NULL; + ret = nfssvc_idname(&nid); + if (ret != 0) + printf("nfs_diskless: " + "nfssvc_idname failed %d\n", + ret); + } + freeenv(cp); + } } if ((cp = kern_getenv("boot.nfsroot.path")) != NULL) { strncpy(nd3->root_hostnam, cp, MNAMELEN - 1); From nobody Tue Apr 7 16:30:00 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fqs9h2dm3z6YXbT for ; Tue, 07 Apr 2026 16:30: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fqs9h28dYz44ZV for ; Tue, 07 Apr 2026 16:30:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775579400; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=upEOdYYRj8Gqp6zvJnU9SPyFXFf9WUFp/Ge85nbYOnk=; b=jB0ZeNfiGcK8HxjlGgsVmbrcmdrqy+YGhvB/mVRid2qDgfmJFWSAOw0W6afiKOQAf3j8QS Y+AiSSg2hqLzhli7cfDBWAc015EqVDfU1Ri7MwKG7oJ/6Q2HSh0MyN9Nyp1CNwWqMdUEIb XDIvtt+8/BVXl5rXBx2tGDf92leV4DylG4uCYlvq9jm1/EXEom81GP+RPuYO2SQXCifmST hR2GNl3IKVGCKXcowuZge/Oa5z2FBlDVDC8uZLspA4WPaZ7/o61YvyTNejg8IQixUAWg3n 8VzNKhmzrVo5im7ssX2o6zvLjq35PgZeOZGx7h+do0U8kZHNn0NLtpFCfszSHw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775579400; a=rsa-sha256; cv=none; b=Ubb59l50PPvZP2ja0vt3+wCV28aryZToZDLPrbXOsHzV2akI6ebLRaFJc89c8RR5thY+0U /yZAv2KLsOaayJ0ZxBpixIV4Hkj+itOUhN3h9/aruKYRYsMlTWTE9pxbTagC3VSoyHLTe+ TvFKjhYHVU8heEmFJjSp5mYEvuUDT0DDPEKgjoOZt52f1jEQ3a3LbBudOZGvRu3yerG4aP oZmcJeDjnI57VsuSXbnfTl5heDt0o5Ga8iifia3OFwZCB6EBirVxe1mGqUMLBe9PaIpGlW 3jJpJ5tvETPnS3jvF5q27o+zB/q8b5IX1IWSy81G8fQ9Z5AFtAdNvO33bFH4/Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775579400; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=upEOdYYRj8Gqp6zvJnU9SPyFXFf9WUFp/Ge85nbYOnk=; b=A80rng4fW06cfxXZoGQkUpxVIIRmNQKEloTggtJ5OVR6UgeiUjddAlAMr1BfBVzoBWttC5 OWc7+yZTROev3QIStHy/bv8MHdJO/z/6MUY317ssBy1ghBczpdUdC+EadSwwfUnR1aV6ud YnYhCrtUZoPwmF6eeWqovpaLlvVThfKjCVumhEkyVXeqHIJy6kf+pi6hPFkuhi58aPOeh7 pJL5d2bxIgULl4R9KaYRAyQm3Cttfn0zuzutIWwQvGsQkQrH/fvaaq1EEVT0O0ywbOd5qB 9TjPiG+1tpUCVrXwcfMjFey3XX5ypSbcgbgw1o0NUwwv2uSoa1dqTpPf/nZuDQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fqs9h1fqbznX0 for ; Tue, 07 Apr 2026 16:30:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 18524 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 07 Apr 2026 16:30:00 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Simon J. Gerraty Subject: git: a371b008d13f - main - Add boot_setenv List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a371b008d13f84cf4448bf6d700641ecc15c206b Auto-Submitted: auto-generated Date: Tue, 07 Apr 2026 16:30:00 +0000 Message-Id: <69d53108.18524.3b40af3e@gitrepo.freebsd.org> The branch main has been updated by sjg: URL: https://cgit.FreeBSD.org/src/commit/?id=a371b008d13f84cf4448bf6d700641ecc15c206b commit a371b008d13f84cf4448bf6d700641ecc15c206b Author: Simon J. Gerraty AuthorDate: 2026-04-07 16:29:07 +0000 Commit: Simon J. Gerraty CommitDate: 2026-04-07 16:29:07 +0000 Add boot_setenv Move is_restricted_var() to libsa/environment.c so it can be leveraged by boot_setenv called from subr_boot with not truted input. Also, allow for local tuning via ENV_IS_RESTRICTED_ALLOWED_LIST and ENV_IS_RESTRICTED_LIST Sponsored by: Hewlett Packard Enterprise Development LP. Reviewed by: kevans, imp Differential Revision: https://reviews.freebsd.org/D56287 --- stand/common/commands.c | 60 ++----------------------------------- stand/efi/loader/main.c | 5 ++++ stand/libsa/environment.c | 76 +++++++++++++++++++++++++++++++++++++++++++++++ stand/libsa/stand.h | 3 ++ sys/kern/subr_boot.c | 2 +- 5 files changed, 88 insertions(+), 58 deletions(-) diff --git a/stand/common/commands.c b/stand/common/commands.c index 19452047a0ca..41687ece42fd 100644 --- a/stand/common/commands.c +++ b/stand/common/commands.c @@ -291,63 +291,6 @@ command_show(int argc, char *argv[]) return (CMD_OK); } -#ifdef LOADER_VERIEXEC -static int -is_restricted_var(const char *var) -{ - /* - * We impose restrictions if input is not verified - * allowing for exceptions. - * These entries should include the '=' - */ - const char *allowed[] = { - "boot_function=", - "boot_phase=", - "boot_recover_cli=", - "boot_recover_volume=", - "boot_safe=", - "boot_set=", - "boot_single=", - "boot_verbose=", - NULL, - }; - const char *restricted[] = { - "boot", - "init", - "loader.ve.", - "rootfs", - "secur", - "vfs.", - NULL, - }; - const char **cp; - int ok = -1; - -#ifdef LOADER_VERIEXEC_TESTING - printf("Checking: %s\n", var); -#endif - for (cp = restricted; *cp; cp++) { - if (strncmp(var, *cp, strlen(*cp)) == 0) { - ok = 0; - break; - } - } - if (!ok) { - /* - * Check for exceptions. - * These should match up to '='. - */ - for (cp = allowed; *cp; cp++) { - if (strncmp(var, *cp, strlen(*cp)) == 0) { - ok = 1; - break; - } - } - } - return (ok == 0); -} -#endif - COMMAND_SET(set, "set", "set a variable", command_set); static int @@ -364,6 +307,9 @@ command_set(int argc, char *argv[]) ves = ve_status_get(-1); if (ves == VE_UNVERIFIED_OK) { +#ifdef LOADER_VERIEXEC_TESTING + printf("Checking: %s\n", var); +#endif if (is_restricted_var(argv[1])) { printf("Ignoring restricted variable: %s\n", argv[1]); diff --git a/stand/efi/loader/main.c b/stand/efi/loader/main.c index 1fd6c8d74195..e54f3e1f9f35 100644 --- a/stand/efi/loader/main.c +++ b/stand/efi/loader/main.c @@ -1242,6 +1242,11 @@ main(int argc, CHAR16 *argv[]) /* Report the RSDP early. */ acpi_detect(); +#ifdef LOADER_VERIEXEC + /* tell boot_setenv to be careful */ + set_check_restricted(true); +#endif + /* * Chicken-and-egg problem; we want to have console output early, but * some console attributes may depend on reading from eg. the boot diff --git a/stand/libsa/environment.c b/stand/libsa/environment.c index d139249a8e84..3882db6ee9e1 100644 --- a/stand/libsa/environment.c +++ b/stand/libsa/environment.c @@ -222,6 +222,82 @@ env_noset(struct env_var *ev __unused, int flags __unused, return (EPERM); } +bool +is_restricted_var(const char *name) +{ + /* + * We impose restrictions if input is not verified/trusted + * allowing for exceptions. + * These entries should probably include the '=' + */ + const char *allowed[] = { + "boot_function=", + "boot_phase=", + "boot_recover_cli=", + "boot_recover_volume=", + "boot_safe=", + "boot_set=", + "boot_single=", + "boot_verbose=", +#ifdef ENV_IS_RESTRICTED_ALLOWED_LIST + ENV_IS_RESTRICTED_ALLOWED_LIST, +#endif + NULL, + }; + /* + * These are prefixes we want to be careful with. + */ + const char *restricted[] = { + "boot", + "init", + "loader.ve.", + "rootfs", + "secur", + "vfs.", +#ifdef ENV_IS_RESTRICTED_LIST + ENV_IS_RESTRICTED_LIST, +#endif + NULL, + }; + const char **cp; + int ok = -1; + + for (cp = restricted; *cp; cp++) { + if (strncmp(name, *cp, strlen(*cp)) == 0) { + ok = 0; + break; + } + } + if (!ok) { + for (cp = allowed; *cp; cp++) { + if (strncmp(name, *cp, strlen(*cp)) == 0) { + ok = 1; + break; + } + } + } + return (ok == 0); +} + +static bool check_restricted = false; + +void +set_check_restricted(bool b) +{ + check_restricted = b; +} + +/* called from subr_boot with not quite trusted input */ +int +boot_setenv(const char *name, const char *value) +{ + if (check_restricted && is_restricted_var(name)) { + errno = EPERM; + return -1; + } + return setenv(name, value, 1); +} + int env_nounset(struct env_var *ev __unused) { diff --git a/stand/libsa/stand.h b/stand/libsa/stand.h index aaba0aa7fb39..4f7f21867cea 100644 --- a/stand/libsa/stand.h +++ b/stand/libsa/stand.h @@ -381,6 +381,9 @@ extern int setenv(const char *name, const char *value, int overwrite); extern int putenv(char *string); extern int unsetenv(const char *name); +extern bool is_restricted_var(const char *name); +extern void set_check_restricted(bool); +extern int boot_setenv(const char *name, const char *value); extern ev_sethook_t env_noset; /* refuse set operation */ extern ev_unsethook_t env_nounset; /* refuse unset operation */ diff --git a/sys/kern/subr_boot.c b/sys/kern/subr_boot.c index b721abf7013c..00c8e66617b8 100644 --- a/sys/kern/subr_boot.c +++ b/sys/kern/subr_boot.c @@ -53,7 +53,7 @@ #define GETENV(k) kern_getenv(k) #define FREE(v) freeenv(v) #else /* Boot loader */ -#define SETENV(k, v) setenv(k, v, 1) +#define SETENV(k, v) boot_setenv(k, v) #define GETENV(k) getenv(k) #define FREE(v) #endif From nobody Tue Apr 7 19:33:53 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fqxFz1YVnz6Yns2 for ; Tue, 07 Apr 2026 19:33: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fqxFy75DLz3bM8 for ; Tue, 07 Apr 2026 19:33:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775590439; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jjjKB4tR+3/8/2YtEU7j9dNOnA75VbI6Wl8wS/z3G48=; b=lMIzayDImbhNyfH66UlMPb2s/1KHP/A8LNeVCGVIJA55MMG+La/LXwb8fPasJk2m6z4wV3 gr0FuMSbid+Nby1cDwwL2LqKIn9pc8d9grE81lLH3zeiTG6li3s6n4OpGuc2PMW3T7JC/v PsSsd4dmmAEfqt5/CRcxxd1XdncAyCIXMorygKgu10ghfQoJgGbISSWiHSJKXS/kYrYt08 ZdlVSTf8lMhoOVQCopwtoht0Ck0e3OCC1S8QevwO6XKd2A1Hd8abizsFdqBHeI1MySbJY4 hgbdkd3ey/Dy1kHjy/5XHiOIAOSvtOCaiE4rBqqiFgR+l2+RpwkDB5bPljaCow== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775590439; a=rsa-sha256; cv=none; b=XCkP734pV0q/XNMQvw4QIvfP4+mlG9U7NBQzGAY4YoDnOrnQhiRWT1otNAxTYvL5KXd3Ml jeq3JfrbFpsZpEGbzfTVivTFGqOJCy/nXJNu3LOgjd3tew9S1hWhC7ji7S4q1UCWonO6/I TLu1Jxx+TcUnNjrTd/mJYJEb9uNHrxAiEuMyL7rFctZaWh2gf08ENo2pAcvyhfINUp2BlO MjPKac7CSAYS38h9cltvCNgL2bM+5xjzrcdfRWsmQEUm/dsP5Sbb0eDBvJqBY34mkuILb7 /rg/v/wSodGwgH0LyfO02sQPTEiEE2BuxRXyliNwLJzeEHS4Bwyxukx2FDap2Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775590439; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jjjKB4tR+3/8/2YtEU7j9dNOnA75VbI6Wl8wS/z3G48=; b=S1M5RlA+TFvCXjd7U7suD5fwJG06yuKTwvqPgPtv6WsDvQEHZi+LTRwktTujJIbsmssTRS 0nf0th4g3B+2A3bqitUsRcyRRWoS3WU1cm5x6wchzCfgbhHNN7kdhoW9OQuNjK9dmXk4ZW DsnMAJFZ3mpLCQp8Z/0NET9yTv25qdzy90pnPzC/3Ekpzzzd9PhqvAM+qW65QaC+KoeFma vsuyuAlHsL7VPEwwxQ9NHk9P5oM1LfbeQNPccx1+2iR128XS+GYFrvFHQxevbg1rmRXANT BVEaWZdydDaqNYc2wAfVGQJKsLZ3CpAZAJfE1P1J6XE/kDPbjNtoVbayc07W9Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fqxFs6hclztZw for ; Tue, 07 Apr 2026 19:33:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 363c3 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 07 Apr 2026 19:33:53 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Rick Macklem Subject: git: dc752c26b7e5 - main - RELNOTES: Make an entry for supporting an NFSv4 root fs List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: dc752c26b7e5013557dbc141644e4add1015351d Auto-Submitted: auto-generated Date: Tue, 07 Apr 2026 19:33:53 +0000 Message-Id: <69d55c21.363c3.5f423e7@gitrepo.freebsd.org> The branch main has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=dc752c26b7e5013557dbc141644e4add1015351d commit dc752c26b7e5013557dbc141644e4add1015351d Author: Rick Macklem AuthorDate: 2026-04-07 19:30:40 +0000 Commit: Rick Macklem CommitDate: 2026-04-07 19:32:48 +0000 RELNOTES: Make an entry for supporting an NFSv4 root fs --- RELNOTES | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/RELNOTES b/RELNOTES index cdc5d49e7681..03f05a4ff48e 100644 --- a/RELNOTES +++ b/RELNOTES @@ -10,6 +10,12 @@ newline. Entries should be separated by a newline. Changes to this file should not be MFCed. +8b9775912cbc, 53b4ae3bf0f7: + Add support for an NFSv4 root file system. + Note that NFSv3 is still used for bootstrapping. See: + https://wiki.freebsd.org/MateuszPiotrowski/BootFreebsdFromNfs + for information on how to set it up. + ab9257599a5: The src.conf(5) options WITHOUT_BZIP2 and WITHOUT_BZIP2_SUPPORT have been removed. From nobody Tue Apr 7 20:06:24 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fqxzN2BYDz6YrqP for ; Tue, 07 Apr 2026 20:06: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fqxzN1gTxz3fN0 for ; Tue, 07 Apr 2026 20:06:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775592384; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=83V+3scfdOe/mqq+Juor0XzexagAX8x22u39B/GNI2E=; b=OUm3nREUzIngXfosnc4LH5ImljZUvxA3N0ETCeqdR6aCUc5qto+eEI+gO5QLvZ/bcatCGN WWDYa0ZbinsceAEdF7onSrbHKlh9ea1S9BuZTziNPUpoeg8qummqn+0QbBNY3EWKMWxcOk kEs0SUlXBzYzjClkrX9CxeOGnLoTVN5qryYv5bf4E/Q1mioRuIEumgfLFiA+KXU3Ki8HIZ RM61W4whuKnzXCn+ZRO9gob9Lj29HTtDjrLcpBSvRV0Wbgtr3qh3a/amJRRs70b+AkpmYD pynzPSkwg3XsT+3rExXOSwG4EQ9Urfpsxkv+f5z9Ok5tIRGAnBz+rrQNo8sMJA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775592384; a=rsa-sha256; cv=none; b=xUaABkG9VcCmCQsa6qf0NAnWGBx6EZflVqktM6aE7HaptxbfBLTehJAxXT2uwZDtcu31Tk jI2D7bIDnB6lcSVMh0Vt2qdImmFUAdDP7Yc/gyPHpcIEnBBxs4jd4du/r8IV7hJmSlGcKx lTmgQ/asAB+j1yJXV/TxHM81IfVoQt9DkiAB1e0uee98VaMf9IfjzqNpSkZbq3WLj1KkIO gt4SP6Zqreq3KdbvrPuRdhxmUNAsNpm+l2nmAdg0q1h8dv474qrmpHmQnSFCSzeYyW49H1 2lDTX8hjakrMiXv/kzHvq1fGw8Roa11yPFV7Thmr2znxrqPbm0mELeR9IcLDiw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775592384; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=83V+3scfdOe/mqq+Juor0XzexagAX8x22u39B/GNI2E=; b=pnrLEttPeY8kK5lxBkjrCWH8CLmUgTFPa7st2suMtAiHlBkOdcTCvNVyrjg3Yeu8dg/NcK UK0e60e0LLUSBvvZepS07mshF+wyyvAaMHkVXCHPvOuNA6q00NcejVFCBt+G4wTRML8Tnb v5uYs6KUuRq5enW+M4QRfG1Rv0Ym+wGAGapGK0RlnneG4ywxhFTZBYIJ1gIjknDz17VClR fNluZbuoJcj+oT1A88jpdg07I/WxInTOzzwwCWZau3ATmnUHqfdXUT51sosg9acDTWtNxb 8XKJzFCU5puTskiZuThB/tzQBj6VTN16B2kmjQYYY4X2vFFg6KCxkIKZfoM7Yw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fqxzN17t7zvWj for ; Tue, 07 Apr 2026 20:06:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 38559 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 07 Apr 2026 20:06:24 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Rick Macklem Subject: git: cc2f8f3786d6 - main - RELNOTES: Update the entry for commit 8b9775912cbc List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cc2f8f3786d6e0ef01e2b2feadb804c1f86716da Auto-Submitted: auto-generated Date: Tue, 07 Apr 2026 20:06:24 +0000 Message-Id: <69d563c0.38559.4cb15976@gitrepo.freebsd.org> The branch main has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=cc2f8f3786d6e0ef01e2b2feadb804c1f86716da commit cc2f8f3786d6e0ef01e2b2feadb804c1f86716da Author: Rick Macklem AuthorDate: 2026-04-07 20:04:36 +0000 Commit: Rick Macklem CommitDate: 2026-04-07 20:04:36 +0000 RELNOTES: Update the entry for commit 8b9775912cbc --- RELNOTES | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/RELNOTES b/RELNOTES index 03f05a4ff48e..b0076bf77bf3 100644 --- a/RELNOTES +++ b/RELNOTES @@ -12,9 +12,14 @@ Changes to this file should not be MFCed. 8b9775912cbc, 53b4ae3bf0f7: Add support for an NFSv4 root file system. - Note that NFSv3 is still used for bootstrapping. See: - https://wiki.freebsd.org/MateuszPiotrowski/BootFreebsdFromNfs - for information on how to set it up. + Note that NFSv3 is still used for bootstrapping. See + "Diskless Operation with PXE" under "Advanced Networking" in the + FreeBSD Handbook. To configure an NFSv4 root fs, you will need + a line in /boot/loader.conf like boot.nfsroot.options="nfsv4" and + either a line in /etc/sysctl.conf like vfs.nfs.enable_uidtostring=1 + or an additional line in /boot/loader.conf like + boot.nfsroot.user_domain="", + if you are running nfsuserd(8). ab9257599a5: The src.conf(5) options WITHOUT_BZIP2 and WITHOUT_BZIP2_SUPPORT From nobody Wed Apr 8 00:51:02 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fr4Hv64vwz6Y49D for ; Wed, 08 Apr 2026 00:51: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fr4Hv5X7Lz3CTn for ; Wed, 08 Apr 2026 00:51:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775609467; 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; bh=k3hl7TUKrI4KrJ9nQCROaD9hRba0XFHIMsmqcEJfj2M=; b=OrJbRNbHRG9Ey/kD36pHufCLOrgeST0yHWgHmGSYjmgmrn9O173Fyw69S6nwn5a3mWJBRY +l8dSTUDCHFQ1SdMpX9SXT1WqZ7mrK1Srn7Ia2ZKenibYHgzCTRoJBc2A4KSH2mJY4Y2XV NdowGLFzUjmNOnLHXZkaW8JzNu+iPO1EXxuDm3CSVe8FTSX24TbnxONJrzKflTYeZd1Al5 BxhhMkiPfxHmO/5x2+O1Sd4glIY7+lq54/BK403Q2wyzoCWwyaNuNJcLqlQlZqno1Aviml 0n6ZpoTluNDdp2zow1kyrOpLaRh7SCi5stH3fqukENxhN+B7Sg+n/8nnWT9H8w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775609467; a=rsa-sha256; cv=none; b=xIkh+iKDCAXIzVGXJitxpf8fOcqm9H2yrl2aY1JTrs407h3EZrtVjwqZc1ZqgtS5VLlmN7 +Cb+YxGS2MuGdMw3jutThkLPu1PlN8i/i1P+15bzFHmMjc6wZDFCIbZKoGg6H3QzCDe4ks nU5SgOo/5JeOyZiBit5rlpwgj3lwLhCKgAe50H1jCzQ9SXvuNK1FhXJPtxXf2/YNfbF5bO j29LLGAuueY9EDgKQeWHasfzdxUJcwYLfSwlCildoj9h85w9Hsa8PXrkB5baCyd8g7o7zg CN6oJV+GXTENSQU2dkIauCBsK6/icyyNqWB/j9WAjJtpIUsGqVETKGLGrZaYbQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775609467; 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; bh=k3hl7TUKrI4KrJ9nQCROaD9hRba0XFHIMsmqcEJfj2M=; b=GeyxLpLmm4+dOr0WzhQFms8Ti7BhInphmTSLBrZSvACp68RdC4qAWg0SWAuIw2R4cVw9SD Hy8vHpNGqW6Fxv01kBJ/1FiOMY0YWUML/rd1Md9hsWpfQdDEvVMkKGhjEQaHJVyTlJ3HO0 iFaP6bF9mqyqHHQT8ax3ItiJ3IZJeNwZeCnSk4JFVE+9zHvstQpSC2SPJSVpxnCeD8mnY9 mexEUh7bfHNFUDMgW9zg/OtqZayCcNBvMuNPpoxhb+bItUucbG/Vkc6mAv5JbdllsfM7A+ 4EkSvMuTpLBY3DoQAknQKzkVdmsvPtcsJxsYZ+wBpdx7LHXhov7vGek++BDyEA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fr4Hv50z8z13WM for ; Wed, 08 Apr 2026 00:51:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 38b5b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 08 Apr 2026 00:51:02 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Weixie Cui From: Enji Cooper Subject: git: e8053023e7c0 - main - arm64/apple: Fix malloc size for per-CPU arrays in AIC attach List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: e8053023e7c07214a7b0a97f0f087ba02b329157 Auto-Submitted: auto-generated Date: Wed, 08 Apr 2026 00:51:02 +0000 Message-Id: <69d5a676.38b5b.6d161c3e@gitrepo.freebsd.org> The branch main has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=e8053023e7c07214a7b0a97f0f087ba02b329157 commit e8053023e7c07214a7b0a97f0f087ba02b329157 Author: Weixie Cui AuthorDate: 2026-03-31 10:24:08 +0000 Commit: Enji Cooper CommitDate: 2026-04-08 00:50:25 +0000 arm64/apple: Fix malloc size for per-CPU arrays in AIC attach sizeof(*sc->sc_ipimasks) * mp_maxid + 1 is parsed as (sizeof(*sc->sc_ipimasks) * mp_maxid) + 1, so the buffers were one byte short of a full (mp_maxid + 1) element count. Multiply by (mp_maxid + 1) for sc_ipimasks and sc_cpuids. Signed-off-by: Weixie Cui Reviewed-by: kevans, ngie Pull-Request: https://github.com/freebsd/freebsd-src/pull/2112 --- sys/arm64/apple/apple_aic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/arm64/apple/apple_aic.c b/sys/arm64/apple/apple_aic.c index c9ce3b4d2165..683339369a87 100644 --- a/sys/arm64/apple/apple_aic.c +++ b/sys/arm64/apple/apple_aic.c @@ -213,10 +213,10 @@ apple_aic_attach(device_t dev) } #ifdef SMP - sc->sc_ipimasks = malloc(sizeof(*sc->sc_ipimasks) * mp_maxid + 1, + sc->sc_ipimasks = malloc(sizeof(*sc->sc_ipimasks) * (mp_maxid + 1), M_DEVBUF, M_WAITOK | M_ZERO); #endif - sc->sc_cpuids = malloc(sizeof(*sc->sc_cpuids) * mp_maxid + 1, + sc->sc_cpuids = malloc(sizeof(*sc->sc_cpuids) * (mp_maxid + 1), M_DEVBUF, M_WAITOK | M_ZERO); cpu = PCPU_GET(cpuid); From nobody Wed Apr 8 07:16:29 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4frDrY3r0Hz6YbPX for ; Wed, 08 Apr 2026 07:16: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4frDrY2yTrz3n4S for ; Wed, 08 Apr 2026 07:16:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775632589; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mNin1E/iz2hNQkz6GxqepRbxYhY3HufYmnP8udwXSts=; b=wROcfYitF5ChGJG3t2G+cVwH3qx4cXeR5z1mLBBKNhuf9ljHAkPNnucBCJGSiw+FBkcPp+ VtOBDjk8RXcnBc0AO/gbxdp6zXVOtmf5Lcvzl0nRYzrrKFnwuzpJXu7ZQCx21ynhx+icQ0 Uy6Mv1w1G1zwvpD3aWl6SZkiSjXxtd8r1yGWLFl947NF5wB2d06yJRu4v+Jet1dHgZth6+ +nAwPgH60kLSeFlaf4HmyH27SCAdcoPscHqAxEFMEC4t84Bhzt7cAt3tSMGD+gS+xIQ1KZ 8ftKa8ltLtOHdjiEzqFmZ1PCBSH8irmhuki55PaJhA7eO04COdvJgNawu+9JoQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775632589; a=rsa-sha256; cv=none; b=R8oVhT51KQowt3NtpA8HSh6WM9WxYdQwG0bAPy8uETAsalY4bSzcq3VadIl47VxtO5xo/k oXQc+Qm23xjnKRob39t75n7CdOvbYbbaM3/OYiQbD/58uC2vXpzkGzv4KCqS9eVhstAS0M LN5gP8P0+Am3HfzSNJxc0xk+C0wUzPXDkXPYovWqGrb9Zd5jYdboW57vKF43VajB+Odp6p VFzCZpZujAkUO/nqYBGxjAs8T5G/owL72I4+DNYt0HWh+G5BNbjUrRGCeWl4qk54ZWIg1W Z5jTse9hAH9UhMOOxj4OuM6gBCE2oe/JVYWTkZkvrlsHXurN9uD10HHe+4b0/w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775632589; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mNin1E/iz2hNQkz6GxqepRbxYhY3HufYmnP8udwXSts=; b=SMWerzIFCS4HYBRfAIGwBjytfMoczx72DJFc5rWP89m8kDv54rFe7+gWSYFcTLQGjACwij fDyNVQAfAULxRUPtkd0F3gw2UuIHOzPlH5/qVV4Y2157M2rzhpvQTjGiQxENCTFnKINlk5 z8Maoddusk9POeeffvfwf01VzYVwgmvBQZ/rsDsEn0TTwaWDIe/1szMwwPbLZ86BTiEKde rvJWxXrPmQyccBa+Os6/cuO4AYD9Ztt0hHEHkmU5D/PVSMwJ5VkZRWzl0SnWNHWpWWoxHl VFKFrzEIkMiH9/6Lfi+HgFY3oyOhzdmWT5Fwg9Ujc1c+XF4bA6/DV28La5dE/Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4frDrY2Ybcz1LM for ; Wed, 08 Apr 2026 07:16:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 38cad by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 08 Apr 2026 07:16:29 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Muhammad Moinur Rahman Subject: git: a71fea51cecf - main - contrib/libucl: Revert to old behavior of macros List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bofh X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a71fea51cecfe3bb70247ad62668e380e0f069ad Auto-Submitted: auto-generated Date: Wed, 08 Apr 2026 07:16:29 +0000 Message-Id: <69d600cd.38cad.5f3a7a8e@gitrepo.freebsd.org> The branch main has been updated by bofh: URL: https://cgit.FreeBSD.org/src/commit/?id=a71fea51cecfe3bb70247ad62668e380e0f069ad commit a71fea51cecfe3bb70247ad62668e380e0f069ad Author: Muhammad Moinur Rahman AuthorDate: 2026-04-07 18:27:20 +0000 Commit: Muhammad Moinur Rahman CommitDate: 2026-04-08 07:10:26 +0000 contrib/libucl: Revert to old behavior of macros Enable macros and includes by default as this is breaking package building on HEAD. libucl 0.9.3 by default changed the behavior of includes and macros. These were previously enabled but it switched to disabled which breaks the package building in HEAD. This is a temporary workaround for now to fix the package building specially for releng/15.0. This might be reverted post EOL of 15.0 in the coming months. Reported by: ivy Fixes: abda442d92fd ("contrib/libucl: Import libucl 0.9.3") Tested by: ivy Approved by: ivy, kevans Differential Revision: https://reviews.freebsd.org/D56294 --- contrib/libucl/lua/lua_ucl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/libucl/lua/lua_ucl.c b/contrib/libucl/lua/lua_ucl.c index 0420ad87e26f..8664855b2d25 100644 --- a/contrib/libucl/lua/lua_ucl.c +++ b/contrib/libucl/lua/lua_ucl.c @@ -656,7 +656,7 @@ lua_ucl_parser_init (lua_State *L) * files. Macros in the parser are very dangerous and should be used * for trusted data only. */ - int flags = UCL_PARSER_NO_FILEVARS|UCL_PARSER_DISABLE_MACRO; + int flags = 0; if (lua_gettop (L) >= 1) { flags = lua_tonumber (L, 1); From nobody Wed Apr 8 07:48:47 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4frFYq6B9xz6YdLK for ; Wed, 08 Apr 2026 07:48: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4frFYq5PnTz3qpN for ; Wed, 08 Apr 2026 07:48:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775634527; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dkK/64ebuCNeyYrLtZIPlvb4OYszPanHombdzSTdbAA=; b=UoW1Ur+jHEvg0N2oGTOr+tIbkbMGVE7FDKbn27maMDG2HEvUB6jKyFeX1mfRCOOkEi8Bi9 HqOi4ZgocE6tmQkml56i0/ICyvqJOOdliSAf8xTpFafzCAGyM9e5Bwh+EVs57l4YQIbOZo d7lRA4FfkDaYRpIvjhDyQM+ZnYrPv7P0yNEPT42hFe0Y9eEeVzYEpYpaPVl+cF0rqAc4Dl yCByAh3gLnOUXmhxujkEmwT+T41fsJRHJSrC/c6hu0UfyZVA005eYnu2nwHkrsWg6j+R5W GXnGVKu0BdOvaAE43fjWO7aQOI/+Hzc30fHR+K4MmprhQy80iEdVWxcrtNaxMQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775634527; a=rsa-sha256; cv=none; b=lIc+pnIwlt5O0rU5hQ3CRrx9PDXYua0UJuJMAnPD2x8WkOGoOsJdO8e3xxuWAYzhDKn0fT fPHCU+CrGkI+Yo2LMDcX0vJi9kwNx7+v4P4DEpfrm9FrwZDB5JgrvvC2p5GXbrOWKUMGZz JQb2OBYrTpXGeIhpjOmiovOUH/YsG1NsPjLRRWa4Yy0BzCJWUXiMEVETW6A/jtSKcWwp4G xAzaCJ6MMFprZGTVJcTDa+0BoMHl/U8+pi6WmbVKBX1D6bHaHCACnxgqDY6cqeXCN2u/rg Mw7PaTuE6oKeDBAVUfVAq0ed/Ygg60pqAYU4TS5vhehvBIlQepQSVze9IH5QsQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775634527; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dkK/64ebuCNeyYrLtZIPlvb4OYszPanHombdzSTdbAA=; b=TBaZo3wixSpjM5UQsz8TKBrXehpcIYJErENMA2CFv8lHpDZA7yj8GTxMn8pKocYFLD5jOC j5NQkXPxxZy+UNAmu+fpdxDXbwRUphQ41oMW92r1oYBGyVl+VPXIihM7YgwLjZGyt+ytsN OEUOka435We5NHk4HBqy5nRU8d+qz1apMu4uIatRRUBHruxhC/utLlEgfHc/VB35P/NyRU OqmXzhjM+UD9rBpfK/9aBn2OI7AbclwuQRW0/5OFRIgOQKmaG14SfcZDjg0cBYf42tCAFM AycUW/ycdr3RqcptRDRE71dSuiaOdVG3It8Ebr/LlQ7zHDXfHsIK6enXRqKWhA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4frFYq4Tqbz2MD for ; Wed, 08 Apr 2026 07:48:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3a62a by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 08 Apr 2026 07:48:47 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: ShengYi Hung Subject: git: 095cbb1bb7f7 - main - hwpstate_amd: Expose nodes as much as possible in legacy pstate List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: aokblast X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 095cbb1bb7f7b4f742b0a500aa2c61a8c97d4b41 Auto-Submitted: auto-generated Date: Wed, 08 Apr 2026 07:48:47 +0000 Message-Id: <69d6085f.3a62a.67b96686@gitrepo.freebsd.org> The branch main has been updated by aokblast: URL: https://cgit.FreeBSD.org/src/commit/?id=095cbb1bb7f7b4f742b0a500aa2c61a8c97d4b41 commit 095cbb1bb7f7b4f742b0a500aa2c61a8c97d4b41 Author: ShengYi Hung AuthorDate: 2026-04-08 07:45:11 +0000 Commit: ShengYi Hung CommitDate: 2026-04-08 07:48:34 +0000 hwpstate_amd: Expose nodes as much as possible in legacy pstate Reviewed by: olce Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D55606 --- sys/x86/cpufreq/hwpstate_amd.c | 156 ++++++++++++++++++++++++----------------- 1 file changed, 91 insertions(+), 65 deletions(-) diff --git a/sys/x86/cpufreq/hwpstate_amd.c b/sys/x86/cpufreq/hwpstate_amd.c index ccf13f06a6d1..4be295075482 100644 --- a/sys/x86/cpufreq/hwpstate_amd.c +++ b/sys/x86/cpufreq/hwpstate_amd.c @@ -552,6 +552,20 @@ hwpstate_amd_iscale(int val, int div) return (val); } +static void +hwpstate_pstate_read_limit(int cpu, uint64_t *msr) +{ + (void)x86_msr_op(MSR_AMD_10H_11H_LIMIT, + MSR_OP_READ | MSR_OP_RENDEZVOUS_ONE | MSR_OP_CPUID(cpu), 0, msr); +} + +static void +hwpstate_pstate_read_status(int cpu, uint64_t *msr) +{ + (void)x86_msr_op(MSR_AMD_10H_11H_STATUS, + MSR_OP_READ | MSR_OP_RENDEZVOUS_ONE | MSR_OP_CPUID(cpu), 0, msr); +} + /* * Go to Px-state on all cpus, considering the limit register (if so * configured). @@ -561,11 +575,13 @@ hwpstate_goto_pstate(device_t dev, int id) { sbintime_t sbt; uint64_t msr; - int cpu, i, j, limit; + int cpu, j, limit; + + cpu = cpu_get_pcpu(dev)->pc_cpuid; if (hwpstate_pstate_limit) { /* get the current pstate limit */ - msr = rdmsr(MSR_AMD_10H_11H_LIMIT); + hwpstate_pstate_read_limit(cpu, &msr); limit = AMD_10H_11H_GET_PSTATE_LIMIT(msr); if (limit > id) { HWPSTATE_DEBUG(dev, "Restricting requested P%d to P%d " @@ -574,53 +590,31 @@ hwpstate_goto_pstate(device_t dev, int id) } } - cpu = curcpu; HWPSTATE_DEBUG(dev, "setting P%d-state on cpu%d\n", id, cpu); /* Go To Px-state */ - wrmsr(MSR_AMD_10H_11H_CONTROL, id); - - /* - * We are going to the same Px-state on all cpus. - * Probably should take _PSD into account. - */ - CPU_FOREACH(i) { - if (i == cpu) - continue; - - /* Bind to each cpu. */ - thread_lock(curthread); - sched_bind(curthread, i); - thread_unlock(curthread); - HWPSTATE_DEBUG(dev, "setting P%d-state on cpu%d\n", id, i); - /* Go To Px-state */ - wrmsr(MSR_AMD_10H_11H_CONTROL, id); - } + x86_msr_op(MSR_AMD_10H_11H_CONTROL, + MSR_OP_WRITE | MSR_OP_RENDEZVOUS_ONE | MSR_OP_CPUID(cpu), id, NULL); /* * Verify whether each core is in the requested P-state. */ if (hwpstate_verify) { - CPU_FOREACH(i) { - thread_lock(curthread); - sched_bind(curthread, i); - thread_unlock(curthread); - /* wait loop (100*100 usec is enough ?) */ - for (j = 0; j < 100; j++) { - /* get the result. not assure msr=id */ - msr = rdmsr(MSR_AMD_10H_11H_STATUS); - if (msr == id) - break; - sbt = SBT_1MS / 10; - tsleep_sbt(dev, PZERO, "pstate_goto", sbt, - sbt >> tc_precexp, 0); - } - HWPSTATE_DEBUG(dev, "result: P%d-state on cpu%d\n", - (int)msr, i); - if (msr != id) { - HWPSTATE_DEBUG(dev, - "error: loop is not enough.\n"); - return (ENXIO); - } + /* wait loop (100*100 usec is enough ?) */ + for (j = 0; j < 100; j++) { + /* get the result. not assure msr=id */ + + hwpstate_pstate_read_status(cpu, &msr); + if (msr == id) + break; + sbt = SBT_1MS / 10; + tsleep_sbt(dev, PZERO, "pstate_goto", sbt, + sbt >> tc_precexp, 0); + } + HWPSTATE_DEBUG(dev, "result: P%d-state on cpu%d\n", (int)msr, + cpu); + if (msr != id) { + HWPSTATE_DEBUG(dev, "error: loop is not enough.\n"); + return (ENXIO); } } @@ -670,7 +664,6 @@ hwpstate_get_cppc(device_t dev, struct cf_setting *cf) pc = cpu_get_pcpu(dev); if (pc == NULL) return (ENXIO); - memset(cf, CPUFREQ_VAL_UNKNOWN, sizeof(*cf)); cf->dev = dev; if ((ret = cpu_est_clockrate(pc->pc_cpuid, &rate))) @@ -685,13 +678,14 @@ hwpstate_get_pstate(device_t dev, struct cf_setting *cf) struct hwpstate_softc *sc; struct hwpstate_setting set; uint64_t msr; + int cpu; sc = device_get_softc(dev); - msr = rdmsr(MSR_AMD_10H_11H_STATUS); + cpu = cpu_get_pcpu(dev)->pc_cpuid; + hwpstate_pstate_read_status(cpu, &msr); if (msr >= sc->cfnum) return (EINVAL); set = sc->hwpstate_settings[msr]; - cf->freq = set.freq; cf->volts = set.volts; cf->power = set.power; @@ -967,8 +961,10 @@ hwpstate_probe_pstate(device_t dev) device_t perf_dev; int error, type; uint64_t msr; + int cpu; sc = device_get_softc(dev); + cpu = cpu_get_pcpu(dev)->pc_cpuid; /* * Check if acpi_perf has INFO only flag. */ @@ -985,15 +981,15 @@ hwpstate_probe_pstate(device_t dev) */ HWPSTATE_DEBUG(dev, "acpi_perf will take care of pstate transitions.\n"); return (ENXIO); - } else { - /* - * If acpi_perf has INFO_ONLY flag, (_PCT has FFixedHW) - * we can get _PSS info from acpi_perf - * without going into ACPI. - */ - HWPSTATE_DEBUG(dev, "going to fetch info from acpi_perf\n"); - error = hwpstate_get_info_from_acpi_perf(dev, perf_dev); } + /* + * If acpi_perf has INFO_ONLY flag, (_PCT has FFixedHW) + * we can get _PSS info from acpi_perf + * without going into ACPI. + */ + HWPSTATE_DEBUG(dev, + "going to fetch info from acpi_perf\n"); + error = hwpstate_get_info_from_acpi_perf(dev, perf_dev); } } @@ -1002,7 +998,7 @@ hwpstate_probe_pstate(device_t dev) * Now we get _PSS info from acpi_perf without error. * Let's check it. */ - msr = rdmsr(MSR_AMD_10H_11H_LIMIT); + hwpstate_pstate_read_limit(cpu, &msr); if (sc->cfnum != 1 + AMD_10H_11H_GET_PSTATE_MAX_VAL(msr)) { HWPSTATE_DEBUG(dev, "MSR (%jd) and ACPI _PSS (%d)" " count mismatch\n", (intmax_t)msr, sc->cfnum); @@ -1042,15 +1038,8 @@ hwpstate_probe(device_t dev) sc->flags |= HWPFL_USE_CPPC; device_set_desc(dev, "AMD Collaborative Processor Performance Control (CPPC)"); - } else { - /* - * No CPPC support. Only keep hwpstate0, it goes well with - * acpi_throttle. - */ - if (device_get_unit(dev) != 0) - return (ENXIO); + } else device_set_desc(dev, "Cool`n'Quiet 2.0"); - } sc->dev = dev; if ((sc->flags & HWPFL_USE_CPPC) != 0) { @@ -1119,22 +1108,59 @@ hwpstate_attach(device_t dev) return (cpufreq_register(dev)); } +struct hwpstate_pstate_read_settings_cb { + struct hwpstate_softc *sc; + uint64_t *vals; + int err; +}; + +static void +hwpstate_pstate_read_settings_cb(void *args) +{ + struct hwpstate_pstate_read_settings_cb *req = args; + int i; + + req->err = 0; + for (i = 0; i < req->sc->cfnum; i++) { + req->err = rdmsr_safe(MSR_AMD_10H_11H_CONFIG + i, + &req->vals[i]); + if (req->err != 0) + return; + } +} + +static int +hwpstate_pstate_read_settings(struct hwpstate_softc *sc, uint64_t vals[]) +{ + struct hwpstate_pstate_read_settings_cb req; + device_t dev; + + req.sc = sc; + req.vals = vals; + dev = sc->dev; + smp_rendezvous_cpu(cpu_get_pcpu(dev)->pc_cpuid, + smp_no_rendezvous_barrier, hwpstate_pstate_read_settings_cb, + smp_no_rendezvous_barrier, &req); + return (req.err); +} + static int hwpstate_get_info_from_msr(device_t dev) { struct hwpstate_softc *sc; struct hwpstate_setting *hwpstate_set; - uint64_t msr; + uint64_t state_settings[AMD_10H_11H_MAX_STATES], msr; int family, i, fid, did; family = CPUID_TO_FAMILY(cpu_id); sc = device_get_softc(dev); /* Get pstate count */ - msr = rdmsr(MSR_AMD_10H_11H_LIMIT); + hwpstate_pstate_read_limit(cpu_get_pcpu(dev)->pc_cpuid, &msr); sc->cfnum = 1 + AMD_10H_11H_GET_PSTATE_MAX_VAL(msr); hwpstate_set = sc->hwpstate_settings; + hwpstate_pstate_read_settings(sc, state_settings); for (i = 0; i < sc->cfnum; i++) { - msr = rdmsr(MSR_AMD_10H_11H_CONFIG + i); + msr = state_settings[i]; if ((msr & ((uint64_t)1 << 63)) == 0) { HWPSTATE_DEBUG(dev, "msr is not valid.\n"); return (ENXIO); From nobody Wed Apr 8 11:26:31 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4frLP91Nc7z6Xxcj for ; Wed, 08 Apr 2026 11:26: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4frLP90pMwz3KrJ for ; Wed, 08 Apr 2026 11:26:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775647597; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7E1sf5icffjWTU65ezQmlotVaBEDJj726iGR9BNpbaY=; b=TgBO1PVAuSlsWyipgTF18yhYIBIKeMeGygDu4ZTM5XTUVvWKX7RAtWoes3HNsGtRVxQ+iz 97B8S5zvALRmcyUUmX8WKg/k+pCeX9Q3wmI24Y8rzt2UDtEmEm7/PyDJmpHtzpl5voFvQJ F+VOK5v0CdWLxgIMRd6//rTwh2chg9mZ0eU99ynr9LbASZw1PjKfZ36GgaKu4ytmBL8PsZ ywrIj+n94SED2sYsICxjtuN/Jr2UqYwJ+T+i0nH2v3ivcX5N2zGP4Y9hHt8djwPOpcTUrJ cr80Y9zYH5xSupnO0awYSRHYOFhJFJJLcA7Kezj9jydTEO9KQvenhH0poUnqBg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775647597; a=rsa-sha256; cv=none; b=yjcef+uUSB45moDz3ot3+KU2d5SybxNF1WFBqLZXwlBCQIrfkKNaJnMS7G9NdJhLh/bg4t enUPqSvBXIcFYWClO2PxicOleO96mvmOy8iZNyxbVVIxAQOt94BJVHoeyWIjOzOA3Wu1n2 Y2kAbH2fPC7nXRkerGoaAhJERtMDBTNiovzQKKjCP8PQhtkhkE5GjEqgDwwP6VUqTR+J4u ghrWWE6EmedjePppXeTixajg8yuXQ/zH/V9+qkqdiLsSJTskhiOkW4OubgoOKhCDWuCxqz u7+CxTnhM7wSKmF7x3Z+CbALDQFFLOmN0iXgA8HKWPs1OYtFjJTKc3CFPthJXg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775647597; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7E1sf5icffjWTU65ezQmlotVaBEDJj726iGR9BNpbaY=; b=gD4dQPDK1xyTzFYnuJsfsVKH8RgMtr1zuBsVjA9BN0swh95tLN8zv204TRoaldXGPWHaRo cKEtHiJkGJyow+O2mr4ggzbmWKugqiw1SW4UVSYGL3yfB4hluIDiRjOMsFmNo9IJxhKg4a rRgBb1EZIgDulbLsKkJoWahm3etnMYhhiP5ZbJkcyRsHS5YOYwVNMIGjqBUywflpsYuexX ei+01pIpkTpFe//LmV0RFk4a5pnvJxXIlfIz//+dA5Zp/tp73xJ9JMKnITx26zxyi/DdOO ErCHDShnJH6GhxI0NnvXK2Wky9ZPmBhj+CtQuBDiW18edNs/G3yAZLrm9FEcPQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4frLP90Ppsz8bD for ; Wed, 08 Apr 2026 11:26:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 21ec5 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 08 Apr 2026 11:26:31 +0000 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=B8rg?=rav Subject: git: 1c793e7cbe2e - main - stat: Nits in readlink tests List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1c793e7cbe2ecded388fd51fb20274891620a6f4 Auto-Submitted: auto-generated Date: Wed, 08 Apr 2026 11:26:31 +0000 Message-Id: <69d63b67.21ec5.286646d4@gitrepo.freebsd.org> The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=1c793e7cbe2ecded388fd51fb20274891620a6f4 commit 1c793e7cbe2ecded388fd51fb20274891620a6f4 Author: Dag-Erling Smørgrav AuthorDate: 2026-04-08 11:26:23 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-04-08 11:26:23 +0000 stat: Nits in readlink tests * The f_flag test may fail if a component of the full path to the temporary directory is a symbolic link. * The n_flag test had an empty head; give it a description. * Use consistent quoting. MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D56293 --- usr.bin/stat/tests/readlink_test.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/usr.bin/stat/tests/readlink_test.sh b/usr.bin/stat/tests/readlink_test.sh index d0107e0d655e..8eff21fa7a16 100755 --- a/usr.bin/stat/tests/readlink_test.sh +++ b/usr.bin/stat/tests/readlink_test.sh @@ -33,7 +33,7 @@ basic_head() basic_body() { atf_check ln -s foo bar - atf_check -o inline:'foo\n' readlink bar + atf_check -o inline:"foo\n" readlink bar } atf_test_case f_flag @@ -44,6 +44,7 @@ f_flag_head() } f_flag_body() { + cd "$(realpath "$PWD")" atf_check touch A.file atf_check ln -s nonexistent A.link atf_check -o inline:"nonexistent\n" \ @@ -55,13 +56,15 @@ f_flag_body() atf_test_case n_flag n_flag_head() { + atf_set "descr" "Verify that calling readlink with -n will not emit " \ + "a newline character." } n_flag_body() { atf_check ln -s nonexistent.A A atf_check ln -s nonexistent.B B - atf_check -o 'inline:nonexistent.A\nnonexistent.B\n' readlink A B - atf_check -o 'inline:nonexistent.Anonexistent.B' readlink -n A B + atf_check -o inline:"nonexistent.A\nnonexistent.B\n" readlink A B + atf_check -o inline:"nonexistent.Anonexistent.B" readlink -n A B } atf_init_test_cases() From nobody Wed Apr 8 12:11:50 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4frMPM10lDz6Y2CJ for ; Wed, 08 Apr 2026 12:11: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4frMPM0N79z3QJf for ; Wed, 08 Apr 2026 12:11:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775650311; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+IiPF8gfABaK1lYMTcrJ4090sUAckmx5gGquxKbT2Ao=; b=InbOXc4tvCMsBFxs9lWYfwxEtDLSc+W1YsGw51djZIvSFDiCVxMASQa0B2r0eboDDAZgZA ZR2mdqLQap6qGU3IVO2x97+/b2ZEa1NqolNOchVGUNo2IqL1haOTyG6Gk6YcU3Eon/fZLx 9jdF1K5BoSUM3rEoY4k+Sb1NKFlUBzHGanFSLo2Qr/t88CGFreRnGY706vmkyu69DFSxka ZStZDktz0FATW/GwhfKhLuwB15fyOo1+sdvr9o3rvrEqBAwAeEAFLfdIKySCrf9amRa9B+ TBRjTrh52Vj5WBhTDx6BEREoV7W822rPQ0mJT/I6iVpmPlMliwNR7Muv0eLcxA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775650311; a=rsa-sha256; cv=none; b=EE6+N6iA7x3mYguN/KmP79wV9TEBtqx6i5Z30f4n7TKNSBu1mTNRc4SgGuUwxHoULrusY8 i1vr9bG+rTFjYsfPuctPV9zVmVWGm00BdtQgYMtVzpmii+ISnlPoOwMsdlEhSTh23eiu6F rNIcRCoqlsjuM1/qJ3z2E/ODilxbjtdQnGUOjjCKwmUSGpwz/3vm8+2tnOiP6Ejj3y/G4W KaD6l1Oq7h/6tzTyJ2hlaBiKeLtWOhgFF0xEmv6imE6bfacjpTmDgGpzbdpHA+hVYFITVx 5ae1V2w9kYLVwwYy6a3ktQno1d5qdo+cTo7RSoGcvtMQoWKpc9otpD3EsQr2YQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775650311; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+IiPF8gfABaK1lYMTcrJ4090sUAckmx5gGquxKbT2Ao=; b=cVWgSvx2aFUfpAE01S+42Vayy172yNGKeJzAjY9e/mrpGmxoLoN+TQpghU3oyUZzeLSxTg dMOJAbnp9aVgKBWXfwnFHf406H3QtfMSReEhQdl+37NKArLiSxOEEln8BpirWMno3VLwO/ jYKDSx7vPU+NmOEoYoooc+t6nN8pgQmEzshPflvXhyC+hzXv2eAetib9VxicnPEAPtc62L kJQqXutuiKNugd9jpCAAjmSCAWq0lODlfGeCQk72CCHiYoXRlUCCfjKAvA/rh+yB+veGKg LPYsqsDghiuqLum4DE5rJYo1yRonD4wpKX+4tnLVaMJm00vR9hPmFcr70KWQaw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4frMPL72NHz9gk for ; Wed, 08 Apr 2026 12:11:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 27533 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 08 Apr 2026 12:11:50 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Aymeric Wibo Subject: git: 19ab46cc6604 - main - acpi: Parse _S3D in s2idle instead of _S255D List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: 19ab46cc66045ea936475f1a1e08763eb2fd663e Auto-Submitted: auto-generated Date: Wed, 08 Apr 2026 12:11:50 +0000 Message-Id: <69d64606.27533.60b92c0f@gitrepo.freebsd.org> The branch main has been updated by obiwac: URL: https://cgit.FreeBSD.org/src/commit/?id=19ab46cc66045ea936475f1a1e08763eb2fd663e commit 19ab46cc66045ea936475f1a1e08763eb2fd663e Author: Aymeric Wibo AuthorDate: 2026-03-04 13:09:14 +0000 Commit: Aymeric Wibo CommitDate: 2026-04-08 12:11:23 +0000 acpi: Parse _S3D in s2idle instead of _S255D Previously, when entering s2idle, we were parsing the _S255D object to get the shallowest D-state supported by device, as acpi_stype_to_sstate() returns -1 for s2idle. Instead, we should read _S3D. Relevant document: https://uefi.org/htmlspecs/ACPI_Spec_6_4_html/07_Power_and_Performance_Mgmt/device-power-management-objects.html#s3d-s3-device-state Reviewed by: olce Tested by: emaste, olce Approved by: olce Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D55118 --- sys/dev/acpica/acpi.c | 84 +++++++++++++++++++++++++++++++-------------------- 1 file changed, 52 insertions(+), 32 deletions(-) diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c index 98578b383f42..bdc197a4fb59 100644 --- a/sys/dev/acpica/acpi.c +++ b/sys/dev/acpica/acpi.c @@ -2131,44 +2131,64 @@ acpi_bus_get_prop(device_t bus, device_t child, const char *propname, } } +static int +acpi_device_pwr_for_sleep_sxd(device_t dev, ACPI_HANDLE handle, int state, + int *dstate) +{ + ACPI_STATUS status; + char sxd[8]; + + /* Note illegal _S0D is evaluated because some systems expect this. */ + snprintf(sxd, sizeof(sxd), "_S%dD", state); + 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, + acpi_name(handle), AcpiFormatException(status)); + return (ENXIO); + } + return (0); +} + +/* + * Get the D-state we need to set the device to for entry into the sleep type + * we are currently entering (sc->acpi_stype is set in acpi_EnterSleepState + * before the ACPI bus gets suspended, and thus before this function is called). + * + * If entering s2idle, we will try to enter whichever D-state we would've been + * transitioning to in S3. If we are entering an ACPI S-state, we evaluate the + * relevant _SxD state instead (ACPI 7.3.16 - 7.3.19). + */ int acpi_device_pwr_for_sleep(device_t bus, device_t dev, int *dstate) { - struct acpi_softc *sc; - ACPI_HANDLE handle; - ACPI_STATUS status; - char sxd[8]; - - handle = acpi_get_handle(dev); + struct acpi_softc *sc = device_get_softc(bus); + ACPI_HANDLE handle = acpi_get_handle(dev); + int state; - /* - * XXX If we find these devices, don't try to power them down. - * The serial and IRDA ports on my T23 hang the system when - * set to D3 and it appears that such legacy devices may - * need special handling in their drivers. - */ - if (dstate == NULL || handle == NULL || - acpi_MatchHid(handle, "PNP0500") || - acpi_MatchHid(handle, "PNP0501") || - acpi_MatchHid(handle, "PNP0502") || - acpi_MatchHid(handle, "PNP0510") || - acpi_MatchHid(handle, "PNP0511")) - return (ENXIO); + if (dstate == NULL) + return (EINVAL); - /* - * Override next state with the value from _SxD, if present. - * 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)); - 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, - acpi_name(handle), AcpiFormatException(status)); - return (ENXIO); - } + /* + * XXX If we find these devices, don't try to power them down. + * The serial and IRDA ports on my T23 hang the system when + * set to D3 and it appears that such legacy devices may + * need special handling in their drivers. + */ + if (handle == NULL || + acpi_MatchHid(handle, "PNP0500") || + acpi_MatchHid(handle, "PNP0501") || + acpi_MatchHid(handle, "PNP0502") || + acpi_MatchHid(handle, "PNP0510") || + acpi_MatchHid(handle, "PNP0511")) + return (ENXIO); - return (0); + if (sc->acpi_stype == POWER_STYPE_SUSPEND_TO_IDLE) + state = ACPI_STATE_S3; + else + state = acpi_stype_to_sstate(sc, sc->acpi_stype); + if (state == ACPI_STATE_UNKNOWN) + return (ENOENT); + return (acpi_device_pwr_for_sleep_sxd(bus, handle, state, dstate)); } /* Callback arg for our implementation of walking the namespace. */ From nobody Wed Apr 8 12:50:10 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4frNFb0Zm4z6Y515 for ; Wed, 08 Apr 2026 12:50:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4frNFZ6kQtz3Tkf for ; Wed, 08 Apr 2026 12:50:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775652611; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=btYRAybNFGgAjBDsBz1CKwAVPH7HdLb3QbqFKZLX99w=; b=yi0IKDE+uHhHxKXwLFNF1avM1Elj3DKqV2anFyl+EMzZpXJCcyfEngkGycw2S/QxH6Mo16 C8vG00DRZXUC9UkNQGq6WlkI3DOsZzWHDrfLpEtyp8hS7r7sB1WkNADJPXn+wpBDH0Hi1a RLU6Wa5SRg/26e8aIUvvA0Zp+VRNu+yPpJ/LMf9NjQLOoN/Q4yw5c3+Sreq1cjaeWn7uF3 7mZENua4LMQrxcONhq0gr0TSGiLM4OTGqJ2679uQMx5hHjq4W5NTGpSu0st32wVK529H5H G6S/eCEo2Uznq63Y/i/33hJLy/oqjQF4y01MRAJ6w3Iq+dDG553v9DH81TMwEg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775652610; a=rsa-sha256; cv=none; b=oVjj7ZKacxatnv+U6xnyzlvATmhc3MQlmMqINQo6arDVj5AKEJjj2BK2vULPPez+UZvK25 U9sdxKafC6GqQg5SYF5nKOb0vOzG6BNvyx1JWtlg3U1ZxCdm69ke8O1a88vPkz9rTgMLlv D6CstK3dGo9tem9qsg2MBZ6dGCMZ2/YZOk9wIKXOjmuvblhfTBSTiuQzhipTqxhF5/Wezl CMtNViGWY4CC7Eo3fM2YsMG97Mj0kNCBe9Y/hf9JHR2qrW51I7GsQS3ZMkwiFOQjIM6rXX A7AKxOamQ4vgVrx/Bu2BI2tKZFJHehpv2oEOBxfV6e7TJRzHIwQ7lQ3iKZbCeg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775652610; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=btYRAybNFGgAjBDsBz1CKwAVPH7HdLb3QbqFKZLX99w=; b=C9p+vvPc3caQwRpzQ/QBm+WJFfHP2V0yR1vrrLn3tPFrcG1rPaX1pCyLn/JL8pV90gWIXL ZcnvhgkOTD5+Gcd56Z3JND92stIAToo9ywSmcI430oIA7LeOg6pyo8NV02n+6/zI80zOAA PrGilkXBI/UH/BWNY1SioXiheQLxEFHzsGzBlRUnFwH/J5JYgwumMUlAjogmuMCiraArQS X3ISRKJyErUH3AkvXoDVtVZqok+UzrVhargHbjYKuq+rxe+ssBTKtfboRboQip+wV8QSwP VHhspwQTmDPRffP/iKFAeguOb98TKw35emVuvL4y5y+zs3CIAcHSI/qLLiSeFA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4frNFZ6Dk1z9m6 for ; Wed, 08 Apr 2026 12:50:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 32959 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 08 Apr 2026 12:50:10 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: bf0881060ecd - main - lualoader: allow the local module to filter out the BE list List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bf0881060ecd75ce79683b82ebcd4809eadf7cf5 Auto-Submitted: auto-generated Date: Wed, 08 Apr 2026 12:50:10 +0000 Message-Id: <69d64f02.32959.4abb16e1@gitrepo.freebsd.org> The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=bf0881060ecd75ce79683b82ebcd4809eadf7cf5 commit bf0881060ecd75ce79683b82ebcd4809eadf7cf5 Author: Kyle Evans AuthorDate: 2026-04-08 12:49:18 +0000 Commit: Kyle Evans CommitDate: 2026-04-08 12:49:58 +0000 lualoader: allow the local module to filter out the BE list This allows something like the following local.lua to install a filter to implement its own notion of hidden BEs using a naming convention of a leading dot to hide them: -- file: /boot/lua/local.lua local core = require("core") local function be_hide(be) if core.isSingleUserBoot() then -- All BEs are accepted for single-user return true end local name = be:match("/([^/]+)$") if not name then -- Accept malformed BEs, for whatever reason return true end return name:match("^%.") == nil end if core.bootenvFilter then -- Just in case we need to be compatible with older versions of -- core.lua without the filtering functionality. core.bootenvFilter(be_hide) end -- EOF Requested by: Marek Zarychta Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D55359 --- stand/lua/core.lua | 20 ++++++++++++++++++-- stand/lua/core.lua.8 | 13 ++++++++++++- 2 files changed, 30 insertions(+), 3 deletions(-) diff --git a/stand/lua/core.lua b/stand/lua/core.lua index 92cbd20b25a0..471e579619c7 100644 --- a/stand/lua/core.lua +++ b/stand/lua/core.lua @@ -305,6 +305,15 @@ function core.bootenvDefault() return loader.getenv("zfs_be_active") end +function core.bootenvFilter(func) + local oldf = core.bootenv_filter + + -- Filter contract: returns true if the BE should be kept, false if it + -- should be hidden. + core.bootenv_filter = func + return oldf +end + function core.bootenvList() local bootenv_count = tonumber(loader.getenv(bootenv_list .. "_count")) local bootenvs = {} @@ -332,11 +341,18 @@ function core.bootenvList() for curenv_idx = 0, bootenv_count - 1 do curenv = loader.getenv(bootenv_list .. "[" .. curenv_idx .. "]") if curenv ~= nil and unique[curenv] == nil then - envcount = envcount + 1 - bootenvs[envcount] = curenv unique[curenv] = true + + -- If we have a filter installed (by a local module), we + -- give it a chance to veto the BE. + if not core.bootenv_filter or + core.bootenv_filter(curenv) then + envcount = envcount + 1 + bootenvs[envcount] = curenv + end end end + return bootenvs end diff --git a/stand/lua/core.lua.8 b/stand/lua/core.lua.8 index de43d3e2b220..325320b2fce8 100644 --- a/stand/lua/core.lua.8 +++ b/stand/lua/core.lua.8 @@ -24,7 +24,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd March 29, 2025 +.Dd April 8, 2026 .Dt CORE.LUA 8 .Os .Sh NAME @@ -164,6 +164,17 @@ is set in kernels will be autodetected from the current system. .It Fn core.bootenvDefault Returns the default boot environment, nil if unset. +.It Fn core.bootenvFilter func +Installs a filter +.Fa func +into +.Fn core.bootenvList . +If the +.Fa func +returns true, then the boot environment is retained in the list. +Otherwise, the boot environment is hidden. +The old filter, if any, is returned to allow the caller to compose a filter on +top of another filter. .It Fn core.bootenvList Returns a table of boot environments, or an empty table. These will be picked up using the From nobody Wed Apr 8 12:54:13 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4frNLF2SW3z6Y5ct for ; Wed, 08 Apr 2026 12:54: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4frNLF1zpXz3WSj for ; Wed, 08 Apr 2026 12:54:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775652853; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mS9Ib0FwgmP5bE0b6g8yOiKnSNdztZ5yeXSiy4eM8/Q=; b=quV+uIvbjCNZLxiY2gwuDR/Z92U8S+cylDT8h0NOualOXt7XtZZVy+AXpkKbFdVD84xL0P PfBr++98RriithNRlx5I2g6cv1vBnAGksUSyaCwBSXfmUY15btWdAkQfBKKCKmL1PJqFvG UTYn1KZTSdJ4hO/yjNft00ZOkL2uarCp1HU9GqVJKPAdl9lywaVNunDbHKusC3xt+CEWGq FEl3vhfH4w2TlaA2l98fL1cqVm5rhqpRndKHtWrUF/mSLSd9n+xqTBiCYGHtfDjcS70I2B YN0ewRjmS1WVnNzfSWpvNafsJOGcmJxKr5NDtQF35IXrAYGmPEVwNQXDfYeCkw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775652853; a=rsa-sha256; cv=none; b=qVAtuTR8j1rLTeP9pkoopfQOEoPEKgB8Ve4UynTba4VqhWrijj4kJ/7xIfx02k/4yERoS9 hxtrzAZndj+GQF3d1luAn+JGpR2YNwzXN6mI62Mv6bB6iO+wqXg0YyfYofOnhW6+zElQiD 36O+iDxiA5ruwEsjdcx0TyCqEib1pM/X/qI4K4w97cHhO63itqh1BNVeJx73qo6ij/eU3z c7HKEQqsAeqXhWvKmEZO9CZ0vNbEIMzYt9llEQoO7ox5zeHKhpVh1/dSSE6Ykb/ZtnDZOO +7NtkClRHkP5nE+R3q4GKv0yFIKqWjwy4RiANFic5gqLTLzDszKezqFyiGD5fQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775652853; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mS9Ib0FwgmP5bE0b6g8yOiKnSNdztZ5yeXSiy4eM8/Q=; b=XOn3wUepcyTvq8lm2Osob8+cPpqn2aQ1JQzrI/Z6u3RcUM2OovtzWMvcBP2zHASyjoZdS3 sRakOuDRYeGBRWHd2aYnkoCcG/4H3Q4X52j6f3bl1R1oIw2nnFlJF9NwlFzL1GV4zLzBTw ybRpMDXrrupPb9GXpE4DnnB3+Qg1TM2w3BrHMAKs/Oo10gp46rwdZHDY9VxQ/Ur/ngx+ac ti+zI90IioE23JGLjs8LZPDX7LET+rbbQxB9Ff+CuTyuD+b9StLVrR9LUJpk1+kl/eGxrL XbQo3PBGGN3n6NTz2VqA6KbWsB3THiNlN2sFiOMYROqUl1eQKs6MLLlrVcA0ag== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4frNLF1ZW7zC1D for ; Wed, 08 Apr 2026 12:54:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 32ec0 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 08 Apr 2026 12:54:13 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Ziaee Subject: git: 2bcdab574598 - main - mfiutil.8: Fix typo - missing macro for dev node List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: 2bcdab574598e729273f7ddc7d898ffdb43b63b9 Auto-Submitted: auto-generated Date: Wed, 08 Apr 2026 12:54:13 +0000 Message-Id: <69d64ff5.32ec0.4427c285@gitrepo.freebsd.org> The branch main has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=2bcdab574598e729273f7ddc7d898ffdb43b63b9 commit 2bcdab574598e729273f7ddc7d898ffdb43b63b9 Author: Alexander Ziaee AuthorDate: 2026-04-02 03:20:45 +0000 Commit: Alexander Ziaee CommitDate: 2026-04-08 12:53:18 +0000 mfiutil.8: Fix typo - missing macro for dev node MFC after: 3 days --- usr.sbin/mfiutil/mfiutil.8 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/usr.sbin/mfiutil/mfiutil.8 b/usr.sbin/mfiutil/mfiutil.8 index 9f8cacf7f16d..5d0e425872be 100644 --- a/usr.sbin/mfiutil/mfiutil.8 +++ b/usr.sbin/mfiutil/mfiutil.8 @@ -480,7 +480,8 @@ The firmware should kick off an array rebuild on its own if a failed drive is marked as a rebuild drive. .It Cm syspd Ar drive Present the drive to the host operating system as a disk SYSPD block device in -the format /dev/mfisyspdX. +the format +.Pa /dev/mfisyspdX . Clear this flag with .Cm good .Ar drive From nobody Wed Apr 8 13:22:35 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4frNyz45FXz6Y732 for ; Wed, 08 Apr 2026 13:22: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4frNyz32L2z3Z6F for ; Wed, 08 Apr 2026 13:22:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775654555; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jnFlfMGQDpcB/D1VMEeouiUXtTjz3GSqPMTOGvwhoZI=; b=nDdT0qgG4eOpZcvM4TmoYDIr5jRCK0cRhXoeQhy2YMa+nWf5ZmuWMDDrfzOU7IjY+4GGVx xEpJPJSpPHTY5UylvNoBRtpUDYjwNSy8UQJDXXNny7ODZSNhCO5Qp7CIdnsQZzAbnTkKq1 rS+2jfvXz99iEvTOKgBDe4CmeFLIqCUkR6r37+7AlF7Jk75iwFPa/nznEPtK6TE/NqQMT7 yazuR69GD9zajZUdb2yJjyyVCp8sAqpmhOtUmIlsUC1LafClcgC1vxWVe7HedIzUZ1Iigf rvgmXzvoJrXguTQWvLU3Un7P3gNX2tZqNghzxf9ffHNMVjfF/QuiO58C8yT84w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775654555; a=rsa-sha256; cv=none; b=l4y2R7xm2KmvohY/cBZHorXlfJZscLuK7DrFsSD5NtsMAbGqYKiHkAumj9y9+SsS1Jw+es 8zgOqs4H1T5GRXqdlqW+1ws9DQ5KPBaWdePDagoON9gwdOApThsXbgUgZ38dCSXPoEzT8a lZPgbedRuYjh1jd/1ucOwNsO/NDz7Jv7pp93KwPy8vE3TJgInowhvALMGUpFH4XEZKKcNz AIOi4lrAdBVlRI1EcgbaBsxY/yp5KRMk2o3Q1TdHK6J/numfb1WL1hMxA6wXixK9NKovhJ AW7AzylWuKnWzAaRTeXRvuRHZaGTvxk5gj438C6izTvnXd4ecMvAZYOrT2a5iQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775654555; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jnFlfMGQDpcB/D1VMEeouiUXtTjz3GSqPMTOGvwhoZI=; b=YYS4uHsa3Rg3RSXg3zY0FMQOqlLMUuaXONpN3spTljxWl9zsVFoU/As6abXXzI6BmYDkG5 YyD1UheYinke20Wq6ssSLXA/7+cq/6azJEdSUpo+tK3FwJ86tu/lok7XisozKgWuKDMf/V CCjPK4x2a45lTJGYASExMNaJmNy8XYsSUmSYDoVx/QjkHJD/jquee5/8aYD/uU6ocrg5zF jlXBADJ5H4xAh74Fux/3T2v0R1sc/EJFauEDrmOOAxCKcCtaYvYRfYPd3FVjBRN1cqA+Rx HgaUlEddaUKfHlSIddf+VxPrOyedmaaAMXaJJluh++8GnPcBF8pihi0qWEfwIQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4frNyz2Z1PzCfP for ; Wed, 08 Apr 2026 13:22:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 37720 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 08 Apr 2026 13:22:35 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Robert Clausecker Subject: git: 8b5d77bbcbd9 - main - libc/tests/string: add a more comprehensive unit test for strrchr() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: fuz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8b5d77bbcbd98e684226950be1c779e108059d8d Auto-Submitted: auto-generated Date: Wed, 08 Apr 2026 13:22:35 +0000 Message-Id: <69d6569b.37720.643532cb@gitrepo.freebsd.org> The branch main has been updated by fuz: URL: https://cgit.FreeBSD.org/src/commit/?id=8b5d77bbcbd98e684226950be1c779e108059d8d commit 8b5d77bbcbd98e684226950be1c779e108059d8d Author: Robert Clausecker AuthorDate: 2026-03-22 21:39:42 +0000 Commit: Robert Clausecker CommitDate: 2026-04-08 13:21:50 +0000 libc/tests/string: add a more comprehensive unit test for strrchr() The unit tests are patterned after those for memrchr(). This catches the issue found in 293915. PR: 293915 Reviewed by: strajabot Reported by: safonov.paul@gmail.com MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D56037 --- lib/libc/tests/string/Makefile | 2 + lib/libc/tests/string/strrchr_test.c | 156 +++++++++++++++++++++++++++++++++++ 2 files changed, 158 insertions(+) diff --git a/lib/libc/tests/string/Makefile b/lib/libc/tests/string/Makefile index a019939c30af..a4d23b2dcfe1 100644 --- a/lib/libc/tests/string/Makefile +++ b/lib/libc/tests/string/Makefile @@ -20,6 +20,7 @@ ATF_TESTS_C+= strcmp2_test ATF_TESTS_C+= strcspn_test ATF_TESTS_C+= strerror2_test ATF_TESTS_C+= strlcpy_test +ATF_TESTS_C+= strrchr2_test ATF_TESTS_C+= strspn_test ATF_TESTS_C+= strverscmp_test ATF_TESTS_C+= strxfrm_test @@ -49,6 +50,7 @@ NETBSD_ATF_TESTS_C+= swab_test SRCS.memset2_test= memset_test.c SRCS.strcmp2_test= strcmp_test.c SRCS.strerror2_test= strerror_test.c +SRCS.strrchr2_test= strrchr_test.c .include "../Makefile.netbsd-tests" diff --git a/lib/libc/tests/string/strrchr_test.c b/lib/libc/tests/string/strrchr_test.c new file mode 100644 index 000000000000..1c3d912ec3f8 --- /dev/null +++ b/lib/libc/tests/string/strrchr_test.c @@ -0,0 +1,156 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2023, 2026 Robert Clausecker + * + * Adapted from memrchr_test.c. + */ + +#include + +#include +#include +#include +#include + +#include + +static char *(*strrchr_fn)(const char *, int); + +/* + * Check that when looking for the character NUL, we find the + * string terminator, and not some NUL character after it. + */ +ATF_TC_WITHOUT_HEAD(nul); +ATF_TC_BODY(nul, tc) +{ + size_t i, j, k; + char buf[1+15+64]; /* offset [0+15] + 64 buffer bytes + sentinels */ + + buf[0] = '\0'; + memset(buf + 1, '-', sizeof(buf) - 1); + + for (i = 0; i < 16; i++) + for (j = 0; j < 64; j++) + for (k = j; k < 64; k++) { + buf[i + j + 1] = '\0'; + buf[i + k + 1] = '\0'; + ATF_CHECK_EQ(strrchr_fn(buf + i + 1, '\0'), buf + i + j + 1); + buf[i + j + 1] = '-'; + buf[i + k + 1] = '-'; + } +} + +/* + * Check that if the character 'X' does not occur in the string + * (but occurs before and after it), we correctly return NULL. + */ +ATF_TC_WITHOUT_HEAD(not_found); +ATF_TC_BODY(not_found, tc) +{ + size_t i, j; + char buf[1+15+64+2]; /* offset [0..15] + 64 buffer bytes + sentinels */ + + buf[0] = 'X'; + memset(buf + 1, '-', sizeof(buf) - 1); + + for (i = 0; i < 16; i++) + for (j = 0; j < 64; j++) { + buf[i + j + 1] = '\0'; + buf[i + j + 2] = 'X'; + ATF_CHECK_EQ(strrchr_fn(buf + i + 1, 'X'), NULL); + buf[i + j + 1] = '-'; + buf[i + j + 2] = '-'; + } +} + +static void +do_found_test(char buf[], size_t first, size_t second) +{ + /* invariant: first <= second */ + + buf[first] = 'X'; + buf[second] = 'X'; + ATF_CHECK_EQ(strrchr_fn(buf, 'X'), buf + second); + buf[first] = '-'; + buf[second] = '-'; +} + +/* + * Check that if the character 'X' occurs in the string multiple + * times (i. e. twice), its last encounter is returned. + */ +ATF_TC_WITHOUT_HEAD(found); +ATF_TC_BODY(found, tc) +{ + size_t i, j, k, l; + char buf[1+15+64+2]; + + buf[0] = 'X'; + memset(buf + 1, '-', sizeof(buf) - 1); + + for (i = 0; i < 16; i++) + for (j = 0; j < 64; j++) + for (k = 0; k < j; k++) + for (l = 0; l <= k; l++) { + buf[i + j + 1] = '\0'; + buf[i + j + 2] = 'X'; + do_found_test(buf + i + 1, l, k); + buf[i + j + 1] = '-'; + buf[i + j + 2] = '-'; + } +} + +static void +do_values_test(char buf[], size_t len, size_t i, int c) +{ + /* sentinels */ + buf[-1] = c; + buf[len] = '\0'; + buf[len + 1] = 'c'; + + /* fill the string with some other character, but not with NUL */ + memset(buf, c == UCHAR_MAX ? c - 1 : c + 1, len); + + if (i < len) { + buf[i] = c; + ATF_CHECK_EQ(strrchr_fn(buf, c), buf + i); + } else + ATF_CHECK_EQ(strrchr_fn(buf, c), c == 0 ? buf + len : NULL); +} + +/* + * Check that the character is found regardless of its value. + * This catches arithmetic (overflow) errors in incorrect SWAR + * implementations of byte-parallel character matching. + */ +ATF_TC_WITHOUT_HEAD(values); +ATF_TC_BODY(values, tc) +{ + size_t i, j, k; + int c; + char buf[1+15+64+2]; + + for (i = 0; i < 16; i++) + for (j = 0; j < 64; j++) + for (k = 0; k <= j; k++) + for (c = 0; c <= UCHAR_MAX; c++) + do_values_test(buf + i + 1, j, k, c); +} + +ATF_TP_ADD_TCS(tp) +{ + void *dl_handle; + + dl_handle = dlopen(NULL, RTLD_LAZY); + strrchr_fn = dlsym(dl_handle, "test_strrchr"); + if (strrchr_fn == NULL) + strrchr_fn = strrchr; + + ATF_TP_ADD_TC(tp, nul); + ATF_TP_ADD_TC(tp, not_found); + ATF_TP_ADD_TC(tp, found); + ATF_TP_ADD_TC(tp, values); + + return (atf_no_error()); +} From nobody Wed Apr 8 14:04:38 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4frPvV5FZlz6YBXn for ; Wed, 08 Apr 2026 14:04:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4frPvV41Yrz3mRj for ; Wed, 08 Apr 2026 14:04:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775657078; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1ww6bml46Frc44Pa2FtYzsgJ59Ku7spgMv5K1IuYH18=; b=CafydVDD/dKijxcD+Fo5WxoaQeBMDvrqc1DdsFYpXy6ECx1dDDKzzYHHrToosA7sK8Pw1V AqcTFSYSJRf4PIFIy4UFUX9Z5Ok+vXctUaP8lwXllw4g73IJffPGTWChxHagJoSfNsqGwh Gboh+yIsUcMLBV0dOxMh0pdZK974LHC4j6Xu1tUw2KbTaZ363X12d8ngTXniDn1EZdsd06 4+N6TcQy6IzGlfoNg83PRd7/llII0I/YGqKbXbWCixyRnSiPIqTtsK6OgPJLqEUnzINtHI UmXLf5YPgtOUd2+0zX7ggCcXf6iR1QL03q3oiY5WGnQW19A5DUBbeEuIGd2hGA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775657078; a=rsa-sha256; cv=none; b=r31VPcHofeuPLmsSVG6ayoHgNunDFPrSIE/wIbToeyDQWp8b8rf1584tSdYvbJSU+FU+ty r36c0E1yA4B6iSz6YoLczQRTEbfxO5doAg0bRpA7ZkpK4Zm7XAly9Z0fuUPj8BN5cJSWbC lUn2F6gefgQ7DO5qSSldT1BPnPqVAunCqkq1KafTqBREx2ZFW8gG15SE7c8LZ5D9XIDk59 XYb2dHCiz8VXBiLwZIBXrkCMBPlPYv8ZUU6KePlNAYWbgi+U2Sm6BnnG1ia7otzm2G0rkP JeCsSMdFcwSxcAjBidFflKp4DyIz1veLNtbF1diQJ5k8pAW0WbQXS1brhRgMjw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775657078; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1ww6bml46Frc44Pa2FtYzsgJ59Ku7spgMv5K1IuYH18=; b=n1tiFyqRA7+U7E4tgVKc2tqf3UiFM0WMwAWsyZYVgt0IXQsySm0R8gvVFuWJ4JlWXfSqZh cI9+LsKlOvMI34j6ffb0WTBNypklkQR3mON3Shq6yFVs3r0w6sgtQ33/hfyXKRnv4C0p2U sP3qDWrAoC3dxdgm0aPe284aUtY1V0ofZL55P1eCmYwftRn/P5WEL96HRgu3GYHcIkZ9U0 STJ3rBMd0iM0TPWWmHeHqXwm+SXRsuo8E7jIpkyY4PukoR63NJM4p7vYePe3XoLKvyDyOb wew3osgcRbzIAVOjcWUaY3y779Wv5LU5E6ZWUlgpIrM3E1DIiyOqkZB11Rc0dQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4frPvV3d7kzDWf for ; Wed, 08 Apr 2026 14:04:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3bc1f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 08 Apr 2026 14:04:38 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 8a68c2509c00 - main - imgact_elf: Unconditionally initialize a variable in a note handler List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8a68c2509c00ae0dbeab64064bb600cfac787a73 Auto-Submitted: auto-generated Date: Wed, 08 Apr 2026 14:04:38 +0000 Message-Id: <69d66076.3bc1f.750efd30@gitrepo.freebsd.org> The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=8a68c2509c00ae0dbeab64064bb600cfac787a73 commit 8a68c2509c00ae0dbeab64064bb600cfac787a73 Author: Mark Johnston AuthorDate: 2026-04-08 04:19:56 +0000 Commit: Mark Johnston CommitDate: 2026-04-08 14:04:29 +0000 imgact_elf: Unconditionally initialize a variable in a note handler In the sb == NULL case, we are computing the size of the note using a dummy sbuf drain handler which counts bytes and discards the contents of the buffer, so the fact that "structsize" is uninitialized doesn't matter. But, the compiler may complain about this, so we might as well just initialize it unconditionally to silence the warning, as other handlers already do. PR: 292811 MFC after: 1 week --- sys/kern/imgact_elf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c index 7410efca4807..c91fd8089487 100644 --- a/sys/kern/imgact_elf.c +++ b/sys/kern/imgact_elf.c @@ -2714,6 +2714,7 @@ __elfN(note_procstat_auxv)(void *arg, struct sbuf *sb, size_t *sizep) int structsize; p = arg; + structsize = sizeof(Elf_Auxinfo); if (sb == NULL) { size = 0; sb = sbuf_new(NULL, NULL, AT_COUNT * sizeof(Elf_Auxinfo), @@ -2727,7 +2728,6 @@ __elfN(note_procstat_auxv)(void *arg, struct sbuf *sb, size_t *sizep) sbuf_delete(sb); *sizep = size; } else { - structsize = sizeof(Elf_Auxinfo); sbuf_bcat(sb, &structsize, sizeof(structsize)); PHOLD(p); proc_getauxv(curthread, p, sb); From nobody Wed Apr 8 14:04:39 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4frPvW5gXpz6YBWf for ; Wed, 08 Apr 2026 14:04:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4frPvW4swbz3mQ4 for ; Wed, 08 Apr 2026 14:04:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775657079; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=b+8u++hndO9m3PX93Wecu7gFbzHQov0gErHr1q0wj9s=; b=CtRTUlxOgwdD5Nucu06tvZqoMruaNEYjeecebpRahGaVEHcf6tFMbbnxiPKm44GihYcDej gtXZBIiBe/qTAZuinEVvkkW6BnhU3pXpbYGQ7SmZUU0bmG9pVONi1jn31XhxSM3eWBnJiz OTHdjVlu2K05u52Q8itmLygl8QgtA8nmOuGvSzwiwwLjsg3+QP5y2YNwhxhjMrziS0q88z pVig4GLMvXvGvo6QV5OVRa1saPk/MetkxSlMHVyT7qLRFLdqDQEN4zl1f7vZ7kNk1Xh23c WKoxVjvaSVjES7TZNup+KnxV2B8X87o5EtKUOKJcm4Bj9w+KNv4xcZxVIvknnQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775657079; a=rsa-sha256; cv=none; b=fdo8/EYCp9mY+d/i+9lZu5PF+JVGogDVpdOjI8tNBTYIGRqefamNILDtbbDtx2JTszSCL2 9wnA/JQNqyUsNtEF1Z8aW0y5zi2rdXtEz463xsf3+QF1WoLIZNbfWJX+tXzPXgM0C0CbPc 52ESOXVoF3COqCKtvew3GoBnLO4gEZOrcZUBfKnWyKt6ZnC40Xo/F9Ty4ERHBO35n6pnT4 YfEDv+QbqT6KxS149aR33m03di3TMX7/+88kWGUKsbrKumu/wtIhOQmwLhWIuAkjqPk/iv kIkYyF5DntSwYIx/zzKBajUO87EQLwWoO1H7+y9iOAK30dTgSqK+jP/wBRm/PQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775657079; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=b+8u++hndO9m3PX93Wecu7gFbzHQov0gErHr1q0wj9s=; b=G3mj7mRqKk2k0vBDDmAXGD3ZXHznIyeS9tP3o9dOfF+KtfyTjvF+sib1NpJxSos1qLR4R/ cLjaHwPV8LNonLQc2bypphhrr/fGtOdkwae+fpo6vM8sO+sZ8lX15YBj4a0VmGoFhsAj0W GNi8vdAnzkru6RnxI+zxp4tPz4n17rtvn1NaIuyxJeAK9rMseZjMIDxRqfe9jswvYZXkQB QQWvCt6Ze7+vADlfo2lBRIQYkSm+KE8ySThaeCTcIQzyA/COkN6ZuVXeFLzYidIoep7vu3 sJ1J23EYuoyuhfVFOs/wy1DVsk/XIY7mak06Xs2kkVLLCZXx6oqCp7KVu0Bjjw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4frPvW4Mg4zTcr for ; Wed, 08 Apr 2026 14:04:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3b597 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 08 Apr 2026 14:04:39 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 77df0240307e - main - ip6_mroute: VNETify 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 77df0240307ebbc606e17c9b83c0d940d33c2649 Auto-Submitted: auto-generated Date: Wed, 08 Apr 2026 14:04:39 +0000 Message-Id: <69d66077.3b597.dd233e@gitrepo.freebsd.org> The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=77df0240307ebbc606e17c9b83c0d940d33c2649 commit 77df0240307ebbc606e17c9b83c0d940d33c2649 Author: Mark Johnston AuthorDate: 2026-04-08 04:20:04 +0000 Commit: Mark Johnston CommitDate: 2026-04-08 14:04:29 +0000 ip6_mroute: VNETify counters Commit a223d6c489c7 made most of the ip6_mroute state per-VNET, but failed to do this for a couple of counter structures. Make them per-VNET too. Reported by: zlei Reviewed by: pouria, zlei Fixes: a223d6c489c7 ("ip6_mroute: Start putting global variables into a structure") Differential Revision: https://reviews.freebsd.org/D56253 --- sys/netinet6/ip6_mroute.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/sys/netinet6/ip6_mroute.c b/sys/netinet6/ip6_mroute.c index 69eff75596e8..9ae0d699ca31 100644 --- a/sys/netinet6/ip6_mroute.c +++ b/sys/netinet6/ip6_mroute.c @@ -159,12 +159,13 @@ static SYSCTL_NODE(_net_inet6, IPPROTO_PIM, pim, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, "PIM"); -static struct mrt6stat mrt6stat; -SYSCTL_STRUCT(_net_inet6_ip6, OID_AUTO, mrt6stat, CTLFLAG_RW, - &mrt6stat, mrt6stat, +VNET_DEFINE_STATIC(struct mrt6stat, mrt6stat); +#define V_mrt6stat VNET(mrt6stat) +SYSCTL_STRUCT(_net_inet6_ip6, OID_AUTO, mrt6stat, CTLFLAG_VNET | CTLFLAG_RW, + &VNET_NAME(mrt6stat), mrt6stat, "Multicast Routing Statistics (struct mrt6stat, netinet6/ip6_mroute.h)"); -#define MRT6STAT_INC(name) mrt6stat.name += 1 +#define MRT6STAT_INC(name) V_mrt6stat.name += 1 #define NO_RTE_FOUND 0x1 #define RTE_FOUND 0x2 @@ -298,12 +299,13 @@ static void expire_upcalls_all(void *); #define EXPIRE_TIMEOUT (hz / 4) /* 4x / second */ #define UPCALL_EXPIRE 6 /* number of timeouts */ -static struct pim6stat pim6stat; -SYSCTL_STRUCT(_net_inet6_pim, PIM6CTL_STATS, stats, CTLFLAG_RW, - &pim6stat, pim6stat, +VNET_DEFINE_STATIC(struct pim6stat, pim6stat); +#define V_pim6stat VNET(pim6stat) +SYSCTL_STRUCT(_net_inet6_pim, PIM6CTL_STATS, stats, CTLFLAG_VNET | CTLFLAG_RW, + &VNET_NAME(pim6stat), pim6stat, "PIM Statistics (struct pim6stat, netinet6/pim6_var.h)"); -#define PIM6STAT_INC(name) pim6stat.name += 1 +#define PIM6STAT_INC(name) V_pim6stat.name += 1 VNET_DEFINE_STATIC(int, pim6); #define V_pim6 VNET(pim6) From nobody Wed Apr 8 14:04:40 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4frPvX6QVnz6YB7x for ; Wed, 08 Apr 2026 14:04: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4frPvX5Tdlz3mMB for ; Wed, 08 Apr 2026 14:04:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775657080; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=igpqVq/7MrcAF1xFDkQTFZU2YXlx4nvFek6+n2zP4J8=; b=lfG5lnBz1z+rboyCHvt+A9VffetCsN7fHcxtnNS8AxE3EnwRbwsLMrVZGOQowbEY1MiwZa f3yH7TZZnOMyYUMunXuZBu6pebfE7AQTLcRnI3Of6sC/SGIhSd3KlDr701nxS/ImuN9e3k x1dLalLAFb/2BxC3mFFNHCbmhPoq+/pD96SgmsWV7cv4ZSCpXCFokF2Us3H7CbAKF6QJGL /btfpom28W8MFCPX8zAvRdMh9KL1Sj9/jztPkCPz9uhfrmE7nMLaTAFPYwy9VRyUS11WWj 16CUyKQLVDl+dWMe96/QpRS+SZkmLY/BzALTYOdEIwnjwoDZGri+Gu/DTFVZ1Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775657080; a=rsa-sha256; cv=none; b=BLfVpQoWUfCljVfRJNYwtPFAf+3mlgyS2tT4FV0rO1L/f7Da1sqmNRkCRnkrsA+xWhw0xc qJJI8pJOQF3KxrW/ac8Eq7s0vzcVeX7OXdAeGyKFksnmzNv3NdlR7P/S8qvLGDdgPBwxMu sF421BA5+z9BVYWr4wBe83H0pVSo9rwBSI5zgXIzFRaaSXegMN6CxrJfgRAqYV4TNk/xS2 FmO/rZpgMV1fsgzWXqqc2od//zUPUQLP287ZurbrXPBC+ULTh/FThSem2V1cEavLv6+uif nBdjeiBRuPeZ0K0LnF3o50WZFk8zh5LHn7dR5XwZOyX8BrmKP4T8E+vi9epUng== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775657080; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=igpqVq/7MrcAF1xFDkQTFZU2YXlx4nvFek6+n2zP4J8=; b=TXVJOwaLnoyuaXa87X6LVq033kqZrEoNdlrhjB8PgWniVi2+zwblnT4VsAko9sIZmk4JO+ o/j1a/UYlo5hJf6H62AFoYI+rjsoD9OHEj3g76X0HOsGX5LzYxZjleSPd2SjP2gAcmvaE7 kdbUeWbx9W3G+jraobfKHvtD2E0YX8l7yAukZMC+/B6x0hrOWUyZbGNnRlu7hfRzOUlcvV j3N3RD4yFvz/lP/6hqNDKMqk+7SJNfXQwatMchop32R6Y5qnMwpyGPHLfzZ6BAfMUawxku 1Tzr/aUpp4vkxn2ZYMe8NBlUFWsTKrPIZkUr8FuddSLO34It3WxPBlIoOnH/4Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4frPvX4p64zTgN for ; Wed, 08 Apr 2026 14:04:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3b59b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 08 Apr 2026 14:04:40 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 04132e010043 - main - vm_fault: Reset m_needs_zeroing properly List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: 04132e01004316ddd0e0cde6ef15b100b7b1844d Auto-Submitted: auto-generated Date: Wed, 08 Apr 2026 14:04:40 +0000 Message-Id: <69d66078.3b59b.2100caf3@gitrepo.freebsd.org> The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=04132e01004316ddd0e0cde6ef15b100b7b1844d commit 04132e01004316ddd0e0cde6ef15b100b7b1844d Author: Mark Johnston AuthorDate: 2026-04-08 04:21:09 +0000 Commit: Mark Johnston CommitDate: 2026-04-08 14:04:29 +0000 vm_fault: Reset m_needs_zeroing properly - When allocating a page, we should only consider the PG_ZERO flag when handling the top-level page. - Unconditionally reset the flag when restarting the fault handler. Previously, vm_fault_busy_sleep() would fail to reset it. PR: 294039 Reviewed by: kib Tested by: Peter Much MFC after: 3 days Fixes: cff67bc43df1 ("vm_fault: only rely on PG_ZERO when the page was newly allocated") Differential Revision: https://reviews.freebsd.org/D56234 --- sys/vm/vm_fault.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sys/vm/vm_fault.c b/sys/vm/vm_fault.c index 125311912c20..9f00e3b51a37 100644 --- a/sys/vm/vm_fault.c +++ b/sys/vm/vm_fault.c @@ -273,8 +273,6 @@ vm_fault_might_be_cow(struct faultstate *fs) static void vm_fault_deallocate(struct faultstate *fs) { - - fs->m_needs_zeroing = true; vm_fault_page_release(&fs->m_cow); vm_fault_page_release(&fs->m); vm_object_pip_wakeup(fs->object); @@ -1373,7 +1371,8 @@ vm_fault_allocate(struct faultstate *fs, struct pctrie_iter *pages) vm_waitpfault(dset, vm_pfault_oom_wait * hz); return (FAULT_RESTART); } - fs->m_needs_zeroing = (fs->m->flags & PG_ZERO) == 0; + if (fs->object == fs->first_object) + fs->m_needs_zeroing = (fs->m->flags & PG_ZERO) == 0; fs->oom_started = false; return (FAULT_CONTINUE); @@ -1708,7 +1707,6 @@ vm_fault(vm_map_t map, vm_offset_t vaddr, vm_prot_t fault_type, fs.fault_flags = fault_flags; fs.map = map; fs.lookup_still_valid = false; - fs.m_needs_zeroing = true; fs.oom_started = false; fs.nera = -1; fs.can_read_lock = true; @@ -1717,6 +1715,7 @@ vm_fault(vm_map_t map, vm_offset_t vaddr, vm_prot_t fault_type, RetryFault: fs.fault_type = fault_type; + fs.m_needs_zeroing = true; /* * Find the backing store object and offset into it to begin the From nobody Wed Apr 8 14:21:16 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4frQGh5Wpcz6YCSR for ; Wed, 08 Apr 2026 14:21: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4frQGh4nDFz3qrR for ; Wed, 08 Apr 2026 14:21:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775658076; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=a++zZAlceAsdmVN/coRXwYxApAfXUQI1DSRWFpfuTZ8=; b=xS9gy4C7nTzzu8LKOBtq7wRs7CS+lbrilaHCOGheOZ7GGRchEBgMpYSmb6ecIQnou1saGK MXjr3INvnB86uU2TAc/4z6saTGpo8uGaSqv1nOy/EFgUUNVRVHKjr9PmV1nIKQfIPJ2vf7 LRnxyADjbp1E/b0tgUCEb+aHPxxrv2SEXPmYtjqZY8+h4+HXa7PDFEtIqWP3agB6ILqhrU UlqvgkV3Hp8Fj/bNC2+45Hx9ywA5Z4BLPzLEH0sLmju6AYBnjxrEPvcCOlL3ggCGQyG57r uvKYrwyCGySvOOkbW6LeEKsVucHff8UgCNjJIzzRk2mDHX+hSEp6ADfiY6k5+g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775658076; a=rsa-sha256; cv=none; b=SH3x9cqsHagI1jzy8MlWfgHNejNkuG9EL5x4fJWy7G2Km0POyeiOcQ4DHUGuQ8KPA6jk1t Ud1KWmCObS9dj+hcnAo5s1r3EyNz1nBm37K8qhgIGYGJ5knf5LcT9Y7RMsGZIkBpW53aAf ZmRKi93gc2VsrxxnT4jD9tH6nYeiJ7EoJhPEJi4MPgj1R6lchwSM9xq2LOtxVnfmc9Bilz mpLWnfHLH/naKucDuBs3e9vFMo/6B1IZSTVNMqsQWtzFfmmJ78eOjrg0JpBVf0o1GiVoAR I48PgNmEYIUPVhBw3K9/maVdIMU+M6TR9a9cj0iM8PsNxGoM9zjB6+8CB0w6zw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775658076; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=a++zZAlceAsdmVN/coRXwYxApAfXUQI1DSRWFpfuTZ8=; b=MhdtQG4RD1hbthJZhi2PZeobYVT2pvcbCwBGi7pzDoC0xBq/CgzBPqN3LiS2xLE3Xoo7vc HBEQ9UmB7m8u4unL0Oebsi9sPWRDGxB/KQ+o3QaS5f6XwpEZFFY6PJLNDrPX0YDdQEWqYB HQr66StEZvzJjD6DmLSyLQ1d8hJatS34hYIHlxREnZOM/PMixjy/F55CAyzUG0HqLFVlK3 zhIJgIpC8YR2TyxJts5BD/1kFfChQQX8hl7coMJbMkedq1kouwI74J84jbgR2c7djQ08ZR zgKmrPuy471YdVdayzav5Ps6jBuMIaa7Xkdr7+enOKCwoeB+zuJK7OMbHwaeLw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4frQGh4N5MzVBs for ; Wed, 08 Apr 2026 14:21:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3d421 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 08 Apr 2026 14:21:16 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: 0ddaa4c86d68 - main - arm64: Add arm64 SVE tests List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0ddaa4c86d68e8dacee8a78877e5742d53c122b3 Auto-Submitted: auto-generated Date: Wed, 08 Apr 2026 14:21:16 +0000 Message-Id: <69d6645c.3d421.446b1290@gitrepo.freebsd.org> The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=0ddaa4c86d68e8dacee8a78877e5742d53c122b3 commit 0ddaa4c86d68e8dacee8a78877e5742d53c122b3 Author: Andrew Turner AuthorDate: 2026-04-08 14:17:55 +0000 Commit: Andrew Turner CommitDate: 2026-04-08 14:20:52 +0000 arm64: Add arm64 SVE tests Add the tests/sys/arch directory for architecture-specific tests and use it to add arm64 SVE tests. These test the kernel is managing the SVE state in a way we expect. These tests require SVE hardware support to run so will skip when they can't detect it. Reviewed by: markj Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D43311 --- etc/mtree/BSD.tests.dist | 2 + tests/sys/Makefile | 1 + tests/sys/arch/Makefile | 5 + tests/sys/arch/Makefile.inc | 3 + tests/sys/arch/aarch64/Makefile | 8 + tests/sys/arch/aarch64/sve.c | 438 +++++++++++++++++++++++++++++ tests/sys/arch/aarch64/sve_ptrace_helper.c | 46 +++ 7 files changed, 503 insertions(+) diff --git a/etc/mtree/BSD.tests.dist b/etc/mtree/BSD.tests.dist index ec9c1bb7f0db..ae10c6ecec38 100644 --- a/etc/mtree/BSD.tests.dist +++ b/etc/mtree/BSD.tests.dist @@ -563,6 +563,8 @@ .. aio .. + arch + .. audit .. auditpipe diff --git a/tests/sys/Makefile b/tests/sys/Makefile index 535e627d22cb..ccdc29886d23 100644 --- a/tests/sys/Makefile +++ b/tests/sys/Makefile @@ -4,6 +4,7 @@ TESTSDIR= ${TESTSBASE}/sys TESTS_SUBDIRS+= acl TESTS_SUBDIRS+= aio +TESTS_SUBDIRS+= arch TESTS_SUBDIRS+= ${_audit} TESTS_SUBDIRS+= auditpipe TESTS_SUBDIRS+= cam diff --git a/tests/sys/arch/Makefile b/tests/sys/arch/Makefile new file mode 100644 index 000000000000..e1a35422410e --- /dev/null +++ b/tests/sys/arch/Makefile @@ -0,0 +1,5 @@ +.if exists(${.CURDIR}/${MACHINE_ARCH}) +SUBDIR+= ${MACHINE_ARCH} +.endif + +.include diff --git a/tests/sys/arch/Makefile.inc b/tests/sys/arch/Makefile.inc new file mode 100644 index 000000000000..cf5c687d6401 --- /dev/null +++ b/tests/sys/arch/Makefile.inc @@ -0,0 +1,3 @@ +TESTSDIR= ${TESTSBASE}/sys/arch + +.include "../Makefile.inc" diff --git a/tests/sys/arch/aarch64/Makefile b/tests/sys/arch/aarch64/Makefile new file mode 100644 index 000000000000..00f6d36c01c3 --- /dev/null +++ b/tests/sys/arch/aarch64/Makefile @@ -0,0 +1,8 @@ +PACKAGE= tests + +ATF_TESTS_C+= sve + +BINDIR= ${TESTSDIR} +PROGS+= sve_ptrace_helper + +.include diff --git a/tests/sys/arch/aarch64/sve.c b/tests/sys/arch/aarch64/sve.c new file mode 100644 index 000000000000..8e9211d4b190 --- /dev/null +++ b/tests/sys/arch/aarch64/sve.c @@ -0,0 +1,438 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2023,2024 Arm Ltd + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include +#include +#include + +#include + +static unsigned long vl; + +static void +check_for_sve(void) +{ + unsigned long hwcap; + + if (elf_aux_info(AT_HWCAP, &hwcap, sizeof(hwcap)) != 0) + atf_tc_skip("No HWCAP"); + + if ((hwcap & HWCAP_SVE) == 0) + atf_tc_skip("No SVE support in HW"); + + ATF_REQUIRE(sysarch(ARM64_GET_SVE_VL, &vl) == 0); +} + +ATF_TC_WITHOUT_HEAD(sve_registers); +ATF_TC_BODY(sve_registers, tc) +{ + uint64_t reg, val; + + check_for_sve(); + + /* Check the ID registers are sane */ + reg = READ_SPECIALREG(id_aa64pfr0_el1); + ATF_REQUIRE((reg & ID_AA64PFR0_SVE_MASK) >= ID_AA64PFR0_SVE_IMPL); + + /* + * Store 1.0 in z0, repeated every 16 bits. Read it from d0 as + * the registers alias. + */ + asm volatile( + ".arch_extension sve \n" + "fmov z0.h, #1 \n" + "str d0, [%0] \n" + ".arch_extension nosve \n" + :: "r"(&val) : "z0", "d0" + ); + + /* Check for the 1.0 bit pattern */ + ATF_REQUIRE_EQ(val, 0x3c003c003c003c00); +} + +static void +sve_signal_handler(int sig __unused, siginfo_t *info, void *context) +{ + struct arm64_reg_context *regctx; + struct sve_context *svectx; + ucontext_t *ctx; + uint64_t *sveregs; + + ctx = context; + + /* Check the trap is from a breakpoint instruction */ + ATF_REQUIRE_EQ(info->si_trapno, EXCP_BRK); + ctx->uc_mcontext.mc_gpregs.gp_elr += 4; + + /* Trash z0 to check it's not kept when exiting the handler */ + asm volatile( + ".arch_extension sve \n" + "fmov z0.h, #2 \n" + ".arch_extension nosve \n" + ::: "z0"); + + /* Change the lower bits of z1 through the siginfo struct */ + ctx->uc_mcontext.mc_fpregs.fp_q[1] = 0x5a5a5a5a5a5a5a5a; + + /* Find the SVE registers */ + regctx = (struct arm64_reg_context *)ctx->uc_mcontext.mc_ptr; + if (regctx != NULL) { + int idx, next; + do { + if (regctx->ctx_id == ARM64_CTX_SVE) + break; + + ATF_REQUIRE(regctx->ctx_id != ARM64_CTX_END); + regctx = (struct arm64_reg_context *) + ((uintptr_t)regctx + regctx->ctx_size); + } while (1); + + /* Update the register context */ + svectx = (struct sve_context *)regctx; + ATF_REQUIRE_EQ(svectx->sve_vector_len, vl); + + sveregs = (uint64_t *)(void *)(svectx + 1); + /* Find the array entries to change */ + idx = 2 * svectx->sve_vector_len / sizeof(*sveregs); + next = 3 * svectx->sve_vector_len / sizeof(*sveregs); + while (idx != next) { + sveregs[idx] = 0xdeaddeaddeaddead; + idx++; + } + } +} + +ATF_TC_WITHOUT_HEAD(sve_signal); +ATF_TC_BODY(sve_signal, tc) +{ + struct sigaction sa = { + .sa_sigaction = sve_signal_handler, + .sa_flags = SA_SIGINFO, + }; + uint64_t val0, val1, *val2; + + check_for_sve(); + ATF_REQUIRE(sigaction(SIGTRAP, &sa, NULL) == 0); + val2 = malloc(vl); + ATF_REQUIRE(val2 != NULL); + + asm volatile( + ".arch_extension sve \n" + "fmov z0.h, #1 \n" + "fmov z1.h, #1 \n" + "fmov z2.h, #1 \n" + /* Raise a SIGTRAP */ + "brk #1 \n" + "str d0, [%0] \n" + "str d1, [%1] \n" + "str z2, [%2] \n" + ".arch_extension nosve \n" + :: "r"(&val0), "r"(&val1), "r"(val2) : "z0", "z1", "z2", "d0", "d1" + ); + + /* Check for the 1.0 bit pattern */ + ATF_REQUIRE_EQ(val0, 0x3c003c003c003c00); + /* Check for the changed bit pattern */ + ATF_REQUIRE_EQ(val1, 0x5a5a5a5a5a5a5a5a); + /* + * Check the lower 128 bits are restored from fp_q and the + * upper bits are restored from the sve data region + */ + for (size_t i = 0; i < vl / sizeof(*val2); i++) { + if (i < 2) + ATF_REQUIRE_EQ(val2[i], 0x3c003c003c003c00); + else + ATF_REQUIRE_EQ(val2[i], 0xdeaddeaddeaddead); + } + + free(val2); +} + +ATF_TC_WITHOUT_HEAD(sve_signal_altstack); +ATF_TC_BODY(sve_signal_altstack, tc) +{ + struct sigaction sa = { + .sa_sigaction = sve_signal_handler, + .sa_flags = SA_ONSTACK | SA_SIGINFO, + }; + stack_t ss = { + .ss_size = SIGSTKSZ, + }; + uint64_t val0, val1, *val2; + + check_for_sve(); + ss.ss_sp = malloc(ss.ss_size); + ATF_REQUIRE(ss.ss_sp != NULL); + ATF_REQUIRE(sigaltstack(&ss, NULL) == 0); + ATF_REQUIRE(sigaction(SIGTRAP, &sa, NULL) == 0); + val2 = malloc(vl); + ATF_REQUIRE(val2 != NULL); + + asm volatile( + ".arch_extension sve \n" + "fmov z0.h, #1 \n" + "fmov z1.h, #1 \n" + "fmov z2.h, #1 \n" + /* Raise a SIGTRAP */ + "brk #1 \n" + "str d0, [%0] \n" + "str d1, [%1] \n" + "str z2, [%2] \n" + ".arch_extension nosve \n" + :: "r"(&val0), "r"(&val1), "r"(val2) : "z0", "z1", "z2", "d0", "d1" + ); + + /* Check for the 1.0 bit pattern */ + ATF_REQUIRE_EQ(val0, 0x3c003c003c003c00); + /* Check for the changed bit pattern */ + ATF_REQUIRE_EQ(val1, 0x5a5a5a5a5a5a5a5a); + /* + * Check the lower 128 bits are restored from fp_q and the + * upper bits are restored from the sve data region + */ + for (size_t i = 0; i < vl / sizeof(*val2); i++) { + if (i < 2) + ATF_REQUIRE_EQ(val2[i], 0x3c003c003c003c00); + else + ATF_REQUIRE_EQ(val2[i], 0xdeaddeaddeaddead); + } + + free(val2); +} + +ATF_TC_WITHOUT_HEAD(sve_ptrace); +ATF_TC_BODY(sve_ptrace, tc) +{ + struct reg reg; + struct iovec fpvec, svevec; + struct svereg_header *header; + pid_t child, wpid; + int status; + + check_for_sve(); + + child = fork(); + ATF_REQUIRE(child >= 0); + if (child == 0) { + char exec_path[1024]; + + /* Calculate the location of the helper */ + snprintf(exec_path, sizeof(exec_path), "%s/sve_ptrace_helper", + atf_tc_get_config_var(tc, "srcdir")); + + ptrace(PT_TRACE_ME, 0, NULL, 0); + + /* Execute the helper so SVE will be disabled */ + execl(exec_path, "sve_ptrace_helper", NULL); + _exit(1); + } + + /* The first event should be the SIGSTOP at the start of the child */ + wpid = waitpid(child, &status, 0); + ATF_REQUIRE(WIFSTOPPED(status)); + + fpvec.iov_base = NULL; + fpvec.iov_len = 0; + /* Read the length before SVE has been used */ + ATF_REQUIRE(ptrace(PT_GETREGSET, wpid, (caddr_t)&fpvec, NT_ARM_SVE) == + 0); + ATF_REQUIRE(fpvec.iov_len == (sizeof(struct svereg_header) + + sizeof(struct fpregs))); + + fpvec.iov_base = malloc(fpvec.iov_len); + header = fpvec.iov_base; + ATF_REQUIRE(fpvec.iov_base != NULL); + ATF_REQUIRE(ptrace(PT_GETREGSET, wpid, (caddr_t)&fpvec, NT_ARM_SVE) == + 0); + ATF_REQUIRE((header->sve_flags & SVEREG_FLAG_REGS_MASK) == + SVEREG_FLAG_FP); + + /* Check writing back the FP registers works */ + ATF_REQUIRE(ptrace(PT_SETREGSET, wpid, (caddr_t)&fpvec, NT_ARM_SVE) == + 0); + + ptrace(PT_CONTINUE, wpid, (caddr_t)1, 0); + + /* The second event should be the SIGINFO at the end */ + wpid = waitpid(child, &status, 0); + ATF_REQUIRE(WIFSTOPPED(status)); + ATF_REQUIRE_EQ(WSTOPSIG(status), SIGTRAP); + + /* Check writing back FP registers when SVE has started will fail */ + ATF_REQUIRE(ptrace(PT_SETREGSET, wpid, (caddr_t)&fpvec, NT_ARM_SVE) == + -1); + + svevec.iov_base = NULL; + svevec.iov_len = 0; + /* Read the length after SVE has been used */ + ATF_REQUIRE(ptrace(PT_GETREGSET, wpid, (caddr_t)&svevec, NT_ARM_SVE) == + 0); + /* TODO: Check the length is correct based on vector length */ + ATF_REQUIRE(svevec.iov_len > (sizeof(struct svereg_header) + + sizeof(struct fpregs))); + + svevec.iov_base = malloc(svevec.iov_len); + header = svevec.iov_base; + ATF_REQUIRE(svevec.iov_base != NULL); + ATF_REQUIRE(ptrace(PT_GETREGSET, wpid, (caddr_t)&svevec, NT_ARM_SVE) == + 0); + ATF_REQUIRE((header->sve_flags & SVEREG_FLAG_REGS_MASK) == + SVEREG_FLAG_SVE); + + /* Test writing back the SVE registers works */ + ATF_REQUIRE(ptrace(PT_SETREGSET, wpid, (caddr_t)&svevec, NT_ARM_SVE) == + 0); + + free(svevec.iov_base); + free(fpvec.iov_base); + + /* Step over the brk instruction */ + ATF_REQUIRE(ptrace(PT_GETREGS, wpid, (caddr_t)®, 0) != -1); + reg.elr += 4; + ATF_REQUIRE(ptrace(PT_SETREGS, wpid, (caddr_t)®, 0) != -1); + + ptrace(PT_CONTINUE, wpid, (caddr_t)1, 0); + waitpid(child, &status, 0); + ATF_REQUIRE(WIFEXITED(status)); + ATF_REQUIRE_EQ(WEXITSTATUS(status), 0); +} + +ATF_TC_WITHOUT_HEAD(sve_fork_env); +ATF_TC_BODY(sve_fork_env, tc) +{ + pid_t child, wpid; + int status; + + check_for_sve(); + + child = fork(); + ATF_REQUIRE(child >= 0); + + /* Check the child environment is sane */ + if (child == 0) { + unsigned long child_vl, hwcap; + + if (elf_aux_info(AT_HWCAP, &hwcap, sizeof(hwcap)) != 0) + _exit(1); + + if ((hwcap & HWCAP_SVE) == 0) + _exit(2); + + if (sysarch(ARM64_GET_SVE_VL, &child_vl) != 0) + _exit(3); + + if (child_vl != vl) + _exit(4); + + _exit(0); + } + + wpid = waitpid(child, &status, 0); + ATF_REQUIRE_EQ(child, wpid); + ATF_REQUIRE(WIFEXITED(status)); + ATF_REQUIRE(WEXITSTATUS(status) == 0); +} + +ATF_TC_WITHOUT_HEAD(sve_fork_regs); +ATF_TC_BODY(sve_fork_regs, tc) +{ + pid_t child, wpid; + uint64_t *val; + int status; + + check_for_sve(); + + /* + * Malloc before fork to reduce the change of trashing sve registers + */ + val = malloc(vl); + ATF_REQUIRE(val != NULL); + + /* + * Store 1.0 in z0, repeated every 16 bits. Read it from d0 as + * the registers alias. + */ + asm volatile( + ".arch_extension sve \n" + "fmov z8.h, #1 \n" + ".arch_extension nosve \n" + ::: "z8" + ); + + /* TODO: Move to asm to ensure z8 isn't trashed */ + child = fork(); + + asm volatile( + ".arch_extension sve \n" + "str z8, [%0] \n" + ".arch_extension nosve \n" + :: "r"(val) : "z8" + ); + + ATF_REQUIRE(child >= 0); + + /* Check the child environment is sane */ + if (child == 0) { + for (size_t i = 0; i < vl / sizeof(*val); i++) { + if (val[i] != 0x3c003c003c003c00) + _exit(i + 1); + } + + free(val); + _exit(0); + } + + free(val); + wpid = waitpid(child, &status, 0); + ATF_REQUIRE_EQ(child, wpid); + ATF_REQUIRE(WIFEXITED(status)); + ATF_REQUIRE(WEXITSTATUS(status) == 0); +} + +ATF_TP_ADD_TCS(tp) +{ + ATF_TP_ADD_TC(tp, sve_registers); + ATF_TP_ADD_TC(tp, sve_signal); + ATF_TP_ADD_TC(tp, sve_signal_altstack); + /* TODO: Check a too small signal stack */ + ATF_TP_ADD_TC(tp, sve_ptrace); + ATF_TP_ADD_TC(tp, sve_fork_env); + ATF_TP_ADD_TC(tp, sve_fork_regs); + return (atf_no_error()); +} diff --git a/tests/sys/arch/aarch64/sve_ptrace_helper.c b/tests/sys/arch/aarch64/sve_ptrace_helper.c new file mode 100644 index 000000000000..77aa8766cd50 --- /dev/null +++ b/tests/sys/arch/aarch64/sve_ptrace_helper.c @@ -0,0 +1,46 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2024 Arm Ltd + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +#include + +int +main(int argc, char *argv[]) +{ + (void)argc; + (void)argv; + + /* Enable SVE by using it */ + asm volatile( + ".arch_extension sve \n" + "fmov z0.h, #1 \n" + ".arch_extension nosve \n" + ::: "z0"); + + asm volatile("brk #0"); + _exit(0); +} From nobody Wed Apr 8 14:32:15 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4frQWN3Ghfz6YDc2 for ; Wed, 08 Apr 2026 14:32: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4frQWN1L0Rz3rSn for ; Wed, 08 Apr 2026 14:32:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775658736; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+wRdiafoonXIQSRhzrODkCeyTq/zlqSOPrLfCqtTjYo=; b=MJ9BBoIgOKCMt//G2Lxh/Ogqft7ZLN1QnPBtMeA1fFfFeWXsl1s5KC4n5nJvlebzgYn4/G qat5VBf58h+P3i9O/+TvJOSliEmpMUNDSrnVlOcgi1JsfX3+9wsbCuHMDoFefe7OJiVo4d xxsGb0bT/Q4hft1CXKbu27BzVUWP6MkUA1aIJ0TXGFGtaFzyzY9RSnqjJydLvAk+T3JCG4 Bf3GTQvbElnmjpPH1YZiY/PGYqXc6GApnS/8UqOmxyZqUDBx0dMAAQClXEiXpCk5flakLp WM/pPn0Q2XsfS4GT/J4ntrLwvN9WwBdfH37dVeXAEr27CGCEZLFP5PkU6KAVjA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775658736; a=rsa-sha256; cv=none; b=glGPMkFCCwcWcfG1KWJ9NshQDOF1RGNX/iHZGiYab69X5AYCwn7FWIp2i2EwMp8pRFdNzk XiUnei4lGPQ+EKOqD6k6DRiYVkXGgHPqWyIfFfOHrL9WfUsOxLm5s5jdOHtoCJejqUgm2e YdnCn4oNCdOr8UfNjOB72aQj8tTs+AOdKQldtjxaLT7eE3l2gWsFx42SR70Ny88462Hk5F J0F9/nm49O8Pnlv/PqDbswPIOWoqe99tmmZbJvRPBkCXbPjmIGszBFm2OnHCnOwadJurE3 4k+cF62XctR6Dx7WgI/AjtqWEJ5pUxRWsGqJihrU1z64dZAVknyRlh8JhRrG5A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775658736; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+wRdiafoonXIQSRhzrODkCeyTq/zlqSOPrLfCqtTjYo=; b=nrHIgai3fyeVm/6RkY2MNjr+xMpwiqs4NMYskIH+TGjV4H95kNUo1vCFXzkxkUbcRhQPQz TG9p99fH2tLhogh8PTPTxgunwCxjC+j4rUtFCd6yQD/eSwyZ6Kw2CfA0xHxo+MFy6bhljt 5yNFtC4H7Jdhr/L0JiYqRmvY0lPYG5EIQ2+aZUpf8rRFEYJvImNoM+KrkF9aCqP2KTCvXb pUHjiR5J6QhuNHkf7T9IE6kF6d7FrJ+HhVu4sOnkYdVayqB/J56fMKqutOfT/a68N4bIz5 vAYlEgPcBIeHHQUbOmMGxI8/zAbrYYA46tN2rItof6/KotMLl1F8u0Z4WdqkcQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4frQWN0LXLzVlY for ; Wed, 08 Apr 2026 14:32:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3da7a by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 08 Apr 2026 14:32:15 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 96a685c229f2 - main - lib/msun/aarch64: provide export file for arch-specific fenv methods List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: 96a685c229f2ce440591f98d33d36776e56dd55c Auto-Submitted: auto-generated Date: Wed, 08 Apr 2026 14:32:15 +0000 Message-Id: <69d666ef.3da7a.76659eaf@gitrepo.freebsd.org> The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=96a685c229f2ce440591f98d33d36776e56dd55c commit 96a685c229f2ce440591f98d33d36776e56dd55c Author: Konstantin Belousov AuthorDate: 2026-04-06 16:41:23 +0000 Commit: Konstantin Belousov CommitDate: 2026-04-08 14:32:00 +0000 lib/msun/aarch64: provide export file for arch-specific fenv methods Reported and tested by: fluffy Reviewed by: emaste Fixes: 3a01e1e1a50cb9a9594aac2148dc920a6b295428 Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D56283 --- lib/msun/aarch64/Symbol.map | 10 ++++++++++ lib/msun/aarch64/fenv.c | 18 ++++++++++++++++++ lib/msun/aarch64/fenv.h | 14 +++++++++----- 3 files changed, 37 insertions(+), 5 deletions(-) diff --git a/lib/msun/aarch64/Symbol.map b/lib/msun/aarch64/Symbol.map new file mode 100644 index 000000000000..b468c814ff06 --- /dev/null +++ b/lib/msun/aarch64/Symbol.map @@ -0,0 +1,10 @@ +FBSD_1.9 { + fesetexceptflag; + feraiseexcept; + fegetenv; + feholdexcept; + feupdateenv; + feenableexcept; + fedisableexcept; + fegetexcept; +}; diff --git a/lib/msun/aarch64/fenv.c b/lib/msun/aarch64/fenv.c index a428a9d8a271..3d7e467880c7 100644 --- a/lib/msun/aarch64/fenv.c +++ b/lib/msun/aarch64/fenv.c @@ -98,3 +98,21 @@ int { return (__feupdateenv_int(envp)); } + +int +(feenableexcept)(int mask) +{ + return (__feenableexcept_int(mask)); +} + +int +(fedisableexcept)(int mask) +{ + return (__fedisableexcept_int(mask)); +} + +int +(fegetexcept)(void) +{ + return (__fegetexcept_int()); +} diff --git a/lib/msun/aarch64/fenv.h b/lib/msun/aarch64/fenv.h index 32a03ee1eb49..5d47940cf9eb 100644 --- a/lib/msun/aarch64/fenv.h +++ b/lib/msun/aarch64/fenv.h @@ -92,6 +92,9 @@ int fegetenv(fenv_t *); int feholdexcept(fenv_t *); int fesetenv(const fenv_t *); int feupdateenv(const fenv_t *); +int feenableexcept(int); +int fedisableexcept(int); +int fegetexcept(void); #define feclearexcept(a) __feclearexcept_int(a) #define fegetexceptflag(e, a) __fegetexceptflag_int(e, a) @@ -104,6 +107,9 @@ int feupdateenv(const fenv_t *); #define feholdexcept(e) __feholdexcept_int(e) #define fesetenv(e) __fesetenv_int(e) #define feupdateenv(e) __feupdateenv_int(e) +#define feenableexcept(a) __feenableexcept_int(a) +#define fedisableexcept(a) __fedisableexcept_int(a) +#define fegetexcept() __fegetexcept_int() __fenv_static inline int __feclearexcept_int(int __excepts) @@ -233,10 +239,8 @@ __feupdateenv_int(const fenv_t *__envp) #if __BSD_VISIBLE -/* We currently provide no external definitions of the functions below. */ - static inline int -feenableexcept(int __mask) +__feenableexcept_int(int __mask) { fenv_t __old_r, __new_r; @@ -247,7 +251,7 @@ feenableexcept(int __mask) } static inline int -fedisableexcept(int __mask) +__fedisableexcept_int(int __mask) { fenv_t __old_r, __new_r; @@ -258,7 +262,7 @@ fedisableexcept(int __mask) } static inline int -fegetexcept(void) +__fegetexcept_int(void) { fenv_t __r; From nobody Wed Apr 8 14:32:17 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4frQWP2m9kz6YDZ3 for ; Wed, 08 Apr 2026 14:32:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4frQWP140Mz3rSp for ; Wed, 08 Apr 2026 14:32:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775658737; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WSDIuTTPFiEEAmdeGFU+CD3PsopHXmXaFcHgdRwK0Bc=; b=hcP8x3vfy2zqlwgF394VV45L3GuXZb92L2C+yDJw0PoEv76tDw0tSljMUeMPiPF/LA8hes cSP3W+JClDKc68ChlMjH+Q1KgpdD1xs+BX5hl7dlDje5NTTsor2sKkFgo3DpJ9sBXYQA+m BatejAhWqY+U17OBGIUyro7KxgAkRgsgEygxeIyxYZuuwvH7b18GO0nvan0oKY9jVeMSNU cdM19kzsfouqlrfir7GKDmWcz2YCZ16t8CNLPlYzK//v0TaOnOmoyjMAQK/9NhF8pIIswj Ue5vwvOpfW8eEJ6zG2bzZO385UHxnSyFiRHmHFwalmq26ESHkNfZM4MfUHSG1g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775658737; a=rsa-sha256; cv=none; b=by9Uua91Kvpeg18ucxcsAlIv2lJtoI96Q0QoN4sjfs/xKgcDu3Bpoc7WKPeDsjcI6fkozz T1jKtMuSo4h7bS0tCfMcVwpG72I33t/WU5ogSfZrT32ZK4qEuN2loJse4FVwvK0reTV6CX rg1gB87UNqIlxYqq08qcm4N0AokKaQUEFMDlTIQ3EbPejOGklDeQ+C1Qm0NzoRnNXqNHFf QTd7ccU/fsG1TKZnVZDtqX2HnanwhNoKlhzk3owi00zX8wRu/GO9cQqY3liSoYgCPZutWW LaIxbJl8b+85n+mZmhpodK0fX0Vt2/N5u7tZ/4+5aZvXAZUKOYfXz/9bSqKckw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775658737; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WSDIuTTPFiEEAmdeGFU+CD3PsopHXmXaFcHgdRwK0Bc=; b=px4n+PZ2mXWDf7hVurp0BHbJuYHB/LkxCYjMdHki5H2t5ic2TcVwAqpOSlMawDTq/SQeuT GZrNN6VhN06QGhyoETLi2eYtrempxMOXIhm+vU5xU/Wq0PyP+SBJEtDsZjbs1e/YBQk/84 smmU8ABem4klmpSGDvtwSIYwjr7AYYVy0hIzQ7lvQyd+/olaFMAIyfEZuaSvbtgGVmtvM6 0x91ISw7DMPO3QF8x0nGaVyU1WOnyhKKwZqL9isGEdd0geyRxpmvV/CVaHJeqG/mfv+Y4h DAtWlXdX1KjTviR4xP2+X7YyLX9RsAxWKu3smS7WhJvFW54qO3XnSolCBWEaOA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4frQWP0QSvzWHf for ; Wed, 08 Apr 2026 14:32:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3e421 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 08 Apr 2026 14:32:17 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: c913dce86e7b - main - lib/msun: centralize addition of the arch-specific symbol map files List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c913dce86e7b6ff9c0c3265631529586aaf8520a Auto-Submitted: auto-generated Date: Wed, 08 Apr 2026 14:32:17 +0000 Message-Id: <69d666f1.3e421.5d325393@gitrepo.freebsd.org> The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=c913dce86e7b6ff9c0c3265631529586aaf8520a commit c913dce86e7b6ff9c0c3265631529586aaf8520a Author: Konstantin Belousov AuthorDate: 2026-04-06 17:46:45 +0000 Commit: Konstantin Belousov CommitDate: 2026-04-08 14:32:00 +0000 lib/msun: centralize addition of the arch-specific symbol map files This also adds the aarch64 symbols, exporting them. Reported and tested by: fluffy Reviewed by: emaste Fixes: 3a01e1e1a50cb9a9594aac2148dc920a6b295428 Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D56283 --- lib/msun/Makefile | 1 + lib/msun/amd64/Makefile.inc | 1 - lib/msun/arm/Makefile.inc | 1 - lib/msun/i387/Makefile.inc | 1 - lib/msun/powerpc/Makefile.inc | 1 - lib/msun/riscv/Makefile.inc | 1 - 6 files changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/msun/Makefile b/lib/msun/Makefile index 5112337f6297..4a0ff1ad92b6 100644 --- a/lib/msun/Makefile +++ b/lib/msun/Makefile @@ -115,6 +115,7 @@ LIBC_ARCH=${MACHINE_CPUARCH} CFLAGS+= -I${.CURDIR}/src -I${LIBC_SRCTOP}/include \ -I${LIBC_SRCTOP}/${LIBC_ARCH} SYM_MAPS+= ${.CURDIR}/Symbol.map +SYM_MAPS+= ${.CURDIR}/${ARCH_SUBDIR}/Symbol.map VERSION_DEF= ${LIBC_SRCTOP}/Versions.def SYMBOL_MAPS= ${SYM_MAPS} diff --git a/lib/msun/amd64/Makefile.inc b/lib/msun/amd64/Makefile.inc index dcdc2495d690..f1e6aef552ca 100644 --- a/lib/msun/amd64/Makefile.inc +++ b/lib/msun/amd64/Makefile.inc @@ -6,4 +6,3 @@ ARCH_SRCS = e_fmod.S e_fmodf.S e_fmodl.S \ s_remquo.S s_remquof.S s_remquol.S \ s_rintl.S s_scalbn.S s_scalbnf.S s_scalbnl.S LDBL_PREC = 64 -SYM_MAPS += ${.CURDIR}/amd64/Symbol.map diff --git a/lib/msun/arm/Makefile.inc b/lib/msun/arm/Makefile.inc index 6e3ddb351dd3..e155f1a2cae4 100644 --- a/lib/msun/arm/Makefile.inc +++ b/lib/msun/arm/Makefile.inc @@ -1,5 +1,4 @@ LDBL_PREC = 53 -SYM_MAPS += ${.CURDIR}/arm/Symbol.map .if defined(CPUTYPE) && ${CPUTYPE:M*soft*} != "" ARCH_SRCS = fenv-softfp.c fenv-vfp.c diff --git a/lib/msun/i387/Makefile.inc b/lib/msun/i387/Makefile.inc index 73feb52de6a2..f70c6b1bb569 100644 --- a/lib/msun/i387/Makefile.inc +++ b/lib/msun/i387/Makefile.inc @@ -17,4 +17,3 @@ ARCH_SRCS+= e_fmodl.S \ s_logbl.S s_lrintl.S s_remquol.S s_rintl.S s_scalbnl.S s_truncl.S LDBL_PREC = 64 # XXX 64-bit format, but truncated to 53 bits -SYM_MAPS += ${.CURDIR}/i387/Symbol.map diff --git a/lib/msun/powerpc/Makefile.inc b/lib/msun/powerpc/Makefile.inc index 35747abb7087..2ae9bacdaab0 100644 --- a/lib/msun/powerpc/Makefile.inc +++ b/lib/msun/powerpc/Makefile.inc @@ -1,2 +1 @@ LDBL_PREC = 53 -SYM_MAPS += ${.CURDIR}/powerpc/Symbol.map diff --git a/lib/msun/riscv/Makefile.inc b/lib/msun/riscv/Makefile.inc index 6262cfd6981e..ee32db47286d 100644 --- a/lib/msun/riscv/Makefile.inc +++ b/lib/msun/riscv/Makefile.inc @@ -1,2 +1 @@ LDBL_PREC = 113 -SYM_MAPS += ${.CURDIR}/riscv/Symbol.map From nobody Wed Apr 8 15:31:02 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4frRqJ4pgbz6YJXW for ; Wed, 08 Apr 2026 15:31: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4frRqJ2PLgz42fZ for ; Wed, 08 Apr 2026 15:31:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775662268; 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; bh=F6B/UHUkJ4ppuolfvBx3wg/nCwmzYkvK8wI0ap3LCeE=; b=IkwU3KznG65Hr/d7sFFH0NXJnAHx+rFBvFGYB3opB4ozVij9rERDJUSuHWVS5KTJLU5ExF cJFINj/FIuuX2eRb+KLzpzPS03k7Ot1n1wAC8vqVon2cMuy1KF7MkIW16HsneefSngpleP NMOhOTdutVDO1tzrkWVmL1aRX1UlD8MycULEhjIW2nSSCgR/x41sImFVWJ+bAmXJ1wJQkL 6Snt690f06BmW2gwX6rmedTiHYLYx2+etGfVZx148iOdKKXxHEJRNTiigdgFidA8qVzpFY iS1QUxVLJasl1cC/KnTz+4lqRd59nwf/j0pqPlmwtx2ZfYAfsd29hy9XOzqXcg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775662268; a=rsa-sha256; cv=none; b=xv7Kt2HCEU7KNzyvVwj9cqwJgwL3IFNUmn5ScqqslE2ZOZTck31X1BG9OQDXnZ03pIkP9V B9AWgn+fe3u9y2G50JefVbF7YKZxfo51P4Lyd4Uw7fGuAckR7dOQUBXGMmdlTVKmEelhJx mvJKdXKlQqc4Hu9bHiCKgGEHvgevUwdfu8+I2gfoOgbyVRNk2PT3wodugil1m9zuUpADk6 mPe2fx98fKG8ExVUDfNU9u+5yiDD4nGUfhF9mtIuom9KdMWk5cwTzGMnTmkDJlGkm2D3bS XVyndCjsqperZRtoEpVOeaLvqKfea6ugTGaLc8S0H2YSYNzB3iE7rUjsQYplYA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775662268; 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; bh=F6B/UHUkJ4ppuolfvBx3wg/nCwmzYkvK8wI0ap3LCeE=; b=uQDU35TbD97DOuWrXCDWcTWOJchI4jkHNbPD1kHSTflYrB7ncfvehtNv8pPeTehE+bQhRy pXP0EN+PDMJMlUfrZDrpAYzFcmQToVlt+6yrjgIhQaVGHTaYWMlFvo+NCDI0EXw3+uemDe doRopJWjcbkMQPz9I8HR5bSj3LCt2iiiPaS/9iZfmNwSaJRfTDzQiDf5fc6lF3TO7jzlxR GaDqz+U9Rbrr4ZnvU/9WF3x69Vm4Vq+6GnaU3ZE78eTznG83ZIqXUCiwNFL0/9jEGOYRXK qMTegYmUMVBKpgRO3MBgF9t+fWlvJJ4JATi8UR92jz+UT2E99vVqL8EdVAnQ4Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4frRqJ1YhWzYrW for ; Wed, 08 Apr 2026 15:31:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 4497f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 08 Apr 2026 15:31:02 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Shunchao Hu From: ShengYi Hung Subject: git: 16aa49f6d1bb - main - compat/linprocfs: Fix auxv sbuf leak List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: aokblast X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 16aa49f6d1bbe70cd3e851139eb63d566de49b12 Auto-Submitted: auto-generated Date: Wed, 08 Apr 2026 15:31:02 +0000 Message-Id: <69d674b6.4497f.344f0ea2@gitrepo.freebsd.org> The branch main has been updated by aokblast: URL: https://cgit.FreeBSD.org/src/commit/?id=16aa49f6d1bbe70cd3e851139eb63d566de49b12 commit 16aa49f6d1bbe70cd3e851139eb63d566de49b12 Author: Shunchao Hu AuthorDate: 2026-04-04 10:27:53 +0000 Commit: ShengYi Hung CommitDate: 2026-04-08 15:30:23 +0000 compat/linprocfs: Fix auxv sbuf leak linprocfs_doauxv() allocates an automatic sbuf before validating whether the requested read can be satisfied. When the computed auxv read length exceeds IOSIZE_MAX, or when the buffer length is too big, the function returns early without releasing the sbuf. Route these early exits through a shared cleanup path so the sbuf is always deleted after sbuf_new_auto() succeeds. Signed-off-by: Shunchao Hu Reviewed by: des, spmzt, zlei, aokblast MFC after: 2 weeks Pull Request: https://github.com/freebsd/freebsd-src/pull/2118 --- sys/compat/linprocfs/linprocfs.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/sys/compat/linprocfs/linprocfs.c b/sys/compat/linprocfs/linprocfs.c index 7ac48786c77b..941b76788dc1 100644 --- a/sys/compat/linprocfs/linprocfs.c +++ b/sys/compat/linprocfs/linprocfs.c @@ -2026,23 +2026,26 @@ linprocfs_doauxv(PFS_FILL_ARGS) if (asb == NULL) return (ENOMEM); error = proc_getauxv(td, p, asb); - if (error == 0) - error = sbuf_finish(asb); + if (error != 0) + goto out; + error = sbuf_finish(asb); + if (error != 0) + goto out; resid = sbuf_len(asb) - uio->uio_offset; if (resid > uio->uio_resid) buflen = uio->uio_resid; else buflen = resid; - if (buflen > IOSIZE_MAX) - return (EINVAL); + if (buflen > IOSIZE_MAX) { + error = EINVAL; + goto out; + } if (buflen > maxphys) buflen = maxphys; - if (resid <= 0) - return (0); - - if (error == 0) + if (resid > 0) error = uiomove(sbuf_data(asb) + uio->uio_offset, buflen, uio); +out: sbuf_delete(asb); return (error); } From nobody Wed Apr 8 15:32:10 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4frRrW092dz6YJfK for ; Wed, 08 Apr 2026 15:32: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4frRrV1lYPz43NX for ; Wed, 08 Apr 2026 15:32:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775662330; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jdCfMf4ohoTOYtkEG812D/b9LjgTshnEZl6fO7T8qqQ=; b=G8s5HmxIPKzNL2HH3RvYWkojC4uXfXihCABfOlNnTrwrUifWDKtZWwL/IwgMxPveiwzuE9 ukL8dll8N7nVCrguoPHvN8s6nrHYXKOsG6GJHYZye4dLn6a/Mhabh1bw5QyxI7Diyb1ZEZ S5LBV/4nlLjtIZhfdwnej2y0eSp2+1phXruQI9pLGvui8WJbcOyefvmeVF6sz6zENBgrTp /o+YotiOW0x7Pdd6ZsGg3jOvtjNFxKLyvyD1v19wltjFfbFWekFHWiT5DdWz+qQvuS/wto OJ4Fo5wRLF8qLEPUkmG6VU9RKPiY0nYLkYY2fxMKkoam5/j6KhPa5gIQ9fpVbg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775662330; a=rsa-sha256; cv=none; b=o3/aciJ2DpwcgxMN2iD3nPfmXixoz6VxHvysMpuQqJQjhV+4EZVOBCky+t1V85JyRCU3Cn cPLJxoUVnlDxiR+cGt1HAMS/FNeN3FZ5MSfS3DOQO2BD6t4c4B6cqduFK9NJPCY7+yoy1p M6xIaw4M/MTWRZbn8z3VfRKqXR99kcxlz/uPVRBi9AocB1CC9xJchc5qEuJgaWjPWACeaM Wu52BVkFPYscm3VcyCEirIxvMhRYw95inGtsSioas/JIqvqrKayOPGAOCbKEclv9x/nt7d ZkiIwD4k0FLqhbYNbTlVAvJzlfS2fzDGjeByd8oXIqINI2FA6YU7pEbbFX9dVA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775662330; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jdCfMf4ohoTOYtkEG812D/b9LjgTshnEZl6fO7T8qqQ=; b=Oj+GL/8HUrYp09eqAuV8I0bUYxT0H7MH+b2XaI55fLE21GFVLGNDrHbDIzmNQ8ZmrLykYn xvXul9B1htYXOziDQsQwMv96pO4oNAYcGygyTwgxH7b+Xvv8y4jyE11fSht7Sb9v0O39sF 4frgqf4yPnjjunEm8okdUcJ8C04BSU4VIZJsI9GlnDhBw4gbVrm1E8H2a9OyTD9aT5rmka QZIog6S5nc7xrv9NunKaSEVwfEiaoXirgTndJkyKZUhatEunQB4v+YYRs/CXEF1QI496Hc rGAguSb2KxjnceDUipUOLhNw1dU+hXW/kbQMkTbP7JYwwkkezCxV5vB8YGzIiQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4frRrV1MMvzY5q for ; Wed, 08 Apr 2026 15:32:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 4430c by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 08 Apr 2026 15:32:10 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: a7e07d0d57f1 - main - libgcc_s: export __extendhftf2 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a7e07d0d57f1a2f2c94c6be1e3f33c03635235d1 Auto-Submitted: auto-generated Date: Wed, 08 Apr 2026 15:32:10 +0000 Message-Id: <69d674fa.4430c.d31efef@gitrepo.freebsd.org> The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=a7e07d0d57f1a2f2c94c6be1e3f33c03635235d1 commit a7e07d0d57f1a2f2c94c6be1e3f33c03635235d1 Author: Brooks Davis AuthorDate: 2026-04-08 15:31:03 +0000 Commit: Brooks Davis CommitDate: 2026-04-08 15:31:55 +0000 libgcc_s: export __extendhftf2 We've compiled it since the LLVM 13 import in 2021, but for some reason never exported it. A user of CheriBSD recently caused Morello LLVM to emit a reference to it so finish the job and export it. Reviewed by: dim, emaste Fixes: 6e75b2fbf9a0 ("Merge llvm-project release/13.x llvmorg-13.0.0-rc1-97-g23ba3732246a") MFC after: 1 week Sponsored by: DARPA, AFRL See also: https://github.com/CTSRD-CHERI/cheribsd/issues/2614 Differential Revision: https://reviews.freebsd.org/D56310 --- lib/libgcc_s/Symbol.map | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/libgcc_s/Symbol.map b/lib/libgcc_s/Symbol.map index e8f7e824adaf..91fdeac3f2cf 100644 --- a/lib/libgcc_s/Symbol.map +++ b/lib/libgcc_s/Symbol.map @@ -198,6 +198,7 @@ GCC_4.6.0 { __divtf3; __eqtf2; __extenddftf2; + __extendhftf2; __extendsftf2; __fixtfdi; __fixtfsi; From nobody Wed Apr 8 15:36:06 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4frRx25Xc1z6YK5Z for ; Wed, 08 Apr 2026 15:36: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4frRx22vFQz44QB for ; Wed, 08 Apr 2026 15:36:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775662566; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hyMfmTtfVrQERNGcKnAfRgm49o6Q+XILxTH2+hvEbGw=; b=BaCxAMDlMm4M9Kgi2tSIymFQKw+g/XPviaaHAF9IWQLjI4fhAzCtIvNv3Owf7Qmv30fbA3 8zvZdOPjJLvvJApNYrLSWoRMaX0+cB81ygOBKYnxFQTPG3dkRNGdgxp+shtzT/cfddRM88 hFOA6OZAQ0fqR27MEHgyUh56JFEF3l7r6WUj58qyfHQO52m0F+JOubALwCeirMxUMGYtwN wiRx1XJD/2sgm5HOFNwVlpX+8n+4zfWKSo3FUS9pMIohUyCLDBBUMZGWWjoFcVhVeQke8B JWEmfgFe1ucSOERxtxUIyhVyiVBj0gDdMyNRTSmBz0+tmfs+f1VnonKRlg+4AA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775662566; a=rsa-sha256; cv=none; b=TO+//kcjQGP+qvd707SEZ2tSD7S/ZmE4B4aS0Yh8LWi6CXnmnr80XDSZGCjneAIyLOSZ1a U5PGMF4VonezTalvSWo1w77/ToqrouSjPA5UoLDUrbsOZTPKvDIWRCKqgIIGWGwrsWxVxR EXJAO3rpp7J7mDF+xGT6e9lYJ2/Oq7itHE3RVSZ8UhVwuiYN1+YBOUBnByduCnrjDtc0Yh 0Zgl5T+WkQ5Md1jQxMJ0ttkKY07oMyFrkMsdb3r0ZsADgzTtFgKGtEWlV9yBZIud10Ncpe TIUEesj+g36w+c5O3Z3P5ygPu2WnfgNrAFhLk14de0AGIKOKZq0re/G5IJqgfw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775662566; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hyMfmTtfVrQERNGcKnAfRgm49o6Q+XILxTH2+hvEbGw=; b=VgQBe9oMtlHlanXp3S9lAlTRrdz4XhtvZYRXD+/doKTyP225AKMGIk7htDOtz/uFxs4FXs vB2zJl0g/+F00QkcitnJI811GAxMDqAn2QgJLVbQ2HjKnJEhXVXQtMxtxrdWNY36CaKPCn pPXXBcMM48ni1Wmx8CCKaKlEBQP3A6lT5CWJJLkAkGFr5LO/oJFl5Toh93y+gAJF3p61eq NtbFFpPGLGl1YfMK8JD686L7xYYDdp75yFppA7KU+X+RFADPEPdZDTmpXtcws5HYKwV+3p qVSyYAQrfmdPlCTBusXV8H5xad/BFNUVYdR/tNcKS67zSSog8BsjNslXy4sx8A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4frRx21jzyzY8M for ; Wed, 08 Apr 2026 15:36:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 431c5 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 08 Apr 2026 15:36:06 +0000 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=B8rg?=rav Subject: git: 8cbd3949297d - main - stat: Nits in stat tests List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8cbd3949297d56e3960dcde73bd7e2277ac4bee8 Auto-Submitted: auto-generated Date: Wed, 08 Apr 2026 15:36:06 +0000 Message-Id: <69d675e6.431c5.278a082e@gitrepo.freebsd.org> The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=8cbd3949297d56e3960dcde73bd7e2277ac4bee8 commit 8cbd3949297d56e3960dcde73bd7e2277ac4bee8 Author: Dag-Erling Smørgrav AuthorDate: 2026-04-08 15:35:35 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-04-08 15:35:35 +0000 stat: Nits in stat tests * Use ourselves as test file instead of /COPYRIGHT, which may or may not be present in the test environment. * atf-check understands \n in strings, use it. * Some file systems don't like creating small holes, so create large ones instead. This means we need two variables: ps (page size) is the minimum size of a data region and the alignment for a hole, while hs (hole size) is the minimum size of the holes we create. This makes no difference on FreeBSD but makes it easier to port the test to other platforms. MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D56304 --- usr.bin/stat/tests/stat_test.sh | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/usr.bin/stat/tests/stat_test.sh b/usr.bin/stat/tests/stat_test.sh index afe698575034..6043686396be 100755 --- a/usr.bin/stat/tests/stat_test.sh +++ b/usr.bin/stat/tests/stat_test.sh @@ -54,6 +54,7 @@ h_flag_head() } h_flag_body() { + file=$(realpath $0) # 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 @@ -82,27 +83,27 @@ h_flag_body() atf_check -o inline:"$((ps)) .\n" stat -h . atf_check -o inline:"$((ps)) ." stat -hn . - # For a file, prints a list of holes. + # For a file, prints a list of holes. Some file systems don't + # like creating small holes, so we create large ones instead. + hs=$((16*1024*1024)) 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" \ + atf_check truncate -s "$((hs))" foo + atf_check -o inline:"0-$((hs-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" \ + atf_check dd status=none if="${file}" of=foo \ + oseek="$((hs))" bs=1 count=1 + atf_check -o inline:"0-$((hs-1)),$((hs+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" \ + atf_check truncate -s "$((hs*3))" foo + atf_check -o inline:"0-$((hs-1)),$((hs+ps))-$((hs*3-1)) foo" \ stat -hn foo # Test multiple files. - atf_check dd status=none if=/COPYRIGHT of=bar + atf_check dd status=none if="${file}" of=bar sz=$(stat -f%z bar) - atf_check -o inline:"0-$((ps-1)),$((ps*2))-$((ps*3-1)) foo -$((sz)) bar -" \ + atf_check -o inline:"0-$((hs-1)),$((hs+ps))-$((hs*3-1)) foo\n$((sz)) bar\n" \ stat -h foo bar # For a device, fail. From nobody Wed Apr 8 16:51:44 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4frTcQ0f3wz6YQXT; Wed, 08 Apr 2026 16:51:50 +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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4frTcP1jC5z4GGP; Wed, 08 Apr 2026 16:51:49 +0000 (UTC) (envelope-from ivy@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775667109; 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=NTVnTX65wOuGsKvShcdRQh0P7pCZW3MO3Ti6I3AB4z8=; b=SW3Onaz4Xnkqz1hWM+ZBmrAciJF53p+pkvSFs6k+309kH1zPOCPwxYcaAmrDS/poHBSlJQ tgB+Hi0fmCkVN6rAPkFxKnmfcmI5TB/O6E+idmOS4kZsdUR7GXgeAuh+PABPQxb+D+QeCS 0UClmBAEPsapgRUMOAcM4azhLKX0l7E/fGUUpHek5JKkC0L2DNVxi3MMIJkR9SuvOiT54S 1o8xjaO7P9gz+Yy/9V+xvbCQzJktrK7/c1iL+xH4omfZ2MSODjKUHY36IbGWuGgss33dIQ UwAHv+LFkKylaNiTeq9WbNvqwSjl4777zOywY0/x/x40oktitiYwrAgVu24DNg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775667109; a=rsa-sha256; cv=none; b=D73iX+9+9d6wMq1+602LnVESDSr94k89dWE7qhBCjwKHGkpEWKMqYQa297QyW408Dl9Z8P B2rWS2hSR+3eaXfZFszeU41vgEGYN7+yIZ7cWjZSzZFTIjQEmJnnEf3jgIPCnCYAK8RLju A4sC27rPPMqRk1sK46Z733pSH0MfIf3blsIwYTMO+lny02tcyBTT/7wAiUitFDGoiTgg6R A7ARMBqnFm3SEsj80O07zf6ZqG/4N5G7LbWsml/SVoXD8X32XMu/F26anOyro04arf0jJJ 1KivUhRt88m5zTeQIiGiWTliWFaZc3OzGJ39d2MFB83eqSqKdB7/5KNdIODwJg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775667109; 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=NTVnTX65wOuGsKvShcdRQh0P7pCZW3MO3Ti6I3AB4z8=; b=brca9niiBKP2lPptycr5fb2+MOx8I6Bbmph5bBl+MDEo7Fga0D5FGgmrgYE3yMBfhVAAug 6nJMveNdQtSw2L7lI3Jhjize8x7c2cUeC1npk7moVw7HvOSRg2Pe7URG2g9QefUFeCrAVU yqeq5GrYuCZc6oIrF/mGA0Gg+iGu4ezs1U1Wpb/6SO0i0sHGL7tavTtjdHUZY9fW5qYT1V 6r7kE+pJdGRIDtrn6m7GS2VcKNaAzwc+ywISzdkLv+u0OuAsZ1yYBuB1gUdL2HigcCpIrA mEr42CeZPiSD92PGDkKE85QOh0A2wb8nFUFAcpxwr066HctRWtb7cqu4u9i+sg== 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 4frTcN5Q45z3qb; Wed, 08 Apr 2026 16:51:48 +0000 (UTC) (envelope-from ivy@freebsd.org) Date: Wed, 8 Apr 2026 17:51:44 +0100 From: Lexi Winter To: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 50de0bf50512 - main - flua: Always build as a bootstrap tool Message-ID: Mail-Followup-To: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <69d4e4c1.1e7db.33fbe374@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="xTaFkrFwI5c81JH8" Content-Disposition: inline In-Reply-To: <69d4e4c1.1e7db.33fbe374@gitrepo.freebsd.org> --xTaFkrFwI5c81JH8 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Lexi Winter wrote in <69d4e4c1.1e7db.33fbe374@gitrepo.freebsd.org>: > commit 50de0bf50512aa98d18f21ac1347941396596944 > Author: Lexi Winter > AuthorDate: 2026-04-07 10:41:53 +0000 > Commit: Lexi Winter > CommitDate: 2026-04-07 10:41:53 +0000 >=20 > flua: Always build as a bootstrap tool i've received a report that this commit breaks building main on stable/14, which i'm investigating. sorry for any disruption. --xTaFkrFwI5c81JH8 Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQSyjTg96lp3RifySyn1nT63mIK/YAUCadaHnAAKCRD1nT63mIK/ YID4AQCrr4xB/lI/TMlk4Z8dWwkCbc4vXI9FbkW6aO2ydhLfbAD/WiGXQR7u4QEa aUeYJiomeiQZFVBgmNkoEBP48ws71AE= =NZ/R -----END PGP SIGNATURE----- --xTaFkrFwI5c81JH8-- From nobody Wed Apr 8 19:48:53 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4frYXk1kfxz6YfFm for ; Wed, 08 Apr 2026 19:48: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4frYXj6zyNz3NH0 for ; Wed, 08 Apr 2026 19:48:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775677733; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=L9cnkeXxfM8Opmv3w2ubbgtaO20Qy2iEfASA6pZqYuE=; b=GuTeoTBoARLDdj3rR/w2aUpJBCLsxhOM5a9vh4eahn2deH9BlgAAeODtA/mxwdKgZiqhR2 p5ESXynUI4+yAeP7UD/ziZpD/bd0O9lNx4Zw2jtXaNSCYdkffgVsNpqBcWVjJTAIoi94I0 jQwK21uRxYlaV9rv4+/+Q/4HhDi+l6yoY9moGONzq5QXLwQHplgB3gAVLnFGIbRCDxszL8 qMYP4mPUkCkZ4TEuu2mBr2cXhl/xKSlfvYBBgZoIPmo9n4oMMkgGwtD4OIwCxNntM2TqnJ qr+7rWC9e4ny+2uHy/0gHZYzGjayqJShgKvgggUC39iRDF2L7s9oPpFDlyzjPw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775677733; a=rsa-sha256; cv=none; b=hYqqHCaBD5JRO//5MgQFWKdVzS4pw2t/JG5SnMrIQGiwguDV91SeJQ0w+nXn2ObYNRJDts YejIe1ag0Sre0KyUP7CB/RSBE3vV3BxbCLvDChPcFa4+R2Ve39NsVxuFPPqznTZEJ4SXxP tJNjHJZ/T2uQ8U+aogwXr66/cU26Vxp0RvD2RRUdPE0T56f9q/vt821HHOIpAoIGjrAf2a 8WPUzuFCZ23upUNjRX4UUH7pq8/faYmYaspo5yT/mLzYoGDZHLydIZ5ZyEapSqM20RxTs/ RZS6VvwD/gHfBLYewH80ul0jtDkpKu6UqzwjtICBXKtFC5ERSY+5uRg6rT993A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775677733; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=L9cnkeXxfM8Opmv3w2ubbgtaO20Qy2iEfASA6pZqYuE=; b=SwRFr85GzT1NDDCfVwVuqtnSnhusIt3gz/5sV3Gqxja9K3R+yMcFpqXXM3z4flFPqRrKKZ tA4ShcX1GZ3F3KT0Ky3s56ok45clzVhMi+KOkX8oCpURO67aKT40MG/fk027jKhOwktNH3 Xo810F/YlxWwsyS8NGLZ/mjuUTUWEj9LOckgJa7xxL4LULFIvjv/4UOw7wvtFGRou0S0i4 Lag/FU0mC7NnerZ8AV8WSzxCbLlVsk/0vkcleKvm4yMLPb4UODBTIFFu28GWwfnlA/daF1 ChFNeEIxnpnjmbhmOprnZDhe7cVr+hkQJPgM9VuaJoyJXYCJu7dVF6PB7JSo9w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4frYXj6GX6zh0T for ; Wed, 08 Apr 2026 19:48:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 38185 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 08 Apr 2026 19:48:53 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dmitry Salychev Subject: git: 8e994533806d - main - dpaa2: Extract frame-specific routines to dpaa2_frame.[h,c] List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dsl X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8e994533806d8aa0ae4582a52d811ede2b19bb26 Auto-Submitted: auto-generated Date: Wed, 08 Apr 2026 19:48:53 +0000 Message-Id: <69d6b125.38185.25e43619@gitrepo.freebsd.org> The branch main has been updated by dsl: URL: https://cgit.FreeBSD.org/src/commit/?id=8e994533806d8aa0ae4582a52d811ede2b19bb26 commit 8e994533806d8aa0ae4582a52d811ede2b19bb26 Author: Dmitry Salychev AuthorDate: 2026-01-25 16:53:57 +0000 Commit: Dmitry Salychev CommitDate: 2026-04-08 19:48:11 +0000 dpaa2: Extract frame-specific routines to dpaa2_frame.[h,c] As soon as we need information from the hardware frame annotation to make sure that checksums of the ingress frames were verified by the DPAA2 HW, I've decided to make a preparation and extracted all of the frame related routines into the separate dpaa2_frame.[h,c] along with some clean up and improvements, e.g. no more dpaa2_fa, but dpaa2_swa and dpaa2_hwa structures to describe software and hardware frame annotations respectively, dpaa2_fa_get_swa/dpaa2_fa_get_hwa to obtain those annotations from the frame descriptor. The next step is to implement dpaa2_fa_get_hwa. PR: 292006 Approved by: tuexen MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D56315 --- sys/conf/files.arm64 | 1 + sys/dev/dpaa2/dpaa2_buf.c | 9 +- sys/dev/dpaa2/dpaa2_buf.h | 2 + sys/dev/dpaa2/dpaa2_frame.c | 165 ++++++++++++++++++++++++++++++++++ sys/dev/dpaa2/dpaa2_frame.h | 174 ++++++++++++++++++++++++++++++++++++ sys/dev/dpaa2/dpaa2_ni.c | 210 ++++++++++++++------------------------------ sys/dev/dpaa2/dpaa2_ni.h | 3 +- sys/dev/dpaa2/dpaa2_swp.h | 51 +---------- sys/dev/dpaa2/dpaa2_types.h | 5 ++ sys/modules/dpaa2/Makefile | 1 + 10 files changed, 420 insertions(+), 201 deletions(-) diff --git a/sys/conf/files.arm64 b/sys/conf/files.arm64 index 2a607748db8d..59a65a8251ca 100644 --- a/sys/conf/files.arm64 +++ b/sys/conf/files.arm64 @@ -262,6 +262,7 @@ dev/dpaa2/dpaa2_channel.c optional soc_nxp_ls dpaa2 dev/dpaa2/dpaa2_cmd_if.m optional soc_nxp_ls dpaa2 dev/dpaa2/dpaa2_con.c optional soc_nxp_ls dpaa2 dev/dpaa2/dpaa2_console.c optional soc_nxp_ls dpaa2 fdt +dev/dpaa2/dpaa2_frame.c optional soc_nxp_ls dpaa2 dev/dpaa2/dpaa2_io.c optional soc_nxp_ls dpaa2 dev/dpaa2/dpaa2_mac.c optional soc_nxp_ls dpaa2 dev/dpaa2/dpaa2_mc.c optional soc_nxp_ls dpaa2 diff --git a/sys/dev/dpaa2/dpaa2_buf.c b/sys/dev/dpaa2/dpaa2_buf.c index 8505b074fe4f..228e4448210d 100644 --- a/sys/dev/dpaa2/dpaa2_buf.c +++ b/sys/dev/dpaa2/dpaa2_buf.c @@ -42,6 +42,7 @@ #include "dpaa2_swp.h" #include "dpaa2_swp_if.h" #include "dpaa2_ni.h" +#include "dpaa2_frame.h" MALLOC_DEFINE(M_DPAA2_RXB, "dpaa2_rxb", "DPAA2 DMA-mapped buffer (Rx)"); @@ -129,7 +130,7 @@ dpaa2_buf_seed_rxb(device_t dev, struct dpaa2_buf *buf, int size, struct mtx *dma_mtx) { struct dpaa2_ni_softc *sc = device_get_softc(dev); - struct dpaa2_fa *fa; + struct dpaa2_swa *swa; bool map_created = false; bool mbuf_alloc = false; int error; @@ -179,9 +180,9 @@ dpaa2_buf_seed_rxb(device_t dev, struct dpaa2_buf *buf, int size, buf->vaddr = buf->m->m_data; /* Populate frame annotation for future use */ - fa = (struct dpaa2_fa *)buf->vaddr; - fa->magic = DPAA2_MAGIC; - fa->buf = buf; + swa = (struct dpaa2_swa *)buf->vaddr; + swa->magic = DPAA2_MAGIC; + swa->buf = buf; bus_dmamap_sync(buf->dmat, buf->dmap, BUS_DMASYNC_PREREAD); diff --git a/sys/dev/dpaa2/dpaa2_buf.h b/sys/dev/dpaa2/dpaa2_buf.h index 853a4fa78d3a..16ea7e1905ac 100644 --- a/sys/dev/dpaa2/dpaa2_buf.h +++ b/sys/dev/dpaa2/dpaa2_buf.h @@ -33,6 +33,8 @@ #include #include #include +#include +#include #include diff --git a/sys/dev/dpaa2/dpaa2_frame.c b/sys/dev/dpaa2/dpaa2_frame.c new file mode 100644 index 000000000000..4a155f7cb32f --- /dev/null +++ b/sys/dev/dpaa2/dpaa2_frame.c @@ -0,0 +1,165 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright © 2026 Dmitry Salychev + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include + +#include +#include + +#include +#include + +#include + +#include "dpaa2_types.h" +#include "dpaa2_frame.h" +#include "dpaa2_buf.h" +#include "dpaa2_swp.h" + +/** + * @brief Build a DPAA2 frame descriptor. + */ +int +dpaa2_fd_build(device_t dev, const uint16_t tx_data_off, struct dpaa2_buf *buf, + bus_dma_segment_t *segs, const int nsegs, struct dpaa2_fd *fd) +{ + struct dpaa2_buf *sgt = buf->sgt; + struct dpaa2_sg_entry *sge; + struct dpaa2_swa *swa; + int i, error; + + if (buf == NULL || segs == NULL || nsegs == 0 || fd == NULL) + return (EINVAL); + + KASSERT(nsegs <= DPAA2_TX_SEGLIMIT, ("%s: too many segments", __func__)); + KASSERT(buf->opt != NULL, ("%s: no Tx ring?", __func__)); + KASSERT(sgt != NULL, ("%s: no S/G table?", __func__)); + KASSERT(sgt->vaddr != NULL, ("%s: no S/G vaddr?", __func__)); + + memset(fd, 0, sizeof(*fd)); + + /* Populate and map S/G table */ + if (__predict_true(nsegs <= DPAA2_TX_SEGLIMIT)) { + sge = (struct dpaa2_sg_entry *)sgt->vaddr + tx_data_off; + for (i = 0; i < nsegs; i++) { + sge[i].addr = (uint64_t)segs[i].ds_addr; + sge[i].len = (uint32_t)segs[i].ds_len; + sge[i].offset_fmt = 0u; + } + sge[i-1].offset_fmt |= 0x8000u; /* set final entry flag */ + + KASSERT(sgt->paddr == 0, ("%s: paddr(%#jx) != 0", __func__, + sgt->paddr)); + + error = bus_dmamap_load(sgt->dmat, sgt->dmap, sgt->vaddr, + DPAA2_TX_SGT_SZ, dpaa2_dmamap_oneseg_cb, &sgt->paddr, + BUS_DMA_NOWAIT); + if (__predict_false(error != 0)) { + device_printf(dev, "%s: bus_dmamap_load() failed: " + "error=%d\n", __func__, error); + return (error); + } + + buf->paddr = sgt->paddr; + buf->vaddr = sgt->vaddr; + } else { + return (EINVAL); + } + + swa = (struct dpaa2_swa *)sgt->vaddr; + swa->magic = DPAA2_MAGIC; + swa->buf = buf; + + fd->addr = buf->paddr; + fd->data_length = (uint32_t)buf->m->m_pkthdr.len; + fd->bpid_ivp_bmt = 0; + fd->offset_fmt_sl = 0x2000u | tx_data_off; + fd->ctrl = (0x4u & DPAA2_FD_PTAC_MASK) << DPAA2_FD_PTAC_SHIFT; + + return (0); +} + +int +dpaa2_fd_err(struct dpaa2_fd *fd) +{ + return ((fd->ctrl >> DPAA2_FD_ERR_SHIFT) & DPAA2_FD_ERR_MASK); +} + +uint32_t +dpaa2_fd_data_len(struct dpaa2_fd *fd) +{ + if (dpaa2_fd_short_len(fd)) { + return (fd->data_length & DPAA2_FD_LEN_MASK); + } + return (fd->data_length); +} + +int +dpaa2_fd_format(struct dpaa2_fd *fd) +{ + return ((enum dpaa2_fd_format)((fd->offset_fmt_sl >> + DPAA2_FD_FMT_SHIFT) & DPAA2_FD_FMT_MASK)); +} + +bool +dpaa2_fd_short_len(struct dpaa2_fd *fd) +{ + return (((fd->offset_fmt_sl >> DPAA2_FD_SL_SHIFT) + & DPAA2_FD_SL_MASK) == 1); +} + +int +dpaa2_fd_offset(struct dpaa2_fd *fd) +{ + return (fd->offset_fmt_sl & DPAA2_FD_OFFSET_MASK); +} + +int +dpaa2_fa_get_swa(struct dpaa2_fd *fd, struct dpaa2_swa **swa) +{ + int rc; + + if (fd == NULL || swa == NULL) + return (EINVAL); + + if (((fd->ctrl >> DPAA2_FD_PTAC_SHIFT) & DPAA2_FD_PTAC_MASK) >= 0x4u) { + *swa = (struct dpaa2_swa *)PHYS_TO_DMAP((bus_addr_t)fd->addr); + rc = 0; + } else { + *swa = NULL; + rc = ENOENT; + } + + return (rc); +} + +int +dpaa2_fa_get_hwa(struct dpaa2_fd *fd, struct dpaa2_hwa **hwa) +{ + /* TODO: To be implemented next. */ + return (ENOENT); +} diff --git a/sys/dev/dpaa2/dpaa2_frame.h b/sys/dev/dpaa2/dpaa2_frame.h new file mode 100644 index 000000000000..0b2a5a7d8e74 --- /dev/null +++ b/sys/dev/dpaa2/dpaa2_frame.h @@ -0,0 +1,174 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright © 2026 Dmitry Salychev + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#ifndef _DPAA2_FRAME_H +#define _DPAA2_FRAME_H + +#include +#include +#include + +#include "dpaa2_types.h" +#include "dpaa2_buf.h" + +/* + * Helper routines for the DPAA2 frames (e.g. descriptors, software/hardware + * annotations, etc.). + */ + +/* + * DPAA2 frame descriptor size, field offsets and masks. + * + * See 3.1.1 Frame descriptor format, + * 4.2.1.2.2 Structure of Frame Descriptors (FDs), + * LX2160A DPAA2 Low-Level Hardware Reference Manual, Rev. 0, 06/2020 + */ +#define DPAA2_FD_SIZE 32u +#define DPAA2_FD_FMT_MASK (0x3u) +#define DPAA2_FD_FMT_SHIFT (12) +#define DPAA2_FD_ERR_MASK (0xFFu) +#define DPAA2_FD_ERR_SHIFT (0) +#define DPAA2_FD_SL_MASK (0x1u) +#define DPAA2_FD_SL_SHIFT (14) +#define DPAA2_FD_LEN_MASK (0x3FFFFu) +#define DPAA2_FD_OFFSET_MASK (0x0FFFu) +#define DPAA2_FD_PTAC_MASK (0x7u) +#define DPAA2_FD_PTAC_SHIFT (21) + +/* + * DPAA2 frame annotation sizes + * + * NOTE: Accelerator-specific (HWA) annotation length is described in the 64-byte + * units by the FD[ASAL] bits and can be as big as 960 bytes. Current + * values describe what is actually supported by the DPAA2 drivers. + * + * See 3.1.1 Frame descriptor format, + * LX2160A DPAA2 Low-Level Hardware Reference Manual, Rev. 0 + */ +#define DPAA2_FA_SIZE 192u /* DPAA2 frame annotation */ +#define DPAA2_FA_SWA_SIZE 64u /* SW frame annotation */ +#define DPAA2_FA_HWA_SIZE 128u /* HW frame annotation */ +#define DPAA2_FA_WRIOP_SIZE 128u /* WRIOP HW annotation */ + +/** + * @brief DPAA2 frame descriptor. + * + * addr: Memory address of the start of the buffer holding the + * frame data or the buffer containing the scatter/gather + * list. + * data_length: Length of the frame data (in bytes). + * bpid_ivp_bmt: Buffer pool ID (14 bit + BMT bit + IVP bit) + * offset_fmt_sl: Frame data offset, frame format and short-length fields. + * frame_ctx: Frame context. This field allows the sender of a frame + * to communicate some out-of-band information to the + * receiver of the frame. + * ctrl: Control bits (ERR, CBMT, ASAL, PTAC, DROPP, SC, DD). + * flow_ctx: Frame flow context. Associates the frame with a flow + * structure. QMan may use the FLC field for 3 purposes: + * stashing control, order definition point identification, + * and enqueue replication control. + * + * See 3.1.1 Frame descriptor format, + * 4.2.1.2.2 Structure of Frame Descriptors (FDs), + * LX2160A DPAA2 Low-Level Hardware Reference Manual, Rev. 0, 06/2020 + */ +struct dpaa2_fd { + uint64_t addr; + uint32_t data_length; + uint16_t bpid_ivp_bmt; + uint16_t offset_fmt_sl; + uint32_t frame_ctx; + uint32_t ctrl; + uint64_t flow_ctx; +} __packed; +CTASSERT(sizeof(struct dpaa2_fd) == DPAA2_FD_SIZE); + +/** + * @brief WRIOP hardware frame annotation. + * + * See 7.34.2 WRIOP hardware frame annotation (FA), + * LX2160A DPAA2 Low-Level Hardware Reference Manual, Rev. 0, 06/2020 + */ +struct dpaa2_hwa_wriop { + union { + struct { + uint64_t fas; + uint64_t timestamp; + /* XXX-DSL: more to add here... */ + } __packed; + uint8_t raw[128]; + }; +} __packed; +CTASSERT(sizeof(struct dpaa2_hwa_wriop) == DPAA2_FA_WRIOP_SIZE); + +/** + * @brief DPAA2 hardware frame annotation (accelerator-specific annotation). + * + * See 3.4.1.2 Accelerator-specific annotation, + * LX2160A DPAA2 Low-Level Hardware Reference Manual, Rev. 0, 06/2020 + */ +struct dpaa2_hwa { + union { + struct dpaa2_hwa_wriop wriop; + }; +} __packed; +CTASSERT(sizeof(struct dpaa2_hwa) == DPAA2_FA_HWA_SIZE); + +/** + * @brief DPAA2 software frame annotation (pass-through annotation). + * + * See 3.4.1.1 Pass-through annotation, + * LX2160A DPAA2 Low-Level Hardware Reference Manual, Rev. 0, 06/2020 + */ +struct dpaa2_swa { + union { + struct { + uint32_t magic; + struct dpaa2_buf *buf; + }; + struct { + uint8_t pta1[32]; + uint8_t pta2[32]; + }; + uint8_t raw[64]; + }; +} __packed; +CTASSERT(sizeof(struct dpaa2_swa) == DPAA2_FA_SWA_SIZE); + +int dpaa2_fd_build(device_t, const uint16_t, struct dpaa2_buf *, + bus_dma_segment_t *, const int, struct dpaa2_fd *); + +int dpaa2_fd_err(struct dpaa2_fd *); +uint32_t dpaa2_fd_data_len(struct dpaa2_fd *); +int dpaa2_fd_format(struct dpaa2_fd *); +bool dpaa2_fd_short_len(struct dpaa2_fd *); +int dpaa2_fd_offset(struct dpaa2_fd *); + +int dpaa2_fa_get_swa(struct dpaa2_fd *, struct dpaa2_swa **); +int dpaa2_fa_get_hwa(struct dpaa2_fd *, struct dpaa2_hwa **); + +#endif /* _DPAA2_FRAME_H */ diff --git a/sys/dev/dpaa2/dpaa2_ni.c b/sys/dev/dpaa2/dpaa2_ni.c index 49e72c8ee14f..5017b5113109 100644 --- a/sys/dev/dpaa2/dpaa2_ni.c +++ b/sys/dev/dpaa2/dpaa2_ni.c @@ -96,6 +96,7 @@ #include "dpaa2_ni.h" #include "dpaa2_channel.h" #include "dpaa2_buf.h" +#include "dpaa2_frame.h" #define BIT(x) (1ul << (x)) #define WRIOP_VERSION(x, y, z) ((x) << 10 | (y) << 5 | (z) << 0) @@ -156,10 +157,6 @@ MALLOC_DEFINE(M_DPAA2_TXB, "dpaa2_txb", "DPAA2 DMA-mapped buffer (Tx)"); #define DPAA2_RX_BUFRING_SZ (4096u) #define DPAA2_RXE_BUFRING_SZ (1024u) #define DPAA2_TXC_BUFRING_SZ (4096u) -#define DPAA2_TX_SEGLIMIT (16u) /* arbitrary number */ -#define DPAA2_TX_SEG_SZ (PAGE_SIZE) -#define DPAA2_TX_SEGS_MAXSZ (DPAA2_TX_SEGLIMIT * DPAA2_TX_SEG_SZ) -#define DPAA2_TX_SGT_SZ (PAGE_SIZE) /* bytes */ /* Size of a buffer to keep a QoS table key configuration. */ #define ETH_QOS_KCFG_BUF_SIZE (PAGE_SIZE) @@ -186,15 +183,6 @@ MALLOC_DEFINE(M_DPAA2_TXB, "dpaa2_txb", "DPAA2 DMA-mapped buffer (Tx)"); #define DPAA2_NI_TXBUF_IDX_MASK (0xFFu) #define DPAA2_NI_TXBUF_IDX_SHIFT (49) -#define DPAA2_NI_FD_FMT_MASK (0x3u) -#define DPAA2_NI_FD_FMT_SHIFT (12) -#define DPAA2_NI_FD_ERR_MASK (0xFFu) -#define DPAA2_NI_FD_ERR_SHIFT (0) -#define DPAA2_NI_FD_SL_MASK (0x1u) -#define DPAA2_NI_FD_SL_SHIFT (14) -#define DPAA2_NI_FD_LEN_MASK (0x3FFFFu) -#define DPAA2_NI_FD_OFFSET_MASK (0x0FFFu) - /* Enables TCAM for Flow Steering and QoS look-ups. */ #define DPNI_OPT_HAS_KEY_MASKING 0x10 @@ -424,15 +412,6 @@ static int dpaa2_ni_set_mac_addr(device_t); static int dpaa2_ni_set_hash(device_t, uint64_t); static int dpaa2_ni_set_dist_key(device_t, enum dpaa2_ni_dist_mode, uint64_t); -/* Frame descriptor routines */ -static int dpaa2_ni_build_fd(struct dpaa2_ni_softc *, struct dpaa2_ni_tx_ring *, - struct dpaa2_buf *, bus_dma_segment_t *, int, struct dpaa2_fd *); -static int dpaa2_ni_fd_err(struct dpaa2_fd *); -static uint32_t dpaa2_ni_fd_data_len(struct dpaa2_fd *); -static int dpaa2_ni_fd_format(struct dpaa2_fd *); -static bool dpaa2_ni_fd_short_len(struct dpaa2_fd *); -static int dpaa2_ni_fd_offset(struct dpaa2_fd *); - /* Various subroutines */ static int dpaa2_ni_cmp_api_version(struct dpaa2_ni_softc *, uint16_t, uint16_t); static int dpaa2_ni_prepare_key_cfg(struct dpkg_profile_cfg *, uint8_t *); @@ -2995,14 +2974,15 @@ dpaa2_ni_tx(struct dpaa2_ni_softc *sc, struct dpaa2_channel *ch, } } - error = dpaa2_ni_build_fd(sc, tx, buf, segs, nsegs, &fd); + error = dpaa2_fd_build(dev, sc->tx_data_off, buf, segs, nsegs, &fd); if (__predict_false(error != 0)) { device_printf(dev, "%s: failed to build frame descriptor: " "error=%d\n", __func__, error); fq->chan->tx_dropped++; if_inc_counter(sc->ifp, IFCOUNTER_OERRORS, 1); goto err_unload; - } + } else + sc->tx_sg_frames++; /* for sysctl(9) */ bus_dmamap_sync(buf->dmat, buf->dmap, BUS_DMASYNC_PREWRITE); bus_dmamap_sync(sgt->dmat, sgt->dmap, BUS_DMASYNC_PREWRITE); @@ -3130,14 +3110,14 @@ dpaa2_ni_consume_frames(struct dpaa2_channel *chan, struct dpaa2_ni_fq **src, * @brief Receive frames. */ static int -dpaa2_ni_rx(struct dpaa2_channel *ch, struct dpaa2_ni_fq *fq, struct dpaa2_fd *fd, - struct dpaa2_ni_rx_ctx *ctx) +dpaa2_ni_rx(struct dpaa2_channel *ch, struct dpaa2_ni_fq *fq, + struct dpaa2_fd *fd, struct dpaa2_ni_rx_ctx *ctx) { - bus_addr_t paddr = (bus_addr_t)fd->addr; - struct dpaa2_fa *fa = (struct dpaa2_fa *)PHYS_TO_DMAP(paddr); - struct dpaa2_buf *buf = fa->buf; - struct dpaa2_channel *bch = (struct dpaa2_channel *)buf->opt; - struct dpaa2_ni_softc *sc = device_get_softc(bch->ni_dev); + bus_addr_t paddr; + struct dpaa2_swa *swa; + struct dpaa2_buf *buf; + struct dpaa2_channel *bch; + struct dpaa2_ni_softc *sc; struct dpaa2_bp_softc *bpsc; struct mbuf *m; device_t bpdev; @@ -3145,7 +3125,17 @@ dpaa2_ni_rx(struct dpaa2_channel *ch, struct dpaa2_ni_fq *fq, struct dpaa2_fd *f void *buf_data; int buf_len, error, released_n = 0; - KASSERT(fa->magic == DPAA2_MAGIC, ("%s: wrong magic", __func__)); + error = dpaa2_fa_get_swa(fd, &swa); + if (__predict_false(error != 0)) + panic("%s: frame has no software annotation: error=%d", + __func__, error); + + paddr = (bus_addr_t)fd->addr; + buf = swa->buf; + bch = (struct dpaa2_channel *)buf->opt; + sc = device_get_softc(bch->ni_dev); + + KASSERT(swa->magic == DPAA2_MAGIC, ("%s: wrong magic", __func__)); /* * NOTE: Current channel might not be the same as the "buffer" channel * and it's fine. It must not be NULL though. @@ -3157,7 +3147,7 @@ dpaa2_ni_rx(struct dpaa2_channel *ch, struct dpaa2_ni_fq *fq, struct dpaa2_fd *f __func__, paddr, buf->paddr); } - switch (dpaa2_ni_fd_err(fd)) { + switch (dpaa2_fd_err(fd)) { case 1: /* Enqueue rejected by QMan */ sc->rx_enq_rej_frames++; break; @@ -3167,7 +3157,7 @@ dpaa2_ni_rx(struct dpaa2_channel *ch, struct dpaa2_ni_fq *fq, struct dpaa2_fd *f default: break; } - switch (dpaa2_ni_fd_format(fd)) { + switch (dpaa2_fd_format(fd)) { case DPAA2_FD_SINGLE: sc->rx_single_buf_frames++; break; @@ -3183,9 +3173,11 @@ dpaa2_ni_rx(struct dpaa2_channel *ch, struct dpaa2_ni_fq *fq, struct dpaa2_fd *f bus_dmamap_sync(buf->dmat, buf->dmap, BUS_DMASYNC_POSTREAD); bus_dmamap_unload(buf->dmat, buf->dmap); + m = buf->m; - buf_len = dpaa2_ni_fd_data_len(fd); - buf_data = (uint8_t *)buf->vaddr + dpaa2_ni_fd_offset(fd); + buf_len = dpaa2_fd_data_len(fd); + buf_data = (uint8_t *)buf->vaddr + dpaa2_fd_offset(fd); + /* Prepare buffer to be re-cycled */ buf->m = NULL; buf->paddr = 0; @@ -3273,16 +3265,26 @@ static int dpaa2_ni_rx_err(struct dpaa2_channel *ch, struct dpaa2_ni_fq *fq, struct dpaa2_fd *fd) { - bus_addr_t paddr = (bus_addr_t)fd->addr; - struct dpaa2_fa *fa = (struct dpaa2_fa *)PHYS_TO_DMAP(paddr); - struct dpaa2_buf *buf = fa->buf; - struct dpaa2_channel *bch = (struct dpaa2_channel *)buf->opt; - struct dpaa2_ni_softc *sc = device_get_softc(bch->ni_dev); + bus_addr_t paddr; + struct dpaa2_swa *swa; + struct dpaa2_buf *buf; + struct dpaa2_channel *bch; + struct dpaa2_ni_softc *sc; device_t bpdev; struct dpaa2_bp_softc *bpsc; int error; - KASSERT(fa->magic == DPAA2_MAGIC, ("%s: wrong magic", __func__)); + error = dpaa2_fa_get_swa(fd, &swa); + if (__predict_false(error != 0)) + panic("%s: frame has no software annotation: error=%d", + __func__, error); + + paddr = (bus_addr_t)fd->addr; + buf = swa->buf; + bch = (struct dpaa2_channel *)buf->opt; + sc = device_get_softc(bch->ni_dev); + + KASSERT(swa->magic == DPAA2_MAGIC, ("%s: wrong magic", __func__)); /* * NOTE: Current channel might not be the same as the "buffer" channel * and it's fine. It must not be NULL though. @@ -3316,14 +3318,26 @@ static int dpaa2_ni_tx_conf(struct dpaa2_channel *ch, struct dpaa2_ni_fq *fq, struct dpaa2_fd *fd) { - bus_addr_t paddr = (bus_addr_t)fd->addr; - struct dpaa2_fa *fa = (struct dpaa2_fa *)PHYS_TO_DMAP(paddr); - struct dpaa2_buf *buf = fa->buf; - struct dpaa2_buf *sgt = buf->sgt; - struct dpaa2_ni_tx_ring *tx = (struct dpaa2_ni_tx_ring *)buf->opt; - struct dpaa2_channel *bch = tx->fq->chan; - - KASSERT(fa->magic == DPAA2_MAGIC, ("%s: wrong magic", __func__)); + bus_addr_t paddr; + struct dpaa2_swa *swa; + struct dpaa2_buf *buf; + struct dpaa2_buf *sgt; + struct dpaa2_ni_tx_ring *tx; + struct dpaa2_channel *bch; + int error; + + error = dpaa2_fa_get_swa(fd, &swa); + if (__predict_false(error != 0)) + panic("%s: frame has no software annotation: error=%d", + __func__, error); + + paddr = (bus_addr_t)fd->addr; + buf = swa->buf; + sgt = buf->sgt; + tx = (struct dpaa2_ni_tx_ring *)buf->opt; + bch = tx->fq->chan; + + KASSERT(swa->magic == DPAA2_MAGIC, ("%s: wrong magic", __func__)); KASSERT(tx != NULL, ("%s: Tx ring is NULL", __func__)); KASSERT(sgt != NULL, ("%s: S/G table is NULL", __func__)); /* @@ -3371,102 +3385,6 @@ dpaa2_ni_cmp_api_version(struct dpaa2_ni_softc *sc, uint16_t major, return sc->api_major - major; } -/** - * @brief Build a DPAA2 frame descriptor. - */ -static int -dpaa2_ni_build_fd(struct dpaa2_ni_softc *sc, struct dpaa2_ni_tx_ring *tx, - struct dpaa2_buf *buf, bus_dma_segment_t *segs, int nsegs, struct dpaa2_fd *fd) -{ - struct dpaa2_buf *sgt = buf->sgt; - struct dpaa2_sg_entry *sge; - struct dpaa2_fa *fa; - int i, error; - - KASSERT(nsegs <= DPAA2_TX_SEGLIMIT, ("%s: too many segments", __func__)); - KASSERT(buf->opt != NULL, ("%s: no Tx ring?", __func__)); - KASSERT(sgt != NULL, ("%s: no S/G table?", __func__)); - KASSERT(sgt->vaddr != NULL, ("%s: no S/G vaddr?", __func__)); - - memset(fd, 0, sizeof(*fd)); - - /* Populate and map S/G table */ - if (__predict_true(nsegs <= DPAA2_TX_SEGLIMIT)) { - sge = (struct dpaa2_sg_entry *)sgt->vaddr + sc->tx_data_off; - for (i = 0; i < nsegs; i++) { - sge[i].addr = (uint64_t)segs[i].ds_addr; - sge[i].len = (uint32_t)segs[i].ds_len; - sge[i].offset_fmt = 0u; - } - sge[i-1].offset_fmt |= 0x8000u; /* set final entry flag */ - - KASSERT(sgt->paddr == 0, ("%s: paddr(%#jx) != 0", __func__, - sgt->paddr)); - - error = bus_dmamap_load(sgt->dmat, sgt->dmap, sgt->vaddr, - DPAA2_TX_SGT_SZ, dpaa2_dmamap_oneseg_cb, &sgt->paddr, - BUS_DMA_NOWAIT); - if (__predict_false(error != 0)) { - device_printf(sc->dev, "%s: bus_dmamap_load() failed: " - "error=%d\n", __func__, error); - return (error); - } - - buf->paddr = sgt->paddr; - buf->vaddr = sgt->vaddr; - sc->tx_sg_frames++; /* for sysctl(9) */ - } else { - return (EINVAL); - } - - fa = (struct dpaa2_fa *)sgt->vaddr; - fa->magic = DPAA2_MAGIC; - fa->buf = buf; - - fd->addr = buf->paddr; - fd->data_length = (uint32_t)buf->m->m_pkthdr.len; - fd->bpid_ivp_bmt = 0; - fd->offset_fmt_sl = 0x2000u | sc->tx_data_off; - fd->ctrl = 0x00800000u; - - return (0); -} - -static int -dpaa2_ni_fd_err(struct dpaa2_fd *fd) -{ - return ((fd->ctrl >> DPAA2_NI_FD_ERR_SHIFT) & DPAA2_NI_FD_ERR_MASK); -} - -static uint32_t -dpaa2_ni_fd_data_len(struct dpaa2_fd *fd) -{ - if (dpaa2_ni_fd_short_len(fd)) { - return (fd->data_length & DPAA2_NI_FD_LEN_MASK); - } - return (fd->data_length); -} - -static int -dpaa2_ni_fd_format(struct dpaa2_fd *fd) -{ - return ((enum dpaa2_fd_format)((fd->offset_fmt_sl >> - DPAA2_NI_FD_FMT_SHIFT) & DPAA2_NI_FD_FMT_MASK)); -} - -static bool -dpaa2_ni_fd_short_len(struct dpaa2_fd *fd) -{ - return (((fd->offset_fmt_sl >> DPAA2_NI_FD_SL_SHIFT) - & DPAA2_NI_FD_SL_MASK) == 1); -} - -static int -dpaa2_ni_fd_offset(struct dpaa2_fd *fd) -{ - return (fd->offset_fmt_sl & DPAA2_NI_FD_OFFSET_MASK); -} - /** * @brief Collect statistics of the network interface. */ diff --git a/sys/dev/dpaa2/dpaa2_ni.h b/sys/dev/dpaa2/dpaa2_ni.h index 6fb0673fac09..fcd37501ebd0 100644 --- a/sys/dev/dpaa2/dpaa2_ni.h +++ b/sys/dev/dpaa2/dpaa2_ni.h @@ -490,8 +490,9 @@ struct dpaa2_ni_softc { struct dpaa2_channel *channels[DPAA2_MAX_CHANNELS]; struct dpaa2_ni_fq rxe_queue; /* one per DPNI */ + /* sysctl(9) */ struct dpaa2_atomic buf_num; - struct dpaa2_atomic buf_free; /* for sysctl(9) only */ + struct dpaa2_atomic buf_free; int irq_rid[DPAA2_NI_MSI_COUNT]; struct resource *irq_res; diff --git a/sys/dev/dpaa2/dpaa2_swp.h b/sys/dev/dpaa2/dpaa2_swp.h index 1b1383b4241f..20980c6b71b7 100644 --- a/sys/dev/dpaa2/dpaa2_swp.h +++ b/sys/dev/dpaa2/dpaa2_swp.h @@ -35,6 +35,7 @@ #include "dpaa2_types.h" #include "dpaa2_buf.h" #include "dpaa2_bp.h" +#include "dpaa2_frame.h" /* * DPAA2 QBMan software portal. @@ -200,10 +201,8 @@ #define DPAA2_EQ_DESC_SIZE 32u /* Enqueue Command Descriptor */ #define DPAA2_FDR_DESC_SIZE 32u /* Descriptor of the FDR */ -#define DPAA2_FD_SIZE 32u /* Frame Descriptor */ #define DPAA2_FDR_SIZE 64u /* Frame Dequeue Response */ #define DPAA2_SCN_SIZE 16u /* State Change Notification */ -#define DPAA2_FA_SIZE 64u /* SW Frame Annotation */ #define DPAA2_SGE_SIZE 16u /* S/G table entry */ #define DPAA2_DQ_SIZE 64u /* Dequeue Response */ #define DPAA2_SWP_CMD_SIZE 64u /* SWP Command */ @@ -284,54 +283,6 @@ struct dpaa2_scn { } __packed; CTASSERT(sizeof(struct dpaa2_scn) == DPAA2_SCN_SIZE); -/** - * @brief DPAA2 frame descriptor. - * - * addr: Memory address of the start of the buffer holding the - * frame data or the buffer containing the scatter/gather - * list. - * data_length: Length of the frame data (in bytes). - * bpid_ivp_bmt: Buffer pool ID (14 bit + BMT bit + IVP bit) - * offset_fmt_sl: Frame data offset, frame format and short-length fields. - * frame_ctx: Frame context. This field allows the sender of a frame - * to communicate some out-of-band information to the - * receiver of the frame. - * ctrl: Control bits (ERR, CBMT, ASAL, PTAC, DROPP, SC, DD). - * flow_ctx: Frame flow context. Associates the frame with a flow - * structure. QMan may use the FLC field for 3 purposes: - * stashing control, order definition point identification, - * and enqueue replication control. - */ -struct dpaa2_fd { - uint64_t addr; - uint32_t data_length; - uint16_t bpid_ivp_bmt; - uint16_t offset_fmt_sl; - uint32_t frame_ctx; - uint32_t ctrl; - uint64_t flow_ctx; -} __packed; -CTASSERT(sizeof(struct dpaa2_fd) == DPAA2_FD_SIZE); - -/** - * @brief DPAA2 frame annotation. - */ -struct dpaa2_fa { - uint32_t magic; - struct dpaa2_buf *buf; -#ifdef __notyet__ - union { - struct { /* Tx frame annotation */ - struct dpaa2_ni_tx_ring *tx; - }; - struct { /* Rx frame annotation */ - uint64_t _notused; - }; - }; -#endif -} __packed; -CTASSERT(sizeof(struct dpaa2_fa) <= DPAA2_FA_SIZE); - /** * @brief DPAA2 scatter/gather entry. */ diff --git a/sys/dev/dpaa2/dpaa2_types.h b/sys/dev/dpaa2/dpaa2_types.h index dbfac9ce0a40..dc1c232c09c2 100644 --- a/sys/dev/dpaa2/dpaa2_types.h +++ b/sys/dev/dpaa2/dpaa2_types.h @@ -40,6 +40,11 @@ #define DPAA2_MAX_CHANNELS 16 /* CPU cores */ #define DPAA2_MAX_TCS 8 /* Traffic classes */ +#define DPAA2_TX_SEGLIMIT (16u) /* for 64 KiB frames */ +#define DPAA2_TX_SEG_SZ (PAGE_SIZE) +#define DPAA2_TX_SEGS_MAXSZ (DPAA2_TX_SEGLIMIT * DPAA2_TX_SEG_SZ) +#define DPAA2_TX_SGT_SZ (PAGE_SIZE) /* in bytes */ + /** * @brief Types of the DPAA2 devices. */ diff --git a/sys/modules/dpaa2/Makefile b/sys/modules/dpaa2/Makefile index 816d6fa5cf4a..388303eed0c7 100644 --- a/sys/modules/dpaa2/Makefile +++ b/sys/modules/dpaa2/Makefile @@ -14,6 +14,7 @@ SRCS+= dpaa2_con.c SRCS+= dpaa2_buf.c SRCS+= dpaa2_channel.c SRCS+= dpaa2_types.c +SRCS+= dpaa2_frame.c SRCS+= dpaa2_cmd_if.c dpaa2_cmd_if.h SRCS+= dpaa2_swp_if.c dpaa2_swp_if.h From nobody Wed Apr 8 20:11:18 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4frZ2Z303fz6YhBD for ; Wed, 08 Apr 2026 20:11: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4frZ2Z2Sshz3Qn0 for ; Wed, 08 Apr 2026 20:11:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775679078; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=K/wcngvWrhBk/wVctE6osPmFH0LHjosZULIyNmeGqQo=; b=J9+6U+GB606MMtozY2DVHUrCctJ24PA4XDG+XqKRbv8aD9+NY7yVQ7m8ytbDxI6dlh3mFW ICXBjFIL2OhKQo7QlOREJDi7wtDVwBvlIrp7G9wCLdop3DH8p3XeJGnt21XnI6CC3ToG/i XxeaEy21oF10LqYwAN/lEqPAkIRacNwcs3qb616iSGev1MgpvdBW33n7l0IUSQc+PU61Nx cf7jMV5CwyoxhQNQ4C1PrXpCNOKozgJ2oWUqCjhqW3ujWon+HTRxkF8XK8myNN4A4GwkZI krEdXylz7Q7NCYxQteD+e0ttHBuH3urUKcjtSvt4+1kBOaFGuWx4OoJpI3vDKg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775679078; a=rsa-sha256; cv=none; b=lzy6b0ogVN9fPaGgJ66gtTx8r3p12IWAPUrTatR5zHAzJStWHe41K2Ga4Q9a6RJ+xE35bz oEWpk5f5ww+io0PlKh9UJJe7GPFYdOjLzuBQkIx7HfOruR+i0labcc1F8RctLHo81/GtPg k+/ynWoxswuhlNFz+3UOPwOkpFPa8+ZdepTgbm+glIROshVcWpfLiHrwZqTNGOwOvupYbT ITtv0kvE0vjg3655xPTHl47saKP/kaks1vTIQ8hgc0bXfKgGMYv/r2yW5ljLU3RNeyGNmb hPBKusJQATJ/R1/FGOTOTZxJB7BzFG5hn/mlG7TXc9HbPk6evL8P3JHj1p78hQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775679078; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=K/wcngvWrhBk/wVctE6osPmFH0LHjosZULIyNmeGqQo=; b=YGQzqCNmQ+DDNGglXXj8ZRPO3fJftgCh40FQlbMlqStUdM3d7WCGUT6WyEfnI4b9aB2ZK8 QZur82laSqwlO5ijAYp28ncq7S/7lfiN6zTXt9Njo5wFUza2lzCL3ejEceKDrAecOXgt2r NtGwfewPxASf1xztQE6n2XGvOMrPl+B1UHwhd2rfJliaXsBvWK214vu15/2j8HMTdxM2Lz 2bIDrbh2vq9dtWRK+OlRAYTg0KNjrynVQCRQK7LZIdWTsSCz1y2LKk9tnxsk7dfasE8HKG zE08F8dBjqZjdop2X2DPFEw6vR9BRxqMdXf+BUQnQhDdFxGpUKldLCahkiE7ZQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4frZ2Z1zj4zhjQ for ; Wed, 08 Apr 2026 20:11:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 37aec by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 08 Apr 2026 20:11:18 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Ziaee Subject: git: dd201e407e48 - main - lockf.1: Organize and provide error numbers List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: dd201e407e48ba59bdfa1f71d41acfdac1a9c562 Auto-Submitted: auto-generated Date: Wed, 08 Apr 2026 20:11:18 +0000 Message-Id: <69d6b666.37aec.2a86a27c@gitrepo.freebsd.org> The branch main has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=dd201e407e48ba59bdfa1f71d41acfdac1a9c562 commit dd201e407e48ba59bdfa1f71d41acfdac1a9c562 Author: Alexander Ziaee AuthorDate: 2026-04-08 20:08:43 +0000 Commit: Alexander Ziaee CommitDate: 2026-04-08 20:09:15 +0000 lockf.1: Organize and provide error numbers Add error numbers to the exit codes so that readers can decode them without having to use a separate utility. Organize exits by error code. Mark up the error constants with the error constant macro, even though this is really not very helpful because people will search for the error code, the macro is explicitly for the constants and not the codes. While where, align and alphabetize the options list as well, fix misaligned padding in an example, and a one-sentance-per-line error. MFC after: 3 days Reported by: Antranig Vartanian Differential Revision: https://reviews.freebsd.org/D48470 --- usr.bin/lockf/lockf.1 | 57 +++++++++++++++++++++++++++------------------------ 1 file changed, 30 insertions(+), 27 deletions(-) diff --git a/usr.bin/lockf/lockf.1 b/usr.bin/lockf/lockf.1 index 40b4497bc80c..406ccd4caa39 100644 --- a/usr.bin/lockf/lockf.1 +++ b/usr.bin/lockf/lockf.1 @@ -1,4 +1,6 @@ .\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (C) 1998 John D. Polstra. All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -22,7 +24,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd June 24, 2025 +.Dd February 26, 2026 .Dt LOCKF 1 .Os .Sh NAME @@ -104,15 +106,10 @@ that if the option is not used, then no guarantees around lock ordering can be made. .Pp The following options are supported: -.Bl -tag -width ".Fl t Ar seconds" +.Bl -tag -width "-t seconds" .It Fl k Causes the lock file to be kept (not removed) after the command completes. -.It Fl s -Causes -.Nm -to operate silently. -Failure to acquire the lock is indicated only in the exit status. .It Fl n Causes .Nm @@ -136,6 +133,11 @@ This option will cause to open .Ar file for writing rather than reading. +.It Fl s +Causes +.Nm +to operate silently. +Failure to acquire the lock is indicated only in the exit status. .It Fl T Upon receipt of a .Dv SIGTERM , @@ -191,32 +193,32 @@ successfully acquires the lock, it returns the exit status produced by Otherwise, it returns one of the exit codes defined in .Xr sysexits 3 , as follows: -.Bl -tag -width ".Dv EX_CANTCREAT" -.It Dv EX_TEMPFAIL -The specified lock file was already locked by another process. -.It Dv EX_CANTCREAT -The +.Bl -tag -width "EX_UNAVAILABLE (69)" +.It Er EX_OSERR Pq 61 +A system call, e.g., +.Xr fork 2 , +failed unexpectedly. +.It Er EX_USAGE Pq 64 +There was an error on the .Nm -utility -was unable to create the lock file, e.g., because of insufficient access -privileges. -.It Dv EX_UNAVAILABLE +command line. +.It Er EX_UNAVAILABLE Pq 69 The .Fl n option is specified and the specified lock file does not exist. -.It Dv EX_USAGE -There was an error on the -.Nm -command line. -.It Dv EX_OSERR -A system call (e.g., -.Xr fork 2 ) -failed unexpectedly. -.It Dv EX_SOFTWARE +.It Er EX_SOFTWARE Pq 70 The .Ar command did not exit normally, but may have been signaled or stopped. +.It Er EX_CANTCREAT Pq 73 +The +.Nm +utility +was unable to create the lock file, e.g., because of insufficient access +privileges. +.It Er EX_TEMPFAIL Pq 75 +The specified lock file was already locked by another process. .El .Sh EXAMPLES The first job takes a lock and sleeps for 5 seconds in the background. @@ -237,9 +239,10 @@ $ lockf mylock sleep 1 & lockf -t 5 mylock echo "Success" Success [1]+ Done lockf mylock sleep 1 .Ed +.Pp Lock a file and run a script, return immediately if the lock is not -available. Do not delete the file afterward so lock order is -guaranteed. +available. +Do not delete the file afterward so lock order is guaranteed. .Pp .Dl $ lockf -t 0 -k /tmp/my.lock myscript .Pp From nobody Wed Apr 8 21:24:37 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4frbgB0cNDz6YmbK for ; Wed, 08 Apr 2026 21:24: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4frbg95X0Gz3YKh for ; Wed, 08 Apr 2026 21:24:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775683477; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=veAg4KwZhA6uZ0t//vz0hgZqRBdQ8ZZjamtQh2rKrck=; b=BfMHM6r3by3ffYX24xD7PbmLhQ1ujdP6EH8IQY2B40kFHcuenB6br4XtYGfu11Rlf+mcX7 ydqRSynXpV6cMmSzC9mL0z4OOpUe4jOYmRamEsSE1/z3lKXgod5wAr2CS8Xv9nsxlYL6Dm bcPrZ6NrpbE3UQCxU+wU6kIlvrdDeJJoEbdoQ5xRBeNHGvfjnVfHWdC9rm3TbJiaAa3lC4 pnMf82AcnC7PCE+Ih8UYvr7snM9VlzrLr79EUd/kH+JM34WnZwPwj6y0ORMU/CKBbJHt/x 9o9DJRz+D5wWT/nzmm29vz2zn69lgoRDabB3gG852bb4XYA9Cc/legpn4jtB/g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775683477; a=rsa-sha256; cv=none; b=Qqv+T6/HpiNhNECFmRfHJ2jOcmZibOYJsD23h6VhOws4ZTc7CGutwzLR5lklexPUMZdp7R T9/A6kpJwfIJR8SrmOrlyLl42v+FdaNsi/I+HOzmKmDNldGXwO4yj7vZ7XxoOLn8QJ/5Em B8tGz8V3/u8vpGEbkNaSJ5LnDP7WSSLF9qWrTt2Kw9vH8fP4D4/wlbZnasazwcFX4fnbK3 ySAd2w/3MQur0lCs1ALv6myAkVQjWLVyQ89QUCTnLgeKLWXqEF8eu/ZkxzoyWT3afPS7bO TKtAICblsS87dHQhjenH8Y/0ktzcI2AFfHks/3P5lQ8+3u6j9RsM7LjRbk7Ywg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775683477; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=veAg4KwZhA6uZ0t//vz0hgZqRBdQ8ZZjamtQh2rKrck=; b=X+m0eg+7AFpYgQtjdcKnEf7uIWb1TyIMgvo6LgS9YOveiC518FILG1Ck3r5FQjAlJqmm5K 1EW3X90xD70SadCS02enNq0MYTBTgREr1T+Yy0WTC9HC1Xe6PQodJwCBsBcgRManiian2W 2uzRLBICJfVOJ9t4lDsDFir1Y8ZCn4rS940UpQ7D0LzvQASoslioX+1L3bhvCNMvGw+K7Y rli7AcfZMM4A7UtiG94T+9RZAtUdSSqIaPdGsSCaRONRYWkJ03VL69NXvrBO7s/iPsgVWk dKjjQWG07A9ZFmyT5mpiwnDsLGMtuRkTk8+V9C3zBvcm0Ti71k/P5z5EXv10pQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4frbg954BDzkp2 for ; Wed, 08 Apr 2026 21:24:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 18adf by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 08 Apr 2026 21:24:37 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Xin LI Subject: git: c0d9a07101a1 - main - MFV: zstd 1.5.7. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: delphij X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c0d9a07101a1e72769ee0619a583f63a078fb391 Auto-Submitted: auto-generated Date: Wed, 08 Apr 2026 21:24:37 +0000 Message-Id: <69d6c795.18adf.7af84449@gitrepo.freebsd.org> The branch main has been updated by delphij: URL: https://cgit.FreeBSD.org/src/commit/?id=c0d9a07101a1e72769ee0619a583f63a078fb391 commit c0d9a07101a1e72769ee0619a583f63a078fb391 Merge: dd201e407e48 7e509d50854e Author: Xin LI AuthorDate: 2026-04-08 21:22:45 +0000 Commit: Xin LI CommitDate: 2026-04-08 21:22:45 +0000 MFV: zstd 1.5.7. MFC after: 2 weeks Relnotes: yes lib/libzstd/Makefile | 4 + sys/conf/files | 1 + sys/contrib/zstd/CHANGELOG | 148 +- sys/contrib/zstd/CONTRIBUTING.md | 28 +- sys/contrib/zstd/LICENSE | 8 +- sys/contrib/zstd/Makefile | 148 +- sys/contrib/zstd/Package.swift | 36 + sys/contrib/zstd/README.md | 96 +- sys/contrib/zstd/SECURITY.md | 15 + sys/contrib/zstd/TESTING.md | 2 +- sys/contrib/zstd/appveyor.yml | 205 -- sys/contrib/zstd/doc/README.md | 5 +- sys/contrib/zstd/doc/decompressor_errata.md | 148 + sys/contrib/zstd/doc/decompressor_permissive.md | 80 + sys/contrib/zstd/doc/educational_decoder/Makefile | 4 +- sys/contrib/zstd/doc/educational_decoder/harness.c | 2 +- .../zstd/doc/educational_decoder/zstd_decompress.c | 31 +- .../zstd/doc/educational_decoder/zstd_decompress.h | 2 +- sys/contrib/zstd/doc/images/zstd_logo86.png | Bin 5963 -> 13069 bytes sys/contrib/zstd/doc/zstd_compression_format.md | 355 +- sys/contrib/zstd/doc/zstd_manual.html | 715 ++-- sys/contrib/zstd/examples/Makefile | 2 +- sys/contrib/zstd/examples/common.h | 32 +- sys/contrib/zstd/examples/dictionary_compression.c | 16 +- .../zstd/examples/dictionary_decompression.c | 2 +- .../zstd/examples/multiple_simple_compression.c | 2 +- .../zstd/examples/multiple_streaming_compression.c | 2 +- sys/contrib/zstd/examples/simple_compression.c | 2 +- sys/contrib/zstd/examples/simple_decompression.c | 2 +- sys/contrib/zstd/examples/streaming_compression.c | 12 +- .../examples/streaming_compression_thread_pool.c | 2 +- .../zstd/examples/streaming_decompression.c | 2 +- sys/contrib/zstd/examples/streaming_memory_usage.c | 2 +- sys/contrib/zstd/lib/Makefile | 102 +- sys/contrib/zstd/lib/README.md | 35 +- sys/contrib/zstd/lib/common/allocations.h | 55 + sys/contrib/zstd/lib/common/bits.h | 205 ++ sys/contrib/zstd/lib/common/bitstream.h | 192 +- sys/contrib/zstd/lib/common/compiler.h | 211 +- sys/contrib/zstd/lib/common/cpu.h | 38 +- sys/contrib/zstd/lib/common/debug.c | 8 +- sys/contrib/zstd/lib/common/debug.h | 42 +- sys/contrib/zstd/lib/common/entropy_common.c | 52 +- sys/contrib/zstd/lib/common/error_private.c | 12 +- sys/contrib/zstd/lib/common/error_private.h | 93 +- sys/contrib/zstd/lib/common/fse.h | 108 +- sys/contrib/zstd/lib/common/fse_decompress.c | 144 +- sys/contrib/zstd/lib/common/huf.h | 245 +- sys/contrib/zstd/lib/common/mem.h | 112 +- sys/contrib/zstd/lib/common/pool.c | 38 +- sys/contrib/zstd/lib/common/pool.h | 19 +- sys/contrib/zstd/lib/common/portability_macros.h | 56 +- sys/contrib/zstd/lib/common/threading.c | 88 +- sys/contrib/zstd/lib/common/threading.h | 23 +- sys/contrib/zstd/lib/common/xxhash.c | 16 +- sys/contrib/zstd/lib/common/xxhash.h | 3417 ++++++++++++++------ sys/contrib/zstd/lib/common/zstd_common.c | 37 +- sys/contrib/zstd/lib/common/zstd_deps.h | 14 +- sys/contrib/zstd/lib/common/zstd_internal.h | 195 +- sys/contrib/zstd/lib/common/zstd_trace.h | 19 +- sys/contrib/zstd/lib/compress/clevels.h | 2 +- sys/contrib/zstd/lib/compress/fse_compress.c | 146 +- sys/contrib/zstd/lib/compress/hist.c | 12 +- sys/contrib/zstd/lib/compress/hist.h | 9 +- sys/contrib/zstd/lib/compress/huf_compress.c | 472 +-- sys/contrib/zstd/lib/compress/zstd_compress.c | 3322 +++++++++++++------ .../zstd/lib/compress/zstd_compress_internal.h | 671 ++-- .../zstd/lib/compress/zstd_compress_literals.c | 156 +- .../zstd/lib/compress/zstd_compress_literals.h | 24 +- .../zstd/lib/compress/zstd_compress_sequences.c | 20 +- .../zstd/lib/compress/zstd_compress_sequences.h | 15 +- .../zstd/lib/compress/zstd_compress_superblock.c | 393 ++- .../zstd/lib/compress/zstd_compress_superblock.h | 2 +- sys/contrib/zstd/lib/compress/zstd_cwksp.h | 279 +- sys/contrib/zstd/lib/compress/zstd_double_fast.c | 244 +- sys/contrib/zstd/lib/compress/zstd_double_fast.h | 32 +- sys/contrib/zstd/lib/compress/zstd_fast.c | 704 ++-- sys/contrib/zstd/lib/compress/zstd_fast.h | 21 +- sys/contrib/zstd/lib/compress/zstd_lazy.c | 1063 +++--- sys/contrib/zstd/lib/compress/zstd_lazy.h | 198 +- sys/contrib/zstd/lib/compress/zstd_ldm.c | 101 +- sys/contrib/zstd/lib/compress/zstd_ldm.h | 22 +- sys/contrib/zstd/lib/compress/zstd_ldm_geartab.h | 2 +- sys/contrib/zstd/lib/compress/zstd_opt.c | 570 ++-- sys/contrib/zstd/lib/compress/zstd_opt.h | 58 +- sys/contrib/zstd/lib/compress/zstd_preSplit.c | 238 ++ sys/contrib/zstd/lib/compress/zstd_preSplit.h | 33 + sys/contrib/zstd/lib/compress/zstdmt_compress.c | 414 ++- sys/contrib/zstd/lib/compress/zstdmt_compress.h | 21 +- sys/contrib/zstd/lib/decompress/huf_decompress.c | 1031 +++--- .../zstd/lib/decompress/huf_decompress_amd64.S | 139 +- sys/contrib/zstd/lib/decompress/zstd_ddict.c | 8 +- sys/contrib/zstd/lib/decompress/zstd_ddict.h | 2 +- sys/contrib/zstd/lib/decompress/zstd_decompress.c | 410 ++- .../zstd/lib/decompress/zstd_decompress_block.c | 723 +++-- .../zstd/lib/decompress/zstd_decompress_block.h | 9 +- .../zstd/lib/decompress/zstd_decompress_internal.h | 18 +- sys/contrib/zstd/lib/deprecated/zbuff.h | 2 +- sys/contrib/zstd/lib/deprecated/zbuff_common.c | 2 +- sys/contrib/zstd/lib/deprecated/zbuff_compress.c | 2 +- sys/contrib/zstd/lib/deprecated/zbuff_decompress.c | 4 +- sys/contrib/zstd/lib/dictBuilder/cover.c | 141 +- sys/contrib/zstd/lib/dictBuilder/cover.h | 12 +- sys/contrib/zstd/lib/dictBuilder/divsufsort.h | 10 - sys/contrib/zstd/lib/dictBuilder/fastcover.c | 8 +- sys/contrib/zstd/lib/dictBuilder/zdict.c | 125 +- sys/contrib/zstd/lib/freebsd/zstd_kfreebsd.h | 6 + sys/contrib/zstd/lib/legacy/zstd_legacy.h | 39 +- sys/contrib/zstd/lib/legacy/zstd_v01.c | 69 +- sys/contrib/zstd/lib/legacy/zstd_v01.h | 2 +- sys/contrib/zstd/lib/legacy/zstd_v02.c | 107 +- sys/contrib/zstd/lib/legacy/zstd_v02.h | 2 +- sys/contrib/zstd/lib/legacy/zstd_v03.c | 111 +- sys/contrib/zstd/lib/legacy/zstd_v03.h | 2 +- sys/contrib/zstd/lib/legacy/zstd_v04.c | 99 +- sys/contrib/zstd/lib/legacy/zstd_v04.h | 2 +- sys/contrib/zstd/lib/legacy/zstd_v05.c | 107 +- sys/contrib/zstd/lib/legacy/zstd_v05.h | 2 +- sys/contrib/zstd/lib/legacy/zstd_v06.c | 132 +- sys/contrib/zstd/lib/legacy/zstd_v06.h | 2 +- sys/contrib/zstd/lib/legacy/zstd_v07.c | 117 +- sys/contrib/zstd/lib/legacy/zstd_v07.h | 2 +- sys/contrib/zstd/lib/libzstd.mk | 98 +- sys/contrib/zstd/lib/libzstd.pc.in | 10 +- sys/contrib/zstd/lib/module.modulemap | 16 +- sys/contrib/zstd/lib/zdict.h | 101 +- sys/contrib/zstd/lib/zstd.h | 1157 +++++-- sys/contrib/zstd/lib/zstd_errors.h | 44 +- sys/contrib/zstd/programs/Makefile | 74 +- sys/contrib/zstd/programs/README.md | 191 +- sys/contrib/zstd/programs/benchfn.c | 12 +- sys/contrib/zstd/programs/benchfn.h | 14 +- sys/contrib/zstd/programs/benchzstd.c | 1287 +++++--- sys/contrib/zstd/programs/benchzstd.h | 80 +- sys/contrib/zstd/programs/datagen.c | 2 +- sys/contrib/zstd/programs/datagen.h | 10 +- sys/contrib/zstd/programs/dibio.c | 33 +- sys/contrib/zstd/programs/dibio.h | 2 +- sys/contrib/zstd/programs/fileio.c | 1887 ++++++----- sys/contrib/zstd/programs/fileio.h | 35 +- sys/contrib/zstd/programs/fileio_asyncio.c | 663 ++++ sys/contrib/zstd/programs/fileio_asyncio.h | 195 ++ sys/contrib/zstd/programs/fileio_common.h | 121 + sys/contrib/zstd/programs/fileio_types.h | 86 + sys/contrib/zstd/programs/lorem.c | 285 ++ sys/contrib/zstd/programs/lorem.h | 32 + sys/contrib/zstd/programs/platform.h | 46 +- sys/contrib/zstd/programs/timefn.c | 139 +- sys/contrib/zstd/programs/timefn.h | 70 +- sys/contrib/zstd/programs/util.c | 408 ++- sys/contrib/zstd/programs/util.h | 66 +- sys/contrib/zstd/programs/zstd.1 | 489 ++- sys/contrib/zstd/programs/zstd.1.md | 598 ++-- sys/contrib/zstd/programs/zstdcli.c | 648 ++-- sys/contrib/zstd/programs/zstdcli_trace.c | 2 +- sys/contrib/zstd/programs/zstdcli_trace.h | 2 +- sys/contrib/zstd/programs/zstdgrep.1 | 10 +- sys/contrib/zstd/programs/zstdgrep.1.md | 10 +- sys/contrib/zstd/programs/zstdless | 8 +- sys/contrib/zstd/programs/zstdless.1 | 6 +- sys/contrib/zstd/programs/zstdless.1.md | 6 +- sys/contrib/zstd/zlibWrapper/Makefile | 7 +- sys/contrib/zstd/zlibWrapper/README.md | 4 +- sys/contrib/zstd/zlibWrapper/examples/example.c | 95 +- .../zstd/zlibWrapper/examples/example_original.c | 75 +- sys/contrib/zstd/zlibWrapper/examples/minigzip.c | 107 +- sys/contrib/zstd/zlibWrapper/examples/zwrapbench.c | 32 +- sys/contrib/zstd/zlibWrapper/gzclose.c | 6 +- sys/contrib/zstd/zlibWrapper/gzcompatibility.h | 16 +- sys/contrib/zstd/zlibWrapper/gzguts.h | 20 +- sys/contrib/zstd/zlibWrapper/gzlib.c | 99 +- sys/contrib/zstd/zlibWrapper/gzread.c | 95 +- sys/contrib/zstd/zlibWrapper/gzwrite.c | 89 +- sys/contrib/zstd/zlibWrapper/zstd_zlibwrapper.c | 90 +- sys/contrib/zstd/zlibWrapper/zstd_zlibwrapper.h | 15 +- usr.bin/zstd/Makefile | 2 + 176 files changed, 19155 insertions(+), 10918 deletions(-) diff --cc lib/libzstd/Makefile index 4a1557a14517,000000000000..82e9d2a5b243 mode 100644,000000..100644 --- a/lib/libzstd/Makefile +++ b/lib/libzstd/Makefile @@@ -1,75 -1,0 +1,79 @@@ +PACKAGE= zstd +LIB_PACKAGE= + +LIB= zstd +SRCS= entropy_common.c \ + error_private.c \ + fse_decompress.c \ + pool.c \ + threading.c \ + xxhash.c \ + zstd_common.c \ + fse_compress.c \ + huf_compress.c \ + zstd_compress.c \ + zstd_compress_literals.c \ + zstd_compress_sequences.c \ + zstd_compress_superblock.c \ ++ zstd_preSplit.c \ + zstdmt_compress.c \ + huf_decompress.c \ + zstd_ddict.c \ + zstd_decompress.c \ + zstd_decompress_block.c \ + zbuff_common.c \ + zbuff_compress.c \ + zbuff_decompress.c \ + cover.c \ + divsufsort.c \ + zdict.c \ + zstd_fast.c \ + zstd_lazy.c \ + zstd_ldm.c \ + zstd_opt.c \ + zstd_double_fast.c \ + debug.c \ + hist.c \ + fastcover.c +WARNS?= 2 +INCS= zstd.h +CFLAGS+= -I${ZSTDDIR}/lib -I${ZSTDDIR}/lib/common -DXXH_NAMESPACE=ZSTD_ \ + -DZSTD_MULTITHREAD=1 -fvisibility=hidden +LIBADD= pthread + +# ZSTD_ASM_SUPPORTED is 0 on FreeBSD but 1 on macOS and Linux. Since we build +# this as a bootstrap library and don't include any assembly sources in SRCS, +# explicitly disable assembly. +CFLAGS+= -DZSTD_DISABLE_ASM + +PRIVATELIB= yes + +ZSTDDIR= ${SRCTOP}/sys/contrib/zstd +.PATH: ${ZSTDDIR}/lib/common ${ZSTDDIR}/lib/compress \ + ${ZSTDDIR}/lib/decompress ${ZSTDDIR}/lib/deprecated \ + ${ZSTDDIR}/lib/dictBuilder ${ZSTDDIR}/lib + +.include + ++# These symbols are needed by dll-linked CLI zstd(1). ++CFLAGS.pool.c+= -fvisibility=default ++ +CFLAGS.huf_decompress.c+= ${NO_WBITWISE_INSTEAD_OF_LOGICAL} + +# https://github.com/facebook/zstd/commit/812e8f2a [zstd 1.4.1] +# "Note that [GCC] autovectorization still does not do a good job on the +# optimized version, so it's turned off via attribute and flag. I found +# that neither attribute nor command-line flag were entirely successful in +# turning off vectorization, which is why there were both." +.if ${COMPILER_TYPE} == "gcc" +CFLAGS.zstd_decompress_block.c+= -fno-tree-vectorize +.endif + +# Work around lack of __bswap[sd]i2() intrinsics on riscv. Probably should be +# added to one of the runtime C libraries instead. +.if ${MACHINE_CPUARCH} == "riscv" +.PATH: ${ZSTDDIR}/lib/freebsd +SRCS+= zstd_kfreebsd.c +.endif + +.include diff --cc sys/conf/files index 347dadb1545f,000000000000..66999f9c5325 mode 100644,000000..100644 --- a/sys/conf/files +++ b/sys/conf/files @@@ -1,5376 -1,0 +1,5377 @@@ +# +# The long compile-with and dependency lines are required because of +# limitations in config: backslash-newline doesn't work in strings, and +# dependency lines other than the first are silently ignored. +# +acpi_quirks.h optional acpi \ + dependency "$S/tools/acpi_quirks2h.awk $S/dev/acpica/acpi_quirks" \ + compile-with "${AWK} -f $S/tools/acpi_quirks2h.awk $S/dev/acpica/acpi_quirks" \ + no-obj no-implicit-rule before-depend \ + clean "acpi_quirks.h" +bhnd_nvram_map.h optional bhnd \ + dependency "$S/dev/bhnd/tools/nvram_map_gen.sh $S/dev/bhnd/tools/nvram_map_gen.awk $S/dev/bhnd/nvram/nvram_map" \ + compile-with "sh $S/dev/bhnd/tools/nvram_map_gen.sh $S/dev/bhnd/nvram/nvram_map -h" \ + no-obj no-implicit-rule before-depend \ + clean "bhnd_nvram_map.h" +bhnd_nvram_map_data.h optional bhnd \ + dependency "$S/dev/bhnd/tools/nvram_map_gen.sh $S/dev/bhnd/tools/nvram_map_gen.awk $S/dev/bhnd/nvram/nvram_map" \ + compile-with "sh $S/dev/bhnd/tools/nvram_map_gen.sh $S/dev/bhnd/nvram/nvram_map -d" \ + no-obj no-implicit-rule before-depend \ + clean "bhnd_nvram_map_data.h" +fdt_static_dtb.h optional fdt fdt_dtb_static \ + compile-with "sh -c 'MACHINE=${MACHINE} $S/tools/fdt/make_dtbh.sh ${FDT_DTS_FILE} ${.OBJDIR}'" \ + dependency "${FDT_DTS_FILE:T:R}.dtb" \ + no-obj no-implicit-rule before-depend \ + clean "fdt_static_dtb.h" +feeder_eq_gen.h optional sound \ + dependency "$S/tools/sound/feeder_eq_mkfilter.awk" \ + compile-with "${AWK} -f $S/tools/sound/feeder_eq_mkfilter.awk -- ${FEEDER_EQ_PRESETS} > feeder_eq_gen.h" \ + no-obj no-implicit-rule before-depend \ + clean "feeder_eq_gen.h" +feeder_rate_gen.h optional sound \ + dependency "$S/tools/sound/feeder_rate_mkfilter.awk" \ + compile-with "${AWK} -f $S/tools/sound/feeder_rate_mkfilter.awk -- ${FEEDER_RATE_PRESETS} > feeder_rate_gen.h" \ + no-obj no-implicit-rule before-depend \ + clean "feeder_rate_gen.h" +font.h optional sc_dflt_font \ + compile-with "uudecode < ${SRCTOP}/share/syscons/fonts/${SC_DFLT_FONT}-8x16.fnt && file2c 'u_char dflt_font_16[16*256] = {' '};' < ${SC_DFLT_FONT}-8x16 > font.h && uudecode < ${SRCTOP}/share/syscons/fonts/${SC_DFLT_FONT}-8x14.fnt && file2c 'u_char dflt_font_14[14*256] = {' '};' < ${SC_DFLT_FONT}-8x14 >> font.h && uudecode < ${SRCTOP}/share/syscons/fonts/${SC_DFLT_FONT}-8x8.fnt && file2c 'u_char dflt_font_8[8*256] = {' '};' < ${SC_DFLT_FONT}-8x8 >> font.h" \ + no-obj no-implicit-rule before-depend \ + clean "font.h ${SC_DFLT_FONT}-8x14 ${SC_DFLT_FONT}-8x16 ${SC_DFLT_FONT}-8x8" +snd_fxdiv_gen.h optional sound \ + dependency "$S/tools/sound/snd_fxdiv_gen.awk" \ + compile-with "${AWK} -f $S/tools/sound/snd_fxdiv_gen.awk -- > snd_fxdiv_gen.h" \ + no-obj no-implicit-rule before-depend \ + clean "snd_fxdiv_gen.h" +miidevs.h optional miibus | mii \ + dependency "$S/tools/miidevs2h.awk $S/dev/mii/miidevs" \ + compile-with "${AWK} -f $S/tools/miidevs2h.awk $S/dev/mii/miidevs" \ + no-obj no-implicit-rule before-depend \ + clean "miidevs.h" +kbdmuxmap.h optional kbdmux_dflt_keymap \ + compile-with "${KEYMAP} -L ${KBDMUX_DFLT_KEYMAP} | ${KEYMAP_FIX} > ${.TARGET}" \ + no-obj no-implicit-rule before-depend \ + clean "kbdmuxmap.h" +teken_state.h optional sc | vt \ + dependency "$S/teken/gensequences $S/teken/sequences" \ + compile-with "${AWK} -f $S/teken/gensequences $S/teken/sequences > teken_state.h" \ + no-obj no-implicit-rule before-depend \ + clean "teken_state.h" +ukbdmap.h optional ukbd_dflt_keymap \ + compile-with "${KEYMAP} -L ${UKBD_DFLT_KEYMAP} | ${KEYMAP_FIX} > ${.TARGET}" \ + no-obj no-implicit-rule before-depend \ + clean "ukbdmap.h" +usbdevs.h optional usb | hid \ + dependency "$S/tools/usbdevs2h.awk $S/dev/usb/usbdevs" \ + compile-with "${AWK} -f $S/tools/usbdevs2h.awk $S/dev/usb/usbdevs -h" \ + no-obj no-implicit-rule before-depend \ + clean "usbdevs.h" +usbdevs_data.h optional usb \ + dependency "$S/tools/usbdevs2h.awk $S/dev/usb/usbdevs" \ + compile-with "${AWK} -f $S/tools/usbdevs2h.awk $S/dev/usb/usbdevs -d" \ + no-obj no-implicit-rule before-depend \ + clean "usbdevs_data.h" +sdiodevs.h optional mmccam \ + dependency "$S/tools/sdiodevs2h.awk $S/dev/sdio/sdiodevs" \ + compile-with "${AWK} -f $S/tools/sdiodevs2h.awk $S/dev/sdio/sdiodevs -h" \ + no-obj no-implicit-rule before-depend \ + clean "sdiodevs.h" +sdiodevs_data.h optional mmccam \ + dependency "$S/tools/sdiodevs2h.awk $S/dev/sdio/sdiodevs" \ + compile-with "${AWK} -f $S/tools/sdiodevs2h.awk $S/dev/sdio/sdiodevs -d" \ + no-obj no-implicit-rule before-depend \ + clean "sdiodevs_data.h" +cam/cam.c optional scbus +cam/cam_compat.c optional scbus +cam/cam_iosched.c optional scbus +cam/cam_periph.c optional scbus +cam/cam_queue.c optional scbus +cam/cam_sim.c optional scbus +cam/cam_xpt.c optional scbus +cam/ata/ata_all.c optional scbus +cam/ata/ata_xpt.c optional scbus +cam/ata/ata_pmp.c optional scbus +cam/nvme/nvme_all.c optional scbus +cam/nvme/nvme_da.c optional nda | da +cam/nvme/nvme_xpt.c optional scbus +cam/scsi/scsi_xpt.c optional scbus +cam/scsi/scsi_all.c optional scbus +cam/scsi/scsi_cd.c optional cd +cam/scsi/scsi_ch.c optional ch +cam/ata/ata_da.c optional ada | da +cam/ctl/ctl.c optional ctl +cam/ctl/ctl_backend.c optional ctl +cam/ctl/ctl_backend_block.c optional ctl +cam/ctl/ctl_backend_ramdisk.c optional ctl +cam/ctl/ctl_cmd_table.c optional ctl +cam/ctl/ctl_frontend.c optional ctl +cam/ctl/ctl_frontend_cam_sim.c optional ctl +cam/ctl/ctl_frontend_ioctl.c optional ctl +cam/ctl/ctl_frontend_iscsi.c optional ctl cfiscsi +cam/ctl/ctl_ha.c optional ctl +cam/ctl/ctl_nvme_all.c optional ctl +cam/ctl/ctl_nvme_cmd_table.c optional ctl +cam/ctl/ctl_scsi_all.c optional ctl +cam/ctl/ctl_tpc.c optional ctl +cam/ctl/ctl_tpc_local.c optional ctl +cam/ctl/ctl_error.c optional ctl +cam/ctl/ctl_util.c optional ctl +cam/ctl/scsi_ctl.c optional ctl +cam/mmc/mmc_xpt.c optional scbus mmccam +cam/mmc/mmc_sim.c optional scbus mmccam +cam/mmc/mmc_sim_if.m optional scbus mmccam +cam/mmc/mmc_da.c optional scbus mmccam da +cam/scsi/scsi_da.c optional da +cam/scsi/scsi_pass.c optional pass +cam/scsi/scsi_pt.c optional pt +cam/scsi/scsi_sa.c optional sa +cam/scsi/scsi_enc.c optional ses +cam/scsi/scsi_enc_ses.c optional ses +cam/scsi/scsi_enc_safte.c optional ses +cam/scsi/scsi_sg.c optional sg +cam/scsi/scsi_targ_bh.c optional targbh +cam/scsi/scsi_target.c optional targ +cam/scsi/smp_all.c optional scbus + +# shared between zfs and dtrace +cddl/compat/opensolaris/kern/opensolaris.c optional dtrace compile-with "${CDDL_C}" +cddl/compat/opensolaris/kern/opensolaris_proc.c optional zfs | dtrace compile-with "${CDDL_C}" +contrib/openzfs/module/os/freebsd/spl/spl_misc.c optional zfs | dtrace compile-with "${ZFS_C}" +contrib/openzfs/module/os/freebsd/spl/spl_cmn_err.c optional zfs | dtrace compile-with "${ZFS_C}" +contrib/openzfs/module/os/freebsd/spl/spl_taskq.c optional zfs | dtrace compile-with "${ZFS_C}" +contrib/openzfs/module/os/freebsd/spl/spl_kmem.c optional zfs | dtrace compile-with "${ZFS_C}" + +#zfs solaris portability layer +contrib/openzfs/module/os/freebsd/spl/acl_common.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/os/freebsd/spl/callb.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/os/freebsd/spl/list.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/os/freebsd/spl/spl_acl.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/os/freebsd/spl/spl_dtrace.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/os/freebsd/spl/spl_kstat.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/os/freebsd/spl/spl_policy.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/os/freebsd/spl/spl_procfs_list.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/os/freebsd/spl/spl_string.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/os/freebsd/spl/spl_sunddi.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/os/freebsd/spl/spl_sysevent.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/os/freebsd/spl/spl_uio.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/os/freebsd/spl/spl_vfs.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/os/freebsd/spl/spl_vm.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/os/freebsd/spl/spl_zlib.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/os/freebsd/spl/spl_zone.c optional zfs compile-with "${ZFS_C}" + + + +# zfs specific + +#zfs avl +contrib/openzfs/module/avl/avl.c optional zfs compile-with "${ZFS_C}" + +# zfs lua support +contrib/openzfs/module/lua/lapi.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/lua/lauxlib.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/lua/lbaselib.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/lua/lcode.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/lua/lcompat.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/lua/lcorolib.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/lua/lctype.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/lua/ldebug.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/lua/ldo.c optional zfs compile-with "${ZFS_C} ${NO_WINFINITE_RECURSION}" +contrib/openzfs/module/lua/lfunc.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/lua/lgc.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/lua/llex.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/lua/lmem.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/lua/lobject.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/lua/lopcodes.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/lua/lparser.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/lua/lstate.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/lua/lstring.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/lua/lstrlib.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/lua/ltable.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/lua/ltablib.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/lua/ltm.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/lua/lvm.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/lua/lzio.c optional zfs compile-with "${ZFS_C}" + +# zfs nvpair support +contrib/openzfs/module/nvpair/fnvpair.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/nvpair/nvpair.c optional zfs compile-with "${ZFS_RPC_C} ${NO_WSTRINGOP_OVERREAD}" +contrib/openzfs/module/nvpair/nvpair_alloc_fixed.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/nvpair/nvpair_alloc_spl.c optional zfs compile-with "${ZFS_C}" + +#zfs platform compatibility code +contrib/openzfs/module/os/freebsd/zfs/abd_os.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/os/freebsd/zfs/arc_os.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/os/freebsd/zfs/crypto_os.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/os/freebsd/zfs/dmu_os.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/os/freebsd/zfs/event_os.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/os/freebsd/zfs/hkdf.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/os/freebsd/zfs/kmod_core.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/os/freebsd/zfs/spa_os.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/os/freebsd/zfs/sysctl_os.c optional zfs compile-with "${ZFS_C} -include $S/modules/zfs/zfs_config.h" +contrib/openzfs/module/os/freebsd/zfs/vdev_label_os.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/os/freebsd/zfs/vdev_geom.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/os/freebsd/zfs/zfs_acl.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/os/freebsd/zfs/zfs_ctldir.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/os/freebsd/zfs/zfs_debug.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/os/freebsd/zfs/zfs_dir.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/os/freebsd/zfs/zfs_file_os.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/os/freebsd/zfs/zfs_ioctl_compat.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/os/freebsd/zfs/zfs_ioctl_os.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/os/freebsd/zfs/zfs_racct.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/os/freebsd/zfs/zfs_vfsops.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/os/freebsd/zfs/zfs_vnops_os.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/os/freebsd/zfs/zfs_znode_os.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/os/freebsd/zfs/zio_crypt.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/os/freebsd/zfs/zvol_os.c optional zfs compile-with "${ZFS_C}" + +#zfs checksums / zcommon +contrib/openzfs/module/zcommon/cityhash.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zcommon/zfeature_common.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zcommon/zfs_comutil.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zcommon/zfs_deleg.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zcommon/zfs_fletcher.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zcommon/zfs_fletcher_superscalar.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zcommon/zfs_fletcher_superscalar4.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zcommon/zfs_namecheck.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zcommon/zfs_prop.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zcommon/zfs_valstr.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zcommon/zpool_prop.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zcommon/zprop_common.c optional zfs compile-with "${ZFS_C}" + +# zfs edon-r hash support +contrib/openzfs/module/icp/algs/edonr/edonr.c optional zfs compile-with "${ZFS_C}" + +# zfs blake3 hash support +contrib/openzfs/module/icp/algs/blake3/blake3.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/icp/algs/blake3/blake3_generic.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/icp/algs/blake3/blake3_impl.c optional zfs compile-with "${ZFS_C}" + +# zfs sha2 hash support +contrib/openzfs/module/icp/algs/sha2/sha2_generic.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/icp/algs/sha2/sha256_impl.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/icp/algs/sha2/sha512_impl.c optional zfs compile-with "${ZFS_C}" + +#zfs core common code +contrib/openzfs/module/zfs/abd.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/aggsum.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/arc.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/blake3_zfs.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/blkptr.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/bplist.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/bpobj.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/bptree.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/brt.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/btree.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/bqueue.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/dbuf.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/dbuf_stats.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/dataset_kstats.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/ddt.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/ddt_log.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/ddt_stats.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/ddt_zap.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/dmu.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/dmu_direct.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/dmu_diff.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/dmu_object.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/dmu_objset.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/dmu_recv.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/dmu_redact.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/dmu_send.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/dmu_traverse.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/dmu_tx.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/dmu_zfetch.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/dnode.c optional zfs compile-with "${ZFS_C} ${NO_WUNUSED_BUT_SET_VARIABLE}" \ + warning "kernel contains CDDL licensed ZFS filesystem" +contrib/openzfs/module/zfs/dnode_sync.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/dsl_bookmark.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/dsl_crypt.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/dsl_dataset.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/dsl_deadlist.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/dsl_deleg.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/dsl_destroy.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/dsl_dir.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/dsl_pool.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/dsl_prop.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/dsl_scan.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/dsl_synctask.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/dsl_userhold.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/edonr_zfs.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/fm.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/gzip.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/lzjb.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/lz4.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/lz4_zfs.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/metaslab.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/mmp.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/multilist.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/objlist.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/pathname.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/range_tree.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/refcount.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/rrwlock.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/sa.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/sha2_zfs.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/skein_zfs.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/spa.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/spa_checkpoint.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/spa_config.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/spa_errlog.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/spa_history.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/spa_log_spacemap.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/spa_misc.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/spa_stats.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/space_map.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/space_reftree.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/txg.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/u8_textprep.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/uberblock.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/unique.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/vdev.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/vdev_draid.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/vdev_draid_rand.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/vdev_file.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/vdev_indirect.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/vdev_indirect_births.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/vdev_indirect_mapping.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/vdev_initialize.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/vdev_label.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/vdev_mirror.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/vdev_missing.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/vdev_queue.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/vdev_raidz.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/vdev_raidz_math.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/vdev_raidz_math_scalar.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/vdev_rebuild.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/vdev_removal.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/vdev_root.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/vdev_trim.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/zap.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/zap_leaf.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/zap_micro.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/zcp.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/zcp_get.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/zcp_global.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/zcp_iter.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/zcp_set.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/zcp_synctask.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/zfeature.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/zfs_byteswap.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/zfs_chksum.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/zfs_crrd.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/zfs_fm.c optional zfs compile-with "${ZFS_C} ${NO_WUNUSED_BUT_SET_VARIABLE}" +contrib/openzfs/module/zfs/zfs_fuid.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/zfs_impl.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/zfs_ioctl.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/zfs_log.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/zfs_onexit.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/zfs_quota.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/zfs_ratelimit.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/zfs_replay.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/zfs_rlock.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/zfs_sa.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/zfs_vnops.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/zfs_znode.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zstd/zfs_zstd.c optional zfs zstdio compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/zil.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/zio.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/zio_checksum.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/zio_compress.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/zio_inject.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/zle.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/zrlock.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/zthr.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/zvol.c optional zfs compile-with "${ZFS_C}" + +# dtrace specific +cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c optional dtrace compile-with "${DTRACE_C}" \ + warning "kernel contains CDDL licensed DTRACE" +cddl/contrib/opensolaris/uts/common/dtrace/dtrace_xoroshiro128_plus.c optional dtrace compile-with "${DTRACE_C}" +cddl/dev/dtmalloc/dtmalloc.c optional dtmalloc | dtraceall compile-with "${CDDL_C}" +cddl/dev/profile/profile.c optional dtrace_profile | dtraceall compile-with "${CDDL_C}" +cddl/dev/sdt/sdt.c optional dtrace_sdt | dtraceall compile-with "${CDDL_C}" +cddl/dev/fbt/fbt.c optional dtrace_fbt | dtraceall compile-with "${FBT_C}" +cddl/dev/systrace/systrace.c optional dtrace_systrace | dtraceall compile-with "${CDDL_C}" +cddl/dev/prototype.c optional dtrace_prototype | dtraceall compile-with "${CDDL_C}" +fs/nfsclient/nfs_clkdtrace.c optional dtnfscl nfscl | dtraceall nfscl compile-with "${CDDL_C}" +compat/freebsd32/freebsd32_abort2.c optional compat_freebsd32 +compat/freebsd32/freebsd32_capability.c optional compat_freebsd32 +compat/freebsd32/freebsd32_ioctl.c optional compat_freebsd32 +compat/freebsd32/freebsd32_misc.c optional compat_freebsd32 +compat/freebsd32/freebsd32_syscalls.c optional compat_freebsd32 +compat/freebsd32/freebsd32_sysent.c optional compat_freebsd32 +contrib/ck/src/ck_array.c standard compile-with "${NORMAL_C} -I$S/contrib/ck/include" +contrib/ck/src/ck_barrier_centralized.c standard compile-with "${NORMAL_C} -I$S/contrib/ck/include" +contrib/ck/src/ck_barrier_combining.c standard compile-with "${NORMAL_C} -I$S/contrib/ck/include" +contrib/ck/src/ck_barrier_dissemination.c standard compile-with "${NORMAL_C} -I$S/contrib/ck/include" +contrib/ck/src/ck_barrier_mcs.c standard compile-with "${NORMAL_C} -I$S/contrib/ck/include" +contrib/ck/src/ck_barrier_tournament.c standard compile-with "${NORMAL_C} -I$S/contrib/ck/include" +contrib/ck/src/ck_epoch.c standard compile-with "${NORMAL_C} -I$S/contrib/ck/include" +contrib/ck/src/ck_hp.c standard compile-with "${NORMAL_C} -I$S/contrib/ck/include" +contrib/ck/src/ck_hs.c standard compile-with "${NORMAL_C} -I$S/contrib/ck/include" +contrib/ck/src/ck_ht.c standard compile-with "${NORMAL_C} -I$S/contrib/ck/include" +contrib/ck/src/ck_rhs.c standard compile-with "${NORMAL_C} -I$S/contrib/ck/include" +contrib/dev/acpica/common/ahids.c optional acpi acpi_debug +contrib/dev/acpica/common/ahuuids.c optional acpi acpi_debug +contrib/dev/acpica/components/debugger/dbcmds.c optional acpi acpi_debug +contrib/dev/acpica/components/debugger/dbconvert.c optional acpi acpi_debug +contrib/dev/acpica/components/debugger/dbdisply.c optional acpi acpi_debug +contrib/dev/acpica/components/debugger/dbexec.c optional acpi acpi_debug +contrib/dev/acpica/components/debugger/dbhistry.c optional acpi acpi_debug +contrib/dev/acpica/components/debugger/dbinput.c optional acpi acpi_debug +contrib/dev/acpica/components/debugger/dbmethod.c optional acpi acpi_debug +contrib/dev/acpica/components/debugger/dbnames.c optional acpi acpi_debug +contrib/dev/acpica/components/debugger/dbobject.c optional acpi acpi_debug +contrib/dev/acpica/components/debugger/dbstats.c optional acpi acpi_debug +contrib/dev/acpica/components/debugger/dbtest.c optional acpi acpi_debug +contrib/dev/acpica/components/debugger/dbutils.c optional acpi acpi_debug +contrib/dev/acpica/components/debugger/dbxface.c optional acpi acpi_debug +contrib/dev/acpica/components/disassembler/dmbuffer.c optional acpi acpi_debug +contrib/dev/acpica/components/disassembler/dmcstyle.c optional acpi acpi_debug +contrib/dev/acpica/components/disassembler/dmdeferred.c optional acpi acpi_debug +contrib/dev/acpica/components/disassembler/dmnames.c optional acpi acpi_debug +contrib/dev/acpica/components/disassembler/dmopcode.c optional acpi acpi_debug +contrib/dev/acpica/components/disassembler/dmresrc.c optional acpi acpi_debug +contrib/dev/acpica/components/disassembler/dmresrcl.c optional acpi acpi_debug +contrib/dev/acpica/components/disassembler/dmresrcl2.c optional acpi acpi_debug +contrib/dev/acpica/components/disassembler/dmresrcs.c optional acpi acpi_debug +contrib/dev/acpica/components/disassembler/dmutils.c optional acpi acpi_debug +contrib/dev/acpica/components/disassembler/dmwalk.c optional acpi acpi_debug +contrib/dev/acpica/components/dispatcher/dsargs.c optional acpi +contrib/dev/acpica/components/dispatcher/dscontrol.c optional acpi +contrib/dev/acpica/components/dispatcher/dsdebug.c optional acpi +contrib/dev/acpica/components/dispatcher/dsfield.c optional acpi +contrib/dev/acpica/components/dispatcher/dsinit.c optional acpi +contrib/dev/acpica/components/dispatcher/dsmethod.c optional acpi +contrib/dev/acpica/components/dispatcher/dsmthdat.c optional acpi +contrib/dev/acpica/components/dispatcher/dsobject.c optional acpi +contrib/dev/acpica/components/dispatcher/dsopcode.c optional acpi +contrib/dev/acpica/components/dispatcher/dspkginit.c optional acpi +contrib/dev/acpica/components/dispatcher/dsutils.c optional acpi +contrib/dev/acpica/components/dispatcher/dswexec.c optional acpi +contrib/dev/acpica/components/dispatcher/dswload.c optional acpi +contrib/dev/acpica/components/dispatcher/dswload2.c optional acpi +contrib/dev/acpica/components/dispatcher/dswscope.c optional acpi +contrib/dev/acpica/components/dispatcher/dswstate.c optional acpi +contrib/dev/acpica/components/events/evevent.c optional acpi +contrib/dev/acpica/components/events/evglock.c optional acpi +contrib/dev/acpica/components/events/evgpe.c optional acpi +contrib/dev/acpica/components/events/evgpeblk.c optional acpi +contrib/dev/acpica/components/events/evgpeinit.c optional acpi +contrib/dev/acpica/components/events/evgpeutil.c optional acpi +contrib/dev/acpica/components/events/evhandler.c optional acpi +contrib/dev/acpica/components/events/evmisc.c optional acpi +contrib/dev/acpica/components/events/evregion.c optional acpi +contrib/dev/acpica/components/events/evrgnini.c optional acpi +contrib/dev/acpica/components/events/evsci.c optional acpi +contrib/dev/acpica/components/events/evxface.c optional acpi +contrib/dev/acpica/components/events/evxfevnt.c optional acpi +contrib/dev/acpica/components/events/evxfgpe.c optional acpi +contrib/dev/acpica/components/events/evxfregn.c optional acpi +contrib/dev/acpica/components/executer/exconcat.c optional acpi +contrib/dev/acpica/components/executer/exconfig.c optional acpi +contrib/dev/acpica/components/executer/exconvrt.c optional acpi +contrib/dev/acpica/components/executer/excreate.c optional acpi +contrib/dev/acpica/components/executer/exdebug.c optional acpi +contrib/dev/acpica/components/executer/exdump.c optional acpi +contrib/dev/acpica/components/executer/exfield.c optional acpi +contrib/dev/acpica/components/executer/exfldio.c optional acpi +contrib/dev/acpica/components/executer/exmisc.c optional acpi +contrib/dev/acpica/components/executer/exmutex.c optional acpi +contrib/dev/acpica/components/executer/exnames.c optional acpi +contrib/dev/acpica/components/executer/exoparg1.c optional acpi +contrib/dev/acpica/components/executer/exoparg2.c optional acpi +contrib/dev/acpica/components/executer/exoparg3.c optional acpi +contrib/dev/acpica/components/executer/exoparg6.c optional acpi +contrib/dev/acpica/components/executer/exprep.c optional acpi +contrib/dev/acpica/components/executer/exregion.c optional acpi +contrib/dev/acpica/components/executer/exresnte.c optional acpi +contrib/dev/acpica/components/executer/exresolv.c optional acpi +contrib/dev/acpica/components/executer/exresop.c optional acpi +contrib/dev/acpica/components/executer/exserial.c optional acpi +contrib/dev/acpica/components/executer/exstore.c optional acpi +contrib/dev/acpica/components/executer/exstoren.c optional acpi +contrib/dev/acpica/components/executer/exstorob.c optional acpi +contrib/dev/acpica/components/executer/exsystem.c optional acpi +contrib/dev/acpica/components/executer/extrace.c optional acpi +contrib/dev/acpica/components/executer/exutils.c optional acpi +contrib/dev/acpica/components/hardware/hwacpi.c optional acpi +contrib/dev/acpica/components/hardware/hwesleep.c optional acpi +contrib/dev/acpica/components/hardware/hwgpe.c optional acpi +contrib/dev/acpica/components/hardware/hwpci.c optional acpi +contrib/dev/acpica/components/hardware/hwregs.c optional acpi +contrib/dev/acpica/components/hardware/hwsleep.c optional acpi +contrib/dev/acpica/components/hardware/hwtimer.c optional acpi +contrib/dev/acpica/components/hardware/hwvalid.c optional acpi +contrib/dev/acpica/components/hardware/hwxface.c optional acpi +contrib/dev/acpica/components/hardware/hwxfsleep.c optional acpi +contrib/dev/acpica/components/namespace/nsaccess.c optional acpi \ + compile-with "${NORMAL_C} ${NO_WUNUSED_BUT_SET_VARIABLE}" +contrib/dev/acpica/components/namespace/nsalloc.c optional acpi +contrib/dev/acpica/components/namespace/nsarguments.c optional acpi +contrib/dev/acpica/components/namespace/nsconvert.c optional acpi +contrib/dev/acpica/components/namespace/nsdump.c optional acpi +contrib/dev/acpica/components/namespace/nseval.c optional acpi +contrib/dev/acpica/components/namespace/nsinit.c optional acpi +contrib/dev/acpica/components/namespace/nsload.c optional acpi +contrib/dev/acpica/components/namespace/nsnames.c optional acpi +contrib/dev/acpica/components/namespace/nsobject.c optional acpi +contrib/dev/acpica/components/namespace/nsparse.c optional acpi +contrib/dev/acpica/components/namespace/nspredef.c optional acpi +contrib/dev/acpica/components/namespace/nsprepkg.c optional acpi +contrib/dev/acpica/components/namespace/nsrepair.c optional acpi +contrib/dev/acpica/components/namespace/nsrepair2.c optional acpi +contrib/dev/acpica/components/namespace/nssearch.c optional acpi +contrib/dev/acpica/components/namespace/nsutils.c optional acpi +contrib/dev/acpica/components/namespace/nswalk.c optional acpi +contrib/dev/acpica/components/namespace/nsxfeval.c optional acpi +contrib/dev/acpica/components/namespace/nsxfname.c optional acpi +contrib/dev/acpica/components/namespace/nsxfobj.c optional acpi +contrib/dev/acpica/components/parser/psargs.c optional acpi +contrib/dev/acpica/components/parser/psloop.c optional acpi +contrib/dev/acpica/components/parser/psobject.c optional acpi +contrib/dev/acpica/components/parser/psopcode.c optional acpi +contrib/dev/acpica/components/parser/psopinfo.c optional acpi +contrib/dev/acpica/components/parser/psparse.c optional acpi +contrib/dev/acpica/components/parser/psscope.c optional acpi +contrib/dev/acpica/components/parser/pstree.c optional acpi +contrib/dev/acpica/components/parser/psutils.c optional acpi +contrib/dev/acpica/components/parser/pswalk.c optional acpi +contrib/dev/acpica/components/parser/psxface.c optional acpi +contrib/dev/acpica/components/resources/rsaddr.c optional acpi +contrib/dev/acpica/components/resources/rscalc.c optional acpi +contrib/dev/acpica/components/resources/rscreate.c optional acpi +contrib/dev/acpica/components/resources/rsdump.c optional acpi acpi_debug +contrib/dev/acpica/components/resources/rsdumpinfo.c optional acpi +contrib/dev/acpica/components/resources/rsinfo.c optional acpi +contrib/dev/acpica/components/resources/rsio.c optional acpi +contrib/dev/acpica/components/resources/rsirq.c optional acpi +contrib/dev/acpica/components/resources/rslist.c optional acpi +contrib/dev/acpica/components/resources/rsmemory.c optional acpi +contrib/dev/acpica/components/resources/rsmisc.c optional acpi +contrib/dev/acpica/components/resources/rsserial.c optional acpi +contrib/dev/acpica/components/resources/rsutils.c optional acpi +contrib/dev/acpica/components/resources/rsxface.c optional acpi +contrib/dev/acpica/components/tables/tbdata.c optional acpi +contrib/dev/acpica/components/tables/tbfadt.c optional acpi +contrib/dev/acpica/components/tables/tbfind.c optional acpi +contrib/dev/acpica/components/tables/tbinstal.c optional acpi +contrib/dev/acpica/components/tables/tbprint.c optional acpi +contrib/dev/acpica/components/tables/tbutils.c optional acpi +contrib/dev/acpica/components/tables/tbxface.c optional acpi +contrib/dev/acpica/components/tables/tbxfload.c optional acpi +contrib/dev/acpica/components/tables/tbxfroot.c optional acpi +contrib/dev/acpica/components/utilities/utaddress.c optional acpi +contrib/dev/acpica/components/utilities/utalloc.c optional acpi +contrib/dev/acpica/components/utilities/utascii.c optional acpi +contrib/dev/acpica/components/utilities/utbuffer.c optional acpi +contrib/dev/acpica/components/utilities/utcache.c optional acpi +contrib/dev/acpica/components/utilities/utcksum.c optional acpi +contrib/dev/acpica/components/utilities/utcopy.c optional acpi +contrib/dev/acpica/components/utilities/utdebug.c optional acpi +contrib/dev/acpica/components/utilities/utdecode.c optional acpi +contrib/dev/acpica/components/utilities/utdelete.c optional acpi +contrib/dev/acpica/components/utilities/uterror.c optional acpi +contrib/dev/acpica/components/utilities/uteval.c optional acpi +contrib/dev/acpica/components/utilities/utexcep.c optional acpi +contrib/dev/acpica/components/utilities/utglobal.c optional acpi +contrib/dev/acpica/components/utilities/uthex.c optional acpi +contrib/dev/acpica/components/utilities/utids.c optional acpi +contrib/dev/acpica/components/utilities/utinit.c optional acpi +contrib/dev/acpica/components/utilities/utlock.c optional acpi +contrib/dev/acpica/components/utilities/utmath.c optional acpi +contrib/dev/acpica/components/utilities/utmisc.c optional acpi +contrib/dev/acpica/components/utilities/utmutex.c optional acpi +contrib/dev/acpica/components/utilities/utnonansi.c optional acpi +contrib/dev/acpica/components/utilities/utobject.c optional acpi +contrib/dev/acpica/components/utilities/utosi.c optional acpi +contrib/dev/acpica/components/utilities/utownerid.c optional acpi +contrib/dev/acpica/components/utilities/utpredef.c optional acpi +contrib/dev/acpica/components/utilities/utresdecode.c optional acpi acpi_debug +contrib/dev/acpica/components/utilities/utresrc.c optional acpi +contrib/dev/acpica/components/utilities/utstate.c optional acpi +contrib/dev/acpica/components/utilities/utstring.c optional acpi +contrib/dev/acpica/components/utilities/utstrsuppt.c optional acpi +contrib/dev/acpica/components/utilities/utstrtoul64.c optional acpi +contrib/dev/acpica/components/utilities/utuuid.c optional acpi acpi_debug +contrib/dev/acpica/components/utilities/utxface.c optional acpi +contrib/dev/acpica/components/utilities/utxferror.c optional acpi +contrib/dev/acpica/components/utilities/utxfinit.c optional acpi +contrib/dev/acpica/os_specific/service_layers/osgendbg.c optional acpi acpi_debug +netpfil/ipfilter/netinet/fil.c optional ipfilter inet compile-with "${IPFILTER_C}" +netpfil/ipfilter/netinet/ip_auth.c optional ipfilter inet compile-with "${IPFILTER_C}" +netpfil/ipfilter/netinet/ip_fil_freebsd.c optional ipfilter inet compile-with "${IPFILTER_C}" +netpfil/ipfilter/netinet/ip_frag.c optional ipfilter inet compile-with "${IPFILTER_C}" +netpfil/ipfilter/netinet/ip_log.c optional ipfilter inet compile-with "${IPFILTER_C}" +netpfil/ipfilter/netinet/ip_nat.c optional ipfilter inet compile-with "${IPFILTER_C}" +netpfil/ipfilter/netinet/ip_proxy.c optional ipfilter inet compile-with "${IPFILTER_C}" +netpfil/ipfilter/netinet/ip_state.c optional ipfilter inet compile-with "${IPFILTER_C}" +netpfil/ipfilter/netinet/ip_lookup.c optional ipfilter inet compile-with "${IPFILTER_C}" +netpfil/ipfilter/netinet/ip_pool.c optional ipfilter inet compile-with "${IPFILTER_C}" +netpfil/ipfilter/netinet/ip_htable.c optional ipfilter inet compile-with "${IPFILTER_C}" +netpfil/ipfilter/netinet/ip_sync.c optional ipfilter inet compile-with "${IPFILTER_C}" +netpfil/ipfilter/netinet/mlfk_ipl.c optional ipfilter inet compile-with "${IPFILTER_C}" +netpfil/ipfilter/netinet/ip_nat6.c optional ipfilter inet compile-with "${IPFILTER_C}" +netpfil/ipfilter/netinet/ip_rules.c optional ipfilter inet compile-with "${IPFILTER_C}" +netpfil/ipfilter/netinet/ip_scan.c optional ipfilter inet compile-with "${IPFILTER_C}" +netpfil/ipfilter/netinet/ip_dstlist.c optional ipfilter inet compile-with "${IPFILTER_C}" +netpfil/ipfilter/netinet/radix_ipf.c optional ipfilter inet compile-with "${IPFILTER_C}" +contrib/libfdt/fdt.c optional fdt +contrib/libfdt/fdt_ro.c optional fdt +contrib/libfdt/fdt_rw.c optional fdt +contrib/libfdt/fdt_strerror.c optional fdt +contrib/libfdt/fdt_sw.c optional fdt +contrib/libfdt/fdt_wip.c optional fdt +contrib/libnv/cnvlist.c standard +contrib/libnv/dnvlist.c standard +contrib/libnv/nvlist.c standard +contrib/libnv/bsd_nvpair.c standard +# xz +dev/xz/xz_mod.c optional xz \ + compile-with "${NORMAL_C} -DXZ_USE_CRC64 -I$S/contrib/xz-embedded/freebsd/ -I$S/contrib/xz-embedded/linux/lib/xz/ -I$S/contrib/xz-embedded/linux/include/linux/" +contrib/xz-embedded/linux/lib/xz/xz_crc32.c optional xz \ + compile-with "${NORMAL_C} -DXZ_USE_CRC64 -I$S/contrib/xz-embedded/freebsd/ -I$S/contrib/xz-embedded/linux/lib/xz/ -I$S/contrib/xz-embedded/linux/include/linux/" +contrib/xz-embedded/linux/lib/xz/xz_crc64.c optional xz \ + compile-with "${NORMAL_C} -DXZ_USE_CRC64 -I$S/contrib/xz-embedded/freebsd/ -I$S/contrib/xz-embedded/linux/lib/xz/ -I$S/contrib/xz-embedded/linux/include/linux/" +contrib/xz-embedded/linux/lib/xz/xz_dec_bcj.c optional xz \ + compile-with "${NORMAL_C} -DXZ_USE_CRC64 -I$S/contrib/xz-embedded/freebsd/ -I$S/contrib/xz-embedded/linux/lib/xz/ -I$S/contrib/xz-embedded/linux/include/linux/" +contrib/xz-embedded/linux/lib/xz/xz_dec_lzma2.c optional xz \ + compile-with "${NORMAL_C} -DXZ_USE_CRC64 -I$S/contrib/xz-embedded/freebsd/ -I$S/contrib/xz-embedded/linux/lib/xz/ -I$S/contrib/xz-embedded/linux/include/linux/" +contrib/xz-embedded/linux/lib/xz/xz_dec_stream.c optional xz \ + compile-with "${NORMAL_C} -DXZ_USE_CRC64 -I$S/contrib/xz-embedded/freebsd/ -I$S/contrib/xz-embedded/linux/lib/xz/ -I$S/contrib/xz-embedded/linux/include/linux/" +# Zstd +contrib/zstd/lib/freebsd/zstd_kmalloc.c optional zstdio compile-with ${ZSTD_C} +contrib/zstd/lib/common/zstd_common.c optional zstdio compile-with ${ZSTD_C} +contrib/zstd/lib/common/fse_decompress.c optional zstdio compile-with ${ZSTD_C} +contrib/zstd/lib/common/entropy_common.c optional zstdio compile-with ${ZSTD_C} +contrib/zstd/lib/common/error_private.c optional zstdio compile-with ${ZSTD_C} +contrib/zstd/lib/common/xxhash.c optional zstdio compile-with ${ZSTD_C} +contrib/zstd/lib/compress/zstd_compress.c optional zstdio compile-with ${ZSTD_C} +contrib/zstd/lib/compress/zstd_compress_literals.c optional zstdio compile-with ${ZSTD_C} +contrib/zstd/lib/compress/zstd_compress_sequences.c optional zstdio compile-with ${ZSTD_C} +contrib/zstd/lib/compress/zstd_compress_superblock.c optional zstdio compile-with "${ZSTD_C} ${NO_WUNUSED_BUT_SET_VARIABLE}" ++contrib/zstd/lib/compress/zstd_preSplit.c optional zstdio compile-with ${ZSTD_C} +contrib/zstd/lib/compress/fse_compress.c optional zstdio compile-with ${ZSTD_C} +contrib/zstd/lib/compress/hist.c optional zstdio compile-with ${ZSTD_C} +contrib/zstd/lib/compress/huf_compress.c optional zstdio compile-with ${ZSTD_C} +contrib/zstd/lib/compress/zstd_double_fast.c optional zstdio compile-with ${ZSTD_C} +contrib/zstd/lib/compress/zstd_fast.c optional zstdio compile-with ${ZSTD_C} +contrib/zstd/lib/compress/zstd_lazy.c optional zstdio compile-with ${ZSTD_C} +contrib/zstd/lib/compress/zstd_ldm.c optional zstdio compile-with ${ZSTD_C} +contrib/zstd/lib/compress/zstd_opt.c optional zstdio compile-with ${ZSTD_C} +contrib/zstd/lib/decompress/zstd_ddict.c optional zstdio compile-with ${ZSTD_C} +contrib/zstd/lib/decompress/zstd_decompress.c optional zstdio compile-with ${ZSTD_C} +# See comment in sys/conf/kern.pre.mk +contrib/zstd/lib/decompress/zstd_decompress_block.c optional zstdio \ + compile-with "${ZSTD_C} ${ZSTD_DECOMPRESS_BLOCK_FLAGS}" +contrib/zstd/lib/decompress/huf_decompress.c optional zstdio compile-with "${ZSTD_C} ${NO_WBITWISE_INSTEAD_OF_LOGICAL}" +# Blake 2 +contrib/libb2/blake2b-ref.c optional crypto | !random_loadable random_fenestrasx \ + compile-with "${NORMAL_C} -I$S/crypto/blake2 -Wno-cast-qual -DSUFFIX=_ref -Wno-unused-function" +contrib/libb2/blake2s-ref.c optional crypto \ + compile-with "${NORMAL_C} -I$S/crypto/blake2 -Wno-cast-qual -DSUFFIX=_ref -Wno-unused-function" +crypto/blake2/blake2-sw.c optional crypto \ + compile-with "${NORMAL_C} -I$S/crypto/blake2 -Wno-cast-qual" +crypto/camellia/camellia.c optional crypto +crypto/camellia/camellia-api.c optional crypto +crypto/chacha20/chacha.c standard +crypto/chacha20/chacha-sw.c optional crypto +crypto/chacha20_poly1305.c optional crypto +crypto/curve25519.c optional crypto \ + compile-with "${NORMAL_C} -I$S/contrib/libsodium/src/libsodium/include -I$S/crypto/libsodium" +crypto/des/des_ecb.c optional netsmb +crypto/des/des_setkey.c optional netsmb +crypto/md4c.c optional netsmb +crypto/md5c.c standard +crypto/openssl/ossl.c optional ossl +crypto/openssl/ossl_aes.c optional ossl +crypto/openssl/ossl_chacha20.c optional ossl +crypto/openssl/ossl_poly1305.c optional ossl +crypto/openssl/ossl_sha1.c optional ossl +crypto/openssl/ossl_sha256.c optional ossl +crypto/openssl/ossl_sha512.c optional ossl +crypto/rc4/rc4.c optional netgraph_mppc_encryption +crypto/rijndael/rijndael-alg-fst.c optional crypto | ekcd | \ + !random_loadable | wlan_ccmp +crypto/rijndael/rijndael-api-fst.c optional ekcd | !random_loadable +crypto/rijndael/rijndael-api.c optional crypto | wlan_ccmp +crypto/sha1.c optional carp | crypto | ether | \ + netgraph_mppc_encryption | sctp +crypto/sha2/sha256c.c optional crypto | ekcd | \ + !random_loadable | sctp | zfs +crypto/sha2/sha512c.c optional crypto | zfs +crypto/skein/skein.c optional crypto | zfs *** 6596 LINES SKIPPED *** From nobody Thu Apr 9 01:10:33 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4frhgs3nTHz6Y7N0 for ; Thu, 09 Apr 2026 01:10: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4frhgs2cChz3Hl6 for ; Thu, 09 Apr 2026 01:10:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775697033; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9ylJOsv+k8j1SdCbCOqVlWnsK0wYYXCM53TtFtEZe7s=; b=r9VxEIjlKAhg7/xIEnlJV3MVQ1SBeYgu/1c4BX0pkdW34wTxyrxBfDA9F0Bfj4l4keaQEM aW8FcKB2aUt4YuwUbXQ4WCe5lwsSMUjjqq+6QcqRP/HqwWM4UysIN4u2eTyg7hrCxTSuYY FMShzijLwhYIBzKrLNSS4NHkyLpIAo8NyUk6QCjIqJ4xx24SKQoL4a4pGeyu0jXKb6cB7R 2IypsaBO+Wd1YjV+u75dT3rKV28mARnE/LXeoOk97zJtUWDxrKfJX5Wis0GtB67FPWjEIt bHYXisuQsZEQZEivg8WPQKz2o2akGaCugPcKk3sS9ASmgULpz48MtDBglZezjA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775697033; a=rsa-sha256; cv=none; b=l9DLa3dUfptsc9CXPolVVy/FnLs8g9okfJm6qriXb8kLQ/TV2DCsAGdW4ZSDfXEsuXmLhC +oBs9QBZQMGQjICHwjNaWYKCA1iF9dpqTDsM/hyJAH6pbaTjfPFnJcHGHZkVbRU8uG/3rN pEJM1u5uBgEAQNq4w7miSbwT5jBYmWPFxMCL07mG8T6oqR1b6JRvGCCdn3PmIlId5uVQCp gD+C/T8vje7qj2WOhRd9NFziP66Fl16K+hJSAzzh+xLL4u6cBfSyJ8arMRUcsoleSRSVwl lr0j2SzAPlXMBeV05KZlLNaugIRA9joC+7chnp3vBuICTeQP4Bd+61/U6Biddg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775697033; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9ylJOsv+k8j1SdCbCOqVlWnsK0wYYXCM53TtFtEZe7s=; b=MyC59JOUXoB2BtSqx9gFbHPYhjby6+zMOuXgnPTSoS93An9N5Ms/KNqLG9Ww3UBCorvj0o pwoGPRvLuTtwLFO7Lo6WMhJvCL05mAOVb3Zy3cBpcGUjhbvFjMPDvuyFj3jKzP3qsvOF6V 3+8U/Isl/DWEa/yPJc1U4STmOC5x/QDItT0gmz3WwUtHnYKiIrhEBcyavvXIFKfLwnc5ur QjPPD4eolCsUaQI8u/ISw5TsKjEwi3bXm6Gj1l626PL9EyTT0VqTZsmKcFRFSFpX3wj/Sr 22DBjy26olftY76BzuiQq3Mo5jVMjOzzhqkrec/+J43O+7InccPQwt+P6oLm/g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4frhgs2CQ1zrs3 for ; Thu, 09 Apr 2026 01:10:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 39bd7 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 09 Apr 2026 01:10:33 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 36d971464ac2 - main - geom: Make g_waitidle() wait for orphaned providers List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: 36d971464ac21f6531cb9eaa377f4e1dd915a2ad Auto-Submitted: auto-generated Date: Thu, 09 Apr 2026 01:10:33 +0000 Message-Id: <69d6fc89.39bd7.c1e5944@gitrepo.freebsd.org> The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=36d971464ac21f6531cb9eaa377f4e1dd915a2ad commit 36d971464ac21f6531cb9eaa377f4e1dd915a2ad Author: Mark Johnston AuthorDate: 2026-04-09 01:08:45 +0000 Commit: Mark Johnston CommitDate: 2026-04-09 01:10:13 +0000 geom: Make g_waitidle() wait for orphaned providers This is motivated by the following race in the ZFS zvol code. When a zvol is created, we create a GEOM-backed zvol, which results in a /dev/zvol/ device file, created by GEOM::dev. If volmode=dev is specified, zvol_set_volmode_impl() will wither the GEOM, then create a device file with the same name. This sometimes fails because g_wither_geom() is asynchronous, so we end up trying to create a device file while the old one still exists. I want to fix this by adding a g_waitidle() call to zvol_os_remove_minor(). g_waitidle() is not sufficient: GEOM::dev does not destroy the device until g_dev_orphan() is called. (In fact the device destruction is asynchronous too, but the delist_dev() call is sufficient to address this race.) So, I propose modifying g_waitidle() to block until orphaned providers are processed. PR: 258766 Reviewed by: mav, imp, kib MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D55049 --- sys/geom/geom_event.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/geom/geom_event.c b/sys/geom/geom_event.c index ffd46db55416..34649cea5a71 100644 --- a/sys/geom/geom_event.c +++ b/sys/geom/geom_event.c @@ -84,7 +84,7 @@ g_waitidle(struct thread *td) mtx_lock(&g_eventlock); TSWAIT("GEOM events"); - while (!TAILQ_EMPTY(&g_events)) + while (!TAILQ_EMPTY(&g_events) || !TAILQ_EMPTY(&g_doorstep)) msleep(&g_pending_events, &g_eventlock, PPAUSE, "g_waitidle", 0); TSUNWAIT("GEOM events"); From nobody Thu Apr 9 01:56:20 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4frjhj5948z6YCSN for ; Thu, 09 Apr 2026 01:56: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4frjhj0c6Pz3PhP for ; Thu, 09 Apr 2026 01:56:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775699781; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GjSeNrymO/JwaA3dpSmlt3NPA3oequDcoZ9d4+qzBtM=; b=sU5wt5Ust9f84Dd16gec24QaZ5WvpMJnkO1N19vMIdT+/PH5AXBV01jrh5geG1O2/2ajcO aBL9OvDYQUbQCfGPbtbYqRKQ1vGxsRdfud2P0ka+Y7iBFAx40vvJql3+O9DtuvN7p5+h+M P5cRV+Ax8q+hS1A/W1HKdqHYU/n+H5y7NkcJ2C5nwoNwA7dBJuvOEwjb19SkyZf6Uopd2u yJAaQ+nTv+DWvnEFN0hIGt7GEUdTGL6ArzhwCXf+5xyqa5i7978gm0PGen1Nk8n23/VYYN 13jeiTZrUWgMjyu4D+dT353j7JFtWE/pTZmJi3OrPdlV4Rw8f7XE0hoEp257Gw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775699781; a=rsa-sha256; cv=none; b=GDHBfp7XA3NQHKH6urCDPPpLilEA+alSjFB2yFatXrNEg8ylzFHMleLc7DHgzLoWvNEbgL e6u/+eeOAjrjEJYhVfJ+fYZ0UpwxXwJrkwFrJqY2khdU2Pl4zkwGF+feYUJdEMyQY5rzeZ 3Yf0LEHcYzDl77mY2DNN0R6RoV4KR6t5mQ7ivoMjRNnjsFE7AiykG9MbtHDNAxYaQkxKfN A6Hv1cG+K3L4DkAkKsR1ioWbF5f3lYY5YWZFwZMQDNMp0yFy3PKRXIGYkge95slcn8UZxk WkyX3SWe5i3OVOuWFQxA3AAqYBjXTsj+0St2OlRNib8DfdWUqjgxXW0azecxjQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775699781; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GjSeNrymO/JwaA3dpSmlt3NPA3oequDcoZ9d4+qzBtM=; b=vwu6V1EskmN2orCAzJGoBJBAq2nLu/djNnTpQ4f80gwrcDpJRFPFWyzRQqmVYarIdkud3W rfzoEMwOZRQ/F3o1KU1dZjEns3wDHqwhUTpBmRlLOAJ8bTMZAtdawY/0XFPatQsyQPOR16 2Vl34uONatHdiqd26Yvw5CJjkD7cwcXhnSo9bqAP9hhPfnFnRLepvyr58sjnX4LXofNZ34 BLWD7AD5Vang1dMjzYkoARNL1QZHpMiw37wKfziS4/7M5d/hTwFy7H4YqfLVqecobAehTN 1K05okO0wn9vf6JeND094wNbT7wbG6M8acpF/P/et9oe/0/2XDuHTTKsA6XTeQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4frjhh74Wxzt6K for ; Thu, 09 Apr 2026 01:56:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3f744 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 09 Apr 2026 01:56:20 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Enji Cooper Subject: git: 10a428653ee7 - main - MFV: crypto/openssl: update to 3.5.6 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 10a428653ee7216475f1ddce3fb4cbf1200319f8 Auto-Submitted: auto-generated Date: Thu, 09 Apr 2026 01:56:20 +0000 Message-Id: <69d70744.3f744.67e7502d@gitrepo.freebsd.org> The branch main has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=10a428653ee7216475f1ddce3fb4cbf1200319f8 commit 10a428653ee7216475f1ddce3fb4cbf1200319f8 Merge: 36d971464ac2 ab5fc4ac933f Author: Enji Cooper AuthorDate: 2026-04-09 01:44:24 +0000 Commit: Enji Cooper CommitDate: 2026-04-09 01:44:24 +0000 MFV: crypto/openssl: update to 3.5.6 This change brings in version 3.5.6 of OpenSSL, which features several security fixes (the highest of which is a MEDIUM severity issue), as well as some miscellaneous feature updates. Please see the release notes [1] for more details. PS Apologies for the confusing merge commits -- I was testing out a new automated update process and failed to catch the commit message issues until after I pushed the change. 1. https://github.com/openssl/openssl/blob/openssl-3.5.6/NEWS.md MFC after: 1 day (the security issues warrant a quick backport). Merge commit 'ab5fc4ac933ff67bc800e774dffce15e2a541e90' crypto/openssl/CHANGES.md | 575 +++++++++------ crypto/openssl/CONTRIBUTING.md | 12 + crypto/openssl/Configurations/10-main.conf | 3 +- crypto/openssl/Configurations/unix-Makefile.tmpl | 3 +- .../openssl/Configurations/windows-makefile.tmpl | 5 +- crypto/openssl/NEWS.md | 427 +++++------ crypto/openssl/VERSION.dat | 4 +- crypto/openssl/apps/cmp.c | 18 +- crypto/openssl/apps/include/cmp_mock_srv.h | 5 +- crypto/openssl/apps/lib/app_provider.c | 3 +- crypto/openssl/apps/lib/apps.c | 15 +- crypto/openssl/apps/lib/cmp_mock_srv.c | 38 +- crypto/openssl/apps/lib/win32_init.c | 3 +- crypto/openssl/apps/ocsp.c | 2 +- crypto/openssl/apps/s_client.c | 6 +- crypto/openssl/apps/ts.c | 4 +- crypto/openssl/build.info | 16 +- crypto/openssl/crypto/aes/asm/aes-riscv32-zkn.pl | 7 +- crypto/openssl/crypto/aes/asm/aes-riscv64-zkn.pl | 7 +- .../openssl/crypto/aes/asm/aes-riscv64-zvkned.pl | 13 +- crypto/openssl/crypto/aes/asm/aes-riscv64.pl | 10 +- crypto/openssl/crypto/asn1/evp_asn1.c | 4 +- crypto/openssl/crypto/asn1/n_pkey.c | 4 +- crypto/openssl/crypto/asn1/p5_scrypt.c | 11 +- crypto/openssl/crypto/bf/bf_cfb64.c | 4 +- crypto/openssl/crypto/bf/bf_ofb64.c | 4 +- crypto/openssl/crypto/bio/bss_dgram.c | 4 +- crypto/openssl/crypto/bio/bss_file.c | 15 +- crypto/openssl/crypto/bn/asm/armv4-gf2m.pl | 4 +- crypto/openssl/crypto/bn/asm/rsaz-2k-avxifma.pl | 105 ++- crypto/openssl/crypto/bn/asm/rsaz-3k-avxifma.pl | 41 +- crypto/openssl/crypto/bn/asm/rsaz-4k-avxifma.pl | 41 +- crypto/openssl/crypto/bn/asm/sparcv9-mont.pl | 4 +- crypto/openssl/crypto/bn/bn_dh.c | 64 +- crypto/openssl/crypto/bn/bn_exp.c | 34 +- crypto/openssl/crypto/bn/bn_local.h | 4 +- crypto/openssl/crypto/bn/bn_mont.c | 9 +- crypto/openssl/crypto/bn/bn_ppc.c | 10 +- crypto/openssl/crypto/bn/bn_prime.c | 4 +- crypto/openssl/crypto/bn/bn_rsa_fips186_4.c | 4 +- crypto/openssl/crypto/bn/bn_sparc.c | 16 +- crypto/openssl/crypto/bsearch.c | 4 +- crypto/openssl/crypto/cast/c_cfb64.c | 4 +- crypto/openssl/crypto/cast/c_ofb64.c | 4 +- crypto/openssl/crypto/cmp/cmp_client.c | 23 +- crypto/openssl/crypto/cmp/cmp_ctx.c | 4 +- crypto/openssl/crypto/cmp/cmp_local.h | 4 +- crypto/openssl/crypto/cmp/cmp_vfy.c | 25 +- crypto/openssl/crypto/cms/cms_asn1.c | 30 +- crypto/openssl/crypto/cms/cms_dh.c | 15 +- crypto/openssl/crypto/cms/cms_ec.c | 16 +- crypto/openssl/crypto/cms/cms_local.h | 5 +- crypto/openssl/crypto/cms/cms_rsa.c | 33 +- crypto/openssl/crypto/cms/cms_smime.c | 6 +- crypto/openssl/crypto/conf/conf_lib.c | 4 +- crypto/openssl/crypto/conf/conf_mod.c | 4 +- crypto/openssl/crypto/des/cfb64ede.c | 4 +- crypto/openssl/crypto/des/cfb64enc.c | 4 +- crypto/openssl/crypto/des/ofb64ede.c | 4 +- crypto/openssl/crypto/des/ofb64enc.c | 4 +- crypto/openssl/crypto/dh/dh_asn1.c | 7 +- crypto/openssl/crypto/dh/dh_rfc5114.c | 6 +- crypto/openssl/crypto/dllmain.c | 4 +- crypto/openssl/crypto/dsa/dsa_asn1.c | 8 +- crypto/openssl/crypto/ec/ec_asn1.c | 12 +- crypto/openssl/crypto/ec/ec_check.c | 4 +- crypto/openssl/crypto/ec/ec_lib.c | 4 +- crypto/openssl/crypto/err/err_all.c | 6 +- crypto/openssl/crypto/err/openssl.txt | 3 +- crypto/openssl/crypto/ess/ess_asn1.c | 8 +- crypto/openssl/crypto/evp/digest.c | 7 +- crypto/openssl/crypto/evp/e_aes.c | 56 +- crypto/openssl/crypto/evp/e_aria.c | 22 +- crypto/openssl/crypto/evp/e_camellia.c | 22 +- crypto/openssl/crypto/evp/e_des.c | 18 +- crypto/openssl/crypto/evp/e_des3.c | 24 +- crypto/openssl/crypto/evp/e_idea.c | 6 +- crypto/openssl/crypto/evp/e_sm4.c | 14 +- crypto/openssl/crypto/evp/encode.c | 4 +- crypto/openssl/crypto/evp/evp_enc.c | 12 +- crypto/openssl/crypto/evp/kem.c | 4 +- crypto/openssl/crypto/hashtable/hashtable.c | 6 +- crypto/openssl/crypto/http/http_client.c | 26 +- crypto/openssl/crypto/http/http_err.c | 4 +- crypto/openssl/crypto/http/http_lib.c | 8 +- crypto/openssl/crypto/idea/i_cfb64.c | 3 +- crypto/openssl/crypto/idea/i_ofb64.c | 3 +- crypto/openssl/crypto/init.c | 7 +- crypto/openssl/crypto/initthread.c | 14 +- crypto/openssl/crypto/modes/asm/aes-gcm-ppc.pl | 5 - crypto/openssl/crypto/modes/asm/ghash-armv4.pl | 4 +- crypto/openssl/crypto/modes/build.info | 2 +- crypto/openssl/crypto/o_str.c | 15 +- crypto/openssl/crypto/param_build.c | 108 ++- crypto/openssl/crypto/perlasm/x86_64-xlate.pl | 5 +- crypto/openssl/crypto/pkcs12/p12_mutl.c | 4 + crypto/openssl/crypto/pkcs12/p12_utl.c | 4 +- crypto/openssl/crypto/pkcs7/pk7_doit.c | 8 + crypto/openssl/crypto/pkcs7/pk7_lib.c | 9 +- crypto/openssl/crypto/punycode.c | 4 +- crypto/openssl/crypto/rand/rand_egd.c | 25 +- crypto/openssl/crypto/rc2/rc2cfb64.c | 4 +- crypto/openssl/crypto/rc2/rc2ofb64.c | 4 +- crypto/openssl/crypto/rc5/rc5cfb64.c | 4 +- crypto/openssl/crypto/rc5/rc5ofb64.c | 4 +- crypto/openssl/crypto/riscvcap.c | 37 +- crypto/openssl/crypto/rsa/rsa_backend.c | 4 +- crypto/openssl/crypto/sha/asm/keccak1600-s390x.pl | 3 +- crypto/openssl/crypto/slh_dsa/slh_dsa.c | 25 +- crypto/openssl/crypto/sm4/asm/vpsm4_ex-armv8.pl | 13 +- crypto/openssl/crypto/store/store_lib.c | 6 +- crypto/openssl/crypto/threads_none.c | 4 +- crypto/openssl/crypto/threads_pthread.c | 57 +- crypto/openssl/crypto/threads_win.c | 4 +- crypto/openssl/crypto/ts/ts_asn1.c | 14 +- crypto/openssl/crypto/x509/pcy_tree.c | 14 +- crypto/openssl/crypto/x509/t_acert.c | 8 +- crypto/openssl/crypto/x509/v3_ac_tgt.c | 8 +- crypto/openssl/crypto/x509/v3_cpols.c | 4 +- crypto/openssl/crypto/x509/v3_prn.c | 6 +- crypto/openssl/crypto/x509/v3_san.c | 5 +- crypto/openssl/crypto/x509/v3_timespec.c | 4 +- crypto/openssl/crypto/x509/v3_utl.c | 9 +- crypto/openssl/crypto/x509/x509_vfy.c | 7 +- crypto/openssl/crypto/x509/x_pubkey.c | 6 +- crypto/openssl/doc/build.info | 6 + .../doc/internal/man3/OSSL_SAFE_MATH_SIGNED.pod | 4 +- .../internal/man3/ossl_cmp_msg_check_update.pod | 5 +- crypto/openssl/doc/internal/man7/deprecation.pod | 4 +- crypto/openssl/doc/man1/CA.pl.pod | 4 +- crypto/openssl/doc/man1/openssl-ciphers.pod.in | 777 ++++++++++++--------- crypto/openssl/doc/man1/openssl-cmp.pod.in | 10 +- crypto/openssl/doc/man1/openssl-cms.pod.in | 2 +- crypto/openssl/doc/man1/openssl-format-options.pod | 4 +- crypto/openssl/doc/man1/openssl-pkeyutl.pod.in | 4 +- .../doc/man1/openssl-verification-options.pod | 8 +- crypto/openssl/doc/man1/openssl-verify.pod.in | 7 +- crypto/openssl/doc/man3/ADMISSIONS.pod | 4 +- crypto/openssl/doc/man3/BIO_get_data.pod | 11 +- crypto/openssl/doc/man3/BIO_push.pod | 4 +- crypto/openssl/doc/man3/BIO_read.pod | 6 +- crypto/openssl/doc/man3/EVP_EncryptInit.pod | 10 +- crypto/openssl/doc/man3/OPENSSL_malloc.pod | 6 +- crypto/openssl/doc/man3/OSSL_CMP_CTX_new.pod | 11 +- crypto/openssl/doc/man3/OSSL_HPKE_CTX_new.pod | 6 +- crypto/openssl/doc/man3/PKCS5_PBE_keyivgen.pod | 13 +- crypto/openssl/doc/man3/RSA_set_method.pod | 10 +- crypto/openssl/doc/man3/SSL_CONF_cmd.pod | 18 +- crypto/openssl/doc/man3/SSL_CTX_set1_curves.pod | 125 +++- .../doc/man3/SSL_CTX_set_psk_client_callback.pod | 10 +- crypto/openssl/doc/man3/SSL_get_ciphers.pod | 4 +- crypto/openssl/doc/man3/X509V3_EXT_print.pod | 51 ++ crypto/openssl/doc/man3/X509_NAME_print_ex.pod | 7 +- crypto/openssl/doc/man7/EVP_SIGNATURE-DSA.pod | 4 +- crypto/openssl/doc/man7/EVP_SIGNATURE-ECDSA.pod | 4 +- crypto/openssl/doc/man7/EVP_SIGNATURE-ED25519.pod | 4 +- crypto/openssl/doc/man7/EVP_SIGNATURE-HMAC.pod | 4 +- crypto/openssl/doc/man7/EVP_SIGNATURE-ML-DSA.pod | 6 +- crypto/openssl/doc/man7/EVP_SIGNATURE-RSA.pod | 4 +- crypto/openssl/doc/man7/EVP_SIGNATURE-SLH-DSA.pod | 4 +- crypto/openssl/doc/man7/openssl-env.pod | 9 +- .../doc/man7/ossl-guide-tls-introduction.pod | 4 +- crypto/openssl/doc/man7/property.pod | 34 +- crypto/openssl/doc/man7/provider-base.pod | 5 +- .../openssl/exporters/cmake/OpenSSLConfig.cmake.in | 1 + .../exporters/cmake/OpenSSLConfigVersion.cmake.in | 1 + .../openssl/exporters/pkg-config/libcrypto.pc.in | 1 + crypto/openssl/exporters/pkg-config/libssl.pc.in | 1 + crypto/openssl/exporters/pkg-config/openssl.pc.in | 1 + .../perl/Text-Template-1.56/lib/Text/Template.pm | 4 +- .../lib/Text/Template/Preprocess.pm | 4 +- crypto/openssl/include/crypto/aes_platform.h | 4 +- crypto/openssl/include/crypto/evp.h | 24 +- crypto/openssl/include/crypto/httperr.h | 2 +- crypto/openssl/include/crypto/sparc_arch.h | 14 +- crypto/openssl/include/crypto/sparse_array.h | 4 +- crypto/openssl/include/internal/time.h | 72 +- crypto/openssl/include/openssl/cmp.h.in | 4 +- crypto/openssl/include/openssl/core_dispatch.h | 34 +- crypto/openssl/include/openssl/httperr.h | 3 +- crypto/openssl/include/openssl/macros.h | 3 +- crypto/openssl/include/openssl/rsa.h | 6 +- crypto/openssl/include/openssl/types.h | 4 +- crypto/openssl/providers/fips-sources.checksums | 96 +-- crypto/openssl/providers/fips.checksum | 2 +- crypto/openssl/providers/fips/self_test.c | 4 +- crypto/openssl/providers/fips/self_test_kats.c | 11 +- .../ciphers/cipher_aes_gcm_hw_ppc.inc | 8 +- .../implementations/ciphers/cipher_aes_ocb.c | 4 +- .../implementations/ciphers/ciphercommon.c | 6 +- .../include/prov/ciphercommon_ccm.h | 16 +- .../include/prov/ciphercommon_gcm.h | 14 +- .../providers/implementations/kdfs/pkcs12kdf.c | 11 +- .../providers/implementations/kem/rsa_kem.c | 22 +- .../implementations/keymgmt/ml_kem_kmgmt.c | 4 +- .../providers/implementations/rands/drbg_hmac.c | 4 +- .../providers/implementations/signature/dsa_sig.c | 36 +- .../implementations/signature/ecdsa_sig.c | 47 +- .../providers/implementations/signature/sm2_sig.c | 10 +- .../implementations/storemgmt/file_store.c | 11 +- .../implementations/storemgmt/winstore_store.c | 6 +- crypto/openssl/ssl/quic/quic_impl.c | 47 +- crypto/openssl/ssl/quic/quic_lcidm.c | 14 +- crypto/openssl/ssl/quic/quic_reactor.c | 6 + crypto/openssl/ssl/quic/quic_rx_depack.c | 3 +- crypto/openssl/ssl/quic/quic_srtm.c | 7 +- crypto/openssl/ssl/quic/quic_stream_map.c | 3 +- crypto/openssl/ssl/quic/uint_set.c | 4 +- crypto/openssl/ssl/record/methods/tls_common.c | 17 +- crypto/openssl/ssl/s3_lib.c | 6 +- crypto/openssl/ssl/ssl_asn1.c | 4 +- crypto/openssl/ssl/ssl_lib.c | 22 +- crypto/openssl/ssl/ssl_sess.c | 4 +- crypto/openssl/ssl/statem/statem_dtls.c | 8 +- crypto/openssl/ssl/t1_lib.c | 96 +-- crypto/openssl/test/README-external.md | 2 +- crypto/openssl/test/asn1_decode_test.c | 14 +- crypto/openssl/test/asn1_encode_test.c | 14 +- crypto/openssl/test/asn1_internal_test.c | 20 +- crypto/openssl/test/bntest.c | 49 +- crypto/openssl/test/certs/cve-2026-28388-ca.pem | 19 + crypto/openssl/test/certs/cve-2026-28388-crls.pem | 22 + crypto/openssl/test/certs/cve-2026-28388-leaf.pem | 19 + .../ext-timeSpecification-periodic-no-second.pem | 14 + crypto/openssl/test/certs/mkcert.sh | 4 +- crypto/openssl/test/cmp_client_test.c | 75 +- crypto/openssl/test/evp_extra_test.c | 110 ++- crypto/openssl/test/evp_test.c | 4 +- crypto/openssl/test/fake_rsaprov.c | 5 +- crypto/openssl/test/http_test.c | 22 +- crypto/openssl/test/ossl_store_test.c | 9 +- crypto/openssl/test/pkcs12_api_test.c | 32 +- crypto/openssl/test/quicapitest.c | 10 +- .../openssl/test/recipes/10-test_bn_data/bnmod.txt | 10 +- crypto/openssl/test/recipes/25-test_verify.t | 16 +- crypto/openssl/test/recipes/25-test_x509.t | 10 +- .../openssl/test/recipes/61-test_bio_readbuffer.t | 8 +- .../80-test_cmp_http_data/test_commands.csv | 3 +- crypto/openssl/test/recipes/80-test_cms.t | 47 +- .../test/recipes/80-test_cms_data/dh-cert.pem | 31 + .../test/recipes/80-test_cms_data/dh-key.pem | 15 + .../test/recipes/80-test_cms_data/dh-malformed.der | Bin 0 -> 558 bytes .../test/recipes/80-test_cms_data/ecdh-cert.pem | 10 + .../test/recipes/80-test_cms_data/ecdh-key.pem | 5 + .../recipes/80-test_cms_data/ecdh-malformed.der | Bin 0 -> 275 bytes .../recipes/80-test_cms_data/rsa-malformed.der | Bin 0 -> 526 bytes crypto/openssl/test/recipes/80-test_ocsp.t | 16 +- crypto/openssl/test/sslapitest.c | 98 ++- crypto/openssl/test/tls-provider.c | 5 +- crypto/openssl/test/tls13groupselection_test.c | 39 +- crypto/openssl/util/checkplatformsyms.pl | 40 +- crypto/openssl/util/missingcrypto.txt | 2 - crypto/openssl/util/mkerr.pl | 77 +- crypto/openssl/util/mkinstallvars.pl | 5 +- .../util/platform_symbols/windows-symbols.txt | 339 ++++----- crypto/openssl/util/wrap.pl.in | 1 + 256 files changed, 3690 insertions(+), 2012 deletions(-) diff --cc crypto/openssl/CONTRIBUTING.md index 09416095e64d,000000000000..06dfbaeff1fe mode 100644,000000..100644 --- a/crypto/openssl/CONTRIBUTING.md +++ b/crypto/openssl/CONTRIBUTING.md @@@ -1,112 -1,0 +1,124 @@@ +HOW TO CONTRIBUTE TO OpenSSL +============================ + +Please visit our [Getting Started] page for other ideas about how to contribute. + + [Getting Started]: + +Development is done on GitHub in the [openssl/openssl] repository. + + [openssl/openssl]: + +To request a new feature, ask a question, or report a bug, +please open an [issue on GitHub](https://github.com/openssl/openssl/issues). + +To submit a patch or implement a new feature, please open a +[pull request on GitHub](https://github.com/openssl/openssl/pulls). +If you are thinking of making a large contribution, +open an issue for it before starting work, to get comments from the community. +Someone may be already working on the same thing, +or there may be special reasons why a feature is not implemented. + +Similarly, if you plan to submit many pull requests, please start with +a representative sample (no more than 3 or 4) and open an issue +explaining your process. The OpenSSL project has limited resources, +especially when it comes to reviewers, so we appreciate advanced +communication before submitting many pull requests. In addition, +contributors should personally evaluate potential patches generated by +automated tools. + ++Provide a clear description of the issue or feature being addressed, ++including any relevant implementation details and, for performance ++improvements, benchmark results. ++ ++Pull requests and commits should be self-contained, enabling readers to ++understand what changed and why without needing to reference related ++issues or having prior knowledge. Commit messages should include all ++relevant details to help future contributors follow the git history, ++with clear explanations of what is changing and why. Long descriptions ++are encouraged if they aid understanding. Commit message titles (their ++first line) should be kept to 50-70 characters if possible. ++ +To make it easier to review and accept your pull request, please follow these +guidelines: + + 1. Anything other than a trivial contribution requires a [Contributor + License Agreement] (CLA), giving us permission to use your code. + If your contribution is too small to require a CLA (e.g., fixing a spelling + mistake), then place the text "`CLA: trivial`" on a line by itself below + the rest of your commit message separated by an empty line, like this: + + ``` + One-line summary of trivial change + + Optional main body of commit message. It might contain a sentence + or two explaining the trivial change. + + CLA: trivial + ``` + + It is not sufficient to only place the text "`CLA: trivial`" in the GitHub + pull request description. + + [Contributor License Agreement]: + + To amend a missing "`CLA: trivial`" line after submission, do the following: + + ``` + git commit --amend + # add the line, save and quit the editor + git push -f [ []] + ``` + + 2. All source files should start with the following text (with + appropriate comment characters at the start of each line and the + year(s) updated): + + ``` + Copyright 20xx-20yy The OpenSSL Project Authors. All Rights Reserved. + + Licensed under the Apache License 2.0 (the "License"). You may not use + this file except in compliance with the License. You can obtain a copy + in the file LICENSE in the source distribution or at + https://www.openssl.org/source/license.html + ``` + + 3. Patches should be as current as possible; expect to have to rebase + often. We do not accept merge commits, you will have to remove them + (usually by rebasing) before it will be acceptable. + + 4. Code provided should follow our [coding style] and [documentation policy] + and compile without warnings. + There is a [Perl tool](util/check-format.pl) that helps + finding code formatting mistakes and other coding style nits. + Where `gcc` or `clang` is available, you should use the + `--strict-warnings` `Configure` option. OpenSSL compiles on many varied + platforms: try to ensure you only use portable features. + Clean builds via GitHub Actions are required. They are started automatically + whenever a PR is created or updated by committers. + + [coding style]: https://openssl-library.org/policies/technical/coding-style/ + [documentation policy]: https://openssl-library.org/policies/technical/documentation-policy/ + + 5. When at all possible, code contributions should include tests. These can + either be added to an existing test, or completely new. Please see + [test/README.md](test/README.md) for information on the test framework. + + 6. New features or changed functionality must include + documentation. Please look at the `.pod` files in `doc/man[1357]` for + examples of our style. Run `make doc-nits` to make sure that your + documentation changes are clean. + + 7. For user visible changes (API changes, behaviour changes, ...), + consider adding a note in [CHANGES.md](CHANGES.md). + This could be a summarising description of the change, and could + explain the grander details. + Have a look through existing entries for inspiration. + Please note that this is NOT simply a copy of git-log one-liners. + Also note that security fixes get an entry in [CHANGES.md](CHANGES.md). + This file helps users get more in-depth information of what comes + with a specific release without having to sift through the higher + noise ratio in git-log. + + 8. Guidelines on how to integrate error output of new crypto library modules + can be found in [crypto/err/README.md](crypto/err/README.md). diff --cc crypto/openssl/crypto/bn/asm/armv4-gf2m.pl index 5733a0174660,923e6d4464d2..923e6d4464d2 mode 100755,100644..100755 --- a/crypto/openssl/crypto/bn/asm/armv4-gf2m.pl +++ b/crypto/openssl/crypto/bn/asm/armv4-gf2m.pl diff --cc crypto/openssl/crypto/bn/asm/sparcv9-mont.pl index fe51fcaf81c7,d438af562648..d438af562648 mode 100755,100644..100755 --- a/crypto/openssl/crypto/bn/asm/sparcv9-mont.pl +++ b/crypto/openssl/crypto/bn/asm/sparcv9-mont.pl diff --cc crypto/openssl/crypto/modes/asm/ghash-armv4.pl index 044f86f143f9,4ab6d8cb2b42..4ab6d8cb2b42 mode 100755,100644..100755 --- a/crypto/openssl/crypto/modes/asm/ghash-armv4.pl +++ b/crypto/openssl/crypto/modes/asm/ghash-armv4.pl diff --cc crypto/openssl/doc/man3/X509V3_EXT_print.pod index 000000000000,0727d35f88e5..0727d35f88e5 mode 000000,100644..100644 --- a/crypto/openssl/doc/man3/X509V3_EXT_print.pod +++ b/crypto/openssl/doc/man3/X509V3_EXT_print.pod diff --cc crypto/openssl/test/certs/cve-2026-28388-ca.pem index 000000000000,9e36d11c4b4b..9e36d11c4b4b mode 000000,100644..100644 --- a/crypto/openssl/test/certs/cve-2026-28388-ca.pem +++ b/crypto/openssl/test/certs/cve-2026-28388-ca.pem diff --cc crypto/openssl/test/certs/cve-2026-28388-crls.pem index 000000000000,46cbd7876dcd..46cbd7876dcd mode 000000,100644..100644 --- a/crypto/openssl/test/certs/cve-2026-28388-crls.pem +++ b/crypto/openssl/test/certs/cve-2026-28388-crls.pem diff --cc crypto/openssl/test/certs/cve-2026-28388-leaf.pem index 000000000000,02b22997cdd8..02b22997cdd8 mode 000000,100644..100644 --- a/crypto/openssl/test/certs/cve-2026-28388-leaf.pem +++ b/crypto/openssl/test/certs/cve-2026-28388-leaf.pem diff --cc crypto/openssl/test/certs/ext-timeSpecification-periodic-no-second.pem index 000000000000,9b23ddbb162c..9b23ddbb162c mode 000000,100644..100644 --- a/crypto/openssl/test/certs/ext-timeSpecification-periodic-no-second.pem +++ b/crypto/openssl/test/certs/ext-timeSpecification-periodic-no-second.pem diff --cc crypto/openssl/test/recipes/80-test_cms_data/dh-cert.pem index 000000000000,f5fb90b9009b..f5fb90b9009b mode 000000,100644..100644 --- a/crypto/openssl/test/recipes/80-test_cms_data/dh-cert.pem +++ b/crypto/openssl/test/recipes/80-test_cms_data/dh-cert.pem diff --cc crypto/openssl/test/recipes/80-test_cms_data/dh-key.pem index 000000000000,16010785214e..16010785214e mode 000000,100644..100644 --- a/crypto/openssl/test/recipes/80-test_cms_data/dh-key.pem +++ b/crypto/openssl/test/recipes/80-test_cms_data/dh-key.pem diff --cc crypto/openssl/test/recipes/80-test_cms_data/dh-malformed.der index 000000000000,20a5ed84bde9..20a5ed84bde9 mode 000000,100644..100644 Binary files differ diff --cc crypto/openssl/test/recipes/80-test_cms_data/ecdh-cert.pem index 000000000000,3a0ab6624ca2..3a0ab6624ca2 mode 000000,100644..100644 --- a/crypto/openssl/test/recipes/80-test_cms_data/ecdh-cert.pem +++ b/crypto/openssl/test/recipes/80-test_cms_data/ecdh-cert.pem diff --cc crypto/openssl/test/recipes/80-test_cms_data/ecdh-key.pem index 000000000000,ef9488b3c516..ef9488b3c516 mode 000000,100644..100644 --- a/crypto/openssl/test/recipes/80-test_cms_data/ecdh-key.pem +++ b/crypto/openssl/test/recipes/80-test_cms_data/ecdh-key.pem diff --cc crypto/openssl/test/recipes/80-test_cms_data/ecdh-malformed.der index 000000000000,14ddc1dea290..14ddc1dea290 mode 000000,100644..100644 Binary files differ diff --cc crypto/openssl/test/recipes/80-test_cms_data/rsa-malformed.der index 000000000000,4182a465ce79..4182a465ce79 mode 000000,100644..100644 Binary files differ From nobody Thu Apr 9 01:56:22 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4frjhk5vz0z6YCK1 for ; Thu, 09 Apr 2026 01:56: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4frjhk3PGDz3Pt3 for ; Thu, 09 Apr 2026 01:56:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775699782; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wfW422BNLSUvn5orU/s1ed0xQwo9Yxe7a2mtuxrhxGc=; b=ymO4k32xv6T9r1pE/BPC3MEOQNZhLc4txP6sj6hHlycCsdtrVMk0M1k98AEQ9yhn7bWYqI Tsf58P62hsiEEqBzBSkuWpV57Z4H3a270MFCTK0Cu3mysZ1jvNmfR6ylxKI+HUrHQmSm8K rOTslfEjPkK+JUD29zp8ubX00VksS6ChSKX5Eh98qh4MOWXlMVlahgy4MglatYRUjBf2FU N9eTNpcMUEI3yw5Fiv75tmdm4kpR8I75R5a9u3PqFvWlKH901bBRk4mbE63sGzXUfVOvsM z1OrlyAFiBi4+pEmqF4m+D5PZhDb1CRanCFZPYOcwUTtmEALFbFQL5cUviBOdw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775699782; a=rsa-sha256; cv=none; b=upovkcdhhZYbyUpjHMqo6RY1qOJ/5AU5CstSUigUc19BgnEx0nUMkfGtHPphaatpeya8cC BJ+VtUA3sOPaNQqw75gZGbt5F9Uo3DlSaJx0YFr7ekZ+yWzmzpkaIHZOIp9yp/6PW8SK4n lYLgp9DRHKKJJlIHfeSpxpMz3KgUM8v8Z4mNW2NoSBUpHjMMN0jibQyE5CcPU9nvW8fBPw QYbRp7mVSxMDYbxWoQjE8zh8jnydE0jfcdCvHtrrYNXnSwZvpgpCmkErocQgm7kzLn/owU 9f8uMU1qu7mjjKM3zkt8gwfdGDerspESgTpEfQdCZj7b28LyRjm21rVozh1p2Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775699782; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wfW422BNLSUvn5orU/s1ed0xQwo9Yxe7a2mtuxrhxGc=; b=aSUGXa3oW8r11A9RKN07I+YLEqr6eOHWdJ3eUc2zNxM1rDwONmY/o8R/ywp6EV9MkJXdi4 WYmRqsC+wWW9Q5SfrF/2UpzVa3c2NLs8k5FVs7ieBQ0Sov8RpadEQWxWVdUcal9tlblzXY /VeoOwOwUqPOZbn9vS6ygrnKXTsEXQ9ui392/eGD3Yx44SZ/rVKug67h3ykfTvWe+9l4qM Af6g7bdX69/NxJC9HAUNTzWv7L/uIvzKJYoy6wj9nFoUj9320SOkMptVMYNhI6ULN9NJwr fxqSiV34GG02XzPr0oy8kGs0sIRmYDIYsYmL+GimbPQuk4MsHh/3onYUREc3Vg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4frjhk2XMfzsdK for ; Thu, 09 Apr 2026 01:56:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3e99a by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 09 Apr 2026 01:56:22 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Enji Cooper Subject: git: 5254e16213ff - main - crypto/openssl: update artifacts to match 3.5.6 release artifacts List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: 5254e16213ff1bb136ef24e0b0fe30625ac53563 Auto-Submitted: auto-generated Date: Thu, 09 Apr 2026 01:56:22 +0000 Message-Id: <69d70746.3e99a.8766b22@gitrepo.freebsd.org> The branch main has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=5254e16213ff1bb136ef24e0b0fe30625ac53563 commit 5254e16213ff1bb136ef24e0b0fe30625ac53563 Author: Enji Cooper AuthorDate: 2026-04-09 01:54:40 +0000 Commit: Enji Cooper CommitDate: 2026-04-09 01:55:43 +0000 crypto/openssl: update artifacts to match 3.5.6 release artifacts A new manpage and any associated links will be added in the next commit. MFC after: 1 day (the security issues warrant a quick backport). MFC with: 10a428653ee7216475f1ddce3fb4cbf1200319f8 --- crypto/openssl/exporters/libcrypto.pc | 3 +- crypto/openssl/exporters/libssl.pc | 3 +- crypto/openssl/exporters/openssl.pc | 3 +- crypto/openssl/include/openssl/cmp.h | 4 +- crypto/openssl/include/openssl/opensslv.h | 10 +- secure/lib/libcrypto/man/man3/ADMISSIONS.3 | 6 +- secure/lib/libcrypto/man/man3/ASN1_EXTERN_FUNCS.3 | 2 +- .../libcrypto/man/man3/ASN1_INTEGER_get_int64.3 | 2 +- secure/lib/libcrypto/man/man3/ASN1_INTEGER_new.3 | 2 +- secure/lib/libcrypto/man/man3/ASN1_ITEM_lookup.3 | 2 +- secure/lib/libcrypto/man/man3/ASN1_OBJECT_new.3 | 2 +- .../lib/libcrypto/man/man3/ASN1_STRING_TABLE_add.3 | 2 +- secure/lib/libcrypto/man/man3/ASN1_STRING_length.3 | 2 +- secure/lib/libcrypto/man/man3/ASN1_STRING_new.3 | 2 +- .../lib/libcrypto/man/man3/ASN1_STRING_print_ex.3 | 2 +- secure/lib/libcrypto/man/man3/ASN1_TIME_set.3 | 2 +- secure/lib/libcrypto/man/man3/ASN1_TYPE_get.3 | 2 +- secure/lib/libcrypto/man/man3/ASN1_aux_cb.3 | 2 +- .../lib/libcrypto/man/man3/ASN1_generate_nconf.3 | 2 +- secure/lib/libcrypto/man/man3/ASN1_item_d2i_bio.3 | 2 +- secure/lib/libcrypto/man/man3/ASN1_item_new.3 | 2 +- secure/lib/libcrypto/man/man3/ASN1_item_sign.3 | 2 +- secure/lib/libcrypto/man/man3/ASYNC_WAIT_CTX_new.3 | 2 +- secure/lib/libcrypto/man/man3/ASYNC_start_job.3 | 2 +- secure/lib/libcrypto/man/man3/BF_encrypt.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_ADDR.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_ADDRINFO.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_connect.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_ctrl.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_f_base64.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_f_buffer.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_f_cipher.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_f_md.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_f_null.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_f_prefix.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_f_readbuffer.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_f_ssl.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_find_type.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_get_data.3 | 12 +- .../lib/libcrypto/man/man3/BIO_get_ex_new_index.3 | 2 +- .../libcrypto/man/man3/BIO_get_rpoll_descriptor.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_meth_new.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_new.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_new_CMS.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_parse_hostserv.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_printf.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_push.3 | 6 +- secure/lib/libcrypto/man/man3/BIO_read.3 | 8 +- secure/lib/libcrypto/man/man3/BIO_s_accept.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_s_bio.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_s_connect.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_s_core.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_s_datagram.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_s_dgram_pair.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_s_fd.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_s_file.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_s_mem.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_s_null.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_s_socket.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_sendmmsg.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_set_callback.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_set_flags.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_should_retry.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_socket_wait.3 | 2 +- secure/lib/libcrypto/man/man3/BN_BLINDING_new.3 | 2 +- secure/lib/libcrypto/man/man3/BN_CTX_new.3 | 2 +- secure/lib/libcrypto/man/man3/BN_CTX_start.3 | 2 +- secure/lib/libcrypto/man/man3/BN_add.3 | 2 +- secure/lib/libcrypto/man/man3/BN_add_word.3 | 2 +- secure/lib/libcrypto/man/man3/BN_bn2bin.3 | 2 +- secure/lib/libcrypto/man/man3/BN_cmp.3 | 2 +- secure/lib/libcrypto/man/man3/BN_copy.3 | 2 +- secure/lib/libcrypto/man/man3/BN_generate_prime.3 | 2 +- secure/lib/libcrypto/man/man3/BN_mod_exp_mont.3 | 2 +- secure/lib/libcrypto/man/man3/BN_mod_inverse.3 | 2 +- .../lib/libcrypto/man/man3/BN_mod_mul_montgomery.3 | 2 +- .../lib/libcrypto/man/man3/BN_mod_mul_reciprocal.3 | 2 +- secure/lib/libcrypto/man/man3/BN_new.3 | 2 +- secure/lib/libcrypto/man/man3/BN_num_bytes.3 | 2 +- secure/lib/libcrypto/man/man3/BN_rand.3 | 2 +- secure/lib/libcrypto/man/man3/BN_security_bits.3 | 2 +- secure/lib/libcrypto/man/man3/BN_set_bit.3 | 2 +- secure/lib/libcrypto/man/man3/BN_swap.3 | 2 +- secure/lib/libcrypto/man/man3/BN_zero.3 | 2 +- secure/lib/libcrypto/man/man3/BUF_MEM_new.3 | 2 +- secure/lib/libcrypto/man/man3/CMAC_CTX.3 | 2 +- .../libcrypto/man/man3/CMS_EncryptedData_decrypt.3 | 2 +- .../libcrypto/man/man3/CMS_EncryptedData_encrypt.3 | 2 +- .../man/man3/CMS_EncryptedData_set1_key.3 | 2 +- .../libcrypto/man/man3/CMS_EnvelopedData_create.3 | 2 +- secure/lib/libcrypto/man/man3/CMS_add0_cert.3 | 2 +- .../libcrypto/man/man3/CMS_add1_recipient_cert.3 | 2 +- secure/lib/libcrypto/man/man3/CMS_add1_signer.3 | 2 +- secure/lib/libcrypto/man/man3/CMS_compress.3 | 2 +- secure/lib/libcrypto/man/man3/CMS_data_create.3 | 2 +- secure/lib/libcrypto/man/man3/CMS_decrypt.3 | 2 +- secure/lib/libcrypto/man/man3/CMS_digest_create.3 | 2 +- secure/lib/libcrypto/man/man3/CMS_encrypt.3 | 2 +- secure/lib/libcrypto/man/man3/CMS_final.3 | 2 +- .../libcrypto/man/man3/CMS_get0_RecipientInfos.3 | 2 +- .../lib/libcrypto/man/man3/CMS_get0_SignerInfos.3 | 2 +- secure/lib/libcrypto/man/man3/CMS_get0_type.3 | 2 +- .../libcrypto/man/man3/CMS_get1_ReceiptRequest.3 | 2 +- secure/lib/libcrypto/man/man3/CMS_sign.3 | 2 +- secure/lib/libcrypto/man/man3/CMS_sign_receipt.3 | 2 +- .../lib/libcrypto/man/man3/CMS_signed_get_attr.3 | 2 +- secure/lib/libcrypto/man/man3/CMS_uncompress.3 | 2 +- secure/lib/libcrypto/man/man3/CMS_verify.3 | 2 +- secure/lib/libcrypto/man/man3/CMS_verify_receipt.3 | 2 +- secure/lib/libcrypto/man/man3/COMP_CTX_new.3 | 2 +- secure/lib/libcrypto/man/man3/CONF_modules_free.3 | 2 +- .../libcrypto/man/man3/CONF_modules_load_file.3 | 2 +- .../libcrypto/man/man3/CRYPTO_THREAD_run_once.3 | 2 +- .../libcrypto/man/man3/CRYPTO_get_ex_new_index.3 | 2 +- secure/lib/libcrypto/man/man3/CRYPTO_memcmp.3 | 2 +- .../man/man3/CTLOG_STORE_get0_log_by_id.3 | 2 +- secure/lib/libcrypto/man/man3/CTLOG_STORE_new.3 | 2 +- secure/lib/libcrypto/man/man3/CTLOG_new.3 | 2 +- .../libcrypto/man/man3/CT_POLICY_EVAL_CTX_new.3 | 2 +- secure/lib/libcrypto/man/man3/DEFINE_STACK_OF.3 | 2 +- secure/lib/libcrypto/man/man3/DES_random_key.3 | 2 +- secure/lib/libcrypto/man/man3/DH_generate_key.3 | 2 +- .../libcrypto/man/man3/DH_generate_parameters.3 | 2 +- secure/lib/libcrypto/man/man3/DH_get0_pqg.3 | 2 +- secure/lib/libcrypto/man/man3/DH_get_1024_160.3 | 2 +- secure/lib/libcrypto/man/man3/DH_meth_new.3 | 2 +- secure/lib/libcrypto/man/man3/DH_new.3 | 2 +- secure/lib/libcrypto/man/man3/DH_new_by_nid.3 | 2 +- secure/lib/libcrypto/man/man3/DH_set_method.3 | 2 +- secure/lib/libcrypto/man/man3/DH_size.3 | 2 +- secure/lib/libcrypto/man/man3/DSA_SIG_new.3 | 2 +- secure/lib/libcrypto/man/man3/DSA_do_sign.3 | 2 +- secure/lib/libcrypto/man/man3/DSA_dup_DH.3 | 2 +- secure/lib/libcrypto/man/man3/DSA_generate_key.3 | 2 +- .../libcrypto/man/man3/DSA_generate_parameters.3 | 2 +- secure/lib/libcrypto/man/man3/DSA_get0_pqg.3 | 2 +- secure/lib/libcrypto/man/man3/DSA_meth_new.3 | 2 +- secure/lib/libcrypto/man/man3/DSA_new.3 | 2 +- secure/lib/libcrypto/man/man3/DSA_set_method.3 | 2 +- secure/lib/libcrypto/man/man3/DSA_sign.3 | 2 +- secure/lib/libcrypto/man/man3/DSA_size.3 | 2 +- secure/lib/libcrypto/man/man3/DTLS_get_data_mtu.3 | 2 +- secure/lib/libcrypto/man/man3/DTLS_set_timer_cb.3 | 2 +- secure/lib/libcrypto/man/man3/DTLSv1_get_timeout.3 | 2 +- .../lib/libcrypto/man/man3/DTLSv1_handle_timeout.3 | 2 +- secure/lib/libcrypto/man/man3/DTLSv1_listen.3 | 2 +- secure/lib/libcrypto/man/man3/ECDSA_SIG_new.3 | 2 +- secure/lib/libcrypto/man/man3/ECDSA_sign.3 | 2 +- .../lib/libcrypto/man/man3/ECPKParameters_print.3 | 2 +- .../lib/libcrypto/man/man3/EC_GFp_simple_method.3 | 2 +- secure/lib/libcrypto/man/man3/EC_GROUP_copy.3 | 2 +- secure/lib/libcrypto/man/man3/EC_GROUP_new.3 | 2 +- .../lib/libcrypto/man/man3/EC_KEY_get_enc_flags.3 | 2 +- secure/lib/libcrypto/man/man3/EC_KEY_new.3 | 2 +- secure/lib/libcrypto/man/man3/EC_POINT_add.3 | 2 +- secure/lib/libcrypto/man/man3/EC_POINT_new.3 | 2 +- secure/lib/libcrypto/man/man3/ENGINE_add.3 | 2 +- secure/lib/libcrypto/man/man3/ERR_GET_LIB.3 | 2 +- secure/lib/libcrypto/man/man3/ERR_clear_error.3 | 2 +- secure/lib/libcrypto/man/man3/ERR_error_string.3 | 2 +- secure/lib/libcrypto/man/man3/ERR_get_error.3 | 2 +- .../libcrypto/man/man3/ERR_load_crypto_strings.3 | 2 +- secure/lib/libcrypto/man/man3/ERR_load_strings.3 | 2 +- secure/lib/libcrypto/man/man3/ERR_new.3 | 2 +- secure/lib/libcrypto/man/man3/ERR_print_errors.3 | 2 +- secure/lib/libcrypto/man/man3/ERR_put_error.3 | 2 +- secure/lib/libcrypto/man/man3/ERR_remove_state.3 | 2 +- secure/lib/libcrypto/man/man3/ERR_set_mark.3 | 2 +- .../lib/libcrypto/man/man3/EVP_ASYM_CIPHER_free.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_BytesToKey.3 | 2 +- .../man/man3/EVP_CIPHER_CTX_get_app_data.3 | 2 +- .../man/man3/EVP_CIPHER_CTX_get_cipher_data.3 | 2 +- .../man/man3/EVP_CIPHER_CTX_get_original_iv.3 | 2 +- .../lib/libcrypto/man/man3/EVP_CIPHER_meth_new.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_DigestInit.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_DigestSignInit.3 | 2 +- .../lib/libcrypto/man/man3/EVP_DigestVerifyInit.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_EncodeInit.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_EncryptInit.3 | 12 +- secure/lib/libcrypto/man/man3/EVP_KDF.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_KEM_free.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_KEYEXCH_free.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_KEYMGMT.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_MAC.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_MD_meth_new.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_OpenInit.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_PBE_CipherInit.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_PKEY2PKCS8.3 | 2 +- .../lib/libcrypto/man/man3/EVP_PKEY_ASN1_METHOD.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_PKEY_CTX_ctrl.3 | 2 +- .../libcrypto/man/man3/EVP_PKEY_CTX_get0_libctx.3 | 2 +- .../libcrypto/man/man3/EVP_PKEY_CTX_get0_pkey.3 | 2 +- .../libcrypto/man/man3/EVP_PKEY_CTX_get_algor.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_PKEY_CTX_new.3 | 2 +- .../man/man3/EVP_PKEY_CTX_set1_pbe_pass.3 | 2 +- .../libcrypto/man/man3/EVP_PKEY_CTX_set_hkdf_md.3 | 2 +- .../libcrypto/man/man3/EVP_PKEY_CTX_set_params.3 | 2 +- .../man/man3/EVP_PKEY_CTX_set_rsa_pss_keygen_md.3 | 2 +- .../libcrypto/man/man3/EVP_PKEY_CTX_set_scrypt_N.3 | 2 +- .../man/man3/EVP_PKEY_CTX_set_tls1_prf_md.3 | 2 +- .../libcrypto/man/man3/EVP_PKEY_asn1_get_count.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_PKEY_check.3 | 2 +- .../libcrypto/man/man3/EVP_PKEY_copy_parameters.3 | 2 +- .../lib/libcrypto/man/man3/EVP_PKEY_decapsulate.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_PKEY_decrypt.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_PKEY_derive.3 | 2 +- .../man/man3/EVP_PKEY_digestsign_supports_digest.3 | 2 +- .../lib/libcrypto/man/man3/EVP_PKEY_encapsulate.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_PKEY_encrypt.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_PKEY_fromdata.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_PKEY_get_attr.3 | 2 +- .../man/man3/EVP_PKEY_get_default_digest_nid.3 | 2 +- .../libcrypto/man/man3/EVP_PKEY_get_field_type.3 | 2 +- .../libcrypto/man/man3/EVP_PKEY_get_group_name.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_PKEY_get_size.3 | 2 +- .../libcrypto/man/man3/EVP_PKEY_gettable_params.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_PKEY_is_a.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_PKEY_keygen.3 | 2 +- .../libcrypto/man/man3/EVP_PKEY_meth_get_count.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_PKEY_meth_new.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_PKEY_new.3 | 2 +- .../libcrypto/man/man3/EVP_PKEY_print_private.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_PKEY_set1_RSA.3 | 2 +- .../man/man3/EVP_PKEY_set1_encoded_public_key.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_PKEY_set_type.3 | 2 +- .../libcrypto/man/man3/EVP_PKEY_settable_params.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_PKEY_sign.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_PKEY_todata.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_PKEY_verify.3 | 2 +- .../libcrypto/man/man3/EVP_PKEY_verify_recover.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_RAND.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_SIGNATURE.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_SKEY.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_SKEYMGMT.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_SealInit.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_SignInit.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_VerifyInit.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_aes_128_gcm.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_aria_128_gcm.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_bf_cbc.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_blake2b512.3 | 2 +- .../lib/libcrypto/man/man3/EVP_camellia_128_ecb.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_cast5_cbc.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_chacha20.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_des_cbc.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_desx_cbc.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_idea_cbc.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_md2.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_md4.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_md5.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_mdc2.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_rc2_cbc.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_rc4.3 | 2 +- .../lib/libcrypto/man/man3/EVP_rc5_32_12_16_cbc.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_ripemd160.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_seed_cbc.3 | 2 +- .../man/man3/EVP_set_default_properties.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_sha1.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_sha224.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_sha3_224.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_sm3.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_sm4_cbc.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_whirlpool.3 | 2 +- secure/lib/libcrypto/man/man3/GENERAL_NAME.3 | 2 +- secure/lib/libcrypto/man/man3/HMAC.3 | 2 +- secure/lib/libcrypto/man/man3/MD5.3 | 2 +- secure/lib/libcrypto/man/man3/MDC2_Init.3 | 2 +- secure/lib/libcrypto/man/man3/NCONF_new_ex.3 | 2 +- secure/lib/libcrypto/man/man3/OBJ_nid2obj.3 | 2 +- secure/lib/libcrypto/man/man3/OCSP_REQUEST_new.3 | 2 +- secure/lib/libcrypto/man/man3/OCSP_cert_to_id.3 | 2 +- .../libcrypto/man/man3/OCSP_request_add1_nonce.3 | 2 +- .../lib/libcrypto/man/man3/OCSP_resp_find_status.3 | 2 +- .../lib/libcrypto/man/man3/OCSP_response_status.3 | 2 +- secure/lib/libcrypto/man/man3/OCSP_sendreq_new.3 | 2 +- secure/lib/libcrypto/man/man3/OPENSSL_Applink.3 | 2 +- secure/lib/libcrypto/man/man3/OPENSSL_FILE.3 | 2 +- .../lib/libcrypto/man/man3/OPENSSL_LH_COMPFUNC.3 | 2 +- secure/lib/libcrypto/man/man3/OPENSSL_LH_stats.3 | 2 +- secure/lib/libcrypto/man/man3/OPENSSL_config.3 | 2 +- .../lib/libcrypto/man/man3/OPENSSL_fork_prepare.3 | 2 +- secure/lib/libcrypto/man/man3/OPENSSL_gmtime.3 | 2 +- .../lib/libcrypto/man/man3/OPENSSL_hexchar2int.3 | 2 +- secure/lib/libcrypto/man/man3/OPENSSL_ia32cap.3 | 2 +- .../lib/libcrypto/man/man3/OPENSSL_init_crypto.3 | 2 +- secure/lib/libcrypto/man/man3/OPENSSL_init_ssl.3 | 2 +- .../libcrypto/man/man3/OPENSSL_instrument_bus.3 | 2 +- .../man/man3/OPENSSL_load_builtin_modules.3 | 2 +- .../lib/libcrypto/man/man3/OPENSSL_load_u16_le.3 | 2 +- secure/lib/libcrypto/man/man3/OPENSSL_malloc.3 | 8 +- secure/lib/libcrypto/man/man3/OPENSSL_ppccap.3 | 2 +- secure/lib/libcrypto/man/man3/OPENSSL_riscvcap.3 | 2 +- secure/lib/libcrypto/man/man3/OPENSSL_s390xcap.3 | 2 +- .../lib/libcrypto/man/man3/OPENSSL_secure_malloc.3 | 2 +- secure/lib/libcrypto/man/man3/OPENSSL_strcasecmp.3 | 2 +- secure/lib/libcrypto/man/man3/OSSL_ALGORITHM.3 | 2 +- secure/lib/libcrypto/man/man3/OSSL_CALLBACK.3 | 2 +- secure/lib/libcrypto/man/man3/OSSL_CMP_ATAV_set0.3 | 2 +- secure/lib/libcrypto/man/man3/OSSL_CMP_CTX_new.3 | 13 +- .../man/man3/OSSL_CMP_HDR_get0_transactionID.3 | 2 +- .../libcrypto/man/man3/OSSL_CMP_ITAV_new_caCerts.3 | 2 +- secure/lib/libcrypto/man/man3/OSSL_CMP_ITAV_set0.3 | 2 +- .../libcrypto/man/man3/OSSL_CMP_MSG_get0_header.3 | 2 +- .../libcrypto/man/man3/OSSL_CMP_MSG_http_perform.3 | 2 +- .../lib/libcrypto/man/man3/OSSL_CMP_SRV_CTX_new.3 | 2 +- .../libcrypto/man/man3/OSSL_CMP_STATUSINFO_new.3 | 2 +- .../lib/libcrypto/man/man3/OSSL_CMP_exec_certreq.3 | 2 +- secure/lib/libcrypto/man/man3/OSSL_CMP_log_open.3 | 2 +- .../lib/libcrypto/man/man3/OSSL_CMP_validate_msg.3 | 2 +- .../lib/libcrypto/man/man3/OSSL_CORE_MAKE_FUNC.3 | 2 +- .../libcrypto/man/man3/OSSL_CRMF_MSG_get0_tmpl.3 | 2 +- .../man/man3/OSSL_CRMF_MSG_set0_validity.3 | 2 +- .../man/man3/OSSL_CRMF_MSG_set1_regCtrl_regToken.3 | 2 +- .../man/man3/OSSL_CRMF_MSG_set1_regInfo_certReq.3 | 2 +- secure/lib/libcrypto/man/man3/OSSL_CRMF_pbmp_new.3 | 2 +- secure/lib/libcrypto/man/man3/OSSL_DECODER.3 | 2 +- secure/lib/libcrypto/man/man3/OSSL_DECODER_CTX.3 | 2 +- .../man/man3/OSSL_DECODER_CTX_new_for_pkey.3 | 2 +- .../lib/libcrypto/man/man3/OSSL_DECODER_from_bio.3 | 2 +- secure/lib/libcrypto/man/man3/OSSL_DISPATCH.3 | 2 +- secure/lib/libcrypto/man/man3/OSSL_ENCODER.3 | 2 +- secure/lib/libcrypto/man/man3/OSSL_ENCODER_CTX.3 | 2 +- .../man/man3/OSSL_ENCODER_CTX_new_for_pkey.3 | 2 +- .../lib/libcrypto/man/man3/OSSL_ENCODER_to_bio.3 | 2 +- .../lib/libcrypto/man/man3/OSSL_ERR_STATE_save.3 | 2 +- .../man/man3/OSSL_ESS_check_signing_certs.3 | 2 +- .../libcrypto/man/man3/OSSL_GENERAL_NAMES_print.3 | 2 +- secure/lib/libcrypto/man/man3/OSSL_HPKE_CTX_new.3 | 8 +- secure/lib/libcrypto/man/man3/OSSL_HTTP_REQ_CTX.3 | 2 +- .../lib/libcrypto/man/man3/OSSL_HTTP_parse_url.3 | 2 +- secure/lib/libcrypto/man/man3/OSSL_HTTP_transfer.3 | 2 +- .../lib/libcrypto/man/man3/OSSL_IETF_ATTR_SYNTAX.3 | 2 +- .../man/man3/OSSL_IETF_ATTR_SYNTAX_print.3 | 2 +- .../man/man3/OSSL_INDICATOR_set_callback.3 | 2 +- secure/lib/libcrypto/man/man3/OSSL_ITEM.3 | 2 +- secure/lib/libcrypto/man/man3/OSSL_LIB_CTX.3 | 2 +- .../man/man3/OSSL_LIB_CTX_set_conf_diagnostics.3 | 2 +- secure/lib/libcrypto/man/man3/OSSL_PARAM.3 | 2 +- secure/lib/libcrypto/man/man3/OSSL_PARAM_BLD.3 | 2 +- .../man/man3/OSSL_PARAM_allocate_from_text.3 | 2 +- secure/lib/libcrypto/man/man3/OSSL_PARAM_dup.3 | 2 +- secure/lib/libcrypto/man/man3/OSSL_PARAM_int.3 | 2 +- .../libcrypto/man/man3/OSSL_PARAM_print_to_bio.3 | 2 +- secure/lib/libcrypto/man/man3/OSSL_PROVIDER.3 | 2 +- .../libcrypto/man/man3/OSSL_QUIC_client_method.3 | 2 +- secure/lib/libcrypto/man/man3/OSSL_SELF_TEST_new.3 | 2 +- .../man/man3/OSSL_SELF_TEST_set_callback.3 | 2 +- secure/lib/libcrypto/man/man3/OSSL_STORE_INFO.3 | 2 +- secure/lib/libcrypto/man/man3/OSSL_STORE_LOADER.3 | 2 +- secure/lib/libcrypto/man/man3/OSSL_STORE_SEARCH.3 | 2 +- secure/lib/libcrypto/man/man3/OSSL_STORE_attach.3 | 2 +- secure/lib/libcrypto/man/man3/OSSL_STORE_expect.3 | 2 +- secure/lib/libcrypto/man/man3/OSSL_STORE_open.3 | 2 +- secure/lib/libcrypto/man/man3/OSSL_sleep.3 | 2 +- secure/lib/libcrypto/man/man3/OSSL_trace_enabled.3 | 2 +- .../man/man3/OSSL_trace_get_category_num.3 | 2 +- .../libcrypto/man/man3/OSSL_trace_set_channel.3 | 2 +- .../man/man3/OpenSSL_add_all_algorithms.3 | 2 +- secure/lib/libcrypto/man/man3/OpenSSL_version.3 | 2 +- .../libcrypto/man/man3/PBMAC1_get1_pbkdf2_param.3 | 2 +- .../libcrypto/man/man3/PEM_X509_INFO_read_bio_ex.3 | 2 +- secure/lib/libcrypto/man/man3/PEM_bytes_read_bio.3 | 2 +- secure/lib/libcrypto/man/man3/PEM_read.3 | 2 +- secure/lib/libcrypto/man/man3/PEM_read_CMS.3 | 2 +- .../libcrypto/man/man3/PEM_read_bio_PrivateKey.3 | 2 +- secure/lib/libcrypto/man/man3/PEM_read_bio_ex.3 | 2 +- .../libcrypto/man/man3/PEM_write_bio_CMS_stream.3 | 2 +- .../man/man3/PEM_write_bio_PKCS7_stream.3 | 2 +- .../lib/libcrypto/man/man3/PKCS12_PBE_keyivgen.3 | 2 +- .../man/man3/PKCS12_SAFEBAG_create_cert.3 | 2 +- .../libcrypto/man/man3/PKCS12_SAFEBAG_get0_attrs.3 | 2 +- .../libcrypto/man/man3/PKCS12_SAFEBAG_get1_cert.3 | 2 +- .../libcrypto/man/man3/PKCS12_SAFEBAG_set0_attrs.3 | 2 +- .../libcrypto/man/man3/PKCS12_add1_attr_by_NID.3 | 2 +- .../libcrypto/man/man3/PKCS12_add_CSPName_asc.3 | 2 +- secure/lib/libcrypto/man/man3/PKCS12_add_cert.3 | 2 +- .../man/man3/PKCS12_add_friendlyname_asc.3 | 2 +- .../lib/libcrypto/man/man3/PKCS12_add_localkeyid.3 | 2 +- secure/lib/libcrypto/man/man3/PKCS12_add_safe.3 | 2 +- secure/lib/libcrypto/man/man3/PKCS12_create.3 | 2 +- .../lib/libcrypto/man/man3/PKCS12_decrypt_skey.3 | 2 +- secure/lib/libcrypto/man/man3/PKCS12_gen_mac.3 | 2 +- .../libcrypto/man/man3/PKCS12_get_friendlyname.3 | 2 +- secure/lib/libcrypto/man/man3/PKCS12_init.3 | 2 +- .../libcrypto/man/man3/PKCS12_item_decrypt_d2i.3 | 2 +- .../libcrypto/man/man3/PKCS12_key_gen_utf8_ex.3 | 2 +- secure/lib/libcrypto/man/man3/PKCS12_newpass.3 | 2 +- .../lib/libcrypto/man/man3/PKCS12_pack_p7encdata.3 | 2 +- secure/lib/libcrypto/man/man3/PKCS12_parse.3 | 2 +- secure/lib/libcrypto/man/man3/PKCS5_PBE_keyivgen.3 | 15 +- secure/lib/libcrypto/man/man3/PKCS5_PBKDF2_HMAC.3 | 2 +- secure/lib/libcrypto/man/man3/PKCS7_decrypt.3 | 2 +- secure/lib/libcrypto/man/man3/PKCS7_encrypt.3 | 2 +- .../libcrypto/man/man3/PKCS7_get_octet_string.3 | 2 +- secure/lib/libcrypto/man/man3/PKCS7_sign.3 | 2 +- .../lib/libcrypto/man/man3/PKCS7_sign_add_signer.3 | 2 +- .../lib/libcrypto/man/man3/PKCS7_type_is_other.3 | 2 +- secure/lib/libcrypto/man/man3/PKCS7_verify.3 | 2 +- secure/lib/libcrypto/man/man3/PKCS8_encrypt.3 | 2 +- .../lib/libcrypto/man/man3/PKCS8_pkey_add1_attr.3 | 2 +- secure/lib/libcrypto/man/man3/RAND_add.3 | 2 +- secure/lib/libcrypto/man/man3/RAND_bytes.3 | 2 +- secure/lib/libcrypto/man/man3/RAND_cleanup.3 | 2 +- secure/lib/libcrypto/man/man3/RAND_egd.3 | 2 +- secure/lib/libcrypto/man/man3/RAND_get0_primary.3 | 2 +- secure/lib/libcrypto/man/man3/RAND_load_file.3 | 2 +- secure/lib/libcrypto/man/man3/RAND_set_DRBG_type.3 | 2 +- .../lib/libcrypto/man/man3/RAND_set_rand_method.3 | 2 +- secure/lib/libcrypto/man/man3/RC4_set_key.3 | 2 +- secure/lib/libcrypto/man/man3/RIPEMD160_Init.3 | 2 +- secure/lib/libcrypto/man/man3/RSA_blinding_on.3 | 2 +- secure/lib/libcrypto/man/man3/RSA_check_key.3 | 2 +- secure/lib/libcrypto/man/man3/RSA_generate_key.3 | 2 +- secure/lib/libcrypto/man/man3/RSA_get0_key.3 | 2 +- secure/lib/libcrypto/man/man3/RSA_meth_new.3 | 2 +- secure/lib/libcrypto/man/man3/RSA_new.3 | 2 +- .../man/man3/RSA_padding_add_PKCS1_type_1.3 | 2 +- secure/lib/libcrypto/man/man3/RSA_print.3 | 2 +- .../lib/libcrypto/man/man3/RSA_private_encrypt.3 | 2 +- secure/lib/libcrypto/man/man3/RSA_public_encrypt.3 | 2 +- secure/lib/libcrypto/man/man3/RSA_set_method.3 | 12 +- secure/lib/libcrypto/man/man3/RSA_sign.3 | 2 +- .../man/man3/RSA_sign_ASN1_OCTET_STRING.3 | 2 +- secure/lib/libcrypto/man/man3/RSA_size.3 | 2 +- secure/lib/libcrypto/man/man3/SCT_new.3 | 2 +- secure/lib/libcrypto/man/man3/SCT_print.3 | 2 +- secure/lib/libcrypto/man/man3/SCT_validate.3 | 2 +- secure/lib/libcrypto/man/man3/SHA256_Init.3 | 2 +- secure/lib/libcrypto/man/man3/SMIME_read_ASN1.3 | 2 +- secure/lib/libcrypto/man/man3/SMIME_read_CMS.3 | 2 +- secure/lib/libcrypto/man/man3/SMIME_read_PKCS7.3 | 2 +- secure/lib/libcrypto/man/man3/SMIME_write_ASN1.3 | 2 +- secure/lib/libcrypto/man/man3/SMIME_write_CMS.3 | 2 +- secure/lib/libcrypto/man/man3/SMIME_write_PKCS7.3 | 2 +- secure/lib/libcrypto/man/man3/SRP_Calc_B.3 | 2 +- secure/lib/libcrypto/man/man3/SRP_VBASE_new.3 | 2 +- .../lib/libcrypto/man/man3/SRP_create_verifier.3 | 2 +- secure/lib/libcrypto/man/man3/SRP_user_pwd_new.3 | 2 +- .../lib/libcrypto/man/man3/SSL_CIPHER_get_name.3 | 2 +- .../man/man3/SSL_COMP_add_compression_method.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_CONF_CTX_new.3 | 2 +- .../libcrypto/man/man3/SSL_CONF_CTX_set1_prefix.3 | 2 +- .../libcrypto/man/man3/SSL_CONF_CTX_set_flags.3 | 2 +- .../libcrypto/man/man3/SSL_CONF_CTX_set_ssl_ctx.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_CONF_cmd.3 | 20 +- secure/lib/libcrypto/man/man3/SSL_CONF_cmd_argv.3 | 2 +- .../libcrypto/man/man3/SSL_CTX_add1_chain_cert.3 | 2 +- .../man/man3/SSL_CTX_add_extra_chain_cert.3 | 2 +- .../lib/libcrypto/man/man3/SSL_CTX_add_session.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_CTX_config.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_CTX_ctrl.3 | 2 +- .../lib/libcrypto/man/man3/SSL_CTX_dane_enable.3 | 2 +- .../libcrypto/man/man3/SSL_CTX_flush_sessions.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_CTX_free.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_CTX_get0_param.3 | 2 +- .../libcrypto/man/man3/SSL_CTX_get_verify_mode.3 | 2 +- .../man/man3/SSL_CTX_has_client_custom_ext.3 | 2 +- .../man/man3/SSL_CTX_load_verify_locations.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_CTX_new.3 | 2 +- .../lib/libcrypto/man/man3/SSL_CTX_sess_number.3 | 2 +- .../man/man3/SSL_CTX_sess_set_cache_size.3 | 2 +- .../libcrypto/man/man3/SSL_CTX_sess_set_get_cb.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_CTX_sessions.3 | 2 +- .../lib/libcrypto/man/man3/SSL_CTX_set0_CA_list.3 | 2 +- .../man/man3/SSL_CTX_set1_cert_comp_preference.3 | 2 +- .../lib/libcrypto/man/man3/SSL_CTX_set1_curves.3 | 127 +++- .../lib/libcrypto/man/man3/SSL_CTX_set1_sigalgs.3 | 2 +- .../man/man3/SSL_CTX_set1_verify_cert_store.3 | 2 +- .../man/man3/SSL_CTX_set_alpn_select_cb.3 | 2 +- .../lib/libcrypto/man/man3/SSL_CTX_set_cert_cb.3 | 2 +- .../libcrypto/man/man3/SSL_CTX_set_cert_store.3 | 2 +- .../man/man3/SSL_CTX_set_cert_verify_callback.3 | 2 +- .../libcrypto/man/man3/SSL_CTX_set_cipher_list.3 | 2 +- .../man/man3/SSL_CTX_set_client_cert_cb.3 | 2 +- .../man/man3/SSL_CTX_set_client_hello_cb.3 | 2 +- .../man/man3/SSL_CTX_set_ct_validation_callback.3 | 2 +- .../man/man3/SSL_CTX_set_ctlog_list_file.3 | 2 +- .../man/man3/SSL_CTX_set_default_passwd_cb.3 | 2 +- .../libcrypto/man/man3/SSL_CTX_set_domain_flags.3 | 2 +- .../man/man3/SSL_CTX_set_generate_session_id.3 | 2 +- .../libcrypto/man/man3/SSL_CTX_set_info_callback.3 | 2 +- .../man/man3/SSL_CTX_set_keylog_callback.3 | 2 +- .../libcrypto/man/man3/SSL_CTX_set_max_cert_list.3 | 2 +- .../man/man3/SSL_CTX_set_min_proto_version.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_CTX_set_mode.3 | 2 +- .../libcrypto/man/man3/SSL_CTX_set_msg_callback.3 | 2 +- .../man/man3/SSL_CTX_set_new_pending_conn_cb.3 | 2 +- .../libcrypto/man/man3/SSL_CTX_set_num_tickets.3 | 2 +- .../lib/libcrypto/man/man3/SSL_CTX_set_options.3 | 2 +- .../man/man3/SSL_CTX_set_psk_client_callback.3 | 12 +- .../man/man3/SSL_CTX_set_quiet_shutdown.3 | 2 +- .../libcrypto/man/man3/SSL_CTX_set_read_ahead.3 | 2 +- .../man/man3/SSL_CTX_set_record_padding_callback.3 | 2 +- .../man/man3/SSL_CTX_set_security_level.3 | 2 +- .../man/man3/SSL_CTX_set_session_cache_mode.3 | 2 +- .../man/man3/SSL_CTX_set_session_id_context.3 | 2 +- .../man/man3/SSL_CTX_set_session_ticket_cb.3 | 2 +- .../man/man3/SSL_CTX_set_split_send_fragment.3 | 2 +- .../libcrypto/man/man3/SSL_CTX_set_srp_password.3 | 2 +- .../libcrypto/man/man3/SSL_CTX_set_ssl_version.3 | 2 +- .../SSL_CTX_set_stateless_cookie_generate_cb.3 | 2 +- .../lib/libcrypto/man/man3/SSL_CTX_set_timeout.3 | 2 +- .../man3/SSL_CTX_set_tlsext_servername_callback.3 | 2 +- .../man/man3/SSL_CTX_set_tlsext_status_cb.3 | 2 +- .../man/man3/SSL_CTX_set_tlsext_ticket_key_cb.3 | 2 +- .../man/man3/SSL_CTX_set_tlsext_use_srtp.3 | 2 +- .../man/man3/SSL_CTX_set_tmp_dh_callback.3 | 2 +- .../lib/libcrypto/man/man3/SSL_CTX_set_tmp_ecdh.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_CTX_set_verify.3 | 2 +- .../libcrypto/man/man3/SSL_CTX_use_certificate.3 | 2 +- .../man/man3/SSL_CTX_use_psk_identity_hint.3 | 2 +- .../libcrypto/man/man3/SSL_CTX_use_serverinfo.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_SESSION_free.3 | 2 +- .../libcrypto/man/man3/SSL_SESSION_get0_cipher.3 | 2 +- .../libcrypto/man/man3/SSL_SESSION_get0_hostname.3 | 2 +- .../man/man3/SSL_SESSION_get0_id_context.3 | 2 +- .../lib/libcrypto/man/man3/SSL_SESSION_get0_peer.3 | 2 +- .../man/man3/SSL_SESSION_get_compress_id.3 | 2 +- .../man/man3/SSL_SESSION_get_protocol_version.3 | 2 +- .../lib/libcrypto/man/man3/SSL_SESSION_get_time.3 | 2 +- .../libcrypto/man/man3/SSL_SESSION_has_ticket.3 | 2 +- .../libcrypto/man/man3/SSL_SESSION_is_resumable.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_SESSION_print.3 | 2 +- .../lib/libcrypto/man/man3/SSL_SESSION_set1_id.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_accept.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_accept_stream.3 | 2 +- .../lib/libcrypto/man/man3/SSL_alert_type_string.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_alloc_buffers.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_check_chain.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_clear.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_connect.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_do_handshake.3 | 2 +- .../man/man3/SSL_export_keying_material.3 | 2 +- .../libcrypto/man/man3/SSL_extension_supported.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_free.3 | 2 +- .../lib/libcrypto/man/man3/SSL_get0_connection.3 | 2 +- .../lib/libcrypto/man/man3/SSL_get0_group_name.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_get0_peer_rpk.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_get0_peer_scts.3 | 2 +- .../libcrypto/man/man3/SSL_get1_builtin_sigalgs.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_get_SSL_CTX.3 | 2 +- .../lib/libcrypto/man/man3/SSL_get_all_async_fds.3 | 2 +- .../lib/libcrypto/man/man3/SSL_get_certificate.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_get_ciphers.3 | 6 +- .../lib/libcrypto/man/man3/SSL_get_client_random.3 | 2 +- .../libcrypto/man/man3/SSL_get_conn_close_info.3 | 2 +- .../libcrypto/man/man3/SSL_get_current_cipher.3 | 2 +- .../libcrypto/man/man3/SSL_get_default_timeout.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_get_error.3 | 2 +- .../lib/libcrypto/man/man3/SSL_get_event_timeout.3 | 2 +- .../lib/libcrypto/man/man3/SSL_get_extms_support.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_get_fd.3 | 2 +- .../lib/libcrypto/man/man3/SSL_get_handshake_rtt.3 | 2 +- .../libcrypto/man/man3/SSL_get_peer_cert_chain.3 | 2 +- .../libcrypto/man/man3/SSL_get_peer_certificate.3 | 2 +- .../man/man3/SSL_get_peer_signature_nid.3 | 2 +- .../lib/libcrypto/man/man3/SSL_get_peer_tmp_key.3 | 2 +- .../lib/libcrypto/man/man3/SSL_get_psk_identity.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_get_rbio.3 | 2 +- .../libcrypto/man/man3/SSL_get_rpoll_descriptor.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_get_session.3 | 2 +- .../libcrypto/man/man3/SSL_get_shared_sigalgs.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_get_stream_id.3 | 2 +- .../libcrypto/man/man3/SSL_get_stream_read_state.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_get_value_uint.3 | 2 +- .../lib/libcrypto/man/man3/SSL_get_verify_result.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_get_version.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_group_to_name.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_handle_events.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_in_init.3 | 2 +- .../lib/libcrypto/man/man3/SSL_inject_net_dgram.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_key_update.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_library_init.3 | 2 +- .../libcrypto/man/man3/SSL_load_client_CA_file.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_new.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_new_domain.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_new_listener.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_new_stream.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_pending.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_poll.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_read.3 | 2 +- .../lib/libcrypto/man/man3/SSL_read_early_data.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_rstate_string.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_session_reused.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_set1_host.3 | 2 +- .../man/man3/SSL_set1_initial_peer_addr.3 | 2 +- .../libcrypto/man/man3/SSL_set1_server_cert_type.3 | 2 +- .../libcrypto/man/man3/SSL_set_async_callback.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_set_bio.3 | 2 +- .../lib/libcrypto/man/man3/SSL_set_blocking_mode.3 | 2 +- .../lib/libcrypto/man/man3/SSL_set_connect_state.3 | 2 +- .../man/man3/SSL_set_default_stream_mode.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_set_fd.3 | 2 +- .../man/man3/SSL_set_incoming_stream_policy.3 | 2 +- .../lib/libcrypto/man/man3/SSL_set_quic_tls_cbs.3 | 2 +- .../lib/libcrypto/man/man3/SSL_set_retry_verify.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_set_session.3 | 2 +- .../libcrypto/man/man3/SSL_set_session_secret_cb.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_set_shutdown.3 | 2 +- .../lib/libcrypto/man/man3/SSL_set_verify_result.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_shutdown.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_state_string.3 | 2 +- .../lib/libcrypto/man/man3/SSL_stream_conclude.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_stream_reset.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_want.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_write.3 | 2 +- secure/lib/libcrypto/man/man3/TS_RESP_CTX_new.3 | 2 +- secure/lib/libcrypto/man/man3/TS_VERIFY_CTX.3 | 2 +- secure/lib/libcrypto/man/man3/UI_STRING.3 | 2 +- secure/lib/libcrypto/man/man3/UI_UTIL_read_pw.3 | 2 +- secure/lib/libcrypto/man/man3/UI_create_method.3 | 2 +- secure/lib/libcrypto/man/man3/UI_new.3 | 2 +- secure/lib/libcrypto/man/man3/X509V3_get_d2i.3 | 2 +- secure/lib/libcrypto/man/man3/X509V3_set_ctx.3 | 2 +- .../lib/libcrypto/man/man3/X509_ACERT_add1_attr.3 | 2 +- .../libcrypto/man/man3/X509_ACERT_add_attr_nconf.3 | 2 +- .../man/man3/X509_ACERT_get0_holder_baseCertId.3 | 2 +- .../lib/libcrypto/man/man3/X509_ACERT_get_attr.3 | 2 +- .../lib/libcrypto/man/man3/X509_ACERT_print_ex.3 | 2 +- secure/lib/libcrypto/man/man3/X509_ALGOR_dup.3 | 2 +- secure/lib/libcrypto/man/man3/X509_ATTRIBUTE.3 | 2 +- .../libcrypto/man/man3/X509_CRL_get0_by_serial.3 | 2 +- .../libcrypto/man/man3/X509_EXTENSION_set_object.3 | 2 +- secure/lib/libcrypto/man/man3/X509_LOOKUP.3 | 2 +- .../lib/libcrypto/man/man3/X509_LOOKUP_hash_dir.3 | 2 +- .../lib/libcrypto/man/man3/X509_LOOKUP_meth_new.3 | 2 +- .../man/man3/X509_NAME_ENTRY_get_object.3 | 2 +- .../man/man3/X509_NAME_add_entry_by_txt.3 | 2 +- secure/lib/libcrypto/man/man3/X509_NAME_get0_der.3 | 2 +- .../man/man3/X509_NAME_get_index_by_NID.3 | 2 +- secure/lib/libcrypto/man/man3/X509_NAME_print_ex.3 | 9 +- secure/lib/libcrypto/man/man3/X509_PUBKEY_new.3 | 2 +- secure/lib/libcrypto/man/man3/X509_REQ_get_attr.3 | 2 +- .../libcrypto/man/man3/X509_REQ_get_extensions.3 | 2 +- secure/lib/libcrypto/man/man3/X509_SIG_get0.3 | 2 +- .../man/man3/X509_STORE_CTX_get_by_subject.3 | 2 +- .../libcrypto/man/man3/X509_STORE_CTX_get_error.3 | 2 +- secure/lib/libcrypto/man/man3/X509_STORE_CTX_new.3 | 2 +- .../man/man3/X509_STORE_CTX_set_verify_cb.3 | 2 +- .../lib/libcrypto/man/man3/X509_STORE_add_cert.3 | 2 +- .../lib/libcrypto/man/man3/X509_STORE_get0_param.3 | 2 +- secure/lib/libcrypto/man/man3/X509_STORE_new.3 | 2 +- .../man/man3/X509_STORE_set_verify_cb_func.3 | 2 +- .../man/man3/X509_VERIFY_PARAM_set_flags.3 | 2 +- secure/lib/libcrypto/man/man3/X509_add_cert.3 | 2 +- secure/lib/libcrypto/man/man3/X509_check_ca.3 | 2 +- secure/lib/libcrypto/man/man3/X509_check_host.3 | 2 +- secure/lib/libcrypto/man/man3/X509_check_issued.3 | 2 +- .../libcrypto/man/man3/X509_check_private_key.3 | 2 +- secure/lib/libcrypto/man/man3/X509_check_purpose.3 | 2 +- secure/lib/libcrypto/man/man3/X509_cmp.3 | 2 +- secure/lib/libcrypto/man/man3/X509_cmp_time.3 | 2 +- secure/lib/libcrypto/man/man3/X509_digest.3 | 2 +- secure/lib/libcrypto/man/man3/X509_dup.3 | 2 +- .../man/man3/X509_get0_distinguishing_id.3 | 2 +- .../lib/libcrypto/man/man3/X509_get0_notBefore.3 | 2 +- .../lib/libcrypto/man/man3/X509_get0_signature.3 | 2 +- secure/lib/libcrypto/man/man3/X509_get0_uids.3 | 2 +- .../man/man3/X509_get_default_cert_file.3 | 2 +- .../libcrypto/man/man3/X509_get_extension_flags.3 | 2 +- secure/lib/libcrypto/man/man3/X509_get_pubkey.3 | 2 +- .../lib/libcrypto/man/man3/X509_get_serialNumber.3 | 2 +- .../lib/libcrypto/man/man3/X509_get_subject_name.3 | 2 +- secure/lib/libcrypto/man/man3/X509_get_version.3 | 2 +- secure/lib/libcrypto/man/man3/X509_load_http.3 | 2 +- secure/lib/libcrypto/man/man3/X509_new.3 | 2 +- secure/lib/libcrypto/man/man3/X509_sign.3 | 2 +- secure/lib/libcrypto/man/man3/X509_verify.3 | 2 +- secure/lib/libcrypto/man/man3/X509_verify_cert.3 | 2 +- .../lib/libcrypto/man/man3/X509v3_get_ext_by_NID.3 | 2 +- secure/lib/libcrypto/man/man3/b2i_PVK_bio_ex.3 | 2 +- .../libcrypto/man/man3/d2i_PKCS8PrivateKey_bio.3 | 2 +- secure/lib/libcrypto/man/man3/d2i_PrivateKey.3 | 2 +- secure/lib/libcrypto/man/man3/d2i_RSAPrivateKey.3 | 2 +- secure/lib/libcrypto/man/man3/d2i_SSL_SESSION.3 | 2 +- secure/lib/libcrypto/man/man3/d2i_X509.3 | 2 +- secure/lib/libcrypto/man/man3/i2d_CMS_bio_stream.3 | 2 +- .../lib/libcrypto/man/man3/i2d_PKCS7_bio_stream.3 | 2 +- secure/lib/libcrypto/man/man3/i2d_re_X509_tbs.3 | 2 +- secure/lib/libcrypto/man/man3/o2i_SCT_LIST.3 | 2 +- secure/lib/libcrypto/man/man3/s2i_ASN1_IA5STRING.3 | 2 +- secure/lib/libcrypto/man/man5/config.5 | 2 +- secure/lib/libcrypto/man/man5/fips_config.5 | 2 +- secure/lib/libcrypto/man/man5/x509v3_config.5 | 2 +- .../lib/libcrypto/man/man7/EVP_ASYM_CIPHER-RSA.7 | 2 +- .../lib/libcrypto/man/man7/EVP_ASYM_CIPHER-SM2.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_CIPHER-AES.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_CIPHER-ARIA.7 | 2 +- .../lib/libcrypto/man/man7/EVP_CIPHER-BLOWFISH.7 | 2 +- .../lib/libcrypto/man/man7/EVP_CIPHER-CAMELLIA.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_CIPHER-CAST.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_CIPHER-CHACHA.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_CIPHER-DES.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_CIPHER-IDEA.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_CIPHER-NULL.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_CIPHER-RC2.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_CIPHER-RC4.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_CIPHER-RC5.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_CIPHER-SEED.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_CIPHER-SM4.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_KDF-ARGON2.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_KDF-HKDF.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_KDF-HMAC-DRBG.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_KDF-KB.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_KDF-KRB5KDF.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_KDF-PBKDF1.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_KDF-PBKDF2.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_KDF-PKCS12KDF.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_KDF-PVKKDF.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_KDF-SCRYPT.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_KDF-SS.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_KDF-SSHKDF.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_KDF-TLS13_KDF.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_KDF-TLS1_PRF.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_KDF-X942-ASN1.7 | 2 +- .../lib/libcrypto/man/man7/EVP_KDF-X942-CONCAT.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_KDF-X963.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_KEM-EC.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_KEM-ML-KEM.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_KEM-RSA.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_KEM-X25519.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_KEYEXCH-DH.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_KEYEXCH-ECDH.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_KEYEXCH-X25519.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_MAC-BLAKE2.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_MAC-CMAC.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_MAC-GMAC.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_MAC-HMAC.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_MAC-KMAC.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_MAC-Poly1305.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_MAC-Siphash.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_MD-BLAKE2.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_MD-KECCAK.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_MD-MD2.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_MD-MD4.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_MD-MD5-SHA1.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_MD-MD5.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_MD-MDC2.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_MD-NULL.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_MD-RIPEMD160.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_MD-SHA1.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_MD-SHA2.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_MD-SHA3.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_MD-SHAKE.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_MD-SM3.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_MD-WHIRLPOOL.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_MD-common.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_PKEY-DH.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_PKEY-DSA.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_PKEY-EC.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_PKEY-FFC.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_PKEY-HMAC.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_PKEY-ML-DSA.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_PKEY-ML-KEM.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_PKEY-RSA.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_PKEY-SLH-DSA.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_PKEY-SM2.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_PKEY-X25519.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_RAND-CRNG-TEST.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_RAND-CTR-DRBG.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_RAND-HASH-DRBG.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_RAND-HMAC-DRBG.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_RAND-JITTER.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_RAND-SEED-SRC.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_RAND-TEST-RAND.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_RAND.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_SIGNATURE-DSA.7 | 4 +- .../lib/libcrypto/man/man7/EVP_SIGNATURE-ECDSA.7 | 6 +- .../lib/libcrypto/man/man7/EVP_SIGNATURE-ED25519.7 | 6 +- secure/lib/libcrypto/man/man7/EVP_SIGNATURE-HMAC.7 | 4 +- .../lib/libcrypto/man/man7/EVP_SIGNATURE-ML-DSA.7 | 8 +- secure/lib/libcrypto/man/man7/EVP_SIGNATURE-RSA.7 | 4 +- .../lib/libcrypto/man/man7/EVP_SIGNATURE-SLH-DSA.7 | 6 +- secure/lib/libcrypto/man/man7/OSSL_PROVIDER-FIPS.7 | 2 +- secure/lib/libcrypto/man/man7/OSSL_PROVIDER-base.7 | 2 +- .../lib/libcrypto/man/man7/OSSL_PROVIDER-default.7 | 2 +- .../lib/libcrypto/man/man7/OSSL_PROVIDER-legacy.7 | 2 +- secure/lib/libcrypto/man/man7/OSSL_PROVIDER-null.7 | 2 +- .../lib/libcrypto/man/man7/OSSL_STORE-winstore.7 | 2 +- secure/lib/libcrypto/man/man7/RAND.7 | 2 +- secure/lib/libcrypto/man/man7/RSA-PSS.7 | 2 +- secure/lib/libcrypto/man/man7/X25519.7 | 2 +- secure/lib/libcrypto/man/man7/bio.7 | 2 +- secure/lib/libcrypto/man/man7/ct.7 | 2 +- secure/lib/libcrypto/man/man7/des_modes.7 | 2 +- secure/lib/libcrypto/man/man7/evp.7 | 2 +- secure/lib/libcrypto/man/man7/fips_module.7 | 2 +- secure/lib/libcrypto/man/man7/life_cycle-cipher.7 | 2 +- secure/lib/libcrypto/man/man7/life_cycle-digest.7 | 2 +- secure/lib/libcrypto/man/man7/life_cycle-kdf.7 | 2 +- secure/lib/libcrypto/man/man7/life_cycle-mac.7 | 2 +- secure/lib/libcrypto/man/man7/life_cycle-pkey.7 | 2 +- secure/lib/libcrypto/man/man7/life_cycle-rand.7 | 2 +- secure/lib/libcrypto/man/man7/openssl-core.h.7 | 2 +- .../libcrypto/man/man7/openssl-core_dispatch.h.7 | 2 +- .../lib/libcrypto/man/man7/openssl-core_names.h.7 | 2 +- secure/lib/libcrypto/man/man7/openssl-env.7 | 10 +- secure/lib/libcrypto/man/man7/openssl-glossary.7 | 2 +- secure/lib/libcrypto/man/man7/openssl-qlog.7 | 2 +- .../libcrypto/man/man7/openssl-quic-concurrency.7 | 2 +- secure/lib/libcrypto/man/man7/openssl-quic.7 | 2 +- secure/lib/libcrypto/man/man7/openssl-threads.7 | 2 +- .../lib/libcrypto/man/man7/openssl_user_macros.7 | 2 +- .../libcrypto/man/man7/ossl-guide-introduction.7 | 2 +- .../man/man7/ossl-guide-libcrypto-introduction.7 | 2 +- .../man/man7/ossl-guide-libraries-introduction.7 | 2 +- .../man/man7/ossl-guide-libssl-introduction.7 | 2 +- .../lib/libcrypto/man/man7/ossl-guide-migration.7 | 2 +- .../man/man7/ossl-guide-quic-client-block.7 | 2 +- .../man/man7/ossl-guide-quic-client-non-block.7 | 2 +- .../man/man7/ossl-guide-quic-introduction.7 | 2 +- .../man/man7/ossl-guide-quic-multi-stream.7 | 2 +- .../man/man7/ossl-guide-quic-server-block.7 | 2 +- .../man/man7/ossl-guide-quic-server-non-block.7 | 2 +- .../man/man7/ossl-guide-tls-client-block.7 | 2 +- .../man/man7/ossl-guide-tls-client-non-block.7 | 2 +- .../man/man7/ossl-guide-tls-introduction.7 | 6 +- .../man/man7/ossl-guide-tls-server-block.7 | 2 +- secure/lib/libcrypto/man/man7/ossl_store-file.7 | 2 +- secure/lib/libcrypto/man/man7/ossl_store.7 | 2 +- .../lib/libcrypto/man/man7/passphrase-encoding.7 | 2 +- secure/lib/libcrypto/man/man7/property.7 | 29 +- .../lib/libcrypto/man/man7/provider-asym_cipher.7 | 2 +- secure/lib/libcrypto/man/man7/provider-base.7 | 7 +- secure/lib/libcrypto/man/man7/provider-cipher.7 | 2 +- secure/lib/libcrypto/man/man7/provider-decoder.7 | 2 +- secure/lib/libcrypto/man/man7/provider-digest.7 | 2 +- secure/lib/libcrypto/man/man7/provider-encoder.7 | 2 +- secure/lib/libcrypto/man/man7/provider-kdf.7 | 2 +- secure/lib/libcrypto/man/man7/provider-kem.7 | 2 +- secure/lib/libcrypto/man/man7/provider-keyexch.7 | 2 +- secure/lib/libcrypto/man/man7/provider-keymgmt.7 | 2 +- secure/lib/libcrypto/man/man7/provider-mac.7 | 2 +- secure/lib/libcrypto/man/man7/provider-object.7 | 2 +- secure/lib/libcrypto/man/man7/provider-rand.7 | 2 +- secure/lib/libcrypto/man/man7/provider-signature.7 | 2 +- secure/lib/libcrypto/man/man7/provider-skeymgmt.7 | 2 +- secure/lib/libcrypto/man/man7/provider-storemgmt.7 | 2 +- secure/lib/libcrypto/man/man7/provider.7 | 2 +- secure/lib/libcrypto/man/man7/proxy-certificates.7 | 2 +- secure/lib/libcrypto/man/man7/x509.7 | 2 +- secure/usr.bin/openssl/man/CA.pl.1 | 8 +- secure/usr.bin/openssl/man/openssl-asn1parse.1 | 2 +- secure/usr.bin/openssl/man/openssl-ca.1 | 2 +- secure/usr.bin/openssl/man/openssl-ciphers.1 | 786 ++++++++++++--------- secure/usr.bin/openssl/man/openssl-cmds.1 | 2 +- secure/usr.bin/openssl/man/openssl-cmp.1 | 12 +- secure/usr.bin/openssl/man/openssl-cms.1 | 6 +- secure/usr.bin/openssl/man/openssl-crl.1 | 2 +- secure/usr.bin/openssl/man/openssl-crl2pkcs7.1 | 2 +- secure/usr.bin/openssl/man/openssl-dgst.1 | 2 +- secure/usr.bin/openssl/man/openssl-dhparam.1 | 2 +- secure/usr.bin/openssl/man/openssl-dsa.1 | 2 +- secure/usr.bin/openssl/man/openssl-dsaparam.1 | 2 +- secure/usr.bin/openssl/man/openssl-ec.1 | 2 +- secure/usr.bin/openssl/man/openssl-ecparam.1 | 2 +- secure/usr.bin/openssl/man/openssl-enc.1 | 2 +- secure/usr.bin/openssl/man/openssl-engine.1 | 2 +- secure/usr.bin/openssl/man/openssl-errstr.1 | 2 +- secure/usr.bin/openssl/man/openssl-fipsinstall.1 | 2 +- .../usr.bin/openssl/man/openssl-format-options.1 | 6 +- secure/usr.bin/openssl/man/openssl-gendsa.1 | 2 +- secure/usr.bin/openssl/man/openssl-genpkey.1 | 2 +- secure/usr.bin/openssl/man/openssl-genrsa.1 | 2 +- secure/usr.bin/openssl/man/openssl-info.1 | 2 +- secure/usr.bin/openssl/man/openssl-kdf.1 | 2 +- secure/usr.bin/openssl/man/openssl-list.1 | 2 +- secure/usr.bin/openssl/man/openssl-mac.1 | 2 +- .../openssl/man/openssl-namedisplay-options.1 | 2 +- secure/usr.bin/openssl/man/openssl-nseq.1 | 2 +- secure/usr.bin/openssl/man/openssl-ocsp.1 | 2 +- .../openssl/man/openssl-passphrase-options.1 | 2 +- secure/usr.bin/openssl/man/openssl-passwd.1 | 2 +- secure/usr.bin/openssl/man/openssl-pkcs12.1 | 2 +- secure/usr.bin/openssl/man/openssl-pkcs7.1 | 2 +- secure/usr.bin/openssl/man/openssl-pkcs8.1 | 2 +- secure/usr.bin/openssl/man/openssl-pkey.1 | 2 +- secure/usr.bin/openssl/man/openssl-pkeyparam.1 | 2 +- secure/usr.bin/openssl/man/openssl-pkeyutl.1 | 6 +- secure/usr.bin/openssl/man/openssl-prime.1 | 2 +- secure/usr.bin/openssl/man/openssl-rand.1 | 2 +- secure/usr.bin/openssl/man/openssl-rehash.1 | 2 +- secure/usr.bin/openssl/man/openssl-req.1 | 2 +- secure/usr.bin/openssl/man/openssl-rsa.1 | 2 +- secure/usr.bin/openssl/man/openssl-rsautl.1 | 2 +- secure/usr.bin/openssl/man/openssl-s_client.1 | 2 +- secure/usr.bin/openssl/man/openssl-s_server.1 | 2 +- secure/usr.bin/openssl/man/openssl-s_time.1 | 2 +- secure/usr.bin/openssl/man/openssl-sess_id.1 | 2 +- secure/usr.bin/openssl/man/openssl-skeyutl.1 | 2 +- secure/usr.bin/openssl/man/openssl-smime.1 | 2 +- secure/usr.bin/openssl/man/openssl-speed.1 | 2 +- secure/usr.bin/openssl/man/openssl-spkac.1 | 2 +- secure/usr.bin/openssl/man/openssl-srp.1 | 2 +- secure/usr.bin/openssl/man/openssl-storeutl.1 | 2 +- secure/usr.bin/openssl/man/openssl-ts.1 | 2 +- .../openssl/man/openssl-verification-options.1 | 10 +- secure/usr.bin/openssl/man/openssl-verify.1 | 9 +- secure/usr.bin/openssl/man/openssl-version.1 | 2 +- secure/usr.bin/openssl/man/openssl-x509.1 | 2 +- secure/usr.bin/openssl/man/openssl.1 | 2 +- secure/usr.bin/openssl/man/tsget.1 | 2 +- sys/crypto/openssl/aarch64/vpsm4_ex-armv8.S | 104 +-- sys/crypto/openssl/amd64/rsaz-2k-avxifma.S | 1 + sys/crypto/openssl/amd64/rsaz-3k-avxifma.S | 3 +- sys/crypto/openssl/amd64/rsaz-4k-avxifma.S | 3 +- sys/crypto/openssl/powerpc/aes-gcm-ppc.S | 5 - sys/crypto/openssl/powerpc64/aes-gcm-ppc.S | 5 - sys/crypto/openssl/powerpc64le/aes-gcm-ppc.S | 5 - 909 files changed, 1656 insertions(+), 1426 deletions(-) diff --git a/crypto/openssl/exporters/libcrypto.pc b/crypto/openssl/exporters/libcrypto.pc index 829121ff73f5..339c799132d7 100644 --- a/crypto/openssl/exporters/libcrypto.pc +++ b/crypto/openssl/exporters/libcrypto.pc @@ -1,3 +1,4 @@ +# prefix=/usr exec_prefix=${prefix} libdir=${exec_prefix}/lib @@ -7,7 +8,7 @@ modulesdir=${libdir}/ossl-modules Name: OpenSSL-libcrypto Description: OpenSSL cryptography library -Version: 3.5.5 +Version: 3.5.6 Libs: -L${libdir} -lcrypto Libs.private: -pthread Cflags: -I${includedir} diff --git a/crypto/openssl/exporters/libssl.pc b/crypto/openssl/exporters/libssl.pc index 154bf1ca64cc..e5fce192a971 100644 --- a/crypto/openssl/exporters/libssl.pc +++ b/crypto/openssl/exporters/libssl.pc @@ -1,3 +1,4 @@ +# prefix=/usr exec_prefix=${prefix} libdir=${exec_prefix}/lib @@ -5,7 +6,7 @@ includedir=${prefix}/include Name: OpenSSL-libssl Description: Secure Sockets Layer and cryptography libraries -Version: 3.5.5 +Version: 3.5.6 Requires.private: libcrypto Libs: -L${libdir} -lssl Cflags: -I${includedir} diff --git a/crypto/openssl/exporters/openssl.pc b/crypto/openssl/exporters/openssl.pc index 110c7835e352..4e0aed6e9db3 100644 --- a/crypto/openssl/exporters/openssl.pc +++ b/crypto/openssl/exporters/openssl.pc @@ -1,3 +1,4 @@ +# prefix=/usr exec_prefix=${prefix} libdir=${exec_prefix}/lib @@ -5,5 +6,5 @@ includedir=${prefix}/include Name: OpenSSL Description: Secure Sockets Layer and cryptography libraries and tools -Version: 3.5.5 +Version: 3.5.6 Requires: libssl libcrypto diff --git a/crypto/openssl/include/openssl/cmp.h b/crypto/openssl/include/openssl/cmp.h index d46192c7172c..af844ec8ed10 100644 --- a/crypto/openssl/include/openssl/cmp.h +++ b/crypto/openssl/include/openssl/cmp.h @@ -2,7 +2,7 @@ * WARNING: do not edit! * Generated by Makefile from include/openssl/cmp.h.in *** 13823 LINES SKIPPED *** From nobody Thu Apr 9 02:01:07 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4frjpC3CvWz6YCgn for ; Thu, 09 Apr 2026 02:01: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4frjpC2R9Hz3RRS for ; Thu, 09 Apr 2026 02:01:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775700067; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4c0ncYyqoNqX1XFjcNtB/3ii7t7Vz39/SQUUSSkrE+4=; b=xpCPUQguUHJl5r0qudoBNyIvn89fxhdZpgAYhiuuddGcrO1rzQaq5/pMayMCVds1rXr6o5 GLCHYjQdsMGbbLx/Uhz8b7SDlVY0xCtrtoJRUUuPOrUBDwWONy4X6DckzhuXl5puTc1rxs ILI5IJBt6iDhzbkNTzKYwh1BXsbbOME17Z1Y4svPOG+HXo7En24RR1qm1GwbwquXwU8Z8q sK27icmduVkPYJeCITX8gznyoVJEgLGpWOMC5nGdXhRFY1L/CNcIbeTcbzbhd9m0xAO7LZ 7rKH9xXKJG7GVsT/MgsfWSX0TJZHf8/fkV4gMP8OLaoPe8D4I/wUdIM0buIuNw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775700067; a=rsa-sha256; cv=none; b=gKlnE3TXBRCFQtpI0/EEJnX0JIJERhzMZl48ikSkgOWb/eBFGHyt4UD4WuDdbauPuMG3sg Fd1sS04IAz8TM9a/lBN5CP8b71WIEPnb0PdblpjjCMmafNJQWP9fE8shpZ/zQc89rOv2aD /55M13AJxJxDy/H2xwO+uDQfD8wg+62UJeehqITrThg9pt/LZVHTkSve2Gk3PTw/ChTzVK iowhpZfR9OqjbId3fR3G8DdwJhTAiyFFuQN2Usm4lp/4461My9XB1rzwPeQl+hHvxyai0P 5iHdyQdg+LolYdUNnlaEbcpZWH5MU7YByuDS/sPyi+sqbbbaZkEI5ssKNxkPhQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775700067; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4c0ncYyqoNqX1XFjcNtB/3ii7t7Vz39/SQUUSSkrE+4=; b=Sn9l6DCZgi3AHO6PGUvza76Yt4Awy7LqXN67a7hDzSvmsjSJ7xhZsxx7z8yROwbJZp6q7l U9OjUIeFIoS3BaoYISp0F3D+vs6TLOpdj+/Ch8PUhzf/ZQNWZm+frx3kMVQxS3TB0kTh6+ rPvwYWbm9AFYkj8y9Kz6hiET2bguqR2os6dhJy/v98XFy15tl0eov5IPgpvjA9nQjubpks MvB1Ew+NBaEroxI7bENSZQ9WT0JQid2xs2TPOHLs0bT6RsSm73WqZSTV3QdyZKNJF7Ow40 6dGhd+HVRne2goh07r8H8EFqn0eYyVGKA1rf/133/D/ESlPZxuAMmmqFC3VrJw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4frjpC1Zs8zt8N for ; Thu, 09 Apr 2026 02:01:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3fd33 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 09 Apr 2026 02:01:07 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Enji Cooper Subject: git: 9f7080ba6bcf - main - crypto/openssl: add new manpage from release 3.5.6 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9f7080ba6bcf18d013ae3b91dc9d92cfa731a8c0 Auto-Submitted: auto-generated Date: Thu, 09 Apr 2026 02:01:07 +0000 Message-Id: <69d70863.3fd33.614fe2cc@gitrepo.freebsd.org> The branch main has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=9f7080ba6bcf18d013ae3b91dc9d92cfa731a8c0 commit 9f7080ba6bcf18d013ae3b91dc9d92cfa731a8c0 Author: Enji Cooper AuthorDate: 2026-04-09 02:00:10 +0000 Commit: Enji Cooper CommitDate: 2026-04-09 02:00:10 +0000 crypto/openssl: add new manpage from release 3.5.6 MFC after: 1 day (the security issues warrant a quick backport). MFC with: 10a428653ee7216475f1ddce3fb4cbf1200319f8 --- secure/lib/libcrypto/man/man3/Makefile | 2 + secure/lib/libcrypto/man/man3/X509V3_EXT_print.3 | 108 +++++++++++++++++++++++ 2 files changed, 110 insertions(+) diff --git a/secure/lib/libcrypto/man/man3/Makefile b/secure/lib/libcrypto/man/man3/Makefile index 172444fcb68c..8e81b1871d33 100644 --- a/secure/lib/libcrypto/man/man3/Makefile +++ b/secure/lib/libcrypto/man/man3/Makefile @@ -663,6 +663,7 @@ MAN+= X509_sign.3 MAN+= X509_verify.3 MAN+= X509_verify_cert.3 MAN+= X509v3_get_ext_by_NID.3 +MAN+= X509V3_EXT_print.3 MAN+= b2i_PVK_bio_ex.3 MAN+= d2i_PKCS8PrivateKey_bio.3 MAN+= d2i_PrivateKey.3 @@ -5615,6 +5616,7 @@ MLINKS+= X509v3_get_ext_by_NID.3 X509v3_get_ext.3 MLINKS+= X509v3_get_ext_by_NID.3 X509v3_get_ext_by_OBJ.3 MLINKS+= X509v3_get_ext_by_NID.3 X509v3_get_ext_by_critical.3 MLINKS+= X509v3_get_ext_by_NID.3 X509v3_get_ext_count.3 +MLINKS+= X509V3_EXT_print.3 X509V3_EXT_print_fp.3 MLINKS+= b2i_PVK_bio_ex.3 b2i_PVK_bio.3 MLINKS+= b2i_PVK_bio_ex.3 i2b_PVK_bio.3 MLINKS+= b2i_PVK_bio_ex.3 i2b_PVK_bio_ex.3 diff --git a/secure/lib/libcrypto/man/man3/X509V3_EXT_print.3 b/secure/lib/libcrypto/man/man3/X509V3_EXT_print.3 new file mode 100644 index 000000000000..f23dc989ae29 --- /dev/null +++ b/secure/lib/libcrypto/man/man3/X509V3_EXT_print.3 @@ -0,0 +1,108 @@ +.\" -*- mode: troff; coding: utf-8 -*- +.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45) +.\" +.\" Standard preamble: +.\" ======================================================================== +.de Sp \" Vertical space (when we can't use .PP) +.if t .sp .5v +.if n .sp +.. +.de Vb \" Begin verbatim text +.ft CW +.nf +.ne \\$1 +.. +.de Ve \" End verbatim text +.ft R +.fi +.. +.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. +.ie n \{\ +. ds C` "" +. ds C' "" +'br\} +.el\{\ +. ds C` +. ds C' +'br\} +.\" +.\" Escape single quotes in literal strings from groff's Unicode transform. +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" +.\" If the F register is >0, we'll generate index entries on stderr for +.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index +.\" entries marked with X<> in POD. Of course, you'll have to process the +.\" output yourself in some meaningful fashion. +.\" +.\" Avoid warning from groff about undefined register 'F'. +.de IX +.. +.nr rF 0 +.if \n(.g .if rF .nr rF 1 +.if (\n(rF:(\n(.g==0)) \{\ +. if \nF \{\ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" +.. +. if !\nF==2 \{\ +. nr % 0 +. nr F 2 +. \} +. \} +.\} +.rr rF +.\" +.\" Required to disable full justification in groff 1.23.0. +.if n .ds AD l +.\" ======================================================================== +.\" +.IX Title "X509V3_EXT_PRINT 3ossl" +.TH X509V3_EXT_PRINT 3ossl 2026-04-07 3.5.6 OpenSSL +.\" For nroff, turn off justification. Always turn off hyphenation; it makes +.\" way too many mistakes in technical documents. +.if n .ad l +.nh +.SH NAME +X509V3_EXT_print, X509V3_EXT_print_fp \- pretty print X509 certificate extensions +.SH SYNOPSIS +.IX Header "SYNOPSIS" +.Vb 1 +\& #include +\& +\& int X509V3_EXT_print(BIO *out, X509_EXTENSION *ext, unsigned long flag, int indent); +\& int X509V3_EXT_print_fp(FILE *out, X509_EXTENSION *ext, int flag, int indent); +.Ve +.SH DESCRIPTION +.IX Header "DESCRIPTION" +\&\fBX509V3_EXT_print()\fR and \fBX509V3_EXT_print_fp()\fR parse and print the extension +info from \fIext\fR to \fIbio\fR or \fIout\fR with indentation set via \fIindent\fR. +\&\fIflag\fR determines the behaviour if an extension could not be parsed and can be +one of: +\&\fBX509V3_EXT_DEFAULT\fR (equivalent to 0): an unknown or unparsable extension +stops the parsing and the function returns a failure. +\&\fBX509V3_EXT_PARSE_UNKNOWN\fR: an unknown or unparsable extension is handled by +printing it through the \fBASN1_parse_dump()\fR function, and the function returns +success. +\&\fBX509V3_EXT_DUMP_UNKNOWN\fR: an unknown or unparsable extension is handled by +printing it through the \fBBIO_dump_indent()\fR function, and the function returns +success, +\&\fBX509V3_EXT_ERROR_UNKNOWN\fR: an unknown or unparsable extension is handled by +printing either "" or "", and the function returns +success. +.SH "RETURN VALUES" +.IX Header "RETURN VALUES" +\&\fBX509V3_EXT_print()\fR and \fBX509V3_EXT_print_fp()\fR return 1 for success and 0 for +failure. +.SH "SEE ALSO" +.IX Header "SEE ALSO" +\&\fBBIO_dump_indent\fR\|(3), +\&\fBASN1_parse_dump\fR\|(3), +.SH COPYRIGHT +.IX Header "COPYRIGHT" +Copyright 2026 The OpenSSL Project Authors. All Rights Reserved. +.PP +Licensed under the Apache License 2.0 (the "License"). You may not use +this file except in compliance with the License. You can obtain a copy +in the file LICENSE in the source distribution or at +. From nobody Thu Apr 9 02:37:32 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4frkcD3dvWz6YGMs for ; Thu, 09 Apr 2026 02:37: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4frkcD1l3Rz3VLF for ; Thu, 09 Apr 2026 02:37:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775702252; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+uufCaTZjBEfd45e1G6cyIZphohMPKTm3j/Gkr08g10=; b=QK4TP4TMJiavGtPVuk+P7VoOm9+SZbvrPf1tTreaxozkATXFybYe2zbDVZCl5EIjv/91az 5W3vTY0S+vJnqjBsumNnYtEFujLfqYItrfJ5AEmS9hLlYWARoJg126EmLasYJvPjDMe2Yb ppiXT2hTRJR7+khqarfZmHz8+UT4HCCdfvCwFOlJZqJTr5xodc0eFTlkL+76ImwDbP+yHA TRKhBaU5evs2nny1ESkP1qSFpUd83JaVv3sQJrlqyRdbN0HuyKwWjr6Uq/Y2rUEm7xZh6O NE7FPKnarBLNHWU9qf/JsHjg3jwEr3LyYrOI1FKzM2FE8vBchDRWlkHEpcMe5g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775702252; a=rsa-sha256; cv=none; b=GcWIwZoP988xdOWReNk7cKcG5MxLAx6tJa6n42/q0eILbhjayz8WEsW+Pj+bFa5TXHbm3d +WcuN1IhpRKDC9naG3iRhObIrEqWSHQK/p6XBp/ucWM2w9R+wqaYQTPU59XaV9D5VDpwCc 2BF8hpRYvaIiHen+4X2fRnXyqpRknvCfJpiGMwj0z+sI1GbkA/763U32lH/8Z6uYLyzWll pjCyfWLXz3Rv/Ysot+27+++uEmQSL3qUV0a2nnfCznYK71vXRkS4hzjw5r34l5TYZnI9My T94M0GwC+1VgCjk1Z8aBioBfEjcnf6ra6fm58PLtzj2g7BaL2gqW8Z0zuoEHSQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775702252; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+uufCaTZjBEfd45e1G6cyIZphohMPKTm3j/Gkr08g10=; b=IkVhgBGhBaUgRJbL5A5BkTctriY+OTwWk/RnSvhnJ/1tDqFgL8gKJsVFYwovCudkbY92Eh Syjdh0IhVK6DIi616weCEG3NnYvnRqDEeqx0TmDsCp3pnPx2IQuWAXM5o0XgUM4h6e+Y6F WbkgaE/IxBbOUjNwcGoQ3hDVkyi809TRaJQqXR3gtTuZa5btwAOIY7K4MdcXkVoejkWwfl wId7XAyXkfweybWU+Ttkig92huZwt4v7bBdSxXkhY/4QGP6GbX4mT2DR8j+X3vVY4vMJfI 7H6XwKC+dNXjVHddI1Q67NthmwhS83AnIs+0K+D8s2OV6xQfrgHv6ltlZkAffA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4frkcD0qqpztlX for ; Thu, 09 Apr 2026 02:37:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 409d6 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 09 Apr 2026 02:37:32 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: 0bf4d22c3708 - main - kqueue: don't leak file refs on failure to knote_attach() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0bf4d22c37083170961c31694b90551538901a1c Auto-Submitted: auto-generated Date: Thu, 09 Apr 2026 02:37:32 +0000 Message-Id: <69d710ec.409d6.57f17cbc@gitrepo.freebsd.org> The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=0bf4d22c37083170961c31694b90551538901a1c commit 0bf4d22c37083170961c31694b90551538901a1c Author: Kyle Evans AuthorDate: 2026-04-09 02:37:00 +0000 Commit: Kyle Evans CommitDate: 2026-04-09 02:37:11 +0000 kqueue: don't leak file refs on failure to knote_attach() We'll subsequently just knote_free() since the knote is barely constructed, but that bypasses any logic that might release references on owned files/fops. Defer clearing those until the knote actually owns them and update the comment to draw the line more clearly. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D56318 --- sys/kern/kern_event.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/sys/kern/kern_event.c b/sys/kern/kern_event.c index 0d37327f14bd..1deb7a705c56 100644 --- a/sys/kern/kern_event.c +++ b/sys/kern/kern_event.c @@ -1822,12 +1822,6 @@ findkn: kn->kn_fp = fp; kn->kn_kq = kq; kn->kn_fop = fops; - /* - * apply reference counts to knote structure, and - * do not release it at the end of this routine. - */ - fops = NULL; - fp = NULL; kn->kn_sfflags = kev->fflags; kn->kn_sdata = kev->data; @@ -1848,6 +1842,16 @@ findkn: goto done; } + /* + * We transfer ownership of fops/fp to the knote + * structure and avoid releasing them at the end of + * this routine, now that all of the remaining exit + * paths will knote_drop() to release the reference + * counts we held on them above. + */ + fops = NULL; + fp = NULL; + if ((error = kn->kn_fop->f_attach(kn)) != 0) { knote_drop_detached(kn, td); goto done; From nobody Thu Apr 9 02:37:33 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4frkcF6gH5z6YGMw for ; Thu, 09 Apr 2026 02:37: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4frkcF4GSPz3VTT for ; Thu, 09 Apr 2026 02:37:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775702253; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jlK8QtyHMG/juKPH77IquhsoCDfhky8ZGuW0HHUIcfg=; b=qAkfKvpF0/NS/5x7Or3Qy/BH9Bil4qcAVyOb8qUL67D36zA2oBtT0d/JldYrBD8ifzVlrK Wzu8s/VjByp5gw86y/BXfcAk30A/6LdKjg8MDtYNcE2PfxCOIHHbyHHnDIJgHBi5Q/+DNY r6iclJr1s7YV7SphXRk1K+sygpZY0saJuD1XGSCWenncIiD6FSOLu9+FIPl3gdtw+CP67E /K0OfYrZJNEVQyBpjyDLkC6O0XU2mDOrqVESfrnaqqsvF+syU1Go8rLH+lSBiB118HewRT 1GoE+oXe5rTol6Ffpzta9vxHPG8SaUWj436H6VEuNEsXKi11BxOtwZ8Ebv1k1Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775702253; a=rsa-sha256; cv=none; b=QvDtctGHVybT6qv0FZtRDZF0QF/q4nToYFIAjh1SGki03goUzyQM/iwy9sUFkzKO0s4HiO rNlVGZOat9EnjrCI5GbX5n2hf3k4equTgNUSNhuzYP/d9o08OLSai8/D5KqQ4q8wC9atOo 0s5CQgJvPoHUY4iZWYoAiKLpjod9Z/mSaFaMM27hQezFZIFj5C8p3STRhK9qiCrB3uB0Bz c2AWaf5cj/OANxfhg92DJUak7NHaPMstrFab4iLpMHGGRvmKgdNLp9DshtjcjgfFYpArNl l3nZIYIxvcHsPEsQh9v6USYvDRDiKzjF6pfV4NxQ2wLEixUofTof6f/hd/K6AA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775702253; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jlK8QtyHMG/juKPH77IquhsoCDfhky8ZGuW0HHUIcfg=; b=mFRU8x7KkQxIabN10VOpqQ+wspVpztjCJ9gxLWdHijXTd2RwyIIADN/Ayun1y8om3bf7iv UJfevwXHVKGKmrmYuN32n7EKhMny3asBQS/iS19WVERv2hJoYV3aQUhAzkLhrLtxIBEy5+ F+Dpzns99aQMuk5ZP3cEssNsR7J64UvwoR1qYpFisRmVUo6mKjKJngZOFaVzqQs+sbYTTD +Bx6iHKR7CkYXyOEc7gG7Kd0+Ch19C3rHFOozMioB/PpbRCdjJEgRnGE6v64VKLSO86mO9 UThmU1ho0WZe0jtQIcLw4F1LyMa/Ft8bUKeki/Z4sTWL7RlGCNGrFafDMdNBKQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4frkcF24wMztlY for ; Thu, 09 Apr 2026 02:37:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 434e8 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 09 Apr 2026 02:37:33 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: 0c9cec8b66e7 - main - tests: kqueue: add a basic test for CPONFORK List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0c9cec8b66e7033f50059329704515d5222b9ff4 Auto-Submitted: auto-generated Date: Thu, 09 Apr 2026 02:37:33 +0000 Message-Id: <69d710ed.434e8.7113bca8@gitrepo.freebsd.org> The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=0c9cec8b66e7033f50059329704515d5222b9ff4 commit 0c9cec8b66e7033f50059329704515d5222b9ff4 Author: Kyle Evans AuthorDate: 2026-04-09 02:37:00 +0000 Commit: Kyle Evans CommitDate: 2026-04-09 02:37:11 +0000 tests: kqueue: add a basic test for CPONFORK Just copy over a timer and a write-filter, be sure that we can observe both in the child. Maybe the timer should check for a minimum time passed, but I don't know that we'd be likely to get that wrong. This also adds a negative test with a kqueue that is *not* set for CPONFORK being added to the first one, made readable, and confirming that we don't see a knote for it in the child. Some other improvements to the test noted in the review are planned in the short term, but they're not particularly worth blocking adding this as a basic sanity check. Reviewed by: kib, markj Differential Revision: https://reviews.freebsd.org/D56223 --- tests/sys/kqueue/kqueue_fork.c | 140 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 140 insertions(+) diff --git a/tests/sys/kqueue/kqueue_fork.c b/tests/sys/kqueue/kqueue_fork.c index e4c0412c1980..6f517a2e0e29 100644 --- a/tests/sys/kqueue/kqueue_fork.c +++ b/tests/sys/kqueue/kqueue_fork.c @@ -27,9 +27,13 @@ */ #include +#include +#include +#include #include #include +#include #include #include @@ -81,9 +85,145 @@ ATF_TC_BODY(shared_table_filt_sig, tc) ATF_REQUIRE_EQ(WEXITSTATUS(status), 0); } +#define TIMER_FORKED 0 +#define TIMER_TIMEOUT 1 + +#define RECV_TIMER 0x01 +#define RECV_VNODE 0x02 +#define RECV_CLOREAD 0x04 +#define RECV_ERROR 0x80 +#define RECV_ALL (RECV_TIMER | RECV_VNODE) + +static int +cponfork_notes_check(int kq, int clofd) +{ + struct kevent ev; + int error, received = 0; + + EV_SET(&ev, TIMER_TIMEOUT, EVFILT_TIMER, + EV_ADD | EV_ENABLE | EV_ONESHOT, NOTE_SECONDS, 4, NULL); + error = kevent(kq, &ev, 1, NULL, 0, NULL); + if (error == -1) + return (RECV_ERROR); + + while ((received & RECV_ALL) != RECV_ALL) { + error = kevent(kq, NULL, 0, &ev, 1, NULL); + if (error < 0) + return (RECV_ERROR); + else if (error == 0) + break; + + switch (ev.filter) { + case EVFILT_TIMER: + if (ev.ident == TIMER_TIMEOUT) + return (received | RECV_ERROR); + + received |= RECV_TIMER; + break; + case EVFILT_VNODE: + received |= RECV_VNODE; + break; + case EVFILT_READ: + if ((int)ev.ident != clofd) + return (received | RECV_ERROR); + received |= RECV_CLOREAD; + break; + } + } + + return (received); +} + +ATF_TC_WITHOUT_HEAD(cponfork_notes); +ATF_TC_BODY(cponfork_notes, tc) +{ + struct kevent ev[3]; + int clofd, dfd, error, kq, pdfd, pmask, status; + pid_t pid; + + kq = kqueuex(KQUEUE_CPONFORK); + ATF_REQUIRE(kq >= 0); + + dfd = open(".", O_DIRECTORY); + ATF_REQUIRE(dfd >= 0); + + clofd = kqueue(); + ATF_REQUIRE(clofd >= 0); + + /* + * Setup an event on clofd that we can trigger to make it readable, + * as we'll want this ready to go when we fork to be sure that if we + * *were* going to receive an event from it, it would have occurred + * before the three-second timer that would normally close out the child + * fires. + */ + EV_SET(&ev[0], 0, EVFILT_USER, EV_ADD | EV_ENABLE, 0, 0, NULL); + error = kevent(clofd, &ev[0], 1, NULL, 0, NULL); + ATF_REQUIRE(error != -1); + + /* + * Every event we setup here we should expect to observe in both the + * child and the parent, with exception to the EVFILT_READ of clofd. We + * except that one to be dropped in the child when the kqueue it's + * attached to goes away, thus its exclusion from the RECV_ALL mask. + */ + EV_SET(&ev[0], dfd, EVFILT_VNODE, EV_ADD | EV_ENABLE | EV_ONESHOT, + NOTE_WRITE, 0, NULL); + EV_SET(&ev[1], TIMER_FORKED, EVFILT_TIMER, EV_ADD | EV_ENABLE | EV_ONESHOT, + NOTE_SECONDS, 3, NULL); + EV_SET(&ev[2], clofd, EVFILT_READ, EV_ADD | EV_ENABLE | EV_ONESHOT, 0, + 0, NULL); + error = kevent(kq, &ev[0], 3, NULL, 0, NULL); + ATF_REQUIRE(error != -1); + + /* Fire off an event to make clofd readable. */ + EV_SET(&ev[0], 0, EVFILT_USER, 0, NOTE_TRIGGER, 0, NULL); + error = kevent(clofd, &ev[0], 1, NULL, 0, NULL); + + /* + * We're only using pdfork here for the kill-on-exit semantics, in case + * the parent fails to setup some context needed for one of our events + * to fire. + */ + pid = pdfork(&pdfd, 0); + ATF_REQUIRE(pid != -1); + if (pid == 0) { + struct kinfo_file kf = { .kf_structsize = sizeof(kf) }; + + if (fcntl(kq, F_KINFO, &kf) != 0) + _exit(RECV_ERROR); + else if (kf.kf_type != KF_TYPE_KQUEUE) + _exit(RECV_ERROR); + + _exit(cponfork_notes_check(kq, clofd)); + } + + /* Setup anything we need to fire off any of our events above. */ + error = mkdir("canary", 0755); + ATF_REQUIRE(error == 0); + + /* + * We'll simultaneously do the same exercise of polling the kqueue in + * the parent, to demonstrate that forking doesn't "steal" any of the + * knotes from us -- all of the events we've added are one-shot and + * still fire twice (once in parent, once in child). + */ + pmask = cponfork_notes_check(kq, clofd); + ATF_REQUIRE_EQ(pmask, RECV_ALL | RECV_CLOREAD); + + /* Wait for the child to timeout or observe the timer. */ + _Static_assert(RECV_ALL <= UCHAR_MAX, + "Too many events to observe -- switch from waitpid -> waitid"); + error = waitpid(pid, &status, 0); + ATF_REQUIRE(error != -1); + ATF_REQUIRE(WIFEXITED(status)); + ATF_REQUIRE_EQ(WEXITSTATUS(status), RECV_ALL); +} + ATF_TP_ADD_TCS(tp) { ATF_TP_ADD_TC(tp, shared_table_filt_sig); + ATF_TP_ADD_TC(tp, cponfork_notes); return (atf_no_error()); } From nobody Thu Apr 9 02:37:34 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4frkcG5223z6YGX6 for ; Thu, 09 Apr 2026 02:37: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4frkcG2V52z3VYY for ; Thu, 09 Apr 2026 02:37:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775702254; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CQUq+dFvmCBJTnm/acR8vPydDWozbTuOrPC8m/UrGsU=; b=oozg7Hv4Hof+u4Z6qxUD22/ROvSvVmhjRuSLuecgsv84DlIbEOJye6uL8B7sGukHiqceI6 KgnCSNW24a807j+OrSvPcTX+HUbxfLuvhfQHAuHktVyUHCEProro7bSl+2cF+uFD3CNVQl BaMu415uAIxeshRRX/raUOQZ33gu8wHHleb4zb9zg902HBgiqgeLWPl6XREuJQWwIYIxdR tII3pM0D5oTFKBR6pd3j1QrgZ1qZfGguJDlc0Ud56Wg9R2mEg8GkFRr9tn8KyuodEBCEBH zc5ZcfC+auLc2M1dp5zts87LlsmoTLDVBP5UR3SGMbVBDbbnsE1hNBJv9faXhQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775702254; a=rsa-sha256; cv=none; b=vA3MzmySYcFS/QZ90XPpRnntfUfa0aosHTF/aRrQ/Pt6XZlSn30mnjo5Xbjm0O+Jed3Feb UDoQC8qMHFGQm+RQHr9Dxvxy0WIXuwZvt0h6aAvDRETxoALM5DS7tv4rJMNgSk2Y8hN6hY 9LJh5QCxBY8tQQOno//1JEqTzbQPbem9ArQuBT+ovlSPwx0qgn2TzWqh3ELPdsxg1C37cn ofgvUzAmQqavPAugip7UUONWf/vsj8HCZ7eMwc/+nvOuIJRyMYwTbirPKm8Bj37SswhdUA 1iMH9/9iEo1FG6Av+6GvpMhJHgftbca2LWfVrJpUa5vXL//wRgOYAWZDuSxJDg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775702254; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CQUq+dFvmCBJTnm/acR8vPydDWozbTuOrPC8m/UrGsU=; b=A5bpnaaPP+1+t0r4nL7Lo4tOb+GXE0RYjGK2gmbpmVXJO15+FZAa8APY9HZUczjFN1ik2L UQwYkD0HWjn1JObfUfH3Hs76MelBNGd56CbSPg9abrKi3IARP23C/8dB+uyJQhfIrI8yFN bEzHe01Ssy9jac1tENpBXglAdGI02hRpoa/Rin/4fC/pY65LCGTSWGJb8S9vJhLvmOkVME skElwtKroufLmWRhuXnoXinHWTutzKNJqnjy2KLImYTlp3T656wXDU5CBpUkLbp2ZMG3/1 Y2oRKF4E9KSCVW5lPEoRC94F74csIKrLx4E4YEMBx/I+x9VH2hkB2W/gYLUPZg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4frkcG1qQNzv68 for ; Thu, 09 Apr 2026 02:37:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 4301d by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 09 Apr 2026 02:37:34 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: c6dd40f2d35d - main - kqueue: slightly clarify the flow in knlist_cleardel() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c6dd40f2d35d596ca60a5d87616c3e4a0fd4f676 Auto-Submitted: auto-generated Date: Thu, 09 Apr 2026 02:37:34 +0000 Message-Id: <69d710ee.4301d.2fffd704@gitrepo.freebsd.org> The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=c6dd40f2d35d596ca60a5d87616c3e4a0fd4f676 commit c6dd40f2d35d596ca60a5d87616c3e4a0fd4f676 Author: Kyle Evans AuthorDate: 2026-04-09 02:37:00 +0000 Commit: Kyle Evans CommitDate: 2026-04-09 02:37:11 +0000 kqueue: slightly clarify the flow in knlist_cleardel() This is purely a cosmetic change to make it a little easier on the eyes, rather than jumping back to the else branch up top. Re-flow it to use another loop on the outside and just inline the re-lock before we repeat after awaking from fluxwait. The !killkn path should maybe issue a wakeup if there's a thread in KQ_SLEEP so that userland can observe the EOF, but this isn't a practical problem today: pretty much every case of knlist_clear is tied to a file descriptor and called in the close(2) path. As a consequence, potentially affected knotes are almost always destroyed before we even get to knlist_clear(). Reviewed by: kib, markj Differential Revision: https://reviews.freebsd.org/D56226 --- sys/kern/kern_event.c | 50 +++++++++++++++++++++++++++++--------------------- 1 file changed, 29 insertions(+), 21 deletions(-) diff --git a/sys/kern/kern_event.c b/sys/kern/kern_event.c index 1deb7a705c56..01731ca46b6b 100644 --- a/sys/kern/kern_event.c +++ b/sys/kern/kern_event.c @@ -2792,31 +2792,39 @@ knlist_cleardel(struct knlist *knl, struct thread *td, int islocked, int killkn) KNL_ASSERT_LOCKED(knl); else { KNL_ASSERT_UNLOCKED(knl); -again: /* need to reacquire lock since we have dropped it */ knl->kl_lock(knl->kl_lockarg); } - SLIST_FOREACH_SAFE(kn, &knl->kl_list, kn_selnext, kn2) { - kq = kn->kn_kq; - KQ_LOCK(kq); - if (kn_in_flux(kn)) { - KQ_UNLOCK(kq); - continue; - } - knlist_remove_kq(knl, kn, 1, 1); - if (killkn) { - kn_enter_flux(kn); - KQ_UNLOCK(kq); - knote_drop_detached(kn, td); - } else { - /* Make sure cleared knotes disappear soon */ - kn->kn_flags |= EV_EOF | EV_ONESHOT; - KQ_UNLOCK(kq); + for (;;) { + /* + * Each pass removes as many knotes as we can before dropping + * into FLUXWAIT. Active knotes are simply detached and either + * freed or converted to one-shot, as the attached subject is + * essentially disappearing. + */ + SLIST_FOREACH_SAFE(kn, &knl->kl_list, kn_selnext, kn2) { + kq = kn->kn_kq; + KQ_LOCK(kq); + if (kn_in_flux(kn)) { + KQ_UNLOCK(kq); + continue; + } + knlist_remove_kq(knl, kn, 1, 1); + if (killkn) { + kn_enter_flux(kn); + KQ_UNLOCK(kq); + knote_drop_detached(kn, td); + } else { + /* Make sure cleared knotes disappear soon */ + kn->kn_flags |= EV_EOF | EV_ONESHOT; + KQ_UNLOCK(kq); + } + kq = NULL; } - kq = NULL; - } - if (!SLIST_EMPTY(&knl->kl_list)) { + if (SLIST_EMPTY(&knl->kl_list)) + break; + /* there are still in flux knotes remaining */ kn = SLIST_FIRST(&knl->kl_list); kq = kn->kn_kq; @@ -2826,7 +2834,7 @@ again: /* need to reacquire lock since we have dropped it */ kq->kq_state |= KQ_FLUXWAIT; msleep(kq, &kq->kq_lock, PSOCK | PDROP, "kqkclr", 0); kq = NULL; - goto again; + knl->kl_lock(knl->kl_lockarg); } if (islocked) From nobody Thu Apr 9 02:37:35 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4frkcJ3KDhz6YGPf for ; Thu, 09 Apr 2026 02:37: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4frkcH6CNpz3VNy for ; Thu, 09 Apr 2026 02:37:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775702255; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rtwY1YH0I+OAKHK6ENCiqGAjOrDKh3dm/flulkOghxw=; b=Cokp/4UpBKXLTzu3UItZ50xg3pgJZdYLfPbHkqGEKNnOm/hVXxZZD+67VQe2BT5oMz87QK MTcHUuq8XY/4Q9GdfNSmV35yzBmqNmm/TBeya6JKOatpHneJUP0iY7eByAxbrDhStJV3I5 rNyMnwRSG3iK7tTXCnPGsmOaadTpeG8cJPYIsfscmT20jGPaeD2jMEIX+zfqtlQJ70MUmE P1BOB1ZSPDxL488ewkT/fsT/sDncf3gc7Hl/py9FhfVXuHQRTcUxEL67YVY+L3qJhmbfpR L3RSB5DTOBBFZXSxqIagCLizaG4IAElA/tH4qDxks8gBWXBSwVyZ+rYkR1wlkQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775702255; a=rsa-sha256; cv=none; b=JK+YlggKp1rJvGW4E7lpT7Ry3+CQwMp+w3dSF2ZsL6lDKagXvOrrWl/M70fRF/X4y11JxO ctOCGAO2Pmuk3RkJyvjfvGpPYl8k7ozYz2mXVXYjUfvo0XMEabapXtz+OZbqx/fw1qwfJm tmx9PhahiVUi0pjrAWgR7yF2dSFTD1Pw9v0ThRz0QD0Imh2tRkUiN86LqXZ2jf/0mEan7F OXP+4BMhUpIX9SWjUKP6hmaGW+3+m1BL0gzMC9xC9e1gQr5KPEFV9Crq/je4bEQGPl5FvE TqPzPgD1rMajKT0sDwKB1FUMirzKi5/rB2hdLO/t88V4fgX5HemOwysjLsqYQw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775702255; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rtwY1YH0I+OAKHK6ENCiqGAjOrDKh3dm/flulkOghxw=; b=tsrZ8x0v8zqVLLLDbXFY7v6gYwcCKZBA9Y/AMd2B5jZrU4s8OKtH4vyd8UL7pf9XEnQv47 mEJzI6Bt5ZY7JiHruKkLBmgWvGv35iqs46ULT7MYYdDislncEZlC7nwrVKIwb0SERPH/wb +awioN5TNo9HUBJ+BsnrmUgQ9d34TMmagOqeQxMtizYMf5owOGHTAGZAZtiDKpwCZWfN78 DogRO4uOYeIlraWw2GoWdhWbPTwgzGWLtnVIss7ZCYolsNjcOEMf4ZJDpor8v7ButuPfLx 7ObSrAwYEBfgrQLMQ9TxkAmjBzZ7iHojxeFry/NjJo1tRGGeyYbzkovONgeFnQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4frkcH2drxztWt for ; Thu, 09 Apr 2026 02:37:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 41b26 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 09 Apr 2026 02:37:35 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: 9a8d333368ba - main - libc: fix memfd_create's HUGETLB 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: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9a8d333368baef356f0a611b47ec592568dd14f9 Auto-Submitted: auto-generated Date: Thu, 09 Apr 2026 02:37:35 +0000 Message-Id: <69d710ef.41b26.b5557b0@gitrepo.freebsd.org> The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=9a8d333368baef356f0a611b47ec592568dd14f9 commit 9a8d333368baef356f0a611b47ec592568dd14f9 Author: Kyle Evans AuthorDate: 2026-04-09 02:37:00 +0000 Commit: Kyle Evans CommitDate: 2026-04-09 02:37:11 +0000 libc: fix memfd_create's HUGETLB handling The 'simplification' commit referenced below actually broke one aspect of MFD_HUGETLB: the caller isn't supposed to be required to specify a size. MFD_HUGETLB by itself without a shift mask just requests a large page, so we revert that part of memfd_create() back. While we're here, fix up the related parts of the manpages a little bit, since MFD_HUGETLB is actually supported. The manpage claims that we would return ENOSYS if forced mappings weren't supported, but this was actually not true. However, that seems like a very important distinction to make between ENOSYS and EOPNOTSUPP, so fix the implementation to match the docs. Fixes: 8b8cf4ece660f ("memfd_create: simplify HUGETLB support [...]") Reviewed by: kib, markj Differential Revision: https://reviews.freebsd.org/D56114 --- lib/libc/gen/memfd_create.c | 23 +++++++++++++------ lib/libsys/shm_open.2 | 31 ++++++++++++++++++++++---- tests/sys/posixshm/memfd_test.c | 35 +++++++++++++++++++++++++++++ tests/sys/posixshm/posixshm.h | 45 ++++++++++++++++++++++++++++++++++++++ tests/sys/posixshm/posixshm_test.c | 38 +++++++++++--------------------- 5 files changed, 136 insertions(+), 36 deletions(-) diff --git a/lib/libc/gen/memfd_create.c b/lib/libc/gen/memfd_create.c index 78131f46d7b1..8e6c93be4337 100644 --- a/lib/libc/gen/memfd_create.c +++ b/lib/libc/gen/memfd_create.c @@ -95,16 +95,25 @@ memfd_create(const char *name, unsigned int flags) npgs = getpagesizes(pgs, nitems(pgs)); if (npgs == -1) goto clean; - pgsize = (size_t)1 << ((flags & MFD_HUGE_MASK) >> MFD_HUGE_SHIFT); - for (pgidx = 0; pgidx < npgs; pgidx++) { - if (pgsize == pgs[pgidx]) - break; - } - if (pgidx == npgs) { - errno = EOPNOTSUPP; + else if (npgs == 1) { + errno = ENOSYS; goto clean; } + if ((flags & MFD_HUGE_MASK) == 0) { + pgidx = 1; + } else { + pgsize = 1UL << ((flags & MFD_HUGE_MASK) >> MFD_HUGE_SHIFT); + for (pgidx = 1; pgidx < npgs; pgidx++) { + if (pgsize == pgs[pgidx]) + break; + } + if (pgidx == npgs) { + errno = EOPNOTSUPP; + goto clean; + } + } + memset(&slc, 0, sizeof(slc)); slc.psind = pgidx; slc.alloc_policy = SHM_LARGEPAGE_ALLOC_DEFAULT; diff --git a/lib/libsys/shm_open.2 b/lib/libsys/shm_open.2 index c3196d966e6b..58597a341b9e 100644 --- a/lib/libsys/shm_open.2 +++ b/lib/libsys/shm_open.2 @@ -26,7 +26,7 @@ .\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd August 4, 2025 +.Dd March 26, 2025 .Dt SHM_OPEN 2 .Os .Sh NAME @@ -343,7 +343,25 @@ Allow adding seals to the resulting file descriptor using the .Xr fcntl 2 command. .It Dv MFD_HUGETLB -This flag is currently unsupported. +Create a memfd backed by a +.Dq largepage +object. +One of the +.Dv MFD_HUGE_* +flags defined in +.In sys/mman.h +may be included to specify a fixed size. +If a specific size is not requested, the smallest supported large page size is +selected. +.Pp +The behavior documented above for the +.Fn shm_create_largepage +.Fa psind +argument also applies to largepage objects created by +.Fn memfd_create , +and the +.Dv SHM_LARGEPAGE_ALLOC_DEFAULT +policy will always be used. .El .Sh RETURN VALUES If successful, @@ -458,17 +476,22 @@ argument was too long. .Pp An invalid or unsupported flag was included in .Fa flags . +.It Bq Er EINVAL +A hugetlb mapping was requested, but +.Dv MFD_HUGETLB +was not specified in +.Fa flags . .It Bq Er EMFILE The process has already reached its limit for open file descriptors. .It Bq Er ENFILE The system file table is full. .It Bq Er ENOSYS -In -.Fa memfd_create , .Dv MFD_HUGETLB was specified in .Fa flags , and this system does not support forced hugetlb mappings. +.It Bq Er EOPNOTSUPP +This system does not support the requested hugetlb page size. .El .Pp .Fn shm_open diff --git a/tests/sys/posixshm/memfd_test.c b/tests/sys/posixshm/memfd_test.c index 5cae184206b1..387eca4cafe9 100644 --- a/tests/sys/posixshm/memfd_test.c +++ b/tests/sys/posixshm/memfd_test.c @@ -34,6 +34,8 @@ #include #include +#include "posixshm.h" + ATF_TC_WITHOUT_HEAD(basic); ATF_TC_BODY(basic, tc) { @@ -277,6 +279,38 @@ ATF_TC_BODY(immutable_seals, tc) close(fd); } +ATF_TC_WITHOUT_HEAD(hugetlb); +ATF_TC_BODY(hugetlb, tc) +{ + size_t ps[MAXPAGESIZES], pgsize; + int fd, pscnt; + + pscnt = pagesizes(ps, false); +#define MFD_HUGE_SUPPORTED(sz) (sz <= (1 << 24)) +#define MFD_HUGE_FLAGS(sz) (((ffsl(sz) - 1U) << MFD_HUGE_SHIFT) & MFD_HUGE_MASK) + for (int psidx = 1; psidx < pscnt; psidx++) { + pgsize = ps[psidx]; + + if (!MFD_HUGE_SUPPORTED(pgsize)) + continue; + + ATF_REQUIRE_MSG((fd = memfd_create("...", + MFD_HUGETLB | MFD_HUGE_FLAGS(pgsize))) != -1, + "Creating a %zu-size hugetlb memfd", pgsize); + } + + fd = memfd_create("...", MFD_HUGETLB); + if (pscnt == 1) { + ATF_REQUIRE_MSG(fd == -1, + "Creating an unspecified hugetlb memfd without large page support"); + ATF_REQUIRE(errno == ENOSYS); + } else { + ATF_REQUIRE_MSG(fd != -1, + "Creating an unspecified hugetlb memfd with large page support"); + close(fd); + } +} + ATF_TP_ADD_TCS(tp) { @@ -289,5 +323,6 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, get_seals); ATF_TP_ADD_TC(tp, dup_seals); ATF_TP_ADD_TC(tp, immutable_seals); + ATF_TP_ADD_TC(tp, hugetlb); return (atf_no_error()); } diff --git a/tests/sys/posixshm/posixshm.h b/tests/sys/posixshm/posixshm.h new file mode 100644 index 000000000000..84c73e0d10df --- /dev/null +++ b/tests/sys/posixshm/posixshm.h @@ -0,0 +1,45 @@ +/*- + * + * Copyright (c) 2020 Klara, Inc. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +#include + +#include + +static int +pagesizes(size_t ps[MAXPAGESIZES], bool required) +{ + int pscnt; + + pscnt = getpagesizes(ps, MAXPAGESIZES); + ATF_REQUIRE_MSG(pscnt != -1, "getpagesizes failed; errno=%d", errno); + ATF_REQUIRE_MSG(ps[0] != 0, "psind 0 is %zu", ps[0]); + ATF_REQUIRE_MSG(pscnt <= MAXPAGESIZES, "invalid pscnt %d", pscnt); + if (pscnt == 1 && required) + atf_tc_skip("no large page support"); + return (pscnt); +} + diff --git a/tests/sys/posixshm/posixshm_test.c b/tests/sys/posixshm/posixshm_test.c index 55514a5f4bde..680a443b6eac 100644 --- a/tests/sys/posixshm/posixshm_test.c +++ b/tests/sys/posixshm/posixshm_test.c @@ -49,6 +49,8 @@ #include +#include "posixshm.h" + #define TEST_PATH_LEN 256 static char test_path[TEST_PATH_LEN]; static char test_path2[TEST_PATH_LEN]; @@ -1239,20 +1241,6 @@ shm_open_large(int psind, int policy, size_t sz) return (fd); } -static int -pagesizes(size_t ps[MAXPAGESIZES]) -{ - int pscnt; - - pscnt = getpagesizes(ps, MAXPAGESIZES); - ATF_REQUIRE_MSG(pscnt != -1, "getpagesizes failed; errno=%d", errno); - ATF_REQUIRE_MSG(ps[0] != 0, "psind 0 is %zu", ps[0]); - ATF_REQUIRE_MSG(pscnt <= MAXPAGESIZES, "invalid pscnt %d", pscnt); - if (pscnt == 1) - atf_tc_skip("no large page support"); - return (pscnt); -} - ATF_TC_WITHOUT_HEAD(largepage_basic); ATF_TC_BODY(largepage_basic, tc) { @@ -1261,7 +1249,7 @@ ATF_TC_BODY(largepage_basic, tc) size_t ps[MAXPAGESIZES]; int error, fd, pscnt; - pscnt = pagesizes(ps); + pscnt = pagesizes(ps, true); zeroes = calloc(1, ps[0]); ATF_REQUIRE(zeroes != NULL); for (int i = 1; i < pscnt; i++) { @@ -1317,7 +1305,7 @@ ATF_TC_BODY(largepage_config, tc) size_t ps[MAXPAGESIZES + 1]; /* silence warnings if MAXPAGESIZES == 1 */ int error, fd; - (void)pagesizes(ps); + (void)pagesizes(ps, true); fd = shm_open(SHM_ANON, O_CREAT | O_RDWR, 0); ATF_REQUIRE_MSG(fd >= 0, "shm_open failed; error=%d", errno); @@ -1379,7 +1367,7 @@ ATF_TC_BODY(largepage_mmap, tc) size_t ps[MAXPAGESIZES]; int fd, pscnt; - pscnt = pagesizes(ps); + pscnt = pagesizes(ps, true); for (int i = 1; i < pscnt; i++) { fd = shm_open_large(i, SHM_LARGEPAGE_ALLOC_DEFAULT, ps[i]); @@ -1475,7 +1463,7 @@ ATF_TC_BODY(largepage_munmap, tc) size_t ps[MAXPAGESIZES], ps1; int fd, pscnt; - pscnt = pagesizes(ps); + pscnt = pagesizes(ps, true); for (int i = 1; i < pscnt; i++) { fd = shm_open_large(i, SHM_LARGEPAGE_ALLOC_DEFAULT, ps[i]); ps1 = ps[i - 1]; @@ -1526,7 +1514,7 @@ ATF_TC_BODY(largepage_madvise, tc) size_t ps[MAXPAGESIZES]; int fd, pscnt; - pscnt = pagesizes(ps); + pscnt = pagesizes(ps, true); for (int i = 1; i < pscnt; i++) { fd = shm_open_large(i, SHM_LARGEPAGE_ALLOC_DEFAULT, ps[i]); addr = mmap(NULL, ps[i], PROT_READ | PROT_WRITE, MAP_SHARED, fd, @@ -1595,7 +1583,7 @@ ATF_TC_BODY(largepage_mlock, tc) "sysctlbyname(vm.stats.vm.v_user_wire_count) failed; error=%d", errno); - pscnt = pagesizes(ps); + pscnt = pagesizes(ps, true); for (int i = 1; i < pscnt; i++) { if (ps[i] / ps[0] > max_wired - wired) { /* Cannot wire past the limit. */ @@ -1638,7 +1626,7 @@ ATF_TC_BODY(largepage_msync, tc) size_t ps[MAXPAGESIZES]; int fd, pscnt; - pscnt = pagesizes(ps); + pscnt = pagesizes(ps, true); for (int i = 1; i < pscnt; i++) { fd = shm_open_large(i, SHM_LARGEPAGE_ALLOC_DEFAULT, ps[i]); addr = mmap(NULL, ps[i], PROT_READ | PROT_WRITE, MAP_SHARED, fd, @@ -1697,7 +1685,7 @@ ATF_TC_BODY(largepage_mprotect, tc) size_t ps[MAXPAGESIZES]; int fd, pscnt; - pscnt = pagesizes(ps); + pscnt = pagesizes(ps, true); for (int i = 1; i < pscnt; i++) { /* * Reserve a contiguous region in the address space to avoid @@ -1767,7 +1755,7 @@ ATF_TC_BODY(largepage_minherit, tc) pid_t child; int fd, pscnt, status; - pscnt = pagesizes(ps); + pscnt = pagesizes(ps, true); for (int i = 1; i < pscnt; i++) { fd = shm_open_large(i, SHM_LARGEPAGE_ALLOC_DEFAULT, ps[i]); addr = mmap(NULL, ps[i], PROT_READ | PROT_WRITE, MAP_SHARED, fd, @@ -1855,7 +1843,7 @@ ATF_TC_BODY(largepage_pipe, tc) int fd, pfd[2], pscnt, status; pid_t child; - pscnt = pagesizes(ps); + pscnt = pagesizes(ps, true); for (int i = 1; i < pscnt; i++) { fd = shm_open_large(i, SHM_LARGEPAGE_ALLOC_DEFAULT, ps[i]); @@ -1908,7 +1896,7 @@ ATF_TC_BODY(largepage_reopen, tc) size_t ps[MAXPAGESIZES]; int fd, psind; - (void)pagesizes(ps); + (void)pagesizes(ps, true); psind = 1; gen_test_path(); From nobody Thu Apr 9 02:41:23 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4frkhg5hdPz6YGLD for ; Thu, 09 Apr 2026 02:41: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4frkhg29zGz3X5b for ; Thu, 09 Apr 2026 02:41:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775702483; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=l26Bfx7uX7Q3JPcprV9PB3wKUw+QAldY5t5fIJhuxR0=; b=QDUuE59c/USTrfQyoGnXdTQ6ZnYlQ5v5s2y6mTarDA0TVVn2XSly0FIrxRR4TTapnYFwdK zSqa09GweDD1m4zI3VOJmMlU4XGrQqPG877JKkeGUMUROJFfM7irXueAVV7GK6gqpfeuUL Url3Jl14tJviuxDe4oSh4wP7/tqish71082nE24gbA+uXYsERpU+bKIhNVryAWMlyGbZvI ehJeirzKBSDx8R2m4gPzhnJaCo2GV1ly4ULASfcJrMueSSlclC1J/yjtTVZH0PCZm9WN78 U0wG5ICRDMgtXGIwD1sHKTwAbJU+iCaD7XJGrAh3Ybfo46kbi0dc8oUsLstjCg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775702483; a=rsa-sha256; cv=none; b=t0ReGBTdGdjShffaqRGDYOWlZ3gMh1hUesTVp/CEsUiDqWpVHttugFBbehhDiTmSnWmOZc oDjc2548Q488NadH3Vo+E01Cb11ogtGnSeaxZcUyEseW0ym1fIT+lebDMYUPNG20gqOOei a0hCNfh8/dUvL4X5zgSKtx8ypCkmStdjdMUfZ8/pyx6aPLgVFdN2rrjDFKvs4nQrJzyeUA 6SVp2a7nSz1xRg5KtY1z2RQMGdJYIVwmIpt81o9qtw2l62ZLWIWGJIYoEEzlftryXMgHH1 rrAYZGZfr3nqK4PGR1V4VsG9cWSnKLI3krjLy0BcB9WkqDlZPLnEcu/HEI37Hw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775702483; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=l26Bfx7uX7Q3JPcprV9PB3wKUw+QAldY5t5fIJhuxR0=; b=W43FVjczDTVtE3EXDhZDo/ynoF4j+t7mx8QHl2mel/3olcwOVUfsMLx2Bvm5kqT8Ax4V9u krxGswMHRAkbr+3EDLTHvbxJZseNM7XhvehEjke46uKrwZso9lsNjkU8blHuLv1zhPOEHX Z0HvY81flAs4FjphDihr553o0QwmLiadSHveLIlYHpygoSkQIzC/A8I+aE1Cg7b92eou2I VUI6JL5uvbnv3zq+AlOX4gg0pzPzS+wXZSwWGYNUTjjkOezNXgKdDMzL+uPt2xb93xoiCL 8Ut7afBHfY0okGHfEtCz9/7NUGYoFwspVAl2jwrnREz1vhkpeNV66AxGHDIeEw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4frkhg1GcNzv6N for ; Thu, 09 Apr 2026 02:41:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 42940 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 09 Apr 2026 02:41:23 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: 84ce651836e0 - main - : use designated initializers for EXTATTR_NAMESPACE_NAMES List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 84ce651836e0d037f611cd33a5c65e1d57049432 Auto-Submitted: auto-generated Date: Thu, 09 Apr 2026 02:41:23 +0000 Message-Id: <69d711d3.42940.7e1164c8@gitrepo.freebsd.org> The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=84ce651836e0d037f611cd33a5c65e1d57049432 commit 84ce651836e0d037f611cd33a5c65e1d57049432 Author: Kyle Evans AuthorDate: 2026-04-09 02:41:12 +0000 Commit: Kyle Evans CommitDate: 2026-04-09 02:41:12 +0000 : use designated initializers for EXTATTR_NAMESPACE_NAMES This is not a functional change, but it makes it more clear upon inspection of the definition that the mapping property described is preserved. Maybe more importantly, if one ends up getting an index wrong or punching a hole in the name array unexpectedly, then it'll hopefully manifest more clearly as a (null) or nullptr deref rather than potentially just emitting the wrong namespace name. It's noted that this almost certainly invalidates its use in C++, but there aren't really any known C++ consumers of it- let's just cross that bridge if we get there. Reviewed by: kib, mckusick, rmacklem Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D55323 --- sys/sys/extattr.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/sys/extattr.h b/sys/sys/extattr.h index 4aabb4af667b..91bc5210a541 100644 --- a/sys/sys/extattr.h +++ b/sys/sys/extattr.h @@ -53,9 +53,9 @@ * char *extattr_namespace_names[] = EXTATTR_NAMESPACE_NAMES; */ #define EXTATTR_NAMESPACE_NAMES { \ - EXTATTR_NAMESPACE_EMPTY_STRING, \ - EXTATTR_NAMESPACE_USER_STRING, \ - EXTATTR_NAMESPACE_SYSTEM_STRING } + [EXTATTR_NAMESPACE_EMPTY] = EXTATTR_NAMESPACE_EMPTY_STRING, \ + [EXTATTR_NAMESPACE_USER] = EXTATTR_NAMESPACE_USER_STRING, \ + [EXTATTR_NAMESPACE_SYSTEM] = EXTATTR_NAMESPACE_SYSTEM_STRING } #define EXTATTR_MAXNAMELEN NAME_MAX From nobody Thu Apr 9 02:41:22 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4frkhf2Kcdz6YGQL for ; Thu, 09 Apr 2026 02:41: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4frkhf0tPzz3XB7 for ; Thu, 09 Apr 2026 02:41:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775702482; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=erWZrasvZVEncoBLqovACiFzm/c4R+iV8a0xHu7g3yM=; b=tdrawWH/NhShIen1loFl/GheHrNyWL9B8e54f8TXOu4pFfD4DzHvJlVsXkGe4Pze2npPME EAvqYR9ywhkD3lOYczXT3w+m7mifa085lG+gSH4h5fB/z3bgp3JPysgnf53gw6ifJv2zsz Rz6mbBC4dCk2PFYHxwPCgHaQ2qSjfcJXBnVWOheylepH42Tu/3d5hGvlIGqyNjeqoUF3xS QZ2mQW8SOemSjQGaeY9EkCWUfDHawtUoVbzqL0I8rsS4EkILL4RO4vCXhwjzrSk20ogMsn Xg5EuHvByhCqtoLc9mQyqO+3dbsBtFw+u1DYEDQ9Aq+pk4geroK9tAURaOGdlA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775702482; a=rsa-sha256; cv=none; b=ChBTSAuPy50DDRpOGtVqbuYo5J57ZwuXC/1r0NdmzUCCLD9VsYhVxf4xE+VLLLk31bUOxQ HfBgpqVsh2PqgalCR6Q912+UbNdkZWCn8PWNmur2BB6A7VxB2YCwwgtvAWQZx5jAm2PMWg AYSswc8iSlLzpqq9Vj4lvLgegXYP/9k+ifGimWzdhk2vL2wVwD8WEtOAYtAUQf44lCOxGW 3k+wqfZaAQK+K6DZbBml72vqfucdC3Htfq1/zt/dshfs9zcOEdCzHI9VyvFb0KPrHrDhPo gE64g3G8A1QQYEMPemp2FbmXaEV/LaXJVRJCJmjmwWQnnMD4fFmB4lhh5V+2wg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775702482; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=erWZrasvZVEncoBLqovACiFzm/c4R+iV8a0xHu7g3yM=; b=fAcPbP+PjE1acz8JoT08LFyCmzP6NTJlJVU5vSzzwkeRcbv+I/CuyZ2s1c0GA1HDIKaQYF TYfm4fF7k7mmcrm3lr74+upoItfsg8gu9KlbTnerVe4t6pV1uZjUWYc8ypzbn/lUHUC7/j 142XwRmc6Oy3lphfdOh9cExiMK0DPS0TIY6OejmwFAhGhu9P5KQwPQexvIKSLzNixSJf6d pBwXa+5fsV1EWt0hBOSNm7mxZmMxhtXklLsmX52akxmZfADBjK/m1n73gWg2vC0OiNM6P6 dyHokKSznCeEhCwzCwFfnwMXde6EF2YSE01Gewy4DhEv3b3PpBvti5Or07aYmw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4frkhf0Rmdztln for ; Thu, 09 Apr 2026 02:41:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 4174b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 09 Apr 2026 02:41:22 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: 22fba3a9d641 - main - find: add -xattr and -xttrname List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 22fba3a9d64140d80a9e2093cfc02c9c503b2e19 Auto-Submitted: auto-generated Date: Thu, 09 Apr 2026 02:41:22 +0000 Message-Id: <69d711d2.4174b.38e1f303@gitrepo.freebsd.org> The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=22fba3a9d64140d80a9e2093cfc02c9c503b2e19 commit 22fba3a9d64140d80a9e2093cfc02c9c503b2e19 Author: Kyle Evans AuthorDate: 2026-04-09 02:41:12 +0000 Commit: Kyle Evans CommitDate: 2026-04-09 02:41:12 +0000 find: add -xattr and -xttrname We use -xattr in our openrsync tests for convenience, and it seems like a good addition to FreeBSD. -xattr and -xattrname will both consult all available namespaces by default, but -xattrname allows filtering by namespace using a "user:" or "system:" prefix. Inspired by: https://github.com/apple-oss-distributions/shell_cmds Reviewed by: kib, rmacklem Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D55286 --- usr.bin/find/extern.h | 2 + usr.bin/find/find.1 | 23 +++++++++- usr.bin/find/function.c | 94 +++++++++++++++++++++++++++++++++++++++++ usr.bin/find/option.c | 2 + usr.bin/find/tests/find_test.sh | 80 +++++++++++++++++++++++++++++++++++ 5 files changed, 199 insertions(+), 2 deletions(-) diff --git a/usr.bin/find/extern.h b/usr.bin/find/extern.h index 02c85d06a34c..250b5fb6689c 100644 --- a/usr.bin/find/extern.h +++ b/usr.bin/find/extern.h @@ -122,6 +122,8 @@ exec_f f_sparse; exec_f f_type; exec_f f_user; exec_f f_writable; +exec_f f_xattr; +exec_f f_xattrname; extern int ftsoptions, ignore_readdir_race, isdepth, isoutput; extern int issort, isxargs; diff --git a/usr.bin/find/find.1 b/usr.bin/find/find.1 index 98521a98762d..afe10a36607d 100644 --- a/usr.bin/find/find.1 +++ b/usr.bin/find/find.1 @@ -28,7 +28,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd July 26, 2025 +.Dd February 14, 2026 .Dt FIND 1 .Os .Sh NAME @@ -976,6 +976,23 @@ This test makes use of the .Xr access 2 system call, and so can be fooled by NFS servers which do UID mapping (or root-squashing). This is a GNU find extension. +.It Ic -xattr +Matches files which have extended attributes set in any supported namespace. +.It Ic -xattrname Ar xattr +Matches files which have the specified +.Ar xattr +extended attribute set. +All supported namespaces are searched by default, but +.Ar xattr +may be prefixed with +.Dq user: +or +.Dq system: +to filter by namespace. +.Pp +Note that named attributes are not supported, only extended attributes as set +by, e.g., +.Xr setextattr 8 . .El .Sh OPERATORS The primaries may be combined using the following operators. @@ -1245,6 +1262,7 @@ section below for details. .Xr whereis 1 , .Xr which 1 , .Xr xargs 1 , +.Xr extattr 2 , .Xr stat 2 , .Xr acl 3 , .Xr fts 3 , @@ -1253,7 +1271,8 @@ section below for details. .Xr strmode 3 , .Xr ascii 7 , .Xr re_format 7 , -.Xr symlink 7 +.Xr symlink 7 , +.Xr setextattr 8 .Sh STANDARDS The .Nm diff --git a/usr.bin/find/function.c b/usr.bin/find/function.c index b260a71ef4a9..c62ac39a9e82 100644 --- a/usr.bin/find/function.c +++ b/usr.bin/find/function.c @@ -37,6 +37,7 @@ #include #include #include +#include #include #include @@ -49,6 +50,7 @@ #include #include #include +#include #include #include #include @@ -57,6 +59,8 @@ #include "find.h" +static const char * const xattr_ns[] = EXTATTR_NAMESPACE_NAMES; + static PLAN *palloc(OPTION *); static long long find_parsenum(PLAN *, const char *, char *, char *); static long long find_parsetime(PLAN *, const char *, char *); @@ -1752,6 +1756,96 @@ c_user(OPTION *option, char ***argvp) return new; } +/* + * -xattr functions -- + * + * True if the entry has any extended attribute in any namespace. + */ +int +f_xattr(PLAN *plan __unused, FTSENT *entry) +{ + ssize_t asz; + bool deref_link; + + deref_link = (ftsoptions & FTS_LOGICAL) != 0; + if (entry->fts_level == 0 && (ftsoptions & FTS_COMFOLLOW) != 0) + deref_link = true; + + for (size_t ns = 0; ns < nitems(xattr_ns); ns++) { + if (ns == EXTATTR_NAMESPACE_EMPTY) + continue; + + if (deref_link) + asz = extattr_list_file(entry->fts_accpath, ns, NULL, 0); + else + asz = extattr_list_link(entry->fts_accpath, ns, NULL, 0); + if (asz > 0) + return 1; + } + + return 0; +} + +static bool +find_has_xattr(const char *path, int ns, const char *aname, bool deref_link) +{ + size_t asz; + + if (deref_link) + asz = extattr_get_file(path, ns, aname, NULL, 0); + else + asz = extattr_get_link(path, ns, aname, NULL, 0); + + return asz != (size_t)-1; +} + +/* + * -xattrname xattr functions -- + * + * True if the entry has the given extended attribute xattr. The xattr + * may be prefixed with "user:" or "system:" to scope the search + * explicitly, otherwise we assume the user namespace is requested. + */ +int +f_xattrname(PLAN *plan, FTSENT *entry) +{ + const char *aname; + bool deref_link; + + deref_link = (ftsoptions & FTS_LOGICAL) != 0; + if (entry->fts_level == 0 && (ftsoptions & FTS_COMFOLLOW) != 0) + deref_link = true; + + aname = plan->c_data; + for (size_t ns = 0; ns < nitems(xattr_ns); ns++) { + const char *name; + size_t namelen; + + if (ns == EXTATTR_NAMESPACE_EMPTY) + continue; + + name = xattr_ns[ns]; + namelen = strlen(xattr_ns[ns]); + if (strncmp(aname, name, namelen) == 0 && + aname[namelen] == ':') { + aname += namelen + 1; + return find_has_xattr(entry->fts_accpath, ns, aname, + deref_link); + } + } + + for (size_t ns = 0; ns < nitems(xattr_ns); ns++) { + if (ns == EXTATTR_NAMESPACE_EMPTY) + continue; + + if (find_has_xattr(entry->fts_accpath, ns, aname, + deref_link)) + return 1; + } + + return 0; +} + /* * -xdev functions -- * diff --git a/usr.bin/find/option.c b/usr.bin/find/option.c index fa09231a3152..fe3d9b00f90f 100644 --- a/usr.bin/find/option.c +++ b/usr.bin/find/option.c @@ -162,6 +162,8 @@ static OPTION const options[] = { { "-user", c_user, f_user, 0 }, { "-wholename", c_name, f_path, 0 }, { "-writable", c_simple, f_writable, 0 }, + { "-xattr", c_simple, f_xattr, 0 }, + { "-xattrname", c_name, f_xattrname, 0 }, { "-xdev", c_xdev, f_always_true, 0 }, // -xtype }; diff --git a/usr.bin/find/tests/find_test.sh b/usr.bin/find/tests/find_test.sh index 99d2f6af4d45..deb6a66a8dfb 100755 --- a/usr.bin/find/tests/find_test.sh +++ b/usr.bin/find/tests/find_test.sh @@ -174,9 +174,89 @@ find_printf_body() find -s dir -printf '%Te\n' } +atf_test_case find_xattr +find_xattr_head() +{ + atf_set "descr" "Test the -xattr primary" +} +find_xattr_body() +{ + mkdir dir + ln -s dir dirlink + + # No xattrs here + atf_check find dir -xattr + atf_check find dirlink -xattr + + # Set one on the directory and be sure that we also dereference symlinks + # as appropriate with -H/-L. + if ! setextattr user find_test.attr val dir; then + atf_skip "Failed to set xattr (not supported on this fs?)" + fi + + atf_check -o match:"dir$" find dir -xattr + atf_check -o match:"dirlink$" find -H dirlink -xattr + atf_check -o match:"dirlink$" find -L dirlink -xattr + + atf_check -o match:"dir$" -o match:"dirlink" find -sL . -xattr + atf_check -o match:"dir$" -o not-match:"dirlink$" find -sH . -xattr + atf_check -o match:"dir$" -o not-match:"dirlink$" find -s . -xattr +} + +atf_test_case find_xattrname +find_xattrname_head() +{ + atf_set "descr" "Test the -xattrname primary" + atf_set "require.user" "root" +} +find_xattrname_body() +{ + touch foo bar baz none + + ln -s foo link + if ! setextattr user find_test.special1 val foo; then + atf_skip "Failed to set xattr (not supported on this fs?)" + fi + + atf_check setextattr user find_test.special2 val bar + atf_check setextattr user find_test.special2 val baz + + # We want an unqualified 'find_test.special2' search to find all three + # of these, while 'user:' and 'system:' filter appropriately. + atf_check setextattr system find_test.special2 val foo + + atf_check find . -xattrname 'find_test.special3' + + # Be sure that we get symlink dereferencing right, so that one can use + # -H/-L/-P to get the right behavior. + atf_check -o match:foo -o not-match:"bar|baz|link|none" \ + find . -xattrname 'find_test.special1' + atf_check -o match:foo -o match:link \ + find -H foo link -xattrname 'find_test.special1' + atf_check -o match:foo -o match:link -o not-match:"bar|baz|none" \ + find -L . -xattrname 'find_test.special1' + + atf_check -o match:foo -o match:bar -o match:baz \ + -o not-match:"none|link" find . -xattrname 'find_test.special2' + atf_check -o not-match:"foo|none|link" -o match:bar -o match:baz \ + find . -xattrname 'user:find_test.special2' + atf_check -o match:foo -o not-match:"bar|baz|none|link" \ + find . -xattrname 'system:find_test.special2' + + # Now set an extattr on the link itself and be sure that find(1) can + # detect it. With -L, we shouldn't see anything with a special3 xattr + # as symlinks are dereferenced. + atf_check setextattr -h user find_test.special3 val link + atf_check -o match:link find . -xattrname "find_test.special3" + atf_check find -L . -xattrname "find_test.special3" + atf_check find -H link -xattrname "find_test.special3" +} + atf_init_test_cases() { atf_add_test_case find_newer_link atf_add_test_case find_samefile_link atf_add_test_case find_printf + atf_add_test_case find_xattr + atf_add_test_case find_xattrname } From nobody Thu Apr 9 04:07:38 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4frmcB4SQwz6YNZv for ; Thu, 09 Apr 2026 04:07: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4frmcB3ZdYz3gdH for ; Thu, 09 Apr 2026 04:07:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775707658; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Rc7mRav48ajih8pKroqDhSef+q2zm6fsZ7hSfLahHkg=; b=iKDw3xEyHqNn4mRn0D7e8kSagtYx3eY+LfgRl0iSNqc04FDX3Nht66ZfOJCynMaHs/FvNM JICQkcv6iv587useWOyioiCgpkAWqlFdk0h9diR+1R+e7G4562AD9TJ9bGhZjbwxVLKQCg hp+vL5nwQLny7ubZKWSHHXsne0tk3Vyp7+pUaAMEhbZIypQvMgN9nD1RenZC6/0OLyD1VO jpXLp//ZMCK5AX3Jx6GqoUxSpVP+nkZqQW3Klg2m25hnOcCnEs5hNAgcrF85w4pW7hkaw4 ebK0JTL7estEHAuCZmCcOVaAOEZ8JmtxVKudmLeR+p0UxAFKMKWvgdMg8DfztQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775707658; a=rsa-sha256; cv=none; b=fDxDTgg+JDaSpGDFU5mVYMK9w7Zr0U2Ywz/V2r/Et7TbOZo9VCFiPMVQEE2Gry9xpj8frb Z70ylzxlRyZNa2rzAx64IacDblFi03YYS3h1AxGok0h5e1YzA7a7QsFwHS/+LcuPSN9rrC QVcV+tkxaBJoSRlaTyfcZr5EgolsUAIP6WozH3vaWZE4UQfffwcqub7Gn85F0+ioH9L7+L zCsOEMyCaB6J5nUY7mOt5Dh1nawax9crCiIhgoj/0uiHhuSL5LzDHiKxWXM7UTaFAJauUG MXOApTW/Tfuws5U5VOOQSwnjtDtqNL1uTdZRNJvQwQtUGS4Ej2QPxsXPdVLvlA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775707658; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Rc7mRav48ajih8pKroqDhSef+q2zm6fsZ7hSfLahHkg=; b=nDtceYKVp8QQteOtLJEnlFXQmC/D7TXAASKQcbU72N201gaEHlr1f7c48znQscyz1F85PF xdXXbMIK13brTD5LcdEmPnNOA8jbPXa7lXKJMde2GFeQppU2Vq/Bw8UlGRfkVKpwsnCufv Ac/9aVVnA/qYsB5WaRLU2ZzhipS/GkdZGLmsw2lENVA2JUuBYRavVhhJK9Cp1MbpalQxZF Gk7SzjA4EqrBhznLoq7MO8+c6A2Xta8PoBO9tz3VrHULtDc43NO7tO2xgOpQVGLbp+AMX0 EEHbYqWQHJ5ppSQMD7I6bpuFOgkY3iUramByB+9IUArCcd5FdQ1/R+SrlZvCqw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4frmcB2cC4zwbf for ; Thu, 09 Apr 2026 04:07:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1bfd2 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 09 Apr 2026 04:07:38 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Li-Wen Hsu Subject: git: 45079cdf8b51 - main - installer: Add download.freebsd.org to mirror list List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: 45079cdf8b517adf803db7dc7aa85e5728cfeb2f Auto-Submitted: auto-generated Date: Thu, 09 Apr 2026 04:07:38 +0000 Message-Id: <69d7260a.1bfd2.12f36042@gitrepo.freebsd.org> The branch main has been updated by lwhsu: URL: https://cgit.FreeBSD.org/src/commit/?id=45079cdf8b517adf803db7dc7aa85e5728cfeb2f commit 45079cdf8b517adf803db7dc7aa85e5728cfeb2f Author: Li-Wen Hsu AuthorDate: 2026-04-09 04:06:19 +0000 Commit: Li-Wen Hsu CommitDate: 2026-04-09 04:06:19 +0000 installer: Add download.freebsd.org to mirror list download.freebsd.org is backed by project mirrors and a CDN, which should benefit most users. Sponsored by: The FreeBSD Foundation Reviewed by: delphij (releng) MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D54849 --- usr.sbin/bsdinstall/scripts/mirrorselect | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/usr.sbin/bsdinstall/scripts/mirrorselect b/usr.sbin/bsdinstall/scripts/mirrorselect index 65a662b2df62..835db62b220c 100755 --- a/usr.sbin/bsdinstall/scripts/mirrorselect +++ b/usr.sbin/bsdinstall/scripts/mirrorselect @@ -40,6 +40,7 @@ MIRROR=`bsddialog --backtitle "$OSNAME Installer" \ --title "Mirror Selection" --extra-button --extra-label "Other" \ --menu "Please select the best suitable site for you or \"other\" if you want to specify a different choice. The \"Main Site\" directs users to the nearest project managed mirror via GeoDNS (they carry the full range of possible distributions and support both IPv4 and IPv6). All other sites are known as \"Community Mirrors\"; not every site listed here carries more than the base distribution kits. Select a site!" \ 0 0 16 \ + http://download.freebsd.org "Main Site (GeoDNS, CDN, HTTP)"\ http://ftp.freebsd.org "Main Site (GeoDNS, HTTP)"\ ftp://ftp.freebsd.org "Main Site (GeoDNS, FTP)"\ http://ftp.au.freebsd.org "Australia - IPv6"\ @@ -102,7 +103,17 @@ case ${_UNAME_R} in ;; esac -BSDINSTALL_DISTSITE="$MIRROR/pub/FreeBSD/${RELDIR}/`uname -m`/`uname -p`/${_UNAME_R}" +case ${MIRROR} in + *ftp*) + BSDINSTALL_DISTSITE="$MIRROR/pub/FreeBSD" + ;; + *) + BSDINSTALL_DISTSITE="$MIRROR" + ;; + +esac + +BSDINSTALL_DISTSITE="${BSDINSTALL_DISTSITE}/${RELDIR}/`uname -m`/`uname -p`/${_UNAME_R}" case $MIRROR_BUTTON in $BSDDIALOG_ERROR | $BSDDIALOG_CANCEL | $BSDDIALOG_ESC) From nobody Thu Apr 9 04:52:04 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4frnbg1CqPz6YRmw for ; Thu, 09 Apr 2026 04:52:15 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic304-23.consmr.mail.gq1.yahoo.com (sonic304-23.consmr.mail.gq1.yahoo.com [98.137.68.204]) (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 4frnbf50fwz3mkT for ; Thu, 09 Apr 2026 04:52:14 +0000 (UTC) (envelope-from marklmi@yahoo.com) Authentication-Results: mx1.freebsd.org; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1775710327; bh=UbgfoYazNfKNTXBOhH4E4UcLBh9DkXvfVvsyX0tK5LA=; h=Date:Subject:To:References:From:In-Reply-To:From:Subject:Reply-To; b=LsbuApkSwkiadYWKElvmyzPtfqTOyaqGR15jR3iOqZTmLBME3vBLGiBz7oN4i9XfAEmQKJ6gJMotiifYmHauS+MLYHerekAOyfaqNJAwAWSfz0PQeUZb2GhXMAgsJv4FfyuZGzIj7ky7JyMinXRlfViCL0stJI4wb5HcXFEzbWN+UxFB+lEEro70B8ABtv2Ud+HmGqmjvq1S5bkJn4uIyIHd+AiRJL12FrvXxWam45qHkON9kTabIp0XBJ2W4WFT+cTPE+mySGFP6IV1GBp4e5GUoC4GIUpTczLMptQ06hJC9KV/8lG3XhWv6UoVjN1adggfkS1iYf6HC7piv9p1Qg== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1775710327; bh=4G22QzXV19UBkZSmS7YiBfqCg/xqrJiJ4DDUpmDayYg=; h=X-Sonic-MF:Date:Subject:To:From:From:Subject; b=BDy4Di+UiMfuv5o6wpobm29XDrYNuLekX6UjXzaGf0mseX2HB7Ivl3E1wT2VP5Eno6MqtsqQGuOZf0GlmOnDTBNro7OvOtJ8e9zuXP/KyjfH5dd5XI0BZnBkyF9gCgot/mQ5/nK/OvVaB3dO8Lkpzk2Y6vIBNErgw2NXkS4ulYnl/Hug6jpWflrhevkWXs7f++IYZRT9nDMZqc5U0haPjrZbiIxZHXKShCibXzuX1M+C1O0yhbkrIbtEk/Mja/+P3I8a7x3L5CO2DkOvL5RuFXkoU1Uu4LiM2JjdyXpVwVmAIO1a2FwU2E9pBBzO5GQKD5kM7JcjDRoohaFuW7zhRA== X-YMail-OSG: FVlfZ28VM1kWc0pL3424htWzo12Oy2oGJpk5fM7itjB5Y8vn0vjkwYn8qbBdHC7 yrZYd99IoZU0wXinzp80OxEeNPa5A6ba431zcl8j1vSKEXamjBCg6fBgCgVTVjJaQ.fxZ0533S95 Fj3v.QSW071tRKqFzN0OVqRH8aKwwtBwtp9dqpjuHTf6L3IiI1H5y2zMHnPZZempTF5dRfDjVdC4 clMqi1N8naef03XfoPhyTtpK1jF3uBYdwKvQjBEYbWQRqneapOmaZjGV32WxFzFxJ5VMQiURnqOg 8eH93Ozr0pl1FSYP6HCH7wAKw3V6uXhHpqZ_qLVq9t77jyUJDjCxX5Ad4mWjQxJBcu2Euc2RYZkR oVNjxF7XpQe2cs4vlib5ZV1ypwNo38R0gac2pJNpR4ua5ogj.4p8Jtxn7Z130wpOwPxhanOoW8C3 paFEdiCaE41cqMPHxYPA3VflUr3gDRUWE1HT.dHCNMlfGcaQK6Ofk7gagFgfLtJ8kUcCG9HxhDvP jVuuWqFcmKn8wpUEGoT9jcJ0NprB6CLNxkpL_9zdOk507TfBbry5WwuJGTIxVQCbECmxpZVtZhPN .OTcORamZKCLELjbK_2qJvIVdMOldwvo00P8LYVEuX8ABeWTL1PTWpsG9T7GDAuEvB87K3vTdLlW 1gm_IJmE73lG2xeaDRjPmuQeevxxDTwpBTshUlM_n2O1TTK4iDB27j.BXIDLKefDamjGFpf3HxtV wrH20M0c5bAwpCpkLgaY3jZ.F63XMVYItsKeVV9OyEtVOenvWjnT1slI4rhsZgw2YnpYJyQX.6u7 dBkWGbe6uX5vBdEQcM.aexR_01CDUHnUEBqqjPWksVZFRpP.qKfgIq6Cqh7dY2gzqPDQ5_CnIlxX grQ9tWWfwUpReIgjqC5tfyNEiPWokBwjRXP0x_sasltDXP2EuMJ3V5jnitVVj_bXIyanOAWm4GYf q1oUG0FSXzju1VHzzXYM5htztq6iD0OMCf5h17RMj97TmUTenw0dhtg2cuSOPFCjZ3w7HrVyD19w j9erok4K79EZQ11PNhqsdSaf3EHN4E5VADt0_eZmekH00z4SRnudpptwRreZyj_1qizPD.ZHnkmF _1qj1qNtA0jZ3BcZxr482xdnyIkFmweFNNKpbsvsVB8sq1N4GkLnjXiHPRxiSaEFrHKUfpGIUI.i i5hMoHiQRALFsV3Tzu7rdgp4bNoBalm0oJM7aPVQGxJ.0SuoBS2bdaqWnwIKdEYLrqODayseHATk 5WSll6vECfjAcqO.yIc0v0JFOp.GOzWAUsgYEJ7MlVkauYhEr2jWJnQWH8EOR3jSq2Ke8PGKWWnU Z_x3P.q66y3gFRk8q9kg3SfW2H0AZkC2K3mVVdaCuVwhEAfGZ3_.tXX8akRJrQ7Ds0pSDBeCm699 ROKbLRi43QlgMI5PY65W5j9llzYjqUihmlxXNEyqozajC2DBk3t.EQlAJp__dqOW4NEvBsxRM9wP jTv7orDpzqMRDAptnlG9951SrtNS_nfHOyD8h48jPMJxm1Fr1bk9eRuCB5P6XU521nFKuWAZnVUJ x58CA1grvYQIV3Hlm93p8fIbJ2LTt9zyjJnJ17pVHb9i5AuTRhdURJm4ad718H9D2LWVZxuvH_9h 8klX0FhTX.sZyCNf0hYf67xGcuXKRw0XpTGju__jRU4CzAINT3hxYFiokEH77GGlzcxeI6NqS9rE QJPLAMiTf5Xq26Wj6ZfQjhbvkJLKgAhcwe0e.2mks5TM041sHXzY4Gxaj7J1g5AciGgtF1EgDvLt aqlZdgquq.9_4PwgOlAgsDaPqOay_Y.1jE6ephVyoMdd0HPyllE_0dRUjvAUzmvyBQsyFPya9YQY kVwNWM4U6tUujHPDIu1hmQvDHKQXwRZI1055IIWF2JUzvtXlr6W5mj117_d9dZyTjNmeLL2dpLOx Fc6DpQfsFxNF3Ioy4X1Sq22r4LgihMgdb0fgVksLB.sX8Com8v0bbDe1ihH.jBBBYStiS7QNMJCE 0sP13gSsJlx3XdPBLLb5LBQEygVFQnueNMXYrl8rDJX1Jeehwo6ulqznEAPhz6h4EaWccJvVFjKf z_j1Z7Efr8uI64XgSzB8Gz.UHl220CoXSSsueYtMjQoqz0bAwBhn.TX._iQwIc6Sis4ZDcR0CGGw k0m6C_oK7Z878GSsCQOmSwCOokv8GA9Yzk_ufO2pBYHLTIEFy6gbXj8rwzkGscJuVMWC84GuAa0h N8h1aHz0_RRZde32cP0CIruqcPRN0Xgkg6Ft9D23XeYZXZ5eA37p3X5iwD1AKlv3hCXiQgGMOl3G VkwkV1upfxnQ0y7yb5crJ2yrNW0dEJf8dgFWzk4hxTG.0A.M1MOAh4eh6Jy0XyXU- X-Sonic-MF: X-Sonic-ID: 9cf0d80f-81e1-4b84-9e8c-4f75c90542f9 Received: from sonic.gate.mail.ne1.yahoo.com by sonic304.consmr.mail.gq1.yahoo.com with HTTP; Thu, 9 Apr 2026 04:52:07 +0000 Received: by hermes--production-gq1-6dfcf9f8b-5skm9 (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID a625d9dd15b7bbe393e6ee11a9ff18d1; Thu, 09 Apr 2026 04:52:04 +0000 (UTC) Message-ID: <29a7ab7e-504b-41f0-9d3e-05496f76b5a1@yahoo.com> Date: Wed, 8 Apr 2026 21:52:04 -0700 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 96a685c229f2 - main - lib/msun/aarch64: provide export file for arch-specific fenv methods To: Konstantin Belousov , dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <69d666ef.3da7a.76659eaf@gitrepo.freebsd.org> Content-Language: en-US From: Mark Millard In-Reply-To: <69d666ef.3da7a.76659eaf@gitrepo.freebsd.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Mailer: WebService/1.1.25495 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/20, country:US] X-Rspamd-Queue-Id: 4frnbf50fwz3mkT X-Spamd-Bar: ---- On 4/8/26 07:32, Konstantin Belousov wrote: > The branch main has been updated by kib: > > URL: https://cgit.FreeBSD.org/src/commit/?id=96a685c229f2ce440591f98d33d36776e56dd55c > > commit 96a685c229f2ce440591f98d33d36776e56dd55c > Author: Konstantin Belousov > AuthorDate: 2026-04-06 16:41:23 +0000 > Commit: Konstantin Belousov > CommitDate: 2026-04-08 14:32:00 +0000 > > lib/msun/aarch64: provide export file for arch-specific fenv methods > > Reported and tested by: fluffy > Reviewed by: emaste > Fixes: 3a01e1e1a50cb9a9594aac2148dc920a6b295428 > Sponsored by: The FreeBSD Foundation > MFC after: 1 week > Differential revision: https://reviews.freebsd.org/D56283 I have noted in: that this changes the status of some of what had been reported about variability in the handling of "Variability in defining fegetexcept, feenableexcept, and fedisableexcept across platforms". > --- > lib/msun/aarch64/Symbol.map | 10 ++++++++++ > lib/msun/aarch64/fenv.c | 18 ++++++++++++++++++ > lib/msun/aarch64/fenv.h | 14 +++++++++----- > 3 files changed, 37 insertions(+), 5 deletions(-) > > diff --git a/lib/msun/aarch64/Symbol.map b/lib/msun/aarch64/Symbol.map > new file mode 100644 > index 000000000000..b468c814ff06 > --- /dev/null > +++ b/lib/msun/aarch64/Symbol.map > @@ -0,0 +1,10 @@ > +FBSD_1.9 { > + fesetexceptflag; > + feraiseexcept; > + fegetenv; > + feholdexcept; > + feupdateenv; > + feenableexcept; > + fedisableexcept; > + fegetexcept; > +}; > diff --git a/lib/msun/aarch64/fenv.c b/lib/msun/aarch64/fenv.c > index a428a9d8a271..3d7e467880c7 100644 > --- a/lib/msun/aarch64/fenv.c > +++ b/lib/msun/aarch64/fenv.c > @@ -98,3 +98,21 @@ int > { > return (__feupdateenv_int(envp)); > } > + > +int > +(feenableexcept)(int mask) > +{ > + return (__feenableexcept_int(mask)); > +} > + > +int > +(fedisableexcept)(int mask) > +{ > + return (__fedisableexcept_int(mask)); > +} > + > +int > +(fegetexcept)(void) > +{ > + return (__fegetexcept_int()); > +} > diff --git a/lib/msun/aarch64/fenv.h b/lib/msun/aarch64/fenv.h > index 32a03ee1eb49..5d47940cf9eb 100644 > --- a/lib/msun/aarch64/fenv.h > +++ b/lib/msun/aarch64/fenv.h > @@ -92,6 +92,9 @@ int fegetenv(fenv_t *); > int feholdexcept(fenv_t *); > int fesetenv(const fenv_t *); > int feupdateenv(const fenv_t *); > +int feenableexcept(int); > +int fedisableexcept(int); > +int fegetexcept(void); > > #define feclearexcept(a) __feclearexcept_int(a) > #define fegetexceptflag(e, a) __fegetexceptflag_int(e, a) > @@ -104,6 +107,9 @@ int feupdateenv(const fenv_t *); > #define feholdexcept(e) __feholdexcept_int(e) > #define fesetenv(e) __fesetenv_int(e) > #define feupdateenv(e) __feupdateenv_int(e) > +#define feenableexcept(a) __feenableexcept_int(a) > +#define fedisableexcept(a) __fedisableexcept_int(a) > +#define fegetexcept() __fegetexcept_int() > > __fenv_static inline int > __feclearexcept_int(int __excepts) > @@ -233,10 +239,8 @@ __feupdateenv_int(const fenv_t *__envp) > > #if __BSD_VISIBLE > > -/* We currently provide no external definitions of the functions below. */ > - > static inline int > -feenableexcept(int __mask) > +__feenableexcept_int(int __mask) > { > fenv_t __old_r, __new_r; > > @@ -247,7 +251,7 @@ feenableexcept(int __mask) > } > > static inline int > -fedisableexcept(int __mask) > +__fedisableexcept_int(int __mask) > { > fenv_t __old_r, __new_r; > > @@ -258,7 +262,7 @@ fedisableexcept(int __mask) > } > > static inline int > -fegetexcept(void) > +__fegetexcept_int(void) > { > fenv_t __r; > > > -- === Mark Millard marklmi at yahoo.com From nobody Thu Apr 9 05:58:28 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4frq4B3mQZz6YX8B; Thu, 09 Apr 2026 05:58:34 +0000 (UTC) (envelope-from fluffy@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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4frq4B1nNgz3skt; Thu, 09 Apr 2026 05:58:34 +0000 (UTC) (envelope-from fluffy@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775714314; 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:autocrypt:autocrypt; bh=F9hYVI3fa9rQ28iWHVFQ938xi3c3pPv2criEuVd738U=; b=XR7tvEsNyHPc3ND9fpLYv/v9weu8AJVvCTDbDPoxvymFdO1oHKkgTzaPUVeild3DJNEulH 5mS3wLkydFQxya1It7BFPzmr8+cGOlhTDRfLzUc8Y1padb132Jq4TuP+jS+Z5JKuJBZs8B PPjS5alUKcc79A0S0PiwBq4BOIHXo33OWGGf7CcFa3s0SixfOJkzLcYT54xRWVexsu7zCI SLlgvjNu/tVb1LFTm9iAiAQlGxUI4VGsmdMENipMHb/SI4LNhaFh/uo2xi6UGs7jVmkQqu hUDA9sV1NRew1QAjjvHyFWqePQXwXAmszU6yu5enofHhmbTsgpOcPJamI9DWPg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775714314; a=rsa-sha256; cv=none; b=a22Pt6KTbCLAOnh1+Tb0Xg+cBS5/NUSwgvcMviV6Rs05omBYbUwKwBpyZWnwahMFOfZJdu P7X/xPFmKd2TSAe2WtBH3gOcEueDCJDQUHPfJEer8NFu+5McTPkX1eX/Iap2lshgWN4XZO xURajyzmvT8EBMuAb1a0fKUPQUbboH02INV9CDpP8R0iBPTc28bod/N4LKgvhmTUryhqOm kIndmP1Jd5x5x/XocxvAkMOJ0DmfLhewXB6y1uMxIVp/nPjydlgF7rMn7Ngo82JUoKIxBH znwcqNAsw1f/d6b2NqD6QlrKefe1S/hLbBhaR2kl1LtSuVZ56mUVxjveSYRnrQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775714314; 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:autocrypt:autocrypt; bh=F9hYVI3fa9rQ28iWHVFQ938xi3c3pPv2criEuVd738U=; b=nXO0hjtK4oZ8No9Tc+4vcySqNWPiODLX/IoWckEi9ZlgnHF/RQQ1AYEPZI7dLbwHIZW9O/ jy6ZqA/aw4XReNOPEUvB8A3xZj1KTlIBOW3INadfIErLu2AWPMuEuejH+GNA5b+EiMoiBY osyYhq7dD6Wz18WCPCeDnaoVkVwcalhi1u2KLBfOzJwyPI22Ylc+jXy2I08txxQk71MI2k JnFwc6NXMKVCa+GilOS67cvbqlwyZpNvUnuh6eKgmiuw7xVtQ9yf8N7HImj1X4kdzoLfLo MC1WxPdB4fvWFPQDlEIFN0EWA9hOoQK1roJB7TnGowWQmRHyIaNtFZGCs95dBQ== Received: from [IPV6:2a05:3580:e727:cd00:84be:d88b:5e21:76df] (unknown [IPv6:2a05:3580:e727:cd00:84be:d88b:5e21:76df]) (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: fluffy) by smtp.freebsd.org (Postfix) with ESMTPSA id 4frq4937yVzLmK; Thu, 09 Apr 2026 05:58:33 +0000 (UTC) (envelope-from fluffy@FreeBSD.org) Message-ID: Date: Thu, 9 Apr 2026 08:58:28 +0300 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 5254e16213ff - main - crypto/openssl: update artifacts to match 3.5.6 release artifacts To: Enji Cooper , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <69d70746.3e99a.8766b22@gitrepo.freebsd.org> Content-Language: ru, en-GB From: Dima Panov Autocrypt: addr=fluffy@FreeBSD.org; keydata= xsFNBEp+xiUBEAD01RkOYcyzU/Fnam2FI7PPwYqW00SwVmfUHihvVniiaMwzaYzchb+mzSha NsqRgjIN/i59OBpnS25OXMLEpQP7jDJnY2xKyJN2H4qn1HPHkF9cYuqvqkm+r5459g+2ZoGY 9Sr1PA0XSzXJMSQ1nRK3cFfqlN/L2//P36U5VuOWXGZUTwr/n2B/N0HAsYsqDOdjofLg7x9z 8p8elqwJbT/O4ltg8JBVAnof+FzqefYW4CzqkHRjq/9ORiGYh14ST9ECsCaVpfdDUTor0wgp JqzCN1HsQcHqgdMmOqigWIgN7Eg4MRQU3LDCISrNJ/45zvcKUXR0RHOjnSuflYba74q58XhZ 4eCTqHeMHjA8st4IWRzy9l0V4RunnZxjOTb806jyIhdxcb2m8o5tXwsqjf0TQ7vYowDHrQ6g XlhPg4Jvvwf+BwlB2p+w7Cs/Y9QA0YHnIOIVZAwU1wv66YSI9IDL2AbnY2gQGx+dkHiC3S5L G8HcPrMcjayyThKKIi5KQsWa3snFeK5ky+cRpVEOPQfUXFOas++91v90Xe9j+lsmRofsyvuy gzoaZE2fud0kCsOgYEg+kiLPlQicNAx5IToOs8BrVFLcxmbPKuVBfbLdWsYLjXGzbXEmzV9f NDZ1r1uNmVema8YYCiNjUDZhxIfKt8nbp6cx8UgVLGRVDEfXeQARAQABzTdEaW1hIFBhbm92 IChGcmVlQlNELk9SRyBDb21taXR0ZXIpIDxmbHVmZnlARnJlZUJTRC5PUkc+wsF2BBMBAgAg BQJKfsYlAhsDBgsJCAcDAgQVAggDBBYCAwECHgECF4AACgkQ+4ugndU5jyk6dhAArHclTYjw VRjDnoRfO3Zfj9Ssab9Vrbo7DNFWeAqPE3OTCmiq9Q0fzRHzmhVyedYMm9qNA3i0J1De3KTn LanXOrBIqsmmZpSqmrp/xXdZngDLW5H6hpE0f2PeAPwxrb9uBQax8WMR7Z4STSHAP4GRjve3 0wNNS0MlawGllcs9VKRxG5PsDA8k3ACTSjdpQ76RWldORN4LA8M40yHRX377SGMzO+XsCeOw ad65GKyLrx+6Gnd3PMOjVCJCrqd04Jgqg9G0xKNImchwIZ5ulx9jAt+ixfNbY6hwslleqimr 2t5+MMqo6dRrvJ+BsR8NHt9vGi2Jy4+4smg05fR18fck0Sk4vCYyVvtvnOk3qZf0F8zJu06G cjWWC2ZbDPbmksWXFIMxoJbyVxK55xOqcFs0t12sR6gbVJb8Nb88WrQub3MgePyMF6R3Tkfa OqkjvQur1xC2AXESTxtJw1FkdGSb3UopNKgvSPHSLFW8B0LbyDxdYRTRWPGGEUhFP6tdXi5R vb1210ks2EQAqF4Cm3iRIhYgtZvQqQgMSiO9fVyeJ0U6dYGDtg2Boi+NtXKRdmtL7pRSnI3n fAbVJ05Hhd7PBnJeob6R08nHRo9DdAG7o8ToM+egUAuEsEvoRV+v4f6k3mShdxE7gG/anwVy eh3n6LGwg9KHDr1X2FODsLLxgUjOwU0ESn7GJQEQAMBTMHQgb0vcPMAiRvb357ihlh/YYA22 FXj4p3XTrDlBlRL0QCRq1I8XDeQmL3mG3s3NBtDXSefnNM06jZ3XCAfHIDBdxJJvQZZCXfvL p/JK7nnEuqoeqT6/oKs1MeZVdUnvh1nZhphs+Z6dl01GIE8YDpzT1JMD2f3G9PHChGi3Ddzq m3VdXt/87khYJkPbaf6EN5+vDthKgMjba8jwbQ+7IUPqkfnNFIZS6irZ2LYb79BLNI5JSl9l ReSfEX2d8ByQlLzuf0TS4voy3nWGeCyj6BIOMiRSxg+hZmJLYxhNkyK4GQVCt/rLT7dIfBQM syBbX0Qw2NOcfba9VgdPZBgdrawwB4/xF9SA3NB0J0lUjhjpH9iG8NxlpleEg8OSUApyFZEJ q2A/flns4kKzNH7AGYDOFORytDzA3qkgCJrZ7nzQSsdtZ2qbyAoze0tl+YrShJhOcmQBtFem omhWVeJ8T/Bw1KH8M1ihrENBTSzYzLvN18YjNP6P0Dh/7Zda5yYI8fNqd84K3Uq5xBiI0S6+ qxViw84z2tJj8TxiNqFAk7Tbeo2Ximtq7uQ9UnFRSK3jw96yi19KU9rQQZs0xUjN5gn/tF5l BZWKjwuZCkcOiI0EWHAR+ATAEsFNXcuoC9CAGK5HFW4nI4WtE3pv1KYvivlGtF1wzf0Qrhye RrmxABEBAAHCwV8EGAECAAkFAkp+xiUCGwwACgkQ+4ugndU5jymgKg//RvnI7zEDKv6nQUqK RyLawPTrCKCtQ2vSoWyTNgRB6byNS1w5wNSAMnqaESx2bdhauaxe167VEJYqgQy241yFslpC 6v/xlH25Ppos+Jg6AKaQG/JABHO6Co4tHtBbNmM+14HESxAodA4NJuEU19iIPjRhUKC8F8R9 xBmW1uLpPiljU9Km0P3EIKjAdtdZNeMLhwsbSHBwJROFrxFGiTzWNREWZoZpQxgSbHYhwYbx HEbJi1cybl9IQvSGHrysctZsxD04Jxh6ogaziiT8aV6ear6BNh008yRf61FvrinfG3USLR3i JO8aHap4QGCPjZ3cyT+DEq8/zVfDdeidTeNEhSgRKk856RcA+yAE79KYdKkvmDUiC8poAJ7F GEYHMB+g/1+LczCr2g9GYkiB/53boYfU9esYYlarxCgedCrwXv6T48FZ3xxoH3XJ2KV8K6M8 CUb04jj3kEeCwq+R6Bk2ZXrnMzyQmmn223X+Zp89B/gchH32JY8y3j7BICcoZmgMu62XNMgW I/hRgfi3JlVCne6XPj3/w00JYG7vo+eTJOflqYr3WRTPYh7DxzYtshZswHmmkZtwizUQUZzF 9dX2CM8nY7cKucEmtcnUpjGwXMOufa/DmCTlk8ggRZ0ukCUZOlIA4ILxp95sS2oqyucARv+p wMWvrqJ/LfbZexSsIjI= Organization: FreeBSD.org In-Reply-To: <69d70746.3e99a.8766b22@gitrepo.freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------8Eh4M0X6Dr42uPeoibyciAhV" This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --------------8Eh4M0X6Dr42uPeoibyciAhV Content-Type: multipart/mixed; boundary="------------5A0CegTeZ2iumgVcmEsv0Odt"; protected-headers="v1" Message-ID: Date: Thu, 9 Apr 2026 08:58:28 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 5254e16213ff - main - crypto/openssl: update artifacts to match 3.5.6 release artifacts To: Enji Cooper , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <69d70746.3e99a.8766b22@gitrepo.freebsd.org> Content-Language: ru, en-GB From: Dima Panov Autocrypt: addr=fluffy@FreeBSD.org; keydata= xsFNBEp+xiUBEAD01RkOYcyzU/Fnam2FI7PPwYqW00SwVmfUHihvVniiaMwzaYzchb+mzSha NsqRgjIN/i59OBpnS25OXMLEpQP7jDJnY2xKyJN2H4qn1HPHkF9cYuqvqkm+r5459g+2ZoGY 9Sr1PA0XSzXJMSQ1nRK3cFfqlN/L2//P36U5VuOWXGZUTwr/n2B/N0HAsYsqDOdjofLg7x9z 8p8elqwJbT/O4ltg8JBVAnof+FzqefYW4CzqkHRjq/9ORiGYh14ST9ECsCaVpfdDUTor0wgp JqzCN1HsQcHqgdMmOqigWIgN7Eg4MRQU3LDCISrNJ/45zvcKUXR0RHOjnSuflYba74q58XhZ 4eCTqHeMHjA8st4IWRzy9l0V4RunnZxjOTb806jyIhdxcb2m8o5tXwsqjf0TQ7vYowDHrQ6g XlhPg4Jvvwf+BwlB2p+w7Cs/Y9QA0YHnIOIVZAwU1wv66YSI9IDL2AbnY2gQGx+dkHiC3S5L G8HcPrMcjayyThKKIi5KQsWa3snFeK5ky+cRpVEOPQfUXFOas++91v90Xe9j+lsmRofsyvuy gzoaZE2fud0kCsOgYEg+kiLPlQicNAx5IToOs8BrVFLcxmbPKuVBfbLdWsYLjXGzbXEmzV9f NDZ1r1uNmVema8YYCiNjUDZhxIfKt8nbp6cx8UgVLGRVDEfXeQARAQABzTdEaW1hIFBhbm92 IChGcmVlQlNELk9SRyBDb21taXR0ZXIpIDxmbHVmZnlARnJlZUJTRC5PUkc+wsF2BBMBAgAg BQJKfsYlAhsDBgsJCAcDAgQVAggDBBYCAwECHgECF4AACgkQ+4ugndU5jyk6dhAArHclTYjw VRjDnoRfO3Zfj9Ssab9Vrbo7DNFWeAqPE3OTCmiq9Q0fzRHzmhVyedYMm9qNA3i0J1De3KTn LanXOrBIqsmmZpSqmrp/xXdZngDLW5H6hpE0f2PeAPwxrb9uBQax8WMR7Z4STSHAP4GRjve3 0wNNS0MlawGllcs9VKRxG5PsDA8k3ACTSjdpQ76RWldORN4LA8M40yHRX377SGMzO+XsCeOw ad65GKyLrx+6Gnd3PMOjVCJCrqd04Jgqg9G0xKNImchwIZ5ulx9jAt+ixfNbY6hwslleqimr 2t5+MMqo6dRrvJ+BsR8NHt9vGi2Jy4+4smg05fR18fck0Sk4vCYyVvtvnOk3qZf0F8zJu06G cjWWC2ZbDPbmksWXFIMxoJbyVxK55xOqcFs0t12sR6gbVJb8Nb88WrQub3MgePyMF6R3Tkfa OqkjvQur1xC2AXESTxtJw1FkdGSb3UopNKgvSPHSLFW8B0LbyDxdYRTRWPGGEUhFP6tdXi5R vb1210ks2EQAqF4Cm3iRIhYgtZvQqQgMSiO9fVyeJ0U6dYGDtg2Boi+NtXKRdmtL7pRSnI3n fAbVJ05Hhd7PBnJeob6R08nHRo9DdAG7o8ToM+egUAuEsEvoRV+v4f6k3mShdxE7gG/anwVy eh3n6LGwg9KHDr1X2FODsLLxgUjOwU0ESn7GJQEQAMBTMHQgb0vcPMAiRvb357ihlh/YYA22 FXj4p3XTrDlBlRL0QCRq1I8XDeQmL3mG3s3NBtDXSefnNM06jZ3XCAfHIDBdxJJvQZZCXfvL p/JK7nnEuqoeqT6/oKs1MeZVdUnvh1nZhphs+Z6dl01GIE8YDpzT1JMD2f3G9PHChGi3Ddzq m3VdXt/87khYJkPbaf6EN5+vDthKgMjba8jwbQ+7IUPqkfnNFIZS6irZ2LYb79BLNI5JSl9l ReSfEX2d8ByQlLzuf0TS4voy3nWGeCyj6BIOMiRSxg+hZmJLYxhNkyK4GQVCt/rLT7dIfBQM syBbX0Qw2NOcfba9VgdPZBgdrawwB4/xF9SA3NB0J0lUjhjpH9iG8NxlpleEg8OSUApyFZEJ q2A/flns4kKzNH7AGYDOFORytDzA3qkgCJrZ7nzQSsdtZ2qbyAoze0tl+YrShJhOcmQBtFem omhWVeJ8T/Bw1KH8M1ihrENBTSzYzLvN18YjNP6P0Dh/7Zda5yYI8fNqd84K3Uq5xBiI0S6+ qxViw84z2tJj8TxiNqFAk7Tbeo2Ximtq7uQ9UnFRSK3jw96yi19KU9rQQZs0xUjN5gn/tF5l BZWKjwuZCkcOiI0EWHAR+ATAEsFNXcuoC9CAGK5HFW4nI4WtE3pv1KYvivlGtF1wzf0Qrhye RrmxABEBAAHCwV8EGAECAAkFAkp+xiUCGwwACgkQ+4ugndU5jymgKg//RvnI7zEDKv6nQUqK RyLawPTrCKCtQ2vSoWyTNgRB6byNS1w5wNSAMnqaESx2bdhauaxe167VEJYqgQy241yFslpC 6v/xlH25Ppos+Jg6AKaQG/JABHO6Co4tHtBbNmM+14HESxAodA4NJuEU19iIPjRhUKC8F8R9 xBmW1uLpPiljU9Km0P3EIKjAdtdZNeMLhwsbSHBwJROFrxFGiTzWNREWZoZpQxgSbHYhwYbx HEbJi1cybl9IQvSGHrysctZsxD04Jxh6ogaziiT8aV6ear6BNh008yRf61FvrinfG3USLR3i JO8aHap4QGCPjZ3cyT+DEq8/zVfDdeidTeNEhSgRKk856RcA+yAE79KYdKkvmDUiC8poAJ7F GEYHMB+g/1+LczCr2g9GYkiB/53boYfU9esYYlarxCgedCrwXv6T48FZ3xxoH3XJ2KV8K6M8 CUb04jj3kEeCwq+R6Bk2ZXrnMzyQmmn223X+Zp89B/gchH32JY8y3j7BICcoZmgMu62XNMgW I/hRgfi3JlVCne6XPj3/w00JYG7vo+eTJOflqYr3WRTPYh7DxzYtshZswHmmkZtwizUQUZzF 9dX2CM8nY7cKucEmtcnUpjGwXMOufa/DmCTlk8ggRZ0ukCUZOlIA4ILxp95sS2oqyucARv+p wMWvrqJ/LfbZexSsIjI= Organization: FreeBSD.org In-Reply-To: <69d70746.3e99a.8766b22@gitrepo.freebsd.org> --------------5A0CegTeZ2iumgVcmEsv0Odt Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: base64 SGVsbG8hDQoNClN0aWxsIG1pc3NlZCBpbmNsdWRlL29wZW5zc2wvbWxfa2VtLmg/DQoNCk9u IDA5LjA0LjIwMjYgMDQ6NTYsIEVuamkgQ29vcGVyIHdyb3RlOg0KPiBUaGUgYnJhbmNoIG1h aW4gaGFzIGJlZW4gdXBkYXRlZCBieSBuZ2llOg0KPiANCj4gVVJMOiBodHRwczovL2NnaXQu RnJlZUJTRC5vcmcvc3JjL2NvbW1pdC8/aWQ9NTI1NGUxNjIxM2ZmMWJiMTM2ZWYyNGUwYjBm ZTMwNjI1YWM1MzU2Mw0KPiANCj4gY29tbWl0IDUyNTRlMTYyMTNmZjFiYjEzNmVmMjRlMGIw ZmUzMDYyNWFjNTM1NjMNCj4gQXV0aG9yOiAgICAgRW5qaSBDb29wZXIgPG5naWVARnJlZUJT RC5vcmc+DQo+IEF1dGhvckRhdGU6IDIwMjYtMDQtMDkgMDE6NTQ6NDAgKzAwMDANCj4gQ29t bWl0OiAgICAgRW5qaSBDb29wZXIgPG5naWVARnJlZUJTRC5vcmc+DQo+IENvbW1pdERhdGU6 IDIwMjYtMDQtMDkgMDE6NTU6NDMgKzAwMDANCj4gDQo+ICAgICAgY3J5cHRvL29wZW5zc2w6 IHVwZGF0ZSBhcnRpZmFjdHMgdG8gbWF0Y2ggMy41LjYgcmVsZWFzZSBhcnRpZmFjdHMNCj4g ICAgICANCj4gICAgICBBIG5ldyBtYW5wYWdlIGFuZCBhbnkgYXNzb2NpYXRlZCBsaW5rcyB3 aWxsIGJlIGFkZGVkIGluIHRoZSBuZXh0IGNvbW1pdC4NCj4gICAgICANCj4gICAgICBNRkMg YWZ0ZXI6ICAgICAgMSBkYXkgKHRoZSBzZWN1cml0eSBpc3N1ZXMgd2FycmFudCBhIHF1aWNr IGJhY2twb3J0KS4NCj4gICAgICBNRkMgd2l0aDogICAgICAgMTBhNDI4NjUzZWU3MjE2NDc1 ZjFkZGNlM2ZiNGNiZjEyMDAzMTlmOA0KPiAtLS0NCj4gICBjcnlwdG8vb3BlbnNzbC9leHBv cnRlcnMvbGliY3J5cHRvLnBjICAgICAgICAgICAgICB8ICAgMyArLQ0KPiAgIGNyeXB0by9v cGVuc3NsL2V4cG9ydGVycy9saWJzc2wucGMgICAgICAgICAgICAgICAgIHwgICAzICstDQo+ ICAgY3J5cHRvL29wZW5zc2wvZXhwb3J0ZXJzL29wZW5zc2wucGMgICAgICAgICAgICAgICAg fCAgIDMgKy0NCj4gICBjcnlwdG8vb3BlbnNzbC9pbmNsdWRlL29wZW5zc2wvY21wLmggICAg ICAgICAgICAgICB8ICAgNCArLQ0KPiAgIGNyeXB0by9vcGVuc3NsL2luY2x1ZGUvb3BlbnNz bC9vcGVuc3Nsdi5oICAgICAgICAgIHwgIDEwICstDQotLSANClNpbmNlcmVseSwNCkRpbWEg KGZsdWZmeUBGcmVlQlNELm9yZywgaHR0cHM6Ly90Lm1lL0ZsdWZmeUJTRCwgQGZsdWZmeTpt YXRyaXgtZGV2LmZyZWVic2Qub3JnKQ0KKGRlc2t0b3AsIGtkZSwgeDExLCBvZmZpY2UsIHBv cnRzLXNlY3RlYW0pQEZyZWVCU0QgdGVhbQ0KDQo= --------------5A0CegTeZ2iumgVcmEsv0Odt-- --------------8Eh4M0X6Dr42uPeoibyciAhV Content-Type: application/pgp-signature; name="OpenPGP_signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="OpenPGP_signature.asc" -----BEGIN PGP SIGNATURE----- wsF5BAABCAAjFiEELTAsy5mEEwxvh7r8+4ugndU5jykFAmnXQAQFAwAAAAAACgkQ+4ugndU5jykV Og//QMdWdZHw6bBDA4P9zFyXp57BjwerxbDIX+zpF9VNSUnqM0fe/4m4k0k7LkjHnHy+wa6Zm2RY CBpYhyChyo/AicjyVWA/Xj8z9ts1TXXoLCgMTle1g4Vy9H2efwYVrtqZnDbVm8X/qAD1YsSBiQ+1 LlaI0+1iJRng+lhg0AyE3qRN2HwvjmlylsySPvBsk/VNmfkNbZozoRIAwxaBH/rW1LlJDoPhzp3j HO+u0i9GHumnvT4EuJmqDkHRVOKxJdSvSrK/rkoDrRdJOFl0pjSlT1IMJWKftg7hGQYQG+HoMhd+ z+PadyYBZRK2cWWxYVhqsPBdqcZDpSkJY/IVBX6G73Te2JUq+EW+lvopshrX5lLlPZzMjw1MxnAw HP16OmNySnIR1KERFPgqnx8jjxmQH8gEHcGEOInUA7uC32lwvkmgcJCsYkz1TJut5hQhu/8lEP1w ipQxZmuN1X1Qn1jFJrBT8GesRlbqWr3/VxpPZQBTZEt/RDeFaetgRaoylqq/jncFqdEZlW+teE/n WME38m9oKsxdY/RP4t8lPOv2NBZuXNjtJgRCbPm4p3/B7dZ0airLMwZZK1jbRO0ju2wax33g+bgd cYWqosp4SDx2djlo1Gt0uErXj3piQwDF/CHL9G/5+cQBAnDUXWRJaK9VGl/uBui78HvSP5HGR7UA kGE= =sQUb -----END PGP SIGNATURE----- --------------8Eh4M0X6Dr42uPeoibyciAhV-- From nobody Thu Apr 9 06:14:09 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4frqQ972hpz6YYKs for ; Thu, 09 Apr 2026 06:14: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4frqQ93sNdz3vsw for ; Thu, 09 Apr 2026 06:14:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775715249; 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; bh=v9dpQWyAwE6FmqYZk1GFifopOhmGCWwpQ5HKU9bQpMY=; b=eMDNbruw6AAuOU80lP30AjT9BgkXupFVmvIjPyoyOoeCToDmfpe5FaLzRmjqN8Blwh/wVR occPSBhLGmv50T2FwQaDIQfUUJB6/i5Yu6HQ0D2KY/1QOf/Lfj94nt/V28nR/CpK+ToiqB EHgln6Mh73Ac60Q22SClU6wj+hd1pKJoZuY3f7uPi8/HvslzruKtddGhx4foj7INbCxGxC e1Ptq/YxAq+79U5vqIa5Xsp3GKQu+knt/XQ2n5tYp7AYtJKw0tJpfcTZvHCkuN0RHB7c7s VNlQi0CjfieE2ZNW/OG2pqysBxZ4AIey5Cv2EW4sS/DbMTCF0MuNl+TDVApA4A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775715249; a=rsa-sha256; cv=none; b=JwqLsYu7gcx6cNDN5wVXLEt9wFSGyq8xrN6A915DxDzKJmY7BrGsTimBek7QZn+C91ic5G tfv9YSjnBW957GQMBG9HS5Q1KHstdxvQ+p44wdoupJNbmIUHQUyz7K8ranwWp/8y2BoNL+ /VLYa26phhs9t/yxPdUWfLaHjhIwYmWjHlIkAU3YQcCcKOrKoHxCdSWBGyL3qQ5PnhgM8B bXQxT8Ok8UzekRbAGQjiuZkxBYl5lwouaHXgP4YmNqgtC0xI2jS18OHqxipx75YzisybSD 923fgFmxnjXL4VouDfvfdOPiUUPzXMtAFqgX6k8Fk40CNy1WGQACj7iNFnB68A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775715249; 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; bh=v9dpQWyAwE6FmqYZk1GFifopOhmGCWwpQ5HKU9bQpMY=; b=w/2uWnL+OTEJmaPdaQT3+FSQN++84SCzor3iKfMRDdKX7qEJ2VgD2lgecU/8qU7lx5fWd6 ABBO3sAvIiN6Jlb4lM3gY4qi2LYMqN0KHyJa0OEpqQCo0iqVpHmPnyyBmPhNgU1Z0Fblbl aWe8C5AZbFBCdFjtAjOrYSDAZDneBEj4TqBDdE/CvGpcHQ4GqcZQadifvcn/qJTS/U6+fT OfRt01rEjOfPoMbt+ZzVlwaBiNleV160nih4MTBf+qcw9tyoueDLLmXOFD4iPpkQ9J/7I7 svt7F7rIfcYtUmUzrFD0F3X4ahjQYovL1lURMyNDyrYK/G6kl/jj7NG65vEfyQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4frqQ92NNHz11Nh for ; Thu, 09 Apr 2026 06:14:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 32802 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 09 Apr 2026 06:14:09 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Siva Mahadevan From: Xin LI Subject: git: 7c9418613a31 - main - sys/contrib/zstd: further narrow FREEBSD-Xlist List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: 7c9418613a31571e4eceda55a417f7183d26acb5 Auto-Submitted: auto-generated Date: Thu, 09 Apr 2026 06:14:09 +0000 Message-Id: <69d743b1.32802.68b9eca2@gitrepo.freebsd.org> The branch main has been updated by delphij: URL: https://cgit.FreeBSD.org/src/commit/?id=7c9418613a31571e4eceda55a417f7183d26acb5 commit 7c9418613a31571e4eceda55a417f7183d26acb5 Author: Siva Mahadevan AuthorDate: 2026-04-09 04:43:42 +0000 Commit: Xin LI CommitDate: 2026-04-09 04:43:42 +0000 sys/contrib/zstd: further narrow FREEBSD-Xlist We don't need any docs or examples in tree, as well as any upstream-specific build infrastructure. Differential Revision: https://reviews.freebsd.org/D55836 --- sys/contrib/zstd/FREEBSD-Xlist | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/sys/contrib/zstd/FREEBSD-Xlist b/sys/contrib/zstd/FREEBSD-Xlist index f39005add49f..7d87acac5f4a 100644 --- a/sys/contrib/zstd/FREEBSD-Xlist +++ b/sys/contrib/zstd/FREEBSD-Xlist @@ -1,10 +1,19 @@ -.circleci +*/BUCK +.buckconfig +.buckversion .cirrus.yml .github .gitignore .travis.yml +CODE_OF_CONDUCT.md +CONTRIBUTING.md +Makefile +Package.swift +TESTING.md build contrib +doc +examples lib/dll programs/windres tests From nobody Thu Apr 9 06:14:24 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4frqQT1jMFz6YYqq for ; Thu, 09 Apr 2026 06:14: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4frqQS5mmQz3wFN for ; Thu, 09 Apr 2026 06:14:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775715264; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kh3UAlwmUJtRHcxA6l6b6cFn8N/drV+ENJSZb2n3r6E=; b=qdwfvj7VE/gsD+RVCHBkRUpLSdazeFAZcF+8XoCGGPRwklotPztrhVTTkPrnHowTubV1RA Q8NTscqIKQKa8Ts0f0XjrLehnGDO1ELsWqGB3/CFB4obOgmehKGCDymk3/sHx0kLhAZVVH ZepzIaKwVbgcYjC4BK+tDWeUDGD6+7qHwHxKP4inLwMc2VbaaRL962t+Ygy9SeKTqz/cOk OQwLwMYheVLwXaccfv+bznFCxVjUXklMchytGX7j2q5CyZSv2lv8u8xi5A/1UkhCqL9U0E IMHRSoHDF2HV0kcy3v4Yne6PhN0JN4ItPNnBVY+qIJtRFsgFtQjI18BdvXxlnQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775715264; a=rsa-sha256; cv=none; b=OA0mcKjBYXsTrRXO2L8RV3k4vudkj/tZEjcz4njDhQDencpkRCljlY0xoU/YZXgWNn0ehi xvR2CgsSWRCdCdLRhnJDtuc6t5hcDRRHJsFwmuN6AxkKtIoXwyCWGHhIonHUSPd6B7xZxJ Miejq/ih4yuIhFWTc9IqelNmyyr5/aA89VGXOnEQvat3XLX4IgLVd6g/a3aSmn3nqYyZs9 b9zQfFrq/RfPz6BcPtWwAb0ZalyrTaCuxiP+Z2NPWwakqtYlva+qJuo6qPXsgTcO5ZgAMd W8hWD07GpsP39MR7jdPwsqHDLh8rXjrpcQlfxpJVk/DtCc6PBdyG8oDP2Ss6TA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775715264; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kh3UAlwmUJtRHcxA6l6b6cFn8N/drV+ENJSZb2n3r6E=; b=inmjBxITxNCOpvCKlEYkO+qRu5CGABzIrcSSvdYwJvOQufXO8S4Mxo+aEkzYV585w5uBMH fw2Omvunutqxo/wzKq2MzAIlkBIOHDAZenj58cU6P+Pgg8IOeUshMKwjd0Ct5zZLXKpuJk TCRAQTylrFfW5bcPfkyDnsqEaNpktz8GhcJPf59wAxv17jqhqoUPALpT5/3cFXNnTahXWr k96I5lGXlzK1AcVG08Dip4uy1re89KJGMVju/VF6WhSvTdvR/2R0bifvUTa3R+A9bvyGCo DmSUyf1smU7yiT7428AOBIyMRL2JN4CZ1K3RXpjWffSu70nn90R7cxKV3nnqDA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4frqQS5Fy1z1208 for ; Thu, 09 Apr 2026 06:14:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 31fad by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 09 Apr 2026 06:14:24 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Xin LI Subject: git: 111a42d7d78a - main - MFV: zstd: Remove entries listed in FREEBSD-Xlist List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: 111a42d7d78a88ba6ff7b5d61b0867faccc00276 Auto-Submitted: auto-generated Date: Thu, 09 Apr 2026 06:14:24 +0000 Message-Id: <69d743c0.31fad.682c8fd9@gitrepo.freebsd.org> The branch main has been updated by delphij: URL: https://cgit.FreeBSD.org/src/commit/?id=111a42d7d78a88ba6ff7b5d61b0867faccc00276 commit 111a42d7d78a88ba6ff7b5d61b0867faccc00276 Merge: 7c9418613a31 a985740c213b Author: Xin LI AuthorDate: 2026-04-09 04:48:39 +0000 Commit: Xin LI CommitDate: 2026-04-09 04:48:39 +0000 MFV: zstd: Remove entries listed in FREEBSD-Xlist sys/contrib/zstd/.buckconfig | 9 - sys/contrib/zstd/.buckversion | 1 - sys/contrib/zstd/CONTRIBUTING.md | 489 ---- sys/contrib/zstd/Makefile | 471 ---- sys/contrib/zstd/Package.swift | 36 - sys/contrib/zstd/TESTING.md | 43 - sys/contrib/zstd/doc/README.md | 26 - sys/contrib/zstd/doc/decompressor_errata.md | 148 -- sys/contrib/zstd/doc/decompressor_permissive.md | 80 - sys/contrib/zstd/doc/educational_decoder/Makefile | 62 - sys/contrib/zstd/doc/educational_decoder/README.md | 36 - sys/contrib/zstd/doc/educational_decoder/harness.c | 119 - .../zstd/doc/educational_decoder/zstd_decompress.c | 2323 -------------------- .../zstd/doc/educational_decoder/zstd_decompress.h | 61 - sys/contrib/zstd/doc/images/CSpeed2.png | Bin 73335 -> 0 bytes sys/contrib/zstd/doc/images/DCspeed5.png | Bin 69278 -> 0 bytes sys/contrib/zstd/doc/images/DSpeed3.png | Bin 27123 -> 0 bytes sys/contrib/zstd/doc/images/cdict_v136.png | Bin 33330 -> 0 bytes sys/contrib/zstd/doc/images/dict-cr.png | Bin 90412 -> 0 bytes sys/contrib/zstd/doc/images/dict-cs.png | Bin 91518 -> 0 bytes sys/contrib/zstd/doc/images/dict-ds.png | Bin 98316 -> 0 bytes sys/contrib/zstd/doc/images/zstd_cdict_v1_3_5.png | Bin 93969 -> 0 bytes sys/contrib/zstd/doc/images/zstd_logo86.png | Bin 13069 -> 0 bytes sys/contrib/zstd/doc/zstd_compression_format.md | 1771 --------------- sys/contrib/zstd/doc/zstd_manual.html | 2237 ------------------- sys/contrib/zstd/examples/Makefile | 93 - sys/contrib/zstd/examples/README.md | 46 - sys/contrib/zstd/examples/common.h | 246 --- sys/contrib/zstd/examples/dictionary_compression.c | 107 - .../zstd/examples/dictionary_decompression.c | 99 - .../zstd/examples/multiple_simple_compression.c | 116 - .../zstd/examples/multiple_streaming_compression.c | 133 -- sys/contrib/zstd/examples/simple_compression.c | 68 - sys/contrib/zstd/examples/simple_decompression.c | 65 - sys/contrib/zstd/examples/streaming_compression.c | 146 -- .../examples/streaming_compression_thread_pool.c | 180 -- .../zstd/examples/streaming_decompression.c | 100 - sys/contrib/zstd/examples/streaming_memory_usage.c | 137 -- sys/contrib/zstd/lib/BUCK | 232 -- sys/contrib/zstd/lib/Makefile | 389 ---- sys/contrib/zstd/programs/BUCK | 44 - sys/contrib/zstd/programs/Makefile | 445 ---- sys/contrib/zstd/zlibWrapper/BUCK | 22 - sys/contrib/zstd/zlibWrapper/Makefile | 120 - sys/contrib/zstd/zlibWrapper/examples/example.c | 598 ----- .../zstd/zlibWrapper/examples/example_original.c | 599 ----- sys/contrib/zstd/zlibWrapper/examples/fitblk.c | 254 --- .../zstd/zlibWrapper/examples/fitblk_original.c | 233 -- sys/contrib/zstd/zlibWrapper/examples/minigzip.c | 605 ----- sys/contrib/zstd/zlibWrapper/examples/zwrapbench.c | 1018 --------- 50 files changed, 14007 deletions(-) From nobody Thu Apr 9 06:59:10 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4frrQ74SJWz6Yct0 for ; Thu, 09 Apr 2026 06:59: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4frrQ63svRz437g for ; Thu, 09 Apr 2026 06:59:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775717951; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jer2mqH8Jo3PgLOULmVk0pqcD+QXTR7W5kKGYZratE8=; b=tmkioCT5NcXF4nzIfTYuT2QjgsSwVM6xqPGBErQaUzcvKhDlWTEk45AGYqhIGZhE9hH0Vh vhWKJB4fp2Tz5pSxbTowli6avdTPG6ONnwKVjW7YzMN4K3fbac+2PZDS8vcTQWalB068BM XaDLaZifbwodLAenTi9PC0rvMFgDv7FzOiamzhiiQhCZ345NbwGk7X0qTVtIISKJ+ZrE9G oJwzw5HEB+LHIR8v7r6WCCJuL+sHJiva8HjJLbknTNV+pMpM50FueUQxY9IZrHU62nH5rg BTXstkSc0tRw3Fyv+CmXqZxGHH8WTUHdY7+TEfgFC3RtptbYt8mPrxMZFh+5Fw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775717950; a=rsa-sha256; cv=none; b=QbPtwGwvJDZMDA4Vd2Lj0gkaST0MnQBl+F7q1OCWSafkyoim2YRTTireD0PVpARGyLVyBa reTtpdkHTjgZdECnJDH1LYdXVqIRaGV7SnCkGUeDjfsVoT4G/Zyqd87GAspXI7cNfJVOSp JXqcDcZEWsQOLX7V/QE6j2ww+9dKgerz/fdo0gxO6wwtvhvKZNdUU0cHN39uoVldGmPDBC xQEfBth0pUbEl24FVYrESzE5wuq+Ii+SNvy22jTrXw+4DXq4lDlmWhdlVLuU4lBbV6ZW9e wd4qMi6qijH73KRnlNHXw5LjJ9gUQ2IWAgtQQBex6XaX1DZUctQ0OX1c2zYSqg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775717950; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jer2mqH8Jo3PgLOULmVk0pqcD+QXTR7W5kKGYZratE8=; b=CC1eQlmaxJFWI0GZhrcPl6lcwGwIY0tv+o+h5yIq1fWsibQx9H0r+GkIY8axqe0S1xyr4k QsUN74u1CCYv8svQ7TuD47TzE6wZf+K23Z4FJIe66RfVawYSSKGWsPVCVIyPYj49GvpJ/j tz7H3iHhkUJD8d/PezfrAeY87OsHG/dTwqkDrnNaFEwv/iYvU5S9ttEKr+HfVF5O3d++JU c3LGApfR81Yxbl6+MONKhDSfwEpaP7pnWWR8qR7HmNYKrqtSO/0ntBSTlenjIgwy/fl+oQ aVCylqdD275DC0p5MvJ3cnn4jrNPtMFDsngvbOhA8ptxUpYy5S3P/W1LYc58ow== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4frrQ639lBz131p for ; Thu, 09 Apr 2026 06:59:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 37506 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 09 Apr 2026 06:59:10 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Baptiste Daroussin Subject: git: 5dc4da1a408b - main - RELNOTES: catchup on changes I have made List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5dc4da1a408b2219b622c498d53c58580e58132d Auto-Submitted: auto-generated Date: Thu, 09 Apr 2026 06:59:10 +0000 Message-Id: <69d74e3e.37506.29ac019a@gitrepo.freebsd.org> The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=5dc4da1a408b2219b622c498d53c58580e58132d commit 5dc4da1a408b2219b622c498d53c58580e58132d Author: Baptiste Daroussin AuthorDate: 2026-04-09 06:44:08 +0000 Commit: Baptiste Daroussin CommitDate: 2026-04-09 06:58:21 +0000 RELNOTES: catchup on changes I have made --- RELNOTES | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/RELNOTES b/RELNOTES index b0076bf77bf3..e6e6f07c1d0f 100644 --- a/RELNOTES +++ b/RELNOTES @@ -10,6 +10,44 @@ newline. Entries should be separated by a newline. Changes to this file should not be MFCed. + +65f5dd42f11c: + sh(1) add -l option which makes sh act as a login shell and read the profile. + +beab8b1ddf86: + bintrans(1) now supports the RFC2047 variant of quoted print + +9dc96d8bc3f2: + libusb(3) hotplug event are now really hotplugged using either + nlsysevent or devd(9) if available. + +d64db8892f85: + sh(1) is the default shell in the release media. + +68ad2b0d7af2: + ncurses has been updated to 6.6 + +52d19df19ed6: + nvi(1) has been update to 2.2.2 + +4d5c434ed16e, 2cfca8e710f2: + diff3(1) has replaced GNU diff3 and is now fully compatible. + +625dc44832cd: + tr(1) is now UTF-8 compliant. + +62fba0054d9e: + ee(1) is now UTF-8 compliant. + +5df6aca10906: + ed(1) is now UTF-8 compliant. + +28ff4d35f8b9: + Update libedit to 2026-04-03. + +b42e852e89cb: + Add a new pkg-serve(8) to serve packages over TCP via inetd. + 8b9775912cbc, 53b4ae3bf0f7: Add support for an NFSv4 root file system. Note that NFSv3 is still used for bootstrapping. See From nobody Thu Apr 9 09:28:45 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4frvkm4g4Bz6YqCG; Thu, 09 Apr 2026 09:28:48 +0000 (UTC) (envelope-from kp@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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4frvkm3qgvz3Nbw; Thu, 09 Apr 2026 09:28:48 +0000 (UTC) (envelope-from kp@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775726928; 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=edSZd2bvnHVU3OMmztMB0QNIheNSCSWd2WiziMkwbmw=; b=PzIVHGUn69Tg90HAGl2JM3fngCKwSG+OIJg+rFKNb7054jMSK1i3QV86uSdnhz4IrAzxUq NK5M4nXAyo16km3FSnsPrtnGP1sHON7WgkAVTVdElTxk5uREJh8t72dl+RAAOmnw5darOm tvH6XfRS6LDoU9BfOESDsnospVOIA5lvBkIy7g0sezc/KZJx+w341p8dA4gxgxy06YoaKx sNzg+by4tp1tcwAPwLwD5FPjhRuaV1Q+2A0rs2Q1TVqFUXK9hgzfTUFTjRaRRJB8vGGo5S YC9/6hDnTGc77KRFsSpemerKz6N+YmZMFSov/umF+YSfkkZbGeI9Rl99vHdPBg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775726928; a=rsa-sha256; cv=none; b=o+c6uaCKbpYk5Y/AVqw2n0HnQwqsFQ527BQHSqG7UcNR1pRtvqMl0Wtta/0FBc8TCh05D2 xDDnDTjc2WsAj4A9YEPzpA8JMxUoqShVf1oULtnSw2vgGvBa0p7gmlnvtDW/5s1keducgv CIQjN2lCPLw4c7IO2OS9WfpZo5cqF/fq+3GbqvVzomxVnWf/9UrqrRbZM3laUpUyHtNknh KJ4JcuOJmj5oqVJUzee0pz1eV/T26D/+XrzRb1zPBKRd+VAGtppbTfRoibIHv3Wwq6zypY oX7nkk3HS0IPGfVfc7/sHIcrRda5fsuv7ji29Wuf0Ed4XDd/AiMV5PPCjC77vw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775726928; 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=edSZd2bvnHVU3OMmztMB0QNIheNSCSWd2WiziMkwbmw=; b=liCqHWx/P7Vl/zgfakiiMybQ+eWONt7gkZzk/NncKsbd19fI6LP21Tg2l/ahnrqlqHqQ/N C7BaG8c6qJScluR6WULVmis1y5TjuUNlNJFK3ivupBOBncQyzedhk1uCF3PlCYgL6cdHNT rzcRdE6RM4vF6/E5YYpqKo+U7Ntbu/xMzDP0Z3I9eVf/H04GViKF1WGDJrYRo7x98/1EoM 8oca2NzqeXnf1DTxOfApvZQJCP6NDhYP/Lt1WmvzmoeSOn6DdcTxat5Z0uCQAB8b9ycyx5 vGqLqwiDLcJbnswBfgoY1084JGeLv2TKYRM6UCCeZOlN1xVz1QZixavsky4PVw== 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 "R12" (not verified)) (Authenticated sender: kp) by smtp.freebsd.org (Postfix) with ESMTPSA id 4frvkm1qPczRS1; Thu, 09 Apr 2026 09:28:48 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: by venus.codepro.be (Postfix, authenticated sender kp) id 9A0D589F7; Thu, 09 Apr 2026 11:28:46 +0200 (CEST) From: Kristof Provost To: Andrew Turner Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 0ddaa4c86d68 - main - arm64: Add arm64 SVE tests Date: Thu, 09 Apr 2026 11:28:45 +0200 X-Mailer: MailMate (2.0r6272) Message-ID: <40C898CE-AE76-4421-AFC9-DBF05FEDE74C@FreeBSD.org> In-Reply-To: <69d6645c.3d421.446b1290@gitrepo.freebsd.org> References: <69d6645c.3d421.446b1290@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/alternative; boundary="=_MailMate_855D43B4-BDD8-4EBB-803A-CB65502E44F8_=" --=_MailMate_855D43B4-BDD8-4EBB-803A-CB65502E44F8_= Content-Type: text/plain; format=flowed; markup=markdown Content-Transfer-Encoding: quoted-printable On 8 Apr 2026, at 16:21, Andrew Turner wrote: > The branch main has been updated by andrew: > > URL: = > https://cgit.FreeBSD.org/src/commit/?id=3D0ddaa4c86d68e8dacee8a78877e57= 42d53c122b3 > > commit 0ddaa4c86d68e8dacee8a78877e5742d53c122b3 > Author: Andrew Turner > AuthorDate: 2026-04-08 14:17:55 +0000 > Commit: Andrew Turner > CommitDate: 2026-04-08 14:20:52 +0000 > > arm64: Add arm64 SVE tests > > Add the tests/sys/arch directory for architecture-specific tests = > and > use it to add arm64 SVE tests. These test the kernel is managing = > the > SVE state in a way we expect. > > These tests require SVE hardware support to run so will skip when = > they > can't detect it. > > Reviewed by: markj > Sponsored by: Arm Ltd > Differential Revision: https://reviews.freebsd.org/D43311 This causes the tests to fail to run for me: kyua: E: Load of '/usr/tests/Kyuafile' failed: Failed to load Lua file = '/usr/tests/Kyuafile': /usr/tests/Kyuafile:48: Load of = '/usr/tests/sys/Kyuafile' failed: Failed to load Lua file = '/usr/tests/sys/Kyuafile': /usr/tests/sys/Kyuafile:9: Load of = '/usr/tests/sys/arch/Kyuafile' failed: File = '/usr/tests/sys/arch/Kyuafile' not found. I believe it needs this: diff --git a/tests/sys/arch/Makefile b/tests/sys/arch/Makefile index e1a35422410e..f83329c1dd43 100644 --- a/tests/sys/arch/Makefile +++ b/tests/sys/arch/Makefile @@ -1,5 +1,9 @@ +.include + +TESTSDIR=3D ${TESTSBASE}/sys/arch + .if exists(${.CURDIR}/${MACHINE_ARCH}) -SUBDIR+=3D ${MACHINE_ARCH} +TESTS_SUBDIRS+=3D ${MACHINE_ARCH} .endif -.include +.include Best regards, Kristof --=_MailMate_855D43B4-BDD8-4EBB-803A-CB65502E44F8_= Content-Type: text/html Content-Transfer-Encoding: quoted-printable

On 8 Apr 2026, at 16:21, Andrew Turner wrote:

The branch main has been updated by andrew:

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

commit 0ddaa4c86d68e8dacee8a78877e5742d53c122b3
Author: Andrew Turner andrew@Fr= eeBSD.org
AuthorDate: 2026-04-08 14:17:55 +0000
Commit: Andrew Turner andrew@Fr= eeBSD.org
CommitDate: 2026-04-08 14:20:52 +0000

ar=
m64: Add arm64 SVE tests

Add the tests/sys/arch directory for architecture-specific tests and
use it to add arm64 SVE tests. These test the kernel is managing the
SVE state in a way we expect.

These tests require SVE hardware support to run so will skip when they
can't detect it.

Reviewed by:    markj
Sponsored by:   Arm Ltd
Differential Revision:  https://reviews.freebsd.org/D43311

This causes the tests to fail to run for me:

ky=
ua: E: Load of '/usr/tests/Kyuafile' failed: Failed to load Lua file '/us=
r/tests/Kyuafile': /usr/tests/Kyuafile:48: Load of '/usr/tests/sys/Kyuafi=
le' failed: Failed to load Lua file '/usr/tests/sys/Kyuafile': /usr/tests=
/sys/Kyuafile:9: Load of '/usr/tests/sys/arch/Kyuafile' failed: File '/us=
r/tests/sys/arch/Kyuafile' not found.

I believe it needs this:

di=
ff --git a/tests/sys/arch/Makefile b/tests/sys/arch/Makefile
index e1a35422410e..f83329c1dd43 100644
--- a/tests/sys/arch/Makefile
+++ b/tests/sys/arch/Makefile
@@ -1,5 +1,9 @@
+.include <src.opts.mk>
+
+TESTSDIR=3D              ${TESTSBASE}/sys/arch
+
 .if exists(${.CURDIR}/${MACHINE_ARCH})
-SUBDIR+=3D       ${MACHINE_ARCH}
+TESTS_SUBDIRS+=3D        ${MACHINE_ARCH}
 .endif

-.include <bsd.subdir.mk>
+.include <bsd.test.mk>

Best regards,
Kristof

--=_MailMate_855D43B4-BDD8-4EBB-803A-CB65502E44F8_=-- From nobody Thu Apr 9 11:25:42 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fryKf667vz6Z1Md for ; Thu, 09 Apr 2026 11:25: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fryKf38Ymz3Zyy for ; Thu, 09 Apr 2026 11:25:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775733942; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Tiv79qqwGbHG/+ZUwRN8qDON1iTKz5WB1B6eeTDTzVI=; b=qB7E+dr5m2uGM6a8Ph3trmBkBwWp1mBYtIG4v8M+tdQysEtspzZ4GyHe1fmvrUB7cTuTow sF/wez2B0UZFRLbKmOsn6nAX3hT7cOq+kb5ykKIlGnI2JDg4iNrnQH/If0+6YH3diA8s+5 Py2HXJuBpxAZjJ5uXNs9NbJ44gqdyaDPfYeBrn5zegfbYTJI9phbuSRFq0QZWIUXP4lJ6G /LtGq3WHvPhQKDxQuXCnxCxs9lqhHMFUHE3FgLdLlUHMWVg/OW7ky/Y/x6ZvF1VvuoHvGo KEw/LPjSIShnsGezd8EWDxSrYZ1WfEJqQ6kzddkJytCfvVugYu2Be6wTsWrejg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775733942; a=rsa-sha256; cv=none; b=CSrmuwa/8NnrNmqkzTW/raGK3vl43R+sqtA5T/ggt8NI15fkMAI8CMR+MfHsAbSuStfBAj m0nVlUZScf2jR35YjyTQwuEDDoL5axScaMmFAl79U/nrZ30pBcgBZbe/BUDp1KXPbQv6uv 7jQ3FjsSSbwp1HJdOx2d9uFvUx+pheqtlLqi0aNAFARjA3aFd2nAvhVjA6tIx5xLIfxJpR INV9cpSKXzcu/ik6vOfQSqkzoMXZ1CWisUYTxlVF66IFRQTAuudR3CAKkW+flrxvBydQOa OhxJEA/kpFfv1s7aAxS5mazW1nC+YskLK77V97zmvjUnCxQcgg/cdtXRr08Y+w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775733942; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Tiv79qqwGbHG/+ZUwRN8qDON1iTKz5WB1B6eeTDTzVI=; b=EPrKnxnw47wS9VcYoUTm33DfpRxgQHdoHH+/DIXOHcKIb9OhRVQTNs0786sViJEIb/XekB k8dCqMVvYwrWaImZX+9Gtqv+MSfeMhClYAE/bSYJcKSXdqKp+fTi3mqJsIrfw/sw1wFmNi koP+l/OhfStLWqoZUspMnc5MUkjh+LGmmh9rU6W/daKF+030YryCztOODJTn46vWWe2uYw XgLyGo7dN6cqqDbSPIJU/lSdLADuycsHuITqJvxooHNDwkjYrvP4XPCZrp7azCqlY1WOv7 EF7USdtagQFQ4qzZF3l7aqGIGdEJ1E323lTnfYHC3PJRbbkEd5Yyn7ZTbgeL8w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fryKf2jlsz1B0l for ; Thu, 09 Apr 2026 11:25:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2272c by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 09 Apr 2026 11:25:42 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Toomas Soome Subject: git: c1c97f18b5b9 - main - gptzfsboot: boot prompt should emit new line on input List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tsoome X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c1c97f18b5b9110b3222816ed9129a882b6b5931 Auto-Submitted: auto-generated Date: Thu, 09 Apr 2026 11:25:42 +0000 Message-Id: <69d78cb6.2272c.514a70da@gitrepo.freebsd.org> The branch main has been updated by tsoome: URL: https://cgit.FreeBSD.org/src/commit/?id=c1c97f18b5b9110b3222816ed9129a882b6b5931 commit c1c97f18b5b9110b3222816ed9129a882b6b5931 Author: Toomas Soome AuthorDate: 2026-04-09 10:48:15 +0000 Commit: Toomas Soome CommitDate: 2026-04-09 11:24:42 +0000 gptzfsboot: boot prompt should emit new line on input In case the user did input, we should put newline on screen to avoid possible error messages to get mixed with user input. --- stand/i386/gptzfsboot/zfsboot.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/stand/i386/gptzfsboot/zfsboot.c b/stand/i386/gptzfsboot/zfsboot.c index 4c8eae9b65e5..72d791ad2364 100644 --- a/stand/i386/gptzfsboot/zfsboot.c +++ b/stand/i386/gptzfsboot/zfsboot.c @@ -320,10 +320,12 @@ main(void) else if (!auto_boot || !OPT_CHECK(RBX_QUIET)) putchar('\n'); auto_boot = 0; - if (parse_cmd()) + if (parse_cmd()) { putchar('\a'); - else + } else { + putchar('\n'); load(); + } } } From nobody Thu Apr 9 13:30:05 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fs15B2Kfjz6Z8sp for ; Thu, 09 Apr 2026 13: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fs15B0pMKz3tDJ for ; Thu, 09 Apr 2026 13: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=1775741406; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xtJscoA8DPzR/qQH9m+Jz0qg4+j+I7vd+qsDd9/YrVg=; b=JCiOokq8UQrVnmPN7YciuxPPxZsnLrZEmix4zxv7eqjD3gpnBKeBX+uMJB/5iBYjb+mqxJ 05GBuAZG1XPJh0GgBl3qE31oWRp16QsnYGenvVpZoFsExxMQaKpZBbMPN1BWibXFjIUkI5 yM7UzB8cUZusPf7rJdCaj8zkc3R67PGxrJyRywN3mOmg56LmH+7AAW7hL6ZbmmT6w4GGQv p8EunDRjoRAHyHUHyjF2gNoMAgqIHqCfuzqIRKeeg2xIguS335i24uuwryo2O6Ek2qgDXD hKIW5LIIRA1JFMXk0R+uigaBGNW4TVINMGP5eeURcKw3sBAH6YbaHj4/Z5SPfw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775741406; a=rsa-sha256; cv=none; b=yQKPK1U0bFFG+aSJyxBltIY/8L7lOfnPGPjKor/C0B89KYi5+6H2U3ohWGZMVsGjZUQas+ oMc9PvrIbQfn6OrXh97WhvLfM1/id1wys6IapibvPclqdWAbyTLU4HNnu5/REFdgrmnnFZ TdPOlXsSTGXeDKT1FrwSzeWvYstAO+6cpx6bsHqoq/7hHTrSV+SpHaKqex13qzoNh1EmB8 SXJHP/e/u3lqVX/muGd+0/pXvhexVk3e02uhDgOZi/BOCKMJgN3fb0zMRpveSmqV/99305 +Wxy+f8MNngI4A/O59PLB6TDAiIXslObbj0mgT4SCg80xUEeW2cCkYbolvyk2g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775741406; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xtJscoA8DPzR/qQH9m+Jz0qg4+j+I7vd+qsDd9/YrVg=; b=DHtWeZHFuyhGyNV0MAPlnHCAORffDHbfcVzFFsjLSJw55gdpV6CG2wYxcUNWnwGWw++QOz Rx9PzEt3Xj1jVYgZWzYYBZwlgX1gED5KGcCqYyqFS/cmgn4ej3Qfh09uy3DVOyCJLr7RXl MniLeHL+aPKMIepo1vGJj7S+pRjFCe9OCCHeqP28hXHK1ytEX6V7Nwl5pgWkjlVKr4RbW9 xxx+vrHVFuIYfctGr56iTfAGw2ib6eFdG3iS0b0alUu/3KMlREZ5ocaHzE2h8HyPZ7I5dQ 59jJe7y5W9A10rxPZ+kkQ1hXm0E5YoZPVmWwkswXsNY/MhzHjAamSkZUcHg5DQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fs1596yjTz1Dqh for ; Thu, 09 Apr 2026 13:30:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 38e0d by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 09 Apr 2026 13:30:05 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Toomas Soome Subject: git: aacf448007f7 - main - loader.efi: panic() should show stack trace List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tsoome X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: aacf448007f7adbcdb528556cabcd120c9e8cb75 Auto-Submitted: auto-generated Date: Thu, 09 Apr 2026 13:30:05 +0000 Message-Id: <69d7a9dd.38e0d.6535c4c3@gitrepo.freebsd.org> The branch main has been updated by tsoome: URL: https://cgit.FreeBSD.org/src/commit/?id=aacf448007f7adbcdb528556cabcd120c9e8cb75 commit aacf448007f7adbcdb528556cabcd120c9e8cb75 Author: Toomas Soome AuthorDate: 2026-04-09 11:36:12 +0000 Commit: Toomas Soome CommitDate: 2026-04-09 13:29:12 +0000 loader.efi: panic() should show stack trace Because panic() does provide mechanism to have architecture specific panic call, we can instruct it to print out stack trace too (in hope we actually can print). While there, also implement simple check to detect loop in trace. illumos issue: https://www.illumos.org/issues/17887 --- stand/efi/loader/arch/amd64/trap.c | 88 +++++++++++++++++++++++++------------- 1 file changed, 59 insertions(+), 29 deletions(-) diff --git a/stand/efi/loader/arch/amd64/trap.c b/stand/efi/loader/arch/amd64/trap.c index 3fe86f7b1924..ff7190d214ad 100644 --- a/stand/efi/loader/arch/amd64/trap.c +++ b/stand/efi/loader/arch/amd64/trap.c @@ -82,14 +82,68 @@ struct frame { }; void report_exc(struct trapframe *tf); -void -report_exc(struct trapframe *tf) + +static void +stack_trace(struct frame *fp, uintptr_t pc) { - struct frame *fp; - uintptr_t pc, base; + uintptr_t base; char buf[80]; base = (uintptr_t)boot_img->ImageBase; + + printf("Stack trace:\n"); + pager_open(); + while (fp != NULL || pc != 0) { + struct frame *nfp; + char *source = "PC"; + + if (pc >= base && pc < base + boot_img->ImageSize) { + pc -= base; + source = "loader PC"; + } + (void) snprintf(buf, sizeof (buf), "FP %016lx: %s 0x%016lx\n", + (uintptr_t)fp, source, pc); + if (pager_output(buf)) + break; + + if (fp == NULL) + break; + + nfp = fp->fr_savfp; + if (nfp != NULL && nfp <= fp) { + printf("FP %016lx: loop detected, stopping trace\n", + (uintptr_t)nfp); + break; + } + fp = nfp; + + if (fp != NULL) + pc = fp->fr_savpc; + else + pc = 0; + } + pager_close(); +} + +void +panic_action(void) +{ + struct frame *fp; + uintptr_t rip; + + __asm __volatile("movq %%rbp,%0" : "=r" (fp)); + rip = fp->fr_savpc; + + stack_trace(fp, rip); + printf("--> Press a key on the console to reboot <--\n"); + getchar(); + printf("Rebooting...\n"); + exit(1); +} + +void +report_exc(struct trapframe *tf) +{ /* * printf() depends on loader runtime and UEFI firmware health * to produce the console output, in case of exception, the @@ -116,32 +170,8 @@ report_exc(struct trapframe *tf) tf->tf_r9, tf->tf_rax, tf->tf_rbx, tf->tf_rbp, tf->tf_r10, tf->tf_r11, tf->tf_r12, tf->tf_r13, tf->tf_r14, tf->tf_r15); - fp = (struct frame *)tf->tf_rbp; - pc = tf->tf_rip; - - printf("Stack trace:\n"); - pager_open(); - while (fp != NULL || pc != 0) { - char *source = "PC"; - - if (pc >= base && pc < base + boot_img->ImageSize) { - pc -= base; - source = "loader PC"; - } - (void) snprintf(buf, sizeof (buf), "FP %016lx: %s 0x%016lx\n", - (uintptr_t)fp, source, pc); - if (pager_output(buf)) - break; + stack_trace((struct frame *)tf->tf_rbp, tf->tf_rip); - if (fp != NULL) - fp = fp->fr_savfp; - - if (fp != NULL) - pc = fp->fr_savpc; - else - pc = 0; - } - pager_close(); printf("Machine stopped.\n"); } From nobody Thu Apr 9 14:14:33 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fs24b673Mz6Y04V for ; Thu, 09 Apr 2026 14:14: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fs24b05Fmz40bg for ; Thu, 09 Apr 2026 14:14:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775744079; 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; bh=KkrGR/1zTs3sqbIiGoFN1Iw36sDCfETHMID5v8CJT9s=; b=gIuykKZybGfE0hXWzs86UZuh5UT1PvtmMv/ljAqJHQ03TGMUYdDpMF+TBD9cAAvI6IBIkn TRs27wD89P7GAB1T3lSEQ0aGq9UEHv9acKMUaTKTfPqxd1iR3/89+10GKBUI0g1paRq0zy 2ccwz78sJJFclu92wKwWVTGpMFFnCjxcsSOpWTbNN1+Kmop8DcagW+feVJK3E8eWrvqPt6 wWe453HNUiXw4Eslbof94zDLe6YBiqjUOPSpNhpq3V3JtFnee4++sei6chKqNjETiIVvpD nHkwH+6L639xy8y0LDotBbCWalAPvHN3UvsRes1VvdEN6ygTLTd8CLqMUCRZzg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775744079; a=rsa-sha256; cv=none; b=TQBSsS7FP1VaVvf/8Fp3wSf2/02sMihlHBaUTpdHf3K3/sXLAsLoz+y1gfOVxl4QQVAeCe GmOCdrkCwHT24bK9sk078lb1QBbOYnXh3DoV1w8ilMKPjFOu25lsRr3BtU/g5t4JioXgS0 Clh8odFYW4uY/+LadbVJc9KQir9VS94a1MCEjoIPbpAn9XyKyXJKPaw4LmUI5CZMhIPfUu clqihwmtxYoCMo426k4cIcvWloX0i00113gcQOk/Ynfo6ZlEobyadp9DbAZjsvVvHDbNmT NrwtUFx2CqPbm56DeSsyMe+s9y+I8uMoQNuMT1WtufXD8R4AsNO+FF7fgT2J+A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775744079; 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; bh=KkrGR/1zTs3sqbIiGoFN1Iw36sDCfETHMID5v8CJT9s=; b=p8rWmd3KJaiHzxcy63Y+FeJw8/o0vJjTqVNkcAdX62BbN3MO7g2it1D0HyacZikWqr8Us/ YSWXp8QJLmlyRmp7Ym0jIiTqQ82c2SdKCBIsPrrV4UKqrRoNFaaKnpxQp43XjBL+UwVR18 T66Ih4KFme9SLmYY+bfzmA740p3SslxhVyIUlKAJrra8GZSVYqdk4oMEDqcn9t2YbF9j73 8iSDujeFjSthlWbL/yGJgV+qkmhGdBRpkeXWxLD85wq4Eemf/O1MXoEl8hhpFBuwVXMxGn IGVkLcWFS8rFTTDNndZIeQXon40YUk6M20ZMCCn7N+g6pB002yjVTpBvGInyCQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fs24Z6KJ2z1G0L for ; Thu, 09 Apr 2026 14:14:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3bac4 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 09 Apr 2026 14:14:33 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Sarah Walker From: Andrew Turner Subject: git: f54209510b1b - main - virtio_blk: Fix initialisation of dump request structure List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f54209510b1b30b1445792db7d33401f7c7a97d6 Auto-Submitted: auto-generated Date: Thu, 09 Apr 2026 14:14:33 +0000 Message-Id: <69d7b449.3bac4.eb5c0e1@gitrepo.freebsd.org> The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=f54209510b1b30b1445792db7d33401f7c7a97d6 commit f54209510b1b30b1445792db7d33401f7c7a97d6 Author: Sarah Walker AuthorDate: 2026-04-09 10:52:05 +0000 Commit: Andrew Turner CommitDate: 2026-04-09 14:13:31 +0000 virtio_blk: Fix initialisation of dump request structure Commit c8c37141 ("virtio_blk: Use bus_dma for command/ack buffer allocations") failed to update initialisation of the dedicated dump request structure. This caused a panic on attempting to dump core to a virtio_blk device. Reviewed by: asomers Sponsored by: Arm Ltd Pull Request: https://reviews.freebsd.org/D56156 --- sys/dev/virtio/block/virtio_blk.c | 94 ++++++++++++++++++++++----------------- 1 file changed, 54 insertions(+), 40 deletions(-) diff --git a/sys/dev/virtio/block/virtio_blk.c b/sys/dev/virtio/block/virtio_blk.c index 4cedb9b45a0e..96846eb0529a 100644 --- a/sys/dev/virtio/block/virtio_blk.c +++ b/sys/dev/virtio/block/virtio_blk.c @@ -930,11 +930,58 @@ vtblk_hdr_load_callback(void *arg, bus_dma_segment_t *segs, int nsegs, req->vbr_hdr_paddr = segs[0].ds_addr; } +static int +vtblk_create_request(struct vtblk_softc *sc, struct vtblk_request *req) +{ + req->vbr_sc = sc; + + if (bus_dmamap_create(sc->vtblk_dmat, 0, &req->vbr_mapp)) + goto error_free; + + if (bus_dmamem_alloc(sc->vtblk_hdr_dmat, (void **)&req->vbr_hdr, + BUS_DMA_NOWAIT | BUS_DMA_ZERO | BUS_DMA_COHERENT, + &req->vbr_hdr_mapp)) + goto error_destroy; + + if (bus_dmamem_alloc(sc->vtblk_ack_dmat, (void **)&req->vbr_ack, + BUS_DMA_NOWAIT | BUS_DMA_ZERO | BUS_DMA_COHERENT, + &req->vbr_ack_mapp)) + goto error_hdr_free; + + MPASS(sglist_count(req->vbr_hdr, sizeof(*req->vbr_hdr)) == 1); + MPASS(sglist_count(req->vbr_ack, sizeof(*req->vbr_ack)) == 1); + + if (bus_dmamap_load(sc->vtblk_hdr_dmat, req->vbr_hdr_mapp, + req->vbr_hdr, sizeof(struct virtio_blk_outhdr), + vtblk_hdr_load_callback, req, BUS_DMA_NOWAIT)) + goto error_ack_free; + + if (bus_dmamap_load(sc->vtblk_ack_dmat, req->vbr_ack_mapp, + req->vbr_ack, sizeof(uint8_t), vtblk_ack_load_callback, + req, BUS_DMA_NOWAIT)) + goto error_hdr_unload; + + return (0); + +error_hdr_unload: + bus_dmamap_unload(sc->vtblk_hdr_dmat, req->vbr_hdr_mapp); +error_ack_free: + bus_dmamem_free(sc->vtblk_ack_dmat, req->vbr_ack, req->vbr_ack_mapp); +error_hdr_free: + bus_dmamem_free(sc->vtblk_hdr_dmat, req->vbr_hdr, req->vbr_hdr_mapp); +error_destroy: + bus_dmamap_destroy(sc->vtblk_dmat, req->vbr_mapp); +error_free: + + return (ENOMEM); +} + static int vtblk_request_prealloc(struct vtblk_softc *sc) { struct vtblk_request *req; int i, nreqs; + int error; nreqs = virtqueue_size(sc->vtblk_vq); @@ -951,52 +998,19 @@ vtblk_request_prealloc(struct vtblk_softc *sc) if (req == NULL) return (ENOMEM); - req->vbr_sc = sc; - - if (bus_dmamap_create(sc->vtblk_dmat, 0, &req->vbr_mapp)) - goto error_free; - - if (bus_dmamem_alloc(sc->vtblk_hdr_dmat, (void **)&req->vbr_hdr, - BUS_DMA_NOWAIT | BUS_DMA_ZERO | BUS_DMA_COHERENT, - &req->vbr_hdr_mapp)) - goto error_destroy; - - if (bus_dmamem_alloc(sc->vtblk_ack_dmat, (void **)&req->vbr_ack, - BUS_DMA_NOWAIT | BUS_DMA_ZERO | BUS_DMA_COHERENT, - &req->vbr_ack_mapp)) - goto error_hdr_free; - - MPASS(sglist_count(req->vbr_hdr, sizeof(*req->vbr_hdr)) == 1); - MPASS(sglist_count(req->vbr_ack, sizeof(*req->vbr_ack)) == 1); - - if (bus_dmamap_load(sc->vtblk_hdr_dmat, req->vbr_hdr_mapp, - req->vbr_hdr, sizeof(struct virtio_blk_outhdr), - vtblk_hdr_load_callback, req, BUS_DMA_NOWAIT)) - goto error_ack_free; - - if (bus_dmamap_load(sc->vtblk_ack_dmat, req->vbr_ack_mapp, - req->vbr_ack, sizeof(uint8_t), vtblk_ack_load_callback, - req, BUS_DMA_NOWAIT)) - goto error_hdr_unload; + error = vtblk_create_request(sc, req); + if (error) { + free(req, M_DEVBUF); + return (error); + } sc->vtblk_request_count++; vtblk_request_enqueue(sc, req); } - return (0); + error = vtblk_create_request(sc, &sc->vtblk_dump_request); -error_hdr_unload: - bus_dmamap_unload(sc->vtblk_hdr_dmat, req->vbr_hdr_mapp); -error_ack_free: - bus_dmamem_free(sc->vtblk_ack_dmat, req->vbr_ack, req->vbr_ack_mapp); -error_hdr_free: - bus_dmamem_free(sc->vtblk_hdr_dmat, req->vbr_hdr, req->vbr_hdr_mapp); -error_destroy: - bus_dmamap_destroy(sc->vtblk_dmat, req->vbr_mapp); -error_free: - free(req, M_DEVBUF); - - return (ENOMEM); + return (error); } static void From nobody Thu Apr 9 14:31:58 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fs2Sb08jYz6Y1Zm for ; Thu, 09 Apr 2026 14:31: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fs2SZ6CGBz424B for ; Thu, 09 Apr 2026 14:31:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775745118; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dmSpz8huaWL1y/arz2meC4UxAmjNZc9sD8ROnU+VSlo=; b=R9GY6C59n58kvQMqhrsWbrsuMWs41QRTX8mbzOYnpAJ6Y+qozdfGzB2LQyUvqY257wMcOs gtjg1Z32f+wHkAJgCahA5/YdnAEwD5Hb+Tehf4hi2eeHOezqGuAZOWFTMsHLpa6YPe5Sx9 44gFCdz/iHdG6ONZWjcjozX4knRBV2KDlQ5qZEMFerS6ziYEj9p3Xtj469XBOZKTO2lVuT P+ygxuwbIdmjQitgFJOQcWf187LiJjlJsfVH/Ltfs/UH3zc5YYcnUGbNONorZsx4+XNkIS X3HE3ry+gaOy22MK9YuNW3q9ijPK6cSlAqCFZTN256/H0wAfSLrTSYCsFocLfQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775745118; a=rsa-sha256; cv=none; b=B9wGerNSNEDnV+sw5gFq6yxoe6UUD6Vyui9S4ga1IUUYQ45DqQh9cZb2mWQ5OHWkkLmMx+ 5+FFSydw3b+A7byxOwyL9VmBwncuMBRBNszeVkUOl9JxJ6zMIqdahbcKr/Wdvg8sBGZYZb /n3Ux5omzQtWmWr0CeWJVSk5l6WPbbStbauOQ6hOvy3+cl360p+o5nB8F1lLNQqKF38tTk VCEc2OqrpgzF+J4DgrDpi/otkk5WHMHrjAPP5cbAtiTJlaSCnHM0oQxqZoaBZuUqMpzJCl ui9uY8OjlEnRGSOuea2XXH3G6p31WuLd660sPs/Iwa71d8xtB2X5r8NqbtjxqQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775745118; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dmSpz8huaWL1y/arz2meC4UxAmjNZc9sD8ROnU+VSlo=; b=LoAdkWJZm+4vxfQG4bdPJgHxF16ZD1d3h3tHe2Aiabq7wn5OdcSWLoouwzx+NOLs4BKHzN e55THyDd8C1CBtlAIsuCLePzoc8NxdCWqzVYynadZtO2Or+fwA+5z9xJ1+eD4TUACOUQve sBSEs1O7ddwpdFbcCzCIMgfzOyp6qg/ctvQKtXBVCXWOe2q5kltWbCft9V+Nas6v6Nd2cc 2ncdlcTl+madTGQPLUqQ8syh4tTUEqwNo+n3rYZtWtHGCqRmNFSrLpfAp8rq1oc0w+4/7U F6YExVFUm1NhWEBwcQvgBESFlQDpSJff6qAssxtiF7/QwjkW2woQsdnZBiwXkw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fs2SZ5nHzz1GBL for ; Thu, 09 Apr 2026 14:31:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3e2bc by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 09 Apr 2026 14:31:58 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: 0dd9c4abf0e5 - main - tools/build/Makefile: Always add md4.h to SYSINCS List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: 0dd9c4abf0e56b9d4f6f7204a68b1475f2bbf1fc Auto-Submitted: auto-generated Date: Thu, 09 Apr 2026 14:31:58 +0000 Message-Id: <69d7b85e.3e2bc.642fd04a@gitrepo.freebsd.org> The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=0dd9c4abf0e56b9d4f6f7204a68b1475f2bbf1fc commit 0dd9c4abf0e56b9d4f6f7204a68b1475f2bbf1fc Author: Lexi Winter AuthorDate: 2026-04-09 14:30:20 +0000 Commit: Lexi Winter CommitDate: 2026-04-09 14:30:20 +0000 tools/build/Makefile: Always add md4.h to SYSINCS Since libmd was added to the bootstrap, building main on stable/14 fails because of an incompatibility in its old md4.h. Fix this by always including md4.h in the bootstrap headers, instead of only doing so when building on a non-FreeBSD host. Fixes: 50de0bf50512 ("flua: Always build as a bootstrap tool") Reported by: olce Reviewed by: olce, kevans Sponsored by: https://www.patreon.com/bsdivy Differential Revision: https://reviews.freebsd.org/D56327 --- tools/build/Makefile | 2 -- 1 file changed, 2 deletions(-) diff --git a/tools/build/Makefile b/tools/build/Makefile index 604885dea4c8..f0856900b281 100644 --- a/tools/build/Makefile +++ b/tools/build/Makefile @@ -395,10 +395,8 @@ SYSINCS+= ${SRCTOP}/sys/sys/ctf.h SYSINCS+= ${SRCTOP}/sys/sys/kbio.h # for kldxref: SYSINCS+= ${SRCTOP}/sys/sys/module.h -.if ${.MAKE.OS} != "FreeBSD" # for libmd: SYSINCS+= ${SRCTOP}/sys/sys/md4.h -.endif # We want to run the build with only ${WORLDTMP} in $PATH to ensure we don't # accidentally run tools that are incompatible but happen to be in $PATH. From nobody Thu Apr 9 14:34:56 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fs2X46y0Fz6Y1SS; Thu, 09 Apr 2026 14:35:00 +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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fs2X44ZZhz42hY; Thu, 09 Apr 2026 14:35:00 +0000 (UTC) (envelope-from ivy@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775745300; 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=To2L8jFd/hQmzNw3N87CizWTGWcn0lykt49dM36bjMA=; b=SA6RcLE1nfP3raR5SNBvzyETxHsNE+eJXH0MjZ3H2NztmNudxchgtpIjk+7Mpj2Saeaj67 YGfeU7lf4M6UiukfJjP1YeTfWadjsSvcaI5EQJQesqzMW2Oh7e7vChoRyrVK+kXesFWZHG BbSgHXBenjzQFXiODz/YbF9eB6knarzro8J7Xj89FbIrK4zRFf7VWue8k6Yk0xJXzqLk5G x9nmHksmyPrf3zb1p+IewLBCpxW+Wc/UOZjkH8tlwfxDd1r7ZS1SG148isYVYH6iGUtUvT ZFe6DwP63g1aOCkaFuqBQtt25IkRmsM6EBKe1OFfq4rNIN+4yW68W4J5by0Jeg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775745300; a=rsa-sha256; cv=none; b=txSFS0bXm0/3hMDKXz+BeAakm1xrDEzi3Kme5kLD20ZM0mp+ALxMvVhhHd+ClOCawVoYy5 TeH07AjfS73x8RUestqi8wdVWfkPbYqGYDDpsrtS75wPo7x+RX1aeTIJk0ac72NVQ36OkB Vc6S0dBHLHqPrm1xeCNWJLEp0pSLR2hAs7YJ6fgq1J+kMQLSPgzXjzLoVHBhGoR0605XT7 gKbcaT7onWGxGnWkotPnEH+tgVyGn8I7Tt6n7rYlxZ3y3Fqr9Olf657tLWr9mO7ox72gLW +sizPW51EVklq+GDQuE7vwT3sSyFiqgLxBuEG470HULlAStxnsIIukXv0TqrKQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775745300; 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=To2L8jFd/hQmzNw3N87CizWTGWcn0lykt49dM36bjMA=; b=SeotkuYITnRq00CcL7CMU+1KMNZQiW1I8Q7saI8LedqYJbDO8yDwWHWh2oEF9rmOviLZfv ylwjzUNfFAv8CNDjqE/hPfE/pOrvv/QjTd8pUXyqITD4TZWQTLMxnbmBOtEQJs/NJMqiO2 8lvq8YNlOMFC1evX5BcTuPP2ZwiX8eS6bTOpW2gyfhFb9cJH+BIpWUZZlf0X+KiNPbIZcY nrQkzcF73MVpG7pGrd93ksgk0gsEDu2IVPm/VBRGoCPq4CAhkNBMRlfrPEw4aoM72MW8ob QoIZ2UsdomePv07j6ncOekB94DcXBnGX23lHecJxXL3ebGIfw/HqpBycx/QaDg== 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 4fs2X40pz6zpbH; Thu, 09 Apr 2026 14:35:00 +0000 (UTC) (envelope-from ivy@freebsd.org) Date: Thu, 9 Apr 2026 15:34:56 +0100 From: Lexi Winter To: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 50de0bf50512 - main - flua: Always build as a bootstrap tool Message-ID: Mail-Followup-To: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <69d4e4c1.1e7db.33fbe374@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="UGw3LoyNeD4j6yCp" Content-Disposition: inline In-Reply-To: --UGw3LoyNeD4j6yCp Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Lexi Winter wrote in : > Lexi Winter wrote in <69d4e4c1.1e7db.33fbe374@gitrepo.freebsd.org>: > > commit 50de0bf50512aa98d18f21ac1347941396596944 > > Author: Lexi Winter > > AuthorDate: 2026-04-07 10:41:53 +0000 > > Commit: Lexi Winter > > CommitDate: 2026-04-07 10:41:53 +0000 > >=20 > > flua: Always build as a bootstrap tool >=20 > i've received a report that this commit breaks building main on > stable/14, which i'm investigating. sorry for any disruption. this should now be fixed by 0dd9c4abf0e56b9d4f6f7204a68b1475f2bbf1fc. --UGw3LoyNeD4j6yCp Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQSyjTg96lp3RifySyn1nT63mIK/YAUCade5DQAKCRD1nT63mIK/ YJigAP0aUHpaZVW63pDDErx49wDhdBfZe+tHFpP1NvkjSFj4gwD/aLbHiLAw8g2o tQ/KRyHNk+Yo6WghW1/yVRuGqd9MEQQ= =dp7R -----END PGP SIGNATURE----- --UGw3LoyNeD4j6yCp-- From nobody Thu Apr 9 15:52:02 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fs4Dy4QxPz6Y7K1 for ; Thu, 09 Apr 2026 15:52: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fs4Dy3w1Vz4C8j for ; Thu, 09 Apr 2026 15:52:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775749922; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rFyCsyxFYE+uiShLGg8rhcSh8RXwDlNLj5n3FIzKIuY=; b=oygrzX7yA6juyAg+Z9Dio5bEBDD0rRRngzQeLYi0HeqxV9JgqfoxPjTjKUu4SbPsCHvWPk q08WBEQIY3b4yFdRhQEvkrgRLx42IX5zWvNfanAzXbXLXZOq8ionc81FDxb3n9XIcrCXfv cg6YL8i+DpNRqPJCXzXgJ+QGLysDpXXHfoDKoSmzSI6xLRD8Gi0p7kkZgrIPDBN9O84gxR gYzsYRWYkps52Z+Q7xXQUERz06sIh0AcvI4K6CgBprwiMHldDPDEifNqGDGU4FC00SmMu8 xlvxzaTMugtgIdjA5j19XC/LpJrG6h8ppo4XneAZY7R2LDfvgL8JO+6mOiCd6A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775749922; a=rsa-sha256; cv=none; b=rj/983lBWmgmQKMPphOag4ytR3C/FXTAeffQ54r61Frg7rriB9BDlUUKKj6OJdnB+LZ3pi 9d+jkpLSRXW//gDdaYBC7Ilk0U0kxdN00ua6UfHdRveTMXXoLrGcUfFV5OcaKiM83DbOvX FMyBdn6RPNCyaKcr4PDsFhxt/LqTrpVpUL1i7PqI3qkmfDRJ2mgpWM1D3j23qTd8gtJKOx x93nk47bR/Z9kR2vc3JbCHKFKUKVqrPeydtpbLC0XPX9aH505GvCbXyHPrYkt+0sBqJkvQ 2bWe+CTEjWJCp3n8/pnf1TmzJgK3QMXlfbef5xH5PZylQ26/bCGTU5e0aH5nYg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775749922; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rFyCsyxFYE+uiShLGg8rhcSh8RXwDlNLj5n3FIzKIuY=; b=UxXdJZMPPrKXBedXWLn4quvZOGIihS2jXnzW3XH3r+wGuVm/rSCCweOAzJAMqcCVAWtsuJ zbm+iSq+nh9G4VE6vnAcFWUIx6DUcSfwGICOLPWIsUChi9YVvmEtaqq+DUhII/xl7wh7H+ +VJ+C51VpAnTPouk0EBdN/W7lR2znIU+32sYN52EfpuQnk/k7nvNMuhjpudAWUXqHQRtIP e1B6qy/DG5KYicBq5Je6JwIe6HwianrKpEVDz0NxiGVN7g2Y2zCw9tXkDbGoOGicR4SbWQ NTB9z7vtKthI6XHBGM0O/FBYVbGaIjM5tUtGNUkagmcujgN7+fyzLF6JBXTIyA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fs4Dy3BlCz1JR3 for ; Thu, 09 Apr 2026 15:52:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1f4e8 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 09 Apr 2026 15:52:02 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Li-Wen Hsu Subject: git: 8672683ec80a - main - test/sys/arch: Fix arch without test/sys/arch/${MACHINE_ARCH} List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: 8672683ec80a6767b1aa12dedeed94d20ec57911 Auto-Submitted: auto-generated Date: Thu, 09 Apr 2026 15:52:02 +0000 Message-Id: <69d7cb22.1f4e8.566d90b8@gitrepo.freebsd.org> The branch main has been updated by lwhsu: URL: https://cgit.FreeBSD.org/src/commit/?id=8672683ec80a6767b1aa12dedeed94d20ec57911 commit 8672683ec80a6767b1aa12dedeed94d20ec57911 Author: Li-Wen Hsu AuthorDate: 2026-04-09 15:49:56 +0000 Commit: Li-Wen Hsu CommitDate: 2026-04-09 15:49:56 +0000 test/sys/arch: Fix arch without test/sys/arch/${MACHINE_ARCH} Fixes: 0ddaa4c86d68 ("arm64: Add arm64 SVE tests") Sponsored by: The FreeBSD Foundation --- tests/sys/arch/Makefile | 6 ++++-- tests/sys/arch/Makefile.inc | 2 -- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/sys/arch/Makefile b/tests/sys/arch/Makefile index e1a35422410e..40edad27507d 100644 --- a/tests/sys/arch/Makefile +++ b/tests/sys/arch/Makefile @@ -1,5 +1,7 @@ +TESTSDIR= ${TESTSBASE}/sys/arch + .if exists(${.CURDIR}/${MACHINE_ARCH}) -SUBDIR+= ${MACHINE_ARCH} +TESTS_SUBDIRS+= ${MACHINE_ARCH} .endif -.include +.include diff --git a/tests/sys/arch/Makefile.inc b/tests/sys/arch/Makefile.inc index cf5c687d6401..01b5f23410c8 100644 --- a/tests/sys/arch/Makefile.inc +++ b/tests/sys/arch/Makefile.inc @@ -1,3 +1 @@ -TESTSDIR= ${TESTSBASE}/sys/arch - .include "../Makefile.inc" From nobody Thu Apr 9 16:04:39 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fs4Wd01m2z6Y8mR for ; Thu, 09 Apr 2026 16:04: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fs4Wc6GZLz4DLh for ; Thu, 09 Apr 2026 16:04:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775750684; 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; bh=tw0feYQ4/lUORP95oVhe2U3UoAOdnNTvfqHMwU+Ws2A=; b=KO6m+OiMavY+J9a3hDmT/evbkKxZqJqlvFlRPxNEq2PigA0ddo0yl3bBp6WEooxazpo2wk HSIdpJfe2WDrbwwOFQtoAkn8OcJNvXCFu8Sip2gU24F0whlNxKqbaHl8WZmKLKc8KRnSA7 tPcG19or5+hiZifxWDzcJZY/kgPJnawvWfB+Ph5RDiaH0aWwhk7sJSBVZpG2QHX3aHlhD1 EuWhrbpgaP84RENi9WvauUe9XVmVDPBEEyFgPb42EHgI06KqHZsX1RjCrdcrWPhApkUAZ6 3W48QshUYP7ykOSQEXn6AwxbpC8ZR2zAPWDoW9FX5ifsmq7WBDfH1m+RppVnBg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775750684; a=rsa-sha256; cv=none; b=SxYD7Bx5bj+rmUsY75DjISrHk2LyuIov/jbsr7u6wevPGjyXVFqQhCOxopMgmYwzlu3zkd ZZmGxH8SH0o5nWsOvb4JXDX3KAHj3brGpdfhE/ajm39w0mZo5H8eJKwRn5mefjfVLMaiRR YsPcyW+sE1J3fSvEgEwZgmXUwk6JfLtd8f/Yy54mMo8zgR6vgf8NBiukttcmYA3Ocohtlj g48+uJnk2q068cPDJyGALjpSvT4Jk1UYUBNXUFbRHt6ASh9QfUHhJN4PF1VTPStVUZTHal HNrJciHGguphsu69xgOz6cKJs0wuKQoBDPpslY/qiG29wX5Mz/zWYy3LayoS4A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775750684; 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; bh=tw0feYQ4/lUORP95oVhe2U3UoAOdnNTvfqHMwU+Ws2A=; b=qPVKVDpag2/hmv19D43ZT+AydcQYYvSevbqSl7vr6dN/99hbz3S7sD+9Ck/wRvFi3r0ROP MtrGfXmxpGuL7OghrlsDKHTsyepRcRKgb/fphPRjgV0N+DF0s+nU2bI/HLvrSbvUjBkMrT wYipzZZnssFiUKA+UVZCa/31e/zU5re4DV5C3+/aiJZ5Ot2xcU4E0zqMx5teq8X+QOoGhS mbnsiogbH3SHPSbTKQUFOq4fvT2efeHBXX0dKcbDmqTkmmQ+anHNTjukI6K9EijIMMpYrp UZm/qsn0c15LEeUu+9xFDVtR3vJ188/O63FsnvWb7WZcCXyK5Du3Dofbfz42PA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fs4Wc5bXxz1Jxc for ; Thu, 09 Apr 2026 16:04:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1fb77 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 09 Apr 2026 16:04:39 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Alice Cariboni From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: f9160912415e - main - tuning.7: Fix suds typo in manual pages List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f9160912415eef078c32317e02695bc0cc775d39 Auto-Submitted: auto-generated Date: Thu, 09 Apr 2026 16:04:39 +0000 Message-Id: <69d7ce17.1fb77.1fcb04a3@gitrepo.freebsd.org> The branch main has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=f9160912415eef078c32317e02695bc0cc775d39 commit f9160912415eef078c32317e02695bc0cc775d39 Author: Alice Cariboni AuthorDate: 2026-04-09 15:35:47 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2026-04-09 15:57:32 +0000 tuning.7: Fix suds typo in manual pages MFC after: 3 days Fixes: fc32c802158f Add two new manual pages Differential Revision: https://reviews.freebsd.org/D55814 --- share/man/man7/tuning.7 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/share/man/man7/tuning.7 b/share/man/man7/tuning.7 index 586b63c247a8..831362e9e179 100644 --- a/share/man/man7/tuning.7 +++ b/share/man/man7/tuning.7 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd October 28, 2025 +.Dd April 9, 2026 .Dt TUNING 7 .Os .Sh NAME @@ -687,7 +687,7 @@ There are many solutions to saturated disks: increasing memory for caching, mirroring disks, distributing operations across several machines, and so forth. .Pp -Finally, you might run out of network suds. +Finally, you might run out of network resources. Optimize the network path as much as possible. For example, in From nobody Thu Apr 9 16:29:44 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fs54T64wGz6YBgr for ; Thu, 09 Apr 2026 16:29: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fs54S5Rkbz4Gj3 for ; Thu, 09 Apr 2026 16:29:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775752185; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DL3FgqhCDX9EnYQ9TuHbq3AXKm+6so1PijahTJkxBRk=; b=ot3y4TJGdS4cnNhohZbdc475SX8TvH54JnXREsnnZLfJPxjLZE5um6gGbAFy8m9gJPV4K+ 6m8bN4W+u0jlXtRwbIyQhNpOkaE+9sWghUSuZZo2JMDu3S3CkXSFAiPuIw1kbv7Lh068iV zx40poy+x+lOdAvHjLkt2NCPSiDJnffKA0GE2foiH+rjqsPcQsC/k1ThtZvSxFSKdI+tHj u+EWGzrCsoVLVpPThFfTCfFnaishSEH5FpvjfuG5U2HZd5tBPDtjuYoK+U+erbb9MxJbNz CMZmmQK5hm1vuzPyNBDM0uRgJtBRivd/KwR+SVwSc3+AMJ+tWcLFIViJzMKwiw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775752184; a=rsa-sha256; cv=none; b=XdpybowTDIoehotB7su034gBhYLRwMyEj7HmoZxd21wpetTJsAwOmw+I1jt94+OBHV9oWG LWQ9EAeOmW0r7s0dm/pkh177xZ5P/689oe0I9rAipsr+vgxPkhcsJclLJvtnQjg2+4LwDX f4rIiYd9HRfhFkPIOTkd2Q1SNq/DHvOt6W5T/yPMX17lVLCcETFVa4+Unu3/K0O13A0PBa lyftmpErMjj3kRgoP2fFrOr9JKjKFhFih7CajW4XaqgYoM7tJycbjzXzIFXj3sWNkjNPmx ZASw3qum0ti3b1MaoZzL8W0StwV29ebs2CpwnBYtSH02lC9jYHFO3jaYHy8hWw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775752184; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DL3FgqhCDX9EnYQ9TuHbq3AXKm+6so1PijahTJkxBRk=; b=lCMhLOr9TMcUMGMy43SPC0hbWdOGM5xfdAjBteylwV4sWeFnVvtvDUTm5luDFwziSVcruo NKTZA/7VyN1uKaT05vnb8Fux+253nc0TCQn8obwBxXfunBD/BSKZLJvL1XAIcsNlZbhMlA EIqtXHdbIK2CcE/d2gmAd2IyALK642M3j2yD7KPEY2NgZ9/GL36ohdUY1Y9wsQMAzxeIhi 5yTsYluXL4Unb5FwugaszWCXBeBi52avoXh7a0KdjkOdyL2R2GHr3jSrMAqji3y8i7/dlD a1OtskBUaseAOMdr2DZadIbpsWCR5TmyFr5jIlDBWOJhy4tn94iVXhgksKkFyQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fs54S4W8dz1Jyv for ; Thu, 09 Apr 2026 16:29:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 225c1 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 09 Apr 2026 16:29:44 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Navdeep Parhar Subject: git: 2f3dcbb5ef27 - main - hwpmc: Fix compile warning List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: np X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2f3dcbb5ef27edfee1d560395fda3c2c7fd5e5cd Auto-Submitted: auto-generated Date: Thu, 09 Apr 2026 16:29:44 +0000 Message-Id: <69d7d3f8.225c1.4371b609@gitrepo.freebsd.org> The branch main has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=2f3dcbb5ef27edfee1d560395fda3c2c7fd5e5cd commit 2f3dcbb5ef27edfee1d560395fda3c2c7fd5e5cd Author: Navdeep Parhar AuthorDate: 2026-04-07 20:02:06 +0000 Commit: Navdeep Parhar CommitDate: 2026-04-09 16:22:50 +0000 hwpmc: Fix compile warning .../sys/dev/hwpmc/hwpmc_mod.c:4640:1: warning: unused function 'pmc_is_multipart' [-Wunused-function] 4640 | pmc_is_multipart(struct pmc_sample *ps) | ^~~~~~~~~~~~~~~~ 1 warning generated. Reviewed by: mhorne Fixes: e51ef8ae490f - main - hwpmc: Initial support for AMD IBS Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D56296 --- sys/dev/hwpmc/hwpmc_mod.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/sys/dev/hwpmc/hwpmc_mod.c b/sys/dev/hwpmc/hwpmc_mod.c index 6133b52b516f..9533cb81b4a1 100644 --- a/sys/dev/hwpmc/hwpmc_mod.c +++ b/sys/dev/hwpmc/hwpmc_mod.c @@ -198,7 +198,6 @@ static int pmc_debugflags_sysctl_handler(SYSCTL_HANDLER_ARGS); static int pmc_debugflags_parse(char *newstr, char *fence); #endif -static bool pmc_is_multipart(struct pmc_sample *ps); static void pmc_multipart_add(struct pmc_sample *ps, int type, int length); static void pmc_multipart_copydata(struct pmc_sample *ps, @@ -4636,12 +4635,6 @@ pmc_post_callchain_callback(void) return; } -static bool -pmc_is_multipart(struct pmc_sample *ps) -{ - return ((ps->ps_flags & PMC_CC_F_MULTIPART) != 0); -} - static void pmc_multipart_add(struct pmc_sample *ps, int type, int length) { From nobody Thu Apr 9 16:35:29 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fs5C562Gmz6YBxG for ; Thu, 09 Apr 2026 16:35:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fs5C553Qvz4HXx for ; Thu, 09 Apr 2026 16:35:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775752529; 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; bh=rTSxvH3jiisS8woZw0zWwWwJ3fry2mxqOZhmf8hFhg8=; b=MqqzVcNO2tP0x/5ECR6/CeilqOgxfztl1W9pUSaNQnjW4npHPaH76Ud75YNisabnXbjYIb v7bIo/9CtEJhURbcE/27FNPKLtvZ/1F75popZBKlQ9sJHTIElh1ox/gXXz6SVALhGfvf8h 8BQPjFtplNGXfwV9F1WAliUsm2ACg1hbNXxeku1TJSR9qCb2JdQANiqPGVXPUcePhiUij+ oXi5rnAmRr5U0vf5ReqAId0OgA8UQS9+oQJGhckJ8Wy9QeFAPzma//JMrXNie5z5ODR9Vd Q+MVp6sAO/coK2FQv9nh6XHRpbU6PEwnj2BgI+sol7SYfa7ZFb+vHCwFeMPQaA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775752529; a=rsa-sha256; cv=none; b=OIcLQWbDe2y/dSmeNOx/z/ymNWzeOHO8PmuJRqupIIMfUXRdCKGhK2Nl4/pK9b0uSQIOvm Q69gJCpsUkMaPXP8+bGqxG5TS6CGlw2cpz/MuhcmsLSMH5ce2NDCCWn8itR+AwRdbyIfnx NK+x3x/wj/7K5/ElD0FzO4yST2kohtFYhAxfEXLawuGfi7zkPPqaAMxXp6t7gizABUrOgV /3zskhLs9y0vvseuxIsfJ9/fqmGfs+wwVf2Q7bNjuv3ps4+0XmqAJRjohySCakKv3ZUPAJ heVs9EaVXU6ogpei31yZ+XgLDgtfxa7+OCVVxfqPnznN5cU4zLCqtMckdX/ycA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775752529; 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; bh=rTSxvH3jiisS8woZw0zWwWwJ3fry2mxqOZhmf8hFhg8=; b=U1pGEMh6CrADcVJTGOFNQmWk/Z2iAOWijc4uTkeR8BoIw6GmUaIMU+Pcw5O7YTnkL2g/CC B8pxZrvN3UxcjhalQRfwvDk4M5K372mWkvUnz5xmtGqWzoUl35hE74t648u4luaR5KELAf 4RRekxJB/YkPvzk0y7nhFTFUJdmVcJ3Q+oslu9y5uO5sRE+ovZ2ujbE3NAltl7kUdPfnh6 Uo3WV58FkcXrzBnS/03Rv3iG0HZwHyQCOK/2LcCDI+qDcgXanKoYjgyXN7MjIejTgfHiej ngn7Z0vOQIyKmHPVziUFLxrNU3p8wVPAPTsHc9o6zVqr40RdcKmRaEMd8mbnVw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fs5C54Cpbz1Kql for ; Thu, 09 Apr 2026 16:35:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 249d1 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 09 Apr 2026 16:35:29 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Ali Mashtizadeh From: Mitchell Horne Subject: git: 7a1aaca06c33 - main - hwpmc: Fix bug when stopping ibs-op List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: 7a1aaca06c3384f90202dafa60440081d67d00fd Auto-Submitted: auto-generated Date: Thu, 09 Apr 2026 16:35:29 +0000 Message-Id: <69d7d551.249d1.779d8ba0@gitrepo.freebsd.org> The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=7a1aaca06c3384f90202dafa60440081d67d00fd commit 7a1aaca06c3384f90202dafa60440081d67d00fd Author: Ali Mashtizadeh AuthorDate: 2026-04-04 21:30:03 +0000 Commit: Mitchell Horne CommitDate: 2026-04-09 16:35:26 +0000 hwpmc: Fix bug when stopping ibs-op In ibs_stop_pmc I accidently cleared the fetch max count value rather than the op max count value, when stopping the op counter. This mitigates a bug in early pre-zen processors, but breaks using both counters simultaneously. I also found that the max op count mask needs to be extended for recent zen processors. Reported by: Andre Fernando da Silva Reviewed by: mhorne Sponsored by: Netflix Fixes: e51ef8ae490f ("hwpmc: Initial support for AMD IBS") Pull Request: https://github.com/freebsd/freebsd-src/pull/2120 --- sys/dev/hwpmc/hwpmc_ibs.c | 4 ++-- sys/dev/hwpmc/hwpmc_ibs.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/dev/hwpmc/hwpmc_ibs.c b/sys/dev/hwpmc/hwpmc_ibs.c index bfc135f06884..ec1afcb47666 100644 --- a/sys/dev/hwpmc/hwpmc_ibs.c +++ b/sys/dev/hwpmc/hwpmc_ibs.c @@ -270,7 +270,7 @@ ibs_stop_pmc(int cpu __diagused, int ri, struct pmc *pm) * Turn off the ENABLE bit, but unfortunately there are a few quirks * that generate excess NMIs. Workaround #420 in the Revision Guide * for AMD Family 10h Processors 41322 Rev. 3.92 March 2012. requires - * that we clear the count before clearing enable. + * that we clear the max count before clearing enable. * * Even after clearing the counter spurious NMIs are still possible so * we use a per-CPU atomic variable to notify the interrupt handler we @@ -290,7 +290,7 @@ ibs_stop_pmc(int cpu __diagused, int ri, struct pmc *pm) wrmsr(IBS_FETCH_CTL, config); break; case IBS_PMC_OP: - wrmsr(IBS_FETCH_CTL, config & ~IBS_FETCH_CTL_MAXCNTMASK); + wrmsr(IBS_OP_CTL, config & ~IBS_OP_CTL_MAXCNTMASK); DELAY(1); config &= ~IBS_OP_CTL_ENABLE; wrmsr(IBS_OP_CTL, config); diff --git a/sys/dev/hwpmc/hwpmc_ibs.h b/sys/dev/hwpmc/hwpmc_ibs.h index c66d54672543..1616a746ffef 100644 --- a/sys/dev/hwpmc/hwpmc_ibs.h +++ b/sys/dev/hwpmc/hwpmc_ibs.h @@ -112,7 +112,7 @@ #define IBS_OP_CTL_VALID (1ULL << 18) /* Valid */ #define IBS_OP_CTL_ENABLE (1ULL << 17) /* Enable */ #define IBS_OP_CTL_L3MISSONLY (1ULL << 16) /* L3 Miss Filtering */ -#define IBS_OP_CTL_MAXCNTMASK 0x0000FFFFULL +#define IBS_OP_CTL_MAXCNTMASK 0x07F0FFFFULL #define IBS_OP_CTL_LDLAT_TO_CTL(_c) ((((ldlat) >> 7) - 1) << 59) #define IBS_OP_INTERVAL_TO_CTL(_c) ((((_c) >> 4) & 0x0000FFFFULL) | ((_c) & 0x07F00000)) From nobody Thu Apr 9 16:35:30 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fs5C675Smz6YC7v for ; Thu, 09 Apr 2026 16:35:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fs5C65Ttbz4HQ9 for ; Thu, 09 Apr 2026 16:35:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775752530; 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; bh=j1KWE9o2lkcKZQT8JY6aN/DDNvJZmc7OrCvB332+bvg=; b=QRRwgvFdHDqaijTeu3Bp/XO4UZLvtQQm211oiOpIHrkStH7q4tc65jTypD8XkHnjMj9I8/ mUbynluHGmeNsxvug+JBnJYWDS3PhCtWKI5KZl9PQxJelatTSPUkR5qMS48+YKqnmQqUgK czKaEDIXFqkkauMSjyWNA9r5V/zk38+2EQFInx9KqJZk2ksNidePZywdYdwEhqlIq53ePr q5iqiNNpsuImEdEyfQZeYhAOLfh5htES7lZzCTQXeQqc+6+S54F6Zrjp6E1B/+iJMpt9Uq wIgaLE10/twey5n9SCeF7wZB/RwtuWvvG/rdYnBdXs4MddbK8pEo3iF4Bp71lQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775752530; a=rsa-sha256; cv=none; b=ZjLEQADASeBZjDSJOiNuETVllhgHQXd3Q75zsUCV1KiGcJxb5nRFj1wlCJ9g+oVU4EK24q Yq6h0SrwYdnC0m9Skbf39oLF3YHCCbGi11ogBpg87fQNqdGcz1yUxFdGojKxd2C7963bWb ++kQlMM9maMnHELHvQne6ytmQSHiM3R2MXeXmCFXotvRDZG+CAGYl0tbLa+ZI0QU7evPVa behAU/OpX27vrSIKM8XBZLFYPhdYdXLQlLM5qoiiwxzuhfcAcrhNJjts+4U364830x7wvQ oFGNB18b7vU1vrlDsJ1YuSoBThsAh32LnbvIQHmoM4hqwIdnHSATE6iz9JwLmg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775752530; 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; bh=j1KWE9o2lkcKZQT8JY6aN/DDNvJZmc7OrCvB332+bvg=; b=wNNva4lQv7lVv0/kBl9A8dWmZtAoKV+yTw0z1WAlfh4GIxOW3bTJfe2Wf2EGT3p0q3t9pn EYk/twNV7l7DGHEwwy83CPr7BybDkG3Ac1gHj+5+C4JeJDlnzVz15DWo3GmqdTi821Z/ph CFs9zAvm3VyN6ttMQfgIZh4M31GEfuClnaRYyzkBqCVo2ANNmqbNDHvt64twzid6J0kwSg 69AA/Wv9DoCDyr00gPVpKNJHEJ0GvgSZlohJCdMjrgS3/JeOZOHe+X+0hFZNYl3rykCYF6 1atFBfnleTRqzO59S1D8+lL4TkPWpQGgkQthWrHmG8iupt6hinJ0G2YIe5OEkQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fs5C64zm1z1KtC for ; Thu, 09 Apr 2026 16:35:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 24a3c by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 09 Apr 2026 16:35:30 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Ali Mashtizadeh From: Mitchell Horne Subject: git: f86ba3eec596 - main - hwpmc: prevent IBS fetch from getting stuck List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: f86ba3eec5961c0217b5458663e0eae5bbad314e Auto-Submitted: auto-generated Date: Thu, 09 Apr 2026 16:35:30 +0000 Message-Id: <69d7d552.24a3c.9850f95@gitrepo.freebsd.org> The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=f86ba3eec5961c0217b5458663e0eae5bbad314e commit f86ba3eec5961c0217b5458663e0eae5bbad314e Author: Ali Mashtizadeh AuthorDate: 2026-04-07 23:33:03 +0000 Commit: Mitchell Horne CommitDate: 2026-04-09 16:35:26 +0000 hwpmc: prevent IBS fetch from getting stuck Both fetch and op IBS sampling have the same problem where we need to rewrite the control MSR to ensure sampling continues at the correct rate. I also like this because it resets the counter reducing the chances that we collect a sample inside the NMI handler. Reported by: Aalok Agarwal Reviewed by: mhorne Sponsored by: Netflix Fixes: e51ef8ae490f ("hwpmc: Initial support for AMD IBS") Pull Request: https://github.com/freebsd/freebsd-src/pull/2130 --- sys/dev/hwpmc/hwpmc_ibs.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/dev/hwpmc/hwpmc_ibs.c b/sys/dev/hwpmc/hwpmc_ibs.c index ec1afcb47666..a230288f157e 100644 --- a/sys/dev/hwpmc/hwpmc_ibs.c +++ b/sys/dev/hwpmc/hwpmc_ibs.c @@ -342,6 +342,8 @@ pmc_ibs_process_fetch(struct pmc *pm, struct trapframe *tf, uint64_t config) } pmc_process_interrupt_mp(PMC_HR, pm, tf, &mpd); + + wrmsr(IBS_FETCH_CTL, pm->pm_md.pm_ibs.ibs_ctl | IBS_FETCH_CTL_ENABLE); } static void From nobody Thu Apr 9 16:52:18 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fs5ZW0hfyz6YDSH for ; Thu, 09 Apr 2026 16:52: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fs5ZV6qJmz4KqC for ; Thu, 09 Apr 2026 16:52:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775753539; 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; bh=5EbrHla8PpQdm5ZBCXDMZ8Jc4TsR939w4iCQsLCMKBc=; b=D2l+BjKJ1UByrHgfCqnlY79+8a+ivj/b20hHsEy3vIGymN75AVxDT5KegF7frYUl4SjUu5 CBI/YnrQtKndA3c2W7OT/w1Mysauz0tfoiQVWC02E/663mjDhEeJvbt5LBp0hMuZNI49tj jeqqEs8QvevNa/SzoFlmrO2pOgHf6X0uYRTl1iZZks9bRtZm4y0sKHBPDBP1Ep33QRCDnY 4PTGPw26Iy5r94Uem/3thuLRcvKcVBCZOcvOfJMUGSEVc6RzMyoLhA7evEUDH7LhhAkpAJ CcZfsL8iMK1inVjIKFPhqXELfT/6B48Px0s6CIumjDRJRUYAPDTRa3/y85bcfQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775753539; a=rsa-sha256; cv=none; b=wrADhpoGq0u62admpItyJG2IFczN+osKlXu8Ms7p3s7VVSrPWC4X6CRi1RAW+RFAXFEY7L rdlJfSWpyoL4IGYBcbpeJ1j2/ZqYBbxPHHr9X3GdFEuxdfVTg6Qm6CR6kLYcjynlySh3+M YwhmgleUclpCcLvbDUMiumd75UUbpdkDMM81G389aShvkQNrq1O0K6YkZgBfqiq1cZiTdT 6NOsDxJFpewVkEg5iEOHI0lxfAoPUHhcpqDfJr5H6Q9PWIvKaRhbl6+8q88Dh1tgXDYLiU dBU7jU4zSxqyhWm9snaZs643InB6OSib97th5QVVKps6S7Kp/3ZNaOx96chZDw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775753539; 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; bh=5EbrHla8PpQdm5ZBCXDMZ8Jc4TsR939w4iCQsLCMKBc=; b=ijlnfafbo3DL413C50N6VYispc31BVTYWrFJ5DgDLVBGkJ1VRL73TRJqP8kUl8K333Y4QC KZQITuFsBmWSXB0TS1OSOF7n6qwTXZMWZGt8kYgBPWDfY7abi0AsUNl4RcfaiKVzBVYAEN Oi8rYWNKvUSkUNQb8Op/XNo2D6FIPwPN4mm4BW+djdmo0cRwwcPmtAqfUeHHN2OhWLPFrN +KyyPoYWqNLwsRUV21NUkoqbJ0drNCzUw0RpfkV4eTqL6gfucofkGnptgEuoP4eb6uGFYn 0lxv1aBrr0g5rsZrGNKBUGWtOOmWsoeMOVg4eG9+Rec6/SmrJdqcDVOKCi+x1Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fs5ZV6PZnz1Ks2 for ; Thu, 09 Apr 2026 16:52:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 26481 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 09 Apr 2026 16:52:18 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Weixie Cui From: Mitchell Horne Subject: git: c6224994ac70 - main - freebsd32: Fix freebsd11_nstat copyout condition List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: c6224994ac70b4f71ef9e11903bb2e50ed2b1bfe Auto-Submitted: auto-generated Date: Thu, 09 Apr 2026 16:52:18 +0000 Message-Id: <69d7d942.26481.49907a63@gitrepo.freebsd.org> The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=c6224994ac70b4f71ef9e11903bb2e50ed2b1bfe commit c6224994ac70b4f71ef9e11903bb2e50ed2b1bfe Author: Weixie Cui AuthorDate: 2026-03-31 10:12:32 +0000 Commit: Mitchell Horne CommitDate: 2026-04-09 16:46:23 +0000 freebsd32: Fix freebsd11_nstat copyout condition freebsd11_freebsd32_nstat() invoked copyout(2) when freebsd11_cvtnstat32() failed and skipped copyout on success. This is backwards. Fix this to match freebsd11_freebsd32_nlstat() and freebsd11_nstat(), and only copy the nstat32 result to userspace when conversion succeeds. Signed-off-by: Weixie Cui Reviewed by: mhorne MFC after: 1 week Pull Request: https://github.com/freebsd/freebsd-src/pull/2109 --- sys/compat/freebsd32/freebsd32_misc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/compat/freebsd32/freebsd32_misc.c b/sys/compat/freebsd32/freebsd32_misc.c index 4ec6dd452b32..a0b6118900ed 100644 --- a/sys/compat/freebsd32/freebsd32_misc.c +++ b/sys/compat/freebsd32/freebsd32_misc.c @@ -2649,7 +2649,7 @@ freebsd11_freebsd32_nstat(struct thread *td, if (error != 0) return (error); error = freebsd11_cvtnstat32(&sb, &nsb); - if (error != 0) + if (error == 0) error = copyout(&nsb, uap->ub, sizeof (nsb)); return (error); } From nobody Thu Apr 9 17:39:33 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fs6d21X3qz6YH8v for ; Thu, 09 Apr 2026 17:39: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fs6d20GmFz4PNV for ; Thu, 09 Apr 2026 17:39:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775756374; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=an7bPHOKOwIJL713DSryLbX1xKlcq2P5ppzlW6aWTqQ=; b=H74YZAE3UyAvM0QVl0IhXd64NOycphUVxlvYuRyNJk3MVGKNtiiexfxtawDJm6pC3DhzfR 29d18s9mKsVg/VhePXmunYJaaoS9qZDRxDzMcr/7BYgxxV3o1o+E1QevXzh6EzsvwUcgpA b62U3TBp40DilJc+JljPaJoD4cnBe2WM4erJHybD6yOUdM3xpl5lbyhxExDXFLIMfevlql n0MVIoYl+ccyHzO/WeVMmbzd0IaeAtJACsVCCW4lT23ziT8VwpmK9HEQTeH6jDyLFocR+K YlweQvW6uQ+hv1fsD6xmezvF1kkJWQ7fQWyHiyvY3TOygVs/vwC+Yrabkzi0yQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775756374; a=rsa-sha256; cv=none; b=cw8O4j1i0Y0kb98/pjQry5GAIzUZDGPun9aVWEqKY6YAr+BEpXwSe01LKVe664l/YPhzmW OX8LMjbwuGKaORiMSe9neOBmZgtLToUYAjRdXtBFbksLSv/+CIYh+DmFD5DPeJtmBScpnh h6dzHLjnue8777iiFBy0GLK8owlTzaugeFhdXTP1pVMAT3fsalYbdh7p+PAa++TYbseOKA 2M+ZmTR4MypHmyLH9rxYQoUw+CgQ50W/X/obwqmr8YxbfgZNglccmzdEBnh6AIFdtH1pjf 9N6FoVz6heNvUgTh1GgLMQZzKmts3k0ff9D6dUymDFFPO7D6Y5SMVKqRu+vKtg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775756374; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=an7bPHOKOwIJL713DSryLbX1xKlcq2P5ppzlW6aWTqQ=; b=qqIEfrSdTus/52Ty0+KuoJPFn4XF06EGCOBtIov92QsxlHNDma4nfWQYmLOmofpVx33mik LBNPMwkWS5odTl62ixjfxuKM33fDmAUGDvdCok8FXDvwg51nnTBelSeivILo1Lg9UXJqUM MYLlyRNG/VHtlfQhUmtyc7R8pbGoANZaKc2bzfR7fMSORlkcOvmxTZh6WTQvn0uxIenu/J bovdk7XDgHRfW71FLGlN/Bm+qK5tHAEXinA2LGR7O7bq3FN0d2AePEf18BQfrlq+bekc5s F18664OZTbRc8xx8sKhsYlyc/PX+BaXNsb6ENb7maLhk0Ih6RfMuJSZvK8sHDw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fs6d16hp9z1MSP for ; Thu, 09 Apr 2026 17:39:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 32a5f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 09 Apr 2026 17:39:33 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Baptiste Daroussin Subject: git: 72d701eb1d83 - main - nlsysevent: add manpage List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 72d701eb1d83cfb3479e4c839412325ff9efc97c Auto-Submitted: auto-generated Date: Thu, 09 Apr 2026 17:39:33 +0000 Message-Id: <69d7e455.32a5f.7dad4d3b@gitrepo.freebsd.org> The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=72d701eb1d83cfb3479e4c839412325ff9efc97c commit 72d701eb1d83cfb3479e4c839412325ff9efc97c Author: Baptiste Daroussin AuthorDate: 2026-04-09 08:50:41 +0000 Commit: Baptiste Daroussin CommitDate: 2026-04-09 17:39:28 +0000 nlsysevent: add manpage Reviewed by: des --- share/man/man4/Makefile | 1 + share/man/man4/nlsysevent.4 | 132 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 133 insertions(+) diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile index c35859b30b60..6883cdd7d6cf 100644 --- a/share/man/man4/Makefile +++ b/share/man/man4/Makefile @@ -428,6 +428,7 @@ MAN= aac.4 \ ng_vjc.4 \ ng_vlan.4 \ ng_vlan_rotate.4 \ + nlsysevent.4 \ nmdm.4 \ ${_ntb.4} \ ${_ntb_hw_amd.4} \ diff --git a/share/man/man4/nlsysevent.4 b/share/man/man4/nlsysevent.4 new file mode 100644 index 000000000000..3b46ab65f568 --- /dev/null +++ b/share/man/man4/nlsysevent.4 @@ -0,0 +1,132 @@ +.\" +.\" Copyright (c) 2026 Baptiste Daroussin +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.Dd April 9, 2026 +.Dt NLSYSEVENT 4 +.Os +.Sh NAME +.Nm nlsysevent +.Nd Netlink-based kernel event notification module +.Sh SYNOPSIS +To load the driver as a module at boot time, place the following line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +nlsysevent_load="YES" +.Ed +.Pp +Alternatively, to load the module at runtime: +.Bd -literal -offset indent +kldload nlsysevent +.Ed +.Sh DESCRIPTION +The +.Nm +kernel module provides a +.Xr netlink 4 +Generic Netlink interface for receiving kernel device events. +It hooks into the +.Xr devctl 4 +notification system and re-publishes all kernel events as Generic Netlink +multicast messages under the +.Dv NETLINK_GENERIC +protocol family. +.Pp +This provides an alternative to reading events from +.Pa /dev/devctl +.Pq used by Xr devd 8 , +with the advantage that multiple consumers can subscribe to events +simultaneously, and consumers can selectively subscribe to specific +event groups. +.Ss Generic Netlink Family +The module registers a Generic Netlink family named +.Dq Li nlsysevent . +The dynamically-assigned family identifier can be resolved using the +standard +.Dv CTRL_CMD_GETFAMILY +request as described in +.Xr genetlink 4 . +.Ss Commands +The following command is defined: +.Bl -tag -width indent +.It Dv NLSE_CMD_NEWEVENT +Sent when a kernel event occurs. +This message is never solicited by userland; it is only delivered to +sockets that have subscribed to one or more multicast groups. +.El +.Ss Attributes +Each +.Dv NLSE_CMD_NEWEVENT +message contains the following TLV attributes: +.Bl -tag -width indent +.It Dv NLSE_ATTR_SYSTEM +(string) The system name that generated the event +.Pq e.g., Dq Li ACPI , Dq Li IFNET , Dq Li USB . +.It Dv NLSE_ATTR_SUBSYSTEM +(string) The subsystem name within the system. +.It Dv NLSE_ATTR_TYPE +(string) The type of the event. +.It Dv NLSE_ATTR_DATA +(string) Optional extra data associated with the event. +This attribute may be absent if no extra data was provided. +.El +.Ss Multicast Groups +The module creates one multicast group per system name. +The following groups are pre-registered when the module is loaded: +.Pp +.Bl -column "HYPERV_NIC_VF" -offset indent -compact +.It Li ACPI +.It Li AEON +.It Li CAM +.It Li CARP +.It Li coretemp +.It Li DEVFS +.It Li device +.It Li ETHERNET +.It Li GEOM +.It Li HYPERV_NIC_VF +.It Li IFNET +.It Li INFINIBAND +.It Li KERNEL +.It Li nvme +.It Li PMU +.It Li RCTL +.It Li USB +.It Li VFS +.It Li VT +.It Li ZFS +.El +.Pp +Additional groups are created dynamically as new system names appear in +kernel events, up to a maximum of 64 groups. +.Pp +The group identifier for a given system name can be resolved via +.Dv CTRL_CMD_GETFAMILY +and then subscribed to using the +.Dv NETLINK_ADD_MEMBERSHIP +socket option. +.Sh EXAMPLES +The +.Xr genl 1 +utility can be used to monitor events: +.Bd -literal -offset indent +genl monitor nlsysevent +.Ed +.Sh SEE ALSO +.Xr genl 1 , +.Xr snl 3 , +.Xr devctl 4 , +.Xr genetlink 4 , +.Xr netlink 4 , +.Xr devd 8 +.Sh HISTORY +The +.Nm +module first appeared in +.Fx 15.0 . +.Sh AUTHORS +The +.Nm +kernel module and this manual page were written by +.An Baptiste Daroussin Aq Mt bapt@FreeBSD.org . From nobody Thu Apr 9 18:47:34 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fs87b4lCNz6YNkW for ; Thu, 09 Apr 2026 18: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fs87b4T1mz3LSl for ; Thu, 09 Apr 2026 18: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=1775760459; 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; bh=MCMeRYfbN9elOnDlBwbzo4aEis4bYKZ+yxFmyoNXcxg=; b=Kymo+7FPdAQ/gNCL2V4w32eojXAmXr3T6oEcHFIF9KNwP7ypaLGZP77ZKkyVK4KI47drlQ 1Gkv9b9JLrul80hfPoXKssPJtIeqrS8vmIbO1txt1Qb5PVx3drxRD6jgDSQNRjXtrsxGOW 71lzUCjx6M2vmPC3aD/hxJoE5cQaqm3ppLLkHXBr0GpwWeV2Z/pB0gKjp6x0ryrxr/5G9k EvtNazastd5R3PF7IfvJ2dw0vVXUPO2PoajIpfoP88m+IW22m7HubSpsisuV0e6iVhs29o xY0e/eFdpj80piLwWkt5gb4SF4iapCzujSv2y3SQHxltrWujd+yl2t152SWAYQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775760459; a=rsa-sha256; cv=none; b=q0+eteRWSlJujz/f2bCLy1q03YfwQZMLPTUp8PbEwtC8IgZ7pP71/0rZNWAizO+tZe0D6e 4focZFPgyPDQbMOwrbqgEMUYppUUds8PKMTXiPTayamBLP4l7Y4zyY8mvBWpFLdxdTBk53 p7MJoj8awF8V9FfPmSxghDJnInnWvf+UhbVUkGHfBN5pNA9MTgwNfxiYpXfIrz3OD3EMFz DJFwOfrytTy9DOAA+jjsGSmfKS1PV+1uJPaqY9rjZ0KlNh5NDNh7W3TNEZb/wwOjavxXtD KwJI6H/NXQKmaE2gk3KLExT7+ZaauhotYEv3tOzFQ3DRsy/utNVRSnFB2kaYUg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775760459; 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; bh=MCMeRYfbN9elOnDlBwbzo4aEis4bYKZ+yxFmyoNXcxg=; b=wEYunczZk5Fyke0Ves7gGu+qI1+I4rEw0cnoz22NCbUWgV9ZebTdEuz7lS/RAK31KkOJik nA/pye2aZrlxy2H007b0+CciwB1VHbWLazdpIL8v7sJP28jxsSstKPiCVOSUOfyh0LlOcE EVjxl4Bh0apfaooAXarfvitidgKk05lswHMMwG8c/yaxM74Lj7aQU1hcrGRZkbuuTI1V51 4Bq+JO8pTj0wSs8th/6g5Eqvi4IWa0YD96GIqjjOkLHnNGph3+Xk2pKWtA4r8xuLbB+Ym1 FMrJBHTN6yFaQqjLimRk5fNm3NDqbZ8DUTCu3oVVpYfTUwEM1oiy1Zj2cCWy4A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fs87b3VTNz1PBN for ; Thu, 09 Apr 2026 18:47:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 38fd7 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 09 Apr 2026 18:47:34 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Bhosale, Yogesh From: Krzysztof Galazka Subject: git: 6b58d10fc6d5 - main - ix(4): Add support for firmware logging for E610 adapters List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kgalazka X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6b58d10fc6d51ddcf5ee81628ead74d3dadb9bf6 Auto-Submitted: auto-generated Date: Thu, 09 Apr 2026 18:47:34 +0000 Message-Id: <69d7f446.38fd7.3ddefb34@gitrepo.freebsd.org> The branch main has been updated by kgalazka: URL: https://cgit.FreeBSD.org/src/commit/?id=6b58d10fc6d51ddcf5ee81628ead74d3dadb9bf6 commit 6b58d10fc6d51ddcf5ee81628ead74d3dadb9bf6 Author: Bhosale, Yogesh AuthorDate: 2026-04-09 18:05:29 +0000 Commit: Krzysztof Galazka CommitDate: 2026-04-09 18:43:43 +0000 ix(4): Add support for firmware logging for E610 adapters This is part 3 of the support for the new Intel Ethernet E610 family of devices The ix driver now enables firmware logging on Intel E610 devices for debugging with Customer Support. Logs are enabled by default and generated in binary format that requires decoding by support teams. The collected data is firmware and hardware related for debugging purposes only. When the driver loads, it creates a fw_log sysctl node under the debug section. Events are organized into categories (modules) for targeted logging, and users can adjust verbosity levels as needed. This adds sysctl support for the firmware logging feature and updates the ix(4) manual page with documentation. Signed-off-by: Yogesh Bhosale Co-developed-by: Krzysztof Galazka Reviewed by: ziaee, kbowling Tested by: Mateusz Moga MFC after: 1 weeks Sponsored by: Intel Corporation Differential Revision: https://reviews.freebsd.org/D53973 --- share/man/man4/ix.4 | 34 ++- sys/conf/files | 2 + sys/dev/ixgbe/if_ix.c | 22 +- sys/dev/ixgbe/ixgbe.h | 5 + sys/dev/ixgbe/ixgbe_e610.c | 486 +++++++++++++++++++++++++++++++++++++++ sys/dev/ixgbe/ixgbe_e610.h | 13 ++ sys/dev/ixgbe/ixgbe_features.h | 1 + sys/dev/ixgbe/ixgbe_fw_logging.c | 467 +++++++++++++++++++++++++++++++++++++ sys/dev/ixgbe/ixgbe_osdep.c | 36 +++ sys/dev/ixgbe/ixgbe_osdep.h | 3 + sys/modules/ix/Makefile | 1 + sys/modules/ixv/Makefile | 1 + 12 files changed, 1066 insertions(+), 5 deletions(-) diff --git a/share/man/man4/ix.4 b/share/man/man4/ix.4 index 09af85f5c4a7..39ed49aa8dfc 100644 --- a/share/man/man4/ix.4 +++ b/share/man/man4/ix.4 @@ -138,7 +138,7 @@ The driver supports the following .Xr sysctl 8 variables: -.Bl -tag -width "dev.ix.?.debug.dump.clusters" +.Bl -tag -width "dev.ix.?.debug.fw_log.severity." .It Va dev.ix.?.debug.dump.clusters Specify a bitmask to select firmware event clusters to be included in the debug dump. @@ -160,6 +160,38 @@ Output must be redirected to a file and decoded by Intel Customer Support. .Pp This feature is only supported on E610. +.It Va dev.ix.?.debug.fw_log.severity. +Specify firmware logging verbosity level for the specified module. +Available levels include: +.Pp +.Bl -tag -compact +.It 0 +none +.It 1 +error +.It 2 +warning +.It 3 +normal +.It 4 +verbose +.El +.Pp +Supported modules: general, ctrl, link, link_topo, dnl, i2c, sdp, mdio, +adminq, hdma, lldp, dcbx, dcb, xlr, nvm, auth, vpd, iosf, parser, sw, +scheduler, txq, acl, post, watchdog, task_dispatch, mng, synce, health, +tsdrv, pfreg, mdlver. +.Pp +This feature is only supported on E610 devices. +.It Va dev.ix.?.debug.fw_log.register +Specify 1 to apply per-device firmware logging configuration. +.Pp +This feature is only supported on E610 devices. +.It Va dev.ix.?.debug.fw_log.on_load +Enable firmware logging during driver initialization when set via +.Xr kenv 1 . +.Pp +This feature is only supported on E610 devices. .El .Sh DIAGNOSTICS .Bl -diag diff --git a/sys/conf/files b/sys/conf/files index 66999f9c5325..b44fb46ef764 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -2315,6 +2315,8 @@ dev/ixgbe/ixgbe_api.c optional ix inet | ixv inet \ compile-with "${NORMAL_C} -I$S/dev/ixgbe" dev/ixgbe/ixgbe_common.c optional ix inet | ixv inet \ compile-with "${NORMAL_C} -I$S/dev/ixgbe" +dev/ixgbe/ixgbe_fw_logging.c optional ix inet | ixv inet \ + compile-with "${NORMAL_C} -I$S/dev/ixgbe" dev/ixgbe/ixgbe_mbx.c optional ix inet | ixv inet \ compile-with "${NORMAL_C} -I$S/dev/ixgbe" dev/ixgbe/ixgbe_vf.c optional ix inet | ixv inet \ diff --git a/sys/dev/ixgbe/if_ix.c b/sys/dev/ixgbe/if_ix.c index 88cbeb418ec6..9a1ed66ad6a8 100644 --- a/sys/dev/ixgbe/if_ix.c +++ b/sys/dev/ixgbe/if_ix.c @@ -1122,10 +1122,13 @@ ixgbe_if_attach_pre(if_ctx_t ctx) break; } - /* Check the FW API version */ - if (hw->mac.type == ixgbe_mac_E610 && ixgbe_check_fw_api_version(sc)) { - error = EIO; - goto err_pci; + /* Check the FW API version and enable FW logging support for E610 */ + if (hw->mac.type == ixgbe_mac_E610) { + if (ixgbe_check_fw_api_version(sc)) { + error = EIO; + goto err_pci; + } + ixgbe_fwlog_set_support_ena(hw); } /* Most of the iflib initialization... */ @@ -3399,6 +3402,9 @@ ixgbe_add_debug_sysctls(struct ixgbe_softc *sc) if (sc->feat_en & IXGBE_FEATURE_DBG_DUMP) ixgbe_add_debug_dump_sysctls(sc); + + if (sc->feat_en & IXGBE_FEATURE_FW_LOGGING) + ixgbe_add_fw_logging_tunables(sc, sc->debug_sysctls); } /* ixgbe_add_debug_sysctls */ /************************************************************************ @@ -4495,6 +4501,10 @@ ixgbe_handle_fw_event(void *context) sc->task_requests |= IXGBE_REQUEST_TASK_LSC; break; + case ixgbe_aci_opc_fw_logs_event: + ixgbe_fwlog_event_dump(&sc->hw, &event.desc, event.msg_buf); + break; + case ixgbe_aci_opc_temp_tca_event: if (hw->adapter_stopped == FALSE) ixgbe_if_stop(ctx); @@ -5731,6 +5741,7 @@ ixgbe_init_device_features(struct ixgbe_softc *sc) case ixgbe_mac_E610: sc->feat_cap |= IXGBE_FEATURE_RECOVERY_MODE; sc->feat_cap |= IXGBE_FEATURE_DBG_DUMP; + sc->feat_cap |= IXGBE_FEATURE_FW_LOGGING; error = ixgbe_get_caps(&sc->hw); if (error == 0 && sc->hw.func_caps.common_cap.eee_support != 0) sc->feat_cap |= IXGBE_FEATURE_EEE; @@ -5758,6 +5769,9 @@ ixgbe_init_device_features(struct ixgbe_softc *sc) /* FW Debug Dump */ if (sc->feat_cap & IXGBE_FEATURE_DBG_DUMP) sc->feat_en |= IXGBE_FEATURE_DBG_DUMP; + /* FW Logging */ + if (sc->feat_cap & IXGBE_FEATURE_FW_LOGGING) + sc->feat_en |= IXGBE_FEATURE_FW_LOGGING; /* Enabled via global sysctl... */ /* Flow Director */ diff --git a/sys/dev/ixgbe/ixgbe.h b/sys/dev/ixgbe/ixgbe.h index 624b71acabea..9120ca5a37ff 100644 --- a/sys/dev/ixgbe/ixgbe.h +++ b/sys/dev/ixgbe/ixgbe.h @@ -607,6 +607,11 @@ int ixgbe_setup_receive_structures(struct ixgbe_softc *); void ixgbe_free_receive_structures(struct ixgbe_softc *); int ixgbe_get_regs(SYSCTL_HANDLER_ARGS); +void ixgbe_add_fw_logging_tunables(struct ixgbe_softc *sc, + struct sysctl_oid *parent); + +#define IXGBE_STR_BUF_LEN 32 + #include "ixgbe_bypass.h" #include "ixgbe_fdir.h" #include "ixgbe_rss.h" diff --git a/sys/dev/ixgbe/ixgbe_e610.c b/sys/dev/ixgbe/ixgbe_e610.c index b76d96814933..21066f95a16e 100644 --- a/sys/dev/ixgbe/ixgbe_e610.c +++ b/sys/dev/ixgbe/ixgbe_e610.c @@ -3829,6 +3829,492 @@ s32 ixgbe_handle_nvm_access(struct ixgbe_hw *hw, } } +/** + * ixgbe_fwlog_cache_cfg - Cache FW logging config + * @hw: pointer to the HW structure + * @cfg: config to cache + * + * Cache FW logging config. + */ +static void ixgbe_fwlog_cache_cfg(struct ixgbe_hw *hw, + struct ixgbe_fwlog_cfg *cfg) +{ + hw->fwlog_cfg = *cfg; +} + +/** + * ixgbe_fwlog_valid_module_entries - validate all the module entry IDs and + * log levels + * @hw: pointer to the HW structure + * @entries: entries to validate + * @num_entries: number of entries to validate + * + * Checks if all the module entry IDs and log levels are valid. + * + * Return: true if all the module entry IDs and log levels are valid, + * otherwise false. + */ +static bool ixgbe_fwlog_valid_module_entries(struct ixgbe_hw *hw, + struct ixgbe_fwlog_module_entry *entries, + u16 num_entries) +{ + u16 i; + + UNREFERENCED_1PARAMETER(hw); + + if (!entries) { + return false; + } + + if (!num_entries) { + return false; + } + + for (i = 0; i < num_entries; i++) { + struct ixgbe_fwlog_module_entry *entry = &entries[i]; + + if (entry->module_id >= IXGBE_ACI_FW_LOG_ID_MAX) { + return false; + } + + if (entry->log_level >= IXGBE_FWLOG_LEVEL_INVALID) { + return false; + } + } + + return true; +} + +/** + * ixgbe_fwlog_valid_cfg - validate configuration + * @hw: pointer to the HW structure + * @cfg: config to validate + * + * Validate the entire configuration. + * + * Return: true if the entire configuration is valid, otherwise false. + */ +static bool ixgbe_fwlog_valid_cfg(struct ixgbe_hw *hw, + struct ixgbe_fwlog_cfg *cfg) +{ + if (!cfg) { + return false; + } + + if (cfg->log_resolution < IXGBE_ACI_FW_LOG_MIN_RESOLUTION || + cfg->log_resolution > IXGBE_ACI_FW_LOG_MAX_RESOLUTION) { + return false; + } + + if (!ixgbe_fwlog_valid_module_entries(hw, cfg->module_entries, + IXGBE_ACI_FW_LOG_ID_MAX)) + return false; + + return true; +} + +/** + * ixgbe_fwlog_init - Initialize cached structures for tracking FW logging + * @hw: pointer to the HW structure + * @cfg: config used to initialize the cached structures + * + * Initialize cached structures for tracking FW logging + * Called on driver initialization and before calling + * ixgbe_init_hw(). Firmware logging will be configured based on these settings + * and also the PF will be registered on init. + * + * Return: the exit code of the operation. + */ +s32 ixgbe_fwlog_init(struct ixgbe_hw *hw, struct ixgbe_fwlog_cfg *cfg) +{ + if (!ixgbe_fwlog_valid_cfg(hw, cfg)) + return IXGBE_ERR_PARAM; + + ixgbe_fwlog_cache_cfg(hw, cfg); + + return IXGBE_SUCCESS; +} + +/** + * ixgbe_aci_fwlog_set - Set FW logging configuration + * @hw: pointer to the HW structure + * @entries: entries to configure + * @num_entries: number of @entries + * @options: options from ixgbe_fwlog_cfg->options structure + * @log_resolution: logging resolution + * + * Set FW logging configuration using ACI command (0xFF30). + * + * Return: the exit code of the operation. + */ +static s32 ixgbe_aci_fwlog_set(struct ixgbe_hw *hw, + struct ixgbe_fwlog_module_entry *entries, + u16 num_entries, u16 options, u16 log_resolution) +{ + struct ixgbe_aci_cmd_fw_log_cfg_resp fw_modules[IXGBE_ACI_FW_LOG_ID_MAX]; + struct ixgbe_aci_cmd_fw_log *cmd; + struct ixgbe_aci_desc desc; + s32 status; + u16 i; + + if (num_entries > IXGBE_ACI_FW_LOG_ID_MAX) + return IXGBE_ERR_PARAM; + + for (i = 0; i < num_entries; i++) { + fw_modules[i].module_identifier = + IXGBE_CPU_TO_LE16(entries[i].module_id); + fw_modules[i].log_level = entries[i].log_level; + } + + ixgbe_fill_dflt_direct_cmd_desc(&desc, ixgbe_aci_opc_fw_logs_config); + desc.flags |= IXGBE_CPU_TO_LE16(IXGBE_ACI_FLAG_RD); + + cmd = &desc.params.fw_log; + + cmd->cmd_flags = IXGBE_ACI_FW_LOG_CONF_SET_VALID; + cmd->ops.cfg.log_resolution = IXGBE_CPU_TO_LE16(log_resolution); + cmd->ops.cfg.mdl_cnt = IXGBE_CPU_TO_LE16(num_entries); + + if (options & IXGBE_FWLOG_OPTION_ARQ_ENA) + cmd->cmd_flags |= IXGBE_ACI_FW_LOG_CONF_AQ_EN; + if (options & IXGBE_FWLOG_OPTION_UART_ENA) + cmd->cmd_flags |= IXGBE_ACI_FW_LOG_CONF_UART_EN; + + status = ixgbe_aci_send_cmd(hw, &desc, fw_modules, + sizeof(*fw_modules) * num_entries); + + return status; +} + +/** + * ixgbe_fwlog_supported - Cached for whether FW supports FW logging or not + * @hw: pointer to the HW structure + * + * This will always return false if called before ixgbe_init_hw(), so it must be + * called after ixgbe_init_hw(). + * + * Return: true if FW supports FW logging. + * If this function is called before ixgbe_init_hw(), return false. + */ +bool ixgbe_fwlog_supported(struct ixgbe_hw *hw) +{ + return hw->fwlog_support_ena; +} + +/** + * ixgbe_fwlog_set - Set the firmware logging settings + * @hw: pointer to the HW structure + * @cfg: config used to set firmware logging + * + * Call this function whenever the driver needs to set the firmware + * logging configuration. It can be called on initialization, reset, or during + * runtime. + * + * If the PF wishes to receive FW logging then it must register via + * ixgbe_fwlog_register. Note, that ixgbe_fwlog_register does not need to + * be called for init. + * + * Return: the exit code of the operation. + */ +s32 ixgbe_fwlog_set(struct ixgbe_hw *hw, struct ixgbe_fwlog_cfg *cfg) +{ + s32 status; + + if (!ixgbe_fwlog_supported(hw)) + return IXGBE_ERR_NOT_SUPPORTED; + + if (!ixgbe_fwlog_valid_cfg(hw, cfg)) + return IXGBE_ERR_PARAM; + + status = ixgbe_aci_fwlog_set(hw, cfg->module_entries, + IXGBE_ACI_FW_LOG_ID_MAX, cfg->options, + cfg->log_resolution); + if (!status) + ixgbe_fwlog_cache_cfg(hw, cfg); + + return status; +} + +/** + * ixgbe_fwlog_update_cached_entries - Update module entries in cached + * FW logging config + * @hw: pointer to the HW structure + * @entries: entries to cache + * @num_entries: number of @entries + * + * Update module entries in cached FW logging config. + */ +static void ixgbe_fwlog_update_cached_entries(struct ixgbe_hw *hw, + struct ixgbe_fwlog_module_entry *entries, + u16 num_entries) +{ + u16 i; + + for (i = 0; i < num_entries; i++) { + struct ixgbe_fwlog_module_entry *updated = &entries[i]; + u16 j; + + for (j = 0; j < IXGBE_ACI_FW_LOG_ID_MAX; j++) { + struct ixgbe_fwlog_module_entry *cached = + &hw->fwlog_cfg.module_entries[j]; + + if (cached->module_id == updated->module_id) { + cached->log_level = updated->log_level; + break; + } + } + } +} + +/** + * ixgbe_fwlog_update_modules - Update the log level 1 or more + * FW logging modules + * @hw: pointer to the HW structure + * @entries: array of ixgbe_fwlog_module_entry(s) + * @num_entries: number of entries + * + * Update the log level of 1 or more FW logging modules via module ID. + * + * Only the entries passed in will be affected. All other firmware logging + * settings will be unaffected. + * + * Return: the exit code of the operation. + */ +s32 ixgbe_fwlog_update_modules(struct ixgbe_hw *hw, + struct ixgbe_fwlog_module_entry *entries, + u16 num_entries) +{ + struct ixgbe_fwlog_cfg cfg; + s32 status; + + if (!ixgbe_fwlog_supported(hw)) + return IXGBE_ERR_NOT_SUPPORTED; + + if (num_entries > IXGBE_ACI_FW_LOG_ID_MAX) + return IXGBE_ERR_PARAM; + + if (!ixgbe_fwlog_valid_module_entries(hw, entries, num_entries)) + return IXGBE_ERR_PARAM; + + status = ixgbe_fwlog_get(hw, &cfg); + if (status) + goto status_out; + + status = ixgbe_aci_fwlog_set(hw, entries, num_entries, cfg.options, + cfg.log_resolution); + if (!status) + ixgbe_fwlog_update_cached_entries(hw, entries, num_entries); + +status_out: + return status; +} + +/** + * ixgbe_aci_fwlog_register - Register PF for firmware logging events. + * @hw: pointer to the HW structure + * @reg: true to register and false to unregister + * + * Register a PF for firmware logging events using ACI command (0xFF31). + * + * Return: the exit code of the operation. + */ +static s32 ixgbe_aci_fwlog_register(struct ixgbe_hw *hw, bool reg) +{ + struct ixgbe_aci_desc desc; + + ixgbe_fill_dflt_direct_cmd_desc(&desc, ixgbe_aci_opc_fw_logs_register); + + if (reg) + desc.params.fw_log.cmd_flags = IXGBE_ACI_FW_LOG_AQ_REGISTER; + + return ixgbe_aci_send_cmd(hw, &desc, NULL, 0); +} + +/** + * ixgbe_fwlog_register - Register the PF for firmware logging + * @hw: pointer to the HW structure + * + * After this call the PF will start to receive firmware logging based on the + * configuration set in ixgbe_fwlog_set. + * + * Return: the exit code of the operation. + */ +s32 ixgbe_fwlog_register(struct ixgbe_hw *hw) +{ + s32 status; + + if (!ixgbe_fwlog_supported(hw)) + return IXGBE_ERR_NOT_SUPPORTED; + + status = ixgbe_aci_fwlog_register(hw, true); + + if (!status) + hw->fwlog_cfg.options |= IXGBE_FWLOG_OPTION_IS_REGISTERED; + + return status; +} + +/** + * ixgbe_fwlog_unregister - Unregister the PF from firmware logging + * @hw: pointer to the HW structure + * + * Make an attempt to unregister the PF from firmware logging. + * + * Return: the exit code of the operation. + */ +s32 ixgbe_fwlog_unregister(struct ixgbe_hw *hw) +{ + s32 status; + + if (!ixgbe_fwlog_supported(hw)) + return IXGBE_ERR_NOT_SUPPORTED; + + status = ixgbe_aci_fwlog_register(hw, false); + if (!status) + hw->fwlog_cfg.options &= ~IXGBE_FWLOG_OPTION_IS_REGISTERED; + + return status; +} + +/** + * ixgbe_aci_fwlog_get - Get the current firmware logging configuration + * @hw: pointer to the HW structure + * @cfg: firmware logging configuration to populate + * + * Make an attempt to get the current firmware logging + * configuration using ACI command (0xFF32). + * + * Return: the exit code of the operation. + */ +static s32 ixgbe_aci_fwlog_get(struct ixgbe_hw *hw, struct ixgbe_fwlog_cfg *cfg) +{ + struct ixgbe_aci_cmd_fw_log_cfg_resp *fw_modules; + struct ixgbe_aci_cmd_fw_log *cmd; + struct ixgbe_aci_desc desc; + u16 i, module_id_cnt; + u8 *buf = NULL; + s32 status; + + memset(cfg, 0, sizeof(*cfg)); + + ixgbe_fill_dflt_direct_cmd_desc(&desc, ixgbe_aci_opc_fw_logs_query); + cmd = &desc.params.fw_log; + + cmd->cmd_flags = IXGBE_ACI_FW_LOG_AQ_QUERY; + + buf = (u8 *)ixgbe_malloc(hw, IXGBE_ACI_MAX_BUFFER_SIZE); + if (!buf) + return IXGBE_ERR_OUT_OF_MEM; + + status = ixgbe_aci_send_cmd(hw, &desc, buf, IXGBE_ACI_MAX_BUFFER_SIZE); + if (status) { + goto status_out; + } + + module_id_cnt = IXGBE_LE16_TO_CPU(cmd->ops.cfg.mdl_cnt); + if (module_id_cnt > IXGBE_ACI_FW_LOG_ID_MAX) { + module_id_cnt = IXGBE_ACI_FW_LOG_ID_MAX; + } + + cfg->log_resolution = (u8)IXGBE_LE16_TO_CPU(cmd->ops.cfg.log_resolution); + if (cmd->cmd_flags & IXGBE_ACI_FW_LOG_CONF_AQ_EN) + cfg->options |= IXGBE_FWLOG_OPTION_ARQ_ENA; + if (cmd->cmd_flags & IXGBE_ACI_FW_LOG_CONF_UART_EN) + cfg->options |= IXGBE_FWLOG_OPTION_UART_ENA; + if (cmd->cmd_flags & IXGBE_ACI_FW_LOG_QUERY_REGISTERED) + cfg->options |= IXGBE_FWLOG_OPTION_IS_REGISTERED; + + fw_modules = (struct ixgbe_aci_cmd_fw_log_cfg_resp *)buf; + + for (i = 0; i < module_id_cnt; i++) { + struct ixgbe_aci_cmd_fw_log_cfg_resp *fw_module = &fw_modules[i]; + + cfg->module_entries[i].module_id = + IXGBE_LE16_TO_CPU(fw_module->module_identifier); + cfg->module_entries[i].log_level = fw_module->log_level; + } + +status_out: + if (buf) + ixgbe_free(hw, buf); + return status; +} + +/** + * ixgbe_fwlog_set_support_ena - Set if FW logging is supported by FW + * @hw: pointer to the HW struct + * + * If FW returns success to the ixgbe_aci_fwlog_get call then it supports FW + * logging, else it doesn't. Set the fwlog_support_ena flag accordingly. + * + * This function is only meant to be called during driver init to determine if + * the FW support FW logging. + * + * Return: the exit code of the operation. + */ +void ixgbe_fwlog_set_support_ena(struct ixgbe_hw *hw) +{ + struct ixgbe_fwlog_cfg cfg; + s32 status; + + hw->fwlog_support_ena = false; + + /* don't call ixgbe_fwlog_get() because that would overwrite the cached + * configuration from the call to ixgbe_fwlog_init(), which is expected + * to be called prior to this function + */ + status = ixgbe_aci_fwlog_get(hw, &cfg); + if (!status) + hw->fwlog_support_ena = true; +} + +/** + * ixgbe_fwlog_get - Get the firmware logging settings + * @hw: pointer to the HW structure + * @cfg: config to populate based on current firmware logging settings + * + * Get the current firmware logging settings. + * + * Return: the exit code of the operation. + */ +s32 ixgbe_fwlog_get(struct ixgbe_hw *hw, struct ixgbe_fwlog_cfg *cfg) +{ + s32 status; + + if (!ixgbe_fwlog_supported(hw)) + return IXGBE_ERR_NOT_SUPPORTED; + + if (!cfg) + return IXGBE_ERR_PARAM; + + status = ixgbe_aci_fwlog_get(hw, cfg); + if (status) + return status; + + ixgbe_fwlog_cache_cfg(hw, cfg); + + return IXGBE_SUCCESS; +} + +/** + * ixgbe_fwlog_event_dump - Dump the event received over the Admin Receive Queue + * @hw: pointer to the HW structure + * @desc: Admin Receive Queue descriptor + * @buf: buffer that contains the FW log event data + * + * If the driver receives the ixgbe_aci_opc_fw_logs_event on the Admin Receive + * Queue, then it should call this function to dump the FW log data. + */ +void ixgbe_fwlog_event_dump(struct ixgbe_hw *hw, + struct ixgbe_aci_desc *desc, void *buf) +{ + if (!ixgbe_fwlog_supported(hw)) + return; + + ixgbe_info_fwlog(hw, 32, 1, (u8 *)buf, + IXGBE_LE16_TO_CPU(desc->datalen)); +} + /** * ixgbe_aci_set_health_status_config - Configure FW health events * @hw: pointer to the HW struct diff --git a/sys/dev/ixgbe/ixgbe_e610.h b/sys/dev/ixgbe/ixgbe_e610.h index 94e600139499..7af5506d85e8 100644 --- a/sys/dev/ixgbe/ixgbe_e610.h +++ b/sys/dev/ixgbe/ixgbe_e610.h @@ -169,6 +169,19 @@ s32 ixgbe_handle_nvm_access(struct ixgbe_hw *hw, s32 ixgbe_aci_set_health_status_config(struct ixgbe_hw *hw, u8 event_source); +s32 ixgbe_fwlog_init(struct ixgbe_hw *hw, struct ixgbe_fwlog_cfg *cfg); +bool ixgbe_fwlog_supported(struct ixgbe_hw *hw); +s32 ixgbe_fwlog_set(struct ixgbe_hw *hw, struct ixgbe_fwlog_cfg *cfg); +s32 ixgbe_fwlog_update_modules(struct ixgbe_hw *hw, + struct ixgbe_fwlog_module_entry *entries, + u16 num_entries); +s32 ixgbe_fwlog_register(struct ixgbe_hw *hw); +s32 ixgbe_fwlog_unregister(struct ixgbe_hw *hw); +void ixgbe_fwlog_set_support_ena(struct ixgbe_hw *hw); +s32 ixgbe_fwlog_get(struct ixgbe_hw *hw, struct ixgbe_fwlog_cfg *cfg); +void ixgbe_fwlog_event_dump(struct ixgbe_hw *hw, + struct ixgbe_aci_desc *desc, void *buf); + /* E610 operations */ s32 ixgbe_init_ops_E610(struct ixgbe_hw *hw); s32 ixgbe_reset_hw_E610(struct ixgbe_hw *hw); diff --git a/sys/dev/ixgbe/ixgbe_features.h b/sys/dev/ixgbe/ixgbe_features.h index bee9040319d8..bbc7507b29ac 100644 --- a/sys/dev/ixgbe/ixgbe_features.h +++ b/sys/dev/ixgbe/ixgbe_features.h @@ -58,6 +58,7 @@ #define IXGBE_FEATURE_NEEDS_CTXD (u32)(1 << 13) #define IXGBE_FEATURE_RECOVERY_MODE (u32)(1 << 15) #define IXGBE_FEATURE_DBG_DUMP (u32)(1 << 16) +#define IXGBE_FEATURE_FW_LOGGING (u32)(1 << 17) /* Check for OS support. Undefine features if not included in the OS */ #ifndef PCI_IOV diff --git a/sys/dev/ixgbe/ixgbe_fw_logging.c b/sys/dev/ixgbe/ixgbe_fw_logging.c new file mode 100644 index 000000000000..6202d504423f --- /dev/null +++ b/sys/dev/ixgbe/ixgbe_fw_logging.c @@ -0,0 +1,467 @@ +/** + * @file ixgbe_fw_logging.c + * @brief firmware logging sysctls + * + * Contains sysctls to enable and configure firmware logging debug support. + */ + + #include "ixgbe.h" + + /** + * ixgbe_reconfig_fw_log - Re-program firmware logging configuration + * @sc: private softc structure + * @cfg: firmware log configuration to latch + * + * If the adminq is currently active, ask firmware to update the logging + * configuration. If the adminq is currently down, then do nothing. In this + * case, ixgbe_init_hw() will re-configure firmware logging as soon as it brings + * up the adminq. + */ + static int + ixgbe_reconfig_fw_log(struct ixgbe_softc *sc, struct ixgbe_fwlog_cfg *cfg) + { + int status; + + ixgbe_fwlog_init(&sc->hw, cfg); + + if (!ixgbe_fwlog_supported(&sc->hw)) + return (0); + + status = ixgbe_fwlog_set(&sc->hw, cfg); + if (status != IXGBE_SUCCESS) { + DEBUGOUT1("Failed to reconfigure firmware logging, status %d\n", + status); + return (ENODEV); + } + + return (0); + } + + /** + * ixgbe_sysctl_fwlog_set_cfg_options - Sysctl for setting fwlog cfg options + * @oidp: sysctl oid structure + * @arg1: private softc structure + * @arg2: option to adjust + * @req: sysctl request pointer + * + * On read: displays whether firmware logging was reported during attachment + * On write: enables/disables firmware logging during attach phase + * + * This has no effect on the legacy (V1) version of firmware logging. + */ + static int + ixgbe_sysctl_fwlog_set_cfg_options(SYSCTL_HANDLER_ARGS) + { + struct ixgbe_softc *sc = (struct ixgbe_softc *)arg1; + struct ixgbe_fwlog_cfg *cfg = &sc->hw.fwlog_cfg; + int error; + u16 option = (u16)arg2; + bool enabled; + + enabled = !!(cfg->options & option); + + error = sysctl_handle_bool(oidp, &enabled, 0, req); + if ((error) || (req->newptr == NULL)) + return (error); + + if (enabled) + cfg->options |= option; + else + cfg->options &= ~option; + + return ixgbe_reconfig_fw_log(sc, cfg); + } + + /** + * ixgbe_sysctl_fwlog_log_resolution - Sysctl for setting log message resolution + * @oidp: sysctl oid structure + * @arg1: private softc structure + * @arg2: __unused__ + * @req: sysctl request pointer + * + * On read: displays message queue limit before posting + * On write: sets message queue limit before posting + * + * This has no effect on the legacy (V1) version of firmware logging. + */ + static int + ixgbe_sysctl_fwlog_log_resolution(SYSCTL_HANDLER_ARGS) + { + struct ixgbe_softc *sc = (struct ixgbe_softc *)arg1; + struct ixgbe_fwlog_cfg *cfg = &sc->hw.fwlog_cfg; + int error; + u8 resolution; + + UNREFERENCED_PARAMETER(arg2); + + resolution = cfg->log_resolution; + + error = sysctl_handle_8(oidp, &resolution, 0, req); + if ((error) || (req->newptr == NULL)) + return (error); + + if ((resolution < IXGBE_ACI_FW_LOG_MIN_RESOLUTION) || + (resolution > IXGBE_ACI_FW_LOG_MAX_RESOLUTION)) { + DEBUGOUT("Log resolution out-of-bounds\n"); + return (EINVAL); + } + + cfg->log_resolution = resolution; + + return ixgbe_reconfig_fw_log(sc, cfg); + } + + /** + * ixgbe_sysctl_fwlog_register - Sysctl for (de)registering firmware logs + * @oidp: sysctl oid structure + * @arg1: private softc structure + * @arg2: __unused__ + * @req: sysctl request pointer + * + * On read: displays whether firmware logging is registered + * On write: (de)registers firmware logging. + */ + static int + ixgbe_sysctl_fwlog_register(SYSCTL_HANDLER_ARGS) + { + struct ixgbe_softc *sc = (struct ixgbe_softc *)arg1; + struct ixgbe_fwlog_cfg *cfg = &sc->hw.fwlog_cfg; + int status; + int error; + u8 enabled; + + UNREFERENCED_PARAMETER(arg2); + + if (cfg->options & IXGBE_FWLOG_OPTION_IS_REGISTERED) + enabled = true; + else + enabled = false; + + error = sysctl_handle_bool(oidp, &enabled, 0, req); + if ((error) || (req->newptr == NULL)) + return (error); + + if (enabled) { + status = ixgbe_fwlog_register(&sc->hw); + if (status == IXGBE_SUCCESS) + sc->feat_en |= IXGBE_FEATURE_FW_LOGGING; + } else { + status = ixgbe_fwlog_unregister(&sc->hw); + if (status == IXGBE_SUCCESS) + sc->feat_en &= ~IXGBE_FEATURE_FW_LOGGING; + } + + if (status != IXGBE_SUCCESS) + return (EIO); + + return (0); + } + + /** + * ixgbe_log_sev_str - Convert log level to a string + * @log_level: the log level to convert + * + * Convert the u8 log level of a FW logging module into a readable + * string for outputting in a sysctl. + */ + struct ixgbe_str_buf { + char str[IXGBE_STR_BUF_LEN]; + }; + + static struct ixgbe_str_buf + _ixgbe_log_sev_str(u8 log_level) + { + struct ixgbe_str_buf buf = { .str = "" }; + const char *str = NULL; + + switch (log_level) { + case IXGBE_FWLOG_LEVEL_NONE: + str = "none"; + break; + case IXGBE_FWLOG_LEVEL_ERROR: + str = "error"; + break; + case IXGBE_FWLOG_LEVEL_WARNING: + str = "warning"; + break; + case IXGBE_FWLOG_LEVEL_NORMAL: + str = "normal"; + break; + case IXGBE_FWLOG_LEVEL_VERBOSE: + str = "verbose"; + break; + default: + break; + } + + if (str) + snprintf(buf.str, IXGBE_STR_BUF_LEN, "%s", str); + else + snprintf(buf.str, IXGBE_STR_BUF_LEN, "%u", log_level); + + return buf; + } + + #define ixgbe_log_sev_str(log_level) _ixgbe_log_sev_str(log_level).str + + /** + * ixgbe_sysctl_fwlog_module_log_severity - Add tunables for a FW logging module + * @oidp: sysctl oid structure + * @arg1: private softc structure + * @arg2: index to logging module + * @req: sysctl request pointer + */ + static int + ixgbe_sysctl_fwlog_module_log_severity(SYSCTL_HANDLER_ARGS) + { + struct ixgbe_softc *sc = (struct ixgbe_softc *)arg1; + struct ixgbe_fwlog_cfg *cfg = &sc->hw.fwlog_cfg; + struct sbuf *sbuf; + char *sev_str_end; + enum ixgbe_aci_fw_logging_mod module = (enum ixgbe_aci_fw_logging_mod)arg2; + int error, ll_num; + u8 log_level; + char sev_str[16]; + bool sev_set = false; + + log_level = cfg->module_entries[module].log_level; + sbuf = sbuf_new(NULL, sev_str, sizeof(sev_str), SBUF_FIXEDLEN); + sbuf_printf(sbuf, "%d<%s>", log_level, ixgbe_log_sev_str(log_level)); + sbuf_finish(sbuf); + sbuf_delete(sbuf); + + error = sysctl_handle_string(oidp, sev_str, sizeof(sev_str), req); + if ((error) || (req->newptr == NULL)) + return (error); + + if (strcasecmp(ixgbe_log_sev_str(IXGBE_FWLOG_LEVEL_VERBOSE), sev_str) == 0) { + log_level = IXGBE_FWLOG_LEVEL_VERBOSE; + sev_set = true; + } else if (strcasecmp(ixgbe_log_sev_str(IXGBE_FWLOG_LEVEL_NORMAL), sev_str) == 0) { + log_level = IXGBE_FWLOG_LEVEL_NORMAL; + sev_set = true; + } else if (strcasecmp(ixgbe_log_sev_str(IXGBE_FWLOG_LEVEL_WARNING), sev_str) == 0) { + log_level = IXGBE_FWLOG_LEVEL_WARNING; + sev_set = true; + } else if (strcasecmp(ixgbe_log_sev_str(IXGBE_FWLOG_LEVEL_ERROR), sev_str) == 0) { + log_level = IXGBE_FWLOG_LEVEL_ERROR; + sev_set = true; + } else if (strcasecmp(ixgbe_log_sev_str(IXGBE_FWLOG_LEVEL_NONE), sev_str) == 0) { + log_level = IXGBE_FWLOG_LEVEL_NONE; + sev_set = true; + } + + if (!sev_set) { *** 294 LINES SKIPPED *** From nobody Thu Apr 9 23:38:08 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fsGZn1cWXz6Ymy1 for ; Thu, 09 Apr 2026 23:38: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fsGZn1040z3v3B for ; Thu, 09 Apr 2026 23:38:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775777889; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gIMD5hDdglfMug6fgtKVFNpFKdM7mSPZce0EukaXG0M=; b=P29MX0VzR3H6xEQ9Pu12mUiV4yRURW6/sNM/D/2gra35oLILmZyati15PeDr4eUCNCAu4i 505RyWvjjOmmFWvNiY+Q6IGepllz+LaT98eZ349KeTlwZELEMFDEGFOETknlSCsl3gX3nB 9Y78WWFxKh+WS5yrBRk6YlB6sLH8FnNWJlxzuHm01zlLMDRiqkXxcm8AKcJmmjFnhLraY7 spBY9NfBMWUXJaykuWGjdhumYRA26AvO3IR3ESAHouid0/2ezooe/q1Dn8ReWYLzyS6Fp6 GBoMYi8qrDr1zgXbkUhQ4EF2ZQJFA5hj8KSKPSoN9Ig1MR+kfGX6mEwlhekFgg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775777889; a=rsa-sha256; cv=none; b=ZqKVmcsMCpp7QEj2KHpShcL7cxpioGR6d8f1dav0wNyChIkEskoqDTOGLy8N9kLybgJebO PFkmkxSddshhPwPoPf/+dHnEObqDvBFzBkq2yt6a/pjSDSAvcmfjbYrftoxKIIFJjTW+Q1 MfsT+hzSqt+fwDyDFPtyMwUB+6GAQDWWue7nEnsl7vmx/mfOcKZzN4pBwKR87C3VksjAWn ox3B/yw9mPWxeGqoq3mwnACdm7gBR6sAekrny9tvPUHXSrs2PII1+EDYYWMUu+Xn1unf85 dhINqQ30jEzWwjGIG0cakocMDvBE/+Qsgy0OFHModS5QBu5hA/ckh+0Ctp5YQQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775777889; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gIMD5hDdglfMug6fgtKVFNpFKdM7mSPZce0EukaXG0M=; b=PeCWfZ9A6r1ylD4fojUEUOSpN9R5Qxpmr+oDqs+nEKNVf2Ic9Ef3FoUR3rrnLQeeDVMJDD SO2UUeyJr9Rsyvz0pMs5B5g4qvtHVgPA3IFhjUT8JPj5zgoQIuKFOKid03fKKYXL63bUw6 i/L65tGjepcWgFLGzWPhXGW01wk+BNwUkqJidxNvH/RebuL6I8CJ42BW3xJMP28kaRL+5Q cCsrEYIQ5rOaBZZdeNNMAZaXpp36CrT/lrmiWLvn8GAib3EWsSc1fVvXYn9VpWmqYYUoEf kC72cYkTNNYD939aCXYo8//LwOXmhZX5dAsz0jZOZYgavgr8KpbVpkQJPnu0UQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fsGZm6tjSz3h4 for ; Thu, 09 Apr 2026 23:38:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3068a by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 09 Apr 2026 23:38:08 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 428034ad0dbe - main - sys/kobj.h: Make self-sufficient List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: 428034ad0dbe3e39fc9cc96656688dd1f3d408a9 Auto-Submitted: auto-generated Date: Thu, 09 Apr 2026 23:38:08 +0000 Message-Id: <69d83860.3068a.5a480990@gitrepo.freebsd.org> The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=428034ad0dbe3e39fc9cc96656688dd1f3d408a9 commit 428034ad0dbe3e39fc9cc96656688dd1f3d408a9 Author: Warner Losh AuthorDate: 2026-04-04 06:53:00 +0000 Commit: Warner Losh CommitDate: 2026-04-09 23:37:21 +0000 sys/kobj.h: Make self-sufficient kobj.h just needs sys/types.h (because it uses u_int, it can't use sys/_types.h). kobj.h isn't a standard thing, so we don't need to be careful about namespace pollution. Sponsored by: Netflix --- sys/sys/kobj.h | 2 ++ tools/build/test-includes/badfiles.inc | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/sys/kobj.h b/sys/sys/kobj.h index 7adc01c1f1f3..7705f609bea9 100644 --- a/sys/sys/kobj.h +++ b/sys/sys/kobj.h @@ -29,6 +29,8 @@ #ifndef _SYS_KOBJ_H_ #define _SYS_KOBJ_H_ +#include + /* * Forward declarations */ diff --git a/tools/build/test-includes/badfiles.inc b/tools/build/test-includes/badfiles.inc index 3c7390b22a89..a0aada4f016f 100644 --- a/tools/build/test-includes/badfiles.inc +++ b/tools/build/test-includes/badfiles.inc @@ -63,7 +63,6 @@ BADHDRS= \ sys/kdb.h \ sys/kernel.h \ sys/khelp.h \ - sys/kobj.h \ sys/ksem.h \ sys/ktls.h \ sys/libkern.h \ From nobody Thu Apr 9 23:38:09 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fsGZp30wbz6Ympg for ; Thu, 09 Apr 2026 23:38: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fsGZp11CLz3v3H for ; Thu, 09 Apr 2026 23:38:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775777890; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Cjn/j9pmWpjNQNrohgH8N24BtODTE96kP92oaYezJfE=; b=ad8Ebv8c6OtQHwrL84jlXaD+vICwb1VM3xn7UpZo/T4FDBq1US5PM412jPGrmThO88Y+ss XtfuNOe/s9gI5IX1/992LUU9X63CzzGfoe4d80mys7sGDdfC3L9t9eFPpR57qKiY7+ukaF Da08E8tvxB/FKHDFCoRJzYbzhhGNUG3XU8XIXKMWFdkLHhhQ+W/loGf1HyBGFxWEc4Yk5F 2p5h79pBPRwkFPfa2SJNZ/a5KjTY6aHPz2C6S8l7c8WrrRQOUlHVVwdpxFABUtWWleoLw9 GneScsDg5lIGY853t4GrWya71JsFtJEAew2K6KWwGPxNnbyPEALMqRFVLGdFrQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775777890; a=rsa-sha256; cv=none; b=d15yhbdT4VU7OG3JWBMdqC76KOklLOUlfhyz4efXNL0luJ7WNxxkjK8DIVscZrF8siC2xJ Iduh/ohRQd8inGvr+Euq1c64G7MyY1ZGstvk3ZRUp8FLoU/9PbPfG/anYyjaKxxfyNikuQ 24GdZqk0lVnTVFTekqd226UdauTT7MQk0MhInR26ALTT3ZhndFCfNRv40Ei+dTINJcxVrd BycwxIApIiS1RtCR3nJPg5+wONhpqD2R3whubboLMbQPYiG9pKyNzugiozUKzl9iTTTZhw UU/zjwgRnbgfiwmX9wwA2hV8pFknDhRPu5A7RZUVXXZSxOiyXx/ZUHb9GqQZvA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775777890; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Cjn/j9pmWpjNQNrohgH8N24BtODTE96kP92oaYezJfE=; b=HgykY8DCHhBXBHbiCU5szrNve/vFPqVBYNPDJvIZNIuSoDmZ/f8u8DFvDjBTB9KmSec4lt muJeyw+mVqAcmQQChp2WveqkML3ToM3mxq7/NirNUcB/VLCkUrrWgfS0j7FFBDd1AgX9B6 9YUR4Zbr9eybKkV2UUYychxrS1SBo88Q83RdiVJ4300WdmUzr/qcJjgxc+1yr6TrhzelsV q5jyCfdXsFmGFSom3ERHKHw5bJnqheSIh4QRfDrPgcKYoMrCrqhaPEOaSvmGHXgXv+IOf5 BZpX+0vsKeJ0qhdpWBu66uL4f3godbAK7GFdBzXnDJJbYGrq0nabKdBhuF3nhw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fsGZn72mnz4B8 for ; Thu, 09 Apr 2026 23:38:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 30492 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 09 Apr 2026 23:38:09 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 82ff1c334b97 - main - nvme: Allow larger user request sizes List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: 82ff1c334b97e5b68e6330e90f0aa6ae0f6af9aa Auto-Submitted: auto-generated Date: Thu, 09 Apr 2026 23:38:09 +0000 Message-Id: <69d83861.30492.23c808d2@gitrepo.freebsd.org> The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=82ff1c334b97e5b68e6330e90f0aa6ae0f6af9aa commit 82ff1c334b97e5b68e6330e90f0aa6ae0f6af9aa Author: Warner Losh AuthorDate: 2026-04-09 16:18:31 +0000 Commit: Warner Losh CommitDate: 2026-04-09 23:37:21 +0000 nvme: Allow larger user request sizes We have a small buffer for pages on the stack, but if the user wants to do an I/O larger than this we currently fail w/o a way for the user to know the max size. It's not hard to allocate an array for the uncommon case of very large I/Os, and the performance advantage of the array is small in that case anyway. In addition, this allows firmware upgrades using the full transfer size of the device as a happy accident too. Sponsored by: Netflix Reviewed by: chs, chuck Differential Revision: https://reviews.freebsd.org/D55638 --- sys/dev/nvme/nvme_ctrlr.c | 48 +++++++++++++++++++++++++++++++++++------------ 1 file changed, 36 insertions(+), 12 deletions(-) diff --git a/sys/dev/nvme/nvme_ctrlr.c b/sys/dev/nvme/nvme_ctrlr.c index b75033300061..e5094e909a24 100644 --- a/sys/dev/nvme/nvme_ctrlr.c +++ b/sys/dev/nvme/nvme_ctrlr.c @@ -1345,30 +1345,52 @@ nvme_ctrlr_shared_handler(void *arg) #define NVME_MAX_PAGES (int)(1024 / sizeof(vm_page_t)) +static int +nvme_page_count(vm_offset_t start, size_t len) +{ + return atop(round_page(start + len) - trunc_page(start)); +} + static int nvme_user_ioctl_req(vm_offset_t addr, size_t len, bool is_read, - vm_page_t *upages, int max_pages, int *npagesp, struct nvme_request **req, + vm_page_t **upages, int max_pages, int *npagesp, struct nvme_request **req, nvme_cb_fn_t cb_fn, void *cb_arg) { vm_prot_t prot = VM_PROT_READ; - int err; + int err, npages; + vm_page_t *upages_us; + + upages_us = *upages; + npages = nvme_page_count(addr, len); + if (npages > atop(maxphys)) + return (EINVAL); + if (npages > NVME_MAX_PAGES) + upages_us = malloc(npages * sizeof(vm_page_t), M_NVME, + M_ZERO | M_WAITOK); if (is_read) prot |= VM_PROT_WRITE; /* Device will write to host memory */ err = vm_fault_hold_pages(&curproc->p_vmspace->vm_map, - addr, len, prot, upages, max_pages, npagesp); - if (err != 0) + addr, len, prot, upages_us, npages, npagesp); + if (err != 0) { + if (*upages != upages_us) + free(upages_us, M_NVME); return (err); + } *req = nvme_allocate_request_null(M_WAITOK, cb_fn, cb_arg); - (*req)->payload = memdesc_vmpages(upages, len, addr & PAGE_MASK); + (*req)->payload = memdesc_vmpages(upages_us, len, addr & PAGE_MASK); (*req)->payload_valid = true; + if (*upages != upages_us) + *upages = upages_us; return (0); } static void -nvme_user_ioctl_free(vm_page_t *pages, int npage) +nvme_user_ioctl_free(vm_page_t *pages, int npage, bool freeit) { vm_page_unhold_pages(pages, npage); + if (freeit) + free(pages, M_NVME); } static void @@ -1400,7 +1422,8 @@ nvme_ctrlr_passthrough_cmd(struct nvme_controller *ctrlr, struct mtx *mtx; int ret = 0; int npages = 0; - vm_page_t upages[NVME_MAX_PAGES]; + vm_page_t upages_small[NVME_MAX_PAGES]; + vm_page_t *upages = upages_small; if (pt->len > 0) { if (pt->len > ctrlr->max_xfer_size) { @@ -1411,7 +1434,7 @@ nvme_ctrlr_passthrough_cmd(struct nvme_controller *ctrlr, } if (is_user) { ret = nvme_user_ioctl_req((vm_offset_t)pt->buf, pt->len, - pt->is_read, upages, nitems(upages), &npages, &req, + pt->is_read, &upages, nitems(upages_small), &npages, &req, nvme_pt_done, pt); if (ret != 0) return (ret); @@ -1449,7 +1472,7 @@ nvme_ctrlr_passthrough_cmd(struct nvme_controller *ctrlr, mtx_unlock(mtx); if (npages > 0) - nvme_user_ioctl_free(upages, npages); + nvme_user_ioctl_free(upages, npages, upages != upages_small); return (ret); } @@ -1477,7 +1500,8 @@ nvme_ctrlr_linux_passthru_cmd(struct nvme_controller *ctrlr, struct mtx *mtx; int ret = 0; int npages = 0; - vm_page_t upages[NVME_MAX_PAGES]; + vm_page_t upages_small[NVME_MAX_PAGES]; + vm_page_t *upages = upages_small; /* * We don't support metadata. @@ -1494,7 +1518,7 @@ nvme_ctrlr_linux_passthru_cmd(struct nvme_controller *ctrlr, } if (is_user) { ret = nvme_user_ioctl_req(npc->addr, npc->data_len, - npc->opcode & 0x1, upages, nitems(upages), &npages, + npc->opcode & 0x1, &upages, nitems(upages), &npages, &req, nvme_npc_done, npc); if (ret != 0) return (ret); @@ -1533,7 +1557,7 @@ nvme_ctrlr_linux_passthru_cmd(struct nvme_controller *ctrlr, mtx_unlock(mtx); if (npages > 0) - nvme_user_ioctl_free(upages, npages); + nvme_user_ioctl_free(upages, npages, upages != upages_small); return (ret); } From nobody Fri Apr 10 02:31:16 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fsLQd3GjCz6Z2VC; Fri, 10 Apr 2026 02:31:21 +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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fsLQd218jz49WQ; Fri, 10 Apr 2026 02:31:21 +0000 (UTC) (envelope-from bz@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775788281; 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=OI+wt+X8oM+cypzhXoEZN+LUi8w31TYC3l42CllXiJ0=; b=lZj76DFaLDyb+KB7KfXcD+OvB8u2zadtmMkSeE6rah15ejQcQ6CbWw3WnOG6NZDkbjFpht 1VV4lQVhIISWgT99hG80HpAEsGSJCC+5y/ecVh771zL5OcLy+Z4Vt4CULZFQFYHHbjMRSx wC2DsLRR5sst+q8TrmaQpHCxzYpiXjdfYKVUykOE74kv6S1+nXQxI3NH44k/DFeCFMOjZY Qg9S2hmvVniI8CIl2j7ehcJRYMNqISxoOMYiPcUeHcKWqZl/v+W+mjFKJusDmwTCPQhzqR 1Chzg0QFjJegxpCpCcmJ0HszUDmPqavOrJmBjH1pnK1qyf5TbK1Fki/19ieHCg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775788281; a=rsa-sha256; cv=none; b=uJ1xC24iN0d5qvGAZgPdHSE0wjO5yLnWi0ysAGKR1JnqXnOsZXAcK4fgmTWnVN9wwucXRZ gQOkKg8Que5VtjUkcuRNXKMBHBkX5fknTI/ffNpAxcuNtxFiic4bsPdtbx5kMsgSwaSczf HcbE6ItVggq5uPf8CXJd97/3xme6ol3liUqGncn1MxcMFm7ojOKm2zHNHa/x8s4TR5c4jE mJ5Yo+UthvIifuwUSydXG02BU9IrWOAjfjCiuqxNroq7O+Fa1nK+idfX1R7wQPsqw8ai/Y i1ylDhPdpPhro/D3G5vzDGNKyu6lLUC9qnS6HQCdm008nQIHU4Z9M+4zRDFXfw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775788281; 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=OI+wt+X8oM+cypzhXoEZN+LUi8w31TYC3l42CllXiJ0=; b=UhYAhBYiUY3mfqO7iuNAt8SmxnaHB4C5dbucQr5v0hlqqU3X/D3JVdcIB65kXGtXCvwkyN c/wWbgxKVVXH1lgRhLnn2gVNEtLXpf64cgCl3buXJ+tKZE+XCjmWHNDxYIXnZfPd0Fymfq tjIR1IjA5sV9p+vko8oOqlsQDIEahVm1jcQX5N5EGzda2mMdgK0pPP4sjmCRh95BHJ1YFo UuMdnGmymfcE8VCY3YruKu5mqF7Sy/wtaQHPV1dURWewfrZ+pNIG1k+JvE3jifxbaGR6Yd 39fis9NJprPoPS6Nb5MD3WGkwk6FlTZwsYlNk77G4MByfmqF2WpypOBriRdRSg== 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 "E7" (not verified)) (Authenticated sender: bz/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4fsLQd08XMz155N; Fri, 10 Apr 2026 02:31:20 +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 A24B6A64805; Fri, 10 Apr 2026 02:30:57 +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 2D7442D029E9; Fri, 10 Apr 2026 02:31:19 +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 tRVhL62WQZNF; Fri, 10 Apr 2026 02:31:18 +0000 (UTC) Received: from nv.t4-02.sbone.de (nv.t4-02.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:22]) (using 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 14E452D029D8; Fri, 10 Apr 2026 02:31:18 +0000 (UTC) Date: Fri, 10 Apr 2026 02:31:16 +0000 (UTC) From: "Bjoern A. Zeeb" To: Xin LI cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: c0d9a07101a1 - main - MFV: zstd 1.5.7. In-Reply-To: <69d6c795.18adf.7af84449@gitrepo.freebsd.org> Message-ID: <60q35572-pprr-op23-p392-266469oon60@mnoonqbm.arg> References: <69d6c795.18adf.7af84449@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 Wed, 8 Apr 2026, Xin LI wrote: > The branch main has been updated by delphij: > > URL: https://cgit.FreeBSD.org/src/commit/?id=c0d9a07101a1e72769ee0619a583f63a078fb391 > > commit c0d9a07101a1e72769ee0619a583f63a078fb391 > Merge: dd201e407e48 7e509d50854e > Author: Xin LI > AuthorDate: 2026-04-08 21:22:45 +0000 > Commit: Xin LI > CommitDate: 2026-04-08 21:22:45 +0000 > > MFV: zstd 1.5.7. > > MFC after: 2 weeks > Relnotes: yes I do not know how but this makes an arm64 machine, doing a UEFI netboot (in case it matters) fetching the /boot/loader.efi, to fail. Kernel is the GENERIC-MMCCAM and I do not do ZFS, just to be sure. See this thread for a "bisect" and symptoms: https://lists.freebsd.org/archives/freebsd-arm/2026-April/005757.html /bz -- Bjoern A. Zeeb r15:7 From nobody Fri Apr 10 10:17:45 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fsXmn29KTz6YRpn for ; Fri, 10 Apr 2026 10:17: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fsXmn1PDXz41Fv for ; Fri, 10 Apr 2026 10:17:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775816265; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DCDjdxqhcyVbxlJfD3x8QtTahvN+9+5h6OLxWa1Y9i8=; b=LVDfLQNjFIe6Gpm8B+cYfSo19vtaPGoCfjVbJzpQpnelXYlpW3TIKPRG5lF/an7RRvr47x wEX71kBiiq8AOExXBo5O9UXBMBn7APSl3vO2yECZOmtMJs2KpGwaQb9KDAWVw5EGeFC/Cc 3sMwH3GKaxfSUbdAANt7iEfIpRPZ0LB3xnQcj/ChC8DFKpRvwWjqz6qt4pjQQD5cn1ygoi QI7hezjmpEMvVkrt4atwp4BO/6+51jiIhensJFwjXfnq9gy7diTrnqxrEAAI3XgcRhfRSk 9NvouyA2u5I4ZyrXXm0Vg9VABh29oq/et78gsOEtz0CESRE+ycPWe8wYSiaXxA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775816265; a=rsa-sha256; cv=none; b=EcXj9amU2zp0kD+DeIhV/sCl7wQYZtch5O/IxjHLn1nAhWx2jEnxT5akQ0EN+/Jw3Opgaf dxCefHQzc4HjOkp0efZ3SS90ah6gMa1xFmC9+6kl3CmmTlHuRXUAa7ggm6vzRuJE9J18r7 fXDP/m6gZv799YdXThiIsZPw3bJklMRUIqNUIZGxwVOWHR3/5Wj4pYeaHio4ynvX+bjwcb Jwwjv4p6GtzNSNj6UIZACRr4ALhRHQJ2rDpBWS8nLPl4GORGo/SMTBfihOVrmXnWE2cJQ4 LOAjNN4RzbdcIJbt6MQjdYYsoklfmEjQehgWuVJVzrT5VyHA73sY1dikewk0yw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775816265; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DCDjdxqhcyVbxlJfD3x8QtTahvN+9+5h6OLxWa1Y9i8=; b=Bka7UZX6cgD8FpOxSWwvrosNbsEchkj8jUX/yxMY+veqDhRcL0ROW5PfmzS1EYH4j5QKU2 zkVjQMKBjlBso6UBdnWAXvPzvh6mWM0CAbXqwPQyilv1EvfNd5B1aLc9vY0pEOSOdH+N6w YL2jiCqNUxjRosL8QaLKAdSrjKQrLZdoacGoY8QXNJxnJap3Pt2iyOS04K/1wUNchsNdG3 mlujiQa/GvevT5J0QrzrpaHvVK+VzqfX/F9E9TqBUlDslgwvquabbdiOlmMQiNVZcSrBqD wx2UuODQlNGRfIr8p3Y7ZZRKBufymPoi1mCjhjM87g+TEMtu+VM6zodzfqOGiA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fsXmn0z8gzgWx for ; Fri, 10 Apr 2026 10:17:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1bea9 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 10 Apr 2026 10:17:45 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 4da93b9a8a54 - main - subr_early.c: cleanup includes List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4da93b9a8a5411f7386e79053d9c46df29627594 Auto-Submitted: auto-generated Date: Fri, 10 Apr 2026 10:17:45 +0000 Message-Id: <69d8ce49.1bea9.3b8ee5d5@gitrepo.freebsd.org> The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=4da93b9a8a5411f7386e79053d9c46df29627594 commit 4da93b9a8a5411f7386e79053d9c46df29627594 Author: Konstantin Belousov AuthorDate: 2026-04-10 10:16:28 +0000 Commit: Konstantin Belousov CommitDate: 2026-04-10 10:16:28 +0000 subr_early.c: cleanup includes Sponsored by: The FreeBSD Foundation MFC after: 1 week --- sys/kern/subr_early.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/sys/kern/subr_early.c b/sys/kern/subr_early.c index 62d271f56d75..ae06e4b4cbd2 100644 --- a/sys/kern/subr_early.c +++ b/sys/kern/subr_early.c @@ -26,8 +26,6 @@ * SUCH DAMAGE. */ -#include -#include #include #include From nobody Fri Apr 10 10:23:25 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fsXvL016hz6YSTB for ; Fri, 10 Apr 2026 10:23:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fsXvK6R3Lz42kN for ; Fri, 10 Apr 2026 10:23:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775816605; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ES+bCvkcG3KY0SuWDLijIyJrzkdoimlpGjb5+O6lKCU=; b=cSQGQVm5hkCN2uZDn3F75m0BeH9BaFzGEMehAx44BUAMGWx9GO4bNW7oQktxhkfr+Cph9B i5YCpZT07Mufc4FU5I98QiBzsmp+8Cew1PC9IYSZfP/fn+MIODmkDjc5bWf6S3JkMcXGVY 4F9QrI7n4Jj3xra9otzRuUEAhDKPA0PTONtMRE5kwlxMz7/poFF4EkYvq+1HQQRVjqidop OtqTn7qCTR+wZHd/aSbAso7ZVmrxdapm6Q2IXNcScjwGIUQoRsAY9dHOx+71ixyLtvg2sw hPZm4mp2kFlV16Ul88XvPbCNChxi80+ERG0ksDKZMgJZFyslj2C4xHvR3WO9zA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775816605; a=rsa-sha256; cv=none; b=PRl7Y/g+VUWckItug57zvUfkTLkzfSPQ5lZDpAyxiZDJhBkvsug4HQoVCqvo6FrF3gIASd 4hxA2Jerj7zPuS5K3T7uhrqX8PdKb+irKWeVwyWVsvOULZ/EuPIaflnDmTPmh+K7BBtI46 Qj9xSub1L+OH4zClUnJuuXsUiQuW/Je7Le0MK6MseYmuLysVK/OWD4TF+GUqLURR0AK8U0 DZAgy+JnVDQMve/TBAVG50fSTBuEcu5jjxq/ak8ovSFQHkQ1KqYaZis9amccABt+nWBmBE p7xnaQEY/e4T0jS4c1zeMI9C2nfefbPFrjKK52Mnan96sB8Jb6C2c45EQspt8w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775816605; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ES+bCvkcG3KY0SuWDLijIyJrzkdoimlpGjb5+O6lKCU=; b=ipgwhJfQTpIjn7ddJ7fJNz2HlAmD+WgqAyjv1JpFaExUsNiriuzm3GJMCm66ooG28W6JFI tgBaGe9tQvvd1PrszZ1Mxxe746RZ5X57xyOpqC+Zwu0ScT0yiRphpQjKq1S0X86ODJxlSD tll7KF87KxUyF5qRLH0+SBLOvIkBGLlixMAhwcs7wQQJ2fycDm8GtrFRfwdOwZUCCSw+h+ POar9i2xaI6ELnKTkCg4TUWBYcdfxCxoc/qeKoVMbKg7UjTewN+ApdqCp6CAgscZyAJSX2 BUE48f/izV4WwBjPoamFOdezSxRnaxzWTtw03230qonwptO3teVYe4m4dPQQTQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fsXvK5mBrzgV5 for ; Fri, 10 Apr 2026 10:23:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1ce2e by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 10 Apr 2026 10:23:25 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mariusz Zaborski Subject: git: 9f1be4bfebd0 - main - cap_dns: plug a memory leak List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: oshogbo X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9f1be4bfebd08b249877267a1634c249c9f6d221 Auto-Submitted: auto-generated Date: Fri, 10 Apr 2026 10:23:25 +0000 Message-Id: <69d8cf9d.1ce2e.4fb747aa@gitrepo.freebsd.org> The branch main has been updated by oshogbo: URL: https://cgit.FreeBSD.org/src/commit/?id=9f1be4bfebd08b249877267a1634c249c9f6d221 commit 9f1be4bfebd08b249877267a1634c249c9f6d221 Author: Mariusz Zaborski AuthorDate: 2026-04-10 10:19:05 +0000 Commit: Mariusz Zaborski CommitDate: 2026-04-10 10:20:27 +0000 cap_dns: plug a memory leak --- lib/libcasper/services/cap_dns/cap_dns.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libcasper/services/cap_dns/cap_dns.c b/lib/libcasper/services/cap_dns/cap_dns.c index 8681f0baef40..8e660b197e3a 100644 --- a/lib/libcasper/services/cap_dns/cap_dns.c +++ b/lib/libcasper/services/cap_dns/cap_dns.c @@ -267,7 +267,7 @@ cap_getaddrinfo(cap_channel_t *chan, const char *hostname, const char *servname, } nvlist_destroy(nvl); if (curai == NULL && nvlai != NULL) { - if (firstai == NULL) + if (firstai != NULL) freeaddrinfo(firstai); return (EAI_MEMORY); } From nobody Fri Apr 10 13:51:54 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fsdWt2V2mz6YlS8 for ; Fri, 10 Apr 2026 13:51: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fsdWt1fCwz3S0K for ; Fri, 10 Apr 2026 13:51:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775829114; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tvdWheY0U02UXu3yo9DyHFQrZtcYr2XuXXiovE/QT3k=; b=k9CBFv3o2Anf1nk1YHEQ6wk6X1v1zqaJs396sCsVEZL7YMEZWCpM5OGGTPPx7uCT0gan7x aPbdC9hMm03xpjUQUQVipWFirKaQsbEiVTBmxBVF6VXNTt0KIpVSibKdAqK/TfVuN44S8h 55lnUyf/cnUpBctAUdPmAdkmsOnmETpj5rj/+QjlncW0pL3EDKrz4NarCcOXjTLQCaQHUf CImKo1haZ/A2c1TETVN1ktrRtraH7KHxGw5OocpKLKHPFJc6rA6sld6rcjpbzBmS8vW4Rc 1uJrbiC1byagZnUKpwHGs+gX24UNiZCVQPY7rv7oABDGfhuUdRE3uSVOjK7V6w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775829114; a=rsa-sha256; cv=none; b=rfmzYxaNOMSug0UNbLIaNnMW+cd5GhhDBLvXgmOqDkN6UuYrhLCxi6QUvozqd84GmVwpM8 85k1RYW3qQqmqRv0eQIIJCnXAfiKHC9iA0Mc7qcL7Se4xHXu84tVIJArGtiFj1vlGqsnne /diwM0QyEw4ErJaPTbiPJNe1QIq7D/uao6EUSMZRSKS8JO1bXJOnA6STIWLN5GIoAPUurF gP3wtju3BuakvLv8LUZLV/pcSmnQLZvlq8VJDUcKJRMF8986rkXqUzsh+gDctZcBkkVFvS 7J9bLP0r42hY2RlY4RfMkBIEf5uqarODJkCJ71/aJsqZcoe2FCdVf+q1fKwRnA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775829114; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tvdWheY0U02UXu3yo9DyHFQrZtcYr2XuXXiovE/QT3k=; b=U7shuqh3TFWufJg2VvmEf1s5aCv2Mu04Y08myJB7n6QhTeZdhUW910bfew53X41t7zA12q Ho3YrZQaj6joOkPEFmnXeAYivVYR6cBGtedeyhja/Vy9sNAS2pcV/4U3sTPezCBFKgpSek QRWRzbmBG482UN8k6dnvjoWQTygH0I0OM+L4H197fI/6UQkvpCTOGKW727rcq+h4g76EWm ouJli82Dg11zJV8+ZUPmxpyfEoWr4MxVRl3X0u+OrOepSPfffuvbgTDsLy4B7/0UeWsW7n hK1zCkKM4N9sHFNUzdcy99P03KxDolLg31zjmLqGEQc4UkWnr/PWuC1vccR3sQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fsdWt12PhzmrM for ; Fri, 10 Apr 2026 13:51:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3b986 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 10 Apr 2026 13:51:54 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: ShengYi Hung Subject: git: 2358492b0347 - main - x86: Add zen identifier 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: aokblast X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2358492b0347b11178fb594069330820f11ec81f Auto-Submitted: auto-generated Date: Fri, 10 Apr 2026 13:51:54 +0000 Message-Id: <69d9007a.3b986.545a2a38@gitrepo.freebsd.org> The branch main has been updated by aokblast: URL: https://cgit.FreeBSD.org/src/commit/?id=2358492b0347b11178fb594069330820f11ec81f commit 2358492b0347b11178fb594069330820f11ec81f Author: ShengYi Hung AuthorDate: 2026-04-09 08:14:57 +0000 Commit: ShengYi Hung CommitDate: 2026-04-10 13:51:31 +0000 x86: Add zen identifier helper function Reviewed by: kib MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56330 --- sys/x86/include/cputypes.h | 12 ++++++++++++ sys/x86/x86/identcpu.c | 47 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 59 insertions(+) diff --git a/sys/x86/include/cputypes.h b/sys/x86/include/cputypes.h index f2bd3c2983f0..ed26304a89ac 100644 --- a/sys/x86/include/cputypes.h +++ b/sys/x86/include/cputypes.h @@ -45,4 +45,16 @@ #define CPU_VENDOR_CENTAUR CPU_VENDOR_IDT #define CPU_VENDOR_HYGON 0x1d94 /* Hygon */ +#define CPU_AMD_ZEN1 0x00 +#define CPU_AMD_ZEN2 0x01 +#define CPU_AMD_ZEN3 0x02 +#define CPU_AMD_ZEN4 0x03 +#define CPU_AMD_ZEN5 0x04 +#define CPU_AMD_ZEN6 0x05 +#define CPU_AMD_UNKNOWN 0xffffffff + +#ifdef _KERNEL +u_int ident_zen_cpu(void); +#endif + #endif /* !_X86_CPUTYPES_H_ */ diff --git a/sys/x86/x86/identcpu.c b/sys/x86/x86/identcpu.c index 7e0ccc72f7bb..75144ccae8bc 100644 --- a/sys/x86/x86/identcpu.c +++ b/sys/x86/x86/identcpu.c @@ -64,6 +64,7 @@ #include #include +#include #include #include @@ -2690,3 +2691,49 @@ cpu_getmaxphyaddr(void) #endif return ((1ULL << cpu_maxphyaddr) - 1); } + +const static struct { + u_int family; + u_int model_min; + u_int model_max; + u_int generation; +} zen_idents[] = { + { .family = 0x17, .model_min = 0x00, .model_max = 0x2f, .generation = CPU_AMD_ZEN1 }, + { .family = 0x17, .model_min = 0x50, .model_max = 0x5f, .generation = CPU_AMD_ZEN1 }, + { .family = 0x17, .model_min = 0x30, .model_max = 0x4f, .generation = CPU_AMD_ZEN2 }, + { .family = 0x17, .model_min = 0x60, .model_max = 0x7f, .generation = CPU_AMD_ZEN2 }, + { .family = 0x17, .model_min = 0x90, .model_max = 0x91, .generation = CPU_AMD_ZEN2 }, + { .family = 0x17, .model_min = 0xa0, .model_max = 0xaf, .generation = CPU_AMD_ZEN2 }, + { .family = 0x19, .model_min = 0x00, .model_max = 0x0f, .generation = CPU_AMD_ZEN3 }, + { .family = 0x19, .model_min = 0x20, .model_max = 0x5f, .generation = CPU_AMD_ZEN3 }, + { .family = 0x19, .model_min = 0x10, .model_max = 0x1f, .generation = CPU_AMD_ZEN4 }, + { .family = 0x19, .model_min = 0x60, .model_max = 0xaf, .generation = CPU_AMD_ZEN4 }, + { .family = 0x1a, .model_min = 0x00, .model_max = 0x2f, .generation = CPU_AMD_ZEN5 }, + { .family = 0x1a, .model_min = 0x40, .model_max = 0x4f, .generation = CPU_AMD_ZEN5 }, + { .family = 0x1a, .model_min = 0x60, .model_max = 0x7f, .generation = CPU_AMD_ZEN5 }, + { .family = 0x1a, .model_min = 0x50, .model_max = 0x5f, .generation = CPU_AMD_ZEN6 }, + { .family = 0x1a, .model_min = 0x80, .model_max = 0xaf, .generation = CPU_AMD_ZEN6 }, + { .family = 0x1a, .model_min = 0xc0, .model_max = 0xcf, .generation = CPU_AMD_ZEN6 }, +}; + +u_int +ident_zen_cpu(void) +{ + u_int family = CPUID_TO_FAMILY(cpu_id); + u_int model = CPUID_TO_MODEL(cpu_id); + int i; + + if (cpu_vendor_id != CPU_VENDOR_AMD) + return (CPU_AMD_UNKNOWN); + + for (i = 0; i < nitems(zen_idents); i++) { + if (family != zen_idents[i].family) + continue; + if (model < zen_idents[i].model_min || + model > zen_idents[i].model_max) + continue; + return (zen_idents[i].generation); + } + + return (CPU_AMD_UNKNOWN); +} From nobody Fri Apr 10 14:35:02 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fsfTf5dmzz6YpRv for ; Fri, 10 Apr 2026 14:35: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fsfTf3bVcz3Xyq for ; Fri, 10 Apr 2026 14:35:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775831702; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0jrev8GBr5soo1qqJMSP+8q3mQz9IcAMsa2OmA3yX7I=; b=V+JMDWcqmTzDxh9yPJYfcTxlMCQbmYNchywZLs6nCO3ODUBicSdAXnm84qKr66JpDECzqN DZxPbC2qdShMNosOATP5Z2jr5/a4AEH9RXDAupAQNhbZSQiNV4BANcKkzB7z/0ia0tL5rF IPeQEbeYXJip6MY1DDwBnmS7a3RYmSJu7b/GAvO8E0iN9Oe9r91QosGhXLJCN1INOBOi0w TMlWJO1IiVjxxOVXfCIM+Sn+wlvxdSv/qHRELA68wjfVXnFuWa6medUynrwbnzQ6TtTOqe xMUAI3qZxUKTh6moGndMREjFyHm3MezHwwP5/U40vJeo9O7ISEHYs5EkMofWfQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775831702; a=rsa-sha256; cv=none; b=W30+2iFPXzjW2JkSVLiehlOlaOWlQRbm6lQ+JgshRHo8yVO4o+Sn0bnsbfTnTBIcLgHpuA CyfGI+PTKYoIePr0NZ+JoiVBNMd9vjvHSkov3tZH2TzsPzentVZEP/cpWCMFbQ8DS+1BcR JQo7YHQZfGiXagzv5NAhKKYiaxT/XUXflTB+Qgj9WhtEbdsnMG++tlWFtL7SQwu0dqSpjw /Vvp5Il7ZkGn6uldgUP+DvyEg6G4thVCmyfNnmtcG/sakN8XcsmSo46C7JZPAlKcce3t2Y +XQWe86VqZD2MoqQ4roD3Fb71e92tcASkBoPGLtUO/lKjFZ5Q9FUspVcLmWTpw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775831702; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0jrev8GBr5soo1qqJMSP+8q3mQz9IcAMsa2OmA3yX7I=; b=li1oP+kobyCG/C2d24EvMTMPUqiWc0bqfA9DsLpK6cV/3pmEVWHyuKJA7V5a17nj4KkUKq IFjFpEhjc2q2kKx7OXME+AId19BciIeM3kmEb716wV4QBBn9GzM1pNDYr07H9dX3EhcDP3 ac2NnYKJSWtbIcrGeEvH6FYdQ2XKCdFAjugmgwp0zP4YNHqQ2Bil+NDO8OzHelWrGCV58N 9ob7T/WdB+sXm1H7S38AbVR26wZkSC+kY+a8mt32D625m3MWb7Be8fuh5u0XML3t5Nqzp1 MwtJpuSuGDb7blQi+ylJD2iAqOswCphJDjtUYBNmaAGn+/gGdSRqZswcCsJOlg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fsfTf2Wq8zpDB for ; Fri, 10 Apr 2026 14:35:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3f72f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 10 Apr 2026 14:35:02 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 31069fdbdae1 - main - kevent: do not check knote lists being empty before removing a knote List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: 31069fdbdae1027a6f1af7d56d418de4428ac6d9 Auto-Submitted: auto-generated Date: Fri, 10 Apr 2026 14:35:02 +0000 Message-Id: <69d90a96.3f72f.1ffef689@gitrepo.freebsd.org> The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=31069fdbdae1027a6f1af7d56d418de4428ac6d9 commit 31069fdbdae1027a6f1af7d56d418de4428ac6d9 Author: Konstantin Belousov AuthorDate: 2026-04-10 08:27:51 +0000 Commit: Konstantin Belousov CommitDate: 2026-04-10 14:34:48 +0000 kevent: do not check knote lists being empty before removing a knote If a knote belongs to the list, there is no reason to check for the list emptiness. On the other hand, if the knote does not belong to the list, then checking for emptiness is not enough since there might be a different knote there. Reviewed bu: kevans, markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D56341 --- sys/kern/kern_event.c | 3 +-- sys/kern/vfs_aio.c | 6 ++---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/sys/kern/kern_event.c b/sys/kern/kern_event.c index 01731ca46b6b..8c7a0949f024 100644 --- a/sys/kern/kern_event.c +++ b/sys/kern/kern_event.c @@ -2953,8 +2953,7 @@ knote_drop_detached(struct knote *kn, struct thread *td) else list = &kq->kq_knhash[KN_HASH(kn->kn_id, kq->kq_knhashmask)]; - if (!SLIST_EMPTY(list)) - SLIST_REMOVE(list, kn, knote, kn_link); + SLIST_REMOVE(list, kn, knote, kn_link); if (kn->kn_status & KN_QUEUED) knote_dequeue(kn); KQ_UNLOCK_FLUX(kq); diff --git a/sys/kern/vfs_aio.c b/sys/kern/vfs_aio.c index 2a790237d30e..da0e36fc1ec5 100644 --- a/sys/kern/vfs_aio.c +++ b/sys/kern/vfs_aio.c @@ -2668,8 +2668,7 @@ filt_aiodetach(struct knote *kn) knl = &kn->kn_ptr.p_aio->klist; knl->kl_lock(knl->kl_lockarg); - if (!knlist_empty(knl)) - knlist_remove(knl, kn, 1); + knlist_remove(knl, kn, 1); knl->kl_unlock(knl->kl_lockarg); } @@ -2718,8 +2717,7 @@ filt_liodetach(struct knote *kn) knl = &kn->kn_ptr.p_lio->klist; knl->kl_lock(knl->kl_lockarg); - if (!knlist_empty(knl)) - knlist_remove(knl, kn, 1); + knlist_remove(knl, kn, 1); knl->kl_unlock(knl->kl_lockarg); } From nobody Fri Apr 10 15:27:45 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fsgfV0t7mz6Ytd0 for ; Fri, 10 Apr 2026 15:27:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fsgfV06Zpz3fJp for ; Fri, 10 Apr 2026 15:27:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775834866; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ic0ANp/QDfyINYv1UXCT/u21Ie2ZOa36LZH4sywe9R0=; b=B7Bdc6I2DexfX+E6Iwe0KQ0ZYBaXNM0QlSulxZuxbc9ROOHu+OuXRWzIHy7o6wJwE3UucY c0yITJuj/qaZGJP3x03cl3enb2T5n5JLFJzlWagBnKTjDpxIFUn5OrJkqpaUs+WAPiL07b 3Jp/QmML1dCCfMwOb8Z0dNxhtfG3dgOvIX8W7MJyf1ePL0cHTsXSorO80jh0KFifXm0J+X hL8x1JDzpHlUrd6WFsm8BhDDoy9Mz9NZsqi8rJBhTAuPxEj9VVH6uRqjJDU22qVKjqvm7A sZXbDl8IgoGqRC1yWdsxK4VCU+41thHcP0n00K/qL2Oux7y+cbHc0GMdTkFjMw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775834866; a=rsa-sha256; cv=none; b=uaV/769s5o3lVyEVJ1ElDY/C7+x6yFpDZTyj7M5Q4dGQA4CLJl2C9PEbLm58x9VgK8A3Lx JJ/t+0alorwtfYdqlKgQzkw0S5nQnJLiXDJLO8cxRhC+JHeKqC++5hVJsVxVg2jBclJHze ISSgtpWEKInQaPTjYlpsUNp4AirA0LjN1CFMiBHDWE7Ey/RSffNjE/GG3m2wyc1A5WLZss Y0Hs0+xwzZnj9ixKGtMCfV5Jm21l9RcJDOwJd6xjuy0bpCduiYvtfPiI8Z7qeHzwTc7V1w au3brTH2WeQ2/vvz5ythSjLYvZh9azpYfI0luLJXGxPdGgpO+GoCTi/wSFAZ9Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775834866; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ic0ANp/QDfyINYv1UXCT/u21Ie2ZOa36LZH4sywe9R0=; b=e/J9ZGmRvSdO9e8bYEfUIq+RFPS4FT/BsbX3JWOyE9ZbOeuHkRcZW29xS167cLJ1cqNUpx lq4CdfhfKDwwzhNhSZnRjUaZu0zJpN91TZZPp13IqDNN8hKwHPRRM1EgXEGpkyMXsilpky QGDF4jvbvND0ypQJKLKkBzhtGJrLr3N5ebgMQpbINWpsxCZ2rrX/YCVN6noaO6JClVu0gp XrRnc/C0QeAsDZUQYs/ysmqNyKJWTeGAMIN4XPV6JjxWMwrsreAFHDzIVTgzHijT7VXZu2 GHzhl9upvL+/dj6nSkPzjgC/OTDCdQEfBycTswh+RP56vhPXkQIZSkwa6cmLtQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fsgfT683dzqMh for ; Fri, 10 Apr 2026 15:27:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1d610 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 10 Apr 2026 15:27:45 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Ziaee Subject: git: ff32dbb1d14f - main - arcmsr.4: Improve HARDWARE introductory sentence List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: ff32dbb1d14f05bf77e356ae68c82c048c88888f Auto-Submitted: auto-generated Date: Fri, 10 Apr 2026 15:27:45 +0000 Message-Id: <69d916f1.1d610.50a7bdce@gitrepo.freebsd.org> The branch main has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=ff32dbb1d14f05bf77e356ae68c82c048c88888f commit ff32dbb1d14f05bf77e356ae68c82c048c88888f Author: Alexander Ziaee AuthorDate: 2026-04-10 15:26:29 +0000 Commit: Alexander Ziaee CommitDate: 2026-04-10 15:26:45 +0000 arcmsr.4: Improve HARDWARE introductory sentence MFC after: 3 days --- share/man/man4/arcmsr.4 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/share/man/man4/arcmsr.4 b/share/man/man4/arcmsr.4 index 9356f4f23c8b..c2e7b4376ca7 100644 --- a/share/man/man4/arcmsr.4 +++ b/share/man/man4/arcmsr.4 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd October 15, 2020 +.Dd April 5, 2026 .Dt ARCMSR 4 .Os .Sh NAME @@ -66,7 +66,8 @@ Management tools for i386 and amd64 are available from Areca. .Sh HARDWARE The .Nm -driver supports the following cards: +driver supports the following +Areca PCI-X/PCIe SATA/SAS/NVMe RAID host adapters: .Pp .Bl -bullet -compact .It From nobody Fri Apr 10 16:12:15 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fshdr0VGfz6Xy10 for ; Fri, 10 Apr 2026 16:12: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fshdq6wyjz3k7g for ; Fri, 10 Apr 2026 16:12:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775837536; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UEbclGDVyBlDUil3DOiJ8CKOix9pNFMfCXBiX1xY/FA=; b=H26RZYipeoqPzY3vZ52bmUsqZo2p4YAT2gdBHpGs0P75ojwORGs8dU7RNKxnIFSG097CES m5lxcjIFGU2VWRK4J67Tg+qlEC7b72sdRDxQqAytx0nO5hhYnkX5PKjs7DWsWH0Y6Fq2Gq TagGZ9BG/MVwgduviBCIP3myCwuxTt9s5gNZdpOmI1iTmFmbIhMn1/mxF48jmFIP8/Pjox 0LuGmySk7zIqU5MNGMTXh998i6FKvAjEQ856nBiVJ0iwJVLSN73EZGjyL7R6vUUPqGDjQH MAGy9k77R8+ACVjTnlRly15KBdLIBPLUHNkT+eaQyQ8rdJ0L9SkvlS3c4q6dgQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775837536; a=rsa-sha256; cv=none; b=uEMl4i4vU+aWkFbJ95OePzlWmTBDtBjnhAc0jX/1sMXkikhO1Rzcg+mGo+UINUc8EBaYZF EF2WnGfyNWgGzK+za2jozSO/PH8dcpSH7jygIx6I6Ivs1EW1FnRLmhqLUoicW9D1Z0UxBa GnpJtP/kp3JmK4UM+FZS68D0RccjGnjA3YZqhqvksyv+oh1QwWopLhpHyYOSZWZ7GWkfsy lRoj7NToW5+wjtl0RlHPM5DXa94fAeIi2VC5NOoIatgzArehaEg1+9U4ho9hy0kBFcZLLo s0lJrK8zO5mHn5odAkz4ha4GVDfGAeP5UMce7J1yN2kjSu0Y4YZGjKk6HkTt+A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775837536; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UEbclGDVyBlDUil3DOiJ8CKOix9pNFMfCXBiX1xY/FA=; b=Ifc0lk08kHN8gkAsTzNRX9XLHrSPMEn4f87b2JBVJdaxwq0ahWsLokl49xLpdBSuiemMGD CuIIjV2JZ+kCIizwyJIitxLi0PHHFBipXu5yOJOdAM7KdVt7n0QZD1Nhct0sxkWcbvhNIU GaTLKobabfqvBzJoGUpo15frCMy5wMHFuBLHJyowAvPlDGjVUmMOFaJ0hzH0PkXHhQ8mFz Ep/j3fehazXPqnSoJ8N49ttvr/Tnh6nFr9daW8ir6X5OMMSF8KfUIKrtvyg6EBYQB0/6PY Ay7oCVfAq/iXyYnQE3CPp4fzBmhHM1yVvSYSH4tQAVnH5oocjRNjJqERqQVBNg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fshdq6KBTzrXX for ; Fri, 10 Apr 2026 16:12:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 22dd8 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 10 Apr 2026 16:12:15 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Simon J. Gerraty Subject: git: de9fe28ab847 - main - Allow passing xtras to safe_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: sjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: de9fe28ab8476ca25a63066503f5fb40dcdd5719 Auto-Submitted: auto-generated Date: Fri, 10 Apr 2026 16:12:15 +0000 Message-Id: <69d9215f.22dd8.4790d0bc@gitrepo.freebsd.org> The branch main has been updated by sjg: URL: https://cgit.FreeBSD.org/src/commit/?id=de9fe28ab8476ca25a63066503f5fb40dcdd5719 commit de9fe28ab8476ca25a63066503f5fb40dcdd5719 Author: Simon J. Gerraty AuthorDate: 2026-04-10 16:08:02 +0000 Commit: Simon J. Gerraty CommitDate: 2026-04-10 16:11:21 +0000 Allow passing xtras to safe_set This allows safe_set to be leveraged in other contexts where additional chars like '*' or '!' or even '\[\]' need to be preserved in the result. --- libexec/rc/safe_eval.sh | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/libexec/rc/safe_eval.sh b/libexec/rc/safe_eval.sh index 6c23b4c98218..e12b17c787d2 100644 --- a/libexec/rc/safe_eval.sh +++ b/libexec/rc/safe_eval.sh @@ -1,8 +1,8 @@ : # RCSid: -# $Id: safe_eval.sh,v 1.25 2025/08/07 22:13:03 sjg Exp $ +# $Id: safe_eval.sh,v 1.26 2026/04/10 16:03:39 sjg Exp $ # -# @(#) Copyright (c) 2023-2024 Simon J. Gerraty +# @(#) Copyright (c) 2023-2026 Simon J. Gerraty # # SPDX-License-Identifier: BSD-2-Clause # @@ -23,13 +23,16 @@ else fi ## -# safe_set +# safe_set [xtras] # # return a safe variable setting -# any non-alphanumeric chars are replaced with '_' +# any non-alphanumeric chars other than those in "xtras" +# will be replaced with '_' # +# "xtras" should be used with caution and cannot include ';' +# safe_set() { - ${SED:-sed} 's/[ ]*#.*//;/^[A-Za-z_][A-Za-z0-9_]*=/!d;s;[^A-Za-z0-9_. "$,/=:+-];_;g' + ${SED:-sed} 's/[ ]*#.*//;/^[A-Za-z_][A-Za-z0-9_]*=/!d;s;[^A-Za-z0-9_. "'"$1"'$,/=:+-];_;g' } ## From nobody Fri Apr 10 17:43:17 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fskfy6tNCz6Y59Q for ; Fri, 10 Apr 2026 17:43:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fskfy5xRRz3tTp for ; Fri, 10 Apr 2026 17:43:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775843002; 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; bh=X+p1Vi5ig1zOa95DtZke98idkpgShwI1d+fNbx8H5L4=; b=U/r1zjAEwNagCRkyMToHKj26wkZzFTnRpcVLR98pTGB3+cz+LyGBtLceHzanBRmCHXDEHs hW4rYoyvD4GcjWIzq/j8J4LLl9RjFcqag4gh4S1D8syBmCuXQif5NtAyrvWzWxrx0N35Xk dvA+ErIrRD47++GD46i9Oug3mM4vw4mPTZzf8wogVhu2FNHtAI8rokQsFKQky32SngK42t NrUVeuxR7KehXaWcDwATfbEUaf8WHKoYzEAt2S8v4BCJMsvXqHIC3YebzPdwM40XPbVlBJ cW3mDW1wNH+JzSLnxceAXBEWDPTOXnsD/FaECSZREH+k2ridail/eIheshMMuw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775843002; a=rsa-sha256; cv=none; b=IOcbFed5IS0jNEGPTz2DJbuh01H3PtjAQ5Dp+99f0tYCFn8XsMJqeS46Oqh61BdL3K+tbb ZCk6W3l75gW3GtF1uxdJVdP3VBCdHoYmIiEF9YN1ixFqtXhCWtiMk0IdU1OkT+gIylaySI G3V3KgcAMALAtfQ+r18cnDI4jKlATugS8JIFLe6vLyiTlt7gC9WyHvCt66whWWhNOXjamv h3h+ltQhmIExrQNIcjNbZd/xYXAqDjO1oJERB9bU1zM4KC4Re+VMFN72VzCji80xv0t8+S Nzw8++0cuFRm7jX5fxw5B0aNc06oD+7yzk+kCgp05ZQbCialH13vwP2x06ww1w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775843002; 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; bh=X+p1Vi5ig1zOa95DtZke98idkpgShwI1d+fNbx8H5L4=; b=Ceg+he6HAaE1Mrk+ItiUE/a4bob/OVtnLPeA4GtBJRzBO3vTJazKK71WnmPoA3h1j0B+Ce 2TURSvuG+z+y41WPR6J9opQinUWJTSGU9/nu4DB9sbZIrI8TMtrFCM9Xdq7hY9KFz4ntQp 0slUViIwtEq1enbF0NKNZ6kbFb3Nonm2CAeki7EXHqIX59uTPLtas8v6gAbiqJLZGCog1n tVNkhybjyI+roNgEyFT01NIp+yacPCZvCGz66ggD0b6kCQlyD90P164eFbFavZm09zDTXP lk2BDAA1gE8zn/khBiKapbeGJ2/+dQV2F557bOPcfzLpVXfopyt6y3iapxs1pg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fskfy59bzzv8R for ; Fri, 10 Apr 2026 17:43:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 32c58 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 10 Apr 2026 17:43:17 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Christos Longros From: Adrian Chadd Subject: git: fc68534a9ad9 - main - rge: add Wake-on-LAN support for magic packet List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: fc68534a9ad93f6df1756ffa8e707c30a35ce4d7 Auto-Submitted: auto-generated Date: Fri, 10 Apr 2026 17:43:17 +0000 Message-Id: <69d936b5.32c58.504c3558@gitrepo.freebsd.org> The branch main has been updated by adrian: URL: https://cgit.FreeBSD.org/src/commit/?id=fc68534a9ad93f6df1756ffa8e707c30a35ce4d7 commit fc68534a9ad93f6df1756ffa8e707c30a35ce4d7 Author: Christos Longros AuthorDate: 2026-04-10 17:31:38 +0000 Commit: Adrian Chadd CommitDate: 2026-04-10 17:31:38 +0000 rge: add Wake-on-LAN support for magic packet Advertise IFCAP_WOL_MAGIC when PCI power management is available and enable it by default. On suspend or shutdown, rge_setwol() enables the WOL_MAGIC and WOL_LANWAKE bits in CFG3/CFG5, disables the RXDV gate, and enables PM so the NIC stays powered to watch for magic packets. Move hardware-specific WOL register configuration into rge_wol_config() in if_rge_hw.c to keep hardware-specific functions in sync with OpenBSD. Update rge.4 to document WoL support. Tested on FreeBSD 16.0-CURRENT bare metal with Realtek RTL8125 on a Gigabyte B650 Gaming X AX motherboard. Signed-off-by: Christos Longros Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D56259 --- share/man/man4/rge.4 | 6 +++--- sys/dev/rge/if_rge.c | 57 +++++++++++++++++++++++-------------------------- sys/dev/rge/if_rge_hw.c | 53 +++++++++++++++++---------------------------- sys/dev/rge/if_rge_hw.h | 1 + 4 files changed, 51 insertions(+), 66 deletions(-) diff --git a/share/man/man4/rge.4 b/share/man/man4/rge.4 index 2b781e287e3c..f9077a56f28b 100644 --- a/share/man/man4/rge.4 +++ b/share/man/man4/rge.4 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: BSD-2-Clause .\" -.Dd December 18, 2025 +.Dd April 5, 2026 .Dt RGE 4 .Os .Sh NAME @@ -39,8 +39,8 @@ over CAT6 cable. .Pp All NICs supported by the .Nm -driver have TCP/IP checksum offload and hardware VLAN tagging/insertion -features, and use a descriptor-based DMA mechanism. +driver have TCP/IP checksum offload, hardware VLAN tagging/insertion +features, Wake On Lan (WOL), and use a descriptor-based DMA mechanism. They are also capable of TCP large send (TCP segmentation offload). .Pp diff --git a/sys/dev/rge/if_rge.c b/sys/dev/rge/if_rge.c index 0007b07e0fa6..17225e065482 100644 --- a/sys/dev/rge/if_rge.c +++ b/sys/dev/rge/if_rge.c @@ -103,12 +103,7 @@ static void rge_tx_task(void *, int); static void rge_txq_flush_mbufs(struct rge_softc *sc); static void rge_tick(void *); static void rge_link_state(struct rge_softc *); -#if 0 -#ifndef SMALL_KERNEL -int rge_wol(struct ifnet *, int); -void rge_wol_power(struct rge_softc *); -#endif -#endif +static void rge_setwol(struct rge_softc *); struct rge_matchid { uint16_t vendor; @@ -161,7 +156,11 @@ rge_attach_if(struct rge_softc *sc, const char *eaddr) if_setcapabilities(sc->sc_ifp, IFCAP_HWCSUM); if_setcapenable(sc->sc_ifp, if_getcapabilities(sc->sc_ifp)); - /* TODO: set WOL */ + /* Enable WOL if PM is supported. */ + if (pci_has_pm(sc->sc_dev)) { + if_setcapabilitiesbit(sc->sc_ifp, IFCAP_WOL_MAGIC, 0); + if_setcapenablebit(sc->sc_ifp, IFCAP_WOL_MAGIC, 0); + } /* Attach interface */ ether_ifattach(sc->sc_ifp, eaddr); @@ -654,26 +653,6 @@ rge_detach(device_t dev) return (0); } -#if 0 - -int -rge_activate(struct device *self, int act) -{ -#ifndef SMALL_KERNEL - struct rge_softc *sc = (struct rge_softc *)self; -#endif - - switch (act) { - case DVACT_POWERDOWN: -#ifndef SMALL_KERNEL - rge_wol_power(sc); -#endif - break; - } - return (0); -} -#endif - static void rge_intr_msi(void *arg) { @@ -1014,7 +993,9 @@ rge_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) reinit = 1; } - /* TODO: WOL */ + if ((mask & IFCAP_WOL_MAGIC) != 0 && + (if_getcapabilities(ifp) & IFCAP_WOL_MAGIC) != 0) + if_togglecapenable(ifp, IFCAP_WOL_MAGIC); if ((mask & IFCAP_RXCSUM) != 0 && (if_getcapabilities(ifp) & IFCAP_RXCSUM) != 0) { @@ -2620,6 +2601,22 @@ rge_link_state(struct rge_softc *sc) } } +static void +rge_setwol(struct rge_softc *sc) +{ + if_t ifp = sc->sc_ifp; + int enable; + + mtx_assert(&sc->sc_mtx, MA_OWNED); + + if (!pci_has_pm(sc->sc_dev)) + return; + + enable = (if_getcapenable(ifp) & IFCAP_WOL_MAGIC) != 0; + + rge_wol_config(sc, enable); +} + /** * @brief Suspend */ @@ -2630,7 +2627,7 @@ rge_suspend(device_t dev) RGE_LOCK(sc); rge_stop_locked(sc); - /* TODO: wake on lan */ + rge_setwol(sc); sc->sc_suspended = true; RGE_UNLOCK(sc); @@ -2646,7 +2643,6 @@ rge_resume(device_t dev) struct rge_softc *sc = device_get_softc(dev); RGE_LOCK(sc); - /* TODO: wake on lan */ /* reinit if required */ if (if_getflags(sc->sc_ifp) & IFF_UP) @@ -2669,6 +2665,7 @@ rge_shutdown(device_t dev) RGE_LOCK(sc); rge_stop_locked(sc); + rge_setwol(sc); RGE_UNLOCK(sc); return (0); diff --git a/sys/dev/rge/if_rge_hw.c b/sys/dev/rge/if_rge_hw.c index 35a0e93dd193..ba01e389af14 100644 --- a/sys/dev/rge/if_rge_hw.c +++ b/sys/dev/rge/if_rge_hw.c @@ -2196,50 +2196,37 @@ rge_get_link_status(struct rge_softc *sc) return ((RGE_READ_2(sc, RGE_PHYSTAT) & RGE_PHYSTAT_LINK) ? 1 : 0); } -#if 0 -#ifndef SMALL_KERNEL -int -rge_wol(struct ifnet *ifp, int enable) +void +rge_wol_config(struct rge_softc *sc, int enable) { - struct rge_softc *sc = ifp->if_softc; - - if (enable) { - if (!(RGE_READ_1(sc, RGE_CFG1) & RGE_CFG1_PM_EN)) { - printf("%s: power management is disabled, " - "cannot do WOL\n", sc->sc_dev.dv_xname); - return (ENOTSUP); - } - - } - - rge_iff(sc); - if (enable) RGE_MAC_SETBIT(sc, 0xc0b6, 0x0001); else RGE_MAC_CLRBIT(sc, 0xc0b6, 0x0001); + /* Enable config register write. */ RGE_SETBIT_1(sc, RGE_EECMD, RGE_EECMD_WRITECFG); - RGE_CLRBIT_1(sc, RGE_CFG5, RGE_CFG5_WOL_LANWAKE | RGE_CFG5_WOL_UCAST | - RGE_CFG5_WOL_MCAST | RGE_CFG5_WOL_BCAST); + + /* Clear all WOL bits, then set as requested. */ RGE_CLRBIT_1(sc, RGE_CFG3, RGE_CFG3_WOL_LINK | RGE_CFG3_WOL_MAGIC); - if (enable) + RGE_CLRBIT_1(sc, RGE_CFG5, RGE_CFG5_WOL_LANWAKE | + RGE_CFG5_WOL_UCAST | RGE_CFG5_WOL_MCAST | RGE_CFG5_WOL_BCAST); + if (enable) { + RGE_SETBIT_1(sc, RGE_CFG3, RGE_CFG3_WOL_MAGIC); RGE_SETBIT_1(sc, RGE_CFG5, RGE_CFG5_WOL_LANWAKE); - RGE_CLRBIT_1(sc, RGE_EECMD, RGE_EECMD_WRITECFG); + } - return (0); -} + /* Config register write done. */ + RGE_CLRBIT_1(sc, RGE_EECMD, RGE_EECMD_WRITECFG); -void -rge_wol_power(struct rge_softc *sc) -{ - /* Disable RXDV gate. */ - RGE_CLRBIT_1(sc, RGE_PPSW, 0x08); - DELAY(2000); + if (enable) { + /* Disable RXDV gate so WOL packets can reach the NIC. */ + RGE_CLRBIT_1(sc, RGE_PPSW, 0x08); + DELAY(2000); - RGE_SETBIT_1(sc, RGE_CFG1, RGE_CFG1_PM_EN); - RGE_SETBIT_1(sc, RGE_CFG2, RGE_CFG2_PMSTS_EN); + /* Enable power management. */ + RGE_SETBIT_1(sc, RGE_CFG1, RGE_CFG1_PM_EN); + RGE_SETBIT_1(sc, RGE_CFG2, RGE_CFG2_PMSTS_EN); + } } -#endif -#endif diff --git a/sys/dev/rge/if_rge_hw.h b/sys/dev/rge/if_rge_hw.h index 86f0da7c87b3..4e6ee5f1975f 100644 --- a/sys/dev/rge/if_rge_hw.h +++ b/sys/dev/rge/if_rge_hw.h @@ -37,5 +37,6 @@ extern uint16_t rge_read_phy(struct rge_softc *, uint16_t, uint16_t); extern void rge_write_phy_ocp(struct rge_softc *, uint16_t, uint16_t); extern uint16_t rge_read_phy_ocp(struct rge_softc *sc, uint16_t reg); extern int rge_get_link_status(struct rge_softc *); +extern void rge_wol_config(struct rge_softc *, int); #endif /* __IF_RGE_HW_H__ */ From nobody Fri Apr 10 17:47:07 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fsklJ1Qdzz6Y6MF for ; Fri, 10 Apr 2026 17:47: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fsklJ0Tjmz3vLq for ; Fri, 10 Apr 2026 17:47:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775843228; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wbXBKTQLGlzfM9fe17T998xqr7q8Ups99Pd84eocA8g=; b=Avv3CHync5F1+6y2g3KeDVCeebH5a6hiz1vlkDpjyWMmH94/e5C46d3mHhebRsptU28d9n z9WhcE+C/OextUNcT15m2aqlkp0NZC3D5+TPmf813f7jOaKq/WC0UwsrLvk+UzxLgOwKmC 9wpXQEX7Mzxb+YbNigNWXIOu1VkuER+jFsFl+XkjhtG6BrpthWogMNoba4VYC2RW7eBEph cRECe9usttCmbSee86xGmrL5+EqwWELRbEis1TfjQY77Ta3XPQU0XLeUGS3/ZbO6r2HOQf 7zYJShD4CT5/OFH7OpsIb5+Msemei0X8NsPusfMC9Scpd7wCJWgawCE5dR5gZA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775843228; a=rsa-sha256; cv=none; b=kYCh2w7ywc4nHUZg5tt+zqqB8aF5dWyBTgZpBgE3lmXNtm2j33+vogUMel8pYu3oSLS1R4 V6QN0VSWk9pe6HX3XONK/m+akpEHisyYX0ikxqYNTNV2Ol41kxz/pvVs5q+fDzZ0+PhnuW BintkJymPjjebjBksSP3eOytUI1g0m119UFuACP6xZ1P7fLerpoyUh1MXFT/CQyJOgwUax Z+yegA4/7Hy5qwDtYRbYogBXkXMlsi1rx57gOwbHmVOQtTsQHtgIhWp+8hXRwkvhVh0MrS XI6tae9xTI0n1bg3VPQXeHtxGJnGuckSQGUrz+KeX2ZmCw5zqx7xceSfvnECVA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775843228; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wbXBKTQLGlzfM9fe17T998xqr7q8Ups99Pd84eocA8g=; b=OcwF98+qCgDWt89AMiP4c2JDcGS9FvNUtmAmLYx++tAmBhm93lFvsMuoVqL5T+oOCXiogX G7sFLWAG0/zSYsIft2dfzLM86+JhzndqUFX/ZLauIaafSWiMrlxhtTA9TrnyueD+nln/6t nW7IZMsQUkBB/ERYPa+U1m5cUJfI119W9qAoykrwv6lxbDvGU7D0xBAKAt1oZm9xVXHaDe AdLSOFb0Fc/l3Uq2JcsjIc0O4tE0pK7br98s+Mr3+ZE6LaH7zA4W5xNtObWM3sv66vXSrE cagXD2S7AT1igTOd93kWwbsHE5b3sT8z9/LyBrlvMRCrZkqx5XP44f6FsupSWw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fsklH74q3zvBf for ; Fri, 10 Apr 2026 17:47:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 32cc5 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 10 Apr 2026 17:47:07 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Simon J. Gerraty Subject: git: 35bbdfad2862 - main - Pass severity to vectx_open() rather than vectx_close() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 35bbdfad28626255c63360d98c45e41f2c692ef0 Auto-Submitted: auto-generated Date: Fri, 10 Apr 2026 17:47:07 +0000 Message-Id: <69d9379b.32cc5.bb2e37f@gitrepo.freebsd.org> The branch main has been updated by sjg: URL: https://cgit.FreeBSD.org/src/commit/?id=35bbdfad28626255c63360d98c45e41f2c692ef0 commit 35bbdfad28626255c63360d98c45e41f2c692ef0 Author: Simon J. Gerraty AuthorDate: 2026-04-10 17:43:15 +0000 Commit: Simon J. Gerraty CommitDate: 2026-04-10 17:46:54 +0000 Pass severity to vectx_open() rather than vectx_close() file_loadraw() can have a need to load unverified files like "dtrace_dof". Allow severity_guess() to look at the filename but if it returns less than VE_MUST check that the type is not one we insist on verifying. In vectx_open if severity < VE_MUST we can allow it to be unverified. If passed VE_GUESS we call severity_guess(). Regardless, we record severity in ctx so it is available to vectx_close(). Sponsored by: Hewlett Packard Enterprise Development LP Reviewed by: khng Differential Revision: https://reviews.freebsd.org/D56297 --- lib/libsecureboot/h/verify_file.h | 5 ++-- lib/libsecureboot/tests/tvo.c | 6 ++--- lib/libsecureboot/vectx.c | 48 ++++++++++++++++++++++++++------------- lib/libsecureboot/verify_file.c | 3 ++- stand/common/commands.c | 2 +- stand/common/load_elf.c | 7 +++--- stand/common/load_elf_obj.c | 5 ++-- stand/common/module.c | 16 +++++++++++-- stand/i386/loader/chain.c | 4 ++-- 9 files changed, 64 insertions(+), 32 deletions(-) diff --git a/lib/libsecureboot/h/verify_file.h b/lib/libsecureboot/h/verify_file.h index f918ed6d0e38..19bef24b1dee 100644 --- a/lib/libsecureboot/h/verify_file.h +++ b/lib/libsecureboot/h/verify_file.h @@ -51,6 +51,7 @@ int ve_status_get(int); int load_manifest(const char *, const char *, const char *, struct stat *); int pass_manifest(const char *, const char *); int pass_manifest_export_envs(void); +int severity_guess(const char *); void verify_report(const char *, int, int, struct stat *); int verify_file(int, const char *, off_t, int, const char *); void verify_pcr_export(void); @@ -59,9 +60,9 @@ int is_verified(struct stat *); void add_verify_status(struct stat *, int); struct vectx; -struct vectx* vectx_open(int, const char *, off_t, struct stat *, int *, const char *); +struct vectx* vectx_open(int, const char *, int, off_t, struct stat *, int *, const char *); ssize_t vectx_read(struct vectx *, void *, size_t); off_t vectx_lseek(struct vectx *, off_t, int); -int vectx_close(struct vectx *, int, const char *); +int vectx_close(struct vectx *, const char *); #endif /* _VERIFY_FILE_H_ */ diff --git a/lib/libsecureboot/tests/tvo.c b/lib/libsecureboot/tests/tvo.c index 7851e79c5a2a..407fcbefd6db 100644 --- a/lib/libsecureboot/tests/tvo.c +++ b/lib/libsecureboot/tests/tvo.c @@ -170,8 +170,8 @@ main(int argc, char *argv[]) fstat(fd, &st); lseek(fd, 0, SEEK_SET); off = st.st_size % 512; - vp = vectx_open(fd, argv[optind], off, - &st, &error, __func__); + vp = vectx_open(fd, argv[optind], VE_GUESS, + off, &st, &error, __func__); if (!vp) { printf("vectx_open(%s) failed: %d %s\n", argv[optind], error, @@ -190,7 +190,7 @@ main(int argc, char *argv[]) off = vectx_lseek(vp, 0, SEEK_END); /* repeating that should be harmless */ off = vectx_lseek(vp, 0, SEEK_END); - error = vectx_close(vp, VE_MUST, __func__); + error = vectx_close(vp, __func__); if (error) { printf("vectx_close(%s) == %d %s\n", argv[optind], error, diff --git a/lib/libsecureboot/vectx.c b/lib/libsecureboot/vectx.c index 2d56830cd81d..4b42293a0d93 100644 --- a/lib/libsecureboot/vectx.c +++ b/lib/libsecureboot/vectx.c @@ -60,6 +60,7 @@ struct vectx { int vec_fd; /* file descriptor */ int vec_status; /* verification status */ int vec_closing; /* we are closing */ + int vec_severity; /* usually VE_MUST */ }; @@ -93,7 +94,8 @@ struct vectx { * NULL is only returned for non-files or out-of-memory. */ struct vectx * -vectx_open(int fd, const char *path, off_t off, struct stat *stp, +vectx_open(int fd, const char *path, int severity, + off_t off, struct stat *stp, int *error, const char *caller) { struct vectx *ctx; @@ -106,14 +108,19 @@ vectx_open(int fd, const char *path, off_t off, struct stat *stp, stp = &st; rc = verify_prep(fd, path, off, stp, __func__); + if (severity == VE_GUESS) + severity = severity_guess(path); DEBUG_PRINTF(2, - ("vectx_open: caller=%s,fd=%d,name='%s',prep_rc=%d\n", - caller, fd, path, rc)); + ("vectx_open: caller=%s,fd=%d,name='%s',prep_rc=%d,severity=%d\n", + caller, fd, path, rc, severity)); switch (rc) { case VE_FINGERPRINT_NONE: case VE_FINGERPRINT_UNKNOWN: + if (severity < VE_MUST) + break; + /* FALLTHROUGH */ case VE_FINGERPRINT_WRONG: *error = rc; return (NULL); @@ -127,19 +134,24 @@ vectx_open(int fd, const char *path, off_t off, struct stat *stp, ctx->vec_off = 0; ctx->vec_hashed = 0; ctx->vec_want = NULL; + ctx->vec_severity = severity; ctx->vec_status = 0; ctx->vec_hashsz = hashsz = 0; ctx->vec_closing = 0; - if (rc == 0) { + if (rc == VE_UNVERIFIED_OK) { /* we are not verifying this */ *error = 0; return (ctx); } cp = fingerprint_info_lookup(fd, path); if (!cp) { - ctx->vec_status = VE_FINGERPRINT_NONE; - ve_error_set("%s: no entry", path); + if (severity < VE_MUST) + ctx->vec_status = VE_UNVERIFIED_OK; + else { + ctx->vec_status = VE_FINGERPRINT_NONE; + ve_error_set("%s: no entry", path); + } } else { if (strncmp(cp, "no_hash", 7) == 0) { ctx->vec_status = VE_FINGERPRINT_IGNORE; @@ -167,8 +179,12 @@ vectx_open(int fd, const char *path, off_t off, struct stat *stp, cp += 7; #endif } else { - ctx->vec_status = VE_FINGERPRINT_UNKNOWN; - ve_error_set("%s: no supported fingerprint", path); + if (severity < VE_MUST) + ctx->vec_status = VE_UNVERIFIED_OK; + else { + ctx->vec_status = VE_FINGERPRINT_UNKNOWN; + ve_error_set("%s: no supported fingerprint", path); + } } } *error = ctx->vec_status; @@ -183,9 +199,9 @@ vectx_open(int fd, const char *path, off_t off, struct stat *stp, } } DEBUG_PRINTF(2, - ("vectx_open: caller=%s,name='%s',hashsz=%lu,status=%d\n", + ("vectx_open: caller=%s,name='%s',hashsz=%lu,severity=%d,status=%d\n", caller, path, (unsigned long)ctx->vec_hashsz, - ctx->vec_status)); + severity, ctx->vec_status)); return (ctx); enomem: /* unlikely */ @@ -379,7 +395,7 @@ vectx_lseek(struct vectx *ctx, off_t off, int whence) * @return 0 or an error. */ int -vectx_close(struct vectx *ctx, int severity, const char *caller) +vectx_close(struct vectx *ctx, const char *caller) { int rc; @@ -393,7 +409,7 @@ vectx_close(struct vectx *ctx, int severity, const char *caller) * these tend to be processed in a more deterministic * order, which makes our pseudo pcr more useful. */ - ve_pcr_updating_set((severity == VE_MUST)); + ve_pcr_updating_set((ctx->vec_severity == VE_MUST)); #endif /* make sure we have hashed it all */ vectx_lseek(ctx, 0, SEEK_END); @@ -401,13 +417,13 @@ vectx_close(struct vectx *ctx, int severity, const char *caller) ctx->vec_path, ctx->vec_want, ctx->vec_hashsz); } DEBUG_PRINTF(2, - ("vectx_close: caller=%s,name='%s',rc=%d,severity=%d\n", - caller,ctx->vec_path, rc, severity)); - verify_report(ctx->vec_path, severity, rc, NULL); + ("vectx_close: caller=%s,name='%s',severity=%d,rc=%d\n", + caller,ctx->vec_path, ctx->vec_severity, rc)); + verify_report(ctx->vec_path, ctx->vec_severity, rc, NULL); if (rc == VE_FINGERPRINT_WRONG) { #if !defined(UNIT_TEST) && !defined(DEBUG_VECTX) /* we are generally called with VE_MUST */ - if (severity > VE_WANT) + if (ctx->vec_severity > VE_WANT) panic("cannot continue"); #endif } diff --git a/lib/libsecureboot/verify_file.c b/lib/libsecureboot/verify_file.c index ee263dafe774..b1aad36672d0 100644 --- a/lib/libsecureboot/verify_file.c +++ b/lib/libsecureboot/verify_file.c @@ -271,7 +271,7 @@ find_manifest(const char *name) # define ACCEPT_NO_FP_DEFAULT VE_MUST #endif -static int +int severity_guess(const char *filename) { const char *cp; @@ -285,6 +285,7 @@ severity_guess(const char *filename) */ if ((cp = strrchr(filename, '.'))) { if (strcmp(cp, ".cookie") == 0 || + strcmp(cp, ".dof") == 0 || strcmp(cp, ".hints") == 0 || strcmp(cp, ".order") == 0 || strcmp(cp, ".tgz") == 0) diff --git a/stand/common/commands.c b/stand/common/commands.c index 41687ece42fd..4ed247a6b935 100644 --- a/stand/common/commands.c +++ b/stand/common/commands.c @@ -308,7 +308,7 @@ command_set(int argc, char *argv[]) ves = ve_status_get(-1); if (ves == VE_UNVERIFIED_OK) { #ifdef LOADER_VERIEXEC_TESTING - printf("Checking: %s\n", var); + printf("Checking: %s\n", argv[1]); #endif if (is_restricted_var(argv[1])) { printf("Ignoring restricted variable: %s\n", diff --git a/stand/common/load_elf.c b/stand/common/load_elf.c index b9f55a21e403..10131f7ccb88 100644 --- a/stand/common/load_elf.c +++ b/stand/common/load_elf.c @@ -283,7 +283,8 @@ __elfN(load_elf_header)(char *filename, elf_file_t ef) { int verror; - ef->vctx = vectx_open(ef->fd, filename, 0L, NULL, &verror, __func__); + ef->vctx = vectx_open(ef->fd, filename, VE_MUST, + 0L, NULL, &verror, __func__); if (verror) { printf("Unverified %s: %s\n", filename, ve_error_get()); close(ef->fd); @@ -504,7 +505,7 @@ out: if (!err && ef.vctx) { int verror; - verror = vectx_close(ef.vctx, VE_MUST, __func__); + verror = vectx_close(ef.vctx, __func__); if (verror) { err = EAUTH; file_discard(fp); @@ -1095,7 +1096,7 @@ out: if (!err && ef.vctx) { int verror; - verror = vectx_close(ef.vctx, VE_MUST, __func__); + verror = vectx_close(ef.vctx, __func__); if (verror) { err = EAUTH; file_discard(fp); diff --git a/stand/common/load_elf_obj.c b/stand/common/load_elf_obj.c index 9e32daa53696..706391ffbd8f 100644 --- a/stand/common/load_elf_obj.c +++ b/stand/common/load_elf_obj.c @@ -104,7 +104,8 @@ __elfN(obj_loadfile)(char *filename, uint64_t dest, { int verror; - ef.vctx = vectx_open(ef.fd, filename, 0L, NULL, &verror, __func__); + ef.vctx = vectx_open(ef.fd, filename, VE_MUST, + 0L, NULL, &verror, __func__); if (verror) { printf("Unverified %s: %s\n", filename, ve_error_get()); close(ef.fd); @@ -196,7 +197,7 @@ out: if (!err && ef.vctx) { int verror; - verror = vectx_close(ef.vctx, VE_MUST, __func__); + verror = vectx_close(ef.vctx, __func__); if (verror) { err = EAUTH; file_discard(fp); diff --git a/stand/common/module.c b/stand/common/module.c index bc06ba01fa06..f75428458373 100644 --- a/stand/common/module.c +++ b/stand/common/module.c @@ -661,6 +661,7 @@ file_loadraw(const char *fname, const char *type, int insert) vm_offset_t laddr; #ifdef LOADER_VERIEXEC_VECTX struct vectx *vctx; + int severity; int verror; #endif @@ -690,7 +691,16 @@ file_loadraw(const char *fname, const char *type, int insert) } #ifdef LOADER_VERIEXEC_VECTX - vctx = vectx_open(fd, name, 0L, NULL, &verror, __func__); + severity = severity_guess(name); + if (severity < VE_MUST) { + /* double check against type */ + if (strcmp(type, "md_image") == 0 + || strcmp(type, "mfs_root") == 0 + || strcmp(type, "acpi_dsdt") == 0 + || strcmp(type, "cpu_microcode") == 0) + severity = VE_MUST; + } + vctx = vectx_open(fd, name, severity, 0L, NULL, &verror, __func__); if (verror) { sprintf(command_errbuf, "can't verify '%s': %s", name, ve_error_get()); @@ -741,7 +751,9 @@ file_loadraw(const char *fname, const char *type, int insert) if (module_verbose > MODULE_VERBOSE_SILENT) printf("size=%#jx\n", (uintmax_t)(laddr - loadaddr)); #ifdef LOADER_VERIEXEC_VECTX - verror = vectx_close(vctx, VE_MUST, __func__); + verror = vectx_close(vctx, __func__); + DEBUG_PRINTF(1,("%s: vectx_close(%s): %d\n", __func__, + name, verror)); if (verror) { free(name); close(fd); diff --git a/stand/i386/loader/chain.c b/stand/i386/loader/chain.c index 9d58f9f3de33..5d8d66039770 100644 --- a/stand/i386/loader/chain.c +++ b/stand/i386/loader/chain.c @@ -83,7 +83,7 @@ command_chain(int argc, char *argv[]) } #ifdef LOADER_VERIEXEC_VECTX - vctx = vectx_open(fd, argv[1], 0L, NULL, &verror, __func__); + vctx = vectx_open(fd, argv[1], VE_MUST, 0L, NULL, &verror, __func__); if (verror) { sprintf(command_errbuf, "can't verify: %s", argv[1]); close(fd); @@ -127,7 +127,7 @@ command_chain(int argc, char *argv[]) } close(fd); #ifdef LOADER_VERIEXEC_VECTX - verror = vectx_close(vctx, VE_MUST, __func__); + verror = vectx_close(vctx, __func__); if (verror) { free(vctx); return (CMD_ERROR); From nobody Fri Apr 10 18:06:46 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fslB36WvNz6Y8MY for ; Fri, 10 Apr 2026 18:06: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fslB34ZYTz3y56 for ; Fri, 10 Apr 2026 18:06:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775844411; 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; bh=2NeUZtCpMpDFj9bX+ZLULx3/9HLIgqyYdTaXSRXyfCQ=; b=t8xFLP51MkbifUWKkGE+87mlR42MW29KgDhDGmT0QD5M7/1MvSYoObG3j1zdABiA9vfuN0 tuf1etbcbwSwsSDoE94EDKIEI2VWUePIerItHwb8tYmniMUdiuy6apQF6IPkSS0PAjTVDO dJ3CgG5KH/kQ30ONQrTdDgHnLTl65SpWF5EQSRubThpwn+Ixa7bJSqdwgY7MczFPwNOIQE w0ydpPsgHjOJnXW9TCw8M5gjn8y3B7aIJS/qvyxqpjtWYg3f0Pvp25NOJWLlcTJgXS/kpn OklMw0I5DKbOsw5//Gh7uWI0E1Pj7J35afHx2CQGelZ9BRsVNBoGvSKxnNUbug== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775844411; a=rsa-sha256; cv=none; b=ZpSNp16LZ0fJhM8LRz4Yzpx+NkhoogwOu72bBl7wCtoVqloOMajQJ5mYYfEZAw6frB/CqY hn5MLfjO6yNUChZOsAtkC1Mgpoo0Hu4XZpnOD3n1Bg69X4IMR8FzLYLe+0g1C3pnneKWpY HhO11qanqpltV6j5e7Dap/O3G8fVjZTnuVl1qEVwBqzK8fF1G2CnY41zHD4+Sa5h1Fh52L bo5A8SyjuNFbyN/cgGSNyXr2l9/vkA0FGQB56neC/VCc7qrKfLM/Fz8m29HLvngMsRZL+s EHmGtG+g60AgUx/dy11VMv9t+97wl91epbdBwHMs5tl+0FtWM8SA+tE71q0Gcg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775844411; 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; bh=2NeUZtCpMpDFj9bX+ZLULx3/9HLIgqyYdTaXSRXyfCQ=; b=BLDgTbJULJC5/OxAI9LeObMPTuwnCBgea1Czlld/SkKs2GoBq9GDkyAiyzIlssExMJ6UG4 2KeMX9VClhhqRDA+15vdD1++D6MaiAsTq8ZrXqPIU89lMOHangWtnakvISfVII9n1bLF6T 424S5CxcdlY/wosz3uVPHN0VON2s1Wx2ZHvZgBmjLkuTzX93TUQ/FJLdsxy/aWH/SIqlW+ bfV4YPmv9Vstoqv7iQgiPt//yJMUX18hYA6bH37tCPJ4VYrNZMcXwxUzBUvbnAv5UbDPS4 L8fWAcDZy/dhnqHILt3jjl9SS01ciOugqxN15pJM4EsaucXCE0lDM3dpyD49xQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fslB33MZWzvyB for ; Fri, 10 Apr 2026 18:06:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 36c9e by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 10 Apr 2026 18:06:46 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: F. Duncanh From: Pouria Mousavizadeh Tehrani Subject: git: 2c6feab25329 - main - hccontrol: Support generic Bluetooth LE AdvData List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pouria X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2c6feab253297c21d00601ceef818fcbe4da70d8 Auto-Submitted: auto-generated Date: Fri, 10 Apr 2026 18:06:46 +0000 Message-Id: <69d93c36.36c9e.64271ffc@gitrepo.freebsd.org> The branch main has been updated by pouria: URL: https://cgit.FreeBSD.org/src/commit/?id=2c6feab253297c21d00601ceef818fcbe4da70d8 commit 2c6feab253297c21d00601ceef818fcbe4da70d8 Author: F. Duncanh AuthorDate: 2026-03-18 05:14:26 +0000 Commit: Pouria Mousavizadeh Tehrani CommitDate: 2026-04-10 18:06:34 +0000 hccontrol: Support generic Bluetooth LE AdvData hccontrol LE_Set_Advertising_Data does not currently allow construction of manufacturer-specific type 0xFF AdvData. Fixed by a new data-entry option -b "b1,b2,b3,...,bn" where b's are 8-bit byte strings (octets). Signed-off-by: F. Duncanh Reviewed by: takawata, pouria Pull Request: https://github.com/freebsd/freebsd-src/pull/2082 --- usr.sbin/bluetooth/hccontrol/le.c | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/usr.sbin/bluetooth/hccontrol/le.c b/usr.sbin/bluetooth/hccontrol/le.c index 6d5440643b45..fbcee1451b0a 100644 --- a/usr.sbin/bluetooth/hccontrol/le.c +++ b/usr.sbin/bluetooth/hccontrol/le.c @@ -182,7 +182,7 @@ parse_param(int argc, char *argv[], char *buf, int *len) uint16_t value; optreset = 1; optind = 0; - while ((ch = getopt(argc, argv , "n:f:u:")) != -1) { + while ((ch = getopt(argc, argv , "n:f:u:b:")) != -1) { switch(ch){ case 'n': datalen = strlen(optarg); @@ -218,7 +218,24 @@ parse_param(int argc, char *argv[], char *buf, int *len) curbuf += 2; *lenpos += 2; } - + break; + case 'b': + datalen = 1; + token = optarg; + while ((token = strchr(token, ',')) != NULL) { + datalen++; + token++; + } + if ((curbuf + datalen + 1) >= buflast) + goto done; + curbuf[0] = datalen; + curbuf++; + token = optarg; + while ((token = strsep(&optarg, ",")) != NULL) { + value = strtol(token, NULL, 16); + curbuf[0] = value & 0xff; + curbuf++; + } } } done: @@ -1297,7 +1314,7 @@ struct hci_command le_commands[] = { }, { "le_set_advertising_data", - "le_set_advertising_data -n $name -f $flag -u $uuid16,$uuid16 \n" + "le_set_advertising_data -n $name -f $flag -u $uuid16,$uuid16 -b $byte,$byte,...,$byte\n" "set LE device advertising packed data", &le_set_advertising_data }, From nobody Fri Apr 10 20:33:16 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fspR06XnZz6YMbP for ; Fri, 10 Apr 2026 20:33: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fspR064XQz3Dgk for ; Fri, 10 Apr 2026 20:33:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775853196; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eQSuD2CMdesmX4yr6q9z6g/ZIcEip2p+MJcY6OEFy5g=; b=lefVOuCYs/mgyqxmvu26cMzrn8+UN2qa5b/t7mPc5fXkacBE+WlTHCOyc05vkVPdGzK2WF h6F/r0YUGRrw60QB1bu+kFQks4wELHjyTYJjSjSxMrgzFNV+I2hW1JRg4HCcOJc2Gg0N4v bREoqyjmhU7MsNQIdIBzeqT5LVT/nFRxBL6RF1vzbsdGkXvNh23cljgDwIqU2OqBBFuRfz M7FmYXt2l/hKEjQuTy/02R1SXzjseRck+VGUkr6CeCO5ytRaIt+J0DDN4dt31P7ogN4x3E HK2fijsiL/LR9DxB+H1Srvxp0/nnIrLVp0AAi9PQmL3bnmpKu8MbmVyU5jT4TA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775853196; a=rsa-sha256; cv=none; b=H6/S66pddRe7a2wvXPurs1Q72IRiInBkig208N695+O8idPouErVlBgD3r9qNbh0F6rP7s 2mxn0ON7NiLFEdqVzXAir3cWoqCfIF/yxzQaYsLunVwhcTeOtpL5Or59rwc10CCMfEqOfE DkGouHgegR4j1o/Sr+oBsxsdD2LMMROxvcfqsh1Yvx4JWhAwcwi15jnzYfYgqfVN22B6Xu NEVJpOfDV/9ku+fcM89lPvWFAVTt9TclyMntrBqBJzjcr9ZbluuqcXZ/K9DrbvDcHo70SU xnOoZSd2qt3YGT4MQAiqxFcgDPLd+9FfDNrpxA5XWGGvwPWzm46xDujJehzJkA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775853196; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eQSuD2CMdesmX4yr6q9z6g/ZIcEip2p+MJcY6OEFy5g=; b=SQjYm2nwdoKJbHkV8qupP9gYLOhfzwIyiKFDb93RZh431+d+iiQao7tti+Ztczl3Da9qgx xqlTbyYMtkj5fYKu6Rba3BJ/M6F+zgfmcz3xl6pa4SeH4rr749nLpZXVJsDwL7viGRiTN4 6mT1JyL8HU5mNaV9DYfva9KOC6F4YORI/DoK6eJPvYD0CIr+hah77B6tOBnl2Td4hYySXd 7uD+daflI1glmyvVGj9PjRyps3IPnsmMx2NCyi9Zf0kJM5kaSWNgOq1PSnABH9b1p3NNmM On27/6KD+m0ABLByz1QKxbR1tTt2k9kvUxIsvhTxKfL3KNc9TGRKZHy5E5KMgw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fspR05Rm5z10CL for ; Fri, 10 Apr 2026 20:33:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 4578a by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 10 Apr 2026 20:33:16 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Pouria Mousavizadeh Tehrani Subject: git: 87bea33a67ca - main - nd6: Remove DRAFT_IETF_6MAN_IPV6ONLY_FLAG and EXPERIMENTAL options List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pouria X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 87bea33a67cad31661a6fb9ea4c62a5fc266cd98 Auto-Submitted: auto-generated Date: Fri, 10 Apr 2026 20:33:16 +0000 Message-Id: <69d95e8c.4578a.7c47802@gitrepo.freebsd.org> The branch main has been updated by pouria: URL: https://cgit.FreeBSD.org/src/commit/?id=87bea33a67cad31661a6fb9ea4c62a5fc266cd98 commit 87bea33a67cad31661a6fb9ea4c62a5fc266cd98 Author: Pouria Mousavizadeh Tehrani AuthorDate: 2026-04-02 20:01:55 +0000 Commit: Pouria Mousavizadeh Tehrani CommitDate: 2026-04-10 20:12:09 +0000 nd6: Remove DRAFT_IETF_6MAN_IPV6ONLY_FLAG and EXPERIMENTAL options The draft-ietf-6man-ipv6only-flag has been obsoleted by RFC 8925. Remove the EXPERIMENTAL compile option from the kernel and remove DRAFT_IETF_6MAN_IPV6ONLY_FLAG from userland. This compile option was not enabled by default. Also regenerate src.conf.5. Reviewed by: bz Differential Revision: https://reviews.freebsd.org/D56228 --- sbin/ifconfig/Makefile | 4 -- sbin/ifconfig/af_inet6.c | 4 -- sbin/ifconfig/af_nd6.c | 4 -- share/man/man5/src.conf.5 | 4 +- share/mk/src.opts.mk | 1 - sys/conf/options | 1 - sys/net/if_ethersubr.c | 39 ------------ sys/netinet/icmp6.h | 4 -- sys/netinet6/nd6.h | 6 -- sys/netinet6/nd6_rtr.c | 112 ---------------------------------- tools/build/options/WITH_EXPERIMENTAL | 1 - usr.sbin/ndp/Makefile | 5 -- usr.sbin/ndp/ndp.c | 7 +-- usr.sbin/rtadvd/Makefile | 5 -- usr.sbin/rtadvd/config.c | 11 ---- usr.sbin/rtadvd/rtadvd.c | 13 ---- usr.sbin/rtadvd/rtadvd.h | 3 - 17 files changed, 2 insertions(+), 222 deletions(-) diff --git a/sbin/ifconfig/Makefile b/sbin/ifconfig/Makefile index 2553e61b5e9e..b777d875f966 100644 --- a/sbin/ifconfig/Makefile +++ b/sbin/ifconfig/Makefile @@ -52,10 +52,6 @@ SRCS+= ifpfsync.c # pfsync(4) support SRCS+= ifbridge.c # bridge support SRCS+= iflagg.c # lagg support -.if ${MK_EXPERIMENTAL} != "no" -CFLAGS+= -DDRAFT_IETF_6MAN_IPV6ONLY_FLAG -CFLAGS+= -DEXPERIMENTAL -.endif .if ${MK_INET6_SUPPORT} != "no" CFLAGS+= -DINET6 .endif diff --git a/sbin/ifconfig/af_inet6.c b/sbin/ifconfig/af_inet6.c index 365f01be9590..492ee5bbbed0 100644 --- a/sbin/ifconfig/af_inet6.c +++ b/sbin/ifconfig/af_inet6.c @@ -730,10 +730,6 @@ static struct cmd inet6_cmds[] = { 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), -#endif }; static struct afswtch af_inet6 = { diff --git a/sbin/ifconfig/af_nd6.c b/sbin/ifconfig/af_nd6.c index fb7e72028e2e..199523450dca 100644 --- a/sbin/ifconfig/af_nd6.c +++ b/sbin/ifconfig/af_nd6.c @@ -62,10 +62,6 @@ static const char *ND6BITS[] = { [6] = "NO_RADR", [7] = "NO_PREFER_IFACE", [8] = "NO_DAD", -#ifdef DRAFT_IETF_6MAN_IPV6ONLY_FLAG - [9] = "IPV6_ONLY", - [10] = "IPV6_ONLY_MANUAL", -#endif [11] = "STABLEADDR", [15] = "DEFAULTIF", }; diff --git a/share/man/man5/src.conf.5 b/share/man/man5/src.conf.5 index a94c5d6177b4..65fbcf2e69a4 100644 --- a/share/man/man5/src.conf.5 +++ b/share/man/man5/src.conf.5 @@ -1,5 +1,5 @@ .\" DO NOT EDIT-- this file is @generated by tools/build/options/makeman. -.Dd April 3, 2026 +.Dd April 10, 2026 .Dt SRC.CONF 5 .Os .Sh NAME @@ -721,8 +721,6 @@ An alternate bootstrap tool chain must be provided. .It Va WITHOUT_EXAMPLES Avoid installing examples to .Pa /usr/share/examples/ . -.It Va WITH_EXPERIMENTAL -Include experimental features in the build. .It Va WITHOUT_FDT Do not build Flattened Device Tree support as part of the base system. This includes the device tree compiler (dtc) and libfdt support library. diff --git a/share/mk/src.opts.mk b/share/mk/src.opts.mk index 5c3e3bb31a7f..ab774d44c283 100644 --- a/share/mk/src.opts.mk +++ b/share/mk/src.opts.mk @@ -206,7 +206,6 @@ __DEFAULT_NO_OPTIONS = \ DISK_IMAGE_TOOLS_BOOTSTRAP \ DTRACE_ASAN \ DTRACE_TESTS \ - EXPERIMENTAL \ HESIOD \ IPFILTER_IPFS \ LOADER_VERBOSE \ diff --git a/sys/conf/options b/sys/conf/options index 155fbf8e6c8a..54994503ad65 100644 --- a/sys/conf/options +++ b/sys/conf/options @@ -104,7 +104,6 @@ COMPAT_LINUXKPI opt_dontuse.h COMPILING_LINT opt_global.h CY_PCI_FASTINTR DEADLKRES opt_watchdog.h -EXPERIMENTAL opt_global.h DIRECTIO FFCLOCK FULL_PREEMPTION opt_sched.h diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c index 812a31595df9..bbaf798b49f2 100644 --- a/sys/net/if_ethersubr.c +++ b/sys/net/if_ethersubr.c @@ -475,27 +475,6 @@ ether_output_frame(struct ifnet *ifp, struct mbuf *m) return (0); } -#ifdef EXPERIMENTAL -#if defined(INET6) && defined(INET) - /* draft-ietf-6man-ipv6only-flag */ - /* Catch ETHERTYPE_IP, and ETHERTYPE_[REV]ARP if we are v6-only. */ - if ((ifp->if_inet6->nd_flags & ND6_IFF_IPV6_ONLY_MASK) != 0) { - struct ether_header *eh; - - eh = mtod(m, struct ether_header *); - switch (ntohs(eh->ether_type)) { - case ETHERTYPE_IP: - case ETHERTYPE_ARP: - case ETHERTYPE_REVARP: - m_freem(m); - return (EAFNOSUPPORT); - /* NOTREACHED */ - break; - }; - } -#endif -#endif - /* * Queue message on interface, update output statistics if successful, * and start output if interface not yet active. @@ -541,24 +520,6 @@ ether_input_internal(struct ifnet *ifp, struct mbuf *m) etype = ntohs(eh->ether_type); random_harvest_queue_ether(m, sizeof(*m)); -#ifdef EXPERIMENTAL -#if defined(INET6) && defined(INET) - /* draft-ietf-6man-ipv6only-flag */ - /* Catch ETHERTYPE_IP, and ETHERTYPE_[REV]ARP if we are v6-only. */ - if ((ifp->if_inet6->nd_flags & ND6_IFF_IPV6_ONLY_MASK) != 0) { - switch (etype) { - case ETHERTYPE_IP: - case ETHERTYPE_ARP: - case ETHERTYPE_REVARP: - m_freem(m); - return; - /* NOTREACHED */ - break; - }; - } -#endif -#endif - CURVNET_SET_QUIET(ifp->if_vnet); if (ETHER_IS_MULTICAST(eh->ether_dhost)) { diff --git a/sys/netinet/icmp6.h b/sys/netinet/icmp6.h index 9ed39d118c16..9508f221ba10 100644 --- a/sys/netinet/icmp6.h +++ b/sys/netinet/icmp6.h @@ -243,10 +243,6 @@ struct nd_router_advert { /* router advertisement */ #define ND_RA_FLAG_RTPREF_LOW 0x18 /* 00011000 */ #define ND_RA_FLAG_RTPREF_RSV 0x10 /* 00010000 */ -#ifdef EXPERIMENTAL -#define ND_RA_FLAG_IPV6_ONLY 0x02 /* draft-ietf-6man-ipv6only-flag */ -#endif - #define nd_ra_router_lifetime nd_ra_hdr.icmp6_data16[1] struct nd_neighbor_solicit { /* neighbor solicitation */ diff --git a/sys/netinet6/nd6.h b/sys/netinet6/nd6.h index 8c069c294593..8c8d5a3236ca 100644 --- a/sys/netinet6/nd6.h +++ b/sys/netinet6/nd6.h @@ -74,12 +74,6 @@ struct llentry; #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 */ -#define ND6_IFF_IPV6_ONLY_MANUAL 0x400 -#define ND6_IFF_IPV6_ONLY_MASK (ND6_IFF_IPV6_ONLY|ND6_IFF_IPV6_ONLY_MANUAL) -#endif struct in6_nbrinfo { char ifname[IFNAMSIZ]; /* if name, e.g. "en0" */ diff --git a/sys/netinet6/nd6_rtr.c b/sys/netinet6/nd6_rtr.c index 6f415408daae..5819370a3011 100644 --- a/sys/netinet6/nd6_rtr.c +++ b/sys/netinet6/nd6_rtr.c @@ -104,16 +104,6 @@ VNET_DEFINE(u_int32_t, ip6_temp_valid_lifetime) = DEF_TEMP_VALID_LIFETIME; VNET_DEFINE(int, ip6_temp_regen_advance) = TEMPADDR_REGEN_ADVANCE; -#ifdef EXPERIMENTAL -VNET_DEFINE_STATIC(int, nd6_ignore_ipv6_only_ra) = 1; -#define V_nd6_ignore_ipv6_only_ra VNET(nd6_ignore_ipv6_only_ra) -SYSCTL_INT(_net_inet6_icmp6, OID_AUTO, - nd6_ignore_ipv6_only_ra, CTLFLAG_VNET | CTLFLAG_RW, - &VNET_NAME(nd6_ignore_ipv6_only_ra), 0, - "Ignore the 'IPv6-Only flag' in RA messages in compliance with " - "draft-ietf-6man-ipv6only-flag"); -#endif - /* RTPREF_MEDIUM has to be 0! */ #define RTPREF_HIGH 1 #define RTPREF_MEDIUM 0 @@ -248,97 +238,6 @@ nd6_rs_input(struct mbuf *m, int off, int icmp6len) m_freem(m); } -#ifdef EXPERIMENTAL -/* - * An initial update routine for draft-ietf-6man-ipv6only-flag. - * We need to iterate over all default routers for the given - * interface to see whether they are all advertising the "S" - * (IPv6-Only) flag. If they do set, otherwise unset, the - * interface flag we later use to filter on. - * - * XXXGL: The use of IF_ADDR_WLOCK (previously it was IF_AFDATA_LOCK) in this - * function is quite strange. - */ -static void -defrtr_ipv6_only_ifp(struct ifnet *ifp) -{ - struct nd_defrouter *dr; - bool ipv6_only, ipv6_only_old; -#ifdef INET - struct epoch_tracker et; - struct ifaddr *ifa; - bool has_ipv4_addr; -#endif - - if (V_nd6_ignore_ipv6_only_ra != 0) - return; - - ipv6_only = true; - ND6_RLOCK(); - TAILQ_FOREACH(dr, &V_nd6_defrouter, dr_entry) - if (dr->ifp == ifp && - (dr->raflags & ND_RA_FLAG_IPV6_ONLY) == 0) - ipv6_only = false; - ND6_RUNLOCK(); - - IF_ADDR_WLOCK(ifp); - ipv6_only_old = ifp->if_inet6->nd_flags & ND6_IFF_IPV6_ONLY; - IF_ADDR_WUNLOCK(ifp); - - /* If nothing changed, we have an early exit. */ - if (ipv6_only == ipv6_only_old) - return; - -#ifdef INET - /* - * Should we want to set the IPV6-ONLY flag, check if the - * interface has a non-0/0 and non-link-local IPv4 address - * configured on it. If it has we will assume working - * IPv4 operations and will clear the interface flag. - */ - has_ipv4_addr = false; - if (ipv6_only) { - NET_EPOCH_ENTER(et); - CK_STAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) { - if (ifa->ifa_addr->sa_family != AF_INET) - continue; - if (in_canforward( - satosin(ifa->ifa_addr)->sin_addr)) { - has_ipv4_addr = true; - break; - } - } - NET_EPOCH_EXIT(et); - } - if (ipv6_only && has_ipv4_addr) { - log(LOG_NOTICE, "%s rcvd RA w/ IPv6-Only flag set but has IPv4 " - "configured, ignoring IPv6-Only flag.\n", ifp->if_xname); - ipv6_only = false; - } -#endif - - IF_ADDR_WLOCK(ifp); - if (ipv6_only) - ifp->if_inet6->nd_flags |= ND6_IFF_IPV6_ONLY; - else - ifp->if_inet6->nd_flags &= ~ND6_IFF_IPV6_ONLY; - IF_ADDR_WUNLOCK(ifp); - -#ifdef notyet - /* Send notification of flag change. */ -#endif -} - -static void -defrtr_ipv6_only_ipf_down(struct ifnet *ifp) -{ - - IF_ADDR_WLOCK(ifp); - ifp->if_inet6->nd_flags &= ~ND6_IFF_IPV6_ONLY; - IF_ADDR_WUNLOCK(ifp); -} -#endif /* EXPERIMENTAL */ - void nd6_ifnet_link_event(void *arg __unused, struct ifnet *ifp, int linkstate) { @@ -349,10 +248,6 @@ nd6_ifnet_link_event(void *arg __unused, struct ifnet *ifp, int linkstate) * unreachable but a different interface might still have connectivity. */ -#ifdef EXPERIMENTAL - if (linkstate == LINK_STATE_DOWN) - defrtr_ipv6_only_ipf_down(ifp); -#endif } static void @@ -599,9 +494,6 @@ nd6_ra_input(struct mbuf *m, int off, int icmp6len) } } dr = defrtrlist_update(&dr0); -#ifdef EXPERIMENTAL - defrtr_ipv6_only_ifp(ifp); -#endif /* Prefix Information */ if (ndopts.nd_opts_pi != NULL) { /* @@ -779,10 +671,6 @@ defrouter_del(struct nd_defrouter *dr) if (dr->ifp->if_inet6->nd_flags & ND6_IFF_ACCEPT_RTADV) rt6_flush(&dr->rtaddr, dr->ifp); -#ifdef EXPERIMENTAL - defrtr_ipv6_only_ifp(dr->ifp); -#endif - if (dr->installed) { deldr = dr; defrouter_delreq(dr); diff --git a/tools/build/options/WITH_EXPERIMENTAL b/tools/build/options/WITH_EXPERIMENTAL deleted file mode 100644 index a5f41addee52..000000000000 --- a/tools/build/options/WITH_EXPERIMENTAL +++ /dev/null @@ -1 +0,0 @@ -Include experimental features in the build. diff --git a/usr.sbin/ndp/Makefile b/usr.sbin/ndp/Makefile index 998860d00a69..aad2380bc879 100644 --- a/usr.sbin/ndp/Makefile +++ b/usr.sbin/ndp/Makefile @@ -23,11 +23,6 @@ LIBADD= xo CFLAGS+= -I. -I${.CURDIR} CFLAGS+= -D_U_="" -.if ${MK_EXPERIMENTAL} != "no" -CFLAGS+= -DEXPERIMENTAL -CFLAGS+= -DDRAFT_IETF_6MAN_IPV6ONLY_FLAG -.endif - .if ${MK_NETLINK_SUPPORT} != "no" SRCS+= ndp_netlink.c .else diff --git a/usr.sbin/ndp/ndp.c b/usr.sbin/ndp/ndp.c index cbca8ec20941..7521be752c80 100644 --- a/usr.sbin/ndp/ndp.c +++ b/usr.sbin/ndp/ndp.c @@ -1225,12 +1225,7 @@ rtrlist(void) *pflags++ = 'O'; xo_emit("{el:%s}", "other"); } -#ifdef DRAFT_IETF_6MAN_IPV6ONLY_FLAG - if (p->flags & ND_RA_FLAG_IPV6_ONLY) { - *pflags++ = 'S'; - xo_emit("{el:%s}", "ipv6only"); - } -#endif + xo_close_list("flags_pretty"); xo_emit(", flags={:flags/%s}", rflags); diff --git a/usr.sbin/rtadvd/Makefile b/usr.sbin/rtadvd/Makefile index 583f9db88ceb..4ed2d7182a6b 100644 --- a/usr.sbin/rtadvd/Makefile +++ b/usr.sbin/rtadvd/Makefile @@ -20,11 +20,6 @@ MAN= rtadvd.conf.5 rtadvd.8 SRCS= rtadvd.c rrenum.c advcap.c if.c config.c timer.c timer_subr.c \ control.c control_server.c -.if ${MK_EXPERIMENTAL} != "no" -CFLAGS+= -DEXPERIMENTAL -CFLAGS+= -DDRAFT_IETF_6MAN_IPV6ONLY_FLAG -.endif - LIBADD= util WARNS?= 1 diff --git a/usr.sbin/rtadvd/config.c b/usr.sbin/rtadvd/config.c index c0af8f76ca49..70fb2ed7dc28 100644 --- a/usr.sbin/rtadvd/config.c +++ b/usr.sbin/rtadvd/config.c @@ -442,10 +442,6 @@ getconfig(struct ifinfo *ifi) } val |= ND_RA_FLAG_RTPREF_LOW; } -#ifdef DRAFT_IETF_6MAN_IPV6ONLY_FLAG - if (strchr(flagstr, 'S')) - val |= ND_RA_FLAG_IPV6_ONLY; -#endif } else MAYHAVE(val, "raflags", 0); @@ -461,9 +457,6 @@ getconfig(struct ifinfo *ifi) __func__, rai->rai_rtpref, ifi->ifi_ifname); goto getconfig_free_rai; } -#ifdef DRAFT_IETF_6MAN_IPV6ONLY_FLAG - rai->rai_ipv6onlyflg = val & ND_RA_FLAG_IPV6_ONLY; -#endif MAYHAVE(val, "rltime", rai->rai_maxinterval * 3); if ((uint16_t)val && ((uint16_t)val < rai->rai_maxinterval || @@ -1485,10 +1478,6 @@ make_packet(struct rainfo *rai) rai->rai_managedflg ? ND_RA_FLAG_MANAGED : 0; ra->nd_ra_flags_reserved |= rai->rai_otherflg ? ND_RA_FLAG_OTHER : 0; -#ifdef DRAFT_IETF_6MAN_IPV6ONLY_FLAG - ra->nd_ra_flags_reserved |= - rai->rai_ipv6onlyflg ? ND_RA_FLAG_IPV6_ONLY : 0; -#endif ra->nd_ra_router_lifetime = htons(rai->rai_lifetime); ra->nd_ra_reachable = htonl(rai->rai_reachabletime); ra->nd_ra_retransmit = htonl(rai->rai_retranstimer); diff --git a/usr.sbin/rtadvd/rtadvd.c b/usr.sbin/rtadvd/rtadvd.c index 1eb8f12a7338..2e9bced7c00e 100644 --- a/usr.sbin/rtadvd/rtadvd.c +++ b/usr.sbin/rtadvd/rtadvd.c @@ -1148,19 +1148,6 @@ ra_input(int len, struct nd_router_advert *nra, sizeof(ntopbuf)), on_off[rai->rai_otherflg]); inconsistent++; } -#ifdef DRAFT_IETF_6MAN_IPV6ONLY_FLAG - /* S "IPv6-Only" (Six, Silence-IPv4) flag */ - if ((nra->nd_ra_flags_reserved & ND_RA_FLAG_IPV6_ONLY) != - rai->rai_ipv6onlyflg) { - syslog(LOG_NOTICE, - "S flag inconsistent on %s:" - " %s from %s, %s from us", - ifi->ifi_ifname, on_off[!rai->rai_ipv6onlyflg], - inet_ntop(AF_INET6, &from->sin6_addr, ntopbuf, - sizeof(ntopbuf)), on_off[rai->rai_ipv6onlyflg]); - inconsistent++; - } -#endif /* Reachable Time */ reachabletime = ntohl(nra->nd_ra_reachable); if (reachabletime && rai->rai_reachabletime && diff --git a/usr.sbin/rtadvd/rtadvd.h b/usr.sbin/rtadvd/rtadvd.h index 5ecfd1b56423..5b9037b2dcf3 100644 --- a/usr.sbin/rtadvd/rtadvd.h +++ b/usr.sbin/rtadvd/rtadvd.h @@ -204,9 +204,6 @@ struct rainfo { uint16_t rai_mininterval; /* MinRtrAdvInterval */ int rai_managedflg; /* AdvManagedFlag */ int rai_otherflg; /* AdvOtherConfigFlag */ -#ifdef DRAFT_IETF_6MAN_IPV6ONLY_FLAG - int rai_ipv6onlyflg; /* AdvIPv6OnlyFlag */ -#endif int rai_rtpref; /* router preference */ uint32_t rai_linkmtu; /* AdvLinkMTU */ From nobody Fri Apr 10 22:12:48 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fsrdr6sKgz6YVMM for ; Fri, 10 Apr 2026 22: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fsrdr6TT9z3SkG for ; Fri, 10 Apr 2026 22: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=1775859168; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9XaA+nA3RkQWHV6P0rlVjXeUmB4D3jq3XorfxCdanXk=; b=SN6dMmsrG23CudcC7njJTEWAWDFCAEMsWaXt86caipVacIJKVal/2rkYJx5JHYFz/KQM3o 664Z9cpJ+QZSoXRZaAw2MjtF4C7yMyUODVU3itgqRcMN1dZaJddULwvs0AKiOABsMbblKB Q9I9Hkm9T79mGQ973aO3V4/gdwCbh4sjyiHV3G9sLnInZkYk0hi7SUe3fVcf1UiDuu0RJW Zr/SK+3aqVy0K1WqcWYAozK18X/XtZD3w6kZyV4hMPXjNT1tpa33CejxJaSY4HzopS1sln piUiYktkEWtp07n2kVQjENCgfFopCCq3vwbUA3DodxWlV6GWrabuuO5DVqfVtg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775859168; a=rsa-sha256; cv=none; b=Pu7Vtl3dYcAsLgoCKVDjGLov0oYFqZuz37B5mJyMabMXwWHM2hSUxs/j1qPZ2ocwknUoFg 5oG8yA7eWG9T8Jktbo5VhMRfOVPDXMxX2QCCIh+1A2o0Ptcbf7M4iCXdocIO2WgnqnjCu/ Tu+QzTOwY1aizl5Il9s9CkujmsINeUFvgDAA9Mn7447e3TjQlfSXE1kCTDFqhGDUebEocC qn1f93RIquVfb5f92Czn+cJ3zsW1srBj2GG+JmL1NqJcJCIxhyUg56sa2OXKT24rmthU0t L4uh+Br0rkURAYVYiu2Y0CJQJT+KBnNuYIAU8lLqo3dXo4W3fNKa2JwQB8rovw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775859168; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9XaA+nA3RkQWHV6P0rlVjXeUmB4D3jq3XorfxCdanXk=; b=KAOEqe6cu0C2qcnlnFWOW7lgQPTUtjd+KR/5MpqdorOenyCMAkPR2Pd6FpDWZ6z/ejaMkI MvEo3cMUgI4td4YLyFl+vmGHdck/rP+UWQS+2epnlxKqqQAC4Rc6tdhRFdLekC3C8r8fP8 d6G8CP0E0WcB0ndCcGNHH4MO2duzO0nbSGhWvYhM8jAL74/h4QROS4rdk5D9kXOPJQ0x1J VgigeJpfaCZxIwsV2hbUM8eLSvZfs0VuRfpLRqj23P37aLKYKKcQ3fjYTfbIiwgFgXhCs4 /FOdQdKNdiUbToG3WjcqdOnFTzDwKVZpwH027+SAVpPBwJVi0z2jOJfXYxDEDg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fsrdr5rkPz1314 for ; Fri, 10 Apr 2026 22:12:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 21386 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 10 Apr 2026 22:12:48 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Adrian Chadd Subject: git: 4e3fdced7f78 - main - qcom_gcc: migrate the MSM8916 support to qcom_gcc List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: 4e3fdced7f78c067e048c4d9ec42341c30b7899d Auto-Submitted: auto-generated Date: Fri, 10 Apr 2026 22:12:48 +0000 Message-Id: <69d975e0.21386.4b4c7ec2@gitrepo.freebsd.org> The branch main has been updated by adrian: URL: https://cgit.FreeBSD.org/src/commit/?id=4e3fdced7f78c067e048c4d9ec42341c30b7899d commit 4e3fdced7f78c067e048c4d9ec42341c30b7899d Author: Adrian Chadd AuthorDate: 2026-04-10 22:09:58 +0000 Commit: Adrian Chadd CommitDate: 2026-04-10 22:12:11 +0000 qcom_gcc: migrate the MSM8916 support to qcom_gcc * migrate the MSM8916 (snapdragon 410) support to qcom_gcc * add the full qcom_gcc / qcom_clk list to files.arm64, replacing the MSM8916 stub in sys/arm64/qualcomm . Differential Revision: https://reviews.freebsd.org/D49706 --- sys/arm/qualcomm/std.ipq4018 | 2 + sys/conf/files.arm64 | 15 +++- sys/dev/qcom_clk/qcom_clk_rcg2.c | 8 +-- sys/dev/qcom_gcc/qcom_gcc_clock.c | 3 +- sys/dev/qcom_gcc/qcom_gcc_ipq4018_reset.c | 9 ++- sys/dev/qcom_gcc/qcom_gcc_main.c | 22 +++++- sys/dev/qcom_gcc/qcom_gcc_msm8916.h | 41 +++++++++++ .../qcom_gcc/qcom_gcc_msm8916_clock.c} | 83 ++++------------------ sys/dev/qcom_gcc/qcom_gcc_msm8916_reset.c | 71 ++++++++++++++++++ sys/dev/qcom_gcc/qcom_gcc_var.h | 1 + 10 files changed, 172 insertions(+), 83 deletions(-) diff --git a/sys/arm/qualcomm/std.ipq4018 b/sys/arm/qualcomm/std.ipq4018 index 89d2cb546bf3..1c70ecc448bd 100644 --- a/sys/arm/qualcomm/std.ipq4018 +++ b/sys/arm/qualcomm/std.ipq4018 @@ -39,6 +39,8 @@ dev/qcom_gcc/qcom_gcc_clock.c optional qcom_gcc dev/qcom_gcc/qcom_gcc_reset.c optional qcom_gcc dev/qcom_gcc/qcom_gcc_ipq4018_reset.c optional qcom_gcc dev/qcom_gcc/qcom_gcc_ipq4018_clock.c optional qcom_gcc +dev/qcom_gcc/qcom_gcc_msm8916_reset.c optional qcom_gcc +dev/qcom_gcc/qcom_gcc_msm8916_clock.c optional qcom_gcc dev/qcom_clk/qcom_clk_fepll.c optional qcom_gcc dev/qcom_clk/qcom_clk_fdiv.c optional qcom_gcc diff --git a/sys/conf/files.arm64 b/sys/conf/files.arm64 index 59a65a8251ca..c36a391d75a2 100644 --- a/sys/conf/files.arm64 +++ b/sys/conf/files.arm64 @@ -768,7 +768,20 @@ dev/ahci/ahci_fsl_fdt.c optional soc_nxp_ls ahci fdt dev/flash/flexspi/flex_spi.c optional clk flex_spi soc_nxp_ls fdt # Qualcomm -arm64/qualcomm/qcom_gcc.c optional qcom_gcc fdt +dev/qcom_gcc/qcom_gcc_main.c optional qcom_gcc +dev/qcom_gcc/qcom_gcc_clock.c optional qcom_gcc +dev/qcom_gcc/qcom_gcc_reset.c optional qcom_gcc +dev/qcom_gcc/qcom_gcc_ipq4018_reset.c optional qcom_gcc +dev/qcom_gcc/qcom_gcc_ipq4018_clock.c optional qcom_gcc +dev/qcom_gcc/qcom_gcc_msm8916_reset.c optional qcom_gcc +dev/qcom_gcc/qcom_gcc_msm8916_clock.c optional qcom_gcc +dev/qcom_clk/qcom_clk_fepll.c optional qcom_gcc +dev/qcom_clk/qcom_clk_fdiv.c optional qcom_gcc +dev/qcom_clk/qcom_clk_apssdiv.c optional qcom_gcc +dev/qcom_clk/qcom_clk_freqtbl.c optional qcom_gcc +dev/qcom_clk/qcom_clk_rcg2.c optional qcom_gcc +dev/qcom_clk/qcom_clk_branch2.c optional qcom_gcc +dev/qcom_clk/qcom_clk_ro_div.c optional qcom_gcc dev/qcom_mdio/qcom_mdio_ipq4018.c optional qcom_mdio fdt mdio mii # RockChip Drivers diff --git a/sys/dev/qcom_clk/qcom_clk_rcg2.c b/sys/dev/qcom_clk/qcom_clk_rcg2.c index 0407706dd138..6a1962982184 100644 --- a/sys/dev/qcom_clk/qcom_clk_rcg2.c +++ b/sys/dev/qcom_clk/qcom_clk_rcg2.c @@ -370,7 +370,7 @@ qcom_clk_rcg2_set_freq(struct clknode *clk, uint64_t fin, uint64_t *fout, device_printf(clknode_get_device(sc->clknode), "%s: no suitable freqtbl entry found for freq %llu\n", __func__, - *fout); + (unsigned long long) *fout); return (ERANGE); } @@ -475,7 +475,7 @@ qcom_clk_rcg2_set_freq(struct clknode *clk, uint64_t fin, uint64_t *fout, *fout, f->parent, f->freq, - p_freq); + (unsigned long long) p_freq); /* * To ensure glitch-free operation on some clocks, set it to @@ -547,7 +547,7 @@ qcom_clk_rcg2_set_freq(struct clknode *clk, uint64_t fin, uint64_t *fout, "%llu\n", __func__, f->parent, - p_freq); + (unsigned long long) p_freq); return (ENXIO); } @@ -570,7 +570,7 @@ qcom_clk_rcg2_set_freq(struct clknode *clk, uint64_t fin, uint64_t *fout, *fout, f->freq, f->parent, - p_freq); + (unsigned long long) p_freq); /* * Set the parent node, the parent programming and the divisor diff --git a/sys/dev/qcom_gcc/qcom_gcc_clock.c b/sys/dev/qcom_gcc/qcom_gcc_clock.c index c8c10b0c5172..f51b4021a821 100644 --- a/sys/dev/qcom_gcc/qcom_gcc_clock.c +++ b/sys/dev/qcom_gcc/qcom_gcc_clock.c @@ -1,7 +1,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause * - * Copyright (c) 2025, Adrian Chadd + * Copyright (c) 2026 Adrian Chadd * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -37,6 +37,7 @@ #include #include #include +#include #include #include diff --git a/sys/dev/qcom_gcc/qcom_gcc_ipq4018_reset.c b/sys/dev/qcom_gcc/qcom_gcc_ipq4018_reset.c index f99d1d9ad9f1..127ca944c77e 100644 --- a/sys/dev/qcom_gcc/qcom_gcc_ipq4018_reset.c +++ b/sys/dev/qcom_gcc/qcom_gcc_ipq4018_reset.c @@ -38,6 +38,7 @@ #include #include +#include #include #include @@ -136,7 +137,8 @@ qcom_gcc_ipq4018_hwreset_assert(device_t dev, intptr_t id, bool reset) sc = device_get_softc(dev); if (id > nitems(gcc_ipq4019_reset_list)) { - device_printf(dev, "%s: invalid id (%d)\n", __func__, id); + device_printf(dev, "%s: invalid id (%d)\n", __func__, + (uint32_t) id); return (EINVAL); } @@ -160,7 +162,8 @@ qcom_gcc_ipq4018_hwreset_is_asserted(device_t dev, intptr_t id, bool *reset) sc = device_get_softc(dev); if (id > nitems(gcc_ipq4019_reset_list)) { - device_printf(dev, "%s: invalid id (%d)\n", __func__, id); + device_printf(dev, "%s: invalid id (%d)\n", __func__, + (uint32_t) id); return (EINVAL); } mtx_lock(&sc->mtx); @@ -171,7 +174,7 @@ qcom_gcc_ipq4018_hwreset_is_asserted(device_t dev, intptr_t id, bool *reset) *reset = false; mtx_unlock(&sc->mtx); - device_printf(dev, "called; id=%d\n", id); + device_printf(dev, "called; id=%d\n", (uint32_t) id); return (0); } diff --git a/sys/dev/qcom_gcc/qcom_gcc_main.c b/sys/dev/qcom_gcc/qcom_gcc_main.c index 3950bd985feb..38f409827541 100644 --- a/sys/dev/qcom_gcc/qcom_gcc_main.c +++ b/sys/dev/qcom_gcc/qcom_gcc_main.c @@ -1,7 +1,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause * - * Copyright (c) 2025, Adrian Chadd + * Copyright (c) 2026 Adrian Chadd * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -39,6 +39,7 @@ #include #include #include +#include #include #include @@ -51,6 +52,7 @@ #include "qcom_gcc_var.h" #include "qcom_gcc_ipq4018.h" +#include "qcom_gcc_msm8916.h" static int qcom_gcc_modevent(module_t, int, void *); @@ -67,6 +69,8 @@ struct qcom_gcc_chipset_list_entry { static struct qcom_gcc_chipset_list_entry qcom_gcc_chipset_list[] = { { "qcom,gcc-ipq4019", "Qualcomm IPQ4018 Clock/Reset Controller", QCOM_GCC_CHIPSET_IPQ4018 }, + { "qcom,gcc-msm8916", "Qualcomm MSM8916 Clock/Reset Controller", + QCOM_GCC_CHIPSET_MSM8916 }, { NULL, NULL, 0 }, }; @@ -135,6 +139,10 @@ qcom_gcc_attach(device_t dev) qcom_gcc_ipq4018_hwreset_init(sc); mem_sz = 0x60000; break; + case QCOM_GCC_CHIPSET_MSM8916: + qcom_gcc_msm8916_hwreset_init(sc); + mem_sz = 0x0; + break; case QCOM_GCC_CHIPSET_NONE: device_printf(dev, "Invalid chipset (%d)\n", sc->sc_chipset); return (ENXIO); @@ -142,8 +150,13 @@ qcom_gcc_attach(device_t dev) sc->reg_rid = 0; - sc->reg = bus_alloc_resource_anywhere(dev, SYS_RES_MEMORY, - &sc->reg_rid, mem_sz, RF_ACTIVE); + if (mem_sz != 0) + sc->reg = bus_alloc_resource_anywhere(dev, SYS_RES_MEMORY, + &sc->reg_rid, mem_sz, RF_ACTIVE); + else + sc->reg = bus_alloc_resource_any(dev, SYS_RES_MEMORY, + &sc->reg_rid, RF_ACTIVE); + if (sc->reg == NULL) { device_printf(dev, "Couldn't allocate memory resource!\n"); return (ENXIO); @@ -163,6 +176,9 @@ qcom_gcc_attach(device_t dev) case QCOM_GCC_CHIPSET_IPQ4018: qcom_gcc_ipq4018_clock_setup(sc); break; + case QCOM_GCC_CHIPSET_MSM8916: + qcom_gcc_msm8916_clock_setup(sc); + break; case QCOM_GCC_CHIPSET_NONE: device_printf(dev, "Invalid chipset (%d)\n", sc->sc_chipset); return (ENXIO); diff --git a/sys/dev/qcom_gcc/qcom_gcc_msm8916.h b/sys/dev/qcom_gcc/qcom_gcc_msm8916.h new file mode 100644 index 000000000000..10758b0744a4 --- /dev/null +++ b/sys/dev/qcom_gcc/qcom_gcc_msm8916.h @@ -0,0 +1,41 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2026 Adrian Chadd + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#ifndef __QCOM_GCC_MSM8916_H__ +#define __QCOM_GCC_MSM8916_H__ + +/* + * reset block + */ +extern void qcom_gcc_msm8916_hwreset_init(struct qcom_gcc_softc *); + +/* + * clock block + */ +extern void qcom_gcc_msm8916_clock_setup(struct qcom_gcc_softc *); + +#endif /* __QCOM_GCC_MSM8916_H__ */ diff --git a/sys/arm64/qualcomm/qcom_gcc.c b/sys/dev/qcom_gcc/qcom_gcc_msm8916_clock.c similarity index 60% rename from sys/arm64/qualcomm/qcom_gcc.c rename to sys/dev/qcom_gcc/qcom_gcc_msm8916_clock.c index 3f08577f4d3c..5c0e4afcc17f 100644 --- a/sys/arm64/qualcomm/qcom_gcc.c +++ b/sys/dev/qcom_gcc/qcom_gcc_msm8916_clock.c @@ -41,6 +41,9 @@ #include #include +#include "qcom_gcc_var.h" +#include "qcom_gcc_msm8916.h" + #define GCC_QDSS_BCR 0x29000 #define GCC_QDSS_BCR_BLK_ARES (1 << 0) /* Async software reset. */ #define GCC_QDSS_CFG_AHB_CBCR 0x29008 @@ -50,94 +53,32 @@ #define GCC_QDSS_DAP_CBCR 0x29084 #define DAP_CBCR_CLK_ENABLE (1 << 0) /* DAP clk branch ctrl */ -static struct ofw_compat_data compat_data[] = { - { "qcom,gcc-msm8916", 1 }, - { NULL, 0 } -}; - -struct qcom_gcc_softc { - struct resource *res; -}; - -static struct resource_spec qcom_gcc_spec[] = { - { SYS_RES_MEMORY, 0, RF_ACTIVE }, - { -1, 0 } -}; - /* * Qualcomm Debug Subsystem (QDSS) * block enabling routine. */ static void -qcom_qdss_enable(struct qcom_gcc_softc *sc) +qcom_msm8916_qdss_enable(struct qcom_gcc_softc *sc) { /* Put QDSS block to reset */ - bus_write_4(sc->res, GCC_QDSS_BCR, GCC_QDSS_BCR_BLK_ARES); + bus_write_4(sc->reg, GCC_QDSS_BCR, GCC_QDSS_BCR_BLK_ARES); /* Enable AHB clock branch */ - bus_write_4(sc->res, GCC_QDSS_CFG_AHB_CBCR, AHB_CBCR_CLK_ENABLE); + bus_write_4(sc->reg, GCC_QDSS_CFG_AHB_CBCR, AHB_CBCR_CLK_ENABLE); /* Enable DAP clock branch */ - bus_write_4(sc->res, GCC_QDSS_DAP_CBCR, DAP_CBCR_CLK_ENABLE); + bus_write_4(sc->reg, GCC_QDSS_DAP_CBCR, DAP_CBCR_CLK_ENABLE); /* Enable ETR USB clock branch */ - bus_write_4(sc->res, GCC_QDSS_ETR_USB_CBCR, ETR_USB_CBCR_CLK_ENABLE); + bus_write_4(sc->reg, GCC_QDSS_ETR_USB_CBCR, ETR_USB_CBCR_CLK_ENABLE); /* Out of reset */ - bus_write_4(sc->res, GCC_QDSS_BCR, 0); -} - -static int -qcom_gcc_probe(device_t dev) -{ - if (!ofw_bus_status_okay(dev)) - return (ENXIO); - - if (ofw_bus_search_compatible(dev, compat_data)->ocd_data == 0) - return (ENXIO); - - device_set_desc(dev, "Qualcomm Global Clock Controller"); - - return (BUS_PROBE_DEFAULT); + bus_write_4(sc->reg, GCC_QDSS_BCR, 0); } -static int -qcom_gcc_attach(device_t dev) +void +qcom_gcc_msm8916_clock_setup(struct qcom_gcc_softc *sc) { - struct qcom_gcc_softc *sc; - - sc = device_get_softc(dev); - - if (bus_alloc_resources(dev, qcom_gcc_spec, &sc->res) != 0) { - device_printf(dev, "cannot allocate resources for device\n"); - return (ENXIO); - } - - /* - * Enable debug unit. - * This is required for Coresight operation. - * This also enables USB clock branch. - */ - qcom_qdss_enable(sc); - - return (0); + qcom_msm8916_qdss_enable(sc); } - -static device_method_t qcom_gcc_methods[] = { - /* Device interface */ - DEVMETHOD(device_probe, qcom_gcc_probe), - DEVMETHOD(device_attach, qcom_gcc_attach), - - DEVMETHOD_END -}; - -static driver_t qcom_gcc_driver = { - "qcom_gcc", - qcom_gcc_methods, - sizeof(struct qcom_gcc_softc), -}; - -EARLY_DRIVER_MODULE(qcom_gcc, simplebus, qcom_gcc_driver, 0, 0, - BUS_PASS_BUS + BUS_PASS_ORDER_MIDDLE); -MODULE_VERSION(qcom_gcc, 1); diff --git a/sys/dev/qcom_gcc/qcom_gcc_msm8916_reset.c b/sys/dev/qcom_gcc/qcom_gcc_msm8916_reset.c new file mode 100644 index 000000000000..c83fd3e981ab --- /dev/null +++ b/sys/dev/qcom_gcc/qcom_gcc_msm8916_reset.c @@ -0,0 +1,71 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2026 Adrian Chadd + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice unmodified, this list of conditions, and the following + * disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include +#include + +#include + +#include "hwreset_if.h" + +#include "qcom_gcc_var.h" +#include "qcom_gcc_msm8916.h" + +static int +qcom_gcc_msm8916_hwreset_assert(device_t dev, intptr_t id, bool reset) +{ + device_printf(dev, "%s: invalid id (%d)\n", __func__, (uint32_t) id); + return (EINVAL); +} + +static int +qcom_gcc_msm8916_hwreset_is_asserted(device_t dev, intptr_t id, bool *reset) +{ + device_printf(dev, "%s: invalid id (%d)\n", __func__, (uint32_t) id); + return (EINVAL); +} + +void +qcom_gcc_msm8916_hwreset_init(struct qcom_gcc_softc *sc) +{ + sc->sc_cb.hw_reset_assert = qcom_gcc_msm8916_hwreset_assert; + sc->sc_cb.hw_reset_is_asserted = qcom_gcc_msm8916_hwreset_is_asserted; +} diff --git a/sys/dev/qcom_gcc/qcom_gcc_var.h b/sys/dev/qcom_gcc/qcom_gcc_var.h index 2d4e969e1134..e3796f0d5f0f 100644 --- a/sys/dev/qcom_gcc/qcom_gcc_var.h +++ b/sys/dev/qcom_gcc/qcom_gcc_var.h @@ -31,6 +31,7 @@ typedef enum { QCOM_GCC_CHIPSET_NONE = 0, QCOM_GCC_CHIPSET_IPQ4018 = 1, + QCOM_GCC_CHIPSET_MSM8916 = 2, } qcom_gcc_chipset_t; struct qcom_gcc_reset_entry { From nobody Sat Apr 11 04:00:43 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4ft0MX2c1Dz6Yxjj for ; Sat, 11 Apr 2026 04:00:56 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-qv1-f46.google.com (mail-qv1-f46.google.com [209.85.219.46]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ft0MW3zbhz40wd for ; Sat, 11 Apr 2026 04:00:55 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=none; arc=pass ("google.com:s=arc-20240605:i=1"); 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.219.46 as permitted sender) smtp.mailfrom=adrian.chadd@gmail.com Received: by mail-qv1-f46.google.com with SMTP id 6a1803df08f44-8a58057d7baso30583046d6.1 for ; Fri, 10 Apr 2026 21:00:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1775880054; cv=none; d=google.com; s=arc-20240605; b=HbP94QX+mvvq7/9aHtyOeEriKrEtNuVcObo2fo2jLXNEeAAAhvRVtcOhbzO6UFvDfk x0cFccVDdomnjq+EWlwh8jyvy8sCJsm3CLU4+6jyI4m/5+GmUzVI2D6FAuo9YAcpNEhR 6xuzjH45LkL6rQLbEjeR62V7lsFxnBU5v+FQdwoZQOZZt7BQb3Xsg4h50udInDq9k6O8 5LzOdV963Uls9H/99nyj4oIMHs15QvqS1/RjoPYKF2Xhc9oa2hSc8lBmpH0BmVswkhN/ UUwOrbe+80VK24bnnec802EBiA7I9D3fWHtDrEHwH7jeAdS9Z7EwD2PELozRb18ssRJT 4+Uw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version; bh=LPkU7dJmuUHL1Hs9xnHUx9s01eQgX8EEzZqT0DBtd+k=; fh=R5negXyGsWFjvclv0kdFH+qp2birvmy90rgU8YNTDro=; b=JLlDspRRGFVmH2flQqikHXPWEO4tWMUsRilWkB8srVrlVOvzINkEsdtMmh3BCDrQdi z3aSXhHH9W02R/6mu+h6+LatPjxKjtzrEGVnBiQh+4J9xGY4/OQ64f7Gdv2vbQ9Sknef I4M4V7YGk/rTrv4tnUErZWD050wqfjWJyu2zKmAhiBcTq+j5WM5rmweMNcpWgyQD2xFD +fvE4HqWIhU+zewQO6h+xnW1tDJuoxwAIBJIpMobXGiDpY67eLlT9auJSy1JYy/1otyD paARz2PlWYSwHpPaFo97wv4sb3UQef3706dK5yJBnlnlHJjbMPXbSTL4OlHtk3bpRozN 1cNg==; darn=freebsd.org ARC-Authentication-Results: i=1; mx.google.com; arc=none X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775880054; x=1776484854; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=LPkU7dJmuUHL1Hs9xnHUx9s01eQgX8EEzZqT0DBtd+k=; b=YJy8gAMG7XxVYKf9y4y1UD9tLIWOPiBKQe+T5uEo8lgh3dqkt9uycvSXVzB97KiwMH kh4dDTnQj4ChN/nPkhKuuDM/NpMMEkZvfL4brXYKVfaoJCuoraOSK9mDBAZbtn7GzdKu ATGgxMEFCABFGe/YbcLEjYSyxpJdtJO1tg8W+TEbdpINhAG2N6gslxAloBBBqAPkW9dq rVfaN4E+tbPGkDPSxRxUxwMHkTjbDprMGQVZYSj8oKsTeABYOp11DVh3+sH+DHNdqpMc QrEDuX2wzwaLN+yWxzIg+BXp7HYOzd0cLoW6iFdCDywQkz/ePfC8AZUUdQCK1CasvJJx SwTw== X-Forwarded-Encrypted: i=1; AJvYcCVrKBFNxJVcceFhIIECrXppUo18mdUN5TImYDegs50v3u13JwDGGA+c2Bwq3GuVjXFhopCujK1vOTQcyojZ9UWtRtuKFQ==@freebsd.org X-Gm-Message-State: AOJu0Yx5srlLQfZQvGH36LfbvSHHRO0XK9bXt7P4wSeCzzWr29EHpEr0 i8Zlk2GSHLb6YVyicAWKymkD54chpKaMPUTiyEmloGS3Jl5a37vk+ZUHo5OvsrZFT5FQcOdD+xF 5TYt73n6gGvwkebVMsJe2eLs0ik3Xrxw= X-Gm-Gg: AeBDieuBdTp75t9xeVIUlBIDWR8Pc3uqvVl4R0rcvsxsUArFbGCBgv0wrKIBJ4nBX+Z XqEnX3KXLfo0Id1K8JW1Walu+y3eA/pMnMuPyZPRtr4Y7JK3ryMiabzRlWWC8nPeCqV0hxynM0n 14+8L3Zpwb3jU4kP8J15iuiYeoX9vPE2Lf0mRF+rRBlz6tr7iGC7pqOt7y+pNKPu1t3UrYyv94c QtRhc/ty8SGDjuevslkeldZcMsjHKelyzz2l3fvlV59FUe8xeXPAv8M7dRV10Zycz8b+3HTOVVF vFjAaCYc66ABWvyw+7T7OTKxE9i+Ig6E+fT2h7/UT7SRcXchGtkgw7o2zSBV7L7257MD+t8k8K5 llqA+IDf0UG6E80hqCYywbrMXK9dXFOQNUC32+EW37ZRpd04qKxdp4mUmnQ== X-Received: by 2002:ad4:594d:0:b0:89f:4a69:44b9 with SMTP id 6a1803df08f44-8ac862b4dedmr86199496d6.40.1775880054370; Fri, 10 Apr 2026 21:00:54 -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: <69d6c795.18adf.7af84449@gitrepo.freebsd.org> <60q35572-pprr-op23-p392-266469oon60@mnoonqbm.arg> In-Reply-To: <60q35572-pprr-op23-p392-266469oon60@mnoonqbm.arg> From: Adrian Chadd Date: Fri, 10 Apr 2026 21:00:43 -0700 X-Gm-Features: AQROBzDntlSUOJc-u7H1clbEPbbsSl9gJ7ffHiFBTPTAAQyl2G4ygWEo6gU2zjw Message-ID: Subject: Re: git: c0d9a07101a1 - main - MFV: zstd 1.5.7. To: "Bjoern A. Zeeb" Cc: Xin LI , 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-Result: default: False [-1.87 / 15.00]; ARC_ALLOW(-1.00)[google.com:s=arc-20240605:i=1]; NEURAL_SPAM_LONG(1.00)[0.998]; NEURAL_HAM_SHORT(-0.99)[-0.986]; NEURAL_HAM_MEDIUM(-0.98)[-0.984]; FORGED_SENDER(0.30)[adrian@freebsd.org,adrianchadd@gmail.com]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; MIME_GOOD(-0.10)[text/plain]; DMARC_POLICY_SOFTFAIL(0.10)[freebsd.org : SPF not aligned (relaxed), No valid DKIM,none]; RCVD_IN_DNSWL_NONE(0.00)[209.85.219.46:from]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_ONE(0.00)[1]; FREEMAIL_ENVFROM(0.00)[gmail.com]; TO_DN_SOME(0.00)[]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.219.46:from]; R_DKIM_NA(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-main@freebsd.org]; 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: 4ft0MW3zbhz40wd X-Spamd-Bar: - hi! Same; this is breaking on my Snapdragon X1E FDT BSP work. It fails super early in kernel hand-off. It's going to be a pain to figure out locally as I have a framebuffer and I'd have to go do all the early mapping to do super early (in initarm()) framebuffer work. Is this reproducible by anyone else? delphij@, do you have any arm64 FDT devices? Or maybe QEMU? -adrian On Thu, 9 Apr 2026 at 19:31, Bjoern A. Zeeb wrote: > > On Wed, 8 Apr 2026, Xin LI wrote: > > > The branch main has been updated by delphij: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=c0d9a07101a1e72769ee0619a583f63a078fb391 > > > > commit c0d9a07101a1e72769ee0619a583f63a078fb391 > > Merge: dd201e407e48 7e509d50854e > > Author: Xin LI > > AuthorDate: 2026-04-08 21:22:45 +0000 > > Commit: Xin LI > > CommitDate: 2026-04-08 21:22:45 +0000 > > > > MFV: zstd 1.5.7. > > > > MFC after: 2 weeks > > Relnotes: yes > > I do not know how but this makes an arm64 machine, > doing a UEFI netboot (in case it matters) fetching the /boot/loader.efi, > to fail. > Kernel is the GENERIC-MMCCAM and I do not do ZFS, just to be sure. > > See this thread for a "bisect" and symptoms: > https://lists.freebsd.org/archives/freebsd-arm/2026-April/005757.html > > /bz > > -- > Bjoern A. Zeeb r15:7 > From nobody Sat Apr 11 04:56:53 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4ft1c82f6Nz6Z214; Sat, 11 Apr 2026 04:56:56 +0000 (UTC) (envelope-from delphij@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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ft1c81gk3z45WL; Sat, 11 Apr 2026 04:56:56 +0000 (UTC) (envelope-from delphij@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775883416; 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=VNBKlZZ/NfJwh+leshVu9WSPt8df+L/8lfen6cmoQq4=; b=sxe1yHxnzzMl/QwGaHaDZmZsnNapIlFrVD+ky2Wt1r/qT6tvxx/q5R9pKgB2iIg1l99jLy nJkOUMuGMSoeUanZvzbVOI6fIt7z9xWHc3brXloP/TRYH+ux0u3AarxGz2yn1hoFHg+dta XK9W2SODd4KXgkeOVPZmz7bBKKjy1QV7pTs36tc8qoijFzPc9YDVpwuUINFczCPYXHadKH 3TvjOIOkkOVydp4DjpbsP3Wz1cl1jupBusvxIuH3LvroDXoSTckFOB2FOcILyPogoj2A6s V+K86iGxL2yz1x452rQuFxh8OjM6CH54gGrIrzsJ6X+orgvUFktaHjidAtNWUA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775883416; a=rsa-sha256; cv=none; b=oYDFggob7rr26UFJTOD0GNWpP306qKXXwP92nfMAqGSzKSfrQqsbqd2AKQRjNcd/vAty14 TkK7BVoDipyIC+mk6zD1hTKo7kuJxbz5dKpwP6zjB09R3rcF1dIZnvDqUfol4JXFDedvnf FTuxo2o5JnnwXR6Vjh1n8aPem0qyQ2JNoC8UFIqajqGhE0u5eGj1HFD+dEfiGwKQrRfOkQ Ckg/9oVF05RJUcvBVfJ5ZMO1HmjvpcIY7h0O8+3tkWnd0rOdLcCzMXmHjtdvWJvV35+cQq WD3wKyK1agguvqc9ymKO7OWHUqKA08a99A2d9f5pLD7rtK6cTnoh31WlWMkIOg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775883416; 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=VNBKlZZ/NfJwh+leshVu9WSPt8df+L/8lfen6cmoQq4=; b=Lz8OJV0JB9KSy50E3TM6ofg04RYx93qHrj0hfbV6v+5gDhp5yMk27ZY+LVOj1xJp6ssyt3 fqWjS64IvFRvH24fm+W1oz6U9BeCF65gPNrTVNPG6lkmnnWFcwUJZEHHFphDKv25RH4NzZ etGL+wPxFq6s4oDs4yHVQgq9Kgw9HlIqKgrZpk9O1a5390zQLYTc3upUSMambyaIZdQpZZ EAKSOmnUumYEET2TA7jVZ8pCAnq78vnH1AxuKcV/BxunDxUjxhlwa1McZCWELHo+NVY79C KlKH6jUD32eP7+eW4XjpX24D9PB5JhnvlLk1ucnWub4YSG7QS/ETxYNXycqZXw== Received: from [IPV6:2601:646:8003:2efa:2167:f65c:f305:56c6] (unknown [IPv6:2601:646:8003:2efa:2167:f65c:f305:56c6]) (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: delphij/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4ft1c734JGzQXk; Sat, 11 Apr 2026 04:56:55 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Message-ID: Date: Fri, 10 Apr 2026 21:56:53 -0700 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: c0d9a07101a1 - main - MFV: zstd 1.5.7. To: Adrian Chadd , "Bjoern A. Zeeb" Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <69d6c795.18adf.7af84449@gitrepo.freebsd.org> <60q35572-pprr-op23-p392-266469oon60@mnoonqbm.arg> Content-Language: en-US From: Xin Li Organization: The FreeBSD Project In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 2026-04-10 21:00, Adrian Chadd wrote: > hi! > > Same; this is breaking on my Snapdragon X1E FDT BSP work. > > It fails super early in kernel hand-off. It's going to be a pain to > figure out locally as I have a framebuffer and I'd have to go do all > the early mapping to do super early (in initarm()) framebuffer work. > > Is this reproducible by anyone else? delphij@, do you have any arm64 > FDT devices? Or maybe QEMU? bz@ and lwhsu@ did some diagnostic work, and this should help (adding -DZSTD_NO_TRACE to ZSTD_C) diff --git a/sys/conf/kern.pre.mk b/sys/conf/kern.pre.mk index 871cd1c0705a..043d3fd0927c 100644 --- a/sys/conf/kern.pre.mk +++ b/sys/conf/kern.pre.mk @@ -158,7 +158,7 @@ NORMAL_FWO= ${CC:N${CCACHE_BIN}} -c ${ASM_CFLAGS} ${WERROR} -o ${.TARGET} \ NOSAN_C= ${NORMAL_C:N-fsanitize*:N-fno-sanitize*:N-fasan-shadow-offset*} # for ZSTD in the kernel (include zstd/lib/freebsd before other CFLAGS) -ZSTD_C= ${CC} -c -DZSTD_HEAPMODE=1 -I$S/contrib/zstd/lib/freebsd ${CFLAGS} \ +ZSTD_C= ${CC} -c -DZSTD_NO_TRACE -DZSTD_HEAPMODE=1 -I$S/contrib/zstd/lib/freebsd ${CFLAGS} \ -I$S/contrib/zstd/lib -I$S/contrib/zstd/lib/common ${WERROR} \ -Wno-missing-prototypes -U__BMI__ -DZSTD_NO_INTRINSICS ${.IMPSRC} # https://github.com/facebook/zstd/commit/812e8f2a [zstd 1.4.1] > -adrian > > > On Thu, 9 Apr 2026 at 19:31, Bjoern A. Zeeb wrote: >> >> On Wed, 8 Apr 2026, Xin LI wrote: >> >>> The branch main has been updated by delphij: >>> >>> URL: https://cgit.FreeBSD.org/src/commit/?id=c0d9a07101a1e72769ee0619a583f63a078fb391 >>> >>> commit c0d9a07101a1e72769ee0619a583f63a078fb391 >>> Merge: dd201e407e48 7e509d50854e >>> Author: Xin LI >>> AuthorDate: 2026-04-08 21:22:45 +0000 >>> Commit: Xin LI >>> CommitDate: 2026-04-08 21:22:45 +0000 >>> >>> MFV: zstd 1.5.7. >>> >>> MFC after: 2 weeks >>> Relnotes: yes >> >> I do not know how but this makes an arm64 machine, >> doing a UEFI netboot (in case it matters) fetching the /boot/loader.efi, >> to fail. >> Kernel is the GENERIC-MMCCAM and I do not do ZFS, just to be sure. >> >> See this thread for a "bisect" and symptoms: >> https://lists.freebsd.org/archives/freebsd-arm/2026-April/005757.html >> >> /bz >> >> -- >> Bjoern A. Zeeb r15:7 >> From nobody Sat Apr 11 06:58:41 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4ft4Jj10Pwz6Z9tG; Sat, 11 Apr 2026 06:58:45 +0000 (UTC) (envelope-from tuexen@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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ft4Jh6Pxpz3JD3; Sat, 11 Apr 2026 06:58:44 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775890724; 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=/G4dVED8UomAwz2TJfhpPbXe02FLf+1vj9kxyGVCbZQ=; b=Qmw2bE7bZoQBwf6FnMwksydHOgaK9nQ4N84EAez3uK4oYXm/TKuEfxPmuUXkC5GBwLv2U2 mrZnUs4mfGSFfgy9X58yO9AIYT/SLAvKgACe6HM+ZJcChhrv3zXzR9AIafx+Ktm3Qilyba 1eFpB0r07AlqVwOMqTJbrKAJE16gOQ12FpolxjTZrhRgnm5GiheyYSynu/zJwdG4FKUM/y svXgf1UhAic6oCmBpDvEpO5tXNb3Lkg0JDzYv4qydDLVFmWQ4k4xamcFkPwUcgk4ftotyz E145CVzO5Y4ZrsEAVOCcbqqVyYzt4d5076xlvQO3G2bKWZmGSpP7KllLXW0iww== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775890724; a=rsa-sha256; cv=none; b=GSov5+z0CqTTZ79qCvkuZRmPwqrWPDk2vF8RJc+RiWNe3vQpKxYiyrdB5m6IjdfWZtbtl1 6wfrI7eKwhZTN+m4n2lGLPbHMBMluhhdRbnFybo5iCzxKOHHB1clTSNL1STnrtY8kPsy/Y mLsDJz43XjhODspTuO4Yqwwpmvy1lr9v2kikY1wLiUAg9adSX7719WGaf90fiahje9gX61 xOPZj/En9U3Uq+KkbdtVu8a1h/Vc9SLZWytsglFGJ+Ff3/4kJANpiEQijypMLOBlAlI0uo kb8VjztVHyR96mhdVvwN/sD74e9KdsIZaR1HNtfBZZlwD9E1Xl97N1NI1Xsn2Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775890724; 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=/G4dVED8UomAwz2TJfhpPbXe02FLf+1vj9kxyGVCbZQ=; b=NBR9U8k4TQfwAOgzgJNdVsPtDMVNjukVFFi0gDbMLBPuTJjpdP088tRVlSRImvT8UsGXAe 353RX3U0QKPCNf1Or4RRPgEUoQ8TUnMERDfUibRCQl9RX1+u4IqSmzUPHRoh3cM0rlusSV 8SALIwj2rzRvKmI6EGLES3/DOqTad90XzIGd2MkNFJiljnkbRjM0ALc5pIkRu8RiuScFvy vC5tC0l4USiDgMXrKtseiUtHmJwAL7aNZH7iHZQT0MnRXb0Q+7DwO0CuhArdX5vvO/GHzk cOtiG1E6g8lIZZzG45SZQcMWHFjhCA660kI09bxmjnnW7G8aoIsCcWttpCVsQA== Received: from smtpclient.apple (unknown [IPv6:2a02:8109:1101:be00:8110:61d4:b0ae:ea2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: tuexen) by smtp.freebsd.org (Postfix) with ESMTPSA id 4ft4Jh00Ldzjt1; Sat, 11 Apr 2026 06:58:43 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Content-Type: text/plain; charset=us-ascii List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: 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 \(3864.500.181\)) Subject: Re: git: c0d9a07101a1 - main - MFV: zstd 1.5.7. From: Michael Tuexen In-Reply-To: Date: Sat, 11 Apr 2026 08:58:41 +0200 Cc: "Bjoern A. Zeeb" , Xin LI , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <025D3458-2397-4142-A8AA-3B2F7441579B@FreeBSD.org> References: <69d6c795.18adf.7af84449@gitrepo.freebsd.org> <60q35572-pprr-op23-p392-266469oon60@mnoonqbm.arg> To: Adrian Chadd X-Mailer: Apple Mail (2.3864.500.181) > On 11. Apr 2026, at 06:00, Adrian Chadd wrote: >=20 > hi! >=20 > Same; this is breaking on my Snapdragon X1E FDT BSP work. >=20 > It fails super early in kernel hand-off. It's going to be a pain to > figure out locally as I have a framebuffer and I'd have to go do all > the early mapping to do super early (in initarm()) framebuffer work. >=20 > Is this reproducible by anyone else? delphij@, do you have any arm64 > FDT devices? Or maybe QEMU? I observe the same problem on a VirtualBox VM and on a QEMU VM. Best regards Michael >=20 >=20 >=20 > -adrian >=20 >=20 > On Thu, 9 Apr 2026 at 19:31, Bjoern A. Zeeb wrote: >>=20 >> On Wed, 8 Apr 2026, Xin LI wrote: >>=20 >>> The branch main has been updated by delphij: >>>=20 >>> URL: = https://cgit.FreeBSD.org/src/commit/?id=3Dc0d9a07101a1e72769ee0619a583f63a= 078fb391 >>>=20 >>> commit c0d9a07101a1e72769ee0619a583f63a078fb391 >>> Merge: dd201e407e48 7e509d50854e >>> Author: Xin LI >>> AuthorDate: 2026-04-08 21:22:45 +0000 >>> Commit: Xin LI >>> CommitDate: 2026-04-08 21:22:45 +0000 >>>=20 >>> MFV: zstd 1.5.7. >>>=20 >>> MFC after: 2 weeks >>> Relnotes: yes >>=20 >> I do not know how but this makes an arm64 machine, >> doing a UEFI netboot (in case it matters) fetching the = /boot/loader.efi, >> to fail. >> Kernel is the GENERIC-MMCCAM and I do not do ZFS, just to be sure. >>=20 >> See this thread for a "bisect" and symptoms: >> https://lists.freebsd.org/archives/freebsd-arm/2026-April/005757.html >>=20 >> /bz >>=20 >> -- >> Bjoern A. Zeeb = r15:7 >>=20 >=20 From nobody Sat Apr 11 07:25:33 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4ft4vh2j9Yz6Xysh; Sat, 11 Apr 2026 07:25:36 +0000 (UTC) (envelope-from tuexen@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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ft4vh26Blz3PXx; Sat, 11 Apr 2026 07:25:36 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775892336; 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=gddML8wygP0ZEtJOArowUe6whp2+YfU7jdZp5LTHpZQ=; b=xC9UyIbT65X5DnXClkKa/xZozQtZ733ITeocWYx2KoS26FBhbdTg49H8UUihtcMnyU7yPb dyBLtWwQ3GD1OhLSz6kUOaSEXxS8d8f1Rp/kZn5QTscNWA7LZMm7+NFGXWSHvve7eH6SYR dIjIw4QMbs7/yDS+iDAzrX9r4MoM42kM+qTJT/QaoSPbR2tG52V7QsuHpyD2+Tjex4wBdu t9ykCOhMP3wVIqgUb6lqGGUj8vJM5ocFABpPlCUuZYbQxLMZ19lyAvukz48NvBAVZuq8aV jEhZuBxOYqKZ12pKJhUHLQOM2ZZJzy91cD6QORXW6YgawdF1oSkEpGtVenEezQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775892336; a=rsa-sha256; cv=none; b=HTpphOYdP3KxacU8RCBLvCMKC66zb+LLhORedl+pVCS6+wBNCTNMjExhmnvluMaAzzFsN+ 1UgJ7u706lFnVyMhIsru0pQstQK2g7TLcUrV+NJ9+uLhi2vzlYMh8c1O/iMd7+44cFuLQm NxJGRccecEhKmV9yZMCZ9HH0vHsZzvuXmOnhXKewlSY1IVXsP306BVE7FGpV7CVhlMxpya RvWFk07MgkNfRa5SjqW3cMe5sez5nyCAav0hrbjQulA3L3axlNu4AJg5nLCT7Dwm5Boihg BlKAASMYZo6zj/COcXUTokokjRgrKJG1L7EULpe4kB9w9fnZN/kNayDh+n7n+g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775892336; 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=gddML8wygP0ZEtJOArowUe6whp2+YfU7jdZp5LTHpZQ=; b=bqYd+RajiePBwPWf6PGvNRoio0AHejAZrZ5ARk2yIxTxvf0r2jzBBiLnu7AFNNTtk4z0Fe PJzxWZTLV40T9nc66Blt1mOb3YKIrqUJOD9UCLYaPMZSYnV6tY8bjoLLDticR5kljfGvUj +qzkeaII20z5VRsZgjEaOrzf0D+dgFvk5ElylMTw966mPWAcVbG1HL94YatRY3WLx+fLZX v0G3U/V8J1bhqdeZRhX0G8c4uthx1yZlmWUpRgYzB6TXGfIajlQ4IsC3XYTTw7tMEv+6sE j/2pE8MmmZEYjKSFn4215zpTqZuTTBNH8k1VmZumGLb/hPdislUqNCdZ7DkLew== Received: from smtpclient.apple (unknown [IPv6:2a02:8109:1101:be00:8110:61d4:b0ae:ea2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: tuexen) by smtp.freebsd.org (Postfix) with ESMTPSA id 4ft4vg2hWszjnk; Sat, 11 Apr 2026 07:25:35 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Content-Type: text/plain; charset=us-ascii List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: 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 \(3864.500.181\)) Subject: Re: git: c0d9a07101a1 - main - MFV: zstd 1.5.7. From: Michael Tuexen In-Reply-To: Date: Sat, 11 Apr 2026 09:25:33 +0200 Cc: Adrian Chadd , "Bjoern A. Zeeb" , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <69d6c795.18adf.7af84449@gitrepo.freebsd.org> <60q35572-pprr-op23-p392-266469oon60@mnoonqbm.arg> To: Xin Li X-Mailer: Apple Mail (2.3864.500.181) > On 11. Apr 2026, at 06:56, Xin Li wrote: >=20 > On 2026-04-10 21:00, Adrian Chadd wrote: >> hi! >> Same; this is breaking on my Snapdragon X1E FDT BSP work. >> It fails super early in kernel hand-off. It's going to be a pain to >> figure out locally as I have a framebuffer and I'd have to go do all >> the early mapping to do super early (in initarm()) framebuffer work. >> Is this reproducible by anyone else? delphij@, do you have any arm64 >> FDT devices? Or maybe QEMU? >=20 > bz@ and lwhsu@ did some diagnostic work, and this should help (adding = -DZSTD_NO_TRACE to ZSTD_C) >=20 > diff --git a/sys/conf/kern.pre.mk b/sys/conf/kern.pre.mk > index 871cd1c0705a..043d3fd0927c 100644 > --- a/sys/conf/kern.pre.mk > +++ b/sys/conf/kern.pre.mk > @@ -158,7 +158,7 @@ NORMAL_FWO=3D ${CC:N${CCACHE_BIN}} -c = ${ASM_CFLAGS} ${WERROR} -o ${.TARGET} \ > NOSAN_C=3D = ${NORMAL_C:N-fsanitize*:N-fno-sanitize*:N-fasan-shadow-offset*} >=20 > # for ZSTD in the kernel (include zstd/lib/freebsd before other = CFLAGS) > -ZSTD_C=3D ${CC} -c -DZSTD_HEAPMODE=3D1 -I$S/contrib/zstd/lib/freebsd = ${CFLAGS} \ > +ZSTD_C=3D ${CC} -c -DZSTD_NO_TRACE -DZSTD_HEAPMODE=3D1 = -I$S/contrib/zstd/lib/freebsd ${CFLAGS} \ > -I$S/contrib/zstd/lib -I$S/contrib/zstd/lib/common ${WERROR} \ > -Wno-missing-prototypes -U__BMI__ -DZSTD_NO_INTRINSICS = ${.IMPSRC} > # https://github.com/facebook/zstd/commit/812e8f2a [zstd 1.4.1] Should building a new kernel with this patch resolve the issue or is a buildworld/installworld required? I tested building a new kernel with this patch and it does not resolve = the issue for me (VirtualBox VM on macOS and QEMU on Rasbian). Best regards Michael >=20 >=20 >=20 >> -adrian >> On Thu, 9 Apr 2026 at 19:31, Bjoern A. Zeeb wrote: >>>=20 >>> On Wed, 8 Apr 2026, Xin LI wrote: >>>=20 >>>> The branch main has been updated by delphij: >>>>=20 >>>> URL: = https://cgit.FreeBSD.org/src/commit/?id=3Dc0d9a07101a1e72769ee0619a583f63a= 078fb391 >>>>=20 >>>> commit c0d9a07101a1e72769ee0619a583f63a078fb391 >>>> Merge: dd201e407e48 7e509d50854e >>>> Author: Xin LI >>>> AuthorDate: 2026-04-08 21:22:45 +0000 >>>> Commit: Xin LI >>>> CommitDate: 2026-04-08 21:22:45 +0000 >>>>=20 >>>> MFV: zstd 1.5.7. >>>>=20 >>>> MFC after: 2 weeks >>>> Relnotes: yes >>>=20 >>> I do not know how but this makes an arm64 machine, >>> doing a UEFI netboot (in case it matters) fetching the = /boot/loader.efi, >>> to fail. >>> Kernel is the GENERIC-MMCCAM and I do not do ZFS, just to be sure. >>>=20 >>> See this thread for a "bisect" and symptoms: >>> = https://lists.freebsd.org/archives/freebsd-arm/2026-April/005757.html >>>=20 >>> /bz >>>=20 >>> -- >>> Bjoern A. Zeeb = r15:7 >>>=20 >=20 >=20 From nobody Sat Apr 11 10:32:09 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4ft9396pF9z6YGNg for ; Sat, 11 Apr 2026 10:32:21 +0000 (UTC) (envelope-from lwhsu@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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ft9395hQQz3hVY for ; Sat, 11 Apr 2026 10:32:21 +0000 (UTC) (envelope-from lwhsu@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775903541; 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=+S582vAoRLW4CfplnCvGI9yyxA4JtHhKvNlP9gvgZ2Y=; b=je3Yg3kPu7GeYKZ8jEcoKEkDJvwi5IRYjibRRuAHGM9Yb4/FXRr49IdYfNa/NZWz0/t4eG 2x0zZiI7bq45TS08cd5vXPVuGJinyoe2hgkmAqgQFDDEhbLquWM7vYkay+J++m745GEnoj CKnTxbdBDoXnryHG4wRIYFA85NwACQ70LInXzNHc7aQzWk8PEqZJOLcjrT2P6Dfq6hlyTO rpGJFrmAccwwUONI4D2kXYtcrHOXN6rI886PvYJVj1RqbFAZgH0AThBIU1rpm7q70wv00o 6Jvwp6X5LEXoNbJIzr7D/0cYfwx8Yg12z99+v4jA0wRuVMNLMhMc5Knr5QdLGg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775903541; a=rsa-sha256; cv=none; b=iu2Ov0CdWQA/ZtnryXNvHYvFbC/qqXK2RvaXLum+xEQkcukfwFsvwAkwWf9rNU6nB8QBLP iglgwKrC5rUxpzFJI5SUAjH+XyOYzOhksvmKT5bfZwQzC7viWo+IvHbcp4j6kLVbUMInKg 2wlT5f9oaqk0J3cDGvRSSho7vLpsooN05k4n50pUIm9AyJY9F1jr8g2oaTprejyCZInnvK N+SPOC+XVS4EZRTrkZrg/WdgNiS4wzzRwO1y7e9vWzFD8sZrtz0AFnK0g+D9BC0ipSbfs/ ITFZu51Mgtp+bMWme3LX7fxmBxl45DIggugOZf1VqjhUHqC7eUYKlm9JhbJcfA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775903541; 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=+S582vAoRLW4CfplnCvGI9yyxA4JtHhKvNlP9gvgZ2Y=; b=VdXkMOh6l4Phndf6L2fpqioFOoQHYYy5hOYdCkrrSkgCKhHRyDEUmuuEHguabImJtVmc0Y 7L5fyEMYPBZpFTvbcimOLva+PCgGeZ/Iciz0C1Tozwe25ph1xAANFzzKKAvrZnq9SbRboc cWu9r9TXfLcsi0GgVHngFMxWxw0vCricBFVRw0GFVh5qi64qVdSVq5wb6K0R+N8OCd9Ovq yi8I3CS5+bNjYg+SVs3thor+vpT/VRvkq2YjzzlIBUDnqCjzDlyff/DpJurUX4EA7pJne5 GiJ7LSBm2RUA8i1V81DHln4evZeHM76R9vfvj9PebhvcpQQh0jwDhb+L8q3NJg== Received: from mail-ot1-f53.google.com (mail-ot1-f53.google.com [209.85.210.53]) (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: lwhsu/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4ft93943lbznpJ for ; Sat, 11 Apr 2026 10:32:21 +0000 (UTC) (envelope-from lwhsu@freebsd.org) Received: by mail-ot1-f53.google.com with SMTP id 46e09a7af769-7dc3d28e2f3so273061a34.0 for ; Sat, 11 Apr 2026 03:32:21 -0700 (PDT) X-Forwarded-Encrypted: i=1; AJvYcCWSGAXHGZFkYBpSn1jmU30SUT+YsWu08mPBfWL/8iEOvEvxNtDsjnrO5XSKk1UWIqirfQbhMluQ4M3bC7SoeWq7S7vGKA==@freebsd.org X-Gm-Message-State: AOJu0Ywkak0RxknJLVZ4xjG/mmO6SbSj/FMpJ763hR+DdYWvvResCV1f EA7huq4FyJAv6LQWR5YnxqpOAn8vxOjGq4nqKIz1594v8FdnZGj4Yk4DDDXJnIawRvlILzGNOnS LE1dkxR+Ez9zSzIXCNWcKlPpEvMO+xKc= X-Received: by 2002:a05:6830:4aca:b0:7d7:c911:1829 with SMTP id 46e09a7af769-7dc27db8293mr4975429a34.16.1775903540731; Sat, 11 Apr 2026 03:32: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: <69d6c795.18adf.7af84449@gitrepo.freebsd.org> <60q35572-pprr-op23-p392-266469oon60@mnoonqbm.arg> In-Reply-To: From: Li-Wen Hsu Date: Sat, 11 Apr 2026 18:32:09 +0800 X-Gmail-Original-Message-ID: X-Gm-Features: AQROBzDixB6CFcqlEnQ-BWYU2FdV2ZC6akt9INKYyxIKjfQRCQpvG1Zl-UDu9f0 Message-ID: Subject: Re: git: c0d9a07101a1 - main - MFV: zstd 1.5.7. To: Michael Tuexen Cc: Xin Li , Adrian Chadd , "Bjoern A. Zeeb" , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="000000000000b365b8064f2cc32f" --000000000000b365b8064f2cc32f Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sat, Apr 11, 2026 at 3:25=E2=80=AFPM Michael Tuexen = wrote: > > On 11. Apr 2026, at 06:56, Xin Li wrote: > > > > On 2026-04-10 21:00, Adrian Chadd wrote: > >> hi! > >> Same; this is breaking on my Snapdragon X1E FDT BSP work. > >> It fails super early in kernel hand-off. It's going to be a pain to > >> figure out locally as I have a framebuffer and I'd have to go do all > >> the early mapping to do super early (in initarm()) framebuffer work. > >> Is this reproducible by anyone else? delphij@, do you have any arm64 > >> FDT devices? Or maybe QEMU? > > > > bz@ and lwhsu@ did some diagnostic work, and this should help (adding > -DZSTD_NO_TRACE to ZSTD_C) > > > > diff --git a/sys/conf/kern.pre.mk b/sys/conf/kern.pre.mk > > index 871cd1c0705a..043d3fd0927c 100644 > > --- a/sys/conf/kern.pre.mk > > +++ b/sys/conf/kern.pre.mk > > @@ -158,7 +158,7 @@ NORMAL_FWO=3D ${CC:N${CCACHE_BIN}} -c ${ASM_CFLAGS} > ${WERROR} -o ${.TARGET} \ > > NOSAN_C=3D ${NORMAL_C:N-fsanitize*:N-fno-sanitize*:N-fasan-shadow-offse= t*} > > > > # for ZSTD in the kernel (include zstd/lib/freebsd before other CFLAGS) > > -ZSTD_C=3D ${CC} -c -DZSTD_HEAPMODE=3D1 -I$S/contrib/zstd/lib/freebsd > ${CFLAGS} \ > > +ZSTD_C=3D ${CC} -c -DZSTD_NO_TRACE -DZSTD_HEAPMODE=3D1 > -I$S/contrib/zstd/lib/freebsd ${CFLAGS} \ > > -I$S/contrib/zstd/lib -I$S/contrib/zstd/lib/common ${WERROR} \ > > -Wno-missing-prototypes -U__BMI__ -DZSTD_NO_INTRINSICS ${.IMPSRC= } > > # https://github.com/facebook/zstd/commit/812e8f2a [zstd 1.4.1] > Should building a new kernel with this patch resolve the issue or > is a buildworld/installworld required? > > I tested building a new kernel with this patch and it does not resolve th= e > issue for me (VirtualBox VM on macOS and QEMU on Rasbian). I haven't tested this one, the original patch was adding: #define ZSTD_TRACE 0 to sys/contrib/zstd/lib/freebsd/zstd_kfreebsd.h This fixes my case running in QEMU. > Best regards > Michael > > > > > > > >> -adrian > >> On Thu, 9 Apr 2026 at 19:31, Bjoern A. Zeeb wrote: > >>> > >>> On Wed, 8 Apr 2026, Xin LI wrote: > >>> > >>>> The branch main has been updated by delphij: > >>>> > >>>> URL: > https://cgit.FreeBSD.org/src/commit/?id=3Dc0d9a07101a1e72769ee0619a583f63= a078fb391 > >>>> > >>>> commit c0d9a07101a1e72769ee0619a583f63a078fb391 > >>>> Merge: dd201e407e48 7e509d50854e > >>>> Author: Xin LI > >>>> AuthorDate: 2026-04-08 21:22:45 +0000 > >>>> Commit: Xin LI > >>>> CommitDate: 2026-04-08 21:22:45 +0000 > >>>> > >>>> MFV: zstd 1.5.7. > >>>> > >>>> MFC after: 2 weeks > >>>> Relnotes: yes > >>> > >>> I do not know how but this makes an arm64 machine, > >>> doing a UEFI netboot (in case it matters) fetching the > /boot/loader.efi, > >>> to fail. > >>> Kernel is the GENERIC-MMCCAM and I do not do ZFS, just to be sure. > >>> > >>> See this thread for a "bisect" and symptoms: > >>> https://lists.freebsd.org/archives/freebsd-arm/2026-April/005757.html > >>> > >>> /bz > >>> > >>> -- > >>> Bjoern A. Zeeb > r15:7 > >>> > > > > > > > --000000000000b365b8064f2cc32f Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Sat, Apr 11, 2026 at 3:25=E2=80=AFPM M= ichael Tuexen <tuexen@freebsd.org<= /a>> wrote:
> On 11. Apr 2026, at 06:56,= Xin Li <delphi= j@freebsd.org> wrote:
>
> On 2026-04-10 21:00, Adrian Chadd wrote:
>> hi!
>> Same; this is breaking on my Snapdragon X1E FDT BSP work.
>> It fails super early in kernel hand-off. It's going to be a pa= in to
>> figure out locally as I have a framebuffer and I'd have to go = do all
>> the early mapping to do super early (in initarm()) framebuffer wor= k.
>> Is this reproducible by anyone else? delphij@, do you have any arm= 64
>> FDT devices? Or maybe QEMU?
>
> bz@ and lwhsu@ did some diagnostic work, and this should help (adding = -DZSTD_NO_TRACE to ZSTD_C)
>
> diff --git a/sys/conf/kern.pre.mk b/sys/conf/kern.pre.mk
> index 871cd1c0705a..043d3fd0927c 100644
> --- a/sys/conf/kern.pre.mk
> +++ b/sys/conf/kern.pre.mk
> @@ -158,7 +158,7 @@ NORMAL_FWO=3D ${CC:N${CCACHE_BIN}} -c ${ASM_CFLAGS= } ${WERROR} -o ${.TARGET} \
> NOSAN_C=3D ${NORMAL_C:N-fsanitize*:N-fno-sanitize*:N-fasan-shadow-offs= et*}
>
> # for ZSTD in the kernel (include zstd/lib/freebsd before other CFLAGS= )
> -ZSTD_C=3D ${CC} -c -DZSTD_HEAPMODE=3D1 -I$S/contrib/zstd/lib/freebsd = ${CFLAGS} \
> +ZSTD_C=3D ${CC} -c -DZSTD_NO_TRACE -DZSTD_HEAPMODE=3D1 -I$S/contrib/z= std/lib/freebsd ${CFLAGS} \
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 -I$S/contrib/zstd/lib -I$S/contrib/zstd/lib= /common ${WERROR} \
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 -Wno-missing-prototypes -U__BMI__ -DZSTD_NO= _INTRINSICS ${.IMPSRC}
> # https://github.com/facebook/zstd/commit/812e8= f2a [zstd 1.4.1]
Should building a new kernel with this patch resolve the issue or
is a buildworld/installworld required?

I tested building a new kernel with this patch and it does not resolve the<= br> issue for me (VirtualBox VM on macOS and QEMU on Rasbian).
I haven't tested this one, the original patch was addin= g:

#define ZSTD_TRACE 0

t= o

sys/contrib/zstd/lib/freebsd/zstd_kfreebsd.h

This fixes my case running in QEMU.
=C2=A0<= /div>
Best regards
Michael
>
>
>
>> -adrian
>> On Thu, 9 Apr 2026 at 19:31, Bjoern A. Zeeb <bz@freebsd.org> wrote:
>>>
>>> On Wed, 8 Apr 2026, Xin LI wrote:
>>>
>>>> The branch main has been updated by delphij:
>>>>
>>>> URL: https://cgit.FreeBSD.org/src/commit/?id=3Dc0d9a07101a1e72769ee0619a583f= 63a078fb391
>>>>
>>>> commit c0d9a07101a1e72769ee0619a583f63a078fb391
>>>> Merge: dd201e407e48 7e509d50854e
>>>> Author:=C2=A0 =C2=A0 =C2=A0Xin LI <delphij@FreeBSD.org&= gt;
>>>> AuthorDate: 2026-04-08 21:22:45 +0000
>>>> Commit:=C2=A0 =C2=A0 =C2=A0Xin LI <delphij@FreeBSD.org&= gt;
>>>> CommitDate: 2026-04-08 21:22:45 +0000
>>>>
>>>>=C2=A0 =C2=A0 MFV: zstd 1.5.7.
>>>>
>>>>=C2=A0 =C2=A0 MFC after:=C2=A0 =C2=A0 =C2=A0 2 weeks
>>>>=C2=A0 =C2=A0 Relnotes:=C2=A0 =C2=A0 =C2=A0 =C2=A0yes
>>>
>>> I do not know how but this makes an arm64 machine,
>>> doing a UEFI netboot (in case it matters) fetching the /boot/l= oader.efi,
>>> to fail.
>>> Kernel is the GENERIC-MMCCAM and I do not do ZFS, just to be s= ure.
>>>
>>> See this thread for a "bisect" and symptoms:
>>> https://lists.free= bsd.org/archives/freebsd-arm/2026-April/005757.html
>>>
>>> /bz
>>>
>>> --
>>> 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
>>>
>
>


--000000000000b365b8064f2cc32f-- From nobody Sat Apr 11 11:02:56 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4ft9km6HcXz6YJbC for ; Sat, 11 Apr 2026 11:03:12 +0000 (UTC) (envelope-from lwhsu@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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ft9km5Nb3z3lHS for ; Sat, 11 Apr 2026 11:03:12 +0000 (UTC) (envelope-from lwhsu@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775905392; 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=OhsINEgOWpwukSK/ve/hjp7F9ghMwaCsisd1kYWPlgI=; b=i6ArnC5A6FbyN/0URnUwtyyyvN8BBk55d1t7EXXr168EiNdyVuYax/OVFkAnHyjgrxp04x dOXxUoKRkE9TPTlfE0jzlbWnB50RAR4Chyja1FHhJAGvgr5rWyhqN8J6s7lu3pkPY2sRMT 8j55s++vVGk5juP9lAYKS0vlIZBrZhUlGi0umdUALK9vs7ykdCwQckhX3SoSwviFrAe4GY cbE6VmrZcFILtppoe4mcqdqo/dEFwDtYzrfsOPlHYE2vaVL+56IXIRbA3GL5IIZeP4CYxg nTiKmYXANyepj6PfBt49QWJ+8HDJg6QaH+mH+HehMchesV3T5pJsvtHOZ3x7AQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775905392; a=rsa-sha256; cv=none; b=budMhxv72hk/PZjy8bmcv4to9hAgRokBGGArw4+Me/HnwSPkoWVbd+XZULbCZOmoOF+VoO ep2kwYJGfsU//eKA25FBPDrHEOyG5yfGqMmTMQslEZKu9BpJzb4Cyg4V4KCh3A1MMn1y1z 5J/hREW52cUCFW+75Ev8WkNXr/84PwHAdlEdrCVd8tOApjnt8Vh3fC4A1gxPPwoI+dU6PQ dFHhlZfyFCTJywbt9JjiQxP3auW39XkGTmThrnoIouKCKt5yYiS3zW+JfSiCzey8595a6l A3OiSp5PaLI1IxVpZy8MDI6+H+jtYWsuMfy/fcdtkM6shFJIpmbe3Z03jV5uvA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775905392; 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=OhsINEgOWpwukSK/ve/hjp7F9ghMwaCsisd1kYWPlgI=; b=dgRUC0zfgzZhXVym57z+qYWNP0Za6hz9ndxn8jF4uR3j+Yoi3VDSAJz5dxVOYzTuVOmzE7 J9lY8Uey3mxlFxV848Vk8oztxe08yFWSFYpU49jnTcB1A8+h1Il0HsF5hj5CNnqLyk8xT1 X/ITbZ9ROh4sj4O0NGBjwnh9BRlATcELtP40i2H5Bk6ChUXCdAzjr2EMVZBkjfPEjjQAFt IjtGIa71lF67cWVgCYM76+N9m+m4bsCXiSwIvCZXmeVHHzXbmQMJsjgnAXGy6TFK9JxSLa kceSwzW1YkHviGKtZPPhx7JsggNUmdn3RbWwJnT8Vxkggl8xozroaXYdK611Yg== Received: from mail-ot1-f42.google.com (mail-ot1-f42.google.com [209.85.210.42]) (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: lwhsu/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4ft9km43nnzpfW for ; Sat, 11 Apr 2026 11:03:12 +0000 (UTC) (envelope-from lwhsu@freebsd.org) Received: by mail-ot1-f42.google.com with SMTP id 46e09a7af769-7dbff06e4a6so2768367a34.1 for ; Sat, 11 Apr 2026 04:03:12 -0700 (PDT) X-Forwarded-Encrypted: i=1; AJvYcCUW4W8jlKzn8vV/I8G4cNPbeIM2DMjEXFo4TKhlLR1TNehItYeLFpT2kbv4qE9xKYcgOXvDtk3PwL8rZ7lpznWz5FfZRQ==@freebsd.org X-Gm-Message-State: AOJu0YzRSyGOXAiKEAp/RYkqp9ligkwU+kC8NbIxdQey4oaRGlBhpZsG 2r6M0fiQ8acKtu1hwKYRPe80Fa/o6TGlrEE0+rG2K/YKBnBCAgdqefsSIYCCy4Pm9IsU42aXC9o sncVI/zCUHAgL9um+kAxCupW7XdpRsxM= X-Received: by 2002:a05:6830:6a8e:b0:7d4:4af4:b7d4 with SMTP id 46e09a7af769-7dc27c64607mr3980925a34.1.1775905386925; Sat, 11 Apr 2026 04:03:06 -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: <69d6c795.18adf.7af84449@gitrepo.freebsd.org> <60q35572-pprr-op23-p392-266469oon60@mnoonqbm.arg> In-Reply-To: From: Li-Wen Hsu Date: Sat, 11 Apr 2026 19:02:56 +0800 X-Gmail-Original-Message-ID: X-Gm-Features: AQROBzAV247s24-GMrpCfLGZpoC7zoQ7ToDMZ874f428jJnSDbxHzORdN0vuPIU Message-ID: Subject: Re: git: c0d9a07101a1 - main - MFV: zstd 1.5.7. To: Michael Tuexen Cc: Xin Li , Adrian Chadd , "Bjoern A. Zeeb" , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="000000000000be175e064f2d3185" --000000000000be175e064f2d3185 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sat, Apr 11, 2026 at 18:32 Li-Wen Hsu wrote: > On Sat, Apr 11, 2026 at 3:25=E2=80=AFPM Michael Tuexen wrote: > >> > On 11. Apr 2026, at 06:56, Xin Li wrote: >> > >> > On 2026-04-10 21:00, Adrian Chadd wrote: >> >> hi! >> >> Same; this is breaking on my Snapdragon X1E FDT BSP work. >> >> It fails super early in kernel hand-off. It's going to be a pain to >> >> figure out locally as I have a framebuffer and I'd have to go do all >> >> the early mapping to do super early (in initarm()) framebuffer work. >> >> Is this reproducible by anyone else? delphij@, do you have any arm64 >> >> FDT devices? Or maybe QEMU? >> > >> > bz@ and lwhsu@ did some diagnostic work, and this should help (adding >> -DZSTD_NO_TRACE to ZSTD_C) >> > >> > diff --git a/sys/conf/kern.pre.mk b/sys/conf/kern.pre.mk >> > index 871cd1c0705a..043d3fd0927c 100644 >> > --- a/sys/conf/kern.pre.mk >> > +++ b/sys/conf/kern.pre.mk >> > @@ -158,7 +158,7 @@ NORMAL_FWO=3D ${CC:N${CCACHE_BIN}} -c ${ASM_CFLAGS= } >> ${WERROR} -o ${.TARGET} \ >> > NOSAN_C=3D ${NORMAL_C:N-fsanitize*:N-fno-sanitize*:N-fasan-shadow-offs= et*} >> > >> > # for ZSTD in the kernel (include zstd/lib/freebsd before other CFLAGS= ) >> > -ZSTD_C=3D ${CC} -c -DZSTD_HEAPMODE=3D1 -I$S/contrib/zstd/lib/freebsd >> ${CFLAGS} \ >> > +ZSTD_C=3D ${CC} -c -DZSTD_NO_TRACE -DZSTD_HEAPMODE=3D1 >> -I$S/contrib/zstd/lib/freebsd ${CFLAGS} \ >> > -I$S/contrib/zstd/lib -I$S/contrib/zstd/lib/common ${WERROR} \ >> > -Wno-missing-prototypes -U__BMI__ -DZSTD_NO_INTRINSICS ${.IMPSR= C} >> > # https://github.com/facebook/zstd/commit/812e8f2a [zstd 1.4.1] >> Should building a new kernel with this patch resolve the issue or >> is a buildworld/installworld required? >> >> I tested building a new kernel with this patch and it does not resolve t= he >> issue for me (VirtualBox VM on macOS and QEMU on Rasbian). > > > I haven't tested this one, the original patch was adding: > > #define ZSTD_TRACE 0 > > to > > sys/contrib/zstd/lib/freebsd/zstd_kfreebsd.h > > This fixes my case running in QEMU. > I also tested the version modifies sys/conf/kern.pre.mk and it works. It should be the better fix. Best regards >> Michael >> > >> > >> > >> >> -adrian >> >> On Thu, 9 Apr 2026 at 19:31, Bjoern A. Zeeb wrote: >> >>> >> >>> On Wed, 8 Apr 2026, Xin LI wrote: >> >>> >> >>>> The branch main has been updated by delphij: >> >>>> >> >>>> URL: >> https://cgit.FreeBSD.org/src/commit/?id=3Dc0d9a07101a1e72769ee0619a583f6= 3a078fb391 >> >>>> >> >>>> commit c0d9a07101a1e72769ee0619a583f63a078fb391 >> >>>> Merge: dd201e407e48 7e509d50854e >> >>>> Author: Xin LI >> >>>> AuthorDate: 2026-04-08 21:22:45 +0000 >> >>>> Commit: Xin LI >> >>>> CommitDate: 2026-04-08 21:22:45 +0000 >> >>>> >> >>>> MFV: zstd 1.5.7. >> >>>> >> >>>> MFC after: 2 weeks >> >>>> Relnotes: yes >> >>> >> >>> I do not know how but this makes an arm64 machine, >> >>> doing a UEFI netboot (in case it matters) fetching the >> /boot/loader.efi, >> >>> to fail. >> >>> Kernel is the GENERIC-MMCCAM and I do not do ZFS, just to be sure. >> >>> >> >>> See this thread for a "bisect" and symptoms: >> >>> https://lists.freebsd.org/archives/freebsd-arm/2026-April/005757.htm= l >> >>> >> >>> /bz >> >>> >> >>> -- >> >>> Bjoern A. Zeeb >> r15:7 >> >>> >> > >> > >> >> >> --000000000000be175e064f2d3185 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Sat, Apr 11, 2026 at 18:32 Li-Wen Hsu <lwhsu@freebsd.org> wrote:
On Sat, Apr 11, 2= 026 at 3:25=E2=80=AFPM Michael Tuexen <tuexen@freebsd.org> wrote:
> On 11. Apr 2026, at 06:56, Xin Li &= lt;delphij@freebsd= .org> wrote:
>
> On 2026-04-10 21:00, Adrian Chadd wrote:
>> hi!
>> Same; this is breaking on my Snapdragon X1E FDT BSP work.
>> It fails super early in kernel hand-off. It's going to be a pa= in to
>> figure out locally as I have a framebuffer and I'd have to go = do all
>> the early mapping to do super early (in initarm()) framebuffer wor= k.
>> Is this reproducible by anyone else? delphij@, do you have any arm= 64
>> FDT devices? Or maybe QEMU?
>
> bz@ and lwhsu@ did some diagnostic work, and this should help (adding = -DZSTD_NO_TRACE to ZSTD_C)
>
> diff --git a/sys/conf/kern.pre.mk b/sys/conf/kern.pre.mk
> index 871cd1c0705a..043d3fd0927c 100644
> --- a/sys/conf/kern.pre.mk
> +++ b/sys/conf/kern.pre.mk
> @@ -158,7 +158,7 @@ NORMAL_FWO=3D ${CC:N${CCACHE_BIN}} -c ${ASM_CFLAGS= } ${WERROR} -o ${.TARGET} \
> NOSAN_C=3D ${NORMAL_C:N-fsanitize*:N-fno-sanitize*:N-fasan-shadow-offs= et*}
>
> # for ZSTD in the kernel (include zstd/lib/freebsd before other CFLAGS= )
> -ZSTD_C=3D ${CC} -c -DZSTD_HEAPMODE=3D1 -I$S/contrib/zstd/lib/freebsd = ${CFLAGS} \
> +ZSTD_C=3D ${CC} -c -DZSTD_NO_TRACE -DZSTD_HEAPMODE=3D1 -I$S/contrib/z= std/lib/freebsd ${CFLAGS} \
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 -I$S/contrib/zstd/lib -I$S/contrib/zstd/lib= /common ${WERROR} \
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 -Wno-missing-prototypes -U__BMI__ -DZSTD_NO= _INTRINSICS ${.IMPSRC}
> # https://github.com/facebook/zstd/commit/812e8= f2a [zstd 1.4.1]
Should building a new kernel with this patch resolve the issue or
is a buildworld/installworld required?

I tested building a new kernel with this patch and it does not resolve the<= br> issue for me (VirtualBox VM on macOS and QEMU on Rasbian).

I h= aven't tested this one, the original patch was adding:

#define ZSTD_TRACE 0

to

sys/contrib/zstd/lib/freebsd/zstd_kfreebsd.h

This fixes my case running in QEMU.

I also tested the vers= ion modifies=C2=A0
sys/conf/kern.pre.mk=C2=A0and it works. = It should be the better fix.

Best regards
Michael
>
>
>
>> -adrian
>> On Thu, 9 Apr 2026 at 19:31, Bjoern A. Zeeb <bz@freebsd.org> wrote:
>>>
>>> On Wed, 8 Apr 2026, Xin LI wrote:
>>>
>>>> The branch main has been updated by delphij:
>>>>
>>>> URL: https://cgit.FreeBSD.org/src/commit/?id=3Dc0d9a07101a1e72769ee0619a583f= 63a078fb391
>>>>
>>>> commit c0d9a07101a1e72769ee0619a583f63a078fb391
>>>> Merge: dd201e407e48 7e509d50854e
>>>> Author:=C2=A0 =C2=A0 =C2=A0Xin LI <delphij@FreeBSD.org&= gt;
>>>> AuthorDate: 2026-04-08 21:22:45 +0000
>>>> Commit:=C2=A0 =C2=A0 =C2=A0Xin LI <delphij@FreeBSD.org&= gt;
>>>> CommitDate: 2026-04-08 21:22:45 +0000
>>>>
>>>>=C2=A0 =C2=A0 MFV: zstd 1.5.7.
>>>>
>>>>=C2=A0 =C2=A0 MFC after:=C2=A0 =C2=A0 =C2=A0 2 weeks
>>>>=C2=A0 =C2=A0 Relnotes:=C2=A0 =C2=A0 =C2=A0 =C2=A0yes
>>>
>>> I do not know how but this makes an arm64 machine,
>>> doing a UEFI netboot (in case it matters) fetching the /boot/l= oader.efi,
>>> to fail.
>>> Kernel is the GENERIC-MMCCAM and I do not do ZFS, just to be s= ure.
>>>
>>> See this thread for a "bisect" and symptoms:
>>> https://lists.free= bsd.org/archives/freebsd-arm/2026-April/005757.html
>>>
>>> /bz
>>>
>>> --
>>> 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
>>>
>
>


--000000000000be175e064f2d3185-- From nobody Sat Apr 11 14:10:49 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4ftFvM1G7gz6YYnF for ; Sat, 11 Apr 2026 14:10: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ftFvM0WH8z47sS for ; Sat, 11 Apr 2026 14:10:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775916655; 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; bh=hdaYRYWSQmMIg82T9JaU+d+0mb1BdQYKk0nLSAfp8EQ=; b=u/dNIsWx3U5gOxjPN5iCGy4raIlmNfCVlFjaf/rkrkNx6mwhrj6EMGYZ/pEtyBmpKcljGM SeJGLQqmm6B2Lxkdl/dB3S6b2TH4BZZMaewkWdssfRPofYrJRVpRTM/3eO0nXrNh85lGu/ UG9Yq8fGWioPenc6dJ8nEfr1OaY5aZsZiVstKnhgi3xqqXg2EGLcl8zBzv9yl37zsjXCg7 4k17sPtu49fiZxtBIRmVS8yioKMsRI97Y7KdZ3rW+QyauhSKQGiK+r+MVpLCqK82C+OAwt VyBuA9Lg7WX8H5/7UcMsYIk3AdyIqn0q6ipDPEfA71l9nzzA8n1Fgi6kdOsDMQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775916655; a=rsa-sha256; cv=none; b=nH4NkfkZWcGtdW91DXLsFjQB7wPjs2rEsXUKKgNNf30mRN3Qk6J/kYoQaWPRViRGZl5n1P YqFf5MPa9CaE2m3w1wEp44Z65wjc/29G7z9ME370kcwYVzLOU8gepadLIoNomfeSDh65eq b6eTspcye2KgimarrXzPGOIE0F73VfQ1MbCrrNe7SC5eePqVpcH0Rh+anyjrBbg6wPZPo2 2qaKTGJZsulVRUWw8558qUwb+j5GuKQ3Te/2fQdTAkxC4zEmJLqybIQ3vD7+sjwy/loLeB IPSd/CUQjCCyR9crK7v+C4QyjLscYJqmhiHevp17DJHgfXRrtWlEv7TrEtb7mg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775916655; 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; bh=hdaYRYWSQmMIg82T9JaU+d+0mb1BdQYKk0nLSAfp8EQ=; b=U9ur8AaTUFYNOWSqgeIQa1V/fSib6bfcX8mZikMoHWgtZPA2p9EHBNJ53Nz3qRPQ3cREY3 DJo2IZ2BULa0IugwkelEf9zjZlin5k2+n4QGwIicPPkBi8sF6hwRVzyV41ZiKGnsM+hw2s cov12oVsfdWPP3oLcVJ3v8atvTnyOSTojOkQKBUkSxSpwp1C1sqTn62PCRmCcWGO91WFYg hIfQNzmKxIo4edpnhb21OmOpwSjfDqcz2YcV+bKupXGOqB58gAO4papbC+gNv+G8qxTW3X 5O35Lqv4+Upt+5/lgA7nUHx2f9L8mQTNGeVHPJa5VpQhgH2AjW7I7KBTeDrrXQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4ftFvM05RbzZWx for ; Sat, 11 Apr 2026 14:10:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3cba9 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 11 Apr 2026 14:10:49 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Shunchao Hu From: ShengYi Hung Subject: git: 5f5cc3c67ae8 - main - compat/linprocfs: Update /proc/partitions 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: aokblast X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5f5cc3c67ae8a4d9a27e750bef98a9ce1a6b2cf5 Auto-Submitted: auto-generated Date: Sat, 11 Apr 2026 14:10:49 +0000 Message-Id: <69da5669.3cba9.de21e88@gitrepo.freebsd.org> The branch main has been updated by aokblast: URL: https://cgit.FreeBSD.org/src/commit/?id=5f5cc3c67ae8a4d9a27e750bef98a9ce1a6b2cf5 commit 5f5cc3c67ae8a4d9a27e750bef98a9ce1a6b2cf5 Author: Shunchao Hu AuthorDate: 2026-04-07 13:07:31 +0000 Commit: ShengYi Hung CommitDate: 2026-04-11 14:10:05 +0000 compat/linprocfs: Update /proc/partitions output Linux /proc/partitions reports the major/minor pair, the device size in 1K blocks, and the device name. linprocfs still printed obsolete statistics columns and reported the size in bytes. Update linprocfs_dopartitions() to emit the Linux-style header and report provider sizes in 1K blocks. Signed-off-by: Shunchao Hu Reviewed by: des MFC after: 2 weeks Pull Request: https://github.com/freebsd/freebsd-src/pull/2126 Closes: https://github.com/freebsd/freebsd-src/pull/2126 --- sys/compat/linprocfs/linprocfs.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/sys/compat/linprocfs/linprocfs.c b/sys/compat/linprocfs/linprocfs.c index 941b76788dc1..786a486b9143 100644 --- a/sys/compat/linprocfs/linprocfs.c +++ b/sys/compat/linprocfs/linprocfs.c @@ -659,8 +659,7 @@ linprocfs_dopartitions(PFS_FILL_ARGS) int major, minor; g_topology_lock(); - sbuf_printf(sb, "major minor #blocks name rio rmerge rsect " - "ruse wio wmerge wsect wuse running use aveq\n"); + sbuf_printf(sb, "major minor #blocks name\n\n"); LIST_FOREACH(cp, &g_classes, class) { if (strcmp(cp->name, "DISK") == 0 || @@ -672,13 +671,10 @@ linprocfs_dopartitions(PFS_FILL_ARGS) major = 0; minor = 0; } - sbuf_printf(sb, "%d %d %lld %s " - "%d %d %d %d %d " - "%d %d %d %d %d %d\n", - major, minor, - (long long)pp->mediasize, pp->name, - 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0); + sbuf_printf(sb, "%4d %7d %10lld %s\n", + major, minor, + B2K((long long)pp->mediasize), + pp->name); } } } From nobody Sat Apr 11 16:28:55 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4ftJyh65Jxz6YkXZ for ; Sat, 11 Apr 2026 16:29: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ftJyh3jjKz3Nlv for ; Sat, 11 Apr 2026 16:29:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775924940; 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; bh=Po15zTpcxQMrCts5XXOrwhHdu+YSp0BrXAuaRQK6Smo=; b=FXPZnrzrWKs0NrCWQcSYJQJjJRje43/BJGeAtF97AFwGUehc/k20zSsiyDJ++DOFrAokWJ c5Xh2F2AAODmDKG80Cccw7WW3tqt/6TqjlwYDXzEdEag7T+8CIGM3+p/Z5e5e8pZJYqKBx LX8WhlCGcfFRWyZZBqda02uTwK4zWtowP6BUaxBaijQ5RBjnk7BaCwbZYGLc4aWJcbztGq QeQotPzpBLyl6fK0230/U/3llyEay+Z8toGnoCFm9tKi6YPnZKsNwqA8XaJFs5T29EeFlz 2PmY5w9z+/FeVi5ZjMpxtBAPzQRJneYv55dtjeEnMx6+Lz/UrNOj5XyhjnG3IA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775924940; a=rsa-sha256; cv=none; b=GtDUNnp7YFb/7MgQIc0HEb4MOQH8oOYVvWdJVuLMQpHcheob4ePbBDrIaelqEEhF2c/Zwf fDtR2GSJetxfAimurn/fgDEX4B8UXKRfPVCJmGsR5RcXljWUgFfyveX2hFCt83DyTuFkFJ jWgRMh3Q9ukqt12DKweV8ci/8NM+VQ/iN/NPjyihz0g81+v49Y0zsMikx1st6paVJIG3nU /g0mWdO0lJs/lsl/V4TsPD0uvY69xkty0rwyjYvdsPR/yqNEyWbs+yyzFP85noxec91804 kA3FfK4oM31/SyUGJSRVU9Hnd+7iuq+lBSk4A3yyi8Q5CmCtdSdX2RUggnY31A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775924940; 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; bh=Po15zTpcxQMrCts5XXOrwhHdu+YSp0BrXAuaRQK6Smo=; b=GJukOC0152+YHr21XOahIEpKIPX4gKJfcecaCIRqIBGMkuMcFOwlf0XfmjVTe/ZOhO0qei SXU6MdbnbSqaYg9fjfHdtbEp1AZhB4RGdWVMwqjkF4cew0eYg5tPYJr6BLr1TCv3S+pV4q 29LPDo6VlTVRtbKBepZsY4bTMqQKpsI+cjGKJG9+pmH6MFspvigpT9Abq6jETydGfGCgde CqUky+STWF3kCbD1wNM7+aG4nGbQdz9roHrZo8VZgQW0kqvW9CbRJPtxeszHRJwfAnOeOt 8FH6/+GWwidVV7JwxvvyREBwCU/JNymyLAtU345lglEJFZbFX6gLMrEbLckUFw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4ftJyh2JnQzddM for ; Sat, 11 Apr 2026 16:29:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 24858 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 11 Apr 2026 16:28:55 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Bjoern A. Zeeb From: Xin LI Subject: git: de2ea5423cc6 - main - zstd: disable weak-symbol tracing hooks in the kernel List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: delphij X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: de2ea5423cc63b62e7e42d11b667aa634109fc28 Auto-Submitted: auto-generated Date: Sat, 11 Apr 2026 16:28:55 +0000 Message-Id: <69da76c7.24858.7f9be8f2@gitrepo.freebsd.org> The branch main has been updated by delphij: URL: https://cgit.FreeBSD.org/src/commit/?id=de2ea5423cc63b62e7e42d11b667aa634109fc28 commit de2ea5423cc63b62e7e42d11b667aa634109fc28 Author: Bjoern A. Zeeb AuthorDate: 2026-04-11 16:24:32 +0000 Commit: Xin LI CommitDate: 2026-04-11 16:28:00 +0000 zstd: disable weak-symbol tracing hooks in the kernel zstd's tracing API (zstd_trace.h) declares ZSTD_trace_compress_begin() and friends as __attribute__((weak)) externals, gated on the ZSTD_HAVE_WEAK_SYMBOLS compile-time probe. That probe has covered x86_64 and i386 since at least zstd 1.5.6, and was extended to aarch64 and riscv in 1.5.7. In a static kernel image there is no dynamic linker to patch the PLT GOT entries at runtime. On amd64 the undefined weak symbols resolve directly to NULL, so the "!= NULL" guard in the zstd source correctly suppresses every call through the stubs. On aarch64 and riscv the ABI requires GOT-based indirection for external calls: the PLT stub address is non-NULL, the guard passes, and the call lands in an uninitialized GOT slot. Because this happens before exception handlers are in place the machine resets silently, making the kernel unbootable after the zstd 1.5.7 import. The upstream-supported suppression is ZSTD_NO_TRACE (zstd_internal.h), which skips inclusion of zstd_trace.h entirely and forces ZSTD_TRACE=0. Add it to ZSTD_C alongside the existing ZSTD_* defines, and while here group all three -DZSTD_* flags onto a single line in alphabetical order with ${.IMPSRC} on its own line. Reported by: many Tested by: lwhsu X-MFC-with: c0d9a07101a1 --- sys/conf/kern.pre.mk | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/conf/kern.pre.mk b/sys/conf/kern.pre.mk index 871cd1c0705a..3dc1efe3d5d2 100644 --- a/sys/conf/kern.pre.mk +++ b/sys/conf/kern.pre.mk @@ -158,9 +158,11 @@ NORMAL_FWO= ${CC:N${CCACHE_BIN}} -c ${ASM_CFLAGS} ${WERROR} -o ${.TARGET} \ NOSAN_C= ${NORMAL_C:N-fsanitize*:N-fno-sanitize*:N-fasan-shadow-offset*} # for ZSTD in the kernel (include zstd/lib/freebsd before other CFLAGS) -ZSTD_C= ${CC} -c -DZSTD_HEAPMODE=1 -I$S/contrib/zstd/lib/freebsd ${CFLAGS} \ +ZSTD_C= ${CC} -c -I$S/contrib/zstd/lib/freebsd ${CFLAGS} \ -I$S/contrib/zstd/lib -I$S/contrib/zstd/lib/common ${WERROR} \ - -Wno-missing-prototypes -U__BMI__ -DZSTD_NO_INTRINSICS ${.IMPSRC} + -Wno-missing-prototypes -U__BMI__ \ + -DZSTD_HEAPMODE=1 -DZSTD_NO_INTRINSICS -DZSTD_NO_TRACE \ + ${.IMPSRC} # https://github.com/facebook/zstd/commit/812e8f2a [zstd 1.4.1] # "Note that [GCC] autovectorization still does not do a good job on the # optimized version, so it's turned off via attribute and flag. I found From nobody Sat Apr 11 18:10:25 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4ftMCk033lz6YsYP for ; Sat, 11 Apr 2026 18:10: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ftMCj4382z3Wb5 for ; Sat, 11 Apr 2026 18:10:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775931025; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=brGYEk7lQf3Dcf9eN1857g0oiah0hw7FS5Mp1eHa5Es=; b=DvnlQGkXY6jxeiaSUHFGMeY4NniRosbVzU8HJoUA6aqpZiZfT92hDuFM87sRicnKuIEths qnZ0Go26MCcVaQ/mkAhQELFx3GO8O8U+JsryCmWOLqYOFSOBVvPWOJrBTinHxFbWmpLx7d rb/37UsPX4iNtAgHfflzFJAQ659bKW44Zer4J088FswEGOz3oESIAoRebXuWaq3myHu6Ea 2fZ7Ls479F3oprR/0exapUq0b82F1VmDB3cQkn9qpo3eGhqORb6ubt7Knziba5Abx1r3nF DVcNKcvw4dalbAs55YZMSvYndwc1iBHDPwFcKynMmcurs55HNlYXUaCivDjhjQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775931025; a=rsa-sha256; cv=none; b=qA+Pj6tj/FJnL2Y1fSfFsEo/awvUjr2QFrRkIMPaCGuBUGdKf8ulaPlnCUhG3RRC7Eugf9 zsGVDZelVDaWV4C76wK+lsaQLcs2xmfNEfwMuDL1U04NjnpjMIOo2E4aDU+ll+UgCcJTQq 7evWsH57zbv2O/qFCwR7ktPqQZsMfFRXoa25Uwp0dlgaDqRL9EyhuzlW/t4GAbByt0/SXE tnf81zO3deWIGiUltOb6m54OZ+CO8Fz7KEp9KyZNHvE16C0zltan9qQa5SPTBrPnrmAY3s AngHcOD/f8yhYDnH3qpETjDZx4w+/K5WhurauWYAiusJneOctCPAsGnzyg/ySA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775931025; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=brGYEk7lQf3Dcf9eN1857g0oiah0hw7FS5Mp1eHa5Es=; b=LqjZ6V6H7MDopV7yHsRCKbbpHW5GV0Fpra2V2NHNyxQXiU5S80JV7uU0ImPEnfALNDc4Gm 3aBmjhsU2Q01iVO3TJW9Hk+F2MsrwqJIcHKG13B+eIFrk4v3FpctZmTz4HuPJQ95ghW//M 4FJEl6cqMkiXzHLWrLhinuVZDdkxZi1hYfhS/azsVjiVMQpaeoxxhbEeara5Y8MNYGHw/R fuWB/u7YVLj4HnTW+3M1F4fOMldsPGFnYfWWY/MwKruVJWY9s8wScZfZXd7Od9UpBtfydx 3EmLyoDRtpHkWn7vo6Q+TLDz2IhrnqojAu8HVyrfXszZmEa9HoIL4ySiscWwUQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4ftMCj3JW5zhh6 for ; Sat, 11 Apr 2026 18:10:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 33a7b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 11 Apr 2026 18:10:25 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Robert Clausecker Subject: git: 47ca491ca425 - main - msun/math.3: reference new functions f{max,min}imum{,_num,_mag}() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: fuz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 47ca491ca425d0d3d8e2a8a3cac40d6565d8ab6a Auto-Submitted: auto-generated Date: Sat, 11 Apr 2026 18:10:25 +0000 Message-Id: <69da8e91.33a7b.298c496f@gitrepo.freebsd.org> The branch main has been updated by fuz: URL: https://cgit.FreeBSD.org/src/commit/?id=47ca491ca425d0d3d8e2a8a3cac40d6565d8ab6a commit 47ca491ca425d0d3d8e2a8a3cac40d6565d8ab6a Author: Robert Clausecker AuthorDate: 2026-03-31 16:55:11 +0000 Commit: Robert Clausecker CommitDate: 2026-04-11 18:09:13 +0000 msun/math.3: reference new functions f{max,min}imum{,_num,_mag}() See also: D55834, D56236 MFC after: 1 month --- lib/msun/man/math.3 | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/lib/msun/man/math.3 b/lib/msun/man/math.3 index 47353298bb54..f98c5e1a2a75 100644 --- a/lib/msun/man/math.3 +++ b/lib/msun/man/math.3 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd December 7, 2017 +.Dd April 11, 2026 .Dt MATH 3 .Os .Sh NAME @@ -115,8 +115,14 @@ scalbn adjust exponent copysign copy sign bit fabs absolute value fdim positive difference -fmax maximum function -fmin minimum function +fmax maximum function (legacy) +fmaximum maximum function (prefers \*(Na) +fmaximum_mag maximum magnitude (prefers \*(Na) +fmaximum_num maximum function (avoids \*(Na) +fmin minimum function (legacy) +fminimum minimum function (prefers \*(Na) +fminimum_mag minimum magnitude (prefers \*(Na) +fminimum_num minimum function (avoids \*(Na) signbit extract sign bit .El .Ss Not a Number Functions From nobody Sat Apr 11 18:10:24 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4ftMCn4w0Qz6YshL for ; Sat, 11 Apr 2026 18:10:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ftMCn4Jwfz3WRK for ; Sat, 11 Apr 2026 18:10:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775931029; 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; bh=c0Ty2LZLgH/sCbvRw2M7wpgphQb+gjOxcyoRj1wNHZU=; b=tlYf5ekWSVIfFIItbLVntPANUWsEUHQPwg5XK/UKt44kqhJk6/13Twn8BWs1OfmIs0hwgZ V6sxhE+l+LpWtq5bK6DYvbgBF+yaYDyvLCCmHdlbvtGBvqebg3rVnP4wfyWujnxi+8/UnY w1crilTqzA7xrcSx7Jx90ef6XWi/u0uJYHZlt+TGOmq4z9ZZU61SFmDitlEG8KppWwffXx 9Nl09TqL6O42HFsad6xcgoEqyAYXguA4vWcbArwqE7BaJbNmyB6PC6cdccbCtDeTTF93Fc EIVdh3LqMCM5qLFM3MQDVqoMUSW8cGUqO53g+3YmId4GWJS+XVTC6nr32ivLKg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775931029; a=rsa-sha256; cv=none; b=SMEgPPhqZZMlC95LbnVjPOV3EI8am7P7C6UrXiAo8QEzOrV92dBEAlTHz5hmw6L60FFbkq dCjp6YesgBs7eVs77zWbCmvtiRx2Byj5S+6w16sMnOFFxHIl3NWK8fk+ppbn98VqIZxrvC geocpwfk0YC/q2tmZ93EOuNcMXvmq4l1iX6uLdrPuKceRQB3s1aqIk4PtUDFYZ1evWt+2B 2M9IPyGZGsqLlypxh/IyyHCkWawzho13j04fN5y3W1EI3HOLVoo68dQ9crB6uCpqTJcf+f sCvGx5HNujEik50U6557rcQY2bJColLhu/6b2O+qJtpgXK5TCZ974NhLUORozA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775931029; 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; bh=c0Ty2LZLgH/sCbvRw2M7wpgphQb+gjOxcyoRj1wNHZU=; b=kSVcvD3d72H/7u24I5fxbg7TrZshfXTuSMRoyPZOWkAq/xfbklHT4fF0vIfhvsPz3SkcOI HXNRJH8sXenPiTJ+Z1S30ZtkUm8vYfr9ig6V0EPt5hKVcBOeDY+sLopo0fb/xc5nQKsBmF vjWqyiIA8MrLA76MuCPIjriUWvAgU76u5CSORGHmJrin6WCcw5PR+6KjYQuvcPCU/wSUnW S7TVyz5brtucDkOlg09rxZDLAsbJrMGhIO/qbyVmHypf8NondKN7XtJNSA3llZ/YINZlJE nAyd1I3NOsXjHMqoOSGbgUPRkSZE7ODrakUVhfbnvNN0p6mWANdkasinUZW2Ug== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4ftMCn3128zhjQ for ; Sat, 11 Apr 2026 18:10:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 37ddd by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 11 Apr 2026 18:10:24 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: =?utf-8?Q?Jes=C3=BAs?= =?utf-8?Q?Bl=C3=A1zqu?=ez From: Robert Clausecker Subject: git: 4e30c12973c7 - main - lib/msun: Added fmaximum_mag and fmaximum_num families List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: fuz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4e30c12973c73539bef01be3870a90b6346141e8 Auto-Submitted: auto-generated Date: Sat, 11 Apr 2026 18:10:24 +0000 Message-Id: <69da8e90.37ddd.3f33e51@gitrepo.freebsd.org> The branch main has been updated by fuz: URL: https://cgit.FreeBSD.org/src/commit/?id=4e30c12973c73539bef01be3870a90b6346141e8 commit 4e30c12973c73539bef01be3870a90b6346141e8 Author: Jesús Blázquez AuthorDate: 2026-04-11 08:11:44 +0000 Commit: Robert Clausecker CommitDate: 2026-04-11 18:09:13 +0000 lib/msun: Added fmaximum_mag and fmaximum_num families Added support for the f{maximum,minimum}_{mag,num} families, the new C23 standard functions for maximum magnitude and number-preferring maximum. This includes modifying fmax.3, on top of D56230, to recommend the use of fmaximum_num and fminimum_num. Reviewed by: fuz, kargl MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D56236 --- lib/msun/Makefile | 16 ++++- lib/msun/Symbol.map | 12 ++++ lib/msun/man/fmax.3 | 9 ++- lib/msun/man/fmaximum.3 | 4 +- lib/msun/man/fmaximum_mag.3 | 102 ++++++++++++++++++++++++++++ lib/msun/man/fmaximum_num.3 | 113 ++++++++++++++++++++++++++++++++ lib/msun/src/math.h | 12 ++++ lib/msun/src/s_fmaximum_mag.c | 73 +++++++++++++++++++++ lib/msun/src/s_fmaximum_magf.c | 68 +++++++++++++++++++ lib/msun/src/s_fmaximum_magl.c | 62 ++++++++++++++++++ lib/msun/src/s_fmaximum_num.c | 74 +++++++++++++++++++++ lib/msun/src/s_fmaximum_numf.c | 70 ++++++++++++++++++++ lib/msun/src/s_fmaximum_numl.c | 63 ++++++++++++++++++ lib/msun/src/s_fminimum.c | 2 +- lib/msun/src/s_fminimum_mag.c | 74 +++++++++++++++++++++ lib/msun/src/s_fminimum_magf.c | 69 +++++++++++++++++++ lib/msun/src/s_fminimum_magl.c | 63 ++++++++++++++++++ lib/msun/src/s_fminimum_num.c | 76 +++++++++++++++++++++ lib/msun/src/s_fminimum_numf.c | 71 ++++++++++++++++++++ lib/msun/src/s_fminimum_numl.c | 65 ++++++++++++++++++ lib/msun/src/s_fminimumf.c | 2 +- lib/msun/src/s_fminimuml.c | 2 +- lib/msun/tests/fmaximum_fminimum_test.c | 78 +++++++++++++++++++++- 23 files changed, 1169 insertions(+), 11 deletions(-) diff --git a/lib/msun/Makefile b/lib/msun/Makefile index 4a0ff1ad92b6..d61f4e9a1659 100644 --- a/lib/msun/Makefile +++ b/lib/msun/Makefile @@ -76,7 +76,9 @@ COMMON_SRCS= b_tgamma.c \ s_finite.c s_finitef.c \ s_floor.c s_floorf.c s_fma.c s_fmaf.c \ s_fmax.c s_fmaxf.c s_fmaximum.c s_fmaximumf.c \ + s_fmaximum_mag.c s_fmaximum_magf.c s_fmaximum_num.c s_fmaximum_numf.c \ s_fmin.c s_fminf.c s_fminimum.c s_fminimumf.c \ + s_fminimum_mag.c s_fminimum_magf.c s_fminimum_num.c s_fminimum_numf.c \ s_frexp.c s_frexpf.c s_ilogb.c s_ilogbf.c \ s_ilogbl.c s_isfinite.c s_isnan.c s_isnormal.c \ s_llrint.c s_llrintf.c s_llround.c s_llroundf.c s_llroundl.c \ @@ -133,7 +135,8 @@ COMMON_SRCS+= b_tgammal.c catrigl.c \ s_asinhl.c s_atanl.c s_cbrtl.c s_ceill.c s_cexpl.c \ s_clogl.c s_cosl.c s_cospil.c s_cprojl.c \ s_csqrtl.c s_erfl.c s_exp2l.c s_expl.c s_floorl.c s_fmal.c \ - s_fmaxl.c s_fmaximuml.c s_fminl.c s_fminimuml.c \ + s_fmaxl.c s_fmaximuml.c s_fmaximum_magl.c s_fmaximum_numl.c \ + s_fminl.c s_fminimuml.c s_fminimum_magl.c s_fminimum_numl.c \ s_frexpl.c s_logbl.c s_logl.c s_nanl.c \ s_nextafterl.c s_nexttoward.c s_remquol.c s_rintl.c s_roundl.c \ s_scalbnl.c s_sinl.c s_sincosl.c s_sinpil.c \ @@ -179,7 +182,8 @@ MAN= acos.3 acosh.3 asin.3 asinh.3 atan.3 atan2.3 atanh.3 \ exp.3 fabs.3 fdim.3 \ feclearexcept.3 feenableexcept.3 fegetenv.3 \ fegetround.3 fenv.3 floor.3 fma.3 \ - fmax.3 fmaximum.3 fmod.3 hypot.3 ieee.3 ieee_test.3 ilogb.3 j0.3 \ + fmax.3 fmaximum.3 fmaximum_mag.3 fmaximum_num.3 fmod.3 \ + hypot.3 ieee.3 ieee_test.3 ilogb.3 j0.3 \ lgamma.3 log.3 lrint.3 lround.3 math.3 nan.3 \ nextafter.3 remainder.3 rint.3 \ round.3 scalbn.3 signbit.3 sin.3 sincos.3 \ @@ -232,9 +236,15 @@ MLINKS+=floor.3 floorf.3 floor.3 floorl.3 MLINKS+=fma.3 fmaf.3 fma.3 fmal.3 MLINKS+=fmax.3 fmaxf.3 fmax.3 fmaxl.3 \ fmax.3 fmin.3 fmax.3 fminf.3 fmax.3 fminl.3 -MLINKS+=fmaximum.3 fmaximuml.3 fmaximum.3 fmaximumf.3 \ +MLINKS+=fmaximum.3 fmaximumf.3 fmaximum.3 fmaximuml.3 \ fmaximum.3 fminimum.3 fmaximum.3 fminimumf.3 \ fmaximum.3 fminimuml.3 +MLINKS+=fmaximum_mag.3 fmaximum_magf.3 fmaximum_mag.3 fmaximum_magl.3 \ + fmaximum_mag.3 fminimum_mag.3 fmaximum_mag.3 fminimum_magf.3 \ + fmaximum_mag.3 fminimum_magl.3 +MLINKS+=fmaximum_num.3 fmaximum_numf.3 fmaximum_num.3 fmaximum_numl.3 \ + fmaximum_num.3 fminimum_num.3 fmaximum_num.3 fminimum_numf.3 \ + fmaximum_num.3 fminimum_numl.3 MLINKS+=fmod.3 fmodf.3 fmod.3 fmodl.3 MLINKS+=hypot.3 cabs.3 hypot.3 cabsf.3 hypot.3 cabsl.3 \ hypot.3 hypotf.3 hypot.3 hypotl.3 diff --git a/lib/msun/Symbol.map b/lib/msun/Symbol.map index 932cc000fe52..35addfcee3d5 100644 --- a/lib/msun/Symbol.map +++ b/lib/msun/Symbol.map @@ -326,4 +326,16 @@ FBSD_1.9 { fminimum; fminimumf; fminimuml; + fmaximum_mag; + fmaximum_magf; + fmaximum_magl; + fminimum_mag; + fminimum_magf; + fminimum_magl; + fmaximum_num; + fmaximum_numf; + fmaximum_numl; + fminimum_num; + fminimum_numf; + fminimum_numl; }; diff --git a/lib/msun/man/fmax.3 b/lib/msun/man/fmax.3 index 873a19375ce5..3b167a0b6f8d 100644 --- a/lib/msun/man/fmax.3 +++ b/lib/msun/man/fmax.3 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd April 6, 2026 +.Dd April 11, 2026 .Dt FMAX 3 .Os .Sh NAME @@ -93,6 +93,13 @@ as being larger than .Li -0.0 . This behavior is not specified by the C standard, is not portable, and may not occur in light of compiler optimizations. +Applications requiring specific handling of signed zeroes or +.No \*(Na +values are recommended to use +.Xr fmaximum_num 3 +and +.Xr fminimum_num 3 +instead, which have strictly defined behavior for these cases. .Sh HISTORY These routines first appeared in .Fx 5.3 . diff --git a/lib/msun/man/fmaximum.3 b/lib/msun/man/fmaximum.3 index bd301163a034..ef26c12268c0 100644 --- a/lib/msun/man/fmaximum.3 +++ b/lib/msun/man/fmaximum.3 @@ -83,9 +83,9 @@ or is an \*(Na, then the result is an \*(Na. These routines do not raise any floating-point exceptions. .Sh SEE ALSO -.Xr fabs 3 , -.Xr fdim 3 , .Xr fmax 3 , +.Xr fmaximum_num 3 , +.Xr fmaximum_mag 3 , .Xr math 3 .Sh STANDARDS The diff --git a/lib/msun/man/fmaximum_mag.3 b/lib/msun/man/fmaximum_mag.3 new file mode 100644 index 000000000000..f5e4c39f96ef --- /dev/null +++ b/lib/msun/man/fmaximum_mag.3 @@ -0,0 +1,102 @@ +.\" Copyright (c) 2004 David Schultz +.\" Copyright (c) 2026 Jesús Blázquez +.\" 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 3, 2026 +.Dt FMAXIMUM_MAG 3 +.Os +.Sh NAME +.Nm fmaximum_mag , +.Nm fmaximum_magf , +.Nm fmaximum_magl , +.Nm fminimum_mag , +.Nm fminimum_magf , +.Nm fminimum_magl +.Nd floating-point maximum and minimum magnitude functions +.Sh LIBRARY +.Lb libm +.Sh SYNOPSIS +.In math.h +.Ft double +.Fn fmaximum_mag "double x" "double y" +.Ft float +.Fn fmaximum_magf "float x" "float y" +.Ft "long double" +.Fn fmaximum_magl "long double x" "long double y" +.Ft double +.Fn fminimum_mag "double x" "double y" +.Ft float +.Fn fminimum_magf "float x" "float y" +.Ft "long double" +.Fn fminimum_magl "long double x" "long double y" +.Sh DESCRIPTION +The +.Fn fmaximum_mag , +.Fn fmaximum_magf , +and +.Fn fmaximum_magl +functions determine the larger of the absolute values of +.Fa x +and +.Fa y , +and return the argument with the larger absolute value. +If the absolute values are equal, the behavior is equivalent to calling the corresponding +.Fn fmaximum +function on the arguments. +.Pp +Likewise, the +.Fn fminimum_mag , +.Fn fminimum_magf , +and +.Fn fminimum_magl +functions determine the smaller of the absolute values of +.Fa x +and +.Fa y , +and return the argument with the smaller absolute value. +If the absolute values are equal, the behavior is equivalent to calling the corresponding +.Fn fminimum +function on the arguments. +.Pp +If either argument is an \*(Na, then the result is an \*(Na. +These routines do not raise any floating-point exceptions. +.Sh SEE ALSO +.Xr fmax 3 , +.Xr fmaximum 3 , +.Xr fmaximum_num 3 , +.Xr math 3 +.Sh STANDARDS +The +.Fn fmaximum_mag , +.Fn fmaximum_magf , +.Fn fmaximum_magl , +.Fn fminimum_mag , +.Fn fminimum_magf , +and +.Fn fminimum_magl +functions conform to +.St -isoC-2023 . +.Sh HISTORY +These routines first appeared in +.Fx 16.0 . diff --git a/lib/msun/man/fmaximum_num.3 b/lib/msun/man/fmaximum_num.3 new file mode 100644 index 000000000000..33fa759f0173 --- /dev/null +++ b/lib/msun/man/fmaximum_num.3 @@ -0,0 +1,113 @@ +.\" Copyright (c) 2004 David Schultz +.\" Copyright (c) 2026 Jesús Blázquez +.\" 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 3, 2026 +.Dt FMAXIMUM_NUM 3 +.Os +.Sh NAME +.Nm fmaximum_num , +.Nm fmaximum_numf , +.Nm fmaximum_numl , +.Nm fminimum_num , +.Nm fminimum_numf , +.Nm fminimum_numl +.Nd floating-point maximum and minimum number functions +.Sh LIBRARY +.Lb libm +.Sh SYNOPSIS +.In math.h +.Ft double +.Fn fmaximum_num "double x" "double y" +.Ft float +.Fn fmaximum_numf "float x" "float y" +.Ft "long double" +.Fn fmaximum_numl "long double x" "long double y" +.Ft double +.Fn fminimum_num "double x" "double y" +.Ft float +.Fn fminimum_numf "float x" "float y" +.Ft "long double" +.Fn fminimum_numl "long double x" "long double y" +.Sh DESCRIPTION +The +.Fn fmaximum_num , +.Fn fmaximum_numf , +and +.Fn fmaximum_numl +functions determine the larger of +.Fa x +and +.Fa y , +preferring a numeric value over an \*(Na. +If one argument is a numeric value and the other is an \*(Na, +the numeric value is returned. +If both arguments are numeric, the larger value is returned. +If both arguments are \*(Nas, a quiet \*(Na is returned. +For the purpose of these functions, positive zero is considered +greater than negative zero. +.Pp +Likewise, the +.Fn fminimum_num , +.Fn fminimum_numf , +and +.Fn fminimum_numl +functions determine the smaller of +.Fa x +and +.Fa y , +preferring a numeric value over an \*(Na. +If one argument is a numeric value and the other is an \*(Na, +the numeric value is returned. +If both arguments are numeric, the smaller value is returned. +If both arguments are \*(Nas, a quiet \*(Na is returned. +For the purpose of these functions, negative zero is considered +less than positive zero. +.Pp +Unlike with the +.Xr fmaximum 3 +and +.Xr fmaximum_mag 3 +families of functions, if either argument is a signaling \*(Na, +an invalid exception is raised. +Otherwise, these routines do not raise any floating-point exceptions. +.Sh SEE ALSO +.Xr fmax 3 , +.Xr fmaximum 3 , +.Xr fmaximum_mag 3 , +.Xr math 3 +.Sh STANDARDS +The +.Fn fmaximum_num , +.Fn fmaximum_numf , +.Fn fmaximum_numl , +.Fn fminimum_num , +.Fn fminimum_numf , +and +.Fn fminimum_numl +functions conform to +.St -isoC-2023 . +.Sh HISTORY +These routines first appeared in +.Fx 16.0 . diff --git a/lib/msun/src/math.h b/lib/msun/src/math.h index 103b82c1cdf8..853984953a91 100644 --- a/lib/msun/src/math.h +++ b/lib/msun/src/math.h @@ -526,6 +526,18 @@ long double fmaximuml(long double, long double); double fminimum(double, double); float fminimumf(float, float); long double fminimuml(long double, long double); +double fmaximum_mag(double, double); +float fmaximum_magf(float, float); +long double fmaximum_magl(long double, long double); +double fminimum_mag(double, double); +float fminimum_magf(float, float); +long double fminimum_magl(long double, long double); +double fmaximum_num(double, double); +float fmaximum_numf(float, float); +long double fmaximum_numl(long double, long double); +double fminimum_num(double, double); +float fminimum_numf(float, float); +long double fminimum_numl(long double, long double); #endif /* __ISO_C_VISIBLE >= 2023 */ __END_DECLS diff --git a/lib/msun/src/s_fmaximum_mag.c b/lib/msun/src/s_fmaximum_mag.c new file mode 100644 index 000000000000..1b1250f4c36e --- /dev/null +++ b/lib/msun/src/s_fmaximum_mag.c @@ -0,0 +1,73 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2004 David Schultz + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +#include + +#include "fpmath.h" + +#ifdef USE_BUILTIN_FMAXIMUM_MAG +double +fmaximum_mag(double x, double y) +{ + return (__builtin_fmaximum_mag(x, y)); +} +#else +double +fmaximum_mag(double x, double y) +{ + union IEEEd2bits u[2]; + + u[0].d = x; + u[1].d = y; + + /* Handle NaN according to ISO/IEC 60559. NaN argument -> NaN return */ + if ((u[0].bits.exp == 2047 && (u[0].bits.manh | u[0].bits.manl) != 0) || + (u[1].bits.exp == 2047 && (u[1].bits.manh | u[1].bits.manl) != 0)) + return (NAN); + + double ax = fabs(x); + double ay = fabs(y); + + if (ay > ax) + return (y); + if (ax > ay) + return (x); + + /* If magnitudes are equal, we break the tie with the sign */ + if (u[0].bits.sign != u[1].bits.sign) + return (u[u[0].bits.sign].d); + + return (x); +} +#endif + +#if (LDBL_MANT_DIG == 53) +__weak_reference(fmaximum_mag, fmaximum_magl); +#endif + diff --git a/lib/msun/src/s_fmaximum_magf.c b/lib/msun/src/s_fmaximum_magf.c new file mode 100644 index 000000000000..6193b9184970 --- /dev/null +++ b/lib/msun/src/s_fmaximum_magf.c @@ -0,0 +1,68 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2004 David Schultz + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include + +#include "fpmath.h" + +#ifdef USE_BUILTIN_FMAXIMUM_MAGF +float +fmaximum_magf(float x, float y) +{ + return (__builtin_fmaximum_magf(x, y)); +} +#else +float +fmaximum_magf(float x, float y) +{ + union IEEEf2bits u[2]; + + u[0].f = x; + u[1].f = y; + + /* Handle NaN according to ISO/IEC 60559. NaN argument -> NaN return */ + if ((u[0].bits.exp == 255 && u[0].bits.man != 0) || + (u[1].bits.exp == 255 && u[1].bits.man != 0)) + return (NAN); + + float ax = fabsf(x); + float ay = fabsf(y); + + if (ay > ax) + return (y); + if (ax > ay) + return (x); + + /* If magnitudes are equal, we break the tie with the sign */ + if (u[0].bits.sign != u[1].bits.sign) + return (u[u[0].bits.sign].f); + + return (x); +} +#endif + diff --git a/lib/msun/src/s_fmaximum_magl.c b/lib/msun/src/s_fmaximum_magl.c new file mode 100644 index 000000000000..f2426b050d33 --- /dev/null +++ b/lib/msun/src/s_fmaximum_magl.c @@ -0,0 +1,62 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2004 David Schultz + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include + +#include "fpmath.h" + +long double +fmaximum_magl(long double x, long double y) +{ + union IEEEl2bits u[2]; + + u[0].e = x; + mask_nbit_l(u[0]); + u[1].e = y; + mask_nbit_l(u[1]); + + /* Handle NaN according to ISO/IEC 60559. NaN argument -> NaN return */ + if ((u[0].bits.exp == 32767 && (u[0].bits.manh | u[0].bits.manl) != 0) || + (u[1].bits.exp == 32767 && (u[1].bits.manh | u[1].bits.manl) != 0)) + return (NAN); + + long double ax = fabsl(x); + long double ay = fabsl(y); + + if (ay > ax) + return (y); + if (ax > ay) + return (x); + + /* If magnitudes are equal, we break the tie with the sign */ + if (u[0].bits.sign != u[1].bits.sign) + return (u[0].bits.sign ? y : x); + + return (x); +} + diff --git a/lib/msun/src/s_fmaximum_num.c b/lib/msun/src/s_fmaximum_num.c new file mode 100644 index 000000000000..cf16c76f89b9 --- /dev/null +++ b/lib/msun/src/s_fmaximum_num.c @@ -0,0 +1,74 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2004 David Schultz + * Copyright (c) 2026 Jesús Blázquez + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +#include +#include + +#include "fpmath.h" + +#ifdef USE_BUILTIN_FMAXIMUM_NUM +double +fmaximum_num(double x, double y) +{ + return (__builtin_fmaximum_num(x, y)); +} +#else +double +fmaximum_num(double x, double y) +{ + union IEEEd2bits u[2]; + bool nan_x, nan_y; + + u[0].d = x; + u[1].d = y; + + nan_x = u[0].bits.exp == 2047 && (u[0].bits.manh | u[0].bits.manl) != 0; + nan_y = u[1].bits.exp == 2047 && (u[1].bits.manh | u[1].bits.manl) != 0; + + if (nan_x || nan_y) { + /* These ternary conditionals force (x+y), so that sNaN's raise exceptions */ + if (nan_x && nan_y) + return (x + y); + if (nan_x) + return ((x + y) != 0.0 ? y : y); + return ((x + y) != 0.0 ? x : x); + } + + /* Handle comparisons of signed zeroes. */ + if (u[0].bits.sign != u[1].bits.sign) + return (u[u[0].bits.sign].d); + + return (x > y ? x : y); +} +#endif + +#if (LDBL_MANT_DIG == 53) +__weak_reference(fmaximum_num, fmaximum_numl); +#endif diff --git a/lib/msun/src/s_fmaximum_numf.c b/lib/msun/src/s_fmaximum_numf.c new file mode 100644 index 000000000000..c30179e47f9e --- /dev/null +++ b/lib/msun/src/s_fmaximum_numf.c @@ -0,0 +1,70 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2004 David Schultz + * Copyright (c) 2026 Jesús Blázquez + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +#include + +#include "fpmath.h" + +#ifdef USE_BUILTIN_FMAXIMUM_NUMF +float +fmaximum_numf(float x, float y) +{ + return (__builtin_fmaximum_numf(x, y)); +} +#else +float +fmaximum_numf(float x, float y) +{ + union IEEEf2bits u[2]; + bool nan_x, nan_y; + + u[0].f = x; + u[1].f = y; + + nan_x = u[0].bits.exp == 255 && u[0].bits.man != 0; + nan_y = u[1].bits.exp == 255 && u[1].bits.man != 0; + + if (nan_x || nan_y) { + /* These ternary conditionals force (x+y), so that sNaN's raise exceptions */ + if (nan_x && nan_y) + return (x + y); + if (nan_x) + return ((x + y) != 0.0 ? y : y); + return ((x + y) != 0.0 ? x : x); + } + + /* Handle comparisons of signed zeroes. */ + if (u[0].bits.sign != u[1].bits.sign) + return (u[u[0].bits.sign].f); + + return (x > y ? x : y); +} +#endif + diff --git a/lib/msun/src/s_fmaximum_numl.c b/lib/msun/src/s_fmaximum_numl.c new file mode 100644 index 000000000000..2291d01ca4f4 --- /dev/null +++ b/lib/msun/src/s_fmaximum_numl.c @@ -0,0 +1,63 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2004 David Schultz + * Copyright (c) 2026 Jesús Blázquez + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +#include + +#include "fpmath.h" + +long double +fmaximum_numl(long double x, long double y) +{ + union IEEEl2bits u[2]; + bool nan_x, nan_y; + + u[0].e = x; + mask_nbit_l(u[0]); + u[1].e = y; + mask_nbit_l(u[1]); + + nan_x = u[0].bits.exp == 32767 && (u[0].bits.manh | u[0].bits.manl) != 0; + nan_y = u[1].bits.exp == 32767 && (u[1].bits.manh | u[1].bits.manl) != 0; + + if (nan_x || nan_y) { + /* These ternary conditionals force (x+y), so that sNaN's raise exceptions */ + if (nan_x && nan_y) + return (x + y); + if (nan_x) + return ((x + y) != 0.0 ? y : y); + return ((x + y) != 0.0 ? x : x); + } + + /* Handle comparisons of signed zeroes. */ + if (u[0].bits.sign != u[1].bits.sign) + return (u[0].bits.sign ? y : x); + + return (x > y ? x : y); +} diff --git a/lib/msun/src/s_fminimum.c b/lib/msun/src/s_fminimum.c index 64c81b560626..fa3fd17fe241 100644 --- a/lib/msun/src/s_fminimum.c +++ b/lib/msun/src/s_fminimum.c @@ -47,7 +47,7 @@ fminimum(double x, double y) u[0].d = x; u[1].d = y; - /* Check for NaNs to avoid raising spurious exceptions. */ + /* Handle NaN according to ISO/IEC 60559. NaN argument -> NaN return */ if (u[0].bits.exp == 2047 && (u[0].bits.manh | u[0].bits.manl) != 0 || u[1].bits.exp == 2047 && (u[1].bits.manh | u[1].bits.manl) != 0) return (NAN); diff --git a/lib/msun/src/s_fminimum_mag.c b/lib/msun/src/s_fminimum_mag.c new file mode 100644 index 000000000000..cd21fb948a8e --- /dev/null +++ b/lib/msun/src/s_fminimum_mag.c @@ -0,0 +1,74 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2004 David Schultz + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +#include + +#include "fpmath.h" + +#ifdef USE_BUILTIN_FMINIMUM_MAG +double +fminimum_mag(double x, double y) +{ + return (__builtin_fminimum_mag(x, y)); +} +#else +double +fminimum_mag(double x, double y) +{ + union IEEEd2bits u[2]; + + u[0].d = x; + u[1].d = y; + + /* Handle NaN according to ISO/IEC 60559. NaN argument -> NaN return */ + if (u[0].bits.exp == 2047 && (u[0].bits.manh | u[0].bits.manl) != 0 || + u[1].bits.exp == 2047 && (u[1].bits.manh | u[1].bits.manl) != 0) + return (NAN); + + double ax = fabs(x); + double ay = fabs(y); + + if (ay < ax) + return (y); + if (ax < ay) + return (x); + + /* If magnitudes are equal, we break the tie with the sign */ + if (u[0].bits.sign != u[1].bits.sign) + return (u[u[1].bits.sign].d); + + return (x); +} +#endif + +#if (LDBL_MANT_DIG == 53) +__weak_reference(fminimum_mag, fminimum_magl); +#endif + + diff --git a/lib/msun/src/s_fminimum_magf.c b/lib/msun/src/s_fminimum_magf.c new file mode 100644 index 000000000000..9c04859184ea --- /dev/null +++ b/lib/msun/src/s_fminimum_magf.c @@ -0,0 +1,69 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2004 David Schultz + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include + *** 494 LINES SKIPPED *** From nobody Sat Apr 11 18:24:56 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4ftMXY69qtz6YvCk for ; Sat, 11 Apr 2026 18:25: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ftMXY5YWDz3YZD for ; Sat, 11 Apr 2026 18:25:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775931901; h=from:from:reply-to:subject:subject: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/mHCRz8TPlwy7tPuAmGUNsyMf8AVFZBUlZVs1J+UyY=; b=DvQeQrdpgrpZTNeme49pUdnlk0XIqDO3PZxuWX6T5Pguo3zRZSVB3NeL28+7htXd/K6jO1 3kUqOrS85ueVpz+NhOn66x11T21WRkSzMyScvPeCXwoeN29bKYdLHrkM0EJoSZ9hTZh46A mgiOu6nLJ77jSXLBslMmHTs7fEwulttz9SGfyYFZoYXMJqg66y6FPvaSF6NZOwSpco3pdG YdM4XQivqPAnLOOrTB6sqzhnP//9fnIqrsDgnZf5kXZ+V0OhpyCi9OHIVTs/YwjbKCEYYq ZXOs8CT1W9l4o31ZemwzZq7m7C5e+u4xxcHhYFt7t1FFHuVyf5RwlRda2A7rjw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775931901; a=rsa-sha256; cv=none; b=u0C9alQeKZutyzIigmjmM+DOT7sTOulZUVJ4RtMA9zXm20wob7TNSlk6NT2DUvwQTc+FUr mgBZ3qwplERGuXt382Wr450YO51UPCgE3gT2Tybt5BqgE92U6JkFVUTcc6v+8FBGZFskI7 qxuOETmMWJQXAG+RJ7ZA2KaM2lVIwt87PNt3iSagOKARI1wEgEvw0pJR+fN8Xh9eCSDwYH aTDIWrcjiwDDSi/z7wCzUAALLYbfQbkz7tLH+s5lc5xgPDD+kf8Coh99Iq0GlrDVVnXvQ5 dSB1NaMwvyfWHpxL4fRXx5pjLwP7C0IHEkL+DHIL4UkHCIiegj0Dm6/BWTl93A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775931901; h=from:from:reply-to:subject:subject: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/mHCRz8TPlwy7tPuAmGUNsyMf8AVFZBUlZVs1J+UyY=; b=a42rtzNECV5YAunChwdsoDjlhh+qZz0U+dVWC5mU3eV7BgMat9K2YFeB7lfMziXpU6Gw1b DjUqzoN64T6o2MEj1PYvVWjTMZeyQt84aLb3Y87eyocwCQdiAn8ME1n4JeS8hEDDbez5dC xgI6uSKHOP6QbMdYltALFbWrJ2hG/4/BiO/RUy7nwfr0ZsflpwOuuJTS6YbO9l8FtTz5QU bQKHrIx4A9XMfFv0jdYfiGmY8aYCYZmgmsaSAE7WjNjDtj4YJFAK+DGkKRowVkKe0F0TP+ 7Vv0P86FTxA6WSy5TtPPJKICBIONTYpqKELKoIPj/+tTMREW/W1QLtF+jhTy5g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4ftMXY50jfzjLh for ; Sat, 11 Apr 2026 18:25:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3793d by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 11 Apr 2026 18:24:56 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Osipov Subject: git: 4f684e929de1 - main - loader.efi.8/efibootmgr.8: Don't use contradicting term 'EFI BIOS' List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: michaelo X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4f684e929de1275b1099b17b2a2cff0d3f4af223 Auto-Submitted: auto-generated Date: Sat, 11 Apr 2026 18:24:56 +0000 Message-Id: <69da91f8.3793d.5353ddee@gitrepo.freebsd.org> The branch main has been updated by michaelo: URL: https://cgit.FreeBSD.org/src/commit/?id=4f684e929de1275b1099b17b2a2cff0d3f4af223 commit 4f684e929de1275b1099b17b2a2cff0d3f4af223 Author: Michael Osipov AuthorDate: 2026-04-09 11:39:41 +0000 Commit: Michael Osipov CommitDate: 2026-04-11 18:24:43 +0000 loader.efi.8/efibootmgr.8: Don't use contradicting term 'EFI BIOS' Both (U)EFI and BIOS are completely different things, be precise and don't use them together. Reviewed by: imp MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D56329 --- stand/efi/loader/main.c | 8 ++++---- stand/man/loader.efi.8 | 12 ++++++------ usr.sbin/efibootmgr/efibootmgr.8 | 4 ++-- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/stand/efi/loader/main.c b/stand/efi/loader/main.c index e54f3e1f9f35..9604f16a2480 100644 --- a/stand/efi/loader/main.c +++ b/stand/efi/loader/main.c @@ -1007,10 +1007,10 @@ parse_uefi_con_out(void) * If we don't have any Con* variable use both. If we have GOP * make video primary, otherwise set serial primary. In either * case, try to use both the 'efi' console which will use the - * GOP, if present and serial. If there's an EFI BIOS that omits - * this, but has a serial port redirect, we'll unavioidably get - * doubled characters, but we'll be right in all the other more - * common cases. + * GOP, if present and serial. If there's a UEFI firmware that + * omit this, but has a serial port redirect, we'll unavoidably + * get doubled characters, but we'll be right in all the other + * more common cases. */ if (efi_has_gop()) how |= RB_MULTIPLE; diff --git a/stand/man/loader.efi.8 b/stand/man/loader.efi.8 index 80d16d45670a..8bb88dd2e24f 100644 --- a/stand/man/loader.efi.8 +++ b/stand/man/loader.efi.8 @@ -30,7 +30,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd September 3, 2024 +.Dd April 11, 2026 .Dt LOADER.EFI 8 .Os .Sh NAME @@ -64,7 +64,7 @@ process. .Xr boot1.efi 8 is deprecated for new installations. .Ss Console Considerations -The EFI BIOS provides a generic console. +The UEFI firmware provides a generic console. In .Nm this is selected by specifying @@ -114,8 +114,8 @@ primary if a UEFI graphics device is detected, or the serial console as primary if not. .Pp On x86 platforms, if you wish to redirect the loader's output to a serial port -when the EFI BIOS doesn't support it, or to a serial port that isn't the one the -EFI BIOS redirects its output to, set +when the UEFI firmware doesn't support it, or to a serial port that isn't the +one the UEFI firmware redirects its output to, set .Dv console to .Dq comconsole . @@ -135,9 +135,9 @@ If this causes a doubling of characters, set .Dv console to .Dq efi , -since your EFI BIOS is redirecting to the serial port already. +since your UEFI firmware is redirecting to the serial port already. .Pp -If your EFI BIOS redirects the serial port, you may need to tell the kernel +If your UEFI firmware redirects the serial port, you may need to tell the kernel which address to use. EFI uses ACPI's UID to identify the serial port, but .Nm diff --git a/usr.sbin/efibootmgr/efibootmgr.8 b/usr.sbin/efibootmgr/efibootmgr.8 index e5054023e40c..62ca0d6da3b2 100644 --- a/usr.sbin/efibootmgr/efibootmgr.8 +++ b/usr.sbin/efibootmgr/efibootmgr.8 @@ -24,7 +24,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd September 22, 2024 +.Dd April 11, 2026 .Dt EFIBOOTMGR 8 .Os .Sh NAME @@ -84,7 +84,7 @@ boot method to be tried once upon the next boot. The UEFI standard defines how hosts may control what is used to bootstrap the system. Each method is encapsulated within a persistent UEFI variable, -stored by the UEFI BIOS of the form +stored by the UEFI firmware of the form .Cm Boot Ns Em XXXX (where XXXX are uppercase hexadecimal digits). These variables are numbered, each describing where to load the bootstrap From nobody Sat Apr 11 18:28:44 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4ftMcr33jmz6YvbL for ; Sat, 11 Apr 2026 18:28: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ftMcr2Xh3z3Ykj for ; Sat, 11 Apr 2026 18:28:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775932124; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1dBlctsq12x7KkkvBrrxNuVUkH+fMO89kRaAFqub424=; b=o5S6+gRaErNb5i7qCdgxSw5dexFPQtvRrtjytlbLtlJpVplS+8zzZMi8MzNp6nRDpQ/X8+ VapAlpHhkg+BGek36P7cuqTPPepzvjFPh0qlp7+wMwGWk6d+E/a8CWwRN1F7tWZqU4GfO7 kuiG/G5akcLiggge5azgMGBHMJM1q15Kowf0EkZTQtIzxJbAy/IaICsus/43zsUxOVW9pn 0ih5MfkOhue7Q9CxeRIIPeI+cfkGUmmI5fXD1MhAbpK6sJ8YQCf56QVugrg3zZsTsbOeu1 D2tk1+16JLS9Yv6e83NVQWWhMkCEE2fuu/Z1/hVj09zkEKTfIvnwt7RYp5l36w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775932124; a=rsa-sha256; cv=none; b=o/krOpRC2qvTs9YEQt0wcyuj+IjeCHar32PGKxCdyMzSE+dpPAGDNsLUE656r/7HzwQGVZ 5Ab7xzpNwrLb6vFA1RNevPcxBvCwtGsL6bfk+9EsPPAdZudGfZN9J1CxQR41BIjM+iiTPB ZRhWIA3AxPSwhQ0BGhzVX/mTZUmh8Q99aMjEf7SrMSQQjZg+PpeE/Z7c1lYfsw+B8tZ9RJ jcL663qDuf+4oom0+X/KDT1rh+U3IAiRDXmUVfkWlE1ym448zubpM009xvLAAcFIh7a8Yu bfllMvTK923WtdZ+u3Zjhu2rERm/JCtLLq7S9Lv5LRdyTHIz7dB6qX9AA+SGLQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775932124; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1dBlctsq12x7KkkvBrrxNuVUkH+fMO89kRaAFqub424=; b=qW9aI2T4SxQSn0gpEqTSWDgx4YXJ2027FHva0QDwcDDVAWHwhP/+cqXj3CUircIynVEHsg uvXKfGfWrbXPd3FYG45w1WyMyJhVn8+mmgea1Uo8gn0zHIQOQNBQ2IKvjwFIXDDfSaXmCY jdv4cvlaZPiiqK/m3SDD63BTaPFyE60B5Wvmi9KPbgr4KKwDmeRVUupLpsVWTSyxB9eMnl eSHgMhUW2bcWy+ir/7tqDzaeXIJwFyQWJOUJsPYalcG9H4xSvek3/+ImHae1R2G8NbnB5f OpFqMGb1HwK/YIO9gWevFToJL7mffXJ4MhPmqD8frFrjFOB4KJTnh8RWO5f7EA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4ftMcr27XWzj55 for ; Sat, 11 Apr 2026 18:28:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 390d4 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 11 Apr 2026 18:28:44 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Osipov Subject: git: 850eb149e7ab - main - mfiutil(4)/mrsasutil(4): "show drives" truncates information List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: michaelo X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 850eb149e7ab0733fcf9469a607dca223ff467ad Auto-Submitted: auto-generated Date: Sat, 11 Apr 2026 18:28:44 +0000 Message-Id: <69da92dc.390d4.e50e9af@gitrepo.freebsd.org> The branch main has been updated by michaelo: URL: https://cgit.FreeBSD.org/src/commit/?id=850eb149e7ab0733fcf9469a607dca223ff467ad commit 850eb149e7ab0733fcf9469a607dca223ff467ad Author: Michael Osipov AuthorDate: 2026-04-09 09:19:36 +0000 Commit: Michael Osipov CommitDate: 2026-04-11 18:28:03 +0000 mfiutil(4)/mrsasutil(4): "show drives" truncates information Improve mfi_pd_inq_string() by * Reusing buffer sizes from cam/cam.h according to SCSI specification + NULL byte * Don't truncate vendor-specific information by escaping into a too small buffer * Use cam_strvis() from libcam instead of old, outdated local copy * Recaculate size of inq_string based on the reused buffer sizes and format statements PR: 294354 Reviewed by: imp MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D56328 --- usr.sbin/mfiutil/Makefile | 2 +- usr.sbin/mfiutil/mfi_drive.c | 59 +++++++++----------------------------------- 2 files changed, 13 insertions(+), 48 deletions(-) diff --git a/usr.sbin/mfiutil/Makefile b/usr.sbin/mfiutil/Makefile index 49c0e688e8e2..d7ccb1f2d9c1 100644 --- a/usr.sbin/mfiutil/Makefile +++ b/usr.sbin/mfiutil/Makefile @@ -9,7 +9,7 @@ MLINKS= mfiutil.8 mrsasutil.8 CFLAGS.gcc+= -fno-builtin-strftime -LIBADD= sbuf util +LIBADD= cam sbuf util # Here be dragons .ifdef DEBUG diff --git a/usr.sbin/mfiutil/mfi_drive.c b/usr.sbin/mfiutil/mfi_drive.c index c7c5aeb02f14..88d24623ae27 100644 --- a/usr.sbin/mfiutil/mfi_drive.c +++ b/usr.sbin/mfiutil/mfi_drive.c @@ -42,6 +42,7 @@ #include #include #include +#include #include #include "mfiutil.h" @@ -279,50 +280,14 @@ mfi_pd_get_info(int fd, uint16_t device_id, struct mfi_pd_info *info, sizeof(struct mfi_pd_info), mbox, 2, statusp)); } -static void -cam_strvis(char *dst, const char *src, int srclen, int dstlen) -{ - - /* Trim leading/trailing spaces, nulls. */ - while (srclen > 0 && src[0] == ' ') - src++, srclen--; - while (srclen > 0 - && (src[srclen-1] == ' ' || src[srclen-1] == '\0')) - srclen--; - - while (srclen > 0 && dstlen > 1) { - char *cur_pos = dst; - - if (*src < 0x20) { - /* SCSI-II Specifies that these should never occur. */ - /* non-printable character */ - if (dstlen > 4) { - *cur_pos++ = '\\'; - *cur_pos++ = ((*src & 0300) >> 6) + '0'; - *cur_pos++ = ((*src & 0070) >> 3) + '0'; - *cur_pos++ = ((*src & 0007) >> 0) + '0'; - } else { - *cur_pos++ = '?'; - } - } else { - /* normal character */ - *cur_pos++ = *src; - } - src++; - srclen--; - dstlen -= cur_pos - dst; - dst = cur_pos; - } - *dst = '\0'; -} - /* Borrowed heavily from scsi_all.c:scsi_print_inquiry(). */ const char * mfi_pd_inq_string(struct mfi_pd_info *info) { struct scsi_inquiry_data iqd, *inq_data = &iqd; - char vendor[16], product[48], revision[16], rstr[12], serial[SID_VENDOR_SPECIFIC_0_SIZE]; - static char inq_string[64]; + char vendor[SID_VENDOR_SIZE+1], product[SID_PRODUCT_SIZE+1], + revision[SID_REVISION_SIZE+1], rstr[9], serial[SID_VENDOR_SPECIFIC_0_SIZE+1]; + static char inq_string[80]; memcpy(inq_data, info->inquiry_data, (sizeof (iqd) < sizeof (info->inquiry_data))? @@ -334,14 +299,14 @@ mfi_pd_inq_string(struct mfi_pd_info *info) if (SID_QUAL(inq_data) != SID_QUAL_LU_CONNECTED) return (NULL); - cam_strvis(vendor, inq_data->vendor, sizeof(inq_data->vendor), - sizeof(vendor)); - cam_strvis(product, inq_data->product, sizeof(inq_data->product), - sizeof(product)); - cam_strvis(revision, inq_data->revision, sizeof(inq_data->revision), - sizeof(revision)); - cam_strvis(serial, (char *)inq_data->vendor_specific0, sizeof(inq_data->vendor_specific0), - sizeof(serial)); + cam_strvis_flag(vendor, inq_data->vendor, sizeof(inq_data->vendor), + sizeof(vendor), CAM_STRVIS_FLAG_NONASCII_TRIM); + cam_strvis_flag(product, inq_data->product, sizeof(inq_data->product), + sizeof(product), CAM_STRVIS_FLAG_NONASCII_TRIM); + cam_strvis_flag(revision, inq_data->revision, sizeof(inq_data->revision), + sizeof(revision), CAM_STRVIS_FLAG_NONASCII_TRIM); + cam_strvis_flag(serial, (char *)inq_data->vendor_specific0, sizeof(inq_data->vendor_specific0), + sizeof(serial), CAM_STRVIS_FLAG_NONASCII_SPC); /* Hack for SATA disks, no idea how to tell speed. */ if (strcmp(vendor, "ATA") == 0) { From nobody Sat Apr 11 19:23:20 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4ftNqr2H7cz6Yyvd for ; Sat, 11 Apr 2026 19:23:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ftNqr1ZHyz3j6V for ; Sat, 11 Apr 2026 19:23:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775935400; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pmCCosx0p3y/Bz4FeqocJUisZzeHS/HgNGyawpYFRcc=; b=wPVGLNlgk0xPSx06y86iecHx3sW3jv9aq+aU12XgLEJOKTM3LOsna8uSLnIQgwuYC7ac1K hWXbVVL+qqcztOAZn1Wegm7q6SaOWXWY4h3SK93EgBdc7avvqPotouqlbJVMuxGCWiz70S Hhzr2rQQ/lfviSzkNqdPZIhcUu3Eg4D6H5VmOUqf7AH9DvBoBnrR3N6cRk7AQKtblRzjSq wctNNTbo0YMKIaMkKXf46+7jBA/aPiUWqQgGtYlfs8HEXKckeak+FnbGOTvcju1KKDVSsm 8ggaHgjMOSqWxoaMdxkNpxI1f6gcqMkcMiXlVljgMr/PuY8vnU9u61CSfJN0/A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775935400; a=rsa-sha256; cv=none; b=ntqaSvlDP52rZFUvurm8mizv1XGsGu/zuXrTH6RaEd0gJqvDy3t6pY5e7TnLfDc+5XTq28 /Ewdtx6YBBZlavlubS97JTQ0y4uFyFQBxDCY9HCDTy6o873WHzhHr8JJgNPSmNROzniUbG VV+5SyzJWGkzCmNQEn7qe1eH1gPX3OdOng817OcMRVhIp+16IJo0oli7x39F2GYej82bYa 0kvMPCpkt2NWkJQWmWDFOgRA9mQVaPpOSDZq7FImolTLEX3eU3+6+XC6b/hew9GCSA6quJ FKO3GvhDkAwVNDe7THIuy6F9VewXy+Xuv3S3IgUHS3oy+c9yAgjPE+FfOKYN6A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775935400; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pmCCosx0p3y/Bz4FeqocJUisZzeHS/HgNGyawpYFRcc=; b=UEx/LqjbOuE6i50FYudCruL0zsaDnSTX6k4KcwOBzw5Rtab/Q8LIEEedzwH0Fj2OVM9ZJ+ bbpbBcTxTOoQchwEJHj29Hc1bCySA5QiBuPM025rjthqNpopaQl/wMi/1AzD91KcAgxHFU OmXJLqABEuZLohWtZihx/lMqkr9u7YXKf0ZQOoCSNs3d2tpaqv9ldF9C5SWwfc8yR0xpyb GkWMBLNkpnNDMDaAD3q9+sgPbKXUVX1bYCZo7uPu1TTuCCnktvqmTlmz4iXf2ku0c8fpEO JsE9AVJ5XXP4NFzannwyTb9lgKR04UQcJFqXunjcImvsUqhCwZeAhnrAmAbifQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4ftNqr16ZXzl1W for ; Sat, 11 Apr 2026 19:23:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3eb8f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 11 Apr 2026 19:23:20 +0000 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=B8rg?=rav Subject: git: 9d95d806691e - main - tunefs: Fix pointer arithmetic List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: 9d95d806691e4ef1411c6c3b892d8b774754d724 Auto-Submitted: auto-generated Date: Sat, 11 Apr 2026 19:23:20 +0000 Message-Id: <69da9fa8.3eb8f.376568e5@gitrepo.freebsd.org> The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=9d95d806691e4ef1411c6c3b892d8b774754d724 commit 9d95d806691e4ef1411c6c3b892d8b774754d724 Author: Dag-Erling Smørgrav AuthorDate: 2026-04-11 19:23:08 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-04-11 19:23:08 +0000 tunefs: Fix pointer arithmetic While here, remove a bogus const which has been there for years. MFC after: 1 week Reported by: ivy@ Fixes: 1b83e8a3f840 ("Constify string pointers.") Fixes: 8244dd326265 ("tunefs: Better fix for arm64 alignment issues") Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D56343 --- sbin/tunefs/tunefs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sbin/tunefs/tunefs.c b/sbin/tunefs/tunefs.c index 56160dafce28..f3e9306f8ca1 100644 --- a/sbin/tunefs/tunefs.c +++ b/sbin/tunefs/tunefs.c @@ -708,13 +708,13 @@ journal_findfile(void) } static void -dir_clear_block(const dirblock *block, off_t off) +dir_clear_block(dirblock *block, off_t off) { struct direct *dp; for (; off < sblock.fs_bsize; off += DIRBLKSIZ) { assert(off % alignof(struct direct) == 0); - dp = (struct direct *)(uintptr_t)(block + off); + dp = (struct direct *)(uintptr_t)(block->buf + off); dp->d_ino = 0; dp->d_reclen = DIRBLKSIZ; dp->d_type = DT_UNKNOWN; From nobody Sat Apr 11 19:38:33 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4ftP9Q19xlz6Z10r for ; Sat, 11 Apr 2026 19:38:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ftP9Q0Rthz3l27 for ; Sat, 11 Apr 2026 19:38:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775936314; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yJHWC22C2fPTNjtBjBKhK/OW77oELeMKiN10EFWfDeI=; b=WOOMu9frZ1fYceijvOlJsRvuoqSLW70apmL7v/aIuS0RU6emF4Gy2JSwOyDEtkbQ08q8YJ AuOfrVyRFvNorQv0df3hRUFCGsmPsND9Fua0kms/TRHt8UEHdqGEMt9A3G76f03QCxk7KT UM0tAEFoE0z4S3NW/1sykhcIQDn5oizdOFsB0bWbasdbzpxHnjPt8qDM3Vdc4/PA6WqK7I FT0/muhxNOSE7dz+vUhDW/1vvzUAIniNPK9j8QRSbqngQSoniT1F0rb6l6ybbXuzpV/m4w Za7TtOO3tUi9J++RN94EbH1Bckzge9Kbk1EUaHhkxKrFZfMr87RXCrmBDy9MVQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775936314; a=rsa-sha256; cv=none; b=v5ny7KAyMXEMAedGzLuhIGfiHgdn++jdUJAhHKwKsVeyAZ3jn2PGGGsNKu5h++8IKa05zr EvEm8nFGDEpnO9QaMZQdB539eshzngJjA3InYsYCqdDJB1NPttgoWXJu7VA3n/DmLmddZZ pXOuyet4PvpKSX3cHOYprj75sHZ0/bylbKgwFAU5+iqcOwQeTwApXwHVldWoqdVcxQw+QO X55OWTFAbhLvxlYLr4H4hHc7/NaHy1Re/GhPA1qUGPpVPz4R65r7zTXfBnQNCypJpdkjZL cFpp4bBO1qDNyfdUia+ohHmFROi9oVIZHUTXogJbRzZ6Drz60Oo0EGCkFeJtSQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775936314; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yJHWC22C2fPTNjtBjBKhK/OW77oELeMKiN10EFWfDeI=; b=e9KhBuTejgJ7B1S/z9VJUdskX7YND+wIifNhqNER9cPzs7pJ6duk3qArO9/qYFqaQbcLSj EP0Y1ta0g3tLm35JeOSyjBkmrVxWR+mUK5R7MEAjnnxLPgC/rRgpbEzGQ7lM4so4wCwcvC nyIQ/FARdHfDXk20sZArKndVJrldi0kbSlK0PF0A/G/7OekEKiZNdGQaoWTb0R1o/CgXhM Bw3bjTn8lI3gaXBRFeSpeJO0XbPEJuiizdIPpj+uecj2j5rhPbCYMJnmUfRHoy0RhibSYh 5YwsbxrpaUwsn5/MejW7DTX98ZlHZ8jdm4RkfBkRs4q7kABeGeO0UbBe6v2jsA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4ftP9P6sbCzkql for ; Sat, 11 Apr 2026 19:38:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3e8b8 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 11 Apr 2026 19:38:33 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Rick Macklem Subject: git: 6698596cd2ab - main - nfsv4.4: Document setup of a NFSv4 root fs List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6698596cd2abd9eae3ac02efe1c257766da5d24a Auto-Submitted: auto-generated Date: Sat, 11 Apr 2026 19:38:33 +0000 Message-Id: <69daa339.3e8b8.33137bff@gitrepo.freebsd.org> The branch main has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=6698596cd2abd9eae3ac02efe1c257766da5d24a commit 6698596cd2abd9eae3ac02efe1c257766da5d24a Author: Rick Macklem AuthorDate: 2026-04-11 19:36:56 +0000 Commit: Rick Macklem CommitDate: 2026-04-11 19:36:56 +0000 nfsv4.4: Document setup of a NFSv4 root fs Commit 8b9775912cbc added support for an NFSv4 mounted root file system. This patch documents how to set this up. It also includes some minor updates and fixes some formatting. This is a content change. Reviewed by: kib MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D56317 Fixes: 8b9775912cbc ("nfs_diskless: Add support for an NFSv4 root fs") --- usr.sbin/nfsd/nfsv4.4 | 178 +++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 154 insertions(+), 24 deletions(-) diff --git a/usr.sbin/nfsd/nfsv4.4 b/usr.sbin/nfsd/nfsv4.4 index e96e507e23ad..9ec775613b47 100644 --- a/usr.sbin/nfsd/nfsv4.4 +++ b/usr.sbin/nfsd/nfsv4.4 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd January 8, 2024 +.Dd April, 8, 2026 .Dt NFSV4 4 .Os .Sh NAME @@ -106,16 +106,23 @@ The allows a limited subset of operations to be performed on non-exported subtrees of the local file system, so that traversal of the tree to the exported subtrees is possible. -As such, the ``'' can be in a non-exported file system. +As such, the +.Ql +can be in a non-exported file system. The exception is ZFS, which checks exports and, as such, all ZFS file systems -below the ``'' must be exported. +below the +.Ql +must be exported. However, the entire tree that is rooted at that point must be in local file systems that are of types that can be NFS exported. Since the .Nm -file system is rooted at ``'', setting this to anything other -than ``/'' will result in clients being required to use different mount +file system is rooted at +.Ql , +setting this to anything other than +.Ql / +will result in clients being required to use different mount paths for .Nm than for NFS Version 2 or 3. @@ -132,9 +139,12 @@ take the form: @ .Ed .sp -where ``'' is not the same as the DNS domain used +where +.Ql +is not the same as the DNS domain used for host name lookups, but is usually set to the same string. -Most systems set this ``'' +Most systems set this +.Ql to the domain name part of the machine's .Xr hostname 1 by default. @@ -154,26 +164,32 @@ either client or server, this daemon must be running. The form where the numbers are in the strings can only be used for AUTH_SYS. To configure your systems this way, the .Xr nfsuserd 8 -daemon does not need to be running on the server, but the following sysctls -need to be set to 1 on the server. +daemon should not be running on the NFS systems, +but the following sysctls +need to be set to 1 on the NFS server. .sp .Bd -literal -offset indent -compact vfs.nfs.enable_uidtostring vfs.nfsd.enable_stringtouid .Ed .sp -On the client, the sysctl +However, on the NFS client +only the sysctl .sp .Bd -literal -offset indent -compact vfs.nfs.enable_uidtostring .Ed .sp -must be set to 1 and the -.Xr nfsuserd 8 -daemon does not need to be running. +needs to be set to 1. .Pp -If these strings are not configured correctly, ``ls -l'' will typically -report a lot of ``nobody'' and ``nogroup'' ownerships. +If these strings are not configured correctly, +.Ql ls -l +will typically +report a lot of +.Ql nobody +and +.Ql nogroup +ownerships. .Pp Although uid/gid numbers are no longer used in the .Nm @@ -204,8 +220,12 @@ plus nfsuserd_enable="YES" .Ed .sp -if the server is using the ``@'' form of user/group strings or -is using the ``-manage-gids'' option for +if the server is using the +.Ql @ +form of user/group strings or +is using the +.Ql -manage-gids +option for .Xr nfsuserd 8 . .Pp In addition, you can set: @@ -216,7 +236,9 @@ nfsv4_server_only="YES" .sp to disable support for NFSv2 and NFSv3. .Pp -You will also need to add at least one ``V4:'' line to the +You will also need to add at least one +.Ql V4: +line to the .Xr exports 5 file for .Nm @@ -246,7 +268,9 @@ Disabling local locking can only be done if neither local accesses to the exported file systems nor the NLM is operating on them. .El .sp -Note that Samba server access would be considered ``local access'' for the above +Note that Samba server access would be considered +.Ql local access +for the above discussion. .Pp To build a kernel with the NFS server that supports @@ -263,12 +287,16 @@ file. .Sh CLIENT MOUNTS To do an .Nm -mount, specify the ``nfsv4'' option on the +mount, specify the +.Ql nfsv4 +option on the .Xr mount_nfs 8 command line. This will force use of the client that supports .Nm -plus set ``tcp'' and +plus set +.Ql tcp +and .Nm . .Pp The @@ -326,8 +354,8 @@ where the first 4 Ns are the host IP address and the last two are the port# in network byte order (all decimal #s in the range 0-255). .Pp For NFSv4.1 and NFSv4.2, the callback path (called a backchannel) uses the -same TCP connection as the mount, so none of the above applies and should -work through gateways without any issues. +same TCP connection as the mount and, as such, no additional +configuration is needed for the callback path. .Pp To build a kernel with the client that supports .Nm @@ -345,7 +373,10 @@ Options can be specified for the .Xr nfsuserd 8 and .Xr nfscbd 8 -daemons at boot time via the ``nfsuserd_flags'' and ``nfscbd_flags'' +daemons at boot time via the +.Ql nfsuserd_flags +and +.Ql nfscbd_flags .Xr rc.conf 5 variables. .Pp @@ -356,6 +387,105 @@ It occurs when an nfsd thread tries to do an NFSv4 / Close RPC as part of acquiring a new vnode. If all other nfsd threads are blocked waiting for lock(s) held by this nfsd thread, then there is no nfsd thread to service the Close RPC. +.Sh NFSv4 ROOT FILE SYSTEM +.Pp +For an +.Nm +root file system, there are a few things that need +to be done beyond what is needed for an NFSv3 root file system. +The NFS server must be configured with the +.Ql +as +.Pa / +so that +the mount path is the same for +.Nm +as NFSv3. +This is required because the bootstrap code still uses NFSv3. +.Pp +The following additional changes are required in the exported +root file system. +.sp +In +.Xr fstab 5 , +the +.Ql nfsv4 +mount option must be specified in +the line for the root mount. +.sp +In +.Pa /boot/loader.conf +the line +.sp +.Bd -literal -offset indent -compact +boot.nfsroot.options="nfsv4" +.Ed +.sp +is needed to tell the kernel to use +.Nm +for the root mount. +Additional mount options may be specified. +.sp +If your +.Nm +setup is using the form where the uid/gid numbers are in strings, +the sysctl +.Ql vfs.nfs.enable_uidtostring +must be set to one before any NFSv4 read/write mounts are done. +The recommended way to do this is to put +.sp +.Bd -literal -offset indent -compact +vfs.nfs.enable_uidtostring=1 +.Ed +.sp +in +.Pa /etc/sysctl.conf +in the FS exported root file system. +Alternately, if your +.Nm +setup is using +.Ql @ +via +.Xr nfsuserd 8 +for uids/gids, then you need the following additional line in +.Pa /boot/loader.conf +.sp +.Bd -literal -offset indent -compact +boot.nfsroot.user_domain="" +.Ed +.sp +which tells the booting kernel that you are going to be +doing mapping via +.Xr nfsuserd 8 +and what your +.Ql +is. +The booting kernel will set a few critical mappings to allow +the boot to proceed until the +.Xr nfsuserd 8 +daemon is started. +Then in +.Pa /etc/rc.conf +you need the lines +.sp +.Bd -literal -offset indent -compact +nfsuserd_enable="YES" +nfsuserd_flags="-domain " +.Ed +.sp +to start the daemon. +.Pp +Beyond this, the setup should be the same as would be used +for an NFSv3 root file system. +See section +.Ql Diskless Operation with PXE +in the +.Ql Advanced Networking +chapter of the +.Ql FreeBSD Handbook , +although configuring hosts as fixed addresses in your +.Ql dhcpd.conf +might be preferable. .Sh FILES .Bl -tag -width /var/db/nfs-stablerestart.bak -compact .It Pa /var/db/nfs-stablerestart From nobody Sun Apr 12 04:51:07 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4ftdRB0Xlvz6YThj for ; Sun, 12 Apr 2026 04:51: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ftdR44vZ5z3gx0 for ; Sun, 12 Apr 2026 04:51:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775969472; 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; bh=5OOJgBTtK2YGI6Zfky5ZDC3MiNqbzAXEN9g99SOP/eI=; b=obISjm0AEzY+3B1vq0RS9Cugv2hC8hj0OPY09eVvVSC4OCUGRfUY/5h0OsxZKedk7A3xWK o65Xb0IpqL6IDZyrVLHXLe9sRnGe+P6v7a0l/0HbqjAHTmswIkfn6iqancZxuDGX2AaOui Dq2WKUqya2QZziNqgWeB4ntv4CiMiYI0TuCvlHBZJpOX1WykyUouU8/RQnD+yu073XldLQ cxT9dq8e4EtYDx9NkVjOymKO/Zr0tlsVC87MQj7CASRhWcCGbFJ2lA405TKtILSeVpm05D zTAiLAFZz6lseBXdWr3qHZjvdcoAKRygRg8Obh234s+78e1zharDqfksobv22g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775969472; a=rsa-sha256; cv=none; b=czM95ycj8ek5CXfaao2r3w4/XyCUVFHu4uUlYVso6zqlFCTQ2RqhdKwECmv43REmbxYZrF PCpqiBZI60uGl7BfPjkRQHB1PSxQ0GqjP8n9zN2ISmsSI5cSnhmUcU4HgRaGdRqcM/57Go Woj6X8oNLjxpoRDRjJcmmkQrDObXc1m/tS2tjZfwbxRIw4WpaTaoJFllX0Y9/pu4jLDRpm /TDBz6+yADOb4tNctXUYW9ZOiS0UHsWZHDoTnTyINdGkghxdQV4fv+l3FCMkS9hjuso3RC MBvFIwm2Uw5OuEu5FOsKuCxCp9gK1wagdbTTlQuMoZsynfYVkkwnp+d7aC+0SQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775969472; 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; bh=5OOJgBTtK2YGI6Zfky5ZDC3MiNqbzAXEN9g99SOP/eI=; b=EG5gedzTrmphYxl9fQ2wkqD30kcqciqBpyaDFEeY6e4aDT17rXIig+hOqbOW58SyaYNCdm l3xUpYqjhE54KuTR6vj7M/wFebKxa2M3JQDRFNykEFUS01B8jr1YlcZ2Z1DD1uEaNyhiWo QH9Darnw3UvqR0qYeEGzP1bZJAbUXd007cz+n0kEdNDwZDz3/P+BOzxKW1yvBn6amAiLhU AEpPlj90iSyKPvjI0g1xf2iSmQKgBnTW8/CZVsWmkrWXKKsf5D323bA9mMzcdzXAuLCLWI 7DmGYrJUFtgkDMNYMVgZYtmo5wvnPLyLBZMwDO2d81Dsb8XT48UeChlSS+swmQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4ftdR44TFnz124N for ; Sun, 12 Apr 2026 04:51:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 224b6 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 12 Apr 2026 04:51:07 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Yuichiro NAITO From: Kevin Bowling Subject: git: 938c076b9b0b - main - ixgbe: Fix MRQC register 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: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 938c076b9b0bc458a3877b52535527d37199fc09 Auto-Submitted: auto-generated Date: Sun, 12 Apr 2026 04:51:07 +0000 Message-Id: <69db24bb.224b6.1969b551@gitrepo.freebsd.org> The branch main has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=938c076b9b0bc458a3877b52535527d37199fc09 commit 938c076b9b0bc458a3877b52535527d37199fc09 Author: Yuichiro NAITO AuthorDate: 2026-04-07 15:25:09 +0000 Commit: Kevin Bowling CommitDate: 2026-04-12 04:50:28 +0000 ixgbe: Fix MRQC register value. Focus on the MRQE field of the MRQC register, which is 4 bits wide, and we use these 3 types of values. - IXGBE_MRQC_RSSEN 0x1 (non VF mode) - IXGBE_MRQC_VMDQRSS32EN 0xA (less than 33 VFs) - IXGBE_MRQC_VMDQRSS64EN 0xB (less than 65 VFs) If we always take a bitwise OR with IXGBE_MRQC_RSSEN, IXGBE_MRQC_VMDQRSS32EN will never be chosen. Select these 3 types of values for the proper case. Signed-off-by: Yuichiro NAITO MFC after: 1 week Pull Request: https://github.com/freebsd/freebsd-src/pull/2132 --- sys/dev/ixgbe/if_ix.c | 4 ++-- sys/dev/ixgbe/if_sriov.c | 2 +- sys/dev/ixgbe/ixgbe_sriov.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/dev/ixgbe/if_ix.c b/sys/dev/ixgbe/if_ix.c index 9a1ed66ad6a8..829fbba48a72 100644 --- a/sys/dev/ixgbe/if_ix.c +++ b/sys/dev/ixgbe/if_ix.c @@ -709,7 +709,7 @@ ixgbe_initialize_rss_mapping(struct ixgbe_softc *sc) RSS_HASHTYPE_RSS_TCP_IPV6_EX; } - mrqc = IXGBE_MRQC_RSSEN; + mrqc = ixgbe_get_mrqc(sc->iov_mode); if (rss_hash_config & RSS_HASHTYPE_RSS_IPV4) mrqc |= IXGBE_MRQC_RSS_FIELD_IPV4; if (rss_hash_config & RSS_HASHTYPE_RSS_TCP_IPV4) @@ -728,7 +728,7 @@ ixgbe_initialize_rss_mapping(struct ixgbe_softc *sc) mrqc |= IXGBE_MRQC_RSS_FIELD_IPV6_UDP; if (rss_hash_config & RSS_HASHTYPE_RSS_UDP_IPV6_EX) mrqc |= IXGBE_MRQC_RSS_FIELD_IPV6_EX_UDP; - mrqc |= ixgbe_get_mrqc(sc->iov_mode); + IXGBE_WRITE_REG(hw, IXGBE_MRQC, mrqc); } /* ixgbe_initialize_rss_mapping */ diff --git a/sys/dev/ixgbe/if_sriov.c b/sys/dev/ixgbe/if_sriov.c index 1998cdb016f7..47f1a1279e2f 100644 --- a/sys/dev/ixgbe/if_sriov.c +++ b/sys/dev/ixgbe/if_sriov.c @@ -170,7 +170,7 @@ ixgbe_get_mrqc(int iov_mode) mrqc = IXGBE_MRQC_VMDQRSS32EN; break; case IXGBE_NO_VM: - mrqc = 0; + mrqc = IXGBE_MRQC_RSSEN; break; default: panic("Unexpected SR-IOV mode %d", iov_mode); diff --git a/sys/dev/ixgbe/ixgbe_sriov.h b/sys/dev/ixgbe/ixgbe_sriov.h index e5a78a7220cc..3c456ee819f2 100644 --- a/sys/dev/ixgbe/ixgbe_sriov.h +++ b/sys/dev/ixgbe/ixgbe_sriov.h @@ -94,7 +94,7 @@ u32 ixgbe_get_mrqc(int); #define ixgbe_align_all_queue_indices(_a) #define ixgbe_vf_que_index(_a, _b, _c) (_c) #define ixgbe_get_mtqc(_a) IXGBE_MTQC_64Q_1PB -#define ixgbe_get_mrqc(_a) 0 +#define ixgbe_get_mrqc(_a) IXGBE_MRQC_RSSEN #endif /* PCI_IOV */ From nobody Sun Apr 12 07:47:22 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4ftjLt3Wrpz6YxXH; Sun, 12 Apr 2026 07:47:50 +0000 (UTC) (envelope-from herbert@gojira.at) Received: from fout-b1-smtp.messagingengine.com (fout-b1-smtp.messagingengine.com [202.12.124.144]) (using TLSv1.3 with cipher TLS_AES_256_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 4ftjLr6q5Tz45VL; Sun, 12 Apr 2026 07:47:48 +0000 (UTC) (envelope-from herbert@gojira.at) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gojira.at header.s=fm2 header.b=K80iI725; dkim=pass header.d=messagingengine.com header.s=fm2 header.b="W 947RFG"; dmarc=none; spf=pass (mx1.freebsd.org: domain of herbert@gojira.at designates 202.12.124.144 as permitted sender) smtp.mailfrom=herbert@gojira.at Received: from phl-compute-05.internal (phl-compute-05.internal [10.202.2.45]) by mailfout.stl.internal (Postfix) with ESMTP id 13B001D001DB; Sun, 12 Apr 2026 03:47:47 -0400 (EDT) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-05.internal (MEProxy); Sun, 12 Apr 2026 03:47:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gojira.at; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm2; t=1775980066; x=1776066466; bh=E6T5V49ERXnsdmzG+ajDuvMKG9O81P0Rp35VzcW1KI8=; b= K80iI725QMRWAiidOZTK8VKe36wrSyFX7qhpbWWee2JeYICd0vRSfs98Y1Hy3kLi CaGRzg+lDT8iBuS44DtmQ5WKpppbDeSJkKqLNLqinvTDD9I5q0nnG8Y9WkWzIv52 +i4FkJ7G9gavx9m6KP/oLgMwraEMqOGRh8VvjtX208bl7Mzem6CXO4SQgFFOnkwi LXkAZrbLrIWIIyZsEkFOJNh9oEjLcbHTPl1wFDP/8RcxyKb83b9OAtiNeEo3MImo dkXwK9qIWYy+xUwTFXL8xj53pAkFRvhI+s8AnlebIlehMk4thxqIdozKETJPA5CS V72POMHHWvyO9r32oGXkog== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1775980066; x= 1776066466; bh=E6T5V49ERXnsdmzG+ajDuvMKG9O81P0Rp35VzcW1KI8=; b=W 947RFGEI+zFGvSNNeXnlRXKsTT8IIl/k/D5qoUUvztWfPbSTETUYrY5W0yaVNZS7 fYxDbZoSrP+3pisv0yuxa5LFAZKjbx7tMVWMRTsUeXznGQkluGL7EYfahIkGAVQW Y44XI2xX5PKl/C+hVqM4x38zMpYDJO9qD7Zkk8fSDkpQpTtIFqG3jza9BKVArZSd 52Vzbe0WrDw14Cd2nOD0Vy7HjA2yBdIdNIjWqKyMiegD5zN7YIVP9faApGgXKPgk T6sqe/mfWjSrEKBhuuUKsQyEBX87NWbk9kLLypoPSQE0xDoqz7NoHL6SRYN+d44I 0gr95u6zuQ6+gvvpka+Cw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefhedrtddtgdefgeejvdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpuffrtefokffrpgfnqfghnecuuegr ihhlohhuthemuceftddtnecunecujfgurhepfffkhffvvefujghffgggtgfgsehtqhertd dtrehunecuhfhrohhmpedfjfgvrhgsvghrthculfdrucfukhhuhhhrrgdfuceohhgvrhgs vghrthesghhojhhirhgrrdgrtheqnecuggftrfgrthhtvghrnhepgfeifeduvdfhleejve duieeflefhgeeugfeijeekjeeuueffvdetieekgfduudelnecuffhomhgrihhnpehfrhgv vggsshgurdhorhhgpdhlihgsrdhmkhenucevlhhushhtvghrufhiiigvpedtnecurfgrrh grmhepmhgrihhlfhhrohhmpehhvghrsggvrhhtsehgohhjihhrrgdrrghtpdhnsggprhgt phhtthhopeehpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopehjrhhttgdvjeesfh hrvggvsghsugdrohhrghdprhgtphhtthhopehnghhivgesfhhrvggvsghsugdrohhrghdp rhgtphhtthhopehsrhgtqdgtohhmmhhithhtvghrshesfhhrvggvsghsugdrohhrghdprh gtphhtthhopeguvghvqdgtohhmmhhithhsqdhsrhgtqdgrlhhlsehfrhgvvggsshgurdho rhhgpdhrtghpthhtohepuggvvhdqtghomhhmihhtshdqshhrtgdqmhgrihhnsehfrhgvvg gsshgurdhorhhg X-ME-Proxy: Feedback-ID: i64fe486c:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 12 Apr 2026 03:47:45 -0400 (EDT) Date: Sun, 12 Apr 2026 09:47:22 +0200 Message-ID: <87pl44y60l.wl-herbert@gojira.at> From: "Herbert J. Skuhra" To: Jessica Clarke Cc: Enji Cooper , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Subject: Re: git: 3797fe720a37 - main - libcrypto: compile all PIC objects with -DOPENSSL_PIC -fPIC In-Reply-To: References: <69bf4832.41a59.1df6e724@gitrepo.freebsd.org> User-Agent: Wanderlust/2.15.9 (Almost Unreal) Emacs/31.0 Mule/6.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 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=ISO-8859-7 Content-Transfer-Encoding: quoted-printable X-Spamd-Result: default: False [-2.59 / 15.00]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.99)[-0.993]; R_DKIM_ALLOW(-0.20)[gojira.at:s=fm2,messagingengine.com:s=fm2]; R_SPF_ALLOW(-0.20)[+ip4:202.12.124.128/27]; RCVD_IN_DNSWL_LOW(-0.10)[202.12.124.144:from]; MIME_GOOD(-0.10)[text/plain]; ARC_NA(0.00)[]; ASN(0.00)[asn:151847, ipnet:202.12.124.0/24, country:AU]; TO_DN_EQ_ADDR_SOME(0.00)[]; TO_DN_SOME(0.00)[]; MIME_TRACE(0.00)[0:+]; DWL_DNSWL_NONE(0.00)[messagingengine.com:dkim]; RCVD_VIA_SMTP_AUTH(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-all@FreeBSD.org,dev-commits-src-main@FreeBSD.org]; RCVD_COUNT_THREE(0.00)[3]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_FIVE(0.00)[5]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DMARC_NA(0.00)[gojira.at]; RCVD_TLS_LAST(0.00)[]; DKIM_TRACE(0.00)[gojira.at:+,messagingengine.com:+] X-Rspamd-Queue-Id: 4ftjLr6q5Tz45VL X-Spamd-Bar: -- On Mon, 23 Mar 2026 18:02:38 +0100, Jessica Clarke wrote: >=20 > On 22 Mar 2026, at 01:38, Enji Cooper wrote: > >=20 > > The branch main has been updated by ngie: > >=20 > > URL: https://cgit.FreeBSD.org/src/commit/?id=3D3797fe720a37ff9fb5b20546= 494ef1c4a6c01541 > >=20 > > commit 3797fe720a37ff9fb5b20546494ef1c4a6c01541 > > Author: Enji Cooper > > AuthorDate: 2026-03-22 00:39:16 +0000 > > Commit: Enji Cooper > > CommitDate: 2026-03-22 01:38:49 +0000 > >=20 > > libcrypto: compile all PIC objects with -DOPENSSL_PIC -fPIC > >=20 > > This change modifies the libcrypto PIC objects to always compile with > > `-DOPENSSL_PIC -fPIC` to restore parity with the upstream build proc= ess. > > This ensures that the legacy provider is built with parity to the > > upstream legacy provider. > >=20 > > MFC after: 12 days > > Tested with: `make check` (legacy provider), `make univer= se` > > Fixes: 14b9955e > > Differential Revision: https://reviews.freebsd.org/D44896 > > --- > > secure/lib/libcrypto/Makefile | 6 ------ > > secure/lib/libcrypto/Makefile.inc | 3 +++ > > 2 files changed, 3 insertions(+), 6 deletions(-) > >=20 > > diff --git a/secure/lib/libcrypto/Makefile b/secure/lib/libcrypto/Makef= ile > > index 738de3479987..9d484e9d480c 100644 > > --- a/secure/lib/libcrypto/Makefile > > +++ b/secure/lib/libcrypto/Makefile > > @@ -687,12 +687,6 @@ SUBDIR.${MK_TESTS}=3D tests > >=20 > > .include > >=20 > > -.if ${MACHINE} =3D=3D "powerpc" > > -# Work around "relocation R_PPC_GOT16 out of range" errors > > -PICFLAG=3D -fPIC > > -.endif > > -PICFLAG+=3D -DOPENSSL_PIC > > - > > .if defined(ASM_${MACHINE_CPUARCH}) > > .PATH: ${SRCTOP}/sys/crypto/openssl/${MACHINE_CPUARCH} > > .if defined(ASM_amd64) > > diff --git a/secure/lib/libcrypto/Makefile.inc b/secure/lib/libcrypto/M= akefile.inc > > index 73c650d590ff..8f22d501e005 100644 > > --- a/secure/lib/libcrypto/Makefile.inc > > +++ b/secure/lib/libcrypto/Makefile.inc > > @@ -12,6 +12,9 @@ CFLAGS+=3D -I${LCRYPTO_SRC}/providers/common/include > > CFLAGS+=3D -I${LCRYPTO_SRC}/providers/fips/include > > CFLAGS+=3D -I${LCRYPTO_SRC}/providers/implementations/include > >=20 > > +PICFLAG=3D -fPIC > > +PICFLAG+=3D -DOPENSSL_PIC > > + > > .SUFFIXES: .pc > > .PATH.pc: ${LCRYPTO_SRC}/exporters >=20 > This isn=A2t what PICFLAG is for. Is there a reason you can=A2t use SHARE= D_CFLAGS? Is this the final fix and will it be merged to stable/15? Thanks. From nobody Sun Apr 12 16:30:13 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4ftwxk4jdvz6YKQC for ; Sun, 12 Apr 2026 16:30: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ftwxk43LQz47tT for ; Sun, 12 Apr 2026 16:30:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776011418; 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; bh=PGhtgBiBMUaKsumJ7bA/NeLbTQ9ib54QP7QnpVIhqx4=; b=MOs9/ovC0y4S4wMSgKw5x95NpRhf9P77kip3D2oaC6p6c37BtD4a3ppRDTnFejPQFEDzh+ 7f7tOaC3Ks+lg+q3bFjR76QjUhD8VqOMT+eQSYN+nBtPP1WqQtXtaanVN2Gn5K3OxL2TLA C4c0L29nm0XwjAbIXCRPsq2JWBWboPPVt56ltOBArkngy4XGQTZLLt+J1XhzuHF1099nfE k8xyd7squ2z7Jvx2WHSpphdk5SFDSyF9MjatOSuTDHcgB8a6IfB2Q02upqWcUumtTnB7VG TijL4Gh1t1eiI7AF4wmCpfB9ddy0ly4fn5OugZwiYU2HDuapNsKdkb0qKYPUZw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776011418; a=rsa-sha256; cv=none; b=FG5KvcYtALMZDlPfFYxtoGfj6FFDxXXimWAHEesQUyA3P8E5l7HKTaGVKCKQKz9ByyRucC w+WPaJqYQcUvKmLAOSJhTO5GHSG0JUz5qGFvTNMt0oZR/34Uvnuox+VhE8auXGXLaLlljA +e2JyOSYfoolgsxRD0SAGbANFRUHfm/xFckWaWfwqu4hAcPYni1wHRPvDXayMwPGLxhO5y cn3OOtffZ9BghKEJ1EUIqlhy8gwoncjdB/bWTkeMt4vhOn3NYPsMsCjWAc3gpvqPhJ1b70 5AflDqNPmQMhL3KgUVR/thyzNKfG+RIm8XNiPbUsSL69FNNQG0zVVlCtD1ZSaQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776011418; 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; bh=PGhtgBiBMUaKsumJ7bA/NeLbTQ9ib54QP7QnpVIhqx4=; b=Y0tg5WFkOHUFIen3ZGJvlthICmjNfNd0CFpX/5yMdzN7xmy/h0k7T5shICZcTjR+MvztDf DyNQuV9BF+sWatGTd1OxwkF+sz+vk2SqTGsOp3paF2uErPENbY44rNoK6Uve2FE6iBNpKx ZKSGfIqV4qwcrxkCWjfE8fK6xHK0b0G/lnTHdmA27/0C5TDZr9L+E14l0iXtVmAfBDOHjJ l2jTjok8Gkv+/KjpgSqf97e2d5ZobOQgMJgXgJiDrdd5H4JhhGOFN9i/pEROrj3tDyocTb kbykIlNiC5T0iz//ET7/tAWPtOLtAQOlqK7xRi2w6eRHQZk/cRzc+3Xw79B92w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4ftwxk3JLBz8Yp for ; Sun, 12 Apr 2026 16:30:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 252b3 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 12 Apr 2026 16:30:13 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Andre Albsmeier From: Michael Osipov Subject: git: e9a69948a883 - main - daemon(8): Add "--output-file -o" to list of options enabling supervision 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: michaelo X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e9a69948a8837601d71e556550a272ca85c03e48 Auto-Submitted: auto-generated Date: Sun, 12 Apr 2026 16:30:13 +0000 Message-Id: <69dbc895.252b3.665e8832@gitrepo.freebsd.org> The branch main has been updated by michaelo: URL: https://cgit.FreeBSD.org/src/commit/?id=e9a69948a8837601d71e556550a272ca85c03e48 commit e9a69948a8837601d71e556550a272ca85c03e48 Author: Andre Albsmeier AuthorDate: 2026-04-12 16:10:59 +0000 Commit: Michael Osipov CommitDate: 2026-04-12 16:28:24 +0000 daemon(8): Add "--output-file -o" to list of options enabling supervision mode This is the small internal doc fix from https://reviews.freebsd.org/D46313 Reviewed by: michaelo Approved by: (blanket; comment fix) MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D55325 --- usr.sbin/daemon/daemon.c | 1 + 1 file changed, 1 insertion(+) diff --git a/usr.sbin/daemon/daemon.c b/usr.sbin/daemon/daemon.c index 341438730a6d..9158d6404b29 100644 --- a/usr.sbin/daemon/daemon.c +++ b/usr.sbin/daemon/daemon.c @@ -194,6 +194,7 @@ main(int argc, char *argv[]) /* * Supervision mode is enabled if one of the following options are used: + * --output-file -o * --child-pidfile -p * --supervisor-pidfile -P * --restart -r / --restart-delay -R From nobody Sun Apr 12 16:50:11 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4ftxNq0zHPz6YLsx; Sun, 12 Apr 2026 16:50:19 +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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ftxNp64Xlz3DqM; Sun, 12 Apr 2026 16:50:18 +0000 (UTC) (envelope-from glebius@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776012618; 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=OTuCwhp826rWCSY41/AVDNxN7ruM2ZtMul/yz4LT5Ug=; b=GFn7/BroD3G2dO6NddxezZ4F6xNO3y1uhgLSb+df4gkwSjK7k+peiVLvYAH5fA7Q0UHGt7 evNj6PvA1U1ttYvm3aniMH1tqHYH7PT7GEfHkn0WM0nl0r5dyjqHo1MJdnp2aG3ynuXEIw S/Y/jCts7OXHdofBnIBxy2GT+XsI4L+l5Ok+uwj0gq9wqGml1j2vA7OpJtnTR74WHEAZ6B XqH/MbdHni4H/rQpuJC6tY3xbxZppNDLVEsjzF+Pf30l98hBwto1I3mcg3zReznkU1n1bt DiN+bpo+tefIvSYf01fI68e2BoPynAopDV/vgxW3Oo62ROlUdZaE1R0a4ya+EQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776012618; a=rsa-sha256; cv=none; b=N6geF4KpMdC/0lNaOFHd9zg0mV9b14sGI+KobVn+jMt1Tnn8H/Luji4lliQCe+Amx6YMY0 N/WcrhapzK+GevX391AYSe2FYVvNaq6jHXsks/uBnnubLX5DsAFj6YQHXof5VXVnxEG/4X ahDx6n2kTaXpq8CktvbRctolObqzgmCWXRJUXJdMTdvrKUQzS9ye/PHZG3W0NHcD7Pixuy h+DBV0vMYaK8MvvCZYhxam5P0aF3Pfi/mbnpbhwy+9aOVWNXzqS9T00BHjMPoGq2h0zjax c7OV4LKsQAQV3A9ajtXEPF0T4RbVkriPCm2FWS0uDsd/RCpnkOTcYES4X2JfHg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776012618; 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=OTuCwhp826rWCSY41/AVDNxN7ruM2ZtMul/yz4LT5Ug=; b=R0QSvmfXO3vLUl7/o253d0z3H1A8HquplLm8In2j00qyeADxXI21CCS7kFY7KAlMS2xapQ FPtgY68UM+cvs7bS09IXkNpsmyG+C90+JzuNs0m4cHci1qnlWK7pxv9pplwwIoXNzGH7oE V31IEUSX71brefrjh+N4SEMxa44O0yFTBaBieVoPH8tPAvRtCZx8mNdot0Z5kE+riHYK3s E+Thbtu6HbDP0Mb2y/arfnbeTZIHk6JdGgI6gxjakf2aaDpyBFHbapcvoTKScs8yoKLxZ7 xaTlhiAO50gHDGtssDJlmBGIVVZ72LxUhnDERZJcnZsDjy2rNEur9a6UtVVj4A== 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 4ftxNl0hJwzbT; Sun, 12 Apr 2026 16:50:14 +0000 (UTC) (envelope-from glebius@freebsd.org) Date: Sun, 12 Apr 2026 09:50:11 -0700 From: Gleb Smirnoff To: Olivier Cochard , des@freebsd.org Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: c5961b6fcfe0 - main - yes: fix argv test race between fork and exec Message-ID: References: <69d3ebe6.1f204.7943777e@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: <69d3ebe6.1f204.7943777e@gitrepo.freebsd.org> On Mon, Apr 06, 2026 at 05:22:46PM +0000, Olivier Cochard wrote: O> The branch main has been updated by olivier: O> O> URL: https://cgit.FreeBSD.org/src/commit/?id=c5961b6fcfe0f3587be11187a9c666a7fa200f4b O> O> commit c5961b6fcfe0f3587be11187a9c666a7fa200f4b O> Author: Olivier Cochard O> AuthorDate: 2026-04-06 17:17:49 +0000 O> Commit: Olivier Cochard O> CommitDate: 2026-04-06 17:22:25 +0000 O> O> yes: fix argv test race between fork and exec O> O> The argv test checks ps(1) output immediately after backgrounding yes(1), but O> the forked child briefly shows the parent shell's argv before exec(2) replaces it. O> This caused intermittent failures where ps(1) captured the atf shell wrapper O> command line instead of "yes y". O> O> Approved by: des O> Sponsored by: Netflix O> Differential Revision: https://reviews.freebsd.org/D56231 O> --- O> usr.bin/yes/tests/yes_test.sh | 2 ++ O> 1 file changed, 2 insertions(+) O> O> diff --git a/usr.bin/yes/tests/yes_test.sh b/usr.bin/yes/tests/yes_test.sh O> index f4c04e186536..797ac5f6ac9f 100644 O> --- a/usr.bin/yes/tests/yes_test.sh O> +++ b/usr.bin/yes/tests/yes_test.sh O> @@ -52,6 +52,8 @@ argv_body() O> { O> yes y >/dev/null & O> local pid=$! O> + # Wait for yes(1) to exec before checking args O> + sleep 0.1 O> atf_check -o inline:"yes y\n" ps -o args= $pid O> kill $pid O> wait This kind of fix doesn't make it 100% flakyless, but adds a 100% guaranteed 0.1 second test execution time overhead. In general, all sh(1) based tests that create a background process should have a wait cycle with `sleep 0.01` in it. In this particular case the problem is that we wait for the condition that is the actual thing that we check. What can be done here is that the wait cycle is not endless, but limited to say 10 seconds, and test shell fail unless we see expected argv within this timeout period. `grep -r sleep\ 0.01 src/tests` can provide some examples of such wait cycles. -- Gleb Smirnoff From nobody Sun Apr 12 17:39:57 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4ftyV55T4wz6YR14 for ; Sun, 12 Apr 2026 17:39: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ftyV54N9dz3Lc1 for ; Sun, 12 Apr 2026 17:39:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776015597; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ap56o5aqRikX7VtGLjRLtpmbGi5JrJ6Bm6Flxv2XoWI=; b=QaoPuTXvoccj+g18Qar+8UGfcpCds5rPZLBoEt9wG4orYkD5CbAsep69FHV7FB+KxqpK+K Cl7aB+x1Q8+Kl6gqGeIhD2vTHR+16erHNyptERNvDz1SZQ2xpZFLs5FbOvZ/Z4W6+GXVGa vfKQlq/7ToIqExZZbOSLL7rBmz0N3zv+ndWjG0Cqynpz2JpVxkXAPPl932QNUBJ3NHFl+7 iPpBcm/rspG4VXs76ZNFF/bFf1k1Ic94NiwlpP2gTN4ER5hjO0MK0slo0ICVYN64ZCTHDo 8haUeEr0aymJUpSuh13VtENXslqoYC+L3lalrQjkdY9iXdkL/kdwtUUO2W7LYA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776015597; a=rsa-sha256; cv=none; b=VnNIFYY1CWMR4bSra+1N0/kvXH4TulzSLjwH87QlvFjhK9PFmnymvBMDkRGHUtN7FKem5B sqqikxG0Q/IbhLT63fC5Dl4kiRUs6n3xE+Q1/mB/xgkX+Svc2oDe/G2PcFpZrvHrU7qUdJ ASdr73IGWQn24cDSzRNegLlroHQEZDarWGGRQLNmYU6qx5t/5ASKOugqaJ+KbKc/MHk5Kc 67a7loTJBpd/kPSfEVJllVHcGRMvQMt+eE81D+P3Yc1yarhRw9vsQJ20KvtGSIW9sCl9Nx g+iftnUiSKyxHcyzERaaPHrHSGXMz+dglyYkNIU46Vrbpcx979B5jT77Mpz1pg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776015597; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ap56o5aqRikX7VtGLjRLtpmbGi5JrJ6Bm6Flxv2XoWI=; b=YZrj7GFe70S1GoTqUzP5SJj23CQ3xhBZAXzTkHfMl6i42bzCk0rPyqUcOd47lcH0kYmm0X xqufozj1EdglQalN3Qen3XHEy8cf7TQsEsPQGVaNIDROU6uZP02vzAzk3VeabBnAr75yOX GIPKcnfHteZ3N8tEvDroKYQ7lmHWL4PBruAlAuemYcmy4+VMFRo79vfa+vkLL0ZrRmtQwZ flINyiW2HXkodUgthD9s037LVv2CE4X74AxflYTRAkHCMtHS0c0z5LfAX5MLHW3G/nzUK2 oPkmMa8hZ4a5yym5qGWaZKoJp0mvP09z/rL/nVxI4jHMSicw4YUpr4AfYUU9CA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4ftyV53mRbzBjT for ; Sun, 12 Apr 2026 17:39:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 305f6 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 12 Apr 2026 17:39:57 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: abf68d1cf025 - main - hash(9): introduce hashalloc()/hashfree() KPI List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: abf68d1cf02550c3c0341f5bb90be0d34f655a15 Auto-Submitted: auto-generated Date: Sun, 12 Apr 2026 17:39:57 +0000 Message-Id: <69dbd8ed.305f6.3b01202@gitrepo.freebsd.org> The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=abf68d1cf02550c3c0341f5bb90be0d34f655a15 commit abf68d1cf02550c3c0341f5bb90be0d34f655a15 Author: Gleb Smirnoff AuthorDate: 2026-04-12 17:25:51 +0000 Commit: Gleb Smirnoff CommitDate: 2026-04-12 17:25:51 +0000 hash(9): introduce hashalloc()/hashfree() KPI This is a more extendable version than traditional hashinit(9). It allows different kinds of slot headers with optional locks. Implement traditional hashinit()/hashdestroy() on top of it. Reviewed by: pouria, gallatin Differential Revision: https://reviews.freebsd.org/D55904 --- share/man/man9/Makefile | 2 + share/man/man9/hashalloc.9 | 314 +++++++++++++++++++++++++++++++++++ share/man/man9/hashinit.9 | 9 +- sys/kern/subr_hash.c | 406 +++++++++++++++++++++++++++++++++++++++------ sys/sys/hash.h | 37 +++++ 5 files changed, 712 insertions(+), 56 deletions(-) diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile index 31a3f886d0f3..29c822c10eb2 100644 --- a/share/man/man9/Makefile +++ b/share/man/man9/Makefile @@ -174,6 +174,7 @@ MAN= accept_filter.9 \ gone_in.9 \ hardclock.9 \ hash.9 \ + hashalloc.9 \ hashinit.9 \ hexdump.9 \ hhook.9 \ @@ -1216,6 +1217,7 @@ MLINKS+=hash.9 hash32.9 \ hash.9 hash32_strne.9 \ hash.9 jenkins_hash.9 \ hash.9 jenkins_hash32.9 +MLINKS+=hashalloc.9 hashfree.9 MLINKS+=hashinit.9 hashdestroy.9 \ hashinit.9 hashinit_flags.9 \ hashinit.9 phashinit.9 diff --git a/share/man/man9/hashalloc.9 b/share/man/man9/hashalloc.9 new file mode 100644 index 000000000000..c68444bf05ed --- /dev/null +++ b/share/man/man9/hashalloc.9 @@ -0,0 +1,314 @@ +.\" +.\" Copyright (c) 2026 Gleb Smirnoff +.\" 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 12, 2026 +.Dt HASHALLOC 9 +.Os +.Sh NAME +.Nm hashalloc , +.Nm hashfree +.Nd allocate and free kernel hash tables +.Sh SYNOPSIS +.In sys/malloc.h +.In sys/hash.h +.Ft void * +.Fn hashalloc "struct hashalloc_args *args" +.Ft void +.Fn hashfree "void *table" "struct hashalloc_args *args" +.Sh DESCRIPTION +The +.Fn hashalloc +and +.Fn hashfree +functions provide a flexible kernel programming interface (KPI) for allocating +and freeing hash tables with configurable bucket headers. +.Pp +.Pp +.Fn hashalloc +allocates memory for a hash table according to the parameters +specified in the +.Fa args +structure. +It computes an appropriate number of buckets (adjusting +.Fa args->size +as needed based on the requested +.Fa type ) , +allocates memory using +.Xr malloc 9 , +initializes each bucket's queue header (e.g., +.Vt LIST_HEAD , +.Vt TAILQ_HEAD , +etc.), and, if requested, initializes per-bucket locks. +The returned memory allocation can be used as an array of header structures +that start with initialized list header of the requested type followed by +initialized lock of requested type. +.Pp +.Fn hashfree +frees a hash table previously allocated by +.Fn hashalloc . +.Pp +Both functions require the caller to pass the same (or equivalent) +.Fa struct hashalloc_args +that specifies the desired configuration of the hash table and has the +following members: +.Bd -literal -offset indent +struct hashalloc_args { + /* Required arguments */ + size_t size; /* in: desired buckets, out: allocated */ + int mflags; /* malloc(9) flags */ + struct malloc_type *mtype; /* malloc(9) type */ + /* Optional arguments */ + size_t hdrsize; /* bucket header size; 0 = auto */ + enum { + HASH_TYPE_POWER2, + HASH_TYPE_PRIME, + } type; /* default HASH_TYPE_POWER2 */ + enum { + HASH_HEAD_LIST, + HASH_HEAD_CK_LIST, + HASH_HEAD_SLIST, + HASH_HEAD_CK_SLIST, + HASH_HEAD_STAILQ, + HASH_HEAD_CK_STAILQ, + HASH_HEAD_TAILQ, + } head; /* default HASH_HEAD_LIST */ + enum { + HASH_LOCK_NONE, + HASH_LOCK_MTX, + HASH_LOCK_RWLOCK, + HASH_LOCK_SX, + HASH_LOCK_RMLOCK, + HASH_LOCK_RMSLOCK, + } lock; /* default HASH_LOCK_NONE */ + int lopts; /* lock init options */ + const char *lname; /* lock name */ + int (*ctor)(void *); /* bucket constructor */ + void (*dtor)(void *); /* bucket destructor */ + /* Returned arguments */ + int error; /* error code in case of failure */ +}; +.Ed +.Pp +Argument members +.Fa size , +.Fa mflags +and +.Fa mtype +are required for the +.Fn hashalloc . +The argument +.Fa size , +as filled by earlier call to +.Fn hashalloc , +and +.Fa mtype +are required for the +.Fn hashfree . +The rest of arguments are optional and have reasonable defaults. +A hash table that was allocated with a non-default allocation arguments shall +pass the same arguments to +.Fn hashfree . +The structure shall be initialized with sparse C99 initializer as it may +contain opaque extension members. +The structure may be allocated on the stack of a caller. +.Bl -tag -width ".Fa hdrsize" +.It Fa size +Desired number of buckets for +.Fn hashalloc . +Upon a successful return +.Fn hashalloc +sets this member to the actual number allocated +(may be rounded up to power-of-2 or nearest prime). +The value returned by +.Fn hashalloc +shall be later supplied to the +.Fn hashfree . +.It Fa mflags , Fa mtype +Passed directly to +.Xr malloc 9 . +.It Fa hdrsize +Optional member that allows the caller to set a different (increased) size +of a bucket header. +.It Fa type +Bucket count policy: +.Bl -tag -width ".Dv HASH_TYPE_POWER2" +.It Dv HASH_TYPE_POWER2 +Rounded up to largest power of two less than or equal to argument +.Fa size . +.It Dv HASH_TYPE_PRIME +Sized to the largest prime number less than or equal to argument +.Fa size . +.El +.Pp +Default is +.Dv HASH_TYPE_POWER2 . +.It Fa head +Queue header type for each bucket, a +.Xr queue 3 +or +Concurrency-kit (CK) type. +.Bl -tag -width ".Dv HASH_HEAD_CK_STAILQ" +.It Dv HASH_HEAD_LIST +.Xr queue 3 +.Fd LIST_HEAD +.It Dv HASH_HEAD_CK_LIST +Concurrency-kit +.Fd CK_LIST_HEAD +.It Dv HASH_HEAD_SLIST +.Xr queue 3 +.Fd SLIST_HEAD +.It Dv HASH_HEAD_CK_SLIST +Concurrency-kit +.Fd CK_SLIST_HEAD +.It Dv HASH_HEAD_STAILQ +.Xr queue 3 +.Fd STAILQ_HEAD +.It Dv HASH_HEAD_CK_STAILQ +Concurrency-kit +.Fd CK_STAILQ_HEAD +.It Dv HASH_HEAD_TAILQ +.Xr queue 3 +.Fd TAILQ_HEAD +.El +.Pp +Default is +.Dv HASH_HEAD_LIST . +.It Fa lock +Synchronization: +.Bl -tag -width ".Dv HASH_LOCK_RWLOCK" +.It Dv HASH_LOCK_NONE +No per-bucket lock. +.It Dv HASH_LOCK_MTX +Per-bucket +.Xr mutex 9 . +.It Dv HASH_LOCK_RWLOCK +Per-bucket +.Xr rwlock 9 . +.It Dv HASH_LOCK_SX +Per-bucket +.Xr sx 9 . +.It Dv HASH_LOCK_RMLOCK +Per-bucket +.Xr rmlock 9 . +.It Dv HASH_LOCK_RMSLOCK +Per-bucket sleepable (rms) +.Xr rmlock 9 . +.El +.Pp +Default is +.Dv HASH_LOCK_NONE . +.It Fa lopts +Options passed to +.Xr mtx_init 9 , +.Xr rw_init 9 , +.Xr sx_init 9 , +.Xr rm_init 9 +or +.Xr rms_init 9 +(if locking is enabled). +.It Fa lname +Lock name. +This member is required unless +.Fa lock +is +.Dv HASH_LOCK_NONE . +.It Fa ctor +Optional constructor to be called by +.Fn hashalloc +for each bucket after list header and lock initialization. +May fail with error code, yielding in a failure of +.Fn hashalloc . +.It Fa dtor +Optional destructor to be called by +.Fn hashfree +for each bucket before lock destructors and list emptyness checks. +.El +.Sh RETURN VALUES +.Fn hashalloc +returns a pointer to the allocated and initialized hash table on success, or +.Dv NULL +on memory allocation failure or constructor failure. +The +.Fa error +member of +.Fa args +is set to appropriate error code. +When +.Fa mflags +in +.Fa args +contain the +.Va M_WAITOK +flag and the +.Fa ctor +is either NULL or never fails, then +.Fn hashalloc +never fails. +.Sh EXAMPLES +A simple mutex-protected hash table using TAILQ buckets: +.Bd -literal -offset indent +struct bucket { + TAILQ_HEAD(, foo) head; + struct mtx lock; +} *table; + +struct hashalloc_args args = { + .size = 9000, + .mflags = M_WAITOK, + .mtype = M_FOO, + .head = HASH_HEAD_TAILQ, + .lock = HASH_LOCK_MTX, + .lopts = MTX_DEF, + .lname = "bucket of foo", +}; + +table = hashalloc(&args); +/* Use table as array of struct bucket ... */ +mtx_lock(&table[hash].lock); +TAILQ_INSERT_HEAD(&table[hash].head, foo, next); + +/* Later */ +hashfree(table, &args); +.Ed +.Sh SEE ALSO +.Xr malloc 9 , +.Xr mutex 9 , +.Xr rmlock 9 , +.Xr rwlock 9 , +.Xr sx 9 , +.Xr queue 3 +.Sh HISTORY +The +.Nm +KPI first appeared in +.Fx 16.0 . +It supersedes older interface +.Fn hashinit , +that was available since +.Bx 4.4 , +by offering greater control over the hash table structure and locking +strategy. +.Sh AUTHORS +.An Gleb Smirnoff Aq Mt glebius@FreeBSD.org diff --git a/share/man/man9/hashinit.9 b/share/man/man9/hashinit.9 index 7d2f75d58d03..8c6a3888efe8 100644 --- a/share/man/man9/hashinit.9 +++ b/share/man/man9/hashinit.9 @@ -23,7 +23,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd April 29, 2016 +.Dd March 17, 2026 .Dt HASHINIT 9 .Os .Sh NAME @@ -44,6 +44,12 @@ .Ft "void *" .Fn phashinit "int nelements" "struct malloc_type *type" "u_long *nentries" .Fn phashinit_flags "int nelements" "struct malloc_type *type" "u_long *nentries" "int flags" +.Sh WARNING +This KPI is obsolete and scheduled for removal in +.Fx 17 . +Use +.Xr hashalloc 9 +instead. .Sh DESCRIPTION The .Fn hashinit , @@ -178,6 +184,7 @@ pointed to by .Fa hashtbl is not empty. .Sh SEE ALSO +.Xr hashalloc 9 , .Xr LIST_HEAD 3 , .Xr malloc 9 .Sh BUGS diff --git a/sys/kern/subr_hash.c b/sys/kern/subr_hash.c index 23bb205909b1..a9dada7b4eb6 100644 --- a/sys/kern/subr_hash.c +++ b/sys/kern/subr_hash.c @@ -1,6 +1,7 @@ /*- * SPDX-License-Identifier: BSD-3-Clause * + * Copyright (c) 2026 Gleb Smirnoff * Copyright (c) 1982, 1986, 1991, 1993 * The Regents of the University of California. All rights reserved. * (c) UNIX System Laboratories, Inc. @@ -37,6 +38,329 @@ #include #include #include +#include +#include +#include +#include +#include +#include +#include + +#define ASSERT_NOPAD(head, lock) _Static_assert( \ + sizeof(head ## _HEAD(, foo)) + sizeof(struct lock) == \ + sizeof(struct { head ## _HEAD(, foo) h; struct lock l; }), \ + "Structure of " #head "_HEAD and " #lock " has padding") +ASSERT_NOPAD(LIST, mtx); +ASSERT_NOPAD(CK_LIST, mtx); +ASSERT_NOPAD(SLIST, mtx); +ASSERT_NOPAD(CK_SLIST, mtx); +ASSERT_NOPAD(STAILQ, mtx); +ASSERT_NOPAD(CK_STAILQ, mtx); +ASSERT_NOPAD(TAILQ, mtx); +ASSERT_NOPAD(LIST, rwlock); +ASSERT_NOPAD(CK_LIST, rwlock); +ASSERT_NOPAD(SLIST, rwlock); +ASSERT_NOPAD(CK_SLIST, rwlock); +ASSERT_NOPAD(STAILQ, rwlock); +ASSERT_NOPAD(CK_STAILQ, rwlock); +ASSERT_NOPAD(TAILQ, rwlock); +ASSERT_NOPAD(LIST, sx); +ASSERT_NOPAD(CK_LIST, sx); +ASSERT_NOPAD(SLIST, sx); +ASSERT_NOPAD(CK_SLIST, sx); +ASSERT_NOPAD(STAILQ, sx); +ASSERT_NOPAD(CK_STAILQ, sx); +ASSERT_NOPAD(TAILQ, sx); +ASSERT_NOPAD(LIST, rmlock); +ASSERT_NOPAD(CK_LIST, rmlock); +ASSERT_NOPAD(SLIST, rmlock); +ASSERT_NOPAD(CK_SLIST, rmlock); +ASSERT_NOPAD(STAILQ, rmlock); +ASSERT_NOPAD(CK_STAILQ, rmlock); +ASSERT_NOPAD(TAILQ, rmlock); +ASSERT_NOPAD(LIST, rmslock); +ASSERT_NOPAD(CK_LIST, rmslock); +ASSERT_NOPAD(SLIST, rmslock); +ASSERT_NOPAD(CK_SLIST, rmslock); +ASSERT_NOPAD(STAILQ, rmslock); +ASSERT_NOPAD(CK_STAILQ, rmslock); +ASSERT_NOPAD(TAILQ, rmslock); +#undef ASSERT_NOPAD + +static inline void +hashalloc_sizes(struct hashalloc_args *args, size_t *hdrsize, size_t *loffset) +{ + switch (args->head) { + case HASH_HEAD_LIST: + *loffset = sizeof(LIST_HEAD(, foo)); + break; + case HASH_HEAD_CK_LIST: + *loffset = sizeof(CK_LIST_HEAD(, foo)); + break; + case HASH_HEAD_SLIST: + *loffset = sizeof(SLIST_HEAD(, foo)); + break; + case HASH_HEAD_CK_SLIST: + *loffset = sizeof(CK_SLIST_HEAD(, foo)); + break; + case HASH_HEAD_STAILQ: + *loffset = sizeof(STAILQ_HEAD(, foo)); + break; + case HASH_HEAD_CK_STAILQ: + *loffset = sizeof(CK_STAILQ_HEAD(, foo)); + break; + case HASH_HEAD_TAILQ: + *loffset = sizeof(TAILQ_HEAD(, foo)); + break; + } + + switch (args->lock) { + case HASH_LOCK_NONE: + *hdrsize = *loffset; + break; + case HASH_LOCK_MTX: + *hdrsize = *loffset + sizeof(struct mtx); + break; + case HASH_LOCK_RWLOCK: + *hdrsize = *loffset + sizeof(struct rwlock); + break; + case HASH_LOCK_SX: + *hdrsize = *loffset + sizeof(struct sx); + break; + case HASH_LOCK_RMLOCK: + *hdrsize = *loffset + sizeof(struct rmlock); + break; + case HASH_LOCK_RMSLOCK: + *hdrsize = *loffset + sizeof(struct rmslock); + break; + } + + if (args->hdrsize > 0) { + MPASS(args->hdrsize >= *hdrsize); + *hdrsize = args->hdrsize; + } else + args->hdrsize = *hdrsize; +} + +void * +hashalloc(struct hashalloc_args *args) +{ + static const int primes[] = { 1, 13, 31, 61, 127, 251, 509, 761, 1021, + 1531, 2039, 2557, 3067, 3583, 4093, 4603, 5119, 5623, 6143, 6653, + 7159, 7673, 8191, 12281, 16381, 24571, 32749 }; + void *mem; + size_t size, hdrsize, loffset; + u_int i; + + MPASS(args->version == 0); + MPASS(args->size > 0); + + switch (args->type) { + case HASH_TYPE_POWER2: + for (size = 1; size <= args->size; size <<= 1) + continue; + size >>= 1; + break; + case HASH_TYPE_PRIME: + for (i = nitems(primes); args->size < primes[i]; i--) + ; + size = primes[i]; + break; + } + + hashalloc_sizes(args, &hdrsize, &loffset); + + mem = malloc(size * hdrsize, args->mtype, args->mflags); + if (mem == NULL) { + args->error = ENOMEM; + return (NULL); + } + + switch (args->lock) { + case HASH_LOCK_NONE: + break; + case HASH_LOCK_MTX: + MPASS(args->lname != NULL); + if ((args->mflags & M_ZERO) == 0) + args->lopts |= MTX_NEW; + break; + case HASH_LOCK_RWLOCK: + MPASS(args->lname != NULL); + if ((args->mflags & M_ZERO) == 0) + args->lopts |= RW_NEW; + break; + case HASH_LOCK_SX: + MPASS(args->lname != NULL); + if ((args->mflags & M_ZERO) == 0) + args->lopts |= SX_NEW; + break; + case HASH_LOCK_RMLOCK: + MPASS(args->lname != NULL); + if ((args->mflags & M_ZERO) == 0) + args->lopts |= RM_NEW; + break; + case HASH_LOCK_RMSLOCK: + MPASS(args->lname != NULL); + break; + } + + for (i = 0; i < size; i++) { + void *slot; + + slot = (char *)mem + i * hdrsize; + switch (args->head) { + case HASH_HEAD_LIST: + LIST_INIT((LIST_HEAD(, foo) *)slot); + break; + case HASH_HEAD_CK_LIST: + CK_LIST_INIT((CK_LIST_HEAD(, foo) *)slot); + break; + case HASH_HEAD_SLIST: + SLIST_INIT((SLIST_HEAD(, foo) *)slot); + break; + case HASH_HEAD_CK_SLIST: + CK_SLIST_INIT((CK_SLIST_HEAD(, foo) *)slot); + break; + case HASH_HEAD_STAILQ: + STAILQ_INIT((STAILQ_HEAD(, foo) *)slot); + break; + case HASH_HEAD_CK_STAILQ: + CK_STAILQ_INIT((CK_STAILQ_HEAD(, foo) *)slot); + break; + case HASH_HEAD_TAILQ: + TAILQ_INIT((TAILQ_HEAD(, foo) *)slot); + break; + } + + slot = (char *)slot + loffset; + switch (args->lock) { + case HASH_LOCK_NONE: + break; + case HASH_LOCK_MTX: + mtx_init((struct mtx *)slot, args->lname, NULL, + args->lopts); + break; + case HASH_LOCK_RWLOCK: + rw_init_flags((struct rwlock *)slot, args->lname, + args->lopts); + break; + case HASH_LOCK_SX: + sx_init_flags((struct sx *)slot, args->lname, + args->lopts); + break; + case HASH_LOCK_RMLOCK: + rm_init_flags((struct rmlock *)slot, args->lname, + args->lopts); + break; + case HASH_LOCK_RMSLOCK: + rms_init((struct rmslock *)slot, args->lname); + break; + } + + if (args->ctor != NULL) { + slot = (char *)mem + i * hdrsize; + if ((args->error = args->ctor(slot)) != 0) { + slot = (char *)slot + loffset; + switch (args->lock) { + case HASH_LOCK_NONE: + break; + case HASH_LOCK_MTX: + mtx_destroy((struct mtx *)slot); + break; + case HASH_LOCK_RWLOCK: + rw_destroy((struct rwlock *)slot); + break; + case HASH_LOCK_SX: + sx_destroy((struct sx *)slot); + break; + case HASH_LOCK_RMLOCK: + rm_destroy((struct rmlock *)slot); + break; + case HASH_LOCK_RMSLOCK: + rms_destroy((struct rmslock *)slot); + break; + } + args->size = i; + hashfree(mem, args); + return (NULL); + } + } + } + + args->size = size; + return (mem); +} + +void +hashfree(void *mem, struct hashalloc_args *args) +{ + size_t hdrsize, loffset; + + if (__predict_false(mem == NULL)) + return; + + hashalloc_sizes(args, &hdrsize, &loffset); + + for (u_int i = 0; i < args->size; i++) { +#ifdef INVARIANTS + static const char msg[] = + "%s: hashtbl %p not empty (malloc type %s)"; +#endif +#define HPASS(exp) KASSERT(exp, (msg, __func__, mem, args->mtype->ks_shortdesc)) + void *slot; + + slot = (char *)mem + i * hdrsize; + if (args->dtor != NULL) + args->dtor(slot); + switch (args->head) { + case HASH_HEAD_LIST: + HPASS(LIST_EMPTY((LIST_HEAD(, foo) *)slot)); + break; + case HASH_HEAD_CK_LIST: + HPASS(CK_LIST_EMPTY((CK_LIST_HEAD(, foo) *)slot)); + break; + case HASH_HEAD_SLIST: + HPASS(SLIST_EMPTY((SLIST_HEAD(, foo) *)slot)); + break; + case HASH_HEAD_CK_SLIST: + HPASS(CK_SLIST_EMPTY((CK_SLIST_HEAD(, foo) *)slot)); + break; + case HASH_HEAD_STAILQ: + HPASS(STAILQ_EMPTY((STAILQ_HEAD(, foo) *)slot)); + break; + case HASH_HEAD_CK_STAILQ: + HPASS(CK_STAILQ_EMPTY((CK_STAILQ_HEAD(, foo) *)slot)); + break; + case HASH_HEAD_TAILQ: + HPASS(TAILQ_EMPTY((TAILQ_HEAD(, foo) *)slot)); + break; + } +#undef HPASS + + slot = (char *)slot + loffset; + switch (args->lock) { + case HASH_LOCK_NONE: + break; + case HASH_LOCK_MTX: + mtx_destroy((struct mtx *)slot); + break; + case HASH_LOCK_RWLOCK: + rw_destroy((struct rwlock *)slot); + break; + case HASH_LOCK_SX: + sx_destroy((struct sx *)slot); + break; + case HASH_LOCK_RMLOCK: + rm_destroy((struct rmlock *)slot); + break; + case HASH_LOCK_RMSLOCK: + rms_destroy((struct rmslock *)slot); + break; + } + } + + free(mem, args->mtype); +} static __inline int hash_mflags(int flags) @@ -52,26 +376,17 @@ void * hashinit_flags(int elements, struct malloc_type *type, u_long *hashmask, int flags) { - long hashsize, i; - LIST_HEAD(generic, generic) *hashtbl; - - KASSERT(elements > 0, ("%s: bad elements", __func__)); - /* Exactly one of HASH_WAITOK and HASH_NOWAIT must be set. */ - KASSERT((flags & HASH_WAITOK) ^ (flags & HASH_NOWAIT), - ("Bad flags (0x%x) passed to hashinit_flags", flags)); - - for (hashsize = 1; hashsize <= elements; hashsize <<= 1) - continue; - hashsize >>= 1; - - hashtbl = malloc((u_long)hashsize * sizeof(*hashtbl), type, - hash_mflags(flags)); - if (hashtbl != NULL) { - for (i = 0; i < hashsize; i++) - LIST_INIT(&hashtbl[i]); - *hashmask = hashsize - 1; - } - return (hashtbl); + struct hashalloc_args args = { + .size = elements, + .mtype = type, + .mflags = hash_mflags(flags), + }; + void *rv; + + rv = hashalloc(&args); + if (rv != NULL) + *hashmask = args.size - 1; + return (rv); } /* @@ -87,20 +402,14 @@ hashinit(int elements, struct malloc_type *type, u_long *hashmask) void hashdestroy(void *vhashtbl, struct malloc_type *type, u_long hashmask) { - LIST_HEAD(generic, generic) *hashtbl, *hp; + struct hashalloc_args args = { + .size = hashmask + 1, + .mtype = type, + }; - hashtbl = vhashtbl; - for (hp = hashtbl; hp <= &hashtbl[hashmask]; hp++) - KASSERT(LIST_EMPTY(hp), ("%s: hashtbl %p not empty " - "(malloc type %s)", __func__, hashtbl, type->ks_shortdesc)); - free(hashtbl, type); + hashfree(vhashtbl, &args); } -static const int primes[] = { 1, 13, 31, 61, 127, 251, 509, 761, 1021, 1531, - 2039, 2557, 3067, 3583, 4093, 4603, 5119, 5623, 6143, - 6653, 7159, 7673, 8191, 12281, 16381, 24571, 32749 }; -#define NPRIMES nitems(primes) - /* * General routine to allocate a prime number sized hash table with control of * memory flags. @@ -108,31 +417,18 @@ static const int primes[] = { 1, 13, 31, 61, 127, 251, 509, 761, 1021, 1531, void * phashinit_flags(int elements, struct malloc_type *type, u_long *nentries, int flags) { - long hashsize, i; - LIST_HEAD(generic, generic) *hashtbl; - - KASSERT(elements > 0, ("%s: bad elements", __func__)); - /* Exactly one of HASH_WAITOK and HASH_NOWAIT must be set. */ - KASSERT((flags & HASH_WAITOK) ^ (flags & HASH_NOWAIT), - ("Bad flags (0x%x) passed to phashinit_flags", flags)); - - for (i = 1, hashsize = primes[1]; hashsize <= elements;) { - i++; - if (i == NPRIMES) - break; - hashsize = primes[i]; - } - hashsize = primes[i - 1]; - - hashtbl = malloc((u_long)hashsize * sizeof(*hashtbl), type, - hash_mflags(flags)); - if (hashtbl == NULL) - return (NULL); + struct hashalloc_args args = { + .size = elements, + .mtype = type, + .type = HASH_TYPE_PRIME, + .mflags = hash_mflags(flags), + }; + void *rv; - for (i = 0; i < hashsize; i++) - LIST_INIT(&hashtbl[i]); - *nentries = hashsize; - return (hashtbl); + rv = hashalloc(&args); + if (rv != NULL) + *nentries = args.size; + return (rv); } /* diff --git a/sys/sys/hash.h b/sys/sys/hash.h index ac4bb35d70e9..5266632b1339 100644 --- a/sys/sys/hash.h +++ b/sys/sys/hash.h @@ -121,6 +121,43 @@ hash32_strne(const void *buf, size_t len, int end, const char **ep, } #ifdef _KERNEL +struct hashalloc_args { + u_int version; /* for extendability, now 0 */ + int error; /* out: error on failure */ + size_t size; /* in: wanted, out: allocated */ + size_t hdrsize; /* size of bucket header, 0 = auto */ + enum { + HASH_TYPE_POWER2 = 0, + HASH_TYPE_PRIME, + } type; + enum { + HASH_HEAD_LIST = 0, + HASH_HEAD_CK_LIST, + HASH_HEAD_SLIST, + HASH_HEAD_CK_SLIST, + HASH_HEAD_STAILQ, + HASH_HEAD_CK_STAILQ, + HASH_HEAD_TAILQ, + } head; + enum { + HASH_LOCK_NONE = 0, + HASH_LOCK_MTX, + HASH_LOCK_RWLOCK, + HASH_LOCK_SX, + HASH_LOCK_RMLOCK, + HASH_LOCK_RMSLOCK, + } lock; + int mflags; /* malloc(9) flags */ + int lopts; /* lock opts */ + struct malloc_type *mtype; /* malloc(9) type */ + const char *lname; /* lock name */ + int (*ctor)(void *); /* bucket constructor */ + void (*dtor)(void *); /* bucket destructor */ +}; + +void *hashalloc(struct hashalloc_args *); +void hashfree(void *, struct hashalloc_args *); + /* * Hashing function from Bob Jenkins. Implementation in libkern/jenkins_hash.c. */ From nobody Sun Apr 12 17:39:58 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4ftyV6703Fz6YR1C for ; Sun, 12 Apr 2026 17:39: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ftyV650QDz3LkK for ; Sun, 12 Apr 2026 17:39:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776015598; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=z8fM6WbX4BSgh2NscXnwLxAKs8I85E+BpODpxuGM9RQ=; b=g/BrVuVW9+vkDLPuFnX/sV9g2Pe4V7FReiIHrZDu/lw5r+OC7wFTYlS0O+3Sx/OK8UB6i+ Ou8ePmH5vh2c3MsfYAzdpH6fR8cCFxgEHSWsJ/7iN9Z8Xs6M25JKpftaVU1QYImMPmfvLE 0cryH8xBRJxIkAHOzG82rLovZjULW7xZtBbwZ92k2dCULpxMONvplTJota6t3sQBAWI0kW pg3/OaCD/1+ZYfcn+Ngo6dZ5PJtsVgulUYM1u0t1deP1Mu1p2qMA4QaDWcwVwNbzmqUC+s 1i1taSkHRcDA0WNg7fU+c/MKLYoPLYcnaO8D6n1oWxlC3tu4zEEO8ACt07EjQA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776015598; a=rsa-sha256; cv=none; b=AKGbUA/cxd5GwWVmUQz+al3Y/DjPMi1sG87JAZznSBj+s9gQdTeBPHFzTCyxskdJFRK3FK zlumYpP+cfFvD4/ZAJ6nuwTmXsjMJNDF0pO0wTBrOp0ANqH2awSemTF16pZjCZ7W0SFmvB xcVU/rTdrZ1xwySkVUMYXVKV/1sOnKgxT+ZzSoMl11u+vOgAs7zFJriNAdKRGUc7TjsVnc rLgpXOuzyJmCJF8VlMTLYIr2IJ4rju+BRuKnmplIzj9m5jf6lU1Mpe0SsN82HydMHqu8r2 S1+HiRW//IZnUBoR3QgKE3PD+foA4BBS6WGqAvn5YigNHeCS3n64rcHPu0ayww== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776015598; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=z8fM6WbX4BSgh2NscXnwLxAKs8I85E+BpODpxuGM9RQ=; b=ST3pyczH5qkTX8SCaXK2HOEAGEgg/AkYHDYb+0l5Jb0s4RhOw/vdaVVWdNZcRrckJ1eU8s glGnkVVpNNnco6c/CTkrXAMxHE9CnJjHnBTWBqS1ShTusygk9Ujcc6XwpXI4AIqEBEY9pz HvZcDG/B2nY8nBtLGYWc5idjDQiakbjIxouNO9p9TwfMXbWJPZP5viTxyW0q3b7LhHx6iD Q36PzJUbNvUBkcycT5wymd3R/p1IwhiPfupg1jyzJ+MDd9dKT+FqnOp/3VuOWEnrKJF1vS QecO9swONQXYFJPIIrvwA5z43HMQrg/hW2fyZhmpewmZi0z0af/YxFL/h8x2ow== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4ftyV64X58zB9Q for ; Sun, 12 Apr 2026 17:39:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 33737 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 12 Apr 2026 17:39:58 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 8e1513dc6738 - main - inpcb: use hashalloc(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: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8e1513dc67388b8551f202d19440815b8c9120e3 Auto-Submitted: auto-generated Date: Sun, 12 Apr 2026 17:39:58 +0000 Message-Id: <69dbd8ee.33737.398425df@gitrepo.freebsd.org> The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=8e1513dc67388b8551f202d19440815b8c9120e3 commit 8e1513dc67388b8551f202d19440815b8c9120e3 Author: Gleb Smirnoff AuthorDate: 2026-04-12 17:25:57 +0000 Commit: Gleb Smirnoff CommitDate: 2026-04-12 17:25:57 +0000 inpcb: use hashalloc(9) While here remove ipi_lbgrouphashmask, as it is always has the same value as ipi_porthashmask. Differential Revision: https://reviews.freebsd.org/D56174 --- sys/netinet/in_pcb.c | 52 +++++++++++++++++++++++++++++--------------------- sys/netinet/in_pcb.h | 3 +-- sys/netinet6/in6_pcb.c | 2 +- 3 files changed, 32 insertions(+), 25 deletions(-) diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c index f72260834a96..a997c643e8be 100644 --- a/sys/netinet/in_pcb.c +++ b/sys/netinet/in_pcb.c @@ -305,7 +305,7 @@ in_pcblbgroup_find(struct inpcb *inp) INP_HASH_LOCK_ASSERT(pcbinfo); hdr = &pcbinfo->ipi_lbgrouphashbase[ - INP_PCBPORTHASH(inp->inp_lport, pcbinfo->ipi_lbgrouphashmask)]; + INP_PCBPORTHASH(inp->inp_lport, pcbinfo->ipi_porthashmask)]; CK_LIST_FOREACH(grp, hdr, il_list) { struct inpcb *inp1; @@ -413,7 +413,7 @@ in_pcbinslbgrouphash(struct inpcb *inp, uint8_t numa_domain) } #endif - idx = INP_PCBPORTHASH(inp->inp_lport, pcbinfo->ipi_lbgrouphashmask); + idx = INP_PCBPORTHASH(inp->inp_lport, pcbinfo->ipi_porthashmask); hdr = &pcbinfo->ipi_lbgrouphashbase[idx]; CK_LIST_FOREACH(grp, hdr, il_list) { if (grp->il_cred->cr_prison == inp->inp_cred->cr_prison && @@ -474,7 +474,7 @@ in_pcbremlbgrouphash(struct inpcb *inp) INP_HASH_WLOCK_ASSERT(pcbinfo); hdr = &pcbinfo->ipi_lbgrouphashbase[ - INP_PCBPORTHASH(inp->inp_lport, pcbinfo->ipi_lbgrouphashmask)]; + INP_PCBPORTHASH(inp->inp_lport, pcbinfo->ipi_porthashmask)]; CK_LIST_FOREACH(grp, hdr, il_list) { for (i = 0; i < grp->il_inpcnt; ++i) { if (grp->il_inp[i] != inp) @@ -545,9 +545,6 @@ in_pcblbgroup_numa(struct inpcb *inp, int arg) return (error); } -/* Make sure it is safe to use hashinit(9) on CK_LIST. */ -CTASSERT(sizeof(struct inpcbhead) == sizeof(LIST_HEAD(, inpcb))); - /* * Initialize an inpcbinfo - a per-VNET instance of connections db. */ @@ -555,6 +552,11 @@ void in_pcbinfo_init(struct inpcbinfo *pcbinfo, struct inpcbstorage *pcbstor, u_int hash_nelements, u_int porthash_nelements) { + struct hashalloc_args ha = { + .mtype = M_PCB, + .mflags = M_WAITOK, + .head = HASH_HEAD_CK_LIST, + }; mtx_init(&pcbinfo->ipi_lock, pcbstor->ips_infolock_name, NULL, MTX_DEF); mtx_init(&pcbinfo->ipi_hash_lock, pcbstor->ips_hashlock_name, @@ -564,15 +566,17 @@ in_pcbinfo_init(struct inpcbinfo *pcbinfo, struct inpcbstorage *pcbstor, #endif CK_LIST_INIT(&pcbinfo->ipi_listhead); pcbinfo->ipi_count = 0; - pcbinfo->ipi_hash_exact = hashinit(hash_nelements, M_PCB, - &pcbinfo->ipi_hashmask); - pcbinfo->ipi_hash_wild = hashinit(hash_nelements, M_PCB, - &pcbinfo->ipi_hashmask); - porthash_nelements = imin(porthash_nelements, IPPORT_MAX + 1); - pcbinfo->ipi_porthashbase = hashinit(porthash_nelements, M_PCB, - &pcbinfo->ipi_porthashmask); - pcbinfo->ipi_lbgrouphashbase = hashinit(porthash_nelements, M_PCB, - &pcbinfo->ipi_lbgrouphashmask); + + ha.size = hash_nelements; + pcbinfo->ipi_hash_exact = hashalloc(&ha); + pcbinfo->ipi_hash_wild = hashalloc(&ha); + pcbinfo->ipi_hashmask = ha.size - 1; + + ha.size = imin(porthash_nelements, IPPORT_MAX + 1); + pcbinfo->ipi_porthashbase = hashalloc(&ha); + pcbinfo->ipi_lbgrouphashbase = hashalloc(&ha); + pcbinfo->ipi_porthashmask = ha.size - 1; + pcbinfo->ipi_zone = pcbstor->ips_zone; pcbinfo->ipi_smr = uma_zone_get_smr(pcbinfo->ipi_zone); } @@ -583,16 +587,20 @@ in_pcbinfo_init(struct inpcbinfo *pcbinfo, struct inpcbstorage *pcbstor, void in_pcbinfo_destroy(struct inpcbinfo *pcbinfo) { + struct hashalloc_args ha = { + .mtype = M_PCB, + .head = HASH_HEAD_CK_LIST, + }; KASSERT(pcbinfo->ipi_count == 0, ("%s: ipi_count = %u", __func__, pcbinfo->ipi_count)); - hashdestroy(pcbinfo->ipi_hash_exact, M_PCB, pcbinfo->ipi_hashmask); - hashdestroy(pcbinfo->ipi_hash_wild, M_PCB, pcbinfo->ipi_hashmask); - hashdestroy(pcbinfo->ipi_porthashbase, M_PCB, - pcbinfo->ipi_porthashmask); - hashdestroy(pcbinfo->ipi_lbgrouphashbase, M_PCB, - pcbinfo->ipi_lbgrouphashmask); + ha.size = pcbinfo->ipi_hashmask + 1; + hashfree(pcbinfo->ipi_hash_exact, &ha); + hashfree(pcbinfo->ipi_hash_wild, &ha); + ha.size = pcbinfo->ipi_porthashmask + 1; + hashfree(pcbinfo->ipi_porthashbase, &ha); + hashfree(pcbinfo->ipi_lbgrouphashbase, &ha); mtx_destroy(&pcbinfo->ipi_hash_lock); mtx_destroy(&pcbinfo->ipi_lock); } @@ -2107,7 +2115,7 @@ in_pcblookup_lbgroup(const struct inpcbinfo *pcbinfo, NET_EPOCH_ASSERT(); hdr = &pcbinfo->ipi_lbgrouphashbase[ - INP_PCBPORTHASH(lport, pcbinfo->ipi_lbgrouphashmask)]; + INP_PCBPORTHASH(lport, pcbinfo->ipi_porthashmask)]; /* * Search for an LB group match based on the following criteria: diff --git a/sys/netinet/in_pcb.h b/sys/netinet/in_pcb.h index 6f842f64775e..a1b547462d53 100644 --- a/sys/netinet/in_pcb.h +++ b/sys/netinet/in_pcb.h @@ -470,19 +470,18 @@ struct inpcbinfo { struct inpcbhead *ipi_hash_exact; /* (r:e/w:h) */ struct inpcbhead *ipi_hash_wild; /* (r:e/w:h) */ u_long ipi_hashmask; /* (c) */ + u_long ipi_porthashmask; /* (h) */ /* * Global hash of inpcbs, hashed by only local port number. */ struct inpcbhead *ipi_porthashbase; /* (h) */ - u_long ipi_porthashmask; /* (h) */ /* * Load balance groups used for the SO_REUSEPORT_LB option, * hashed by local port. */ struct inpcblbgrouphead *ipi_lbgrouphashbase; /* (r:e/w:h) */ - u_long ipi_lbgrouphashmask; /* (h) */ /* * Pointer to network stack instance diff --git a/sys/netinet6/in6_pcb.c b/sys/netinet6/in6_pcb.c index 216051156767..f8ce64a65998 100644 --- a/sys/netinet6/in6_pcb.c +++ b/sys/netinet6/in6_pcb.c @@ -879,7 +879,7 @@ in6_pcblookup_lbgroup(const struct inpcbinfo *pcbinfo, NET_EPOCH_ASSERT(); hdr = &pcbinfo->ipi_lbgrouphashbase[ - INP_PCBPORTHASH(lport, pcbinfo->ipi_lbgrouphashmask)]; + INP_PCBPORTHASH(lport, pcbinfo->ipi_porthashmask)]; /* * Search for an LB group match based on the following criteria: From nobody Sun Apr 12 17:39:59 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4ftyV80fS0z6YR1L for ; Sun, 12 Apr 2026 17:40: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ftyV75rB4z3LWC for ; Sun, 12 Apr 2026 17:39:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776015599; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xoV8t9FjZP7Jxv+MDJ7DmgcYHv/IywDlemC1QSXHUCk=; b=Gs9JpaEbkALd1FREe89b9sevgQvLqIEKdyye6vqvht+YJdjkJE/XAwUBnojeoqwk9Tdcj4 E3zXRLXhfil18/GG6KFqC/XjUxP6C0lOpl7lpUhI6XwyQ769TNRMMZvXNGmuAWUhkYMvGY fsCg1m9c4S8CPVPpvXkHDS0ithzazeG2ZucumhDAYIjoS0aIhYy9x2EyMpqu7GTqvP27u7 LPxRx28FiybcLKHRS46rWisZBusI30OO8day9cKTAMYTpNw9uLVO3wXWHyy1uBFyxYmLgI VYc0Yn63APxeHqBFiV2WoAVs8U5dlWyZUL1VeA1jrOTxBLgXAKBDNYtMzxJ1eA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776015599; a=rsa-sha256; cv=none; b=deipLxTStMfGFXOjgFExVmvE3cQPDj/DWpjdgeJqprnXTMgLoEaGoAaLDUiVKeapMApPRC hZp+dOqg++T9fPeASwqXkWGW/ZoPjdcFmZjJAOVg1HTuygz4M+zNnRi3bcmDifwqBqWiQQ BdapM14aAodKyrq9MvDgUqasgvXSo/pzKkZDcyZ+oRv39t0Jtao+L3cSYFWdFOgEpqAtEB rertgpTXiqg/JBnI2ectJct8DHqlszg8xsqRe/ORxHHlNWIjux2Ne8SdV4w0FW/pzAfQ6n EZ7rVJrlBC7yLvMAl/fZin4X8DsOByrBXqNbjYt5vJBUpaH9FssDpL7jDvb8IA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776015599; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xoV8t9FjZP7Jxv+MDJ7DmgcYHv/IywDlemC1QSXHUCk=; b=XuPcXNASL3maP8XnBeLzx+zmQQrqo6bdXWj8jKryCSTr5yU8X//gsbTQ0+aYeF5XZvaYc0 KL1UG4noldChal3wQaSHEhBh4Cb23SH+TMs7TMKXrIQN4Ybkyw/3r0HNMWT3zuFs2Ta+Cd N5J6nBdvGFjfr0EMC+ZrfoxuY6rQ4/cVKXyzS+Iv/90V4x0JU9qpfrMKqAmoETW2l9syi8 JlFF0pVCKJ7QjpYk7ikeF8ZND6r/zlq+eGeqyjrq7MosOSX7jBJJ/JXliKwTmX2UIZIx00 f6mU3zpZ0OZYToZEui8DCR28jRqYYJdcOgVknbfjAam/ZXr75rQBxmy4xfWs3Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4ftyV75LrxzBRt for ; Sun, 12 Apr 2026 17:39:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3411e by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 12 Apr 2026 17:39:59 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: adba114dfbfb - main - netinet: use hashalloc(9) for IP address hash List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: adba114dfbfb02c6f332237abf070cbcc480f914 Auto-Submitted: auto-generated Date: Sun, 12 Apr 2026 17:39:59 +0000 Message-Id: <69dbd8ef.3411e.7e7cbf5a@gitrepo.freebsd.org> The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=adba114dfbfb02c6f332237abf070cbcc480f914 commit adba114dfbfb02c6f332237abf070cbcc480f914 Author: Gleb Smirnoff AuthorDate: 2026-04-12 17:26:03 +0000 Commit: Gleb Smirnoff CommitDate: 2026-04-12 17:26:03 +0000 netinet: use hashalloc(9) for IP address hash While here, slightly restyle ip_vnet_init() and use sparse initializer for pfil_head_args. There is no functional change wrt to pfil(9) hook registration. Differential Revision: https://reviews.freebsd.org/D56175 --- sys/netinet/ip_input.c | 43 +++++++++++++++++++++++++++---------------- 1 file changed, 27 insertions(+), 16 deletions(-) diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c index 5800a0854ee5..8602cf0d5266 100644 --- a/sys/netinet/ip_input.c +++ b/sys/netinet/ip_input.c @@ -52,6 +52,7 @@ #include #include #include +#include #include #include @@ -175,9 +176,6 @@ VNET_DEFINE(struct in_ifaddrhead, in_ifaddrhead); /* first inet address */ VNET_DEFINE(struct in_ifaddrhashhead *, in_ifaddrhashtbl); /* inet addr hash table */ VNET_DEFINE(u_long, in_ifaddrhmask); /* mask for hash table */ -/* Make sure it is safe to use hashinit(9) on CK_LIST. */ -CTASSERT(sizeof(struct in_ifaddrhashhead) == sizeof(LIST_HEAD(, in_addr))); - #ifdef IPCTL_DEFMTU SYSCTL_INT(_net_inet_ip, IPCTL_DEFMTU, mtu, CTLFLAG_RW, &ip_mtu, 0, "Default MTU"); @@ -309,24 +307,32 @@ SYSCTL_PROC(_net_inet_ip, IPCTL_INTRDQDROPS, intr_direct_queue_drops, static void ip_vnet_init(void *arg __unused) { - struct pfil_head_args args; - CK_STAILQ_INIT(&V_in_ifaddrhead); - V_in_ifaddrhashtbl = hashinit(INADDR_NHASH, M_IFADDR, &V_in_ifaddrhmask); + + struct hashalloc_args ha = { + .size = INADDR_NHASH, + .mtype = M_IFADDR, + .mflags = M_WAITOK, + .head = HASH_HEAD_CK_LIST, + }; + V_in_ifaddrhashtbl = hashalloc(&ha); + V_in_ifaddrhmask = ha.size - 1; /* Initialize IP reassembly queue. */ ipreass_vnet_init(); /* Initialize packet filter hooks. */ - args.pa_version = PFIL_VERSION; - args.pa_flags = PFIL_IN | PFIL_OUT; - args.pa_type = PFIL_TYPE_IP4; - args.pa_headname = PFIL_INET_NAME; - V_inet_pfil_head = pfil_head_register(&args); - - args.pa_flags = PFIL_OUT; - args.pa_headname = PFIL_INET_LOCAL_NAME; - V_inet_local_pfil_head = pfil_head_register(&args); + struct pfil_head_args pa = { + .pa_version = PFIL_VERSION, + .pa_flags = PFIL_IN | PFIL_OUT, + .pa_type = PFIL_TYPE_IP4, + .pa_headname = PFIL_INET_NAME, + }; + V_inet_pfil_head = pfil_head_register(&pa); + + pa.pa_flags = PFIL_OUT; + pa.pa_headname = PFIL_INET_LOCAL_NAME; + V_inet_local_pfil_head = pfil_head_register(&pa); if (hhook_head_register(HHOOK_TYPE_IPSEC_IN, AF_INET, &V_ipsec_hhh_in[HHOOK_IPSEC_INET], @@ -423,7 +429,12 @@ ip_destroy(void *unused __unused) ipreass_destroy(); /* Cleanup in_ifaddr hash table; should be empty. */ - hashdestroy(V_in_ifaddrhashtbl, M_IFADDR, V_in_ifaddrhmask); + struct hashalloc_args ha = { + .mtype = M_IFADDR, + .head = HASH_HEAD_CK_LIST, + .size = V_in_ifaddrhmask + 1, + }; + hashfree(V_in_ifaddrhashtbl, &ha); } VNET_SYSUNINIT(ip, SI_SUB_PROTO_DOMAIN, SI_ORDER_THIRD, ip_destroy, NULL); From nobody Sun Apr 12 17:40:00 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4ftyV90wykz6YQpq for ; Sun, 12 Apr 2026 17:40: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ftyV872Bvz3LQk for ; Sun, 12 Apr 2026 17:40:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776015601; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aEEuw5i1AGOFWkEKyQ4vMH8q/qR03Y0RV0R+n3LO1Ko=; b=NX579xvnXDtGUmcaSULZaXm8zLU9Bes70nL7MU9VJiAYwMzm3IKAFPp5Vo0M8ElpaC1RiO 8Qm5IQgwMe25bJVbU3DT6//UGWZhfZlURVnH9ofijZAuaK6TVk4RF4+CqnhGOfJRDB60P0 XJEaIZmQSm/TpGrdOZfZDIt4YH2LCMsG8Lpc0DBP1JtF/cNJYBJ6cfVi3+fAPc1AG3hS6M WNRJFvKc6l4/4qhoZSbUlIi+AtagRpQ83ovQud0g/iBSPPb/YdUhNqIioYO1k51pglk0Jg KwhcoVTFcYu3sG0JWcPwREgjBH1vbN4YZ+u5PY85x6vmx1OLFHFum+N2wDlIPw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776015601; a=rsa-sha256; cv=none; b=OGfDr7Q3Hlez6kLxaH+4uRu8+0pcbnmW6XUhSVMBquyi35HlVaRCabfR8ALAmB3hG4c3Tm GsZtJNsoOXmuDsbu04eVQhEJgVlSJPl1T9he/ssLOSQUTC14yBbp6NyCWqe1RkgQKHOA98 9vIdd9ZYxgLVpG2KFvOpFQPk4lHQRimfomD7lErvCm4mVo9CBhC6a7rDpYt0e+TcS/OB5R xjPG8FxVN95zHsAjzfzFJn9MoTRvWlxtw7YzmSSJ1Ig2i5GdStAa4TDCx+FmI8q00Wp8dr pzcQyyhBvnyM8brQQ9008ROPZoRPqHDB8RijgFMxgo3cixArCKqZUSW4cP37Gw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776015601; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aEEuw5i1AGOFWkEKyQ4vMH8q/qR03Y0RV0R+n3LO1Ko=; b=hekICjy0MVyenEbMu8mQ0x96ziuI/0lB+d3yReg2IVU6eQ5h5PRePWsNIhghzD6x1pzES7 YPzz5R4poUGCTariJ3hIj83OvQMfdAgl770KRrp6OAgBqk3yXm1vIwQn5ODXte2EsAAyPO ctfBsUB560AenjOOshZy4/s6wSGH4zsZhgihsobI9NYPmC90b3ExYfI1C7nAqT7bykc79s koOruFoOQnwoI4/OnrCOgYoIPm8frxAW1fk3WogTGi4ze5mIeDmFKw4hqBwSHcKZ5x8ubj QRtgQgrK7NrXgRxZCfJ6a8E/C8MuDC9w7zwb1nxIczaRhkbJ7d0gtHvs1JBVnQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4ftyV85f2SzB9T for ; Sun, 12 Apr 2026 17:40:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 34387 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 12 Apr 2026 17:40:00 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 9992eb435829 - main - gif: use hashalloc(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: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9992eb435829a910a2a25c564bf8d2ad7c6557b0 Auto-Submitted: auto-generated Date: Sun, 12 Apr 2026 17:40:00 +0000 Message-Id: <69dbd8f0.34387.1ed93d05@gitrepo.freebsd.org> The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=9992eb435829a910a2a25c564bf8d2ad7c6557b0 commit 9992eb435829a910a2a25c564bf8d2ad7c6557b0 Author: Gleb Smirnoff AuthorDate: 2026-04-12 17:26:08 +0000 Commit: Gleb Smirnoff CommitDate: 2026-04-12 17:26:08 +0000 gif: use hashalloc(9) Functional change is that on destruction INVARIANTS checks will run. Also the mask is no longer hardcoded, so makes it easier to make hash size a tunable. Reviewed by: ae Differential Revision: https://reviews.freebsd.org/D56176 --- sys/net/if_gif.c | 21 --------------------- sys/net/if_gif.h | 4 ---- sys/netinet/in_gif.c | 27 +++++++++++++++++++++------ sys/netinet6/in6_gif.c | 27 +++++++++++++++++++++------ 4 files changed, 42 insertions(+), 37 deletions(-) diff --git a/sys/net/if_gif.c b/sys/net/if_gif.c index 272ab214a788..71bc8e1b64ce 100644 --- a/sys/net/if_gif.c +++ b/sys/net/if_gif.c @@ -254,27 +254,6 @@ static moduledata_t gif_mod = { DECLARE_MODULE(if_gif, gif_mod, SI_SUB_PSEUDO, SI_ORDER_ANY); MODULE_VERSION(if_gif, 1); -struct gif_list * -gif_hashinit(void) -{ - struct gif_list *hash; - int i; - - hash = malloc(sizeof(struct gif_list) * GIF_HASH_SIZE, - M_GIF, M_WAITOK); - for (i = 0; i < GIF_HASH_SIZE; i++) - CK_LIST_INIT(&hash[i]); - - return (hash); -} - -void -gif_hashdestroy(struct gif_list *hash) -{ - - free(hash, M_GIF); -} - #define MTAG_GIF 1080679712 static int gif_transmit(struct ifnet *ifp, struct mbuf *m) diff --git a/sys/net/if_gif.h b/sys/net/if_gif.h index c6692d3dd6bc..97a87c181a77 100644 --- a/sys/net/if_gif.h +++ b/sys/net/if_gif.h @@ -96,10 +96,6 @@ struct etherip_header { #define GIF_WAIT() epoch_wait_preempt(net_epoch_preempt) -/* Prototypes */ -struct gif_list *gif_hashinit(void); -void gif_hashdestroy(struct gif_list *); - void gif_input(struct mbuf *, struct ifnet *, int, uint8_t); int gif_output(struct ifnet *, struct mbuf *, const struct sockaddr *, struct route *); diff --git a/sys/netinet/in_gif.c b/sys/netinet/in_gif.c index ebe7a4a62903..1910ef12d6d0 100644 --- a/sys/netinet/in_gif.c +++ b/sys/netinet/in_gif.c @@ -46,6 +46,7 @@ #include #include #include +#include #include #include @@ -81,15 +82,17 @@ SYSCTL_INT(_net_inet_ip, IPCTL_GIF_TTL, gifttl, CTLFLAG_VNET | CTLFLAG_RW, */ VNET_DEFINE_STATIC(struct gif_list *, ipv4_hashtbl) = NULL; VNET_DEFINE_STATIC(struct gif_list *, ipv4_srchashtbl) = NULL; +VNET_DEFINE_STATIC(u_int, ipv4_hashmask); VNET_DEFINE_STATIC(struct gif_list, ipv4_list) = CK_LIST_HEAD_INITIALIZER(); #define V_ipv4_hashtbl VNET(ipv4_hashtbl) #define V_ipv4_srchashtbl VNET(ipv4_srchashtbl) +#define V_ipv4_hashmask VNET(ipv4_hashmask) #define V_ipv4_list VNET(ipv4_list) #define GIF_HASH(src, dst) (V_ipv4_hashtbl[\ - in_gif_hashval((src), (dst)) & (GIF_HASH_SIZE - 1)]) + in_gif_hashval((src), (dst)) & (V_ipv4_hashmask - 1)]) #define GIF_SRCHASH(src) (V_ipv4_srchashtbl[\ - fnv_32_buf(&(src), sizeof(src), FNV1_32_INIT) & (GIF_HASH_SIZE - 1)]) + fnv_32_buf(&(src), sizeof(src), FNV1_32_INIT) & (V_ipv4_hashmask - 1)]) #define GIF_HASH_SC(sc) GIF_HASH((sc)->gif_iphdr->ip_src.s_addr,\ (sc)->gif_iphdr->ip_dst.s_addr) static uint32_t @@ -218,8 +221,15 @@ in_gif_ioctl(struct gif_softc *sc, u_long cmd, caddr_t data) break; } if (V_ipv4_hashtbl == NULL) { - V_ipv4_hashtbl = gif_hashinit(); - V_ipv4_srchashtbl = gif_hashinit(); + struct hashalloc_args ha = { + .size = GIF_HASH_SIZE, + .mtype = M_GIF, + .mflags = M_WAITOK, + .head = HASH_HEAD_CK_LIST, + }; + V_ipv4_hashtbl = hashalloc(&ha); + V_ipv4_srchashtbl = hashalloc(&ha); + V_ipv4_hashmask = ha.size - 1; } error = in_gif_checkdup(sc, src->sin_addr.s_addr, dst->sin_addr.s_addr); @@ -438,9 +448,14 @@ in_gif_uninit(void) ip_encap_unregister_srcaddr(ipv4_srcaddrtab); } if (V_ipv4_hashtbl != NULL) { - gif_hashdestroy(V_ipv4_hashtbl); + struct hashalloc_args ha = { + .size = V_ipv4_hashmask + 1, + .mtype = M_GIF, + .head = HASH_HEAD_CK_LIST, + }; + hashfree(V_ipv4_hashtbl, &ha); V_ipv4_hashtbl = NULL; GIF_WAIT(); - gif_hashdestroy(V_ipv4_srchashtbl); + hashfree(V_ipv4_srchashtbl, &ha); } } diff --git a/sys/netinet6/in6_gif.c b/sys/netinet6/in6_gif.c index 5159faa1e2e8..18e13175f739 100644 --- a/sys/netinet6/in6_gif.c +++ b/sys/netinet6/in6_gif.c @@ -47,6 +47,7 @@ #include #include #include +#include #include #include @@ -86,15 +87,17 @@ SYSCTL_INT(_net_inet6_ip6, IPV6CTL_GIF_HLIM, gifhlim, */ VNET_DEFINE_STATIC(struct gif_list *, ipv6_hashtbl) = NULL; VNET_DEFINE_STATIC(struct gif_list *, ipv6_srchashtbl) = NULL; +VNET_DEFINE_STATIC(u_int, ipv6_hashmask); VNET_DEFINE_STATIC(struct gif_list, ipv6_list) = CK_LIST_HEAD_INITIALIZER(); #define V_ipv6_hashtbl VNET(ipv6_hashtbl) #define V_ipv6_srchashtbl VNET(ipv6_srchashtbl) +#define V_ipv6_hashmask VNET(ipv6_hashmask) #define V_ipv6_list VNET(ipv6_list) #define GIF_HASH(src, dst) (V_ipv6_hashtbl[\ - in6_gif_hashval((src), (dst)) & (GIF_HASH_SIZE - 1)]) + in6_gif_hashval((src), (dst)) & (V_ipv6_hashmask - 1)]) #define GIF_SRCHASH(src) (V_ipv6_srchashtbl[\ - fnv_32_buf((src), sizeof(*src), FNV1_32_INIT) & (GIF_HASH_SIZE - 1)]) + fnv_32_buf((src), sizeof(*src), FNV1_32_INIT) & (V_ipv6_hashmask - 1)]) #define GIF_HASH_SC(sc) GIF_HASH(&(sc)->gif_ip6hdr->ip6_src,\ &(sc)->gif_ip6hdr->ip6_dst) static uint32_t @@ -237,8 +240,15 @@ in6_gif_ioctl(struct gif_softc *sc, u_long cmd, caddr_t data) break; if (V_ipv6_hashtbl == NULL) { - V_ipv6_hashtbl = gif_hashinit(); - V_ipv6_srchashtbl = gif_hashinit(); + struct hashalloc_args ha = { + .size = GIF_HASH_SIZE, + .mtype = M_GIF, + .mflags = M_WAITOK, + .head = HASH_HEAD_CK_LIST, + }; + V_ipv6_hashtbl = hashalloc(&ha); + V_ipv6_srchashtbl = hashalloc(&ha); + V_ipv6_hashmask = ha.size - 1; } error = in6_gif_checkdup(sc, &src->sin6_addr, &dst->sin6_addr); @@ -469,9 +479,14 @@ in6_gif_uninit(void) ip6_encap_unregister_srcaddr(ipv6_srcaddrtab); } if (V_ipv6_hashtbl != NULL) { - gif_hashdestroy(V_ipv6_hashtbl); + struct hashalloc_args ha = { + .size = V_ipv6_hashmask + 1, + .mtype = M_GIF, + .head = HASH_HEAD_CK_LIST, + }; + hashfree(V_ipv6_hashtbl, &ha); V_ipv6_hashtbl = NULL; GIF_WAIT(); - gif_hashdestroy(V_ipv6_srchashtbl); + hashfree(V_ipv6_srchashtbl, &ha); } } From nobody Sun Apr 12 17:40:01 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4ftyVB39hhz6YR3P for ; Sun, 12 Apr 2026 17:40: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ftyV96mmJz3LHS for ; Sun, 12 Apr 2026 17:40:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776015602; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HRCSG1GAO+NsS2smcpgFE8NaMusIRHcQ8SBw83XL3Mo=; b=QR5pWY804TrZ1u0C0tAW3IpLm6ugvkbwvWYAZ7fZwwbruO7cwrJqIPtlmI1EXwXzHM56dY FDDCceZFdOL+o1DWmtn2ImjD7XyyabRoNvIMcfmHv6uy66hqS01oQwfjJBD4FdRvMJq0wo noT/DD7dOuTUMV2iax8lewzqitTf4kcSYTbY2Fg83F99J18ZgY6oZBvG5bEPQnp7ywtPl+ /Sm2tE9BRiqdPImAqRwXK85Rg03a6xdJRaB5FyS3aZg8SjHnr4U2l8dLVAbProSIijQwF9 5vfzh8wLcVNVoe5B2/F9iMe97Ucvt87DYUdv79UFHfhHm1B9Cc/6qOTlmhFbWg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776015602; a=rsa-sha256; cv=none; b=ldB2B0QJ4f7Z+cjXUdPE+0ni/UFo81uWCrFMRg7VZjj6QXD4ryMxkGLjkDxOg/gstGqPsa hfgmKdt0PKb/PYRAbupMK3ifFRYkEd1PbwHBRoLyLjP7ZYCbn77fRDX+FqxyKleBZQzs6h MR2fK0eDpaG8VxqFm0gGIrV9MMooURG5OV9vunORnDf1v5FBddQPB4ykTmayBda8cZ8HlA m5inbF9h7IUyEL6MPN2Hs+25BFdsCZARFVvoPvpoJpxIhu0E9yCVyjBSezizIY3pgVyyiN uLj3PiNQYdUyGZZT8uTlqx13UzQQAqigfWwgBIRcNBCJ1WrBnd3Q7TnGuRLu2w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776015602; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HRCSG1GAO+NsS2smcpgFE8NaMusIRHcQ8SBw83XL3Mo=; b=JSNeqpTvJIFIy0vPpzJaAMeqdWKwS9r4Ptne/FAphl42ernIN8zGoCptXvqwuWLTaYOTvR T4R1TRdi2GAFUvXKwZ5OBVEHQ5j1h/NBwM38LjIzn8bjzIcGpqJ17zhlC895jKYjCU12qc u+cGdJUQXRqYv+hOQ04K6FuorA7Xmb+Hkh4uv2iFA0mBH7hh2nnUW1h6km6vMEy3auAp/5 2OLPtaGXDyxkvrBo9BcJ8U99b6vKsp2UCLJLHfLo8Ff/JZQd79Mt1Hx/lH29/vwZyqF0Pq JJAdowsReGwzJbW2jAQ5L+14D5ZpDrnUSYdzdBIRiRMZeR1eSXFHHHmF27NUxQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4ftyV960FvzBjW for ; Sun, 12 Apr 2026 17:40:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 34294 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 12 Apr 2026 17:40:01 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 87ef3067acbd - main - tcp lro: use hashalloc(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: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 87ef3067acbddbf85f0bdef6d53bdde2b51cbc50 Auto-Submitted: auto-generated Date: Sun, 12 Apr 2026 17:40:01 +0000 Message-Id: <69dbd8f1.34294.1d588e0c@gitrepo.freebsd.org> The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=87ef3067acbddbf85f0bdef6d53bdde2b51cbc50 commit 87ef3067acbddbf85f0bdef6d53bdde2b51cbc50 Author: Gleb Smirnoff AuthorDate: 2026-04-12 17:26:12 +0000 Commit: Gleb Smirnoff CommitDate: 2026-04-12 17:26:12 +0000 tcp lro: use hashalloc(9) Reviewed by: tuexen, rrs Differential Revision: https://reviews.freebsd.org/D56177 --- sys/netinet/tcp_lro.c | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/sys/netinet/tcp_lro.c b/sys/netinet/tcp_lro.c index 59358db6ecf9..06280bce2279 100644 --- a/sys/netinet/tcp_lro.c +++ b/sys/netinet/tcp_lro.c @@ -44,6 +44,7 @@ #include #include #include +#include #include #include @@ -190,13 +191,19 @@ tcp_lro_init_args(struct lro_ctrl *lc, struct ifnet *ifp, LIST_INIT(&lc->lro_free); LIST_INIT(&lc->lro_active); - /* create hash table to accelerate entry lookup */ - lc->lro_hash = phashinit_flags(lro_entries, M_LRO, &lc->lro_hashsz, - HASH_NOWAIT); + /* Create hash table to accelerate entry lookup. */ + struct hashalloc_args ha = { + .size = lro_entries, + .mtype = M_LRO, + .mflags = M_NOWAIT, + .type = HASH_TYPE_PRIME, + }; + lc->lro_hash = hashalloc(&ha); if (lc->lro_hash == NULL) { memset(lc, 0, sizeof(*lc)); return (ENOMEM); } + lc->lro_hashsz = ha.size; /* compute size to allocate */ size = (lro_mbufs * sizeof(struct lro_mbuf_sort)) + @@ -206,7 +213,11 @@ tcp_lro_init_args(struct lro_ctrl *lc, struct ifnet *ifp, /* check for out of memory */ if (lc->lro_mbuf_data == NULL) { - free(lc->lro_hash, M_LRO); + struct hashalloc_args ha = { + .size = lc->lro_hashsz, + .mtype = M_LRO, + }; + hashfree(lc->lro_hash, &ha); memset(lc, 0, sizeof(*lc)); return (ENOMEM); } @@ -503,8 +514,11 @@ tcp_lro_free(struct lro_ctrl *lc) lro_free_mbuf_chain(le->m_head); } - /* free hash table */ - free(lc->lro_hash, M_LRO); + struct hashalloc_args ha = { + .size = lc->lro_hashsz, + .mtype = M_LRO, + }; + hashfree(lc->lro_hash, &ha); lc->lro_hash = NULL; lc->lro_hashsz = 0; From nobody Sun Apr 12 17:40:02 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4ftyVC4lWhz6YR5w for ; Sun, 12 Apr 2026 17:40: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ftyVC0JlKz3Lkr for ; Sun, 12 Apr 2026 17:40:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776015603; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=a0nF4FI0tFYFZqvzsPVx5EKk160qjjea2sW11wrIsjA=; b=F9owCq8d182ki4kjtKsudPIxx/ux+GPDC2KgUQoaS9Bo8jDESt34MkaVOKtO+GcN2nocps kKddMpAAZ04lKbid+FV5iQeSUBWAsCEpiNQ0A6fmEV7FDNR/7KBSX22ixrldACNXyKq+r+ wjcf3UF7v5HxdZbWXQbgo0Er0DYOWYU+9H/sgrpolUu0BvkBueuAUvtZ3nJecfvxapCov8 DmeqzvMeNyvvsUO+w9l5nNQIvA0+CFDJkfALsLEQcI2/eBC2akATl4T9tPfV40nwZZ+x2I GWvN9f6nqM7hxYN1lSM/gT3raYgkqMLj0wkOwWtsIf0LbHAhb7p/hZ/ub2LIwg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776015603; a=rsa-sha256; cv=none; b=Xn2GmR75olwiA4nih3woN1N8SgTK7Neb1SKSDTDB+QfPO+f/U2C81XaY6O5OFgyCtzIPKA KuTNYXzMdICi+YzNJDdsr8r/RUXmBa2EV0I4bR1r3wLPyOBf/VgFj94Z1V+vd8b3LJRgvy 3T2s9xDrz7DrWZMVV0KGFWywOyF1sY2R/sGlIRmch8SWbPZNuJLrcSnpbX15mGBhbzBvG7 rqFzwMfzrYR41bblVWkPf82iv/jMf6I4dn1fSS4A/5UBfrLK9YOdTYygmOAsvS6TiTFdpG AUbEVYIorcZGJqiyFQbxh35Cd78Y4N62kLJ3HLW5V8psAFmtnZ8Zxm1bxCVXCg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776015603; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=a0nF4FI0tFYFZqvzsPVx5EKk160qjjea2sW11wrIsjA=; b=j/ADdI9OzI5nUzgghNkGd/P864/T1/WuXoSeE459sH12DcG1qUloTp2QGEaFRXn0bSG7rt QDuPo7p7p/fCYd0IClG2XFRDYvbUbNJWrk7TLYjmBdA69Dh5U+NwhS8sHGyBJs3LUVcraZ dbU0VscAhODxeZ/7LQ99Xqlg3wucF6MVsGwUiADI1Rr9jBlFXya+kq42/HqAe06cznBWp5 gbH22enJO3jl0JK3lvmvFwRHQGUzieghsFvmUi25u5fK16uUDNVnGDMKm4+MV6EB2FKD6d OTuiZuV6EYXp1LlpqwOc2b4hwIUqv3nUlpcfaLD8WqYddN02eSWRGZLunmZPUw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4ftyVB6Tv8zBjX for ; Sun, 12 Apr 2026 17:40:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 34152 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 12 Apr 2026 17:40:02 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: cd5ff4e841fb - main - pf: use hashalloc(9) for key, id, src-node and udp-endpoint hashes List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: cd5ff4e841fb4236fa07da61b7c94531148881b8 Auto-Submitted: auto-generated Date: Sun, 12 Apr 2026 17:40:02 +0000 Message-Id: <69dbd8f2.34152.1c60d46b@gitrepo.freebsd.org> The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=cd5ff4e841fb4236fa07da61b7c94531148881b8 commit cd5ff4e841fb4236fa07da61b7c94531148881b8 Author: Gleb Smirnoff AuthorDate: 2026-04-12 17:26:16 +0000 Commit: Gleb Smirnoff CommitDate: 2026-04-12 17:26:16 +0000 pf: use hashalloc(9) for key, id, src-node and udp-endpoint hashes Reviewed by: kp Differential Revision: https://reviews.freebsd.org/D56113 --- sys/net/pfvar.h | 3 +- sys/netpfil/pf/pf.c | 146 +++++++++++++++++++--------------------------------- 2 files changed, 55 insertions(+), 94 deletions(-) diff --git a/sys/net/pfvar.h b/sys/net/pfvar.h index 87ed701f66a7..70a391b3f07c 100644 --- a/sys/net/pfvar.h +++ b/sys/net/pfvar.h @@ -2621,9 +2621,8 @@ struct pf_ifspeed_v1 { #endif /* _KERNEL */ #ifdef _KERNEL -LIST_HEAD(pf_ksrc_node_list, pf_ksrc_node); struct pf_srchash { - struct pf_ksrc_node_list nodes; + LIST_HEAD(pf_ksrc_node_list, pf_ksrc_node) nodes; struct mtx lock; }; diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 90342f045763..4576ad6e41de 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -798,11 +798,11 @@ SYSCTL_NODE(_net, OID_AUTO, pf, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, VNET_DEFINE(u_long, pf_hashmask); VNET_DEFINE(u_long, pf_srchashmask); VNET_DEFINE(u_long, pf_udpendpointhashmask); -VNET_DEFINE_STATIC(u_long, pf_hashsize); +VNET_DEFINE_STATIC(u_long, pf_hashsize) = PF_HASHSIZ; #define V_pf_hashsize VNET(pf_hashsize) -VNET_DEFINE_STATIC(u_long, pf_srchashsize); +VNET_DEFINE_STATIC(u_long, pf_srchashsize) = PF_SRCHASHSIZ; #define V_pf_srchashsize VNET(pf_srchashsize) -VNET_DEFINE_STATIC(u_long, pf_udpendpointhashsize); +VNET_DEFINE_STATIC(u_long, pf_udpendpointhashsize) = PF_UDPENDHASHSIZ; #define V_pf_udpendpointhashsize VNET(pf_udpendpointhashsize) u_long pf_ioctl_maxcount = 65535; @@ -1429,18 +1429,13 @@ pf_mtag_initialize(void) void pf_initialize(void) { - struct pf_keyhash *kh; - struct pf_idhash *ih; - struct pf_srchash *sh; - struct pf_udpendpointhash *uh; - u_int i; - - if (V_pf_hashsize == 0 || !powerof2(V_pf_hashsize)) - V_pf_hashsize = PF_HASHSIZ; - if (V_pf_srchashsize == 0 || !powerof2(V_pf_srchashsize)) - V_pf_srchashsize = PF_SRCHASHSIZ; - if (V_pf_udpendpointhashsize == 0 || !powerof2(V_pf_udpendpointhashsize)) - V_pf_udpendpointhashsize = PF_UDPENDHASHSIZ; + struct hashalloc_args ha = { + .mflags = M_NOWAIT, /* see bf56a3fe47ef4 and bug 209475 */ + .mtype = M_PFHASH, + .type = HASH_TYPE_POWER2, + .head = HASH_HEAD_LIST, + .lock = HASH_LOCK_MTX, + }; V_pf_hashseed = arc4random(); @@ -1450,35 +1445,28 @@ pf_initialize(void) V_pf_limits[PF_LIMIT_STATES].zone = V_pf_state_z; uma_zone_set_max(V_pf_state_z, PFSTATE_HIWAT); uma_zone_set_warning(V_pf_state_z, "PF states limit reached"); - V_pf_state_key_z = uma_zcreate("pf state keys", sizeof(struct pf_state_key), pf_state_key_ctor, NULL, NULL, NULL, UMA_ALIGN_PTR, 0); - - V_pf_keyhash = mallocarray(V_pf_hashsize, sizeof(struct pf_keyhash), - M_PFHASH, M_NOWAIT | M_ZERO); - V_pf_idhash = mallocarray(V_pf_hashsize, sizeof(struct pf_idhash), - M_PFHASH, M_NOWAIT | M_ZERO); +retry_waitok: + ha.size = V_pf_hashsize; + ha.lname = "pf_keyhash"; + ha.lopts = MTX_DEF | MTX_DUPOK; + V_pf_keyhash = hashalloc(&ha); + ha.lname = "pf_idhash"; + ha.lopts = MTX_DEF; + V_pf_idhash = hashalloc(&ha); if (V_pf_keyhash == NULL || V_pf_idhash == NULL) { printf("pf: Unable to allocate memory for " "state_hashsize %lu.\n", V_pf_hashsize); - - free(V_pf_keyhash, M_PFHASH); - free(V_pf_idhash, M_PFHASH); - + hashfree(V_pf_keyhash, &ha); + hashfree(V_pf_idhash, &ha); V_pf_hashsize = PF_HASHSIZ; - V_pf_keyhash = mallocarray(V_pf_hashsize, - sizeof(struct pf_keyhash), M_PFHASH, M_WAITOK | M_ZERO); - V_pf_idhash = mallocarray(V_pf_hashsize, - sizeof(struct pf_idhash), M_PFHASH, M_WAITOK | M_ZERO); + ha.mflags = M_WAITOK; + goto retry_waitok; } - + V_pf_hashsize = ha.size; V_pf_hashmask = V_pf_hashsize - 1; - for (i = 0, kh = V_pf_keyhash, ih = V_pf_idhash; i <= V_pf_hashmask; - i++, kh++, ih++) { - mtx_init(&kh->lock, "pf_keyhash", NULL, MTX_DEF | MTX_DUPOK); - mtx_init(&ih->lock, "pf_idhash", NULL, MTX_DEF); - } /* Source nodes. */ V_pf_sources_z = uma_zcreate("pf source nodes", @@ -1487,45 +1475,40 @@ pf_initialize(void) V_pf_limits[PF_LIMIT_SRC_NODES].zone = V_pf_sources_z; uma_zone_set_max(V_pf_sources_z, PFSNODE_HIWAT); uma_zone_set_warning(V_pf_sources_z, "PF source nodes limit reached"); - - V_pf_srchash = mallocarray(V_pf_srchashsize, - sizeof(struct pf_srchash), M_PFHASH, M_NOWAIT | M_ZERO); + ha.size = V_pf_srchashsize; + ha.lname = "pf_srchash"; + ha.lopts = MTX_DEF; + ha.mflags = M_NOWAIT; +retry_waitok2: + V_pf_srchash = hashalloc(&ha); if (V_pf_srchash == NULL) { printf("pf: Unable to allocate memory for " "source_hashsize %lu.\n", V_pf_srchashsize); - - V_pf_srchashsize = PF_SRCHASHSIZ; - V_pf_srchash = mallocarray(V_pf_srchashsize, - sizeof(struct pf_srchash), M_PFHASH, M_WAITOK | M_ZERO); + ha.size = PF_SRCHASHSIZ; + ha.mflags = M_WAITOK; + goto retry_waitok2; } - + V_pf_srchashmask = ha.size; V_pf_srchashmask = V_pf_srchashsize - 1; - for (i = 0, sh = V_pf_srchash; i <= V_pf_srchashmask; i++, sh++) - mtx_init(&sh->lock, "pf_srchash", NULL, MTX_DEF); - /* UDP endpoint mappings. */ V_pf_udp_mapping_z = uma_zcreate("pf UDP mappings", sizeof(struct pf_udp_mapping), NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, 0); - V_pf_udpendpointhash = mallocarray(V_pf_udpendpointhashsize, - sizeof(struct pf_udpendpointhash), M_PFHASH, M_NOWAIT | M_ZERO); + ha.size = V_pf_udpendpointhashsize; + ha.lname = "pf_udpendpointhash"; + ha.mflags = M_NOWAIT; +retry_waitok3: + V_pf_udpendpointhash = hashalloc(&ha); if (V_pf_udpendpointhash == NULL) { printf("pf: Unable to allocate memory for " "udpendpoint_hashsize %lu.\n", V_pf_udpendpointhashsize); - - V_pf_udpendpointhashsize = PF_UDPENDHASHSIZ; - V_pf_udpendpointhash = mallocarray(V_pf_udpendpointhashsize, - sizeof(struct pf_udpendpointhash), M_PFHASH, M_WAITOK | M_ZERO); + ha.size = PF_UDPENDHASHSIZ; + ha.mflags = M_WAITOK; + goto retry_waitok3; } - + V_pf_udpendpointhashsize = ha.size; V_pf_udpendpointhashmask = V_pf_udpendpointhashsize - 1; - for (i = 0, uh = V_pf_udpendpointhash; - i <= V_pf_udpendpointhashmask; - i++, uh++) { - mtx_init(&uh->lock, "pf_udpendpointhash", NULL, - MTX_DEF | MTX_DUPOK); - } /* Anchors */ V_pf_anchor_z = uma_zcreate("pf anchors", @@ -1590,41 +1573,20 @@ pf_mtag_cleanup(void) void pf_cleanup(void) { - struct pf_keyhash *kh; - struct pf_idhash *ih; - struct pf_srchash *sh; - struct pf_udpendpointhash *uh; + struct hashalloc_args ha = { + .size = V_pf_hashsize, + .mtype = M_PFHASH, + .head = HASH_HEAD_LIST, + .lock = HASH_LOCK_MTX, + }; struct pf_send_entry *pfse, *next; - u_int i; - for (i = 0, kh = V_pf_keyhash, ih = V_pf_idhash; - i <= V_pf_hashmask; - i++, kh++, ih++) { - KASSERT(LIST_EMPTY(&kh->keys), ("%s: key hash not empty", - __func__)); - KASSERT(LIST_EMPTY(&ih->states), ("%s: id hash not empty", - __func__)); - mtx_destroy(&kh->lock); - mtx_destroy(&ih->lock); - } - free(V_pf_keyhash, M_PFHASH); - free(V_pf_idhash, M_PFHASH); - - for (i = 0, sh = V_pf_srchash; i <= V_pf_srchashmask; i++, sh++) { - KASSERT(LIST_EMPTY(&sh->nodes), - ("%s: source node hash not empty", __func__)); - mtx_destroy(&sh->lock); - } - free(V_pf_srchash, M_PFHASH); - - for (i = 0, uh = V_pf_udpendpointhash; - i <= V_pf_udpendpointhashmask; - i++, uh++) { - KASSERT(LIST_EMPTY(&uh->endpoints), - ("%s: udp endpoint hash not empty", __func__)); - mtx_destroy(&uh->lock); - } - free(V_pf_udpendpointhash, M_PFHASH); + hashfree(V_pf_keyhash, &ha); + hashfree(V_pf_idhash, &ha); + ha.size = V_pf_srchashsize; + hashfree(V_pf_srchash, &ha); + ha.size = V_pf_udpendpointhashsize; + hashfree(V_pf_udpendpointhash, &ha); STAILQ_FOREACH_SAFE(pfse, &V_pf_sendqueue, pfse_next, next) { m_freem(pfse->pfse_m); From nobody Sun Apr 12 18:07:52 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4ftz6P6wMcz6YSmS for ; Sun, 12 Apr 2026 18:07: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ftz6P4zY2z3S1r for ; Sun, 12 Apr 2026 18:07:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776017277; 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; bh=xxP0QfeJvZ6xJ04bJn4NhqX9EOGcusbcCBtEGad0510=; b=KEP6y/nE1A6MaqLxejGKvwNNjL35DosGbtky82JDpPae9strDF1FC+cOGKVd+VvfbefJ5j ZalBX/VwI57gk5zNdPff4KZUXOvyNMVMMxPFfQY7VA+avc4F0prM3Ov5WLBRExN3G7hZUr 9/34EjAIe90/Vl9rNXcRqZEVzR6Nsx7gDM8Z04oQ1aK4EoG1e1Gahre+p6cB0yxgZtVPY7 iV2qzJtOTTJ3cx86z9nFP+JLbiVGHUNfrH7aMgy9S7hCcH1TlCfTgraYv0pxRcpU+zAkq2 9GmnW214pEmsYftzglbbWw+e+tgfahYt8k6dcdrqCRoG2TznAmtlQpBA5mPlbw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776017277; a=rsa-sha256; cv=none; b=rc3/hWsMS/4TB8voCFWxMm5RU7yWm/0772Sj4KlU9cRr9W4kE5+e1ZzY5x+GQWhE+ijOin n22yCMG5X7sJb8xaZoChb8m/osbcLVJUB0xkDqODHkm92ceUh3uefpRkjz18yerfvBr8wy MDn2/bujEMFwqIBfXdZeOQRM10baPztY3oZvmx4K1p1f/3b4GvOGZS+bGKXAnZXjU94ZkD y65ni8aqZ4e+CYQMv1K9u3/iQ4efGVwBAIiA5vPNzXSJwWZ0xxZLvRF8sWQGykOBa9HJrj ljRqay8LonCBF4udiA6r65iEPsZWavq+MG4j3NqKoWJk3xYbMZICD0yDcCS6UQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776017277; 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; bh=xxP0QfeJvZ6xJ04bJn4NhqX9EOGcusbcCBtEGad0510=; b=a3H12MStxyegfhVDSrlszhmXdSuFBHKlLOSfgS4dvlckVkVDQRHmj+xdMWsJlF6Pd9Hb+5 uFMwqM0tiDcFubA0Y2u5EKl2PS3MAkSA1FdmGXTAjVTr4F/5wZJfFBCeMTwON9erDCBxnB Zz6K/yz+lHRc/qMmt3a4WygLlvHNjnmZ7dLWefBWnlC1IDmwGU0SSKXmZ/ITANZFTLzBJl xasTYdYB6O7nCtDkR+2DLnbVLo1re9ni4jz5dudIb0WKf6m1H4BD+8TED7RDKcAwiqaBc0 b6kWu80+LYlwazBjmZYHpYJAH+M8KzBPzSZIfuBN5xExu48vd/MzDyGM87meDA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4ftz6P3qnfzCFb for ; Sun, 12 Apr 2026 18:07:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 35fea by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 12 Apr 2026 18:07:52 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Po-Chuan Hsieh From: Enji Cooper Subject: git: 98118af4f08a - main - [OpenSSL] Add missing header file (openssl/ml_kem.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: ngie X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 98118af4f08a020c8c5925e933bdd523d6a6e8aa Auto-Submitted: auto-generated Date: Sun, 12 Apr 2026 18:07:52 +0000 Message-Id: <69dbdf78.35fea.5b98313f@gitrepo.freebsd.org> The branch main has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=98118af4f08a020c8c5925e933bdd523d6a6e8aa commit 98118af4f08a020c8c5925e933bdd523d6a6e8aa Author: Po-Chuan Hsieh AuthorDate: 2026-04-12 18:07:14 +0000 Commit: Enji Cooper CommitDate: 2026-04-12 18:07:24 +0000 [OpenSSL] Add missing header file (openssl/ml_kem.h) Add missing header file (openssl/ml_kem.h) of OpenSSL 3.5 Reviewed by: fluffy, ngie Approved by: ngie (maintainer) Differential Revision: https://reviews.freebsd.org/D56291 --- secure/lib/libcrypto/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/secure/lib/libcrypto/Makefile b/secure/lib/libcrypto/Makefile index 9d484e9d480c..f57f53a8c71f 100644 --- a/secure/lib/libcrypto/Makefile +++ b/secure/lib/libcrypto/Makefile @@ -635,7 +635,7 @@ 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+= kdf.h kdferr.h lhash.h macros.h md2.h md4.h md5.h mdc2.h ml_kem.h modes.h obj_mac.h INCS+= objects.h objectserr.h ocsp.h ocsperr.h opensslconf.h opensslv.h INCS+= ossl_typ.h param_build.h params.h pem.h pem2.h pemerr.h pkcs12.h pkcs12err.h pkcs7.h INCS+= pkcs7err.h prov_ssl.h proverr.h provider.h quic.h rand.h randerr.h rc2.h rc4.h rc5.h ripemd.h From nobody Sun Apr 12 18:10:10 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4ftz8y2NNkz6YT1d for ; Sun, 12 Apr 2026 18:10: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ftz8y23wRz3Snb for ; Sun, 12 Apr 2026 18:10:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776017410; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xugNoVN7sTdW/t2/lSy2vSHGvmqe8Nv7HnzOp0ymRH4=; b=f7VqrYWmadahDt9wMbApvClSmSuBIKRq/SjqcoC6HC3Xqm3NCDc6rAlBzCMRNuCBpquHm7 YCOxp8NWoqx8zN6KNJ21B2rdJuxflet1wAj7QxyatV3HT1ZWA764K5jcvTXW3nrcLVmbY1 fdEEijQo8K5stBUetdrCBu7I4FZy5KvL67Q/BzwgIAZW4p7ofHT0CvsRP1oBESaOSQCUC+ /MGYjnpfj7E5aAtpMSFJkQgLGtXgFXqkFgFaZGGsYOMOqQpeVEeaO0l0hPWQdv66qc+inE Uy4+/0m2IDtQe40Whkili4oq4btSGn9EsFkp2YiyDWObT0XbUp5x96PAcOER8w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776017410; a=rsa-sha256; cv=none; b=Z/D2Bafj2B54osk4GkTUj8vMFLVzaMiMwKHQS7O2I7jA6Ob+9AVJppvh8gInj3qlfLBe+T KJAHuKoWzdbpluQfY2YRBOmIWGFpwBBKPJ23gxiiSHSig8NAYWomTw0r9+C8tU4nKc03tb /92GA3z1f47at36LYG/VKXjKK5rvcUSlL4zX9UpaQl1aTtvy6TJuU0vZIq8zzSn3mkI0pA rYl9FTGFJvVGDEwlEg/d7BXuNeG4dH5+zHRMfmHQILC1adS5GBIlXGrYs3oFVqDpR6BtsD 5/O3RGkTle3hhNEWjk6eoFnLVPu0hR7Nma4mN6IDCYkc33p7I6Jjth9dC2NUrw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776017410; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xugNoVN7sTdW/t2/lSy2vSHGvmqe8Nv7HnzOp0ymRH4=; b=GwUkUpIRvY8Ft6tL8Bd5JMtNRDVGGquZq+x5PRbsYVNKXkfB+fBsbr8ua4NSd1yGiuNsrS EMQ/qJdFnpOggr+uhyLptWMK3bD4ATZOK6/T5APuxIwhvzDvrOgZw12bfDtwUMrGiasTgQ ZzO1wju2hDER6GaBgi4A8dU4CM67AcPauuDNQx9ibo6g+z59Twqv52HgU4upA00Uq5+b7N OHSz7LQYD7rWi+IBItWZi6Bq4sUFfG1puOp63pgJCzmS8I5JI7TGt2hi+92Hqs9WsqlIb+ Ed360mCuYZVE4ndzfENANO5bBziZxrZNHb/BNF1JEvako+kCWv4dKTHG+J6ctQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4ftz8y1QPwzCkq for ; Sun, 12 Apr 2026 18:10:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 38304 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 12 Apr 2026 18:10:10 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Vladimir Kondratyev Subject: git: 84488787f42b - main - iwmbtfw(8): Identify device type based on HCI quieries result List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: 84488787f42bc62b428da37793ac45d1411f2b74 Auto-Submitted: auto-generated Date: Sun, 12 Apr 2026 18:10:10 +0000 Message-Id: <69dbe002.38304.4d803701@gitrepo.freebsd.org> The branch main has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=84488787f42bc62b428da37793ac45d1411f2b74 commit 84488787f42bc62b428da37793ac45d1411f2b74 Author: Vladimir Kondratyev AuthorDate: 2026-04-12 18:09:22 +0000 Commit: Vladimir Kondratyev CommitDate: 2026-04-12 18:09:22 +0000 iwmbtfw(8): Identify device type based on HCI quieries result rather than on VID/PID. Later is not reliable for some types. VID/PID identification can be restored by specifying of -p option. Tested by: arrowd, wulf PR: 290639 MFC after: 1 week --- usr.sbin/bluetooth/iwmbtfw/iwmbt_fw.c | 105 +++++++++++++++++++++++++ usr.sbin/bluetooth/iwmbtfw/iwmbt_fw.h | 2 + usr.sbin/bluetooth/iwmbtfw/iwmbt_hw.c | 140 ++++++++++------------------------ usr.sbin/bluetooth/iwmbtfw/iwmbt_hw.h | 3 + usr.sbin/bluetooth/iwmbtfw/iwmbtfw.8 | 7 +- usr.sbin/bluetooth/iwmbtfw/main.c | 80 +++++++++++++++++-- 6 files changed, 232 insertions(+), 105 deletions(-) diff --git a/usr.sbin/bluetooth/iwmbtfw/iwmbt_fw.c b/usr.sbin/bluetooth/iwmbtfw/iwmbt_fw.c index 3a5cd9d42658..f71aacd6f2e9 100644 --- a/usr.sbin/bluetooth/iwmbtfw/iwmbt_fw.c +++ b/usr.sbin/bluetooth/iwmbtfw/iwmbt_fw.c @@ -31,6 +31,7 @@ #include #include +#include #include #include #include @@ -192,3 +193,107 @@ iwmbt_get_fwname_tlv(struct iwmbt_version_tlv *ver, const char *prefix, return (fwname); } + +int +iwmbt_parse_tlv(uint8_t *data, uint8_t datalen, + struct iwmbt_version_tlv *version) +{ + uint8_t status, type, len; + + status = *data++; + if (status != 0) + return (-1); + datalen--; + + while (datalen >= 2) { + type = *data++; + len = *data++; + datalen -= 2; + + if (datalen < len) + return (-1); + + switch (type) { + case IWMBT_TLV_CNVI_TOP: + assert(len == 4); + version->cnvi_top = le32dec(data); + break; + case IWMBT_TLV_CNVR_TOP: + assert(len == 4); + version->cnvr_top = le32dec(data); + break; + case IWMBT_TLV_CNVI_BT: + assert(len == 4); + version->cnvi_bt = le32dec(data); + break; + case IWMBT_TLV_CNVR_BT: + assert(len == 4); + version->cnvr_bt = le32dec(data); + break; + case IWMBT_TLV_DEV_REV_ID: + assert(len == 2); + version->dev_rev_id = le16dec(data); + break; + case IWMBT_TLV_IMAGE_TYPE: + assert(len == 1); + version->img_type = *data; + break; + case IWMBT_TLV_TIME_STAMP: + assert(len == 2); + version->min_fw_build_cw = data[0]; + version->min_fw_build_yy = data[1]; + version->timestamp = le16dec(data); + break; + case IWMBT_TLV_BUILD_TYPE: + assert(len == 1); + version->build_type = *data; + break; + case IWMBT_TLV_BUILD_NUM: + assert(len == 4); + version->min_fw_build_nn = *data; + version->build_num = le32dec(data); + break; + case IWMBT_TLV_SECURE_BOOT: + assert(len == 1); + version->secure_boot = *data; + break; + case IWMBT_TLV_OTP_LOCK: + assert(len == 1); + version->otp_lock = *data; + break; + case IWMBT_TLV_API_LOCK: + assert(len == 1); + version->api_lock = *data; + break; + case IWMBT_TLV_DEBUG_LOCK: + assert(len == 1); + version->debug_lock = *data; + break; + case IWMBT_TLV_MIN_FW: + assert(len == 3); + version->min_fw_build_nn = data[0]; + version->min_fw_build_cw = data[1]; + version->min_fw_build_yy = data[2]; + break; + case IWMBT_TLV_LIMITED_CCE: + assert(len == 1); + version->limited_cce = *data; + break; + case IWMBT_TLV_SBE_TYPE: + assert(len == 1); + version->sbe_type = *data; + break; + case IWMBT_TLV_OTP_BDADDR: + memcpy(&version->otp_bd_addr, data, sizeof(bdaddr_t)); + break; + default: + /* Ignore other types */ + break; + } + + datalen -= len; + data += len; + } + + return (0); +} diff --git a/usr.sbin/bluetooth/iwmbtfw/iwmbt_fw.h b/usr.sbin/bluetooth/iwmbtfw/iwmbt_fw.h index eb6909a1f91d..1763f8688ed0 100644 --- a/usr.sbin/bluetooth/iwmbtfw/iwmbt_fw.h +++ b/usr.sbin/bluetooth/iwmbtfw/iwmbt_fw.h @@ -152,5 +152,7 @@ extern char *iwmbt_get_fwname(struct iwmbt_version *ver, const char *suffix); extern char *iwmbt_get_fwname_tlv(struct iwmbt_version_tlv *ver, const char *prefix, const char *suffix); +extern int iwmbt_parse_tlv(uint8_t *data, uint8_t datalen, + struct iwmbt_version_tlv *ver); #endif diff --git a/usr.sbin/bluetooth/iwmbtfw/iwmbt_hw.c b/usr.sbin/bluetooth/iwmbtfw/iwmbt_hw.c index 255181b8f4bc..81f1fbe7c5ce 100644 --- a/usr.sbin/bluetooth/iwmbtfw/iwmbt_hw.c +++ b/usr.sbin/bluetooth/iwmbtfw/iwmbt_hw.c @@ -30,7 +30,6 @@ #include #include -#include #include #include #include @@ -408,6 +407,29 @@ iwmbt_load_fwfile(struct libusb_device_handle *hdl, return (0); } +int +iwmbt_bt_reset(struct libusb_device_handle *hdl) +{ + int ret, transferred; + static struct iwmbt_hci_cmd cmd = { + .opcode = htole16(0x0c03), + .length = 0, + }; + uint8_t buf[IWMBT_HCI_MAX_EVENT_SIZE]; + + ret = iwmbt_hci_command(hdl, + &cmd, + buf, + sizeof(buf), + &transferred, + IWMBT_HCI_CMD_TIMEOUT); + + if (ret < 0) + iwmbt_debug("HCI reset command failed: code=%d", ret); + + return (ret); +} + int iwmbt_enter_manufacturer(struct libusb_device_handle *hdl) { @@ -502,8 +524,8 @@ iwmbt_get_version(struct libusb_device_handle *hdl, } int -iwmbt_get_version_tlv(struct libusb_device_handle *hdl, - struct iwmbt_version_tlv *version) +iwmbt_read_version_tlv(struct libusb_device_handle *hdl, + uint8_t *data, uint8_t *datalen) { int ret, transferred; struct iwmbt_hci_event_cmd_compl *event; @@ -512,8 +534,6 @@ iwmbt_get_version_tlv(struct libusb_device_handle *hdl, .length = 1, .data = { 0xff }, }; - uint8_t status, datalen, type, len; - uint8_t *data; uint8_t buf[255]; memset(buf, 0, sizeof(buf)); @@ -533,106 +553,30 @@ iwmbt_get_version_tlv(struct libusb_device_handle *hdl, } event = (struct iwmbt_hci_event_cmd_compl *)buf; - memcpy(version, event->data, sizeof(struct iwmbt_version)); + *datalen = event->header.length - IWMBT_HCI_EVENT_COMPL_HEAD_SIZE; + memcpy(data, event->data, *datalen); - datalen = event->header.length - IWMBT_HCI_EVENT_COMPL_HEAD_SIZE; - data = event->data; - status = *data++; - if (status != 0) - return (-1); - datalen--; + return (0); +} - while (datalen >= 2) { - type = *data++; - len = *data++; - datalen -= 2; +int +iwmbt_get_version_tlv(struct libusb_device_handle *hdl, + struct iwmbt_version_tlv *version) +{ - if (datalen < len) - return (-1); + uint8_t data[255]; + uint8_t datalen; + int ret; - switch (type) { - case IWMBT_TLV_CNVI_TOP: - assert(len == 4); - version->cnvi_top = le32dec(data); - break; - case IWMBT_TLV_CNVR_TOP: - assert(len == 4); - version->cnvr_top = le32dec(data); - break; - case IWMBT_TLV_CNVI_BT: - assert(len == 4); - version->cnvi_bt = le32dec(data); - break; - case IWMBT_TLV_CNVR_BT: - assert(len == 4); - version->cnvr_bt = le32dec(data); - break; - case IWMBT_TLV_DEV_REV_ID: - assert(len == 2); - version->dev_rev_id = le16dec(data); - break; - case IWMBT_TLV_IMAGE_TYPE: - assert(len == 1); - version->img_type = *data; - break; - case IWMBT_TLV_TIME_STAMP: - assert(len == 2); - version->min_fw_build_cw = data[0]; - version->min_fw_build_yy = data[1]; - version->timestamp = le16dec(data); - break; - case IWMBT_TLV_BUILD_TYPE: - assert(len == 1); - version->build_type = *data; - break; - case IWMBT_TLV_BUILD_NUM: - assert(len == 4); - version->min_fw_build_nn = *data; - version->build_num = le32dec(data); - break; - case IWMBT_TLV_SECURE_BOOT: - assert(len == 1); - version->secure_boot = *data; - break; - case IWMBT_TLV_OTP_LOCK: - assert(len == 1); - version->otp_lock = *data; - break; - case IWMBT_TLV_API_LOCK: - assert(len == 1); - version->api_lock = *data; - break; - case IWMBT_TLV_DEBUG_LOCK: - assert(len == 1); - version->debug_lock = *data; - break; - case IWMBT_TLV_MIN_FW: - assert(len == 3); - version->min_fw_build_nn = data[0]; - version->min_fw_build_cw = data[1]; - version->min_fw_build_yy = data[2]; - break; - case IWMBT_TLV_LIMITED_CCE: - assert(len == 1); - version->limited_cce = *data; - break; - case IWMBT_TLV_SBE_TYPE: - assert(len == 1); - version->sbe_type = *data; - break; - case IWMBT_TLV_OTP_BDADDR: - memcpy(&version->otp_bd_addr, data, sizeof(bdaddr_t)); - break; - default: - /* Ignore other types */ - break; - } + memset(data, 0, sizeof(data)); - datalen -= len; - data += len; + ret = iwmbt_read_version_tlv(hdl, data, &datalen); + if (ret < 0) { + iwmbt_debug("Can't get version tlv"); + return (-1); } - return (0); + return (iwmbt_parse_tlv(data, datalen, version)); } int diff --git a/usr.sbin/bluetooth/iwmbtfw/iwmbt_hw.h b/usr.sbin/bluetooth/iwmbtfw/iwmbt_hw.h index aac885dfd153..f1f1f56e0ca2 100644 --- a/usr.sbin/bluetooth/iwmbtfw/iwmbt_hw.h +++ b/usr.sbin/bluetooth/iwmbtfw/iwmbt_hw.h @@ -101,11 +101,14 @@ extern int iwmbt_load_ecdsa_header(struct libusb_device_handle *hdl, const struct iwmbt_firmware *fw); extern int iwmbt_load_fwfile(struct libusb_device_handle *hdl, const struct iwmbt_firmware *fw, uint32_t *boot_param, int offset); +extern int iwmbt_bt_reset(struct libusb_device_handle *hdl); extern int iwmbt_enter_manufacturer(struct libusb_device_handle *hdl); extern int iwmbt_exit_manufacturer(struct libusb_device_handle *hdl, enum iwmbt_mm_exit mode); extern int iwmbt_get_version(struct libusb_device_handle *hdl, struct iwmbt_version *version); +extern int iwmbt_read_version_tlv(struct libusb_device_handle *hdl, + uint8_t *data, uint8_t *datalen); extern int iwmbt_get_version_tlv(struct libusb_device_handle *hdl, struct iwmbt_version_tlv *version); extern int iwmbt_get_boot_params(struct libusb_device_handle *hdl, diff --git a/usr.sbin/bluetooth/iwmbtfw/iwmbtfw.8 b/usr.sbin/bluetooth/iwmbtfw/iwmbtfw.8 index fd0118655a67..342656613421 100644 --- a/usr.sbin/bluetooth/iwmbtfw/iwmbtfw.8 +++ b/usr.sbin/bluetooth/iwmbtfw/iwmbtfw.8 @@ -26,7 +26,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd July 15, 2025 +.Dd April 2, 2026 .Dt IWMBTFW 8 .Os .Sh NAME @@ -50,7 +50,8 @@ This utility will .Em only work with Intel Wireless 7260/8260/9260 and newer chip based Bluetooth USB devices, including AX and BE series wireless adapters. -The identification is currently based on USB vendor ID/product ID pair. +The identification is currently based on USB vendor ID/product ID pair +and result of HCI queries. The vendor ID should be 0x8087 .Pq Dv USB_VENDOR_INTEL2 and the product ID should be one of the supported devices. @@ -78,6 +79,8 @@ device name. Specify the directory containing the firmware files to search and upload. .It Fl h Display usage message and exit. +.It Fl p +Use only USB vendor ID/product ID pair for device model identification. .El .Sh EXIT STATUS .Ex -std diff --git a/usr.sbin/bluetooth/iwmbtfw/main.c b/usr.sbin/bluetooth/iwmbtfw/main.c index 1e11cc468015..560735fabd67 100644 --- a/usr.sbin/bluetooth/iwmbtfw/main.c +++ b/usr.sbin/bluetooth/iwmbtfw/main.c @@ -35,6 +35,7 @@ #include #include #include +#include #include #include #include @@ -50,6 +51,7 @@ int iwmbt_do_debug = 0; int iwmbt_do_info = 0; +static bool iwmbt_do_pidvid = false; enum iwmbt_device { IWMBT_DEVICE_UNKNOWN, @@ -228,6 +230,65 @@ iwmbt_dump_version_tlv(struct iwmbt_version_tlv *ver) ver->build_num); } +static enum iwmbt_device +iwmbt_identify(libusb_device_handle *hdl, enum iwmbt_device device) +{ + uint8_t data[255]; + uint8_t datalen, hw_platform, hw_variant; + struct iwmbt_version *ver = (struct iwmbt_version *)data; + struct iwmbt_version_tlv ver_tlv; + int r; + + if (device == IWMBT_DEVICE_7260) { + r = iwmbt_bt_reset(hdl); + if (r < 0) { + iwmbt_debug("iwmbt_bt_reset() failed!"); + return (IWMBT_DEVICE_UNKNOWN); + } + } + + memset(data, 0, sizeof(data)); + r = iwmbt_read_version_tlv(hdl, data, &datalen); + if (r < 0) { + iwmbt_debug("iwmbt_read_version_tlv() failed"); + return (IWMBT_DEVICE_UNKNOWN); + } + + if (datalen == sizeof(*ver) && ver->hw_platform == 0x37) { + switch (ver->hw_variant) { + case 0x07: + case 0x08: + return (IWMBT_DEVICE_7260); + case 0x0b: + case 0x0c: + case 0x11: + case 0x12: + case 0x13: + case 0x14: + return (IWMBT_DEVICE_8260); + default: + iwmbt_debug("Unsupported hw_variant (0x%2x)", + ver->hw_variant); + return (IWMBT_DEVICE_UNKNOWN); + } + } + + r = iwmbt_parse_tlv(data, datalen, &ver_tlv); + if (r < 0) { + iwmbt_debug("iwmbt_parse_tlv() failed"); + return (IWMBT_DEVICE_UNKNOWN); + } + + hw_platform = (ver_tlv.cnvi_bt >> 8) & 0xff; + hw_variant = (ver_tlv.cnvi_bt >> 16) & 0x3f; + + if (hw_platform != 0x37) { + iwmbt_debug("Unsupported hw_platform (0x%2x)", hw_platform); + return (IWMBT_DEVICE_UNKNOWN); + } + + return (hw_variant < 0x17 ? IWMBT_DEVICE_8260 : IWMBT_DEVICE_9260); +} static int iwmbt_init_firmware(libusb_device_handle *hdl, const char *firmware_path, @@ -377,11 +438,10 @@ usage(void) fprintf(stderr, " -f: firmware path (defaults to %s)\n", _DEFAULT_IWMBT_FIRMWARE_PATH); fprintf(stderr, " -I: enable informational output\n"); + fprintf(stderr, " -p: use PID/VID for model identification\n"); exit(127); } - - /* * Returns 0 on success. */ @@ -558,7 +618,6 @@ handle_9260(libusb_device_handle *hdl, char *firmware_dir) { int r; uint32_t boot_param; - struct iwmbt_version vl; struct iwmbt_version_tlv vt; char *firmware_path = NULL; @@ -618,9 +677,9 @@ handle_9260(libusb_device_handle *hdl, char *firmware_dir) /* Once device is running in operational mode we can ignore failures */ - r = iwmbt_get_version(hdl, &vl); + r = iwmbt_get_version_tlv(hdl, &vt); if (r == 0) - iwmbt_dump_version(&vl); + iwmbt_dump_version_tlv(&vt); /* Apply the device configuration (DDC) parameters */ firmware_path = iwmbt_get_fwname_tlv(&vt, firmware_dir, "ddc"); @@ -673,6 +732,9 @@ main(int argc, char *argv[]) case 'I': iwmbt_do_info = 1; break; + case 'p': + iwmbt_do_pidvid = true; + break; case 'h': default: usage(); @@ -730,6 +792,14 @@ main(int argc, char *argv[]) goto shutdown; } + if (!iwmbt_do_pidvid) { + iwmbt_device = iwmbt_identify(hdl, iwmbt_device); + if (iwmbt_device == IWMBT_DEVICE_UNKNOWN) { + iwmbt_err("Failed to identify device"); + goto shutdown; + } + } + switch(iwmbt_device) { case IWMBT_DEVICE_7260: retcode = handle_7260(hdl, firmware_dir); From nobody Sun Apr 12 18:10:11 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4ftz8z3mrXz6YSqq for ; Sun, 12 Apr 2026 18:10: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ftz8z2FhYz3Snc for ; Sun, 12 Apr 2026 18:10:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776017411; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=t5upHiGDG+sMy7DV0iZx5NeIi3/myqoRJ/rDWNQ00/8=; b=CnMmVOU3blSymKhvcnvontrMs/kw/eO0+Ora3g6suYrmeOmmBf02xZ6fx7Dx5B3PY5t/VS FxDSdUgtk03z149Dr+tsJ3DAOwsovdRYxUdVjT3NJfes1QkH79KdDWSIAgyzN+4dPNrW9P SyQBMRHiBTfcMK9vRCXxivz76lgNFn/Lj0NrnzORr/vwdmqdI5M1Lzg2CWyYP05VGv4eCk +FriQwaooKlErYMVcbynusHwSE3zWMd5BIspp/jMQWOHVK7pCn9N2rRK1MFE5HDwou9kdq hkBcytjFnXPe7mF0uIUi1ELGORQx8Er2xHHl22pkaRwLTEQvBw65T+bjBnbnfw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776017411; a=rsa-sha256; cv=none; b=Q3+jp9wUuAScMNsQcHGuSgSU4GWB+PJy/UmbQQXDQL3Z1+bOQIxyRSRfPEeo1XEEC/scJV n4cluzwwUgVFCGw0DUDWiOfK7dGZHusqILkPeKcAAhk/Ao7gH8Fcze6/Lwy4gJRVgC1RBd uigxRSZlr+xtEcqF3pX2yxHX27CwoO1H5aywU/aNF7groEi+036gkvawmhcFtCHXJG1Z/Y BP0wteX2AMBfwk7Bt/caYRd8DSlIGG+pNxB+IqOt6Nuk23voE+KyEJpXGCp/WIVvFVIsCS BGy8UQxO8xEZ8heI9cSX9M5iK0s4PuwleOyKxIV0CXEKKuWu8NYshKYmBNUFuQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776017411; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=t5upHiGDG+sMy7DV0iZx5NeIi3/myqoRJ/rDWNQ00/8=; b=wO/d2O4r/Wqzk3O7YdFPi6YB7Zkn+WbZZUBzPfU44P97Bv9uA1pzjDrc4/Bwc/PpRj0IJQ AA/hHT9cGgR7zxeVHIyxpJy4LyROQOrTG7/y4Dv5lj1iLkKGh1hj0oPHlSOEfGHJb5XUK1 Jrs5NPBEAGMNBPI2ORs4oeH71LRFE1NxwuFZoXP3K5C1km/SaOOsDSS6d71n10drJp5UVA UQYFY+ucTjRERrjnBTqTr8w2CrpxD188ty46eeWVwaK88zX6iuuPjdBFnTByQk3oXxyTsd NOc2QmdTliIYR0CNCIdlve0vfuTRLCkh6LgnqrP+TvcII8sG6a9Z99Lg4HnANw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4ftz8z1pPgzCVf for ; Sun, 12 Apr 2026 18:10:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 38191 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 12 Apr 2026 18:10:11 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Vladimir Kondratyev Subject: git: 2ba6ce584a8c - main - hid: Change Usage Page names to match documentation List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2ba6ce584a8cab75262cb86a5daf310d6706890c Auto-Submitted: auto-generated Date: Sun, 12 Apr 2026 18:10:11 +0000 Message-Id: <69dbe003.38191.7e8aa71e@gitrepo.freebsd.org> The branch main has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=2ba6ce584a8cab75262cb86a5daf310d6706890c commit 2ba6ce584a8cab75262cb86a5daf310d6706890c Author: Vladimir Kondratyev AuthorDate: 2026-04-12 18:09:22 +0000 Commit: Vladimir Kondratyev CommitDate: 2026-04-12 18:09:22 +0000 hid: Change Usage Page names to match documentation According to "HID Usage Tables FOR Universal Serial Bus (USB)" Usage Page ID range 0x93-0xF1CF is "Reserved" and Usage Page ID range 0xFF00-0xFFFF is "Vendor-defined". MFC after: 1 week --- sys/dev/hid/hid.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/sys/dev/hid/hid.h b/sys/dev/hid/hid.h index 02709d549a56..f164e48341ed 100644 --- a/sys/dev/hid/hid.h +++ b/sys/dev/hid/hid.h @@ -57,10 +57,14 @@ #define HUP_SCALE 0x008c #define HUP_CAMERA_CONTROL 0x0090 #define HUP_ARCADE 0x0091 -#define HUP_APPLE 0x00ff +#define HUP_RESERVED_FF 0x00ff #define HUP_FIDO 0xf1d0 -#define HUP_MICROSOFT 0xff00 -#define HUP_HP 0xff01 +#define HUP_VENDOR_00 0xff00 +#define HUP_VENDOR_01 0xff01 +/* XXX compat */ +#define HUP_APPLE HUP_RESERVED_FF +#define HUP_MICROSOFT HUP_VENDOR_00 +#define HUP_HP HUP_VENDOR_01 /* Usages, generic desktop */ #define HUG_POINTER 0x0001 From nobody Sun Apr 12 18:10:12 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4ftz9060v1z6YSwJ for ; Sun, 12 Apr 2026 18:10: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ftz902rkbz3SXD for ; Sun, 12 Apr 2026 18:10:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776017412; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4hK2UXywdEXr+Ayf1QOKee/8/zWQx8IFScZokh18y1g=; b=fToIyZJ70RdvHuSoIU/juQX9WH43gq0wF4z8XrnJhqGZjYg5pDNnkcJz5CZAIey4+ijNnM YY1pfde0gjGk7lN6jklRucgw8g0UXd/D3W+k2oWLiPxWGdHr48Kdya9ZsvdzdqnBgR3oI7 cZDrY+7VN3Z0IztZ1npF1lAx0kcBn6FmQhDSD6+bE5ABprpgSOxA4fU6cEJFKTcmWh47ue 9Bu6L55ZSL4RsRKIkhRGNtatqayxegx83PRyAGyJVOboKgfsY0fgc6cNvAZxmE/fV4d2fL kv+Vg4tjqFQ7+jZEKeaMh3ionZb7FXrJ9r7Erdu8XmiiYg0CGE5CwwWALyiMMg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776017412; a=rsa-sha256; cv=none; b=FFSkJ2WeC/giI4SJAi8UvcqI/aPCZ7tA/sP3OJ1d9+a2W4aId3ZwmJuRtTb5YeiBgwPDgq y2q0Lk654BM/xj57joL9T5TcHrAq9JFkT+ug+iom5BbDGK2dv0zioEpaL4p5Pt6IkG7QDK SFk1OlNGkbWTN+TGlWh4KfOfqkXbtYuE8x9zpYXKQwoeFjxCRtxGpKWw8a4pdt+/9hRV0S nK5rJ82wIPJT9bbiRR4KBqhxuAU8QodFqTh4Iiks6L2dJncdPsY+4U05LDVHsiHoZAhkwr YGcZC0fWcVpMCRa/uloOQoRfwDRvYUNWxisUx3uL45ORQPSkKX0JyrdtZ2b+0A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776017412; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4hK2UXywdEXr+Ayf1QOKee/8/zWQx8IFScZokh18y1g=; b=L7tsjUYYHfIyIvPaT+ML2AwqEoT/9HhuysAfJ83gSpB0u3WMnWtIoF4W3L5T/szFdY1Cl4 wNXZamaPgmNpRwqVgnsJK//xfRD+cIVUvJ/JN6vkGIvAg+AN+lSVyaja/Foeil0xclm/7h oId/qfsOIUURpzy/+L20zacNnSbVb1eShoLYWv/1mRsABgTnqbZoan4XJ+7V6JzMqRxKu7 97GlsU+fjk6dmne3zd7aSJUy8m6rtiUcUk945V3gqIZSz4ni8REQj/yQQy+gzhu3zPfEb8 PrNWwSkcZ9jUkSTSVT3twFsOMk7ylKAMLnE7EDKGiHLhF7pteGbqLyWTUarEYg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4ftz9029TSzCkr for ; Sun, 12 Apr 2026 18:10:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3784b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 12 Apr 2026 18:10:12 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Vladimir Kondratyev Subject: git: d6477cd3a5c3 - main - bcm5974(4): Fix pre-2015 Apple touchpad 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: wulf X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d6477cd3a5c3aec6a3492c8423852b09239583a3 Auto-Submitted: auto-generated Date: Sun, 12 Apr 2026 18:10:12 +0000 Message-Id: <69dbe004.3784b.b37ca27@gitrepo.freebsd.org> The branch main has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=d6477cd3a5c3aec6a3492c8423852b09239583a3 commit d6477cd3a5c3aec6a3492c8423852b09239583a3 Author: Vladimir Kondratyev AuthorDate: 2026-04-12 18:09:22 +0000 Commit: Vladimir Kondratyev CommitDate: 2026-04-12 18:09:22 +0000 bcm5974(4): Fix pre-2015 Apple touchpad support These devices appeared to stop sending reports via mouse USB interface after switching to RAW mode. Fix it with changing Usage of Top Level Collection to one found in HID report descriptor of proper interface. MFC after: 1 week --- sys/dev/hid/bcm5974.c | 74 +++++++++++++++++++++++++++------------------------ 1 file changed, 39 insertions(+), 35 deletions(-) diff --git a/sys/dev/hid/bcm5974.c b/sys/dev/hid/bcm5974.c index 442e8905e9bc..7af6fbc24635 100644 --- a/sys/dev/hid/bcm5974.c +++ b/sys/dev/hid/bcm5974.c @@ -407,6 +407,10 @@ static const struct bcm5974_dev_params bcm5974_dev_params[BCM5974_FLAG_MAX] = { HID_BVPI(BUS_USB, USB_VENDOR_##v, USB_PRODUCT_##v##_##p, i), \ HID_TLC(BCM5974_TLC_PAGE, BCM5974_TLC_USAGE), \ } +#define BCM5974_DEV_USB(v,p,i) { \ + HID_BVPI(BUS_USB, USB_VENDOR_##v, USB_PRODUCT_##v##_##p, i), \ + HID_TLC(HUP_VENDOR_00, 0x0001), \ +} #define APPLE_HID "APP000D" #define BCM5974_DEV_SPI(hid, i) { \ @@ -416,60 +420,60 @@ static const struct bcm5974_dev_params bcm5974_dev_params[BCM5974_FLAG_MAX] = { static const struct hid_device_id bcm5974_devs[] = { /* MacbookAir1.1 */ - BCM5974_DEV(APPLE, WELLSPRING_ANSI, BCM5974_FLAG_WELLSPRING1), - BCM5974_DEV(APPLE, WELLSPRING_ISO, BCM5974_FLAG_WELLSPRING1), - BCM5974_DEV(APPLE, WELLSPRING_JIS, BCM5974_FLAG_WELLSPRING1), + BCM5974_DEV_USB(APPLE, WELLSPRING_ANSI, BCM5974_FLAG_WELLSPRING1), + BCM5974_DEV_USB(APPLE, WELLSPRING_ISO, BCM5974_FLAG_WELLSPRING1), + BCM5974_DEV_USB(APPLE, WELLSPRING_JIS, BCM5974_FLAG_WELLSPRING1), /* MacbookProPenryn, aka wellspring2 */ - BCM5974_DEV(APPLE, WELLSPRING2_ANSI, BCM5974_FLAG_WELLSPRING2), - BCM5974_DEV(APPLE, WELLSPRING2_ISO, BCM5974_FLAG_WELLSPRING2), - BCM5974_DEV(APPLE, WELLSPRING2_JIS, BCM5974_FLAG_WELLSPRING2), + BCM5974_DEV_USB(APPLE, WELLSPRING2_ANSI, BCM5974_FLAG_WELLSPRING2), + BCM5974_DEV_USB(APPLE, WELLSPRING2_ISO, BCM5974_FLAG_WELLSPRING2), + BCM5974_DEV_USB(APPLE, WELLSPRING2_JIS, BCM5974_FLAG_WELLSPRING2), /* Macbook5,1 (unibody), aka wellspring3 */ - BCM5974_DEV(APPLE, WELLSPRING3_ANSI, BCM5974_FLAG_WELLSPRING3), - BCM5974_DEV(APPLE, WELLSPRING3_ISO, BCM5974_FLAG_WELLSPRING3), - BCM5974_DEV(APPLE, WELLSPRING3_JIS, BCM5974_FLAG_WELLSPRING3), + BCM5974_DEV_USB(APPLE, WELLSPRING3_ANSI, BCM5974_FLAG_WELLSPRING3), + BCM5974_DEV_USB(APPLE, WELLSPRING3_ISO, BCM5974_FLAG_WELLSPRING3), + BCM5974_DEV_USB(APPLE, WELLSPRING3_JIS, BCM5974_FLAG_WELLSPRING3), /* MacbookAir3,2 (unibody), aka wellspring4 */ - BCM5974_DEV(APPLE, WELLSPRING4_ANSI, BCM5974_FLAG_WELLSPRING4), - BCM5974_DEV(APPLE, WELLSPRING4_ISO, BCM5974_FLAG_WELLSPRING4), - BCM5974_DEV(APPLE, WELLSPRING4_JIS, BCM5974_FLAG_WELLSPRING4), + BCM5974_DEV_USB(APPLE, WELLSPRING4_ANSI, BCM5974_FLAG_WELLSPRING4), + BCM5974_DEV_USB(APPLE, WELLSPRING4_ISO, BCM5974_FLAG_WELLSPRING4), + BCM5974_DEV_USB(APPLE, WELLSPRING4_JIS, BCM5974_FLAG_WELLSPRING4), /* MacbookAir3,1 (unibody), aka wellspring4 */ - BCM5974_DEV(APPLE, WELLSPRING4A_ANSI, BCM5974_FLAG_WELLSPRING4A), - BCM5974_DEV(APPLE, WELLSPRING4A_ISO, BCM5974_FLAG_WELLSPRING4A), - BCM5974_DEV(APPLE, WELLSPRING4A_JIS, BCM5974_FLAG_WELLSPRING4A), + BCM5974_DEV_USB(APPLE, WELLSPRING4A_ANSI, BCM5974_FLAG_WELLSPRING4A), + BCM5974_DEV_USB(APPLE, WELLSPRING4A_ISO, BCM5974_FLAG_WELLSPRING4A), + BCM5974_DEV_USB(APPLE, WELLSPRING4A_JIS, BCM5974_FLAG_WELLSPRING4A), /* Macbook8 (unibody, March 2011) */ - BCM5974_DEV(APPLE, WELLSPRING5_ANSI, BCM5974_FLAG_WELLSPRING5), - BCM5974_DEV(APPLE, WELLSPRING5_ISO, BCM5974_FLAG_WELLSPRING5), - BCM5974_DEV(APPLE, WELLSPRING5_JIS, BCM5974_FLAG_WELLSPRING5), + BCM5974_DEV_USB(APPLE, WELLSPRING5_ANSI, BCM5974_FLAG_WELLSPRING5), + BCM5974_DEV_USB(APPLE, WELLSPRING5_ISO, BCM5974_FLAG_WELLSPRING5), + BCM5974_DEV_USB(APPLE, WELLSPRING5_JIS, BCM5974_FLAG_WELLSPRING5), /* MacbookAir4,1 (unibody, July 2011) */ - BCM5974_DEV(APPLE, WELLSPRING6A_ANSI, BCM5974_FLAG_WELLSPRING6A), - BCM5974_DEV(APPLE, WELLSPRING6A_ISO, BCM5974_FLAG_WELLSPRING6A), - BCM5974_DEV(APPLE, WELLSPRING6A_JIS, BCM5974_FLAG_WELLSPRING6A), + BCM5974_DEV_USB(APPLE, WELLSPRING6A_ANSI, BCM5974_FLAG_WELLSPRING6A), + BCM5974_DEV_USB(APPLE, WELLSPRING6A_ISO, BCM5974_FLAG_WELLSPRING6A), + BCM5974_DEV_USB(APPLE, WELLSPRING6A_JIS, BCM5974_FLAG_WELLSPRING6A), /* MacbookAir4,2 (unibody, July 2011) */ - BCM5974_DEV(APPLE, WELLSPRING6_ANSI, BCM5974_FLAG_WELLSPRING6), - BCM5974_DEV(APPLE, WELLSPRING6_ISO, BCM5974_FLAG_WELLSPRING6), - BCM5974_DEV(APPLE, WELLSPRING6_JIS, BCM5974_FLAG_WELLSPRING6), + BCM5974_DEV_USB(APPLE, WELLSPRING6_ANSI, BCM5974_FLAG_WELLSPRING6), + BCM5974_DEV_USB(APPLE, WELLSPRING6_ISO, BCM5974_FLAG_WELLSPRING6), + BCM5974_DEV_USB(APPLE, WELLSPRING6_JIS, BCM5974_FLAG_WELLSPRING6), /* Macbook8,2 (unibody) */ - BCM5974_DEV(APPLE, WELLSPRING5A_ANSI, BCM5974_FLAG_WELLSPRING5A), - BCM5974_DEV(APPLE, WELLSPRING5A_ISO, BCM5974_FLAG_WELLSPRING5A), - BCM5974_DEV(APPLE, WELLSPRING5A_JIS, BCM5974_FLAG_WELLSPRING5A), + BCM5974_DEV_USB(APPLE, WELLSPRING5A_ANSI, BCM5974_FLAG_WELLSPRING5A), + BCM5974_DEV_USB(APPLE, WELLSPRING5A_ISO, BCM5974_FLAG_WELLSPRING5A), + BCM5974_DEV_USB(APPLE, WELLSPRING5A_JIS, BCM5974_FLAG_WELLSPRING5A), /* MacbookPro10,1 (unibody, June 2012) */ /* MacbookPro11,1-3 (unibody, June 2013) */ - BCM5974_DEV(APPLE, WELLSPRING7_ANSI, BCM5974_FLAG_WELLSPRING7), - BCM5974_DEV(APPLE, WELLSPRING7_ISO, BCM5974_FLAG_WELLSPRING7), - BCM5974_DEV(APPLE, WELLSPRING7_JIS, BCM5974_FLAG_WELLSPRING7), - - /* MacbookPro10,2 (unibody, October 2012) */ - BCM5974_DEV(APPLE, WELLSPRING7A_ANSI, BCM5974_FLAG_WELLSPRING7A), - BCM5974_DEV(APPLE, WELLSPRING7A_ISO, BCM5974_FLAG_WELLSPRING7A), - BCM5974_DEV(APPLE, WELLSPRING7A_JIS, BCM5974_FLAG_WELLSPRING7A), + BCM5974_DEV_USB(APPLE, WELLSPRING7_ANSI, BCM5974_FLAG_WELLSPRING7), + BCM5974_DEV_USB(APPLE, WELLSPRING7_ISO, BCM5974_FLAG_WELLSPRING7), + BCM5974_DEV_USB(APPLE, WELLSPRING7_JIS, BCM5974_FLAG_WELLSPRING7), + + /* MacbookPro10,2 (unibody, October 2012) */ + BCM5974_DEV_USB(APPLE, WELLSPRING7A_ANSI, BCM5974_FLAG_WELLSPRING7A), + BCM5974_DEV_USB(APPLE, WELLSPRING7A_ISO, BCM5974_FLAG_WELLSPRING7A), + BCM5974_DEV_USB(APPLE, WELLSPRING7A_JIS, BCM5974_FLAG_WELLSPRING7A), /* MacbookAir6,2 (unibody, June 2013) */ BCM5974_DEV(APPLE, WELLSPRING8_ANSI, BCM5974_FLAG_WELLSPRING8), From nobody Sun Apr 12 18:10:13 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4ftz914LXDz6YSXJ for ; Sun, 12 Apr 2026 18:10: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ftz9132nbz3Sfr for ; Sun, 12 Apr 2026 18:10:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776017413; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ejQIX8C1KFihRlFnTjA+cEgp5iJoIBeKeahcEjyT99M=; b=TGgati2eAWHA3FrdEr+BiX8Day5X6zGcVMDgPPzPHbo7af1PZ0wN381smoWMDCcKS29/p1 Nrx+nRuEGgnXTU2/rIHuPW+pRtIaPo/NfKbc5D7bUI6oxmz3s7b403AXKGk9c7xgwsahwV Ch92AUFMxfNnOXgH/cHom/oLaulAtbdFqnqQ57wkqg/3OWSdx6Ol2mBbcdDMdBK8aQBxMj r+VlirddWr96tmhfvDgzdf6xPGPy3KUj/ZOMPeuaPFekEjy0eHoz9JxWbl3S7umdCHljol yey8JxMRgsy9JiyYtBKcbGege5eDssWaCxDvtE272sqiwRe5eZz/xswYOWchQQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776017413; a=rsa-sha256; cv=none; b=e5aIDCNOqflzfipbwSCCBn4lWM9AkNiQnZAiKfpGypNwQFptPDohJggGZmpOf1mEJlEdDC Vn6F2E7jMU0DSbA8nmedQDIwscau4axuDvpu2ofCS9SeiGS3wR/Xazetone35CCrCvfrNA fp4zEGwaojyivuphXrgOWqeqP0F2kjMkLhE0ge5IMy2EqdigeqkLxJJZ7Y1jSBy1MlSECr j5c3KmPuWwAUjEPrpPiC/qXJ483B4uP0qqxrEX0orAvNMue72cg8d9So4cWnbkhYLfmHGF Ug72+nf9jamAqxjQ1eIl9H3amYpH0E6puvyObVX0nA0+jo2p17O2zzXPQcEEaA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776017413; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ejQIX8C1KFihRlFnTjA+cEgp5iJoIBeKeahcEjyT99M=; b=UBy29vXYoD979QYShu3pwzJcIkbwFklmp/ABtpugGGc/UC2qDS/kZ0xKvE0MfKuwKBIxCs XxycLHZv4Uu8RG8CP68G+D5UfFemLmEWgk9FbBys9RSQKRWHBJs1VCv4o1nfypuxRqJp1W 8KZwwHC014sQl8MKJ3dQWk/XCAyaGBOtYG62ybfCpG3JNsguZYNDHRUi97VYQLfywI73Jy QgKtNtDQpsiqbjqjLZ6ZOXZykCkG4fZbzQmV5vulNWyU3fuE9hNIsiZqJvqsJecfvpxX/R DzY2It7NDcy779eybXYCOoDbRuy6EE/sCJ9xUFIYq/dN/Y+/cm2xZZcPPgzPPg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4ftz912bHGzChZ for ; Sun, 12 Apr 2026 18:10:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 361d1 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 12 Apr 2026 18:10:13 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Vladimir Kondratyev Subject: git: 9d0404cfe92c - main - bcm5974(4): Do not handle pressure on non-ForceTouch devices List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9d0404cfe92c18b7697b3e4ad4a5790b12d2261e Auto-Submitted: auto-generated Date: Sun, 12 Apr 2026 18:10:13 +0000 Message-Id: <69dbe005.361d1.7601e80@gitrepo.freebsd.org> The branch main has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=9d0404cfe92c18b7697b3e4ad4a5790b12d2261e commit 9d0404cfe92c18b7697b3e4ad4a5790b12d2261e Author: Vladimir Kondratyev AuthorDate: 2026-04-12 18:09:23 +0000 Commit: Vladimir Kondratyev CommitDate: 2026-04-12 18:09:23 +0000 bcm5974(4): Do not handle pressure on non-ForceTouch devices They always report it value as zero breaking pressure-driven drivers like moused(8) and xf86-input-synaptics. MFC after: 1 week --- sys/dev/hid/bcm5974.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sys/dev/hid/bcm5974.c b/sys/dev/hid/bcm5974.c index 7af6fbc24635..e2efeb08eb2e 100644 --- a/sys/dev/hid/bcm5974.c +++ b/sys/dev/hid/bcm5974.c @@ -120,6 +120,7 @@ enum tp_type { /* list of device capability bits */ #define HAS_INTEGRATED_BUTTON 1 #define USES_COMPACT_REPORT 2 +#define SUPPORTS_FORCETOUCH 4 struct tp_type_params { uint8_t caps; /* device capability bitmask */ @@ -146,13 +147,13 @@ struct tp_type_params { .delta = 0, }, [TYPE4] = { - .caps = HAS_INTEGRATED_BUTTON, + .caps = HAS_INTEGRATED_BUTTON | SUPPORTS_FORCETOUCH, .button = 31, .offset = 23 * 2, .delta = 2, }, [TYPE_MT2U] = { - .caps = HAS_INTEGRATED_BUTTON | USES_COMPACT_REPORT, + .caps = HAS_INTEGRATED_BUTTON | USES_COMPACT_REPORT | SUPPORTS_FORCETOUCH, .button = 1, .offset = 12, .delta = 0, @@ -752,7 +753,8 @@ bcm5974_attach(device_t dev) BCM5974_ABS(sc->sc_evdev, ABS_MT_POSITION_X, sc->sc_params->x); BCM5974_ABS(sc->sc_evdev, ABS_MT_POSITION_Y, sc->sc_params->y); /* finger pressure */ - BCM5974_ABS(sc->sc_evdev, ABS_MT_PRESSURE, sc->sc_params->p); + if ((sc->sc_params->tp->caps & SUPPORTS_FORCETOUCH) != 0) + BCM5974_ABS(sc->sc_evdev, ABS_MT_PRESSURE, sc->sc_params->p); /* finger touch area */ BCM5974_ABS(sc->sc_evdev, ABS_MT_TOUCH_MAJOR, sc->sc_params->w); BCM5974_ABS(sc->sc_evdev, ABS_MT_TOUCH_MINOR, sc->sc_params->w); From nobody Sun Apr 12 18:10:14 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4ftz925SqJz6YT1j for ; Sun, 12 Apr 2026 18:10: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ftz923hl1z3Sg6 for ; Sun, 12 Apr 2026 18:10:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776017414; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JrYh/YyEekxPf9SiUWYy5JUbxF43TOrEJSGI+/JKa/s=; b=HF9Xix8becDRFjkIp+psy8n4gT98t0d+wFdAHVLztS8ZQ+JKcF4vUhSKNtHgE6h6pb0zkJ mAoKWswEnDaPk1h83Cd3kFEcN6kRlX/bLygzGboA5n8rGwAdFqnmfk673LgXjPsshUaALf TplPEvGMASepJXFHj+tbhuJuS2B7HW3CoNpa1rSOMxXj3Oel+hWhjOUbzurB9tLhyFtNYg BSPY65Mn27V+GcEHZ6JSmVjhi8S6qIrcNdNFzqOXbDTiOauzvGWdQlEkUwcMeDQu9Ae7Oi t83meUIEzSUCZi7RPt41b44WPehF+CnH985SlgG2alH2s90x0UHsH1Y/5jyckg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776017414; a=rsa-sha256; cv=none; b=P5DvGXEZ2fjbSW7aH6ECeZVzFGQeCMvJOc+kEFYUVLhktcfjikdbDJQ9Xp+NWD5DfCYGTw mXq5/yHi4AlV5WQF5FC9coeSjrTCp9zT+S6kUzDPziBC/uhmD3bUQY0CDb2sNMeF8jZY+k ZilFdii/HsUjuOE1AP7AlYrGamuAlsXmlTixmvmTKRzwPB+KVE8J6GD+wTRsd+dqPOVVfm qIdFhCB+MJ6AtFEP/E3RJYPPKy7AV0Ai9owI1rr0V+Aqx/fZ4gpQd3/vU4E0dH9iZGMsd4 OU4bj4IuPNttR7tzLyY/KeE2mBXDVHuTvocJBL7LRXX7yRLrXhRIejfGEjlQVQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776017414; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JrYh/YyEekxPf9SiUWYy5JUbxF43TOrEJSGI+/JKa/s=; b=xeCNTEYLaNzFPmRExW1iFQo3rUc+dQMoB2WqAw7WjtIcPu04ji1qBhOA7mBj7CSY0jt0ku OM/uBwUtE1rePNDVRelC8uV+73uKmyUr6Xusgjj0Gt4yOXt13WTtIpGpkJfYPhGSEsJCKm +oVPvnEQg36D0jr3h2N66CezxJ3d460oBA40x4FQhP3qHYpTvBtoNtM2TJVxhEe7pzvbTF /o9UsHuvoCgs8v+ktHrPag/bByWl9R8zskcNPHGW2mP1saNhvGCTqKKz4kdiOaq4BDOZ0k 7cEfmfQ0QMc8vRwFCIYwdOtfXj7q+84dzlI1t+N9Y3PGHI3E0ezt1Qr9UfLK7A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4ftz922zN5zCFf for ; Sun, 12 Apr 2026 18:10:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 377fb by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 12 Apr 2026 18:10:14 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Vladimir Kondratyev Subject: git: dc5a94962e21 - main - wsp(4): Do not handle pressure on non-ForceTouch devices List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: dc5a94962e21a267550a2c20a0c4707d06843942 Auto-Submitted: auto-generated Date: Sun, 12 Apr 2026 18:10:14 +0000 Message-Id: <69dbe006.377fb.51b61ee6@gitrepo.freebsd.org> The branch main has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=dc5a94962e21a267550a2c20a0c4707d06843942 commit dc5a94962e21a267550a2c20a0c4707d06843942 Author: Vladimir Kondratyev AuthorDate: 2026-04-12 18:09:23 +0000 Commit: Vladimir Kondratyev CommitDate: 2026-04-12 18:09:23 +0000 wsp(4): Do not handle pressure on non-ForceTouch devices They always report it value as zero breaking pressure-driven drivers like moused(8) and xf86-input-synaptics. MFC after: 1 week --- sys/dev/usb/input/wsp.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/dev/usb/input/wsp.c b/sys/dev/usb/input/wsp.c index f78d64f69c08..a78fac49491a 100644 --- a/sys/dev/usb/input/wsp.c +++ b/sys/dev/usb/input/wsp.c @@ -231,6 +231,7 @@ enum tp_type { /* list of device capability bits */ #define HAS_INTEGRATED_BUTTON 1 +#define SUPPORTS_FORCETOUCH 2 /* trackpad finger data block size */ #define FSIZE_TYPE1 (14 * 2) @@ -285,7 +286,7 @@ struct wsp_tp { .delta = 0, }, [TYPE4] = { - .caps = HAS_INTEGRATED_BUTTON, + .caps = HAS_INTEGRATED_BUTTON | SUPPORTS_FORCETOUCH, .button = BUTTON_TYPE4, .offset = FINGER_TYPE4, .fsize = FSIZE_TYPE4, @@ -896,7 +897,8 @@ wsp_attach(device_t dev) WSP_SUPPORT_ABS(sc->sc_evdev, ABS_MT_POSITION_X, sc->sc_params->x); WSP_SUPPORT_ABS(sc->sc_evdev, ABS_MT_POSITION_Y, sc->sc_params->y); /* finger pressure */ - WSP_SUPPORT_ABS(sc->sc_evdev, ABS_MT_PRESSURE, sc->sc_params->p); + if ((sc->sc_params->tp->caps & SUPPORTS_FORCETOUCH) != 0) + WSP_SUPPORT_ABS(sc->sc_evdev, ABS_MT_PRESSURE, sc->sc_params->p); /* finger major/minor axis */ WSP_SUPPORT_ABS(sc->sc_evdev, ABS_MT_TOUCH_MAJOR, sc->sc_params->w); WSP_SUPPORT_ABS(sc->sc_evdev, ABS_MT_TOUCH_MINOR, sc->sc_params->w); From nobody Sun Apr 12 18:10:15 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4ftz9400PFz6YT1m for ; Sun, 12 Apr 2026 18:10: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ftz934YZyz3Scc for ; Sun, 12 Apr 2026 18:10:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776017415; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=410Wmea5CFDhcjE4knFm6kvXy19QbH+P/pIKAmP6vIk=; b=AiwO4dgUhbeE3vWAYTtOV5vCuZzwUcPtZlG4MfOCd75tkGR9fYP/b1zAGSWswJl0jAgqPP 2b/Wea0h3sx4ysw+rPG37cQ1X3vuzdyPGDCRbmULISzVv1S0VEMxLelbJQ/5a5bIaAgGfD 6I8ytick8EKvewg6r9xXe2iKYh4VVDbkNFXKYIlhWmFfjmlXhHydFO9zNzkBOy2lYlv0Gx LlWVEaZUrB6S14ga+DQuUaD7MMeLacZgUypE5wl0SuZ2hVrwIfcG3dQqy7xcLnr0w2yH7B EfODqV5woIL6talRvUzBjRmTJdM8DcJFYhkhgrCcJz5m6YKHmuAdauG+y0jOpg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776017415; a=rsa-sha256; cv=none; b=rNR5s7k2QkAAV0uGid+yfxM5hrhT4nZBveMkf7L/QfmiA2ae2P0w82h9bN4oap3mc4Gj9N WZo/1Ogx5KH64usxIpAx9GTYbBlbCkgBHuih1p+/a/UAXl3/CVeMa7/HRN+Bz8VCbrwGGL 7CKSJl7yY4+lI37DH65JxUNM6QGyxBb82oVOppX0hbGyf4dLUln5JpOWvd9RWub6Ke01LK 79AKfNmQ0r9NjTGSx0kw272gg4DnMM3ae0KBMoZstaadkZgaQNiIHew872nF/G5EnvmRhy VKGmY1DAY04q9o6DTzKU8t8kqt1L0D9PhPu56hHaJ+rcjT3/hEJ2YxWdhpsWXQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776017415; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=410Wmea5CFDhcjE4knFm6kvXy19QbH+P/pIKAmP6vIk=; b=JQ8XaB2X/13vesiJHjmvHISqR+KTQzxyXmYNOk8YfvsNaUogsiivVGcY/zlY+gS75dj8Bi E4z+sW0kNbdSxhhyTjXF2CPZ7XkZz7ARZNsXvkdlTBG/hlBBVqyhbKXMSQxDWYGHQdy6CA 8KKxBxfFoqVYLo6qHspKkhviwc3t8qpmc1fWxiHk42R+pmJfatRdoJmpg4qe8PGxOoxdbZ Hk0rh8scOAG4ypMHZ3mVGgm1JOp3z+bECkvxgmObyItVhwhdcXbrLHkTmS6ChkfIHve0wt E6zedhuLBKSvRe9xePva/fQPUEji9kal+GEGh6d5MPKedfnSj/l7Jbgx0W7PRQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4ftz933NrnzCGs for ; Sun, 12 Apr 2026 18:10:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 380a2 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 12 Apr 2026 18:10:15 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Vladimir Kondratyev Subject: git: 817e6995a19c - main - wsp(4): Make evdev interface operational if sysmouse one is not opened List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: 817e6995a19cb6f35851d0191bb1099a73d98bb9 Auto-Submitted: auto-generated Date: Sun, 12 Apr 2026 18:10:15 +0000 Message-Id: <69dbe007.380a2.114a0c36@gitrepo.freebsd.org> The branch main has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=817e6995a19cb6f35851d0191bb1099a73d98bb9 commit 817e6995a19cb6f35851d0191bb1099a73d98bb9 Author: Vladimir Kondratyev AuthorDate: 2026-04-12 18:09:23 +0000 Commit: Vladimir Kondratyev CommitDate: 2026-04-12 18:09:23 +0000 wsp(4): Make evdev interface operational if sysmouse one is not opened Before this change evdev interface sent only copy of data sent through the sysmouse interface. It worked as /dev/wsp0 device node was automatcaly opened by devd(8) with starting of moused(8). Starting with 15.0 moused(8) does not open sysmouse interface by default thus making wsp(4) device dysfunctional. Fix it with adding extra checks of interfaces state. MFC after: 1 week --- sys/dev/usb/input/wsp.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/sys/dev/usb/input/wsp.c b/sys/dev/usb/input/wsp.c index a78fac49491a..2d7e3b796b17 100644 --- a/sys/dev/usb/input/wsp.c +++ b/sys/dev/usb/input/wsp.c @@ -1068,6 +1068,10 @@ wsp_intr_callback(struct usb_xfer *xfer, usb_error_t error) if (evdev_rcpt_mask & EVDEV_RCPT_HW_MOUSE) { evdev_push_key(sc->sc_evdev, BTN_LEFT, ibt); evdev_sync(sc->sc_evdev); + if ((sc->sc_fflags & FREAD) == 0 || + usb_fifo_put_bytes_max( + sc->sc_fifo.fp[USB_FIFO_RX]) == 0) + goto tr_setup; } #endif sc->sc_status.flags &= ~MOUSE_POSCHANGED; @@ -1357,7 +1361,12 @@ wsp_intr_callback(struct usb_xfer *xfer, usb_error_t error) case USB_ST_SETUP: tr_setup: /* check if we can put more data into the FIFO */ - if (usb_fifo_put_bytes_max( + if ( +#ifdef EVDEV_SUPPORT + ((evdev_rcpt_mask & EVDEV_RCPT_HW_MOUSE) != 0 && + (sc->sc_state & WSP_EVDEV_OPENED) != 0) || +#endif + usb_fifo_put_bytes_max( sc->sc_fifo.fp[USB_FIFO_RX]) != 0) { usbd_xfer_set_frame_len(xfer, 0, sc->tp_datalen); From nobody Sun Apr 12 18:35:30 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4ftzkB3tV3z6YVXm for ; Sun, 12 Apr 2026 18:35:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ftzkB1YdJz3ZjH for ; Sun, 12 Apr 2026 18:35:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776018930; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BnTz38dLQieC3Ojo3Tu5MRNx7/ntj75hJs/snVMpPIg=; b=bQhDPqSGbjOOKVibIiz5zBQa7a6BRY/E343C0Kic2eha+vFuJm27mwwcGC38Wug0AFnjb3 0UYkUTMOR8DZyXw8lzpQYOYxKFelRtxOfYEyg3E9PObWGh3O+9IEpTZ2LjjqFed8p8dudF umJsSTjfH13dmHccogavmQbXR0fzLrTbpwlPPTrDqn5xy3y5pvQf6LGma4bdQ8oAZuSxRF j5+mBGQ1T1xvL7cmXvMSRFCa5FENq65iQxoVpMYXdhk0SgCFtdvQ0TxzpzZYVCCweiMEGj /t+5FcI37vHoql3DcHEcsnetwXPytLpXWxv1NTr1RV25p6UGUp23JGZLjSiagw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776018930; a=rsa-sha256; cv=none; b=c8e3MODUqpW0S7P08nQfXu3fyskXGa0JF97bd4xoF+uQn4KScYKx9ishX1fG3YJsWjNIPH b3hajLPQ09BZtfDjjXxJyYIeUxz3YR6nUqxQuKkUVSmSMzxpOudFQV6uS4ZLUtss7xhUSP qARo9KF1ry/8egOYsR6KIvyNJ7Kfp0XSduVWYY6oFi9s5nDEPQs6ojPpVrXuJqU82horn1 BCl+jcAg3nAaEuM4w73PEwl9sI6If/Tffju4uDNwuVT09by6EJjjuR6f477CKQjCitwVPf roR/b3CKY9acY3CdIhqUN9abcKQqSFyBFWa5jNnGTCa/+YUzHW3tkfzjlWKwpA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776018930; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BnTz38dLQieC3Ojo3Tu5MRNx7/ntj75hJs/snVMpPIg=; b=KZgXxv70ZxACstCMA98iBpt70A1BuW2aMoOYv8g2JM7o/ZcDjVlF6et7fU2NS/KfBsrcPo 6ombr7DCV5nVbPticK+/YRkBEHgcrYP0UDEeJGPM6eUloTcnXoHIlyDECODECW3v+LtuEo KBEs3c73Tn8s1a/nlflSmrxgjdVSJSbet97wCyLQBZ3vF0xlIxd19iPGGWZPYj6BmrtgB3 Dw17tiunIKlDv6fi7KU5zHD8Jyd/7PG2kYCRkA5nf4f/dErHlhPCrYmbMGoktZT60dro3W z30bjveRyxnWkM8s2L/zqU9g13vJ/zmirddCzSjx2hF1sEhKPUyA15mzewneLQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4ftzkB0lF6zDDL for ; Sun, 12 Apr 2026 18:35:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3941d by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 12 Apr 2026 18:35:30 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 202370905f11 - main - inpcb: apply smr_advance(9)/smr_wait(9) trick only to reusable sockets List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: 202370905f11be4e2c7afa18e73d374204fda08e Auto-Submitted: auto-generated Date: Sun, 12 Apr 2026 18:35:30 +0000 Message-Id: <69dbe5f2.3941d.56c71509@gitrepo.freebsd.org> The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=202370905f11be4e2c7afa18e73d374204fda08e commit 202370905f11be4e2c7afa18e73d374204fda08e Author: Gleb Smirnoff AuthorDate: 2026-04-12 18:30:44 +0000 Commit: Gleb Smirnoff CommitDate: 2026-04-12 18:30:44 +0000 inpcb: apply smr_advance(9)/smr_wait(9) trick only to reusable sockets The protocols marked with PR_CONNREQUIRED can never go through pr_connect after being disconnected. This is a tiny improvement of fdb987bebddf0. While here push clearing of the addresses under the same condition. Although this clearing originates from pre-FreeBSD times, it actually makes sense only for protocols that can reconnect. Reviewed by: pouria, markj Differential Revision: https://reviews.freebsd.org/D55661 --- sys/netinet/in_pcb.c | 12 +++++++----- sys/netinet6/in6_pcb.c | 15 ++++++++------- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c index a997c643e8be..98421a7f2232 100644 --- a/sys/netinet/in_pcb.c +++ b/sys/netinet/in_pcb.c @@ -1433,11 +1433,13 @@ in_pcbdisconnect(struct inpcb *inp) in_pcbremhash_locked(inp); - /* See the comment in in_pcbinshash(). */ - inp->inp_smr = smr_advance(inp->inp_pcbinfo->ipi_smr); - inp->inp_laddr.s_addr = INADDR_ANY; - inp->inp_faddr.s_addr = INADDR_ANY; - inp->inp_fport = 0; + if ((inp->inp_socket->so_proto->pr_flags & PR_CONNREQUIRED) == 0) { + /* See the comment in in_pcbinshash(). */ + inp->inp_smr = smr_advance(inp->inp_pcbinfo->ipi_smr); + inp->inp_laddr.s_addr = INADDR_ANY; + inp->inp_faddr.s_addr = INADDR_ANY; + inp->inp_fport = 0; + } } #endif /* INET */ diff --git a/sys/netinet6/in6_pcb.c b/sys/netinet6/in6_pcb.c index f8ce64a65998..2d6e860a72ba 100644 --- a/sys/netinet6/in6_pcb.c +++ b/sys/netinet6/in6_pcb.c @@ -510,13 +510,14 @@ in6_pcbdisconnect(struct inpcb *inp) in_pcbremhash_locked(inp); - /* See the comment in in_pcbinshash(). */ - inp->inp_smr = smr_advance(inp->inp_pcbinfo->ipi_smr); - - /* XXX-MJ torn writes are visible to SMR lookup */ - memset(&inp->in6p_laddr, 0, sizeof(inp->in6p_laddr)); - memset(&inp->in6p_faddr, 0, sizeof(inp->in6p_faddr)); - inp->inp_fport = 0; + if ((inp->inp_socket->so_proto->pr_flags & PR_CONNREQUIRED) == 0) { + /* See the comment in in_pcbinshash(). */ + inp->inp_smr = smr_advance(inp->inp_pcbinfo->ipi_smr); + /* XXX-MJ torn writes are visible to SMR lookup */ + memset(&inp->in6p_laddr, 0, sizeof(inp->in6p_laddr)); + memset(&inp->in6p_faddr, 0, sizeof(inp->in6p_faddr)); + inp->inp_fport = 0; + } /* clear flowinfo - draft-itojun-ipv6-flowlabel-api-00 */ inp->inp_flow &= ~IPV6_FLOWLABEL_MASK; } From nobody Sun Apr 12 18:35:31 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4ftzkC3B11z6YW73 for ; Sun, 12 Apr 2026 18:35: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ftzkC2BWNz3Zwg for ; Sun, 12 Apr 2026 18:35:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776018931; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=opfrPQ9Ki0sYTNcJjAlHG50yto9QkOIyv5QuKsqTK+4=; b=NAVavbmNAzvSqgeNAMSTUChbr62jVf6qChADJNEYmPXFKYrJq0QfSQolSo+BUZiMx36ksJ 6qTp0U+JLBunWabvGCGN9x0pjId+ch6U+6lZTG6zT/IC6xSb8wItHoF8W1v4zEq8R+QsyO LgiODHYpec1zfxL/+BgN3nc8fvgSrwoh5Rnsc9zEe2UqIi9KDtP6CwZkuAXkWjrgBog7wB XC+pPDXfHFtPdvhsfsm9AjOrMxxpIFgZg7a6j0AvogbxDFKOglhzN8PSluK8hizHSDAbMS gSZXQ8Xd0xkJIyf10kSJulhte8wkDNT5Gg0Vs05MztFJ/3yRX6OHwjDAMt6ygA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776018931; a=rsa-sha256; cv=none; b=ZTZ+B7H1TZ/7umPbbYyIFWerMt7PRoxDvz7TYohPvO5lNE9+RJXJNuR4OTUTP/JbtbM1q1 VzV0+cKK1xXIYb5YT9crz7+wLJCkUFp8cc5tCh65aPecn6k/BTPMHW61gtOQ16MCdlw7Hs qcwSz24V4zUGqkKgXy3loM/IKomvrIcE5s6GMNYw+Iuf8M/fjAfha0S4h/FQ/DbJxxMUhd F0RHNGuIZ3KcqcbTn8UQw54I1B152zl4V+fbETDp1xuKAhDutlIiLDtdTh6Lni13TS2VDT ZIPUsNe3NN31lpeV3gPZDMVRK9J20H9ksgUOv/DeezHwMSJLgn7H7Qt0U5YE9w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776018931; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=opfrPQ9Ki0sYTNcJjAlHG50yto9QkOIyv5QuKsqTK+4=; b=yBcExOHzMvTLbNrY3IYGVjAXLXtzbiuJd0i4xwyi4T+rdEDJZgzskc0Maf86YdsgVr1Wqh bF4Vx7BnKPdJCshpoi7K/qaK6oMQnlGyUodCSTB0YtYXH4XdOACXOaS1gL69Kgibww40rp XMwHHqgcYWT+LgzHLe8Kut51EyaNvVO5i7/v9nvPiCvNWsRgxXSJvfTwTpAnqCMIyiC0Eu U22fUD1UTKeWXUiHBnjqMmp67wWwFAql3b7TrW8S+4qCCN3bS87u3qOv7fQhi3Zum3cKYy Gqjr9DTwgT9+tkCJtwwHpmmMDVsnje8k7KMzvlVR1XnHbsAIGHGdfvPMQT54NA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4ftzkC1YlDzDQ0 for ; Sun, 12 Apr 2026 18:35:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3917b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 12 Apr 2026 18:35:31 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 2cfe62664ab7 - main - inpcb: retire the inpcbinfo list 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: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2cfe62664ab74756e40e17f7b8692d7a07531b83 Auto-Submitted: auto-generated Date: Sun, 12 Apr 2026 18:35:31 +0000 Message-Id: <69dbe5f3.3917b.1cc856ee@gitrepo.freebsd.org> The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=2cfe62664ab74756e40e17f7b8692d7a07531b83 commit 2cfe62664ab74756e40e17f7b8692d7a07531b83 Author: Gleb Smirnoff AuthorDate: 2026-04-12 18:30:59 +0000 Commit: Gleb Smirnoff CommitDate: 2026-04-12 18:30:59 +0000 inpcb: retire the inpcbinfo list lock With the SMR locking of inpcbs the use of this lock reduced down to the global list and generation number. It was used only on an inpcb creation and destruction. Use the inpcbinfo hash lock for this purpose. Reviewed by: pouria, rrs, markj Differential Revision: https://reviews.freebsd.org/D55966 --- sys/netinet/in_pcb.c | 12 +++++------- sys/netinet/in_pcb.h | 28 +++++----------------------- sys/netinet/raw_ip.c | 2 +- sys/netinet/tcp_subr.c | 2 +- sys/netinet/udp_usrreq.c | 4 ++-- 5 files changed, 14 insertions(+), 34 deletions(-) diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c index 98421a7f2232..d60c75ab45b5 100644 --- a/sys/netinet/in_pcb.c +++ b/sys/netinet/in_pcb.c @@ -558,7 +558,6 @@ in_pcbinfo_init(struct inpcbinfo *pcbinfo, struct inpcbstorage *pcbstor, .head = HASH_HEAD_CK_LIST, }; - mtx_init(&pcbinfo->ipi_lock, pcbstor->ips_infolock_name, NULL, MTX_DEF); mtx_init(&pcbinfo->ipi_hash_lock, pcbstor->ips_hashlock_name, NULL, MTX_DEF); #ifdef VIMAGE @@ -602,7 +601,6 @@ in_pcbinfo_destroy(struct inpcbinfo *pcbinfo) hashfree(pcbinfo->ipi_porthashbase, &ha); hashfree(pcbinfo->ipi_lbgrouphashbase, &ha); mtx_destroy(&pcbinfo->ipi_hash_lock); - mtx_destroy(&pcbinfo->ipi_lock); } /* @@ -697,11 +695,11 @@ in_pcballoc(struct socket *so, struct inpcbinfo *pcbinfo) inp->inp_route.ro_flags = RT_LLE_CACHE; refcount_init(&inp->inp_refcount, 1); /* Reference from socket. */ INP_WLOCK(inp); - INP_INFO_WLOCK(pcbinfo); + INP_HASH_WLOCK(pcbinfo); pcbinfo->ipi_count++; inp->inp_gencnt = ++pcbinfo->ipi_gencnt; CK_LIST_INSERT_HEAD(&pcbinfo->ipi_listhead, inp, inp_list); - INP_INFO_WUNLOCK(pcbinfo); + INP_HASH_WUNLOCK(pcbinfo); so->so_pcb = inp; return (0); @@ -1799,13 +1797,13 @@ in_pcbfree(struct inpcb *inp) * from the hash without acquiring inpcb lock, they rely on the hash * lock, thus in_pcbremhash() should be the first action. */ + INP_HASH_WLOCK(pcbinfo); if (inp->inp_flags & INP_INHASHLIST) - in_pcbremhash(inp); - INP_INFO_WLOCK(pcbinfo); + in_pcbremhash_locked(inp); inp->inp_gencnt = ++pcbinfo->ipi_gencnt; pcbinfo->ipi_count--; CK_LIST_REMOVE(inp, inp_list); - INP_INFO_WUNLOCK(pcbinfo); + INP_HASH_WUNLOCK(pcbinfo); #ifdef RATELIMIT if (inp->inp_snd_tag != NULL) diff --git a/sys/netinet/in_pcb.h b/sys/netinet/in_pcb.h index a1b547462d53..e76e3fa8e382 100644 --- a/sys/netinet/in_pcb.h +++ b/sys/netinet/in_pcb.h @@ -422,30 +422,23 @@ struct inpcb { * IPv4 and IPv6. * * The pcbs are protected with SMR section and thus all lists in inpcbinfo - * are CK-lists. Locking is required to insert a pcb into database. Two - * locks are provided: one for the hash and one for the global list of pcbs, - * as well as overall count and generation count. + * are CK-lists. Locking is required to insert a pcb into database. * * Locking key: * * (c) Constant or nearly constant after initialisation * (e) Protected by SMR section - * (g) Locked by ipi_lock * (h) Locked by ipi_hash_lock */ struct inpcbinfo { - /* - * Global lock protecting inpcb list modification - */ - struct mtx ipi_lock; - struct inpcbhead ipi_listhead; /* (r:e/w:g) */ - u_int ipi_count; /* (g) */ + struct inpcbhead ipi_listhead; /* (r:e/w:h) */ + u_int ipi_count; /* (h) */ /* * Generation count -- incremented each time a connection is allocated * or freed. */ - u_quad_t ipi_gencnt; /* (g) */ + u_quad_t ipi_gencnt; /* (h) */ /* * Fields associated with port lookup and allocation. @@ -498,11 +491,10 @@ struct inpcbstorage { uma_init ips_pcbinit; size_t ips_size; const char * ips_zone_name; - const char * ips_infolock_name; const char * ips_hashlock_name; }; -#define INPCBSTORAGE_DEFINE(prot, ppcb, lname, zname, iname, hname) \ +#define INPCBSTORAGE_DEFINE(prot, ppcb, lname, zname, hname) \ static int \ prot##_inpcb_init(void *mem, int size __unused, int flags __unused) \ { \ @@ -515,7 +507,6 @@ static struct inpcbstorage prot = { \ .ips_size = sizeof(struct ppcb), \ .ips_pcbinit = prot##_inpcb_init, \ .ips_zone_name = zname, \ - .ips_infolock_name = iname, \ .ips_hashlock_name = hname, \ }; \ SYSINIT(prot##_inpcbstorage_init, SI_SUB_PROTO_DOMAIN, \ @@ -564,15 +555,6 @@ struct socket * void inp_4tuple_get(struct inpcb *inp, uint32_t *laddr, uint16_t *lp, uint32_t *faddr, uint16_t *fp); -#define INP_INFO_WLOCK(ipi) mtx_lock(&(ipi)->ipi_lock) -#define INP_INFO_WLOCKED(ipi) mtx_owned(&(ipi)->ipi_lock) -#define INP_INFO_WUNLOCK(ipi) mtx_unlock(&(ipi)->ipi_lock) -#define INP_INFO_LOCK_ASSERT(ipi) MPASS(SMR_ENTERED((ipi)->ipi_smr) || \ - mtx_owned(&(ipi)->ipi_lock)) -#define INP_INFO_WLOCK_ASSERT(ipi) mtx_assert(&(ipi)->ipi_lock, MA_OWNED) -#define INP_INFO_WUNLOCK_ASSERT(ipi) \ - mtx_assert(&(ipi)->ipi_lock, MA_NOTOWNED) - #define INP_HASH_WLOCK(ipi) mtx_lock(&(ipi)->ipi_hash_lock) #define INP_HASH_WUNLOCK(ipi) mtx_unlock(&(ipi)->ipi_hash_lock) #define INP_HASH_LOCK_ASSERT(ipi) MPASS(SMR_ENTERED((ipi)->ipi_smr) || \ diff --git a/sys/netinet/raw_ip.c b/sys/netinet/raw_ip.c index a8a4fc1df9e2..f2fec876d077 100644 --- a/sys/netinet/raw_ip.c +++ b/sys/netinet/raw_ip.c @@ -181,7 +181,7 @@ rip_delhash(struct inpcb *inp) } #endif /* INET */ -INPCBSTORAGE_DEFINE(ripcbstor, inpcb, "rawinp", "ripcb", "rip", "riphash"); +INPCBSTORAGE_DEFINE(ripcbstor, inpcb, "rawinp", "ripcb", "riphash"); static void rip_init(void *arg __unused) diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c index b6bb0221e872..43c430708926 100644 --- a/sys/netinet/tcp_subr.c +++ b/sys/netinet/tcp_subr.c @@ -1140,7 +1140,7 @@ static struct mtx isn_mtx; #define ISN_LOCK() mtx_lock(&isn_mtx) #define ISN_UNLOCK() mtx_unlock(&isn_mtx) -INPCBSTORAGE_DEFINE(tcpcbstor, tcpcb, "tcpinp", "tcp_inpcb", "tcp", "tcphash"); +INPCBSTORAGE_DEFINE(tcpcbstor, tcpcb, "tcpinp", "tcp_inpcb", "tcphash"); /* * Take a value and get the next power of 2 that doesn't overflow. diff --git a/sys/netinet/udp_usrreq.c b/sys/netinet/udp_usrreq.c index e8847ea12f1e..eb37ceddace0 100644 --- a/sys/netinet/udp_usrreq.c +++ b/sys/netinet/udp_usrreq.c @@ -165,9 +165,9 @@ VNET_PCPUSTAT_SYSUNINIT(udpstat); static void udp_detach(struct socket *so); #endif -INPCBSTORAGE_DEFINE(udpcbstor, udpcb, "udpinp", "udp_inpcb", "udp", "udphash"); +INPCBSTORAGE_DEFINE(udpcbstor, udpcb, "udpinp", "udp_inpcb", "udphash"); INPCBSTORAGE_DEFINE(udplitecbstor, udpcb, "udpliteinp", "udplite_inpcb", - "udplite", "udplitehash"); + "udplitehash"); static void udp_vnet_init(void *arg __unused) From nobody Sun Apr 12 18:35:32 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4ftzkD3zkYz6YW1B for ; Sun, 12 Apr 2026 18: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ftzkD2wZwz3Zng for ; Sun, 12 Apr 2026 18: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=1776018932; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3+DryF6bRQB3vSn5572C3eCSqpXon3XXGFVtdsgUSg8=; b=Qnu+27IU7drc3ePDn5+/HctR4yAwP4mEaI7XV1pEKPY+QGoSczgAzXaJhdGmQES27kfvXn C4OWQA+0OAxfn1SJPJO8nbMvPZgp6oTXDe0jYsr7P5n8AzI9yYwYu7+1AoEU3JEHFQvBj7 ffPFcHMuS4wYEo0zxCBiPbJqKJ26JGQIJSjNhyXprwhTdv+7x8MRYgOHSliH9UOxEEe2jT MhE18lvRUu7rFyNZd2oszwF7mMmGiDz0M7AUJP3NAyZDaMR5y1hVADUYD11EPGTLpfMrG4 m2tmT5qvmw7Vc9GILdglSaPR9S4RBlLdrcCFGmRBZEU3DVFSgDCgDIOLUXWz6g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776018932; a=rsa-sha256; cv=none; b=yIO7k7UK+MhgrpLXpseGnNivQVsqoSt+kGmvgDLzAAYxvDcQWiaIr+rqD3t1fg4sWAn0b/ CDCOUYwwYIItwYcMEOT5XHWe8g35BQNj53OG5SVj+A3uZ03iyB9RjiZ/h18MZC7ddzWZ2I Yq1GJeAdjGrpHs4BXduWT6VnLXDgYfzTfuv9dHM8g3Poc9CQHbJQdqleTt+3+qgmtHIZYV MYLVovoSlQPrHhGIeq2nFmLqOJLjNIrWB7JFgXT6sUdm5om20oZmUIuKdGVrS3HbX18PYn ZQCYdPWgWdRQp+Va36KaLPeRjY7Kq+K7Bv6OmU1EhkJNMVQCdhbYNdPCB73hcQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776018932; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3+DryF6bRQB3vSn5572C3eCSqpXon3XXGFVtdsgUSg8=; b=mp+Lk57KMGdRUwyjLNMiEFK8D2foaBQI6cyHhd/szXTWU4+FwPlL5he8EZeocOVLZbpevX ay69rVirMuoEFbF38jUeCzenE1H5mb4FVl2owReE9gx1zumZO6Sc/yz3RE5jUkaP/P0R14 9AJryB5SGSn2MnVHMSLHWuVCgyFiKLaWgtyzowonFy01RwWhV/BevYyBzH+BUjJpKufEFV mbxPMQt9whoyzCooeWH2qXlV3pbGzs6uNjnSnkPtUg5HkygdV/Jo7a3pBqo8Dxg+d3O1fI 1YMVi6niMNILHRbH8dPH+MTmOSrHtjzLHiHuCGIw68ju/CozW9u+nYGZNgRsXQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4ftzkD2M15zD7p for ; Sun, 12 Apr 2026 18:35:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 395af by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 12 Apr 2026 18:35:32 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: ac5b9628002c - main - inpcb: retire the inpcb global list List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: ac5b9628002c7c97929984eb578918077d564be4 Auto-Submitted: auto-generated Date: Sun, 12 Apr 2026 18:35:32 +0000 Message-Id: <69dbe5f4.395af.58134a93@gitrepo.freebsd.org> The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=ac5b9628002c7c97929984eb578918077d564be4 commit ac5b9628002c7c97929984eb578918077d564be4 Author: Gleb Smirnoff AuthorDate: 2026-04-12 18:31:09 +0000 Commit: Gleb Smirnoff CommitDate: 2026-04-12 18:31:09 +0000 inpcb: retire the inpcb global list The iteration over all pcbs is possible without the global list. The newborn inpcbs are put on a global list of unconnected inpcbs, then after connect(2) or bind(2) they move to respective hash slot list. This adds a bit of complexity to inp_next(), but the storage scheme is actually simplified. One potential problem before this change was that a couple of pcbs fall into the same hash slot and are linked A->B there, but they also sit next to each other in the global list, linked as B->A. This can deadlock of course. The problem was never observed in the wild, but I was able to instrument it with lots of effort: just few pcbs in the system, hash size reduced down to 2 and a lot of repetitive calls into two kinds of iterators. However the main motivation is not the above problem, but make a step towards splitting the big hash lock into per-slot locks. Differential Revision: https://reviews.freebsd.org/D55967 --- sys/netinet/in_pcb.c | 125 ++++++++++++++++++++++++++++++----------------- sys/netinet/in_pcb.h | 49 ++++++++++++------- sys/netinet/in_pcb_var.h | 2 +- sys/netinet/tcp_usrreq.c | 29 ++++++----- sys/netinet6/in6_pcb.c | 4 +- 5 files changed, 134 insertions(+), 75 deletions(-) diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c index d60c75ab45b5..cb5b7fa274f6 100644 --- a/sys/netinet/in_pcb.c +++ b/sys/netinet/in_pcb.c @@ -240,8 +240,6 @@ SYSCTL_INT(_net_inet_ip, OID_AUTO, connect_inaddr_wild, "Allow connecting to INADDR_ANY or INADDR_BROADCAST for connect(2)"); #endif -static void in_pcbremhash(struct inpcb *); - /* * in_pcb.c: manage the Protocol Control Blocks. * @@ -563,7 +561,7 @@ in_pcbinfo_init(struct inpcbinfo *pcbinfo, struct inpcbstorage *pcbstor, #ifdef VIMAGE pcbinfo->ipi_vnet = curvnet; #endif - CK_LIST_INIT(&pcbinfo->ipi_listhead); + CK_LIST_INIT(&pcbinfo->ipi_list_unconn); pcbinfo->ipi_count = 0; ha.size = hash_nelements; @@ -698,7 +696,7 @@ in_pcballoc(struct socket *so, struct inpcbinfo *pcbinfo) INP_HASH_WLOCK(pcbinfo); pcbinfo->ipi_count++; inp->inp_gencnt = ++pcbinfo->ipi_gencnt; - CK_LIST_INSERT_HEAD(&pcbinfo->ipi_listhead, inp, inp_list); + CK_LIST_INSERT_HEAD(&pcbinfo->ipi_list_unconn, inp, inp_unconn_list); INP_HASH_WUNLOCK(pcbinfo); so->so_pcb = inp; @@ -1429,7 +1427,9 @@ in_pcbdisconnect(struct inpcb *inp) KASSERT(inp->inp_smr == SMR_SEQ_INVALID, ("%s: inp %p was already disconnected", __func__, inp)); - in_pcbremhash_locked(inp); + in_pcbremhash(inp); + CK_LIST_INSERT_HEAD(&inp->inp_pcbinfo->ipi_list_unconn, inp, + inp_unconn_list); if ((inp->inp_socket->so_proto->pr_flags & PR_CONNREQUIRED) == 0) { /* See the comment in in_pcbinshash(). */ @@ -1552,8 +1552,17 @@ inp_smr_lock(struct inpcb *inp, const inp_lookup_t lock) * * - Iterator can have either write-lock or read-lock semantics, that can not * be changed later. - * - Iterator can iterate either over all pcbs list (INP_ALL_LIST), or through - * a single hash slot. Note: only rip_input() does the latter. + * - Iterator has three modes of operation, defined by value of .hash member + * on the first call: + * - .hash = INP_ALL_LIST: the iterator will go through the unconnected + * list, then all wildcard hash slots and then all exact hash slots. + * - .hash = INP_UNCONN_LIST: the iterator will go through the list of + * unconnected pcbs only. + * - .hash initialized with an arbitrary positive value: iterator will go + * through this exact hash slot only. + * Note: only rip_input() and sysctl_setsockopt() use the latter. + * The interface may be extended for iteration over single wildcard hash + * slot, but there is no use case for that today. * - Iterator may have optional bool matching function. The matching function * will be executed for each inpcb in the SMR context, so it can not acquire * locks and can safely access only immutable fields of inpcb. @@ -1571,49 +1580,72 @@ inp_smr_lock(struct inpcb *inp, const inp_lookup_t lock) * - Removed entries won't stop traversal as long as they are not added to * a different list. This is violated by in_pcbrehash(). */ -#define II_LIST_FIRST(ipi, hash) \ - (((hash) == INP_ALL_LIST) ? \ - CK_LIST_FIRST(&(ipi)->ipi_listhead) : \ - CK_LIST_FIRST(&(ipi)->ipi_hash_exact[(hash)])) -#define II_LIST_NEXT(inp, hash) \ - (((hash) == INP_ALL_LIST) ? \ - CK_LIST_NEXT((inp), inp_list) : \ - CK_LIST_NEXT((inp), inp_hash_exact)) -#define II_LOCK_ASSERT(inp, lock) \ - rw_assert(&(inp)->inp_lock, \ - (lock) == INPLOOKUP_RLOCKPCB ? RA_RLOCKED : RA_WLOCKED ) +static inline struct inpcb * +ii_list_first(const struct inpcb_iterator *ii) +{ + const struct inpcbinfo *ipi = ii->ipi; + const int hash = ii->hash; + + if (hash < 0) + return (CK_LIST_FIRST(&ipi->ipi_list_unconn)); + else if (hash <= ipi->ipi_hashmask) + return (CK_LIST_FIRST(&ipi->ipi_hash_wild[hash])); + else + return (CK_LIST_FIRST( + &ipi->ipi_hash_exact[hash - ipi->ipi_hashmask - 1])); +} + +static inline struct inpcb * +ii_list_next(const struct inpcb_iterator *ii, struct inpcb *inp) +{ + if (ii->hash < 0) + return (CK_LIST_NEXT(inp, inp_unconn_list)); + else if (ii->hash <= ii->ipi->ipi_hashmask) + return (CK_LIST_NEXT(inp, inp_hash_wild)); + else + return (CK_LIST_NEXT(inp, inp_hash_exact)); +} + struct inpcb * inp_next(struct inpcb_iterator *ii) { const struct inpcbinfo *ipi = ii->ipi; + const int hashmax = (ipi->ipi_hashmask + 1) * 2; inp_match_t *match = ii->match; void *ctx = ii->ctx; inp_lookup_t lock = ii->lock; - int hash = ii->hash; struct inpcb *inp; if (ii->inp == NULL) { /* First call. */ + if ((ii->hash = ii->mode) >= 0) { + /* Targeted iterators support only the exact hash. */ + MPASS(ii->hash <= ipi->ipi_hashmask); + ii->hash += ipi->ipi_hashmask + 1; + } smr_enter(ipi->ipi_smr); - /* This is unrolled CK_LIST_FOREACH(). */ - for (inp = II_LIST_FIRST(ipi, hash); +next_first: + /* This is unrolled CK_LIST_FOREACH() over different headers. */ + for (inp = ii_list_first(ii); inp != NULL; - inp = II_LIST_NEXT(inp, hash)) { + inp = ii_list_next(ii, inp)) { if (match != NULL && (match)(inp, ctx) == false) continue; if (__predict_true(_inp_smr_lock(inp, lock, INP_FREED))) break; else { smr_enter(ipi->ipi_smr); - MPASS(inp != II_LIST_FIRST(ipi, hash)); - inp = II_LIST_FIRST(ipi, hash); + MPASS(inp != ii_list_first(ii)); + inp = ii_list_first(ii); if (inp == NULL) break; } } - if (inp == NULL) + if (inp == NULL) { + if (ii->mode == INP_ALL_LIST && ++ii->hash < hashmax) + goto next_first; smr_exit(ipi->ipi_smr); - else + } else ii->inp = inp; return (inp); @@ -1623,10 +1655,16 @@ inp_next(struct inpcb_iterator *ii) smr_enter(ipi->ipi_smr); restart: inp = ii->inp; - II_LOCK_ASSERT(inp, lock); + rw_assert(&inp->inp_lock, + lock == INPLOOKUP_RLOCKPCB ? RA_RLOCKED : RA_WLOCKED); next: - inp = II_LIST_NEXT(inp, hash); + inp = ii_list_next(ii, inp); if (inp == NULL) { + if (ii->mode == INP_ALL_LIST && ++ii->hash < hashmax) { + inp_unlock(ii->inp, lock); + ii->inp = NULL; + goto next_first; + } smr_exit(ipi->ipi_smr); goto found; } @@ -1799,10 +1837,11 @@ in_pcbfree(struct inpcb *inp) */ INP_HASH_WLOCK(pcbinfo); if (inp->inp_flags & INP_INHASHLIST) - in_pcbremhash_locked(inp); + in_pcbremhash(inp); + else + CK_LIST_REMOVE(inp, inp_unconn_list); inp->inp_gencnt = ++pcbinfo->ipi_gencnt; pcbinfo->ipi_count--; - CK_LIST_REMOVE(inp, inp_list); INP_HASH_WUNLOCK(pcbinfo); #ifdef RATELIMIT @@ -1882,8 +1921,13 @@ in_pcbdrop(struct inpcb *inp) INP_WLOCK_ASSERT(inp); inp->inp_flags |= INP_DROPPED; - if (inp->inp_flags & INP_INHASHLIST) + if (inp->inp_flags & INP_INHASHLIST) { + INP_HASH_WLOCK(inp->inp_pcbinfo); in_pcbremhash(inp); + CK_LIST_INSERT_HEAD(&inp->inp_pcbinfo->ipi_list_unconn, inp, + inp_unconn_list); + INP_HASH_WUNLOCK(inp->inp_pcbinfo); + } } #ifdef INET @@ -2693,6 +2737,8 @@ in_pcbinshash(struct inpcb *inp) inp->inp_smr = SMR_SEQ_INVALID; } + CK_LIST_REMOVE(inp, inp_unconn_list); + if (connected) CK_LIST_INSERT_HEAD(pcbhash, inp, inp_hash_exact); else { @@ -2710,7 +2756,7 @@ in_pcbinshash(struct inpcb *inp) } void -in_pcbremhash_locked(struct inpcb *inp) +in_pcbremhash(struct inpcb *inp) { INP_WLOCK_ASSERT(inp); @@ -2737,14 +2783,6 @@ in_pcbremhash_locked(struct inpcb *inp) inp->inp_flags &= ~INP_INHASHLIST; } -static void -in_pcbremhash(struct inpcb *inp) -{ - INP_HASH_WLOCK(inp->inp_pcbinfo); - in_pcbremhash_locked(inp); - INP_HASH_WUNLOCK(inp->inp_pcbinfo); -} - /* * Move PCB to the proper hash bucket when { faddr, fport } have been * changed. NOTE: This does not handle the case of the lport changing (the @@ -2787,15 +2825,12 @@ in_pcbrehash(struct inpcb *inp) * When rehashing, the caller must ensure that either the new or the old * foreign address was unspecified. */ - if (connected) - CK_LIST_REMOVE(inp, inp_hash_wild); - else - CK_LIST_REMOVE(inp, inp_hash_exact); - if (connected) { + CK_LIST_REMOVE(inp, inp_hash_wild); head = &pcbinfo->ipi_hash_exact[hash]; CK_LIST_INSERT_HEAD(head, inp, inp_hash_exact); } else { + CK_LIST_REMOVE(inp, inp_hash_exact); head = &pcbinfo->ipi_hash_wild[hash]; CK_LIST_INSERT_HEAD(head, inp, inp_hash_wild); } diff --git a/sys/netinet/in_pcb.h b/sys/netinet/in_pcb.h index e76e3fa8e382..592d951c018f 100644 --- a/sys/netinet/in_pcb.h +++ b/sys/netinet/in_pcb.h @@ -321,10 +321,15 @@ CK_LIST_HEAD(inpcblbgrouphead, inpcblbgroup); * Almost all fields of struct inpcb are static after creation or protected by * a per-inpcb rwlock, inp_lock. * - * A inpcb database is indexed by addresses/ports hash as well as list of - * all pcbs that belong to a certain proto. Database lookups or list traversals - * are be performed inside SMR section. Once desired PCB is found its own - * lock is to be obtained and SMR section exited. + * A inpcb database consists of two hash tables: one for connected pcbs and the + * other for wildcard-bound pcbs. The newborn pcbs reside on the unconnected + * list. Although a pcb can be on either of these three lists, we can't share + * the linkage pointers because unlocked readers might be iterating over them. + * The only thing that can be unionized is the load-balance table and exact + * hash, as a pcb can never participate in both tables through its entire life + * time. Database lookups or list traversals are to be performed inside SMR + * section. Once desired PCB is found its own lock is to be obtained and SMR + * section exited. * * Key: * (c) - Constant after initialization @@ -350,14 +355,13 @@ struct icmp6_filter; struct inpcbpolicy; struct m_snd_tag; struct inpcb { - /* Cache line #1 (amd64) */ union { - CK_LIST_ENTRY(inpcb) inp_hash_exact; /* hash table linkage */ - LIST_ENTRY(inpcb) inp_lbgroup_list; /* lb group list */ + CK_LIST_ENTRY(inpcb) inp_hash_exact; + LIST_ENTRY(inpcb) inp_lbgroup_list; }; - CK_LIST_ENTRY(inpcb) inp_hash_wild; /* hash table linkage */ + CK_LIST_ENTRY(inpcb) inp_hash_wild; + CK_LIST_ENTRY(inpcb) inp_unconn_list; struct rwlock inp_lock; - /* Cache line #2 (amd64) */ #define inp_start_zero inp_refcount #define inp_zero_size (sizeof(struct inpcb) - \ offsetof(struct inpcb, inp_start_zero)) @@ -412,7 +416,6 @@ struct inpcb { struct route inp_route; struct route_in6 inp_route6; }; - CK_LIST_ENTRY(inpcb) inp_list; /* (r:e/w:p) all PCBs for proto */ }; #define inp_vnet inp_pcbinfo->ipi_vnet @@ -431,7 +434,6 @@ struct inpcb { * (h) Locked by ipi_hash_lock */ struct inpcbinfo { - struct inpcbhead ipi_listhead; /* (r:e/w:h) */ u_int ipi_count; /* (h) */ /* @@ -460,6 +462,7 @@ struct inpcbinfo { * address, and "wild" holds the rest. */ struct mtx ipi_hash_lock; + struct inpcbhead ipi_list_unconn; /* (r:e/w:h) */ struct inpcbhead *ipi_hash_exact; /* (r:e/w:h) */ struct inpcbhead *ipi_hash_wild; /* (r:e/w:h) */ u_long ipi_hashmask; /* (c) */ @@ -670,14 +673,26 @@ int sysctl_setsockopt(SYSCTL_HANDLER_ARGS, struct inpcbinfo *pcbinfo, int (*ctloutput_set)(struct inpcb *, struct sockopt *)); #endif +/* + * struct inpcb_iterator is located on the stack of a function that uses + * inp_next(). The caller shall initialize the const members before first + * invocation of inp_next(). After that, until the iterator finishes the + * caller is supposed to only read 'inp' until it reads NULL. Some members + * have constness commented out for convenience of callers, that may reuse + * the iterator after it finishes. + * (c) - caller + * (n) - inp_next() + */ typedef bool inp_match_t(const struct inpcb *, void *); struct inpcb_iterator { const struct inpcbinfo *ipi; - struct inpcb *inp; - inp_match_t *match; - void *ctx; - int hash; + struct inpcb *inp; /* c:r, n:rw */ + /* const */ inp_match_t *match; + /* const */ void *ctx; + int hash; /* n:rw */ + /* const */ int mode; #define INP_ALL_LIST -1 +#define INP_UNCONN_LIST -2 const inp_lookup_t lock; }; @@ -686,7 +701,7 @@ struct inpcb_iterator { { \ .ipi = (_ipi), \ .lock = (_lock), \ - .hash = INP_ALL_LIST, \ + .mode = INP_ALL_LIST, \ .match = (_match), \ .ctx = (_ctx), \ } @@ -694,7 +709,7 @@ struct inpcb_iterator { { \ .ipi = (_ipi), \ .lock = (_lock), \ - .hash = INP_ALL_LIST, \ + .mode = INP_ALL_LIST, \ } struct inpcb *inp_next(struct inpcb_iterator *); diff --git a/sys/netinet/in_pcb_var.h b/sys/netinet/in_pcb_var.h index 7e8a1626ab40..7a5c489f26d7 100644 --- a/sys/netinet/in_pcb_var.h +++ b/sys/netinet/in_pcb_var.h @@ -57,7 +57,7 @@ struct inpcb *in_pcblookup_local(struct inpcbinfo *, struct in_addr, u_short, int, int, struct ucred *); int in_pcbinshash(struct inpcb *); void in_pcbrehash(struct inpcb *); -void in_pcbremhash_locked(struct inpcb *); +void in_pcbremhash(struct inpcb *); /* * Load balance groups used for the SO_REUSEPORT_LB socket option. Each group diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c index b0a75127b124..07c436a1f2e0 100644 --- a/sys/netinet/tcp_usrreq.c +++ b/sys/netinet/tcp_usrreq.c @@ -2841,9 +2841,12 @@ db_print_bblog_state(int state) static void db_print_tcpcb(struct tcpcb *tp, const char *name, int indent, bool show_bblog, - bool show_inpcb) + bool show_inpcb, bool only_locked) { + if (only_locked && tp->t_inpcb.inp_lock.rw_lock == RW_UNLOCKED) + return; + db_print_indent(indent); db_printf("%s at %p\n", name, tp); @@ -2987,14 +2990,13 @@ DB_SHOW_COMMAND(tcpcb, db_show_tcpcb) show_bblog = strchr(modif, 'b') != NULL; show_inpcb = strchr(modif, 'i') != NULL; tp = (struct tcpcb *)addr; - db_print_tcpcb(tp, "tcpcb", 0, show_bblog, show_inpcb); + db_print_tcpcb(tp, "tcpcb", 0, show_bblog, show_inpcb, false); } DB_SHOW_ALL_COMMAND(tcpcbs, db_show_all_tcpcbs) { VNET_ITERATOR_DECL(vnet_iter); struct inpcb *inp; - struct tcpcb *tp; bool only_locked, show_bblog, show_inpcb; only_locked = strchr(modif, 'l') != NULL; @@ -3002,18 +3004,23 @@ DB_SHOW_ALL_COMMAND(tcpcbs, db_show_all_tcpcbs) show_inpcb = strchr(modif, 'i') != NULL; VNET_FOREACH(vnet_iter) { CURVNET_SET(vnet_iter); - CK_LIST_FOREACH(inp, &V_tcbinfo.ipi_listhead, inp_list) { - if (only_locked && - inp->inp_lock.rw_lock == RW_UNLOCKED) - continue; - tp = intotcpcb(inp); - db_print_tcpcb(tp, "tcpcb", 0, show_bblog, show_inpcb); + for (u_int i = 0; i <= V_tcbinfo.ipi_porthashmask; i++) + CK_LIST_FOREACH(inp, &V_tcbinfo.ipi_porthashbase[i], + inp_portlist) { + db_print_tcpcb(intotcpcb(inp), "tcpcb", 0, + show_bblog, show_inpcb, only_locked); + if (db_pager_quit) + goto break_hash; + } +break_hash: + CK_LIST_FOREACH(inp, &V_tcbinfo.ipi_list_unconn, + inp_unconn_list) { + db_print_tcpcb(intotcpcb(inp), "tcpcb", 0, + show_bblog, show_inpcb, only_locked); if (db_pager_quit) break; } CURVNET_RESTORE(); - if (db_pager_quit) - break; } } #endif diff --git a/sys/netinet6/in6_pcb.c b/sys/netinet6/in6_pcb.c index 2d6e860a72ba..8a644f96f72e 100644 --- a/sys/netinet6/in6_pcb.c +++ b/sys/netinet6/in6_pcb.c @@ -508,7 +508,9 @@ in6_pcbdisconnect(struct inpcb *inp) KASSERT(inp->inp_smr == SMR_SEQ_INVALID, ("%s: inp %p was already disconnected", __func__, inp)); - in_pcbremhash_locked(inp); + in_pcbremhash(inp); + CK_LIST_INSERT_HEAD(&inp->inp_pcbinfo->ipi_list_unconn, inp, + inp_unconn_list); if ((inp->inp_socket->so_proto->pr_flags & PR_CONNREQUIRED) == 0) { /* See the comment in in_pcbinshash(). */ From nobody Sun Apr 12 18:35:33 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4ftzkF68G0z6YW7J for ; Sun, 12 Apr 2026 18:35: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ftzkF3cYKz3ZWm for ; Sun, 12 Apr 2026 18:35:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776018933; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=a5OT1lgCYppDtMilx7JdH0Rr2WbohCtvIvuwQ9rOGkk=; b=cmVmE+ZfaXEhcd4AwKqixWel+kekYSEl43IkPXDBjqGD6LjvcLtRsQ0iJ9ovlsbCL6qwYd HNY7GlthjVMPsW8zwQZ1yctLmEPtxuER2GyT3uTeTvxeQ1alwiuGbYhrB/afFqdvWh3h2U VbI/0ZgFzLaB44HswE87qx8ZbWmwZ6qKqQQrFx8UyCWsECq3RGGvZKZ1uv3TocvyYVOVPK iBFC+zbhHUabTNl3vSRIF5oj59H+r84ossj1ep42qPF/qQsdmE+1mMUK6yHwQfsHLydXa1 ztk1j2updSqHVXfCpvbNFFIGrikONBCBNqedMvG7wYYAI6x/AGPnTI7nt4pkEA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776018933; a=rsa-sha256; cv=none; b=HvUDFj05rANJglJJEA+uaS7YbZkhQP3KeFjMlY43b22EsQ1K3jWuW7CQ13XjZjgsn92g5p qmKNxUPIyT/k86sBq55vEJL6s4xk23lcHcsXt+KNUPy/zhtIU2lD/CyZOyF1kag1QA3FsK YGdro/DB/OEBjl5jwEivkIz5FEjaQP87vjirAxk4Qi4oIX5jQ9XIlUXr8ZUgRqnti2lQLs 4i4Nb9IZFuujvNrfM6J/IAEDGB2wBGg3aMYkkeI8MTuTktN7xmx5JBcL3IdEM9sfEGwsuf 4N48Q0SYj5j1DQ2yasi8diLAcLjd4r+hu0Z47Q55YqynfO0iyh4Rhx4dKZ7T7g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776018933; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=a5OT1lgCYppDtMilx7JdH0Rr2WbohCtvIvuwQ9rOGkk=; b=lu7eik+vOj6+QgcHP+kUoXH3zBpmRTSgQA5oUm2C/NSfeXWBlwe8hlrO6PYaadF1fMhf/g xdRV3af6z+viAWIHZwW6Uxrx3FIfxBQt7jYuoxoSpeVNvFbf5UzUHVmi+pxFnjv9DW6ZrS K0d+9XoOxLI1HEivFpCaStri5/Ey/Jw3IXRgsmRLUB+6gHoc6B2F2DcmHJKKRSGr94Asrw scEgUB0euLLie5kbQw/3LHrTe7e7nDVh3cxSwWORzdjnoKijcg0cjl6Phcbxlij7/EnIKx 3aDgAtL52UFvQEb/toSq5yLUK8ujKMW2vM1F/I7e94S/bzvhDkY1ZjQMsyVkIg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4ftzkF3B4TzDJP for ; Sun, 12 Apr 2026 18:35:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 39053 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 12 Apr 2026 18:35:33 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 0ba87ded9d07 - main - inpcb: make in_pcbdisconnect() acquire the hash lock internally List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: 0ba87ded9d072b7b0605d2f4e8a7232b33b8787e Auto-Submitted: auto-generated Date: Sun, 12 Apr 2026 18:35:33 +0000 Message-Id: <69dbe5f5.39053.241f63d@gitrepo.freebsd.org> The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=0ba87ded9d072b7b0605d2f4e8a7232b33b8787e commit 0ba87ded9d072b7b0605d2f4e8a7232b33b8787e Author: Gleb Smirnoff AuthorDate: 2026-04-12 18:32:06 +0000 Commit: Gleb Smirnoff CommitDate: 2026-04-12 18:32:06 +0000 inpcb: make in_pcbdisconnect() acquire the hash lock internally Should be no functional change. Reviewed by: pouria, markj Differential Revision: https://reviews.freebsd.org/D55968 --- sys/netinet/in_pcb.c | 3 ++- sys/netinet/udp_usrreq.c | 12 ------------ sys/netinet6/in6_pcb.c | 3 ++- sys/netinet6/udp6_usrreq.c | 12 ------------ 4 files changed, 4 insertions(+), 26 deletions(-) diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c index cb5b7fa274f6..8bc90de239c2 100644 --- a/sys/netinet/in_pcb.c +++ b/sys/netinet/in_pcb.c @@ -1423,13 +1423,14 @@ in_pcbdisconnect(struct inpcb *inp) { INP_WLOCK_ASSERT(inp); - INP_HASH_WLOCK_ASSERT(inp->inp_pcbinfo); KASSERT(inp->inp_smr == SMR_SEQ_INVALID, ("%s: inp %p was already disconnected", __func__, inp)); + INP_HASH_WLOCK(inp->inp_pcbinfo); in_pcbremhash(inp); CK_LIST_INSERT_HEAD(&inp->inp_pcbinfo->ipi_list_unconn, inp, inp_unconn_list); + INP_HASH_WUNLOCK(inp->inp_pcbinfo); if ((inp->inp_socket->so_proto->pr_flags & PR_CONNREQUIRED) == 0) { /* See the comment in in_pcbinshash(). */ diff --git a/sys/netinet/udp_usrreq.c b/sys/netinet/udp_usrreq.c index eb37ceddace0..e425af92048d 100644 --- a/sys/netinet/udp_usrreq.c +++ b/sys/netinet/udp_usrreq.c @@ -1528,16 +1528,12 @@ void udp_abort(struct socket *so) { struct inpcb *inp; - struct inpcbinfo *pcbinfo; - pcbinfo = udp_get_inpcbinfo(so->so_proto->pr_protocol); inp = sotoinpcb(so); KASSERT(inp != NULL, ("udp_abort: inp == NULL")); INP_WLOCK(inp); if (inp->inp_faddr.s_addr != INADDR_ANY) { - INP_HASH_WLOCK(pcbinfo); in_pcbdisconnect(inp); - INP_HASH_WUNLOCK(pcbinfo); soisdisconnected(so); } INP_WUNLOCK(inp); @@ -1638,16 +1634,12 @@ static void udp_close(struct socket *so) { struct inpcb *inp; - struct inpcbinfo *pcbinfo; - pcbinfo = udp_get_inpcbinfo(so->so_proto->pr_protocol); inp = sotoinpcb(so); KASSERT(inp != NULL, ("udp_close: inp == NULL")); INP_WLOCK(inp); if (inp->inp_faddr.s_addr != INADDR_ANY) { - INP_HASH_WLOCK(pcbinfo); in_pcbdisconnect(inp); - INP_HASH_WUNLOCK(pcbinfo); soisdisconnected(so); } INP_WUNLOCK(inp); @@ -1710,9 +1702,7 @@ int udp_disconnect(struct socket *so) { struct inpcb *inp; - struct inpcbinfo *pcbinfo; - pcbinfo = udp_get_inpcbinfo(so->so_proto->pr_protocol); inp = sotoinpcb(so); KASSERT(inp != NULL, ("udp_disconnect: inp == NULL")); INP_WLOCK(inp); @@ -1720,9 +1710,7 @@ udp_disconnect(struct socket *so) INP_WUNLOCK(inp); return (ENOTCONN); } - INP_HASH_WLOCK(pcbinfo); in_pcbdisconnect(inp); - INP_HASH_WUNLOCK(pcbinfo); SOCK_LOCK(so); so->so_state &= ~SS_ISCONNECTED; /* XXX */ SOCK_UNLOCK(so); diff --git a/sys/netinet6/in6_pcb.c b/sys/netinet6/in6_pcb.c index 8a644f96f72e..bc21c31bf446 100644 --- a/sys/netinet6/in6_pcb.c +++ b/sys/netinet6/in6_pcb.c @@ -504,13 +504,14 @@ in6_pcbdisconnect(struct inpcb *inp) { INP_WLOCK_ASSERT(inp); - INP_HASH_WLOCK_ASSERT(inp->inp_pcbinfo); KASSERT(inp->inp_smr == SMR_SEQ_INVALID, ("%s: inp %p was already disconnected", __func__, inp)); + INP_HASH_WLOCK(inp->inp_pcbinfo); in_pcbremhash(inp); CK_LIST_INSERT_HEAD(&inp->inp_pcbinfo->ipi_list_unconn, inp, inp_unconn_list); + INP_HASH_WUNLOCK(inp->inp_pcbinfo); if ((inp->inp_socket->so_proto->pr_flags & PR_CONNREQUIRED) == 0) { /* See the comment in in_pcbinshash(). */ diff --git a/sys/netinet6/udp6_usrreq.c b/sys/netinet6/udp6_usrreq.c index 729be392668a..715f43f0d47c 100644 --- a/sys/netinet6/udp6_usrreq.c +++ b/sys/netinet6/udp6_usrreq.c @@ -986,9 +986,7 @@ static void udp6_abort(struct socket *so) { struct inpcb *inp; - struct inpcbinfo *pcbinfo; - pcbinfo = udp_get_inpcbinfo(so->so_proto->pr_protocol); inp = sotoinpcb(so); KASSERT(inp != NULL, ("udp6_abort: inp == NULL")); @@ -1002,9 +1000,7 @@ udp6_abort(struct socket *so) #endif if (!IN6_IS_ADDR_UNSPECIFIED(&inp->in6p_faddr)) { - INP_HASH_WLOCK(pcbinfo); in6_pcbdisconnect(inp); - INP_HASH_WUNLOCK(pcbinfo); soisdisconnected(so); } INP_WUNLOCK(inp); @@ -1104,9 +1100,7 @@ static void udp6_close(struct socket *so) { struct inpcb *inp; - struct inpcbinfo *pcbinfo; - pcbinfo = udp_get_inpcbinfo(so->so_proto->pr_protocol); inp = sotoinpcb(so); KASSERT(inp != NULL, ("udp6_close: inp == NULL")); @@ -1119,9 +1113,7 @@ udp6_close(struct socket *so) } #endif if (!IN6_IS_ADDR_UNSPECIFIED(&inp->in6p_faddr)) { - INP_HASH_WLOCK(pcbinfo); in6_pcbdisconnect(inp); - INP_HASH_WUNLOCK(pcbinfo); soisdisconnected(so); } INP_WUNLOCK(inp); @@ -1243,9 +1235,7 @@ static int udp6_disconnect(struct socket *so) { struct inpcb *inp; - struct inpcbinfo *pcbinfo; - pcbinfo = udp_get_inpcbinfo(so->so_proto->pr_protocol); inp = sotoinpcb(so); KASSERT(inp != NULL, ("udp6_disconnect: inp == NULL")); @@ -1263,9 +1253,7 @@ udp6_disconnect(struct socket *so) return (ENOTCONN); } - INP_HASH_WLOCK(pcbinfo); in6_pcbdisconnect(inp); - INP_HASH_WUNLOCK(pcbinfo); SOCK_LOCK(so); so->so_state &= ~SS_ISCONNECTED; /* XXX */ SOCK_UNLOCK(so); From nobody Sun Apr 12 18:35:34 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4ftzkH0X3Hz6YVXt for ; Sun, 12 Apr 2026 18:35: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ftzkG4Jyvz3Zrs for ; Sun, 12 Apr 2026 18:35:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776018934; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BHpxmZeRE8Unjs/w0IcGYC++P8DCf24XT2YnHoKow64=; b=IREEBUJL2ZTQM9STDZqfZcIyn4n/RG7H9bBlPZ/MPkRm4cD6zbT13yyAr2TceyB7+FL1WB kmNc1T/EvEDym+nMc0yAondcJWpCWuQXzycq6w3/zs9e43WRMTtSH36ssYe8duD7tBiPIL tc/eAwU6cEkIW/OQEjKj0dTYHq9BfRD8qa1sNpH7e8OmxXg5q+QiyTEfBbSwqNnkMRWLUX HA8fu3plyhLnlwlUubey9o+XLt31OZXb/H2Rb1DO1kEJHLnflBB30PpBLBFn1k48UohJCm HVG6i+c1FB/H8qm8Gdgrp1a4RmVtMN4rGEitdOLuaIn23lfNzeHe+Cn0yhimjw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776018934; a=rsa-sha256; cv=none; b=SfQBlJJ5KJkDdLWaFxN0Rwh86oF+5ZVpdtZGcUhl6XywFGiVAdWwBUvoVOgRbkEN4bu4ME lbU6JddaPYeruco5FjARHva6IH+m6lFjh/0FYEgzQSjvjg2kB7FpaEZJhX+xMNhBIUv/ZE o5PVWaIt+9MaoP3y9+9D7Vxsbq4yuMdKM71WGzLTyWNb61j+pquir5C3DqMNPbG4+uPK+U k6napopXIihCpB1txvieHtraxyaXAa8/1zV+dWWiRO41KWE0iDi4+2HdvRTddlpJcm0QYS IjwHtr6rlaYGYtwUneTtnWdoXyWmdBiu2WyCRznbQLcdpxhR0sFUVcVfhz7XDw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776018934; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BHpxmZeRE8Unjs/w0IcGYC++P8DCf24XT2YnHoKow64=; b=q0mZDhfae8ZysjdOWU4utujfA3HudCCfhLzV+dBg5CxCQcFEXLgog3qtnJbevpC7SWImKc 8wRE3O+2EOJguUV1pFRlXYpfOD4zdKKvpMpH0oxmjg6pqYMgA4j3zPstfE+YJl6HeiwI5t 7bRhbP93y4X+0ImYBiafamMt+TamLv04Y1UTk0aLNqivQtuHlapyDyPh7ZV6OlOcHMB5jP u0yadvYm6P8ZEiP3Lrdt+fgcbxNg8XZB1dUE1UzAbfIBpVkYoW12BTyPeT9Fw/pr0/ldgF lVfGPypHPefuRcunNlr8ArG3abLda8g9XgWFWYnwVwHlo+uMpJy20rbevxuKtA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4ftzkG3fhqzDQ2 for ; Sun, 12 Apr 2026 18:35:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3917f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 12 Apr 2026 18:35:34 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: ce283e115b02 - main - netinet6: remove INP_DROPPED checks from setsockopt(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: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ce283e115b023514a8886c1c1f1c68df7cd5e9a9 Auto-Submitted: auto-generated Date: Sun, 12 Apr 2026 18:35:34 +0000 Message-Id: <69dbe5f6.3917f.55aa6472@gitrepo.freebsd.org> The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=ce283e115b023514a8886c1c1f1c68df7cd5e9a9 commit ce283e115b023514a8886c1c1f1c68df7cd5e9a9 Author: Gleb Smirnoff AuthorDate: 2026-04-12 18:32:15 +0000 Commit: Gleb Smirnoff CommitDate: 2026-04-12 18:32:15 +0000 netinet6: remove INP_DROPPED checks from setsockopt(2) The INP_DROPPED is going to become an internal flag for inpcb. As of now it means a TCP pcb that is in TCPS_CLOSED. There is nothing wrong with calling setsockopt(2) on such socket, although has no practical use. This deletes a piece of code from 56713d16a06c5 / D16201. There is no description of the panic fixed, but I will speculate that the panic was about in6p->in6p_outputopts being NULL as the inpcb already went through in_pcbfree_deferred(). This also can be related to compressed TIME-WAIT, that is also gone now. With current locking this shouldn't be possible. An inpcb goes through in_pcbfree() only with pr_detach method, which is called from sofree(), and the latter is called on losing the very last socket reference. So, at the point when in_pcbfree() is called, the socket has lost its file descriptor reference and there can not be any running setsockopt() on it. Leave the call to ip6_pcbopt() still embraced with INP_WLOCK(), since we are modifying inpcb contents. NB: the IPv6 setsockopt(2) definitely has room for improvement. Several memory allocations should be moved out of lock and made M_WAITOK. Covering large piece of setsockopt(2) code with epoch(9) just because ip6_setpktopts() calls ifnet_byindex() isn't correct either. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D56169 --- sys/netinet6/ip6_output.c | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/sys/netinet6/ip6_output.c b/sys/netinet6/ip6_output.c index 29374a39e336..359bfdd336e9 100644 --- a/sys/netinet6/ip6_output.c +++ b/sys/netinet6/ip6_output.c @@ -1698,10 +1698,6 @@ do { \ break; } INP_WLOCK(inp); - if (inp->inp_flags & INP_DROPPED) { - INP_WUNLOCK(inp); - return (ECONNRESET); - } optp = &inp->in6p_outputopts; error = ip6_pcbopt(IPV6_HOPLIMIT, (u_char *)&optval, sizeof(optval), @@ -1827,10 +1823,6 @@ do { \ { struct ip6_pktopts **optp; INP_WLOCK(inp); - if (inp->inp_flags & INP_DROPPED) { - INP_WUNLOCK(inp); - return (ECONNRESET); - } optp = &inp->in6p_outputopts; error = ip6_pcbopt(optname, (u_char *)&optval, sizeof(optval), @@ -1919,10 +1911,6 @@ do { \ optlen = sopt->sopt_valsize; optbuf = optbuf_storage; INP_WLOCK(inp); - if (inp->inp_flags & INP_DROPPED) { - INP_WUNLOCK(inp); - return (ECONNRESET); - } optp = &inp->in6p_outputopts; error = ip6_pcbopt(optname, optbuf, optlen, optp, (td != NULL) ? td->td_ucred : NULL, @@ -2410,11 +2398,6 @@ ip6_pcbopt(int optname, u_char *buf, int len, struct ip6_pktopts **pktopt, optdata = malloc(sopt->sopt_valsize, M_TEMP, M_WAITOK); \ malloc_optdata = true; \ INP_RLOCK(inp); \ - if (inp->inp_flags & INP_DROPPED) { \ - INP_RUNLOCK(inp); \ - free(optdata, M_TEMP); \ - return (ECONNRESET); \ - } \ pktopt = inp->in6p_outputopts; \ if (pktopt && pktopt->field) { \ optdatalen = min(lenexpr, sopt->sopt_valsize); \ From nobody Sun Apr 12 18:35:35 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4ftzkJ2nJSz6YVvX for ; Sun, 12 Apr 2026 18:35: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ftzkH56BLz3Ztx for ; Sun, 12 Apr 2026 18:35:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776018935; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RN4LMYU8/5pM+OgI+X95WMwi/yXUI4rEZII2kCW8Sjg=; b=sJo3FZ6eHLT46IdZj9TCA5jZqw/XN3pLhB+HQoA3B/XQ60FPTHZsAhT8fjnFdS/xMgka1K 2HO2BTL03n+eScMdkLYhpob4U5ni+MhMtmCVaL3PNOY0Qdp1BtA6D/kUeDhMX1QpqoBaJI 2SYxcMZpDDJjpbgCi6A+D/7SM4lAGCOnsWvnjq+N5apeBXek/5do8pfbt0K8K8rtISSuWJ 2v2A6bna4uzs2lAbSs5C1ydZGGVuBWYeVkqB4nd135KcsIgdD6i1d7yvxFNud4zh8FvNkn UW9sCo3tL+uncQjSzIymyDyM/ZoqIJC27CWwEcfKIVMv9l2gkEx6JKuOWp7O+A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776018935; a=rsa-sha256; cv=none; b=ygY80ecCJbvNtxo0lV7k0uRo6xhPTPrX8/yQbkc4kvTvZhSyMDaVihqOwc1yJXsurh8uvL ogxnqUJ9VWkbzHAW1EUalzjxbuMNIZCdF7QtBEeJ/0RFG/AXdK8ajORSngL5DxJB6j/IFt kGCf5Pi0z49At2hZVZJj4E2q4pQJyUuhVUQe9jXNW5zVdvYcD0b4//MogeMVJyQvdiOxIA SOWyx01UsPY/xF72nXQmBJA+VCABO9fYpGHcE5VNIBR5L0lLY2ksHcHDsy1N9FQet1d0Vh U5DyJjraepPFaJRdubt/6oR0yhqOW8UFuCUbuFSMXpu1nlWr5OCDOTjpJuPsjg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776018935; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RN4LMYU8/5pM+OgI+X95WMwi/yXUI4rEZII2kCW8Sjg=; b=ATYfGF7tqCph/Zpdv8S2BGNmAgvyqi/Iq+5XmqIOQ0bFS5kHkL97P0VeUDg51rCxjpX1pq cGH/HHLLxEZH+PsKV7aLTSd1ktidIO12k41ZCuPFOWC6e56f+iv5YPCSxy5TCFOiHlUZmV pKD4yBk7CmwPiLxu4FvJvYAaO4/FQ13wkSgBu58xK9pDrOm4mDCc/QuDTnSi7r+CHROZ+P W9LOLhGSisQXcwtIY7jWd4+ytDExe9s4k5Li8mq12F6ZXQjqoISkFK4fxHwhJ+d74FjYGX C/tjb48Vaas0zNzWw0bNzQGRgXaeky673osTLjPSCJBL3jMNlUVPGWiJORZqHQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4ftzkH4dbWzDSW for ; Sun, 12 Apr 2026 18:35:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3af83 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 12 Apr 2026 18:35:35 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 40dbb06fa73c - main - inpcb: retire INP_DROPPED and in_pcbdrop() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: 40dbb06fa73cac37d57563c07e55efd0cabbd488 Auto-Submitted: auto-generated Date: Sun, 12 Apr 2026 18:35:35 +0000 Message-Id: <69dbe5f7.3af83.6ab643b3@gitrepo.freebsd.org> The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=40dbb06fa73cac37d57563c07e55efd0cabbd488 commit 40dbb06fa73cac37d57563c07e55efd0cabbd488 Author: Gleb Smirnoff AuthorDate: 2026-04-12 18:33:07 +0000 Commit: Gleb Smirnoff CommitDate: 2026-04-12 18:33:07 +0000 inpcb: retire INP_DROPPED and in_pcbdrop() The inpcb flag INP_DROPPED served two purposes. It was used by TCP and subsystems running on top of TCP as a flag that marks a connection that is now in TCPS_CLOSED, but was in some other state before (not a new-born connection). Create a new TCP flag TF_DISCONNECTED for this purpose. The in_pcbdrop() was a TCP's version of in_pcbdisconnect() that also sets INP_DROPPED. Use in_pcbdisconnect() instead. Second purpose of INP_DROPPED was a negative lookup mask in inp_smr_lock(), as SMR-protected lookup may see inpcbs that had been removed from the hash. We already have had INP_INHASHLIST that marks inpcb that is in hash. Convert it into INP_UNCONNECTED with the opposite meaning. This allows to combine it with INP_FREED for the negative lookup mask. The Chelsio/ToE and kTLS changes are done with some style refactoring, like moving inp/tp assignments up and using macros for that. However, no deep thinking was taken to check if those checks are really needed, it could be that some are not. Reviewed by: rrs Differential Revision: https://reviews.freebsd.org/D56186 --- sys/dev/cxgbe/crypto/t6_kern_tls.c | 6 +- sys/dev/cxgbe/crypto/t7_kern_tls.c | 2 +- sys/dev/cxgbe/cxgbei/cxgbei.c | 17 ++-- sys/dev/cxgbe/cxgbei/icl_cxgbei.c | 13 ++- sys/dev/cxgbe/iw_cxgbe/qp.c | 24 +++-- sys/dev/cxgbe/nvmf/nvmf_che.c | 23 +++-- sys/dev/cxgbe/tom/t4_connect.c | 3 +- sys/dev/cxgbe/tom/t4_cpl_io.c | 44 ++++----- sys/dev/cxgbe/tom/t4_ddp.c | 18 ++-- sys/dev/cxgbe/tom/t4_listen.c | 14 ++- sys/dev/cxgbe/tom/t4_tls.c | 18 ++-- sys/dev/cxgbe/tom/t4_tom.c | 10 +- sys/kern/uipc_ktls.c | 71 ++++--------- sys/netinet/in_pcb.c | 74 +++++--------- sys/netinet/in_pcb.h | 9 +- sys/netinet/in_pcb_var.h | 2 + sys/netinet/tcp_hpts.c | 12 ++- sys/netinet/tcp_hpts_test.c | 3 +- sys/netinet/tcp_log_buf.c | 17 ++-- sys/netinet/tcp_output.c | 1 + sys/netinet/tcp_stacks/bbr.c | 2 +- sys/netinet/tcp_stacks/rack.c | 4 +- sys/netinet/tcp_subr.c | 3 +- sys/netinet/tcp_timewait.c | 5 +- sys/netinet/tcp_usrreq.c | 198 ++++++++++++++----------------------- sys/netinet/tcp_var.h | 2 +- sys/netinet/toecore.c | 10 +- sys/netinet6/in6_pcb.c | 8 +- sys/netipsec/xform_tcp.c | 8 +- 29 files changed, 258 insertions(+), 363 deletions(-) diff --git a/sys/dev/cxgbe/crypto/t6_kern_tls.c b/sys/dev/cxgbe/crypto/t6_kern_tls.c index 454b2e264a0e..584e5015acfa 100644 --- a/sys/dev/cxgbe/crypto/t6_kern_tls.c +++ b/sys/dev/cxgbe/crypto/t6_kern_tls.c @@ -458,15 +458,15 @@ t6_tls_tag_alloc(if_t ifp, union if_snd_tag_alloc_params *params, } inp = params->tls.inp; + tp = intotcpcb(inp); INP_RLOCK(inp); - if (inp->inp_flags & INP_DROPPED) { + if (tp->t_flags & TF_DISCONNECTED) { INP_RUNLOCK(inp); error = ECONNRESET; goto failed; } tlsp->inp = inp; - tp = intotcpcb(inp); if (tp->t_flags & TF_REQ_TSTMP) { tlsp->using_timestamps = true; if ((tp->ts_offset & 0xfffffff) != 0) { @@ -501,7 +501,7 @@ t6_tls_tag_alloc(if_t ifp, union if_snd_tag_alloc_params *params, goto failed; } - if (inp->inp_flags & INP_DROPPED) { + if (tp->t_flags & TF_DISCONNECTED) { INP_RUNLOCK(inp); error = ECONNRESET; goto failed; diff --git a/sys/dev/cxgbe/crypto/t7_kern_tls.c b/sys/dev/cxgbe/crypto/t7_kern_tls.c index d9710b5bd13f..b6078b9b53b6 100644 --- a/sys/dev/cxgbe/crypto/t7_kern_tls.c +++ b/sys/dev/cxgbe/crypto/t7_kern_tls.c @@ -246,7 +246,7 @@ t7_tls_tag_alloc(struct ifnet *ifp, union if_snd_tag_alloc_params *params, inp = params->tls.inp; INP_RLOCK(inp); - if (inp->inp_flags & INP_DROPPED) { + if (intotcpcb(inp)->t_flags & TF_DISCONNECTED) { INP_RUNLOCK(inp); error = ECONNRESET; goto failed; diff --git a/sys/dev/cxgbe/cxgbei/cxgbei.c b/sys/dev/cxgbe/cxgbei/cxgbei.c index ccca45f5f761..4b341c9d37b2 100644 --- a/sys/dev/cxgbe/cxgbei/cxgbei.c +++ b/sys/dev/cxgbe/cxgbei/cxgbei.c @@ -499,10 +499,11 @@ do_rx_iscsi_ddp(struct sge_iq *iq, const struct rss_header *rss, struct mbuf *m) toep->ofld_rxq->rx_iscsi_ddp_octets += ip->ip_data_len; } + tp = intotcpcb(inp); INP_WLOCK(inp); - if (__predict_false(inp->inp_flags & INP_DROPPED)) { - CTR4(KTR_CXGBE, "%s: tid %u, rx (%d bytes), inp_flags 0x%x", - __func__, tid, pdu_len, inp->inp_flags); + if (__predict_false(tp->t_flags & TF_DISCONNECTED)) { + CTR4(KTR_CXGBE, "%s: tid %u, rx (%d bytes), t_flags 0x%x", + __func__, tid, pdu_len, tp->t_flags); INP_WUNLOCK(inp); icl_cxgbei_conn_pdu_free(NULL, ip); toep->ulpcb2 = NULL; @@ -513,7 +514,6 @@ do_rx_iscsi_ddp(struct sge_iq *iq, const struct rss_header *rss, struct mbuf *m) * T6+ does not report data PDUs received via DDP without F * set. This can result in gaps in the TCP sequence space. */ - tp = intotcpcb(inp); MPASS(chip_id(sc) >= CHELSIO_T6 || icp->icp_seq == tp->rcv_nxt); tp->rcv_nxt = icp->icp_seq + pdu_len; tp->t_rcvtime = ticks; @@ -652,10 +652,11 @@ do_rx_iscsi_cmp(struct sge_iq *iq, const struct rss_header *rss, struct mbuf *m) toep->ofld_rxq->rx_iscsi_data_digest_errors++; } + tp = intotcpcb(inp); INP_WLOCK(inp); - if (__predict_false(inp->inp_flags & INP_DROPPED)) { - CTR4(KTR_CXGBE, "%s: tid %u, rx (%d bytes), inp_flags 0x%x", - __func__, tid, pdu_len, inp->inp_flags); + if (__predict_false(tp->t_flags & TF_DISCONNECTED)) { + CTR4(KTR_CXGBE, "%s: tid %u, rx (%d bytes), t_flags 0x%x", + __func__, tid, pdu_len, tp->t_flags); INP_WUNLOCK(inp); icl_cxgbei_conn_pdu_free(NULL, ip); toep->ulpcb2 = NULL; @@ -663,8 +664,6 @@ do_rx_iscsi_cmp(struct sge_iq *iq, const struct rss_header *rss, struct mbuf *m) return (0); } - tp = intotcpcb(inp); - /* * If icc is NULL, the connection is being closed in * icl_cxgbei_conn_close(), just drop this data. diff --git a/sys/dev/cxgbe/cxgbei/icl_cxgbei.c b/sys/dev/cxgbe/cxgbei/icl_cxgbei.c index d90d7904a8ae..2e7767a0fc27 100644 --- a/sys/dev/cxgbe/cxgbei/icl_cxgbei.c +++ b/sys/dev/cxgbe/cxgbei/icl_cxgbei.c @@ -434,6 +434,7 @@ icl_cxgbei_tx_main(void *arg) struct toepcb *toep = icc->toep; struct socket *so = ic->ic_socket; struct inpcb *inp = sotoinpcb(so); + struct tcpcb *tp = intotcpcb(inp); struct icl_pdu *ip; struct mbuf *m; struct mbufq mq; @@ -476,7 +477,7 @@ icl_cxgbei_tx_main(void *arg) INP_WLOCK(inp); ICL_CONN_UNLOCK(ic); - if (__predict_false(inp->inp_flags & INP_DROPPED) || + if (__predict_false(tp->t_flags & TF_DISCONNECTED) || __predict_false((toep->flags & TPF_ATTACHED) == 0)) { mbufq_drain(&mq); } else { @@ -1080,7 +1081,7 @@ icl_cxgbei_conn_handoff(struct icl_conn *ic, int fd) inp = sotoinpcb(so); INP_WLOCK(inp); tp = intotcpcb(inp); - if (inp->inp_flags & INP_DROPPED) { + if (tp->t_flags & TF_DISCONNECTED) { INP_WUNLOCK(inp); error = ENOTCONN; goto out; @@ -1334,6 +1335,7 @@ icl_cxgbei_conn_task_setup(struct icl_conn *ic, struct icl_pdu *ip, struct cxgbei_ddp_state *ddp; struct ppod_reservation *prsv; struct inpcb *inp; + struct tcpcb *tp; struct mbufq mq; uint32_t itt; int rc = 0; @@ -1421,8 +1423,9 @@ no_ddp: * detached already. */ inp = sotoinpcb(ic->ic_socket); + tp = intotcpcb(inp); INP_WLOCK(inp); - if ((inp->inp_flags & INP_DROPPED) != 0) { + if ((tp->t_flags & TF_DISCONNECTED) != 0) { INP_WUNLOCK(inp); mbufq_drain(&mq); t4_free_page_pods(prsv); @@ -1497,6 +1500,7 @@ icl_cxgbei_conn_transfer_setup(struct icl_conn *ic, struct icl_pdu *ip, struct ppod_reservation *prsv; struct ctl_sg_entry *sgl, sg_entry; struct inpcb *inp; + struct tcpcb *tp; struct mbufq mq; int sg_entries = ctsio->kern_sg_entries; uint32_t ttt; @@ -1597,9 +1601,10 @@ no_ddp: return (ECONNRESET); } inp = sotoinpcb(ic->ic_socket); + tp = intotcpcb(inp); INP_WLOCK(inp); ICL_CONN_UNLOCK(ic); - if ((inp->inp_flags & INP_DROPPED) != 0) { + if ((tp->t_flags & TF_DISCONNECTED) != 0) { INP_WUNLOCK(inp); mbufq_drain(&mq); t4_free_page_pods(prsv); diff --git a/sys/dev/cxgbe/iw_cxgbe/qp.c b/sys/dev/cxgbe/iw_cxgbe/qp.c index cbf4bae00a60..372fc5418b91 100644 --- a/sys/dev/cxgbe/iw_cxgbe/qp.c +++ b/sys/dev/cxgbe/iw_cxgbe/qp.c @@ -64,7 +64,7 @@ struct cpl_set_tcb_rpl; #include "iw_cxgbe.h" #include "user.h" -static int creds(struct toepcb *toep, struct inpcb *inp, size_t wrsize); +static int creds(struct toepcb *toep, struct tcpcb *tp, size_t wrsize); static int max_fr_immd = T4_MAX_FR_IMMD;//SYSCTL parameter later... static int alloc_ird(struct c4iw_dev *dev, u32 ird) @@ -1149,7 +1149,7 @@ static void post_terminate(struct c4iw_qp *qhp, struct t4_cqe *err_cqe, term->ecode = qhp->attr.ecode; } else build_term_codes(err_cqe, &term->layer_etype, &term->ecode); - ret = creds(toep, inp, sizeof(*wqe)); + ret = creds(toep, tp, sizeof(*wqe)); if (ret) { free_wrqe(wr); return; @@ -1253,8 +1253,7 @@ rdma_fini(struct c4iw_dev *rhp, struct c4iw_qp *qhp, struct c4iw_ep *ep) int ret; struct wrqe *wr; struct socket *so = ep->com.so; - struct inpcb *inp = sotoinpcb(so); - struct tcpcb *tp = intotcpcb(inp); + struct tcpcb *tp = intotcpcb(sotoinpcb(so)); struct toepcb *toep = tp->t_toe; KASSERT(rhp == qhp->rhp && ep == qhp->ep, ("%s: EDOOFUS", __func__)); @@ -1277,7 +1276,7 @@ rdma_fini(struct c4iw_dev *rhp, struct c4iw_qp *qhp, struct c4iw_ep *ep) c4iw_init_wr_wait(&ep->com.wr_wait); - ret = creds(toep, inp, sizeof(*wqe)); + ret = creds(toep, tp, sizeof(*wqe)); if (ret) { free_wrqe(wr); return ret; @@ -1315,14 +1314,14 @@ static void build_rtr_msg(u8 p2p_type, struct fw_ri_init *init) } static int -creds(struct toepcb *toep, struct inpcb *inp, size_t wrsize) +creds(struct toepcb *toep, struct tcpcb *tp, size_t wrsize) { struct ofld_tx_sdesc *txsd; CTR3(KTR_IW_CXGBE, "%s:creB %p %u", __func__, toep , wrsize); - INP_WLOCK(inp); - if ((inp->inp_flags & INP_DROPPED) != 0) { - INP_WUNLOCK(inp); + INP_WLOCK(tptoinpcb(tp)); + if (tp->t_flags & TF_DISCONNECTED) { + INP_WUNLOCK(tptoinpcb(tp)); return (EINVAL); } txsd = &toep->txsd[toep->txsd_pidx]; @@ -1336,7 +1335,7 @@ creds(struct toepcb *toep, struct inpcb *inp, size_t wrsize) if (__predict_false(++toep->txsd_pidx == toep->txsd_total)) toep->txsd_pidx = 0; toep->txsd_avail--; - INP_WUNLOCK(inp); + INP_WUNLOCK(tptoinpcb(tp)); CTR5(KTR_IW_CXGBE, "%s:creE %p %u %u %u", __func__, toep , txsd->tx_credits, toep->tx_credits, toep->txsd_pidx); return (0); @@ -1351,8 +1350,7 @@ static int rdma_init(struct c4iw_dev *rhp, struct c4iw_qp *qhp) struct c4iw_rdev *rdev = &qhp->rhp->rdev; struct adapter *sc = rdev->adap; struct socket *so = ep->com.so; - struct inpcb *inp = sotoinpcb(so); - struct tcpcb *tp = intotcpcb(inp); + struct tcpcb *tp = intotcpcb(sotoinpcb(so)); struct toepcb *toep = tp->t_toe; CTR5(KTR_IW_CXGBE, "%s qhp %p qid 0x%x ep %p tid %u", __func__, qhp, @@ -1416,7 +1414,7 @@ static int rdma_init(struct c4iw_dev *rhp, struct c4iw_qp *qhp) c4iw_init_wr_wait(&ep->com.wr_wait); - ret = creds(toep, inp, sizeof(*wqe)); + ret = creds(toep, tp, sizeof(*wqe)); if (ret) { free_wrqe(wr); free_ird(rhp, qhp->attr.max_ird); diff --git a/sys/dev/cxgbe/nvmf/nvmf_che.c b/sys/dev/cxgbe/nvmf/nvmf_che.c index 5c2174b8a40b..afdfc2f1b758 100644 --- a/sys/dev/cxgbe/nvmf/nvmf_che.c +++ b/sys/dev/cxgbe/nvmf/nvmf_che.c @@ -555,6 +555,7 @@ che_write_adapter_mem(struct nvmf_che_qpair *qp, uint32_t addr, uint32_t len, struct toepcb *toep = qp->toep; struct socket *so = qp->so; struct inpcb *inp = sotoinpcb(so); + struct tcpcb *tp = intotcpcb(inp); struct mbufq mq; int error; @@ -568,7 +569,7 @@ che_write_adapter_mem(struct nvmf_che_qpair *qp, uint32_t addr, uint32_t len, goto error; INP_WLOCK(inp); - if ((inp->inp_flags & INP_DROPPED) != 0) { + if ((tp->t_flags & TF_DISCONNECTED) != 0) { INP_WUNLOCK(inp); error = ECONNRESET; goto error; @@ -862,12 +863,13 @@ nvmf_che_write_pdu(struct nvmf_che_qpair *qp, struct mbuf *m) struct epoch_tracker et; struct socket *so = qp->so; struct inpcb *inp = sotoinpcb(so); + struct tcpcb *tp = intotcpcb(inp); struct toepcb *toep = qp->toep; CURVNET_SET(so->so_vnet); NET_EPOCH_ENTER(et); INP_WLOCK(inp); - if (__predict_false(inp->inp_flags & INP_DROPPED) || + if (__predict_false(tp->t_flags & TF_DISCONNECTED) || __predict_false((toep->flags & TPF_ATTACHED) == 0)) { m_freem(m); } else { @@ -2052,10 +2054,11 @@ do_nvmt_data(struct sge_iq *iq, const struct rss_header *rss, struct mbuf *m) ("%s: payload length mismatch", __func__)); inp = toep->inp; + tp = intotcpcb(inp); INP_WLOCK(inp); - if (inp->inp_flags & INP_DROPPED) { - CTR(KTR_CXGBE, "%s: tid %u, rx (%d bytes), inp_flags 0x%x", - __func__, tid, len, inp->inp_flags); + if (tp->t_flags & TF_DISCONNECTED) { + CTR(KTR_CXGBE, "%s: tid %u, rx (%d bytes), t_flags 0x%x", + __func__, tid, len, tp->t_flags); INP_WUNLOCK(inp); m_freem(m); return (0); @@ -2070,7 +2073,6 @@ do_nvmt_data(struct sge_iq *iq, const struct rss_header *rss, struct mbuf *m) mbufq_enqueue(&qp->rx_data, m); SOCKBUF_UNLOCK(&so->so_rcv); - tp = intotcpcb(inp); tp->t_rcvtime = ticks; #ifdef VERBOSE_TRACES @@ -2092,6 +2094,7 @@ do_nvmt_cmp(struct sge_iq *iq, const struct rss_header *rss, struct mbuf *m) struct nvmf_che_qpair *qp = toep->ulpcb; struct socket *so = qp->so; struct inpcb *inp = toep->inp; + struct tcpcb *tp = intotcpcb(inp); u_int hlen __diagused; bool empty; @@ -2107,9 +2110,9 @@ do_nvmt_cmp(struct sge_iq *iq, const struct rss_header *rss, struct mbuf *m) ("%s: payload length mismatch", __func__)); INP_WLOCK(inp); - if (inp->inp_flags & INP_DROPPED) { - CTR(KTR_CXGBE, "%s: tid %u, rx (hlen %u), inp_flags 0x%x", - __func__, tid, hlen, inp->inp_flags); + if (tp->t_flags & TF_DISCONNECTED) { + CTR(KTR_CXGBE, "%s: tid %u, rx (hlen %u), t_flags 0x%x", + __func__, tid, hlen, tp->t_flags); INP_WUNLOCK(inp); m_freem(m); return (0); @@ -2505,7 +2508,7 @@ che_allocate_qpair(bool controller, const nvlist_t *nvl) inp = sotoinpcb(so); INP_WLOCK(inp); tp = intotcpcb(inp); - if (inp->inp_flags & INP_DROPPED) { + if (tp->t_flags & TF_DISCONNECTED) { INP_WUNLOCK(inp); free(qp->fl_cid_set, M_NVMF_CHE); free(qp->fl_cids, M_NVMF_CHE); diff --git a/sys/dev/cxgbe/tom/t4_connect.c b/sys/dev/cxgbe/tom/t4_connect.c index c236ee060bc2..e5f6053e2cb6 100644 --- a/sys/dev/cxgbe/tom/t4_connect.c +++ b/sys/dev/cxgbe/tom/t4_connect.c @@ -78,6 +78,7 @@ do_act_establish(struct sge_iq *iq, const struct rss_header *rss, u_int atid = G_TID_TID(ntohl(cpl->tos_atid)); struct toepcb *toep = lookup_atid(sc, atid); struct inpcb *inp = toep->inp; + struct tcpcb *tp = intotcpcb(inp); KASSERT(m == NULL, ("%s: wasn't expecting payload", __func__)); KASSERT(toep->tid == atid, ("%s: toep tid/atid mismatch", __func__)); @@ -95,7 +96,7 @@ do_act_establish(struct sge_iq *iq, const struct rss_header *rss, toep->ctrlq = &sc->sge.ctrlq[toep->params.ctrlq_idx]; } - if (inp->inp_flags & INP_DROPPED) { + if (tp->t_flags & TF_DISCONNECTED) { /* socket closed by the kernel before hw told us it connected */ diff --git a/sys/dev/cxgbe/tom/t4_cpl_io.c b/sys/dev/cxgbe/tom/t4_cpl_io.c index 7e1c497240c2..6e34d5f54897 100644 --- a/sys/dev/cxgbe/tom/t4_cpl_io.c +++ b/sys/dev/cxgbe/tom/t4_cpl_io.c @@ -245,13 +245,13 @@ send_reset(struct adapter *sc, struct toepcb *toep, uint32_t snd_nxt) struct cpl_abort_req *req; int tid = toep->tid; struct inpcb *inp = toep->inp; - struct tcpcb *tp = intotcpcb(inp); /* don't use if INP_DROPPED */ + struct tcpcb *tp = intotcpcb(inp); INP_WLOCK_ASSERT(inp); CTR6(KTR_CXGBE, "%s: tid %d (%s), toep_flags 0x%x, inp_flags 0x%x%s", __func__, toep->tid, - inp->inp_flags & INP_DROPPED ? "inp dropped" : + tp->t_flags & TF_DISCONNECTED ? "TCP disconnected" : tcpstates[tp->t_state], toep->flags, inp->inp_flags, toep->flags & TPF_ABORT_SHUTDOWN ? @@ -273,7 +273,7 @@ send_reset(struct adapter *sc, struct toepcb *toep, uint32_t snd_nxt) req = wrtod(wr); INIT_TP_WR_MIT_CPL(req, CPL_ABORT_REQ, tid); - if (inp->inp_flags & INP_DROPPED) + if (tp->t_flags & TF_DISCONNECTED) req->rsvd0 = htobe32(snd_nxt); else req->rsvd0 = htobe32(tp->snd_nxt); @@ -284,7 +284,7 @@ send_reset(struct adapter *sc, struct toepcb *toep, uint32_t snd_nxt) * XXX: What's the correct way to tell that the inp hasn't been detached * from its socket? Should I even be flushing the snd buffer here? */ - if ((inp->inp_flags & INP_DROPPED) == 0) { + if ((tp->t_flags & TF_DISCONNECTED) == 0) { struct socket *so = inp->inp_socket; if (so != NULL) /* because I'm not sure. See comment above */ @@ -1588,8 +1588,8 @@ t4_tod_output(struct toedev *tod, struct tcpcb *tp) struct toepcb *toep = tp->t_toe; INP_WLOCK_ASSERT(inp); - KASSERT((inp->inp_flags & INP_DROPPED) == 0, - ("%s: inp %p dropped.", __func__, inp)); + KASSERT((tp->t_flags & TF_DISCONNECTED) == 0, + ("%s: tcpcb %p disconnected", __func__, tp)); KASSERT(toep != NULL, ("%s: toep is NULL", __func__)); t4_push_data(sc, toep, 0); @@ -1607,8 +1607,8 @@ t4_send_fin(struct toedev *tod, struct tcpcb *tp) struct toepcb *toep = tp->t_toe; INP_WLOCK_ASSERT(inp); - KASSERT((inp->inp_flags & INP_DROPPED) == 0, - ("%s: inp %p dropped.", __func__, inp)); + KASSERT((tp->t_flags & TF_DISCONNECTED) == 0, + ("%s: tcpcb %p disconnected", __func__, tp)); KASSERT(toep != NULL, ("%s: toep is NULL", __func__)); toep->flags |= TPF_SEND_FIN; @@ -1628,8 +1628,8 @@ t4_send_rst(struct toedev *tod, struct tcpcb *tp) struct toepcb *toep = tp->t_toe; INP_WLOCK_ASSERT(inp); - KASSERT((inp->inp_flags & INP_DROPPED) == 0, - ("%s: inp %p dropped.", __func__, inp)); + KASSERT((tp->t_flags & TF_DISCONNECTED) == 0, + ("%s: tcpcb %p disconnected", __func__, tp)); KASSERT(toep != NULL, ("%s: toep is NULL", __func__)); /* hmmmm */ @@ -1921,7 +1921,7 @@ do_abort_req(struct sge_iq *iq, const struct rss_header *rss, struct mbuf *m) } toep->flags |= TPF_ABORT_SHUTDOWN; - if ((inp->inp_flags & INP_DROPPED) == 0) { + if ((tp->t_flags & TF_DISCONNECTED) == 0) { struct socket *so = inp->inp_socket; if (so != NULL) @@ -2010,17 +2010,16 @@ do_rx_data(struct sge_iq *iq, const struct rss_header *rss, struct mbuf *m) m_adj(m, sizeof(*cpl)); len = m->m_pkthdr.len; + tp = intotcpcb(inp); INP_WLOCK(inp); - if (inp->inp_flags & INP_DROPPED) { - CTR4(KTR_CXGBE, "%s: tid %u, rx (%d bytes), inp_flags 0x%x", - __func__, tid, len, inp->inp_flags); + if (tp->t_flags & TF_DISCONNECTED) { + CTR4(KTR_CXGBE, "%s: tid %u, rx (%d bytes), t_flags 0x%x", + __func__, tid, len, tp->t_flags); INP_WUNLOCK(inp); m_freem(m); return (0); } - tp = intotcpcb(inp); - if (__predict_false(ulp_mode(toep) == ULP_MODE_TLS && toep->flags & TPF_TLS_RECEIVE)) { /* Received "raw" data on a TLS socket. */ @@ -2170,6 +2169,7 @@ do_fw4_ack(struct sge_iq *iq, const struct rss_header *rss, struct mbuf *m) } inp = toep->inp; + tp = intotcpcb(inp); KASSERT(opcode == CPL_FW4_ACK, ("%s: unexpected opcode 0x%x", __func__, opcode)); @@ -2183,10 +2183,8 @@ do_fw4_ack(struct sge_iq *iq, const struct rss_header *rss, struct mbuf *m) return (0); } - KASSERT((inp->inp_flags & INP_DROPPED) == 0, - ("%s: inp_flags 0x%x", __func__, inp->inp_flags)); - - tp = intotcpcb(inp); + KASSERT((tp->t_flags & TF_DISCONNECTED) == 0, + ("%s: t_flags 0x%x", __func__, tp->t_flags)); if (cpl->flags & CPL_FW4_ACK_FLAGS_SEQVAL) { tcp_seq snd_una = be32toh(cpl->snd_una); @@ -2627,8 +2625,9 @@ sendanother: /* Inlined tcp_usr_send(). */ inp = toep->inp; + tp = intotcpcb(inp); INP_WLOCK(inp); - if (inp->inp_flags & INP_DROPPED) { + if (tp->t_flags & TF_DISCONNECTED) { INP_WUNLOCK(inp); SOCK_IO_SEND_UNLOCK(so); error = ECONNRESET; @@ -2642,8 +2641,7 @@ sendanother: sbappendstream(sb, m, 0); m = NULL; - if (!(inp->inp_flags & INP_DROPPED)) { - tp = intotcpcb(inp); + if (!(tp->t_flags & TF_DISCONNECTED)) { if (moretocome) tp->t_flags |= TF_MORETOCOME; error = tcp_output(tp); diff --git a/sys/dev/cxgbe/tom/t4_ddp.c b/sys/dev/cxgbe/tom/t4_ddp.c index 35fb1061d867..9d422c2b793e 100644 --- a/sys/dev/cxgbe/tom/t4_ddp.c +++ b/sys/dev/cxgbe/tom/t4_ddp.c @@ -641,8 +641,8 @@ handle_ddp_data_aio(struct toepcb *toep, __be32 ddp_report, __be32 rcv_nxt, uint32_t report = be32toh(ddp_report); unsigned int db_idx; struct inpcb *inp = toep->inp; + struct tcpcb *tp = intotcpcb(inp); struct ddp_buffer *db; - struct tcpcb *tp; struct socket *so; struct sockbuf *sb; struct kaiocb *job; @@ -664,13 +664,13 @@ handle_ddp_data_aio(struct toepcb *toep, __be32 ddp_report, __be32 rcv_nxt, db = &toep->ddp.db[db_idx]; job = db->job; - if (__predict_false(inp->inp_flags & INP_DROPPED)) { + if (__predict_false(tp->t_flags & TF_DISCONNECTED)) { /* * This can happen due to an administrative tcpdrop(8). * Just fail the request with ECONNRESET. */ - CTR5(KTR_CXGBE, "%s: tid %u, seq 0x%x, len %d, inp_flags 0x%x", - __func__, toep->tid, be32toh(rcv_nxt), len, inp->inp_flags); + CTR5(KTR_CXGBE, "%s: tid %u, seq 0x%x, len %d, t_flags 0x%x", + __func__, toep->tid, be32toh(rcv_nxt), len, tp->t_flags); if (aio_clear_cancel_function(job)) ddp_complete_one(job, ECONNRESET); goto completed; @@ -859,7 +859,7 @@ handle_ddp_data_rcvbuf(struct toepcb *toep, __be32 ddp_report, __be32 rcv_nxt, { uint32_t report = be32toh(ddp_report); struct inpcb *inp = toep->inp; - struct tcpcb *tp; + struct tcpcb *tp = intotcpcb(inp); struct socket *so; struct sockbuf *sb; struct ddp_buffer *db; @@ -881,20 +881,18 @@ handle_ddp_data_rcvbuf(struct toepcb *toep, __be32 ddp_report, __be32 rcv_nxt, toep->ddp.active_id, toep->tid)); db = &toep->ddp.db[db_idx]; - if (__predict_false(inp->inp_flags & INP_DROPPED)) { + if (__predict_false(tp->t_flags & TF_DISCONNECTED)) { /* * This can happen due to an administrative tcpdrop(8). * Just ignore the received data. */ - CTR5(KTR_CXGBE, "%s: tid %u, seq 0x%x, len %d, inp_flags 0x%x", - __func__, toep->tid, be32toh(rcv_nxt), len, inp->inp_flags); + CTR5(KTR_CXGBE, "%s: tid %u, seq 0x%x, len %d, t_flags 0x%x", + __func__, toep->tid, be32toh(rcv_nxt), len, tp->t_flags); if (invalidated) complete_ddp_buffer(toep, db, db_idx); goto out; } - tp = intotcpcb(inp); - /* * For RX_DDP_COMPLETE, len will be zero and rcv_nxt is the * sequence number of the next byte to receive. The length of diff --git a/sys/dev/cxgbe/tom/t4_listen.c b/sys/dev/cxgbe/tom/t4_listen.c index b879f6883f25..359267b7db90 100644 --- a/sys/dev/cxgbe/tom/t4_listen.c +++ b/sys/dev/cxgbe/tom/t4_listen.c @@ -886,6 +886,7 @@ do_pass_open_rpl(struct sge_iq *iq, const struct rss_header *rss, unsigned int status = cpl->status; struct listen_ctx *lctx = lookup_stid(sc, stid); struct inpcb *inp = lctx->inp; + struct tcpcb *tp = intotcpcb(inp); #ifdef INVARIANTS unsigned int opcode = G_CPL_OPCODE(be32toh(OPCODE_TID(cpl))); #endif @@ -911,13 +912,13 @@ do_pass_open_rpl(struct sge_iq *iq, const struct rss_header *rss, * If the inp has been dropped (listening socket closed) then * listen_stop must have run and taken the inp out of the hash. */ - if (inp->inp_flags & INP_DROPPED) { + if (tp->t_flags & TF_DISCONNECTED) { KASSERT(listen_hash_del(sc, inp) == NULL, ("%s: inp %p still in listen hash", __func__, inp)); } #endif - if (inp->inp_flags & INP_DROPPED && status != CPL_ERR_NONE) { + if (tp->t_flags & TF_DISCONNECTED && status != CPL_ERR_NONE) { if (release_lctx(sc, lctx) != NULL) INP_WUNLOCK(inp); return (status); @@ -928,7 +929,7 @@ do_pass_open_rpl(struct sge_iq *iq, const struct rss_header *rss, * it has started the hardware listener. Stop it; the lctx will be * released in do_close_server_rpl. */ - if (inp->inp_flags & INP_DROPPED) { + if (tp->t_flags & TF_DISCONNECTED) { destroy_server(sc, lctx); INP_WUNLOCK(inp); return (status); @@ -1336,6 +1337,7 @@ do_pass_accept_req(struct sge_iq *iq, const struct rss_header *rss, unsigned int tid = GET_TID(cpl); struct listen_ctx *lctx = lookup_stid(sc, stid); struct inpcb *inp; + struct tcpcb *tp; struct socket *so; struct in_conninfo inc; struct tcphdr th; @@ -1477,10 +1479,11 @@ found: } inp = lctx->inp; /* listening socket, not owned by TOE */ + tp = intotcpcb(inp); INP_RLOCK(inp); /* Don't offload if the listening socket has closed */ - if (__predict_false(inp->inp_flags & INP_DROPPED)) { + if (__predict_false(tp->t_flags & TF_DISCONNECTED)) { INP_RUNLOCK(inp); NET_EPOCH_EXIT(et); REJECT_PASS_ACCEPT_REQ(false); @@ -1622,6 +1625,7 @@ do_pass_establish(struct sge_iq *iq, const struct rss_header *rss, struct synq_entry *synqe = lookup_tid(sc, tid); struct listen_ctx *lctx = synqe->lctx; struct inpcb *inp = lctx->inp, *new_inp; + struct tcpcb *tp = intotcpcb(inp); struct socket *so; struct tcphdr th; struct tcpopt to; @@ -1653,7 +1657,7 @@ do_pass_establish(struct sge_iq *iq, const struct rss_header *rss, KASSERT(vi->adapter == sc, ("%s: vi %p, sc %p mismatch", __func__, vi, sc)); - if (__predict_false(inp->inp_flags & INP_DROPPED)) { + if (__predict_false(tp->t_flags & TF_DISCONNECTED)) { reset: send_abort_rpl_synqe(TOEDEV(ifp), synqe, CPL_ABORT_SEND_RST); INP_WUNLOCK(inp); diff --git a/sys/dev/cxgbe/tom/t4_tls.c b/sys/dev/cxgbe/tom/t4_tls.c index bbcc1c88c3db..0616279ba15e 100644 --- a/sys/dev/cxgbe/tom/t4_tls.c +++ b/sys/dev/cxgbe/tom/t4_tls.c @@ -762,7 +762,7 @@ do_tls_data(struct sge_iq *iq, const struct rss_header *rss, struct mbuf *m) unsigned int tid = GET_TID(cpl); struct toepcb *toep = lookup_tid(sc, tid); struct inpcb *inp = toep->inp; - struct tcpcb *tp; + struct tcpcb *tp = intotcpcb(inp); int len; /* XXX: Should this match do_rx_data instead? */ @@ -781,9 +781,9 @@ do_tls_data(struct sge_iq *iq, const struct rss_header *rss, struct mbuf *m) ("%s: payload length mismatch", __func__)); INP_WLOCK(inp); - if (inp->inp_flags & INP_DROPPED) { - CTR4(KTR_CXGBE, "%s: tid %u, rx (%d bytes), inp_flags 0x%x", - __func__, tid, len, inp->inp_flags); + if (tp->t_flags & TF_DISCONNECTED) { + CTR4(KTR_CXGBE, "%s: tid %u, rx (%d bytes), t_flags 0x%x", + __func__, tid, len, tp->t_flags); INP_WUNLOCK(inp); m_freem(m); return (0); @@ -803,7 +803,6 @@ do_tls_data(struct sge_iq *iq, const struct rss_header *rss, struct mbuf *m) #endif } - tp = intotcpcb(inp); tp->t_rcvtime = ticks; #ifdef VERBOSE_TRACES @@ -824,7 +823,7 @@ do_rx_tls_cmp(struct sge_iq *iq, const struct rss_header *rss, struct mbuf *m) unsigned int tid = GET_TID(cpl); struct toepcb *toep = lookup_tid(sc, tid); struct inpcb *inp = toep->inp; - struct tcpcb *tp; + struct tcpcb *tp = intotcpcb(inp); struct socket *so; struct sockbuf *sb; struct mbuf *tls_data; @@ -851,9 +850,9 @@ do_rx_tls_cmp(struct sge_iq *iq, const struct rss_header *rss, struct mbuf *m) ("%s: payload length mismatch", __func__)); INP_WLOCK(inp); - if (inp->inp_flags & INP_DROPPED) { - CTR4(KTR_CXGBE, "%s: tid %u, rx (%d bytes), inp_flags 0x%x", - __func__, tid, len, inp->inp_flags); + if (tp->t_flags & TF_DISCONNECTED) { + CTR4(KTR_CXGBE, "%s: tid %u, rx (%d bytes), t_flags 0x%x", + __func__, tid, len, tp->t_flags); INP_WUNLOCK(inp); m_freem(m); return (0); @@ -862,7 +861,6 @@ do_rx_tls_cmp(struct sge_iq *iq, const struct rss_header *rss, struct mbuf *m) pdu_length = G_CPL_RX_TLS_CMP_PDULENGTH(be32toh(cpl->pdulength_length)); so = inp_inpcbtosocket(inp); - tp = intotcpcb(inp); #ifdef VERBOSE_TRACES CTR6(KTR_CXGBE, "%s: tid %u PDU len %d len %d seq %u, rcv_nxt %u", diff --git a/sys/dev/cxgbe/tom/t4_tom.c b/sys/dev/cxgbe/tom/t4_tom.c index 8dfffd465345..950608053be7 100644 --- a/sys/dev/cxgbe/tom/t4_tom.c +++ b/sys/dev/cxgbe/tom/t4_tom.c @@ -1830,7 +1830,7 @@ live_tid_failure_cleanup(struct adapter *sc, struct toepcb *toep, u_int status) INP_WLOCK(inp); tp = intotcpcb(inp); toep->flags |= TPF_ABORT_SHUTDOWN; - if ((inp->inp_flags & INP_DROPPED) == 0) { + if ((tp->t_flags & TF_DISCONNECTED) == 0) { struct socket *so = inp->inp_socket; if (so != NULL) @@ -2283,8 +2283,8 @@ find_offload_adapter_cb(struct adapter *sc, void *arg) struct find_offload_adapter_data *fa = arg; struct socket *so = fa->so; struct tom_data *td = sc->tom_softc; - struct tcpcb *tp; - struct inpcb *inp; + struct inpcb *inp = sotoinpcb(so); + struct tcpcb *tp = intotcpcb(inp); /* Non-TCP were filtered out earlier. */ MPASS(so->so_proto->pr_protocol == IPPROTO_TCP); @@ -2295,10 +2295,8 @@ find_offload_adapter_cb(struct adapter *sc, void *arg) if (td == NULL) return; /* TOE not enabled on this adapter. */ - inp = sotoinpcb(so); INP_WLOCK(inp); - if ((inp->inp_flags & INP_DROPPED) == 0) { - tp = intotcpcb(inp); + if ((tp->t_flags & TF_DISCONNECTED) == 0) { if (tp->t_flags & TF_TOE && tp->tod == &td->tod) fa->sc = sc; /* Found. */ } diff --git a/sys/kern/uipc_ktls.c b/sys/kern/uipc_ktls.c index 35009ad77722..0112cf8b6941 100644 --- a/sys/kern/uipc_ktls.c +++ b/sys/kern/uipc_ktls.c @@ -870,21 +870,15 @@ ktls_clone_session(struct ktls_session *tls, int direction) static int ktls_try_toe(struct socket *so, struct ktls_session *tls, int direction) { - struct inpcb *inp; - struct tcpcb *tp; + struct inpcb *inp = sotoinpcb(so); + struct tcpcb *tp = intotcpcb(inp); int error; - inp = so->so_pcb; INP_WLOCK(inp); - if (inp->inp_flags & INP_DROPPED) { - INP_WUNLOCK(inp); - return (ECONNRESET); - } - if (inp->inp_socket == NULL) { + if (tp->t_flags & TF_DISCONNECTED) { INP_WUNLOCK(inp); return (ECONNRESET); } - tp = intotcpcb(inp); if (!(tp->t_flags & TF_TOE)) { INP_WUNLOCK(inp); return (EOPNOTSUPP); @@ -923,19 +917,14 @@ ktls_alloc_snd_tag(struct inpcb *inp, struct ktls_session *tls, bool force, union if_snd_tag_alloc_params params; struct ifnet *ifp; struct nhop_object *nh; - struct tcpcb *tp; + struct tcpcb *tp = intotcpcb(inp); int error; INP_RLOCK(inp); - if (inp->inp_flags & INP_DROPPED) { + if (tp->t_flags & TF_DISCONNECTED) { INP_RUNLOCK(inp); return (ECONNRESET); } - if (inp->inp_socket == NULL) { - INP_RUNLOCK(inp); - return (ECONNRESET); - } - tp = intotcpcb(inp); /* * Check administrative controls on ifnet TLS to determine if @@ -1027,11 +1016,7 @@ ktls_alloc_rcv_tag(struct inpcb *inp, struct ktls_session *tls, return (ENXIO); INP_RLOCK(inp); - if (inp->inp_flags & INP_DROPPED) { - INP_RUNLOCK(inp); - return (ECONNRESET); - } - if (inp->inp_socket == NULL) { + if (intotcpcb(inp)->t_flags & TF_DISCONNECTED) { INP_RUNLOCK(inp); return (ECONNRESET); } @@ -1506,23 +1491,15 @@ ktls_get_rx_mode(struct socket *so, int *modep) int ktls_get_rx_sequence(struct inpcb *inp, uint32_t *tcpseq, uint64_t *tlsseq) { - struct socket *so; - struct tcpcb *tp; + struct socket *so = inp->inp_socket; + struct tcpcb *tp = intotcpcb(inp); INP_RLOCK(inp); - so = inp->inp_socket; - if (__predict_false(so == NULL)) { - INP_RUNLOCK(inp); - return (EINVAL); - } - if (inp->inp_flags & INP_DROPPED) { + if (tp->t_flags & TF_DISCONNECTED) { INP_RUNLOCK(inp); return (ECONNRESET); } - tp = intotcpcb(inp); - MPASS(tp != NULL); - SOCKBUF_LOCK(&so->so_rcv); *tcpseq = tp->rcv_nxt - so->so_rcv.sb_tlscc; *tlsseq = so->so_rcv.sb_tls_seqno; @@ -1697,7 +1674,7 @@ ktls_reset_receive_tag(void *context, int pending) ifp = NULL; INP_RLOCK(inp); - if (inp->inp_flags & INP_DROPPED) { + if (intotcpcb(inp)->t_flags & TF_DISCONNECTED) { INP_RUNLOCK(inp); goto out; } @@ -1818,8 +1795,8 @@ ktls_reset_send_tag(void *context, int pending) } else { NET_EPOCH_ENTER(et); INP_WLOCK(inp); - if (!(inp->inp_flags & INP_DROPPED)) { - tp = intotcpcb(inp); + tp = intotcpcb(inp); + if (!(tp->t_flags & TF_DISCONNECTED)) { CURVNET_SET(inp->inp_vnet); tp = tcp_drop(tp, ECONNABORTED); CURVNET_RESTORE(); @@ -2461,26 +2438,19 @@ ktls_resync_ifnet(struct socket *so, uint32_t tls_len, uint64_t tls_rcd_num) { union if_snd_tag_modify_params params; struct m_snd_tag *mst; - struct inpcb *inp; - struct tcpcb *tp; + struct inpcb *inp = sotoinpcb(so); + struct tcpcb *tp = intotcpcb(inp); mst = so->so_rcv.sb_tls_info->snd_tag; if (__predict_false(mst == NULL)) return (EINVAL); - inp = sotoinpcb(so); - if (__predict_false(inp == NULL)) - return (EINVAL); - INP_RLOCK(inp); - if (inp->inp_flags & INP_DROPPED) { + if (tp->t_flags & TF_DISCONNECTED) { INP_RUNLOCK(inp); return (ECONNRESET); } - tp = intotcpcb(inp); - MPASS(tp != NULL); - /* Get the TCP sequence number of the next valid TLS header. */ SOCKBUF_LOCK(&so->so_rcv); params.tls_rx.tls_hdr_tcp_sn = @@ -2500,12 +2470,11 @@ ktls_drop(struct socket *so, int error) { struct epoch_tracker et; struct inpcb *inp = sotoinpcb(so); - struct tcpcb *tp; + struct tcpcb *tp = intotcpcb(inp); NET_EPOCH_ENTER(et); INP_WLOCK(inp); - if (!(inp->inp_flags & INP_DROPPED)) { - tp = intotcpcb(inp); + if (!(tp->t_flags & TF_DISCONNECTED)) { CURVNET_SET(inp->inp_vnet); tp = tcp_drop(tp, error); CURVNET_RESTORE(); @@ -3372,7 +3341,8 @@ ktls_disable_ifnet_help(void *context, int pending __unused) INP_WLOCK(inp); so = inp->inp_socket; MPASS(so != NULL); - if (inp->inp_flags & INP_DROPPED) { + tp = intotcpcb(inp); + if (tp->t_flags & TF_DISCONNECTED) { goto out; } @@ -3383,8 +3353,7 @@ ktls_disable_ifnet_help(void *context, int pending __unused) if (err == 0) { counter_u64_add(ktls_ifnet_disable_ok, 1); /* ktls_set_tx_mode() drops inp wlock, so recheck flags */ - if ((inp->inp_flags & INP_DROPPED) == 0 && - (tp = intotcpcb(inp)) != NULL && + if ((tp->t_flags & TF_DISCONNECTED) == 0 && tp->t_fb->tfb_hwtls_change != NULL) *** 1071 LINES SKIPPED *** From nobody Sun Apr 12 18:35:36 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4ftzkK46vHz6YW1P for ; Sun, 12 Apr 2026 18:35: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ftzkJ5bbfz3ZxB for ; Sun, 12 Apr 2026 18:35:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776018936; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pW9Mp5fSEO5+XXM0DYw3uE1x04xXITganYCiCvSdoGU=; b=nnpK5OlO50SqvtY0l2nWIUdoa1zeMkL+2+HrNbLDZ1ZPx0fDiW6959yzbrqaHMy8p+GFNo XHt01hCZHTtM1Jk9+bRlbmUyXyoxlfYq3dDvRSrSo+YhjHlO9HLoq7hkbU6DnrPfI7wbH3 Id1093rFfqIXgmCG/VS3NvJry3MI//1P/N51wWHk1OBARYo91Q794VdZFbAHx3lmMJ8P1R T/iOKZjTPUYJH6npP8RKck7+P45ZV+KXfHhGKklQzmwyDgkTqxCTF5Z7cNjNlTXjQWUMUy wTMXSHtIs2lH/EZFYfYVFjv7Iyo6zZa2An3HWjkbQI/BHkf2QhEIEm44AvvZUw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776018936; a=rsa-sha256; cv=none; b=K8WJMvxhRUKFoa0RdXUt7xHuvj2JkYCLV36CY5cGbJiepQt9GSxvyw54Oz2JIhhED8flvE UYpcr8i58gi45buz7lODRT8LegOVJ4Ul1Wykzf0uvBtwCU/mlIuDSJA7G9mtWyBJK2gPPI SJwD8XnWJbcCKnH67JsMbmZMNDHPlP76zrH9p8K1b1E/tYQAfAoNeP/DI+ve4miLupA7gd Xe2zT866p1VRNbpOfamngJ4LX10U0qXb8XoH+yEUBuOwS5hYl1lk33R1n/X7SGiJwubfvk KXSskfkLPJbkTkNS31CBUSGNW3Ih1Uz2JkF5rKbImjEGUKDvR9jYUmHj1DDxtg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776018936; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pW9Mp5fSEO5+XXM0DYw3uE1x04xXITganYCiCvSdoGU=; b=Xd78Pcn7ySeFq5g5+ywda+4nsA7DnGtS4HW81UpPw356lKpS3EdWEbia6whRbp9j4WgsVU CJAqtXKaTi7DcP7hcnLd9LBPZmbPQR/tl5hUOzTXY28X2xq2zw6ScehJTxMrBr7AFSCR43 GoNBLbHFU21X6dID9OpXY+XAo05mU8lqUQFHx8DxvMeM/K9nyI9IAn3P8GtEXtFZ2f+uKF lMrnnQM2HzK4QIhbZpTxehlx65qP+n1v1KBJDSQpbETXzO3C0LhjVRDyKoEMpxlXMx2dVL UCxUpLSkZU+PeGUZBZxk7Z93yuV5yidDF74bspnmIw0c9NAPntXrDabYUoYEug== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4ftzkJ5575zDSX for ; Sun, 12 Apr 2026 18:35:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3a90c by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 12 Apr 2026 18:35:36 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 8b4d0bec4311 - main - inpcb: make in_pcbbind() acquire the hash lock internally List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: 8b4d0bec43116f5d4d1fba89d1b81f1d05805147 Auto-Submitted: auto-generated Date: Sun, 12 Apr 2026 18:35:36 +0000 Message-Id: <69dbe5f8.3a90c.181a2a8d@gitrepo.freebsd.org> The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=8b4d0bec43116f5d4d1fba89d1b81f1d05805147 commit 8b4d0bec43116f5d4d1fba89d1b81f1d05805147 Author: Gleb Smirnoff AuthorDate: 2026-04-12 18:33:20 +0000 Commit: Gleb Smirnoff CommitDate: 2026-04-12 18:33:20 +0000 inpcb: make in_pcbbind() acquire the hash lock internally Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D55970 --- sys/netinet/in_pcb.c | 9 +++++++-- sys/netinet/tcp_usrreq.c | 10 ---------- sys/netinet/udp_usrreq.c | 6 ------ sys/netinet6/in6_pcb.c | 15 +++++++++++---- sys/netinet6/udp6_usrreq.c | 4 ---- 5 files changed, 18 insertions(+), 26 deletions(-) diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c index f1053f6abe03..6c5b7869d945 100644 --- a/sys/netinet/in_pcb.c +++ b/sys/netinet/in_pcb.c @@ -727,22 +727,27 @@ in_pcbbind(struct inpcb *inp, struct sockaddr_in *sin, int flags, KASSERT(sin == NULL || sin->sin_len == sizeof(struct sockaddr_in), ("%s: invalid address length for %p", __func__, sin)); INP_WLOCK_ASSERT(inp); - INP_HASH_WLOCK_ASSERT(inp->inp_pcbinfo); if (inp->inp_lport != 0 || inp->inp_laddr.s_addr != INADDR_ANY) return (EINVAL); anonport = sin == NULL || sin->sin_port == 0; + + INP_HASH_WLOCK(inp->inp_pcbinfo); error = in_pcbbind_setup(inp, sin, &inp->inp_laddr.s_addr, &inp->inp_lport, flags, cred); - if (error) + if (error) { + INP_HASH_WUNLOCK(inp->inp_pcbinfo); return (error); + } if (__predict_false((error = in_pcbinshash(inp)) != 0)) { + INP_HASH_WUNLOCK(inp->inp_pcbinfo); MPASS(inp->inp_socket->so_options & SO_REUSEPORT_LB); inp->inp_laddr.s_addr = INADDR_ANY; inp->inp_lport = 0; inp->inp_flags &= ~INP_BOUNDFIB; return (error); } + INP_HASH_WUNLOCK(inp->inp_pcbinfo); if (anonport) inp->inp_flags |= INP_ANONPORT; return (0); diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c index ce13f1a9cefe..72100a0fb9d9 100644 --- a/sys/netinet/tcp_usrreq.c +++ b/sys/netinet/tcp_usrreq.c @@ -256,10 +256,8 @@ tcp_usr_bind(struct socket *so, struct sockaddr *nam, struct thread *td) error = EAFNOSUPPORT; goto out; } - INP_HASH_WLOCK(&V_tcbinfo); error = in_pcbbind(inp, sinp, V_tcp_bind_all_fibs ? 0 : INPBIND_FIB, td->td_ucred); - INP_HASH_WUNLOCK(&V_tcbinfo); out: tcp_bblog_pru(tp, PRU_BIND, error); TCP_PROBE2(debug__user, tp, PRU_BIND); @@ -305,7 +303,6 @@ tcp6_usr_bind(struct socket *so, struct sockaddr *nam, struct thread *td) goto out; } - INP_HASH_WLOCK(&V_tcbinfo); inp->inp_vflag &= ~INP_IPV4; inp->inp_vflag |= INP_IPV6; #ifdef INET @@ -318,20 +315,17 @@ tcp6_usr_bind(struct socket *so, struct sockaddr *nam, struct thread *td) in6_sin6_2_sin(&sin, sin6); if (IN_MULTICAST(ntohl(sin.sin_addr.s_addr))) { error = EAFNOSUPPORT; - INP_HASH_WUNLOCK(&V_tcbinfo); goto out; } inp->inp_vflag |= INP_IPV4; inp->inp_vflag &= ~INP_IPV6; error = in_pcbbind(inp, &sin, 0, td->td_ucred); - INP_HASH_WUNLOCK(&V_tcbinfo); goto out; } } #endif error = in6_pcbbind(inp, sin6, V_tcp_bind_all_fibs ? 0 : INPBIND_FIB, td->td_ucred); - INP_HASH_WUNLOCK(&V_tcbinfo); out: if (error != 0) inp->inp_vflag = vflagsav; @@ -368,10 +362,8 @@ tcp_usr_listen(struct socket *so, int backlog, struct thread *td) goto out; } if (inp->inp_lport == 0) { - INP_HASH_WLOCK(&V_tcbinfo); error = in_pcbbind(inp, NULL, V_tcp_bind_all_fibs ? 0 : INPBIND_FIB, td->td_ucred); - INP_HASH_WUNLOCK(&V_tcbinfo); } if (error == 0) { tcp_state_change(tp, TCPS_LISTEN); @@ -426,7 +418,6 @@ tcp6_usr_listen(struct socket *so, int backlog, struct thread *td) SOCK_UNLOCK(so); goto out; } - INP_HASH_WLOCK(&V_tcbinfo); if (inp->inp_lport == 0) { inp->inp_vflag &= ~INP_IPV4; if ((inp->inp_flags & IN6P_IPV6_V6ONLY) == 0) @@ -434,7 +425,6 @@ tcp6_usr_listen(struct socket *so, int backlog, struct thread *td) error = in6_pcbbind(inp, NULL, V_tcp_bind_all_fibs ? 0 : INPBIND_FIB, td->td_ucred); } - INP_HASH_WUNLOCK(&V_tcbinfo); if (error == 0) { tcp_state_change(tp, TCPS_LISTEN); solisten_proto(so, backlog); diff --git a/sys/netinet/udp_usrreq.c b/sys/netinet/udp_usrreq.c index e425af92048d..3e8011542753 100644 --- a/sys/netinet/udp_usrreq.c +++ b/sys/netinet/udp_usrreq.c @@ -1356,10 +1356,8 @@ udp_send(struct socket *so, int flags, struct mbuf *m, struct sockaddr *addr, .sin_len = sizeof(struct sockaddr_in), }; - INP_HASH_WLOCK(pcbinfo); error = in_pcbbind(inp, &wild, V_udp_bind_all_fibs ? 0 : INPBIND_FIB, td->td_ucred); - INP_HASH_WUNLOCK(pcbinfo); if (error) goto release; lport = inp->inp_lport; @@ -1599,11 +1597,9 @@ static int udp_bind(struct socket *so, struct sockaddr *nam, struct thread *td) { struct inpcb *inp; - struct inpcbinfo *pcbinfo; struct sockaddr_in *sinp; int error; - pcbinfo = udp_get_inpcbinfo(so->so_proto->pr_protocol); inp = sotoinpcb(so); KASSERT(inp != NULL, ("udp_bind: inp == NULL")); @@ -1622,10 +1618,8 @@ udp_bind(struct socket *so, struct sockaddr *nam, struct thread *td) return (EINVAL); INP_WLOCK(inp); - INP_HASH_WLOCK(pcbinfo); error = in_pcbbind(inp, sinp, V_udp_bind_all_fibs ? 0 : INPBIND_FIB, td->td_ucred); - INP_HASH_WUNLOCK(pcbinfo); INP_WUNLOCK(inp); return (error); } diff --git a/sys/netinet6/in6_pcb.c b/sys/netinet6/in6_pcb.c index 09a62a53e054..c4469136fc90 100644 --- a/sys/netinet6/in6_pcb.c +++ b/sys/netinet6/in6_pcb.c @@ -297,7 +297,6 @@ in6_pcbbind(struct inpcb *inp, struct sockaddr_in6 *sin6, int flags, int error, fib, lookupflags, sooptions; INP_WLOCK_ASSERT(inp); - INP_HASH_WLOCK_ASSERT(inp->inp_pcbinfo); if (inp->inp_lport || !IN6_IS_ADDR_UNSPECIFIED(&inp->in6p_laddr)) return (EINVAL); @@ -310,6 +309,7 @@ in6_pcbbind(struct inpcb *inp, struct sockaddr_in6 *sin6, int flags, if ((error = prison_local_ip6(cred, &inp->in6p_laddr, ((inp->inp_flags & IN6P_IPV6_V6ONLY) != 0))) != 0) return (error); + INP_HASH_WLOCK(inp->inp_pcbinfo); } else { KASSERT(sin6->sin6_family == AF_INET6, ("%s: invalid address family for %p", __func__, sin6)); @@ -326,11 +326,14 @@ in6_pcbbind(struct inpcb *inp, struct sockaddr_in6 *sin6, int flags, fib = (flags & INPBIND_FIB) != 0 ? inp->inp_inc.inc_fibnum : RT_ALL_FIBS; + INP_HASH_WLOCK(inp->inp_pcbinfo); /* See if this address/port combo is available. */ - error = in6_pcbbind_avail(inp, sin6, fib, sooptions, lookupflags, - cred); - if (error != 0) + error = in6_pcbbind_avail(inp, sin6, fib, sooptions, + lookupflags, cred); + if (error != 0) { + INP_HASH_WUNLOCK(inp->inp_pcbinfo); return (error); + } lport = sin6->sin6_port; inp->in6p_laddr = sin6->sin6_addr; @@ -339,6 +342,7 @@ in6_pcbbind(struct inpcb *inp, struct sockaddr_in6 *sin6, int flags, inp->inp_flags |= INP_BOUNDFIB; if (lport == 0) { if ((error = in6_pcbsetport(&inp->in6p_laddr, inp, cred)) != 0) { + INP_HASH_WUNLOCK(inp->inp_pcbinfo); /* Undo an address bind that may have occurred. */ inp->inp_flags &= ~INP_BOUNDFIB; inp->in6p_laddr = in6addr_any; @@ -347,12 +351,15 @@ in6_pcbbind(struct inpcb *inp, struct sockaddr_in6 *sin6, int flags, } else { inp->inp_lport = lport; if (in_pcbinshash(inp) != 0) { + INP_HASH_WUNLOCK(inp->inp_pcbinfo); inp->inp_flags &= ~INP_BOUNDFIB; inp->in6p_laddr = in6addr_any; inp->inp_lport = 0; return (EAGAIN); } } + INP_HASH_WUNLOCK(inp->inp_pcbinfo); + return (0); } diff --git a/sys/netinet6/udp6_usrreq.c b/sys/netinet6/udp6_usrreq.c index 715f43f0d47c..6e37586f16e4 100644 --- a/sys/netinet6/udp6_usrreq.c +++ b/sys/netinet6/udp6_usrreq.c @@ -1046,11 +1046,9 @@ udp6_bind(struct socket *so, struct sockaddr *nam, struct thread *td) { struct sockaddr_in6 *sin6_p; struct inpcb *inp; - struct inpcbinfo *pcbinfo; int error; u_char vflagsav; - pcbinfo = udp_get_inpcbinfo(so->so_proto->pr_protocol); inp = sotoinpcb(so); KASSERT(inp != NULL, ("udp6_bind: inp == NULL")); @@ -1062,7 +1060,6 @@ udp6_bind(struct socket *so, struct sockaddr *nam, struct thread *td) sin6_p = (struct sockaddr_in6 *)nam; INP_WLOCK(inp); - INP_HASH_WLOCK(pcbinfo); vflagsav = inp->inp_vflag; inp->inp_vflag &= ~INP_IPV4; inp->inp_vflag |= INP_IPV6; @@ -1091,7 +1088,6 @@ out: #endif if (error != 0) inp->inp_vflag = vflagsav; - INP_HASH_WUNLOCK(pcbinfo); INP_WUNLOCK(inp); return (error); } From nobody Sun Apr 12 18:35:37 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4ftzkL5VCSz6YW2Z for ; Sun, 12 Apr 2026 18:35: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ftzkK6Fg4z3Zm2 for ; Sun, 12 Apr 2026 18:35:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776018937; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Nf6jJ92Crcsdfpc5plDXRC47TDr88rUj2tZELyHNeFc=; b=v1Sh7ITzEOh13+w3JRADZGiDrjbEGfBhyjMy8uglB94dKRiEtxzwfzgCF/EvuaDnXxreOY lfwtGDY5gbT1xqwtS+X5aqn2O6am5bp9Xh6UvXGXpHR6xOqpx+1gI891h7Em/ZZutChwHo EsoDL9bvYAnKw46qypHSWLydhdjU36Bo9gsa3FLJKO2iuvkyBVCQnEuaERvYTf+4H83BzV iF8Dw4t5Fc9eYB/tdoELzjvAv8OEvn/Xe4itV4sCt8lOohXIIgpUTyYoLAlo6lt0eQYKag MupEA0/iE/Mu/N7nJYBFTm69nU2pJ5pUDDLWgVJroOzS+F25CxMAB8i88kSE4Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776018937; a=rsa-sha256; cv=none; b=PzlTjOegvkIujc7ISYPEItoZWYHKYzBQ/36jZQdWps6N4Ox1Yf8Z+6zdXsdrl+ks4CIMxr Oysmj6g4xDoPQWB64PV7T14RFtDrkBXtoAd/47fdf0vQg7rAXLF7uHstXdBUs4ZbRsO9L5 Haxcp06jHpk+TthFnSQNYGH4cRVpEMdNxe6jipLVD8Rp0acmwgncabhygaKsS/GnaTTbNo IA9nETR7cb+TTP85LAkUKpsTR8QEoP+Br27xAD3LDh9ZsE7wsei9A8Dt4m2/rRyAinjl// uUsPYZEj4R7nYoJnLpmkmscMhuPo5dHnvqYqVgBGoXOgAkaGOKpMHUXnbrKk6g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776018937; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Nf6jJ92Crcsdfpc5plDXRC47TDr88rUj2tZELyHNeFc=; b=Bqr4mMvoc3fOvvKUNR6nwmjBMLAiGb+/F3A0Hj8Y3/dQ2wtMPoVPmM8q8bY9+c+zzBSh+A cJqytPBLLyNun7jz1TpNQvy0deS8S1gg2hb/f2CGFvcOHRnKYJTXFQgNxAxbE+Qi7beYB6 9NH9i+Fdvh2wOkGsnlP4dRE7xpiOnTeFv7TkGb1b3xsAbpZkPaRRXcUjkgQmrA6lCVdGuz M13E4IGq2kmTVmS3R4Ku+FXqB5hBlQjtt9v69rT2rg2uhNauw/mT++wQXTyHSNm7xmlIc5 bqzIkZUH/oXGvT1HGL2PQScHeUG5DcNoaz2iZ+wtIipaZ7x+RKNBg6LhctOz3w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4ftzkK5dvFzDSY for ; Sun, 12 Apr 2026 18:35:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3a4db by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 12 Apr 2026 18:35:37 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 2c48736c55c2 - main - inpcb: make in_pcbconnect() acquire the hash lock internally List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: 2c48736c55c2154327f7e9219d4d69224181ab72 Auto-Submitted: auto-generated Date: Sun, 12 Apr 2026 18:35:37 +0000 Message-Id: <69dbe5f9.3a4db.5b38239e@gitrepo.freebsd.org> The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=2c48736c55c2154327f7e9219d4d69224181ab72 commit 2c48736c55c2154327f7e9219d4d69224181ab72 Author: Gleb Smirnoff AuthorDate: 2026-04-12 18:33:30 +0000 Commit: Gleb Smirnoff CommitDate: 2026-04-12 18:33:30 +0000 inpcb: make in_pcbconnect() acquire the hash lock internally Reviewed by: pouria, rrs, markj Differential Revision: https://reviews.freebsd.org/D55971 --- sys/netinet/in_pcb.c | 17 ++++++++++++----- sys/netinet/tcp_syncache.c | 4 ---- sys/netinet/tcp_usrreq.c | 4 ---- sys/netinet/udp_usrreq.c | 4 ---- sys/netinet6/in6_pcb.c | 15 +++++++++++---- sys/netinet6/udp6_usrreq.c | 6 ------ 6 files changed, 23 insertions(+), 27 deletions(-) diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c index 6c5b7869d945..69974d931e44 100644 --- a/sys/netinet/in_pcb.c +++ b/sys/netinet/in_pcb.c @@ -1096,8 +1096,8 @@ in_pcbconnect(struct inpcb *inp, struct sockaddr_in *sin, struct ucred *cred) int error; bool anonport; + NET_EPOCH_ASSERT(); INP_WLOCK_ASSERT(inp); - INP_HASH_WLOCK_ASSERT(inp->inp_pcbinfo); KASSERT(in_nullhost(inp->inp_faddr), ("%s: inp is already connected", __func__)); KASSERT(sin->sin_family == AF_INET, @@ -1134,10 +1134,13 @@ in_pcbconnect(struct inpcb *inp, struct sockaddr_in *sin, struct ucred *cred) } else faddr = sin->sin_addr; + INP_HASH_WLOCK(inp->inp_pcbinfo); if (in_nullhost(inp->inp_laddr)) { error = in_pcbladdr(inp, &faddr, &laddr, cred); - if (error) + if (__predict_false(error)) { + INP_HASH_WUNLOCK(inp->inp_pcbinfo); return (error); + } } else laddr = inp->inp_laddr; @@ -1154,13 +1157,16 @@ in_pcbconnect(struct inpcb *inp, struct sockaddr_in *sin, struct ucred *cred) error = in_pcb_lport_dest(inp, (struct sockaddr *)&lsin, &lport, (struct sockaddr *)&fsin, sin->sin_port, cred, INPLOOKUP_WILDCARD); - if (error) + if (__predict_false(error)) { + INP_HASH_WUNLOCK(inp->inp_pcbinfo); return (error); + } } else if (in_pcblookup_hash_locked(inp->inp_pcbinfo, faddr, sin->sin_port, laddr, inp->inp_lport, 0, M_NODOM, RT_ALL_FIBS) != - NULL) + NULL) { + INP_HASH_WUNLOCK(inp->inp_pcbinfo); return (EADDRINUSE); - else + } else lport = inp->inp_lport; MPASS(!in_nullhost(inp->inp_laddr) || inp->inp_lport != 0 || @@ -1176,6 +1182,7 @@ in_pcbconnect(struct inpcb *inp, struct sockaddr_in *sin, struct ucred *cred) MPASS(error == 0); } else in_pcbrehash(inp); + INP_HASH_WUNLOCK(inp->inp_pcbinfo); if (V_fib_hash_outbound) { uint32_t hash_val, hash_type; diff --git a/sys/netinet/tcp_syncache.c b/sys/netinet/tcp_syncache.c index 1d628bce0d80..22f260db9805 100644 --- a/sys/netinet/tcp_syncache.c +++ b/sys/netinet/tcp_syncache.c @@ -846,9 +846,7 @@ syncache_socket(struct syncache *sc, struct socket *lso, struct mbuf *m) sin6.sin6_addr = sc->sc_inc.inc6_faddr; sin6.sin6_port = sc->sc_inc.inc_fport; sin6.sin6_flowinfo = sin6.sin6_scope_id = 0; - INP_HASH_WLOCK(&V_tcbinfo); error = in6_pcbconnect(inp, &sin6, thread0.td_ucred, false); - INP_HASH_WUNLOCK(&V_tcbinfo); if (error != 0) goto abort; /* Override flowlabel from in6_pcbconnect. */ @@ -875,9 +873,7 @@ syncache_socket(struct syncache *sc, struct socket *lso, struct mbuf *m) sin.sin_addr = sc->sc_inc.inc_faddr; sin.sin_port = sc->sc_inc.inc_fport; bzero((caddr_t)sin.sin_zero, sizeof(sin.sin_zero)); - INP_HASH_WLOCK(&V_tcbinfo); error = in_pcbconnect(inp, &sin, thread0.td_ucred); - INP_HASH_WUNLOCK(&V_tcbinfo); if (error != 0) goto abort; } diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c index 72100a0fb9d9..277f8fa2af36 100644 --- a/sys/netinet/tcp_usrreq.c +++ b/sys/netinet/tcp_usrreq.c @@ -1424,9 +1424,7 @@ tcp_connect(struct tcpcb *tp, struct sockaddr_in *sin, struct thread *td) if (__predict_false((so->so_options & SO_REUSEPORT_LB) != 0)) return (EOPNOTSUPP); - INP_HASH_WLOCK(&V_tcbinfo); error = in_pcbconnect(inp, sin, td->td_ucred); - INP_HASH_WUNLOCK(&V_tcbinfo); if (error != 0) return (error); @@ -1473,9 +1471,7 @@ tcp6_connect(struct tcpcb *tp, struct sockaddr_in6 *sin6, struct thread *td) if (__predict_false((so->so_options & SO_REUSEPORT_LB) != 0)) return (EOPNOTSUPP); - INP_HASH_WLOCK(&V_tcbinfo); error = in6_pcbconnect(inp, sin6, td->td_ucred, true); - INP_HASH_WUNLOCK(&V_tcbinfo); if (error != 0) return (error); diff --git a/sys/netinet/udp_usrreq.c b/sys/netinet/udp_usrreq.c index 3e8011542753..a94e1ec813c4 100644 --- a/sys/netinet/udp_usrreq.c +++ b/sys/netinet/udp_usrreq.c @@ -1644,11 +1644,9 @@ udp_connect(struct socket *so, struct sockaddr *nam, struct thread *td) { struct epoch_tracker et; struct inpcb *inp; - struct inpcbinfo *pcbinfo; struct sockaddr_in *sin; int error; - pcbinfo = udp_get_inpcbinfo(so->so_proto->pr_protocol); inp = sotoinpcb(so); KASSERT(inp != NULL, ("udp_connect: inp == NULL")); @@ -1669,9 +1667,7 @@ udp_connect(struct socket *so, struct sockaddr *nam, struct thread *td) return (error); } NET_EPOCH_ENTER(et); - INP_HASH_WLOCK(pcbinfo); error = in_pcbconnect(inp, sin, td->td_ucred); - INP_HASH_WUNLOCK(pcbinfo); NET_EPOCH_EXIT(et); if (error == 0) soisconnected(so); diff --git a/sys/netinet6/in6_pcb.c b/sys/netinet6/in6_pcb.c index c4469136fc90..05ca68d014ff 100644 --- a/sys/netinet6/in6_pcb.c +++ b/sys/netinet6/in6_pcb.c @@ -444,7 +444,6 @@ in6_pcbconnect(struct inpcb *inp, struct sockaddr_in6 *sin6, struct ucred *cred, NET_EPOCH_ASSERT(); INP_WLOCK_ASSERT(inp); - INP_HASH_WLOCK_ASSERT(pcbinfo); KASSERT(sin6->sin6_family == AF_INET6, ("%s: invalid address family for %p", __func__, sin6)); KASSERT(sin6->sin6_len == sizeof(*sin6), @@ -468,23 +467,30 @@ in6_pcbconnect(struct inpcb *inp, struct sockaddr_in6 *sin6, struct ucred *cred, * Call inner routine, to assign local interface address. * in6_pcbladdr() may automatically fill in sin6_scope_id. */ + INP_HASH_WLOCK(pcbinfo); if ((error = in6_pcbladdr(inp, sin6, &laddr6.sin6_addr, - sas_required)) != 0) + sas_required)) != 0) { + INP_HASH_WUNLOCK(pcbinfo); return (error); + } if (in6_pcblookup_hash_locked(pcbinfo, &sin6->sin6_addr, sin6->sin6_port, IN6_IS_ADDR_UNSPECIFIED(&inp->in6p_laddr) ? &laddr6.sin6_addr : &inp->in6p_laddr, inp->inp_lport, 0, - M_NODOM, RT_ALL_FIBS) != NULL) + M_NODOM, RT_ALL_FIBS) != NULL) { + INP_HASH_WUNLOCK(pcbinfo); return (EADDRINUSE); + } if (IN6_IS_ADDR_UNSPECIFIED(&inp->in6p_laddr)) { if (inp->inp_lport == 0) { error = in_pcb_lport_dest(inp, (struct sockaddr *) &laddr6, &inp->inp_lport, (struct sockaddr *) sin6, sin6->sin6_port, cred, INPLOOKUP_WILDCARD); - if (error) + if (__predict_false(error)) { + INP_HASH_WUNLOCK(pcbinfo); return (error); + } } inp->in6p_laddr = laddr6.sin6_addr; } @@ -501,6 +507,7 @@ in6_pcbconnect(struct inpcb *inp, struct sockaddr_in6 *sin6, struct ucred *cred, MPASS(error == 0); } else in_pcbrehash(inp); + INP_HASH_WUNLOCK(pcbinfo); return (0); } diff --git a/sys/netinet6/udp6_usrreq.c b/sys/netinet6/udp6_usrreq.c index 6e37586f16e4..98d9d52d2a61 100644 --- a/sys/netinet6/udp6_usrreq.c +++ b/sys/netinet6/udp6_usrreq.c @@ -1120,12 +1120,10 @@ udp6_connect(struct socket *so, struct sockaddr *nam, struct thread *td) { struct epoch_tracker et; struct inpcb *inp; - struct inpcbinfo *pcbinfo; struct sockaddr_in6 *sin6; int error; u_char vflagsav; - pcbinfo = udp_get_inpcbinfo(so->so_proto->pr_protocol); inp = sotoinpcb(so); KASSERT(inp != NULL, ("udp6_connect: inp == NULL")); @@ -1163,9 +1161,7 @@ udp6_connect(struct socket *so, struct sockaddr *nam, struct thread *td) inp->inp_vflag |= INP_IPV4; inp->inp_vflag &= ~INP_IPV6; NET_EPOCH_ENTER(et); - INP_HASH_WLOCK(pcbinfo); error = in_pcbconnect(inp, &sin, td->td_ucred); - INP_HASH_WUNLOCK(pcbinfo); NET_EPOCH_EXIT(et); /* * If connect succeeds, mark socket as connected. If @@ -1196,9 +1192,7 @@ udp6_connect(struct socket *so, struct sockaddr *nam, struct thread *td) inp->inp_vflag &= ~INP_IPV4; inp->inp_vflag |= INP_IPV6; NET_EPOCH_ENTER(et); - INP_HASH_WLOCK(pcbinfo); error = in6_pcbconnect(inp, sin6, td->td_ucred, true); - INP_HASH_WUNLOCK(pcbinfo); NET_EPOCH_EXIT(et); /* * If connect succeeds, mark socket as connected. If From nobody Sun Apr 12 18:35:38 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4ftzkM4z24z6YW7V for ; Sun, 12 Apr 2026 18:35: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ftzkL6vtnz3ZpR for ; Sun, 12 Apr 2026 18:35:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776018939; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6mXOWQDpTvyo3MOXjNK95HhINJS2uwlWL7iNpSifyT4=; b=Owvl8S3or89AN94jvP/I04s2unUNEXDmCyiv5hM3HGndCPMFx+QdmtfQD++AvCVFJFlevK yS5bhrqARWuvVCSQ79PHg49tATlCG2IEqdEmygJz0c7KBTEn214j18Xuiy7bUoL/G/7rU8 qrQY2E/42mqYlET/ImH/eFeaUtTZX7wm3rWjKYOJ8u930VE/HwHlIjopfBr995c0HeTyCx QiHozhyQDCrmMyRVibxK8EOL54yhkDGB8/Y/hZhw+61IOWWRyDZnw2dFtjW7BeKAIdDfoC 4zYJc+Mi0rw0fGjhpVLFBt01HAu8XaM2vovu03z/UwAlJcRuyEI5CC0Gw/L3qg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776018939; a=rsa-sha256; cv=none; b=JALu80p0zN8+0yzT9na0vnKQ+oGNnFdtsK2/EuSL9LsOB6IX41674OcTmyoYJQn9psnQcm CBqnDTwWRsMRNPvjZ5NX9IDX1rJcQpHfcBwfGJK2NKbXuE2b3OilHkz0JpYS0YjFkrM9Nl 3i+PnKXFxb07WePoOfhRgJxXA8/Qs3ejSlIuRDFXtBDlleXxaPrSo8UlfBZJjd6nyUV49S bPgj2lRaFVQ51Y1dh2TStbs7IXMYHnSd5hdbx5sS1MsRffGOuFGKu8NQ1ysEDdChogaRUj MBIXUp17FOa16zAFL1RrahS+ptSKLaNqZxtAD9A3rw+DojIr+8V8CvtXTVInRw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776018939; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6mXOWQDpTvyo3MOXjNK95HhINJS2uwlWL7iNpSifyT4=; b=XJMc7PGMGH4CCEQB8PWvgFlN9Bh/FveAM6W/JYbJaY71HbGQ1m1LTGo38NomflZw5DhPkl 4at8Hi7HWtaXZTCd97rSHXP69rDJ9zrj012+0RiAL2s19qMMBKraosjXPHp+tW0ivSi2Vb AR223dbvFqUeDOdhIReW0zc3NJVs6s6uw/0tW3FukTkSXMyQ0Uj7ybHPu5QXjzyHBy0gP5 yzotsaeyOTNjBV/F/AEhs2RddUmTGqt9rENQ4Oq+7GYDRu+OsFdPhV+13vM5wrDbdThwKK 5bKVKOJJ9XCtarFupWXgTTADgNy2/QYHqHW8SHwcQmQuzNf13tpdSGr5y1kaOA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4ftzkL6DrTzDJS for ; Sun, 12 Apr 2026 18:35:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3a204 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 12 Apr 2026 18:35:38 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: d7c409174d25 - main - inpcb: make in6_pcbsetport() acquire the hash lock internally List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: d7c409174d25f925c1e93f54957cdadb4545da3a Auto-Submitted: auto-generated Date: Sun, 12 Apr 2026 18:35:38 +0000 Message-Id: <69dbe5fa.3a204.1df830b8@gitrepo.freebsd.org> The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=d7c409174d25f925c1e93f54957cdadb4545da3a commit d7c409174d25f925c1e93f54957cdadb4545da3a Author: Gleb Smirnoff AuthorDate: 2026-04-12 18:33:41 +0000 Commit: Gleb Smirnoff CommitDate: 2026-04-12 18:33:41 +0000 inpcb: make in6_pcbsetport() acquire the hash lock internally Reviewed by: pouria, rrs, markj Differential Revision: https://reviews.freebsd.org/D55972 --- sys/netinet6/in6_pcb.c | 25 ++++++++++++++++++------- sys/netinet6/udp6_usrreq.c | 5 ----- 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/sys/netinet6/in6_pcb.c b/sys/netinet6/in6_pcb.c index 05ca68d014ff..136f5c8a9828 100644 --- a/sys/netinet6/in6_pcb.c +++ b/sys/netinet6/in6_pcb.c @@ -112,18 +112,16 @@ #include #include -int -in6_pcbsetport(struct in6_addr *laddr, struct inpcb *inp, struct ucred *cred) +static int +in6_pcbsetport_locked(struct in6_addr *laddr, struct inpcb *inp, + struct ucred *cred) { struct socket *so = inp->inp_socket; u_int16_t lport = 0; int error, lookupflags = 0; -#ifdef INVARIANTS - struct inpcbinfo *pcbinfo = inp->inp_pcbinfo; -#endif INP_WLOCK_ASSERT(inp); - INP_HASH_WLOCK_ASSERT(pcbinfo); + INP_HASH_WLOCK_ASSERT(inp->inp_pcbinfo); error = prison_local_ip6(cred, laddr, ((inp->inp_flags & IN6P_IPV6_V6ONLY) != 0)); @@ -150,6 +148,18 @@ in6_pcbsetport(struct in6_addr *laddr, struct inpcb *inp, struct ucred *cred) return (0); } +int +in6_pcbsetport(struct in6_addr *laddr, struct inpcb *inp, struct ucred *cred) +{ + int error; + + INP_HASH_WLOCK(inp->inp_pcbinfo); + error = in6_pcbsetport_locked(laddr, inp, cred); + INP_HASH_WUNLOCK(inp->inp_pcbinfo); + + return (error); +} + /* * Determine whether the inpcb can be bound to the specified address/port tuple. */ @@ -341,7 +351,8 @@ in6_pcbbind(struct inpcb *inp, struct sockaddr_in6 *sin6, int flags, if ((flags & INPBIND_FIB) != 0) inp->inp_flags |= INP_BOUNDFIB; if (lport == 0) { - if ((error = in6_pcbsetport(&inp->in6p_laddr, inp, cred)) != 0) { + error = in6_pcbsetport_locked(&inp->in6p_laddr, inp, cred); + if (__predict_false(error != 0)) { INP_HASH_WUNLOCK(inp->inp_pcbinfo); /* Undo an address bind that may have occurred. */ inp->inp_flags &= ~INP_BOUNDFIB; diff --git a/sys/netinet6/udp6_usrreq.c b/sys/netinet6/udp6_usrreq.c index 98d9d52d2a61..3f4c3111fa5b 100644 --- a/sys/netinet6/udp6_usrreq.c +++ b/sys/netinet6/udp6_usrreq.c @@ -832,14 +832,9 @@ udp6_send(struct socket *so, int flags_arg, struct mbuf *m, laddr = &in6a; if (inp->inp_lport == 0) { - struct inpcbinfo *pcbinfo; - INP_WLOCK_ASSERT(inp); - pcbinfo = udp_get_inpcbinfo(so->so_proto->pr_protocol); - INP_HASH_WLOCK(pcbinfo); error = in6_pcbsetport(laddr, inp, td->td_ucred); - INP_HASH_WUNLOCK(pcbinfo); if (error != 0) { /* Undo an address bind that may have occurred. */ inp->in6p_laddr = in6addr_any; From nobody Sun Apr 12 18:35:39 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4ftzkN37Xqz6YVY3 for ; Sun, 12 Apr 2026 18:35: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ftzkN0CrLz3ZyB for ; Sun, 12 Apr 2026 18:35:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776018940; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pkJYbwWjS0IWf7C5xb1M8NJ+MUKecr7DE/MdznrojPU=; b=tnnYpx8c+bamuVI1EaRGSE0lcVfki1PMaigXPI+Dc0eMjDM5gBcexLz1TCfT2ZWpyy9Niq eYTxcdARoCZFiHPo9cs/1ruQeyotM08h7Q0miy34tENS8J520ufGP8B32QDM9UQ6lMz/A2 ED9LqfY6Z+m6ftqw/D8EdXbbbm8Z9opHcYvg9AypocMKjJ3ZwPVom4ioz7ILnCAU91Sl3J KNgsBEdrwiKcy67THyqnNQ91Zm1AaPwicDZjQqHfXj9YGKZZrSkEWIRKhr+Bq0Alj8aoxn JbuMBKH7Hj4yrD28AXwHcJHSRqENEAASOqIGMkniNBzOmVyc9dgk7hB5ILGLFg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776018940; a=rsa-sha256; cv=none; b=gDX9zJWc5vEBjl8KY7oRw9OUQPM2yX1rnLZPHcDLHcGLowjEfXxwuEwAee+xJGJo9KBZ3X 9T4+4IBHdjUMAQa8wgbreqzGWWqG/ug/BWPh0zRPoxpNRN3Nhj6GoTLPui41Ly5WYzdEjO 2o9rjQfcCWU3Hg3YGmxZZC2fsbOgiMfo5csRIAefeOSg88hNQ888u0FNCURPvS5QVCTwNA 1oE40zJh/sYajdhdPXqdg2ORlO4i7f+OEhF1ljSnx2WoKDR0UWp+EbI6OlxmivGlYogijI 3tut9M38CFo3ejE9dW1M04gYyXdI6sE+9ODU3jFGR7aD3g/tDWIcgJp5WpVt2Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776018940; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pkJYbwWjS0IWf7C5xb1M8NJ+MUKecr7DE/MdznrojPU=; b=Sz0nj7iso5ncT2KhXenQyE3nwr5quBaeqDBnYNv8tzW5TUqAC+nGUit+UqOuLyxvPKOSiO 03w3rmTWpMPMcqYq/FNaKyFHjqqRxGch/YtIPYKMAlPIs/AsqL9yFBpslConveAHNSpPdj 9NcdVUSSDJBIS3X3HdF4kntkoxJUV/QscxfBNnqOvgzW/qEej4jMCRN6MyD0CcPxIBXKJ2 oMK3W9OFMsf7EqDov5L6fPG/Fj0s0SRyFKkmevsaatFdBpWt1Zu8ufRnBFMgJ64dWYzQvi tRilQJNhYy90vvLspv4fWB0bPYKU2gJeO53NNaJKi3ADETfoBYIeJ076Elqcww== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4ftzkM6llLzDWP for ; Sun, 12 Apr 2026 18:35:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3a0da by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 12 Apr 2026 18:35:39 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: acb79b56b1eb - main - udp: make in_pcbbind_setup() acquire the hash lock internally List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: acb79b56b1eb9ccd3efb519b6527116714ebf876 Auto-Submitted: auto-generated Date: Sun, 12 Apr 2026 18:35:39 +0000 Message-Id: <69dbe5fb.3a0da.42de0432@gitrepo.freebsd.org> The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=acb79b56b1eb9ccd3efb519b6527116714ebf876 commit acb79b56b1eb9ccd3efb519b6527116714ebf876 Author: Gleb Smirnoff AuthorDate: 2026-04-12 18:33:51 +0000 Commit: Gleb Smirnoff CommitDate: 2026-04-12 18:33:51 +0000 udp: make in_pcbbind_setup() acquire the hash lock internally Reviewed by: pouria, rrs, markj Differential Revision: https://reviews.freebsd.org/D55973 --- sys/netinet/in_pcb.c | 99 +++++++++++++++++++++++++++--------------------- sys/netinet/udp_usrreq.c | 4 -- 2 files changed, 56 insertions(+), 47 deletions(-) diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c index 69974d931e44..29214fbd2cf6 100644 --- a/sys/netinet/in_pcb.c +++ b/sys/netinet/in_pcb.c @@ -714,46 +714,6 @@ out: #endif } -#ifdef INET -int -in_pcbbind(struct inpcb *inp, struct sockaddr_in *sin, int flags, - struct ucred *cred) -{ - int error; - bool anonport; - - KASSERT(sin == NULL || sin->sin_family == AF_INET, - ("%s: invalid address family for %p", __func__, sin)); - KASSERT(sin == NULL || sin->sin_len == sizeof(struct sockaddr_in), - ("%s: invalid address length for %p", __func__, sin)); - INP_WLOCK_ASSERT(inp); - - if (inp->inp_lport != 0 || inp->inp_laddr.s_addr != INADDR_ANY) - return (EINVAL); - anonport = sin == NULL || sin->sin_port == 0; - - INP_HASH_WLOCK(inp->inp_pcbinfo); - error = in_pcbbind_setup(inp, sin, &inp->inp_laddr.s_addr, - &inp->inp_lport, flags, cred); - if (error) { - INP_HASH_WUNLOCK(inp->inp_pcbinfo); - return (error); - } - if (__predict_false((error = in_pcbinshash(inp)) != 0)) { - INP_HASH_WUNLOCK(inp->inp_pcbinfo); - MPASS(inp->inp_socket->so_options & SO_REUSEPORT_LB); - inp->inp_laddr.s_addr = INADDR_ANY; - inp->inp_lport = 0; - inp->inp_flags &= ~INP_BOUNDFIB; - return (error); - } - INP_HASH_WUNLOCK(inp->inp_pcbinfo); - if (anonport) - inp->inp_flags |= INP_ANONPORT; - return (0); -} -#endif - #if defined(INET) || defined(INET6) /* * Assign a local port like in_pcb_lport(), but also used with connect() @@ -1016,9 +976,9 @@ in_pcbbind_avail(struct inpcb *inp, const struct in_addr laddr, * * On error, the values of *laddrp and *lportp are not changed. */ -int -in_pcbbind_setup(struct inpcb *inp, struct sockaddr_in *sin, in_addr_t *laddrp, - u_short *lportp, int flags, struct ucred *cred) +static int +in_pcbbind_setup_locked(struct inpcb *inp, struct sockaddr_in *sin, + in_addr_t *laddrp, u_short *lportp, int flags, struct ucred *cred) { struct socket *so = inp->inp_socket; struct in_addr laddr; @@ -1082,6 +1042,59 @@ in_pcbbind_setup(struct inpcb *inp, struct sockaddr_in *sin, in_addr_t *laddrp, return (0); } +int +in_pcbbind_setup(struct inpcb *inp, struct sockaddr_in *sin, in_addr_t *laddrp, + u_short *lportp, int flags, struct ucred *cred) +{ + int error; + + INP_HASH_WLOCK(inp->inp_pcbinfo); + error = in_pcbbind_setup_locked(inp, sin, laddrp, lportp, flags, cred); + INP_HASH_WUNLOCK(inp->inp_pcbinfo); + + return (error); +} + +#ifdef INET +int +in_pcbbind(struct inpcb *inp, struct sockaddr_in *sin, int flags, + struct ucred *cred) +{ + int error; + bool anonport; + + KASSERT(sin == NULL || sin->sin_family == AF_INET, + ("%s: invalid address family for %p", __func__, sin)); + KASSERT(sin == NULL || sin->sin_len == sizeof(struct sockaddr_in), + ("%s: invalid address length for %p", __func__, sin)); + INP_WLOCK_ASSERT(inp); + + if (inp->inp_lport != 0 || inp->inp_laddr.s_addr != INADDR_ANY) + return (EINVAL); + anonport = sin == NULL || sin->sin_port == 0; + + INP_HASH_WLOCK(inp->inp_pcbinfo); + error = in_pcbbind_setup_locked(inp, sin, &inp->inp_laddr.s_addr, + &inp->inp_lport, flags, cred); + if (error) { + INP_HASH_WUNLOCK(inp->inp_pcbinfo); + return (error); + } + if (__predict_false((error = in_pcbinshash(inp)) != 0)) { + INP_HASH_WUNLOCK(inp->inp_pcbinfo); + MPASS(inp->inp_socket->so_options & SO_REUSEPORT_LB); + inp->inp_laddr.s_addr = INADDR_ANY; + inp->inp_lport = 0; + inp->inp_flags &= ~INP_BOUNDFIB; + return (error); + } + INP_HASH_WUNLOCK(inp->inp_pcbinfo); + if (anonport) + inp->inp_flags |= INP_ANONPORT; + return (0); +} +#endif + /* * Connect from a socket to a specified address. * Both address and port must be specified in argument sin. diff --git a/sys/netinet/udp_usrreq.c b/sys/netinet/udp_usrreq.c index a94e1ec813c4..b973b299ca56 100644 --- a/sys/netinet/udp_usrreq.c +++ b/sys/netinet/udp_usrreq.c @@ -1117,7 +1117,6 @@ udp_send(struct socket *so, int flags, struct mbuf *m, struct sockaddr *addr, int len, error = 0; struct in_addr faddr, laddr; struct cmsghdr *cm; - struct inpcbinfo *pcbinfo; struct sockaddr_in *sin, src; struct epoch_tracker et; int cscov_partial = 0; @@ -1289,7 +1288,6 @@ udp_send(struct socket *so, int flags, struct mbuf *m, struct sockaddr *addr, goto release; pr = inp->inp_socket->so_proto->pr_protocol; - pcbinfo = udp_get_inpcbinfo(pr); /* * If the IP_SENDSRCADDR control message was specified, override the @@ -1310,10 +1308,8 @@ udp_send(struct socket *so, int flags, struct mbuf *m, struct sockaddr *addr, inp->inp_vflag |= INP_IPV4; inp->inp_vflag &= ~INP_IPV6; } - INP_HASH_WLOCK(pcbinfo); error = in_pcbbind_setup(inp, &src, &laddr.s_addr, &lport, V_udp_bind_all_fibs ? 0 : INPBIND_FIB, td->td_ucred); - INP_HASH_WUNLOCK(pcbinfo); if ((flags & PRUS_IPV6) != 0) inp->inp_vflag = vflagsav; if (error) From nobody Sun Apr 12 18:35:41 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4ftzkP6cVtz6YW2g for ; Sun, 12 Apr 2026 18:35: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ftzkP2Gfmz3b5H for ; Sun, 12 Apr 2026 18:35:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776018941; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pv2VdUDNWwm5nHUO6pF4YtWfb0pHnB7cNywn+QdIDKE=; b=UI6v/+P6PWHh+5diV5/U1nguih+7in221H9Yzu85T8MqlS4HkXuNUB4n2V6uRKU0Eoq3l4 rY65unAyYU6v/W82dGYrPNBOzvBlyLV5JA+E46wyASPBG4dpzCkAYT3KK8R+L5nMbii98b b6iaEhlTZMk0rkzJh+Css9qTMf2luRyrH4HIYwfBtfLJL+hOg8LnvYT5n0ovIR+VN8D0F4 za0xcX6QVOpiySjybAKmEaia5oLdnLv54/HUEWMnti9cz2ugd9FOeDYvLKfi3V9eunR7o7 FzjsVJB94bdEOsjf/D0EkBPOjIi3Tbr6kvqy7Tc0g1lHUhE2NHqFtxo0RSE9OQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776018941; a=rsa-sha256; cv=none; b=d0uPbABt7SLLudKUYmUZ1Bx9SHvftM57zk/uBI3KZMQSuNtRH9mEMBsSX/erIVOpg9Ufle ZNXPa+XhY10JKpEdVrjUS6MhwuI0bZr2J6uPOjyD+O0cRIfBC4er0Wmp6oKKHEa45RknFH 1Pn7A/Wwwd25uboTxdoXg1h/Ukik8XHeL2f2QrFNozsDFxB9WgA7V/Gsj+Qft8DPLuAB0X uU0/vf4vdeGe4yDZECQ234kP70aQ03pVUv4CbzrFaLXD62z9w/CxEWXtfxf3KLzYZFj+9I ICY/azYqblsXusVFP2Y9rn3TFihNf+auX3lTVAZ1fqGx/FdskqFKNY3swbwV8A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776018941; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pv2VdUDNWwm5nHUO6pF4YtWfb0pHnB7cNywn+QdIDKE=; b=FDOLGmMo3DBE/AgIgyHHEkJ/y9zBnEJbhtCo1guL6O2+uzwDWydGbjmf0H1tYQNsnQ9rQ6 FnLs5FW62XZ12dXGQtFhIXQVFmzGyuWgsVGSZ/Uuxa+sIg4zuZZfB/4hUfksm6uOJsdGMf E7dk42An6ATsAb9mmz7LERMQt8nvgYnqDimgQ1tarAuVd4bWvyMaFW24zIexAlpefnoJOr 5uJFHJ5+BZHPVM1tkN+BfBvJHg/q0xAhENjXHzB8YQwfJWPxfRmrWeBSIrxv78U5waLXjI LPxJm9rIF4llUmWIPgTT9Y+zYR9MNqr9xAr4wsQXhJUyUm776UytXS3bVuu5lQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4ftzkP0HlbzDDP for ; Sun, 12 Apr 2026 18:35:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3a4df by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 12 Apr 2026 18:35:41 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 1d0ea3dfb9cb - main - raw ip: remove extra argument to rip_dodisconnect() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: 1d0ea3dfb9cbc26e77491bacef1cbc5d72e0375d Auto-Submitted: auto-generated Date: Sun, 12 Apr 2026 18:35:41 +0000 Message-Id: <69dbe5fd.3a4df.19606b1e@gitrepo.freebsd.org> The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=1d0ea3dfb9cbc26e77491bacef1cbc5d72e0375d commit 1d0ea3dfb9cbc26e77491bacef1cbc5d72e0375d Author: Gleb Smirnoff AuthorDate: 2026-04-12 18:34:05 +0000 Commit: Gleb Smirnoff CommitDate: 2026-04-12 18:34:05 +0000 raw ip: remove extra argument to rip_dodisconnect() No functional change. --- sys/netinet/raw_ip.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/sys/netinet/raw_ip.c b/sys/netinet/raw_ip.c index f2fec876d077..5114a69d7bf2 100644 --- a/sys/netinet/raw_ip.c +++ b/sys/netinet/raw_ip.c @@ -871,7 +871,7 @@ rip_detach(struct socket *so) } static void -rip_dodisconnect(struct socket *so, struct inpcb *inp) +rip_dodisconnect(struct inpcb *inp) { struct inpcbinfo *pcbinfo; @@ -882,9 +882,9 @@ rip_dodisconnect(struct socket *so, struct inpcb *inp) inp->inp_faddr.s_addr = INADDR_ANY; rip_inshash(inp); INP_HASH_WUNLOCK(pcbinfo); - SOCK_LOCK(so); - so->so_state &= ~SS_ISCONNECTED; - SOCK_UNLOCK(so); + SOCK_LOCK(inp->inp_socket); + inp->inp_socket->so_state &= ~SS_ISCONNECTED; + SOCK_UNLOCK(inp->inp_socket); INP_WUNLOCK(inp); } @@ -896,7 +896,7 @@ rip_abort(struct socket *so) inp = sotoinpcb(so); KASSERT(inp != NULL, ("rip_abort: inp == NULL")); - rip_dodisconnect(so, inp); + rip_dodisconnect(inp); } static void @@ -907,7 +907,7 @@ rip_close(struct socket *so) inp = sotoinpcb(so); KASSERT(inp != NULL, ("rip_close: inp == NULL")); - rip_dodisconnect(so, inp); + rip_dodisconnect(inp); } static int @@ -921,7 +921,7 @@ rip_disconnect(struct socket *so) inp = sotoinpcb(so); KASSERT(inp != NULL, ("rip_disconnect: inp == NULL")); - rip_dodisconnect(so, inp); + rip_dodisconnect(inp); return (0); } From nobody Sun Apr 12 18:35:42 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4ftzkR0JgMz6YW2k for ; Sun, 12 Apr 2026 18:35: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ftzkQ1lcDz3b0h for ; Sun, 12 Apr 2026 18:35:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776018942; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=onlNTC957PbBJTiVWYFnGPqFaXp7mdjTezck/ELFUTw=; b=cRUXAon+fmEoIm5yqKNLU1QOhiF8CIXWzcUi2uhJclEXzmAp3pBatO1jkSiSEpvmXHr/OB 0WjwgW5q7sOTPVeQtfvZWK9lRII5mnhBcJ9fX2+m1Uzbq843dBdTxg6JW/2UBVAP1MD0rL gHktvLbuhV0tl3sqDVEPGI0q5QeNV2hl9K153mUsyDkhzwLTX719LtS1iSbHeLSUIo510n iOtZ5+vESuuBWbIyl79UdlacQkCfXDSTqknDI9SK6kUKbpHKOouDsIW28cmgLK+u1ZsCDG G8VDoGcGQLDCzgUhz5NIsql6/7K6DvLUatGBG6Dn4TvMYFGSqxIveakxHc+fXg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776018942; a=rsa-sha256; cv=none; b=cbvx0lGKHrmkO4E2oFSp6INRmzC7ZtWxMbkd3IbmuTuUGQ9QNc/lGeSHkw6C23OsmjQr+O lswQGlcexhedqVpjaIaD6+HfKnhD3IxVbPTVvmYbzsAzrGHZoiesjynPdbyoNWeM4meu/U gBDq5ti29OGempYV1znpq4fFAa23KVwhyuRRukiJkhqK6TnEG87Uwt6etTiy46iY27B9BX B1/1LhF7RzF+WOmuX0N4Q+nrs6s9zV7qONqeKKItSwNOfJGY8ZeLPahyk9jFVgUExvLLva JIZjbj21i9AlvosAK7iyKlELC2QBRfTIXIwaqSI5LTjVoYpyzZeEphLAiq/ckw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776018942; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=onlNTC957PbBJTiVWYFnGPqFaXp7mdjTezck/ELFUTw=; b=WwdvZb/9vvDfEi7oyzjYbvmiFYixHdVwMyPxYKB11C7sT3YEcPkWewngWUbItss6KxbHDq wWdb64Z1Iq1a33WDVO8iCoJbL4cBaxkILbbzZhREP9ioh6H1NLsjpO6FrI+AI1FJv1XYUZ KJLtjjf9t7MrnndNcBL+jJ3K5mcRHBPvEEIxus/VWf62I5cf9gU9xAMF1Kr2UWKtHOz9bU TlvYQINFYsRPIc5ZhoJ7NNwYuFXammyEBKDx5+1Y6QezOwv+hq8cRZvXcEeNLgX6lPwRuf oWfvK38+Aybrl0NeG1jT4l7wOnuSLSJ3/3iH7kwVhHE/aqBU4hhX9DMMG1hrnA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4ftzkQ17jMzDSc for ; Sun, 12 Apr 2026 18:35:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3a555 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 12 Apr 2026 18:35:42 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: edece33b38eb - main - inpcb: move local address assignment out of in_pcbdisconnect() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: edece33b38ebcba46bd4d81382ebdb5a634a0c6d Auto-Submitted: auto-generated Date: Sun, 12 Apr 2026 18:35:42 +0000 Message-Id: <69dbe5fe.3a555.54922024@gitrepo.freebsd.org> The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=edece33b38ebcba46bd4d81382ebdb5a634a0c6d commit edece33b38ebcba46bd4d81382ebdb5a634a0c6d Author: Gleb Smirnoff AuthorDate: 2026-04-12 18:34:57 +0000 Commit: Gleb Smirnoff CommitDate: 2026-04-12 18:34:57 +0000 inpcb: move local address assignment out of in_pcbdisconnect() The logic of clearing local address at the protocol level makes sense. It is feature of UDP, not of any protocol, that local address is cleared on disconnect. This code can be tracked down to pre-FreeBSD times. For example, for TCP we want a disconnected socket to return previously used local address with getsockname(2). The TCP has successfully evaded that by not calling in_pcbdisconnect() and calling in_pcbdetach() in the very old code and in_pcbdrop() later. After D55661 TCP again has this potential bug masked. Better make it right than rely on such unintentional evasions. The raw IP sockets don't use in_pcbdisconnect(), but they are going to in the near future. If in_pcbdisconnect() clears local address for them, that would be a larger bug than just getsockname(). A raw socket may be bound with bind(2) and then connect(2)ed, and then disconnected, e.g. connect(INADDR_ANY). And when we run raw IP socket through in_pcbdisconnect() we don't want to lose local address. This reverts D38362. This reverts commit 2589ec0f365777faacf36bd1eb24706538836b17. Reviewed by: rrs, markj Differential Revision: https://reviews.freebsd.org/D56170 --- sys/netinet/in_pcb.c | 1 - sys/netinet/udp_usrreq.c | 3 +++ sys/netinet6/in6_pcb.c | 1 - sys/netinet6/udp6_usrreq.c | 3 +++ 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c index 29214fbd2cf6..7b294e0a92d5 100644 --- a/sys/netinet/in_pcb.c +++ b/sys/netinet/in_pcb.c @@ -1465,7 +1465,6 @@ in_pcbdisconnect(struct inpcb *inp) if ((inp->inp_socket->so_proto->pr_flags & PR_CONNREQUIRED) == 0) { /* See the comment in in_pcbinshash(). */ inp->inp_smr = smr_advance(inp->inp_pcbinfo->ipi_smr); - inp->inp_laddr.s_addr = INADDR_ANY; inp->inp_faddr.s_addr = INADDR_ANY; inp->inp_fport = 0; } diff --git a/sys/netinet/udp_usrreq.c b/sys/netinet/udp_usrreq.c index b973b299ca56..23b0ca684b09 100644 --- a/sys/netinet/udp_usrreq.c +++ b/sys/netinet/udp_usrreq.c @@ -1528,6 +1528,7 @@ udp_abort(struct socket *so) INP_WLOCK(inp); if (inp->inp_faddr.s_addr != INADDR_ANY) { in_pcbdisconnect(inp); + inp->inp_laddr.s_addr = INADDR_ANY; soisdisconnected(so); } INP_WUNLOCK(inp); @@ -1630,6 +1631,7 @@ udp_close(struct socket *so) INP_WLOCK(inp); if (inp->inp_faddr.s_addr != INADDR_ANY) { in_pcbdisconnect(inp); + inp->inp_laddr.s_addr = INADDR_ANY; soisdisconnected(so); } INP_WUNLOCK(inp); @@ -1697,6 +1699,7 @@ udp_disconnect(struct socket *so) return (ENOTCONN); } in_pcbdisconnect(inp); + inp->inp_laddr.s_addr = INADDR_ANY; SOCK_LOCK(so); so->so_state &= ~SS_ISCONNECTED; /* XXX */ SOCK_UNLOCK(so); diff --git a/sys/netinet6/in6_pcb.c b/sys/netinet6/in6_pcb.c index 136f5c8a9828..ad596cf761d2 100644 --- a/sys/netinet6/in6_pcb.c +++ b/sys/netinet6/in6_pcb.c @@ -542,7 +542,6 @@ in6_pcbdisconnect(struct inpcb *inp) /* See the comment in in_pcbinshash(). */ inp->inp_smr = smr_advance(inp->inp_pcbinfo->ipi_smr); /* XXX-MJ torn writes are visible to SMR lookup */ - memset(&inp->in6p_laddr, 0, sizeof(inp->in6p_laddr)); memset(&inp->in6p_faddr, 0, sizeof(inp->in6p_faddr)); inp->inp_fport = 0; } diff --git a/sys/netinet6/udp6_usrreq.c b/sys/netinet6/udp6_usrreq.c index 3f4c3111fa5b..ede791a7d175 100644 --- a/sys/netinet6/udp6_usrreq.c +++ b/sys/netinet6/udp6_usrreq.c @@ -996,6 +996,7 @@ udp6_abort(struct socket *so) if (!IN6_IS_ADDR_UNSPECIFIED(&inp->in6p_faddr)) { in6_pcbdisconnect(inp); + memset(&inp->in6p_laddr, 0, sizeof(inp->in6p_laddr)); soisdisconnected(so); } INP_WUNLOCK(inp); @@ -1105,6 +1106,7 @@ udp6_close(struct socket *so) #endif if (!IN6_IS_ADDR_UNSPECIFIED(&inp->in6p_faddr)) { in6_pcbdisconnect(inp); + memset(&inp->in6p_laddr, 0, sizeof(inp->in6p_laddr)); soisdisconnected(so); } INP_WUNLOCK(inp); @@ -1239,6 +1241,7 @@ udp6_disconnect(struct socket *so) } in6_pcbdisconnect(inp); + memset(&inp->in6p_laddr, 0, sizeof(inp->in6p_laddr)); SOCK_LOCK(so); so->so_state &= ~SS_ISCONNECTED; /* XXX */ SOCK_UNLOCK(so); From nobody Sun Apr 12 18:35:43 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4ftzkS17dWz6YW9Z for ; Sun, 12 Apr 2026 18:35: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ftzkR5HKHz3b5d for ; Sun, 12 Apr 2026 18:35:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776018943; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tZBjRxpkdr0RVQBD61eYGUh2I9nB0TmwBvhOFCvm0mg=; b=DaPdY4jap7T/1xCrdk17cnlYgE7/b24fMuVXFGaA0dl/Mkoe8A8Moay28mr3YkPJ0M3ohZ Qdcsnr8UE2Mhsl3+ariw384LreYhkyPHJ6Caw5isM+ZivIvRNMSLtdwQrbqrhOthtQtNTa JHv9vUFCF9tQ+qXelb54SqfWQ81hWR37WWCmmz/p1S7DBSVEy8qQhZCRyDSt6eJicHetFs y/r1P1x4jm52jSshviVUHrWg3vyMgABo215bQuxSCZvxzzJvXtqJ57dbmJ2XYVHM4dJKN0 c/xfLUMFPDZsopNmYniACVpmkWb1XusOeJuGMPGuaj1VdsNGDJ4SEIfyVmh/AA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776018943; a=rsa-sha256; cv=none; b=sYtzXDYGYE0Q1zIt9WJHug7OvNruytQu76ISJ2DDnjFmSO8xZpkfPlX/k7ne3I/kQXpVtn HREoe2zGt6Ci3VPogDyXZ1zs0H63O9yKk/AWkpVXp/1xRCDKmcUxomVJc9OoVon0CAhDGu U4F8fMvfNiZGgQTvDmgvBEmLJw2eoGoAYSYqN3KTlDT7AxWvm0uy5dsJPcQ7FteJdTsoHG 9TQphNTEBPsSf0l65TgEhxSrNoIGO9Z+3mnA44wiyAxnlJISdDdl3z+g7zrx05JPxNHziP 1HW5BzQQoO+KiLkLvGV59Jf/nvMW8uSWmfK62mB4WSzdr/5qy6onhjyf2XR2xg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776018943; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tZBjRxpkdr0RVQBD61eYGUh2I9nB0TmwBvhOFCvm0mg=; b=lK2bjA6fo3HN9VMQ0Xaasy6xoSizg31k7XNXZwvG/h6OJgYf9rR9R4wACLVe59qKQJ+ZSu YfXOYab1X09ZQ/kUigs6P/zAkCpPvIkSBHrES8MKXqTdg/5TrP4lVwZz0riIZ3wwn+l9vh jifpFLXWDeSyQNFC7bWM12YCs3OfjcxNEAlaNcw6crKsxMiVykUh47vOqti7XOL7UHVu4H 077D+ydqOER00138me4BFhGYRgPA7eMYOVU6CqR9TIbcKKRvezOnNqYCHc+op//1Ww6K9+ tsVrNEUca61nNLIQLnUISOcnyv89xR3peJRRlAhkAJ/DSFFNSoe+s6D3S84iXA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4ftzkR1jHBzDDR for ; Sun, 12 Apr 2026 18:35:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3a208 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 12 Apr 2026 18:35:43 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: ece716c5d347 - main - raw ip: move hash table manipulation to inpcb layer List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: ece716c5d34728a170f1dfe1b3389c267d6ddd1e Auto-Submitted: auto-generated Date: Sun, 12 Apr 2026 18:35:43 +0000 Message-Id: <69dbe5ff.3a208.15129b1d@gitrepo.freebsd.org> The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=ece716c5d34728a170f1dfe1b3389c267d6ddd1e commit ece716c5d34728a170f1dfe1b3389c267d6ddd1e Author: Gleb Smirnoff AuthorDate: 2026-04-12 18:35:13 +0000 Commit: Gleb Smirnoff CommitDate: 2026-04-12 18:35:13 +0000 raw ip: move hash table manipulation to inpcb layer The SOCK_RAW socket is a multiple receiver socket by its definition. An incoming packet may be copied to multiple sockets. Thus, incoming packet handling is expensive. Systems with many thousands of raw sockets usually have them connect(2)-ed to different destinations. This allows for some improvement of the input handling, which was introduced by 9ed324c9a588 back in 2008. This optimization was made specifically for L2TP/PPTP VPN concentrators based on ports/net/mpd5. This change generalizes the idea of 9ed324c9a588, so that it potentially can be used with IPv6 raw sockets. This also eliminates last use of the pcbinfo hash lock outside of in_pcb.c. While here make a speculative design decision: put into the hash table sockets that did only connect(2). Previously, we were indexing only sockets that were protocol bound, did bind(2) and did connect(2). My speculation is that only the remote IP provides some real entropy into the hash and local address and proto are expected to be the same for majority of the sockets. My other speculation is that VPN concentrators other than mpd5 may not bind(2) their sockets, thus not getting any use of the hash. Differential Revision: https://reviews.freebsd.org/D56172 --- sys/netinet/in_pcb.c | 36 +++++++++++++++ sys/netinet/in_pcb.h | 10 ++++ sys/netinet/in_pcb_var.h | 3 -- sys/netinet/raw_ip.c | 118 +++++++++-------------------------------------- 4 files changed, 69 insertions(+), 98 deletions(-) diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c index 7b294e0a92d5..af62aea91bf8 100644 --- a/sys/netinet/in_pcb.c +++ b/sys/netinet/in_pcb.c @@ -2833,6 +2833,42 @@ in_pcbrehash(struct inpcb *inp) } } +void +ripcb_connect(struct inpcb *inp) +{ + struct inpcbinfo *pcbinfo = inp->inp_pcbinfo; + uint32_t hash; + + INP_WLOCK_ASSERT(inp); + MPASS(inp->inp_flags & INP_UNCONNECTED); + + hash = RIPCB_HASH(inp) & pcbinfo->ipi_hashmask; + + INP_HASH_WLOCK(pcbinfo); + CK_LIST_REMOVE(inp, inp_unconn_list); + CK_LIST_INSERT_HEAD(&pcbinfo->ipi_hash_exact[hash], inp, + inp_hash_exact); + INP_HASH_WUNLOCK(pcbinfo); + inp->inp_flags &= ~INP_UNCONNECTED; +} + +void +ripcb_disconnect(struct inpcb *inp) +{ + struct inpcbinfo *pcbinfo = inp->inp_pcbinfo; + + INP_WLOCK_ASSERT(inp); + + if (inp->inp_flags & INP_UNCONNECTED) + return; + + INP_HASH_WLOCK(pcbinfo); + CK_LIST_REMOVE(inp, inp_hash_exact); + CK_LIST_INSERT_HEAD(&pcbinfo->ipi_list_unconn, inp, inp_unconn_list); + INP_HASH_WUNLOCK(pcbinfo); + inp->inp_flags |= INP_UNCONNECTED; +} + /* * Check for alternatives when higher level complains * about service problems. For now, invalidate cached diff --git a/sys/netinet/in_pcb.h b/sys/netinet/in_pcb.h index d34c88941c7f..8663ba205b0a 100644 --- a/sys/netinet/in_pcb.h +++ b/sys/netinet/in_pcb.h @@ -565,6 +565,9 @@ void inp_4tuple_get(struct inpcb *inp, uint32_t *laddr, uint16_t *lp, #define INP_HASH_WLOCK_ASSERT(ipi) mtx_assert(&(ipi)->ipi_hash_lock, \ MA_OWNED) +VNET_DECLARE(uint32_t, in_pcbhashseed); +#define V_in_pcbhashseed VNET(in_pcbhashseed) + /* * Wildcard matching hash is not just a microoptimisation! The hash for * wildcard IPv4 and wildcard IPv6 must be the same, otherwise AF_INET6 @@ -596,6 +599,10 @@ void inp_4tuple_get(struct inpcb *inp, uint32_t *laddr, uint16_t *lp, #define INP_PCBPORTHASH(lport, mask) (ntohs((lport)) & (mask)) +#define RIPCB_HASH(inp) (((inp)->inp_vflag & INP_IPV6) ? \ + IN6_ADDR_JHASH32(&(inp)->in6p_faddr) : \ + IN_ADDR_JHASH32(&(inp)->inp_faddr)) + /* * Flags passed to in_pcblookup*(), inp_smr_lock() and inp_next(). */ @@ -666,6 +673,9 @@ bool in_pcbrele(struct inpcb *, inp_lookup_t); bool in_pcbrele_rlocked(struct inpcb *); bool in_pcbrele_wlocked(struct inpcb *); bool in_pcbrele_rlock(struct inpcb *inp); +void ripcb_connect(struct inpcb *); +void ripcb_disconnect(struct inpcb *); + #ifdef _SYS_SOCKETVAR_H_ void in_pcbtoxinpcb(const struct inpcb *, struct xinpcb *); int sysctl_setsockopt(SYSCTL_HANDLER_ARGS, struct inpcbinfo *pcbinfo, diff --git a/sys/netinet/in_pcb_var.h b/sys/netinet/in_pcb_var.h index 1f46e1bd8f3d..8b005712de27 100644 --- a/sys/netinet/in_pcb_var.h +++ b/sys/netinet/in_pcb_var.h @@ -43,9 +43,6 @@ #define INP_UNCONNECTED 0x04000000 /* Not inserted into hashes. */ -VNET_DECLARE(uint32_t, in_pcbhashseed); -#define V_in_pcbhashseed VNET(in_pcbhashseed) - void inp_lock(struct inpcb *inp, const inp_lookup_t lock); void inp_unlock(struct inpcb *inp, const inp_lookup_t lock); int inp_trylock(struct inpcb *inp, const inp_lookup_t lock); diff --git a/sys/netinet/raw_ip.c b/sys/netinet/raw_ip.c index 5114a69d7bf2..6f2b4dd9cb05 100644 --- a/sys/netinet/raw_ip.c +++ b/sys/netinet/raw_ip.c @@ -41,6 +41,7 @@ #include #include #include +#include #include #include #include @@ -140,53 +141,12 @@ u_long rip_recvspace = 9216; SYSCTL_ULONG(_net_inet_raw, OID_AUTO, recvspace, CTLFLAG_RW, &rip_recvspace, 0, "Maximum space for incoming raw IP datagrams"); -/* - * Hash functions - */ - -#define INP_PCBHASH_RAW_SIZE 256 -#define INP_PCBHASH_RAW(proto, laddr, faddr, mask) \ - (((proto) + (laddr) + (faddr)) % (mask) + 1) - -#ifdef INET -static void -rip_inshash(struct inpcb *inp) -{ - struct inpcbinfo *pcbinfo = inp->inp_pcbinfo; - struct inpcbhead *pcbhash; - int hash; - - INP_HASH_WLOCK_ASSERT(pcbinfo); - INP_WLOCK_ASSERT(inp); - - if (inp->inp_ip_p != 0 && - inp->inp_laddr.s_addr != INADDR_ANY && - inp->inp_faddr.s_addr != INADDR_ANY) { - hash = INP_PCBHASH_RAW(inp->inp_ip_p, inp->inp_laddr.s_addr, - inp->inp_faddr.s_addr, pcbinfo->ipi_hashmask); - } else - hash = 0; - pcbhash = &pcbinfo->ipi_hash_exact[hash]; - CK_LIST_INSERT_HEAD(pcbhash, inp, inp_hash_exact); -} - -static void -rip_delhash(struct inpcb *inp) -{ - - INP_HASH_WLOCK_ASSERT(inp->inp_pcbinfo); - INP_WLOCK_ASSERT(inp); - - CK_LIST_REMOVE(inp, inp_hash_exact); -} -#endif /* INET */ - INPCBSTORAGE_DEFINE(ripcbstor, inpcb, "rawinp", "ripcb", "riphash"); static void rip_init(void *arg __unused) { - +#define INP_PCBHASH_RAW_SIZE 256 in_pcbinfo_init(&V_ripcbinfo, &ripcbstor, INP_PCBHASH_RAW_SIZE, 1); } VNET_SYSINIT(rip_init, SI_SUB_PROTO_DOMAIN, SI_ORDER_THIRD, rip_init, NULL); @@ -250,26 +210,7 @@ struct rip_inp_match_ctx { }; static bool -rip_inp_match1(const struct inpcb *inp, void *v) -{ - struct rip_inp_match_ctx *ctx = v; - - if (inp->inp_ip_p != ctx->proto) - return (false); -#ifdef INET6 - /* XXX inp locking */ - if ((inp->inp_vflag & INP_IPV4) == 0) - return (false); -#endif - if (inp->inp_laddr.s_addr != ctx->ip->ip_dst.s_addr) - return (false); - if (inp->inp_faddr.s_addr != ctx->ip->ip_src.s_addr) - return (false); - return (true); -} - -static bool -rip_inp_match2(const struct inpcb *inp, void *v) +rip_inp_match(const struct inpcb *inp, void *v) { struct rip_inp_match_ctx *ctx = v; @@ -301,7 +242,7 @@ rip_input(struct mbuf **mp, int *offp, int proto) .proto = proto, }; struct inpcb_iterator inpi = INP_ITERATOR(&V_ripcbinfo, - INPLOOKUP_RLOCKPCB, rip_inp_match1, &ctx); + INPLOOKUP_RLOCKPCB, rip_inp_match, &ctx); struct ifnet *ifp; struct mbuf *m = *mp; struct inpcb *inp; @@ -321,8 +262,7 @@ rip_input(struct mbuf **mp, int *offp, int proto) fib = M_GETFIB(m); ifp = m->m_pkthdr.rcvif; - inpi.hash = INP_PCBHASH_RAW(proto, ctx.ip->ip_src.s_addr, - ctx.ip->ip_dst.s_addr, V_ripcbinfo.ipi_hashmask); + inpi.mode = IN_ADDR_JHASH32(&ctx.ip->ip_src) & V_ripcbinfo.ipi_hashmask; while ((inp = inp_next(&inpi)) != NULL) { INP_RLOCK_ASSERT(inp); if (jailed_without_vnet(inp->inp_cred) && @@ -342,8 +282,7 @@ rip_input(struct mbuf **mp, int *offp, int proto) appended += rip_append(inp, ctx.ip, m, &ripsrc); } - inpi.hash = 0; - inpi.match = rip_inp_match2; + inpi.mode = INP_UNCONN_LIST; MPASS(inpi.inp == NULL); while ((inp = inp_next(&inpi)) != NULL) { INP_RLOCK_ASSERT(inp); @@ -837,9 +776,6 @@ rip_attach(struct socket *so, int proto, struct thread *td) inp = (struct inpcb *)so->so_pcb; inp->inp_ip_p = proto; inp->inp_ip_ttl = V_ip_defttl; - INP_HASH_WLOCK(&V_ripcbinfo); - rip_inshash(inp); - INP_HASH_WUNLOCK(&V_ripcbinfo); INP_WUNLOCK(inp); return (0); } @@ -859,9 +795,6 @@ rip_detach(struct socket *so) ip_mrouter_done(so); INP_WLOCK(inp); - INP_HASH_WLOCK(&V_ripcbinfo); - rip_delhash(inp); - INP_HASH_WUNLOCK(&V_ripcbinfo); if (ip_rsvp_force_done) ip_rsvp_force_done(so); @@ -871,20 +804,17 @@ rip_detach(struct socket *so) } static void -rip_dodisconnect(struct inpcb *inp) +rip_dodisconnect(struct inpcb *inp, bool disconnect_socket) { - struct inpcbinfo *pcbinfo; - pcbinfo = inp->inp_pcbinfo; INP_WLOCK(inp); - INP_HASH_WLOCK(pcbinfo); - rip_delhash(inp); inp->inp_faddr.s_addr = INADDR_ANY; - rip_inshash(inp); - INP_HASH_WUNLOCK(pcbinfo); - SOCK_LOCK(inp->inp_socket); - inp->inp_socket->so_state &= ~SS_ISCONNECTED; - SOCK_UNLOCK(inp->inp_socket); + ripcb_disconnect(inp); + if (disconnect_socket) { + SOCK_LOCK(inp->inp_socket); + inp->inp_socket->so_state &= ~SS_ISCONNECTED; + SOCK_UNLOCK(inp->inp_socket); + } INP_WUNLOCK(inp); } @@ -896,7 +826,7 @@ rip_abort(struct socket *so) inp = sotoinpcb(so); KASSERT(inp != NULL, ("rip_abort: inp == NULL")); - rip_dodisconnect(inp); + rip_dodisconnect(inp, true); } static void @@ -907,7 +837,7 @@ rip_close(struct socket *so) inp = sotoinpcb(so); KASSERT(inp != NULL, ("rip_close: inp == NULL")); - rip_dodisconnect(inp); + rip_dodisconnect(inp, true); } static int @@ -921,7 +851,7 @@ rip_disconnect(struct socket *so) inp = sotoinpcb(so); KASSERT(inp != NULL, ("rip_disconnect: inp == NULL")); - rip_dodisconnect(inp); + rip_dodisconnect(inp, true); return (0); } @@ -952,11 +882,7 @@ rip_bind(struct socket *so, struct sockaddr *nam, struct thread *td) return (EADDRNOTAVAIL); INP_WLOCK(inp); - INP_HASH_WLOCK(&V_ripcbinfo); - rip_delhash(inp); inp->inp_laddr = addr->sin_addr; - rip_inshash(inp); - INP_HASH_WUNLOCK(&V_ripcbinfo); INP_WUNLOCK(inp); return (0); } @@ -978,11 +904,13 @@ rip_connect(struct socket *so, struct sockaddr *nam, struct thread *td) KASSERT(inp != NULL, ("rip_connect: inp == NULL")); INP_WLOCK(inp); - INP_HASH_WLOCK(&V_ripcbinfo); - rip_delhash(inp); - inp->inp_faddr = addr->sin_addr; - rip_inshash(inp); - INP_HASH_WUNLOCK(&V_ripcbinfo); + if (inp->inp_faddr.s_addr != INADDR_ANY && + addr->sin_addr.s_addr == INADDR_ANY) + rip_dodisconnect(inp, false); + if (addr->sin_addr.s_addr != INADDR_ANY) { + inp->inp_faddr = addr->sin_addr; + ripcb_connect(inp); + } soisconnected(so); INP_WUNLOCK(inp); return (0); From nobody Sun Apr 12 20:32:29 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fv2K92HnJz6Yffb for ; Sun, 12 Apr 2026 20:32: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fv2K90hYSz3tSj for ; Sun, 12 Apr 2026 20:32:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776025949; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Z00HhPA9vVcMuh6GbDS5CSqsTQLdc+TXCD7mCMgnRb8=; b=CsEApTomZ7C8fepHJOhnf3TQUSHBwGXXrbfSulSh5KZ5z1nMHwPd5JLmwsYNtJDJF2399l 42I6HSLjbaCMC7V6jjmmo3Q1slIAnzWVnW351Yw1im2yFIbBcTjPl9Exw/w0UfZ4JynDHe O5jVKfvSB+l/RguOX1Vrs/SUGe1bLWA/jR3Se8MkfDN3lFfmrqoCMjaizlpkh6Ki4ShP4S F2AQRUNzrfhQGFbQ5AnH9Fq9nc/hHbItuZDllPujum+qa+ldtDR+rFaq74uSzFa+Nelj/W JUx8PYDg+qM3X5PfNMnXSP4sRwJtzUC6+zXA9GIWKtshmtlGFwVPrbTXc6BHtA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776025949; a=rsa-sha256; cv=none; b=NaGAQf85/RE5bugUmwTkcPubl9Z+QKnHi+ATRUzzffxNP7EcMMolF9oxEM3BUAoPYqSn4Q JVn8OvSciUv81rWvd8vDYCRFrN5UMcC361ijXyFOShpwKhDcFo1uBckP10O1shwfVSJ6pl MPm/6vIUcrBDB84XnqKW1SfFNXUHEj8W+P8G7YNSpWk063Pdhg4rtQfqZbzZXXK7lPumi+ YsIRDsxdlc2KUkbizkpd81F0ErjFsPKCuBC58mITc0Himeeykh78FUyzKLJPfy7cbetqgE MtGPNIJvgUH15vado2aDpcDCYtu3BLqkBoL4M60xsqZ5r086g7oluHzRO4KvkA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776025949; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Z00HhPA9vVcMuh6GbDS5CSqsTQLdc+TXCD7mCMgnRb8=; b=woj+FNEVtmdwMgaDGtUZmuGgYRAoj3Hw4SY35V1d5UDL1CHwXO8ByBa37MuzDLAFrXv2cx vrZEK2o0x4cAiU/80GJ9tK3ZcmgZAZwDv91Q4r58XMOEkY/k7agvF9H20eD52gkTd4Ut5g c2zmKEwWWWHPbYmkoBB1xzQdBr4VTeptuP2KwGIsCzxoPz3YPQYWyorqmeh9fwaxJOqFiE 5WF1uaQxSHjFZ8uN+QwBUeKaYbLXUWfzT09HoMPzR0OcQfT7Jf1A4OuRRNaPF4LtJWEKpd lJmEmXUbzYAFlTCrHGmcbTAq2Cej6/JeLd7aZuWMzRXcpEdFeRZhhDrifR5/wQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fv2K90HMWzYx4 for ; Sun, 12 Apr 2026 20:32:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 46981 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 12 Apr 2026 20:32:29 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 660498986a8e - main - fork.2: note that all methods to pre-resolve symbols have consequences List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: 660498986a8e56025d9d2f9c6a0813c09a27ba8e Auto-Submitted: auto-generated Date: Sun, 12 Apr 2026 20:32:29 +0000 Message-Id: <69dc015d.46981.4bf1bc99@gitrepo.freebsd.org> The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=660498986a8e56025d9d2f9c6a0813c09a27ba8e commit 660498986a8e56025d9d2f9c6a0813c09a27ba8e Author: Konstantin Belousov AuthorDate: 2026-04-12 09:16:13 +0000 Commit: Konstantin Belousov CommitDate: 2026-04-12 20:29:42 +0000 fork.2: note that all methods to pre-resolve symbols have consequences Reviewed by: imp Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D56362 --- lib/libsys/fork.2 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/libsys/fork.2 b/lib/libsys/fork.2 index e59b208a9ff5..89a5631d7daa 100644 --- a/lib/libsys/fork.2 +++ b/lib/libsys/fork.2 @@ -138,6 +138,7 @@ services ( or .Xr rtld 1 ) are available in the child if forked from multi-threaded parent. +.Pp In particular, if using dynamic linking, all dynamic symbols used by the child after .Fn _Fork @@ -151,6 +152,7 @@ option to the static linker or by using each symbol before the .Fn _Fork call to force the binding. +Either of the methods subtly changes the ABI of the resulting binary. .Sh RETURN VALUES Upon successful completion, .Fn fork From nobody Sun Apr 12 20:32:27 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fv2K80zSLz6YfRB for ; Sun, 12 Apr 2026 20:32: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fv2K76yGfz3tMq for ; Sun, 12 Apr 2026 20:32:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776025948; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=q56UYix50PDY6h1AdUDZhL7eveyb5Motd41y8HnnyjQ=; b=Q3PyAvZyfJebrKUdxRxhBQD9FehHXdoOk5hNzAQtfmAXXIRXYMX+XbH/LavTlHSdv/gBpX NtGrjq26Zk2VOtYDUApmtHQewyaitV8vuf5sQJkdLS4W+//2gg7qkrmCNwvQ7k1qGjER8I bdVuJzkQTc6berIU1+aFdSooWgZTg4RswoylwOzn1seEHGYtIy3WflnfYsdEMalNJ5V2a3 94Hap4RxpoId2S4EVNmz5hG8lp81qRQf8nERuctGBr084YvO/JpuMirDZnPRStBP6Kkg9o +Nd5iDVCTjVsOqDrQAvmth46dzafEOMDoa/6g96UsINHPc3ouOYVCONPSKV7Gw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776025948; a=rsa-sha256; cv=none; b=IYegk6d6F+VzhHeGa+41owWveDGUOGMjiFqfsyH4RUltLl0mqN9RZZe/45d9d9jlOraKga YT1e9R8TbX6l7CaQzz0I2RuwXQFzH+fbIzknTkXEyZAfk1Jof491ZQi2Im10vtVx/cK9pj ENvvKQpLuykjZCj2GvbjMg5UKMg5Bw8C1YqxYuGWocRxCnxF5ae1If6fzMM2GEdTFNA9Ip Q2Nnf+HLKnZb95FLkfd0WbOB5U8TJJW+Bm/pS7TlBZ8X7y7o456p8CMUUOIUKZ8kjHY0Qu X3FmGWh1zi/XoZwdZchWQOkU5Yp9P0+SMqoM1z72UxHAm5TxngZGkPp05Wf7KA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776025948; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=q56UYix50PDY6h1AdUDZhL7eveyb5Motd41y8HnnyjQ=; b=R3D17Mh8QZbI7AEr7wjfInS3TaKYL0rtXD/Smk9CR7HwN2x7ojEiDCE3u29YbqybslJIIX 9Xn5/J9cvmHpkkVv1DfWByakRRcNqLEqXhStGLaBrTGPBfPXs87J+u1OzO24H5amTH26jl XvJsBL9IUk8hE8PL2OhXza3Qx8zYqzVvNRFiUs7pWR/b4xKLCoZnQISvFeisQs7CvnO9Rk bAerYv0mlygf4xTy3VaZqpFafnCCe+/WD3n3IKAgOszo8EoUQIEbwDFSL5sFe+8uogPvcx mGRvX+XiYGLCfjOQLMgScQCOKsm4RYLd2Glspi7HCPcv4hDtSMiWAT66q3Y44g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fv2K76YXSzZ7Z for ; Sun, 12 Apr 2026 20:32:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 45d11 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 12 Apr 2026 20:32:27 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: f286933c950f - main - unistd.h: _Fork(2) is required by POSIX 2024 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: f286933c950f6308117c8400f36f3160f6227491 Auto-Submitted: auto-generated Date: Sun, 12 Apr 2026 20:32:27 +0000 Message-Id: <69dc015b.45d11.11f6d7b7@gitrepo.freebsd.org> The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=f286933c950f6308117c8400f36f3160f6227491 commit f286933c950f6308117c8400f36f3160f6227491 Author: Konstantin Belousov AuthorDate: 2026-04-12 08:57:51 +0000 Commit: Konstantin Belousov CommitDate: 2026-04-12 20:29:36 +0000 unistd.h: _Fork(2) is required by POSIX 2024 Reviewed by: imp Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D56362 --- include/unistd.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/unistd.h b/include/unistd.h index 21e3a7740607..797eac4c364d 100644 --- a/include/unistd.h +++ b/include/unistd.h @@ -453,6 +453,10 @@ int unlinkat(int, const char *, int); int symlink(const char * __restrict, const char * __restrict); #endif +#if __POSIX_VISIBLE >= 202405 +pid_t _Fork(void); +#endif + /* X/Open System Interfaces */ #if __XSI_VISIBLE char *crypt(const char *, const char *); @@ -594,7 +598,6 @@ int undelete(const char *); int unwhiteout(const char *); void *valloc(size_t); /* obsoleted by malloc() */ int funlinkat(int, const char *, int, int); -pid_t _Fork(void); #ifndef _OPTRESET_DECLARED #define _OPTRESET_DECLARED From nobody Sun Apr 12 21:11:06 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fv39k5szBz6YxyY for ; Sun, 12 Apr 2026 21:11: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fv39k4wXHz44CW for ; Sun, 12 Apr 2026 21:11:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776028266; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=osH9t1r1lx8MJ7pQUa9+1kZKcqHjGv4a12IGP6yj4Hc=; b=rMRgnwG/rmlLt5JGFQGp0vcP0scIZrLIOLQ8wDzynQDs0BjlITIxs4LyYa4IXQooGowpQL tcMVKWcY4GcMexMcNOVVJHfW7jQlmPQ6h3dpERRWHvkXWecOGWPnYBmu+40KJgaAuKIRjG lSHoYoNuicwtlS8yZXg7TZrby5afM8g+uLxhbFdSPVg168KQwRjSjN7rTgMPeGHRBywUGR PJGgS4qLwlesqpgIIeBHYvtfmBC7hFXo6BDX/39A+XJrUthPKYgHK35UPc27NXi6F7VsTn OypvPEe3ABx/oQcNQulV83F9ZP/lGuL7mbKyiBA4a774lIsMye529ZXUsS3bPA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776028266; a=rsa-sha256; cv=none; b=v2s6aAdlCgjNJk/hpffdLGTm+gEI9flYZqIfbi0iAqa7LiwTMAeSNRXafTHNkqBmgXnbSh I6i1eeviu3d4ppRPzLu0KY9BS4uLzGfHSfeasta43hOa2DXPQqCST9tw4HOv/RVJAcy2mE u8xV8wVrzzhbbDen42YMWgIrHCf6z1X/4FlBlgyl+UmUNhuvyS659K9TrLXrRz145uLxp7 ZVREjX/aa/c6IhrgsIDoTHzgiWpeVtMIM5GhY3Rlvd67ay1H4R/9O89iG65EqArbN0AbQ+ rJGTNZ06j45+J1prf2Cv3QiSeTEB0FZmxOmrOsf1L3KWLItMlQ+/xlEBeNu99w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776028266; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=osH9t1r1lx8MJ7pQUa9+1kZKcqHjGv4a12IGP6yj4Hc=; b=toKFKhOc0Y048hDBzNpF+g6xLynHGayMzvl9WH1CGiML27jovzJNNIR4lDVdhiwR5GjCEo NcqljdvL+a4IvwBGMMF1LlWqlOKRCjJfG6E6wzus0rMpw68zaSr/IBSwX3+G/YrFDyrKKo lPC1RKkfBNIOWesYJzTOWC1pCcS/Hb2ci4rMnOeBRqrvoRTb3nnqFoxUZ2E9HTSH4DfqXL t+M5xatiVKXx051LkEdQ6+aTEZ+Qj6yOf+MAJi227RSkoaleKSTNihWgp7YxjhohThBm6l PzV6TJd4na6sdAzwg1LGpu6drIsydxOormc0A7NM2vGdOYIMcaMtLgMIvQeScw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fv39k448LzbCK for ; Sun, 12 Apr 2026 21:11:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 18c70 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 12 Apr 2026 21:11:06 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 411c28b6caa4 - main - hash(9): fix my stupid off-by-one List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: 411c28b6caa4a55d89cc34d77b33141b78ced590 Auto-Submitted: auto-generated Date: Sun, 12 Apr 2026 21:11:06 +0000 Message-Id: <69dc0a6a.18c70.6df86811@gitrepo.freebsd.org> The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=411c28b6caa4a55d89cc34d77b33141b78ced590 commit 411c28b6caa4a55d89cc34d77b33141b78ced590 Author: Gleb Smirnoff AuthorDate: 2026-04-12 21:10:27 +0000 Commit: Gleb Smirnoff CommitDate: 2026-04-12 21:10:27 +0000 hash(9): fix my stupid off-by-one Fixes: abf68d1cf02550c3c0341f5bb90be0d34f655a15 --- sys/kern/subr_hash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/subr_hash.c b/sys/kern/subr_hash.c index a9dada7b4eb6..e74ad825966e 100644 --- a/sys/kern/subr_hash.c +++ b/sys/kern/subr_hash.c @@ -162,7 +162,7 @@ hashalloc(struct hashalloc_args *args) size >>= 1; break; case HASH_TYPE_PRIME: - for (i = nitems(primes); args->size < primes[i]; i--) + for (i = nitems(primes) - 1; args->size < primes[i]; i--) ; size = primes[i]; break; From nobody Sun Apr 12 21:38:22 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fv3ng635Cz6Z0bP; Sun, 12 Apr 2026 21:38:47 +0000 (UTC) (envelope-from herbert@gojira.at) Received: from fhigh-a4-smtp.messagingengine.com (fhigh-a4-smtp.messagingengine.com [103.168.172.155]) (using TLSv1.3 with cipher TLS_AES_256_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 4fv3ng44y7z461Y; Sun, 12 Apr 2026 21:38:47 +0000 (UTC) (envelope-from herbert@gojira.at) Authentication-Results: mx1.freebsd.org; none Received: from phl-compute-02.internal (phl-compute-02.internal [10.202.2.42]) by mailfhigh.phl.internal (Postfix) with ESMTP id 82A8A14000F7; Sun, 12 Apr 2026 17:38:45 -0400 (EDT) Received: from phl-frontend-04 ([10.202.2.163]) by phl-compute-02.internal (MEProxy); Sun, 12 Apr 2026 17:38:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gojira.at; h=cc :cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm2; t=1776029925; x=1776116325; bh=0yjJKk+xU4 Gj7Mt9uqHDSy3SIUyDmIPvLIz5vRhVfK4=; b=d7YfBX7qekCSECVwNCRXAFOjjn SEsOqRqD+UYvCS8MBrc/1ThLqo0MheKGVyQi5qMge3QDt+1CUCYkucHYKF6oTazU dbe8sPsChj9BZCCPH+ML8kC48zPFooVz6paUXzFlmZNStJw8CJ1uSW/MchKgUaWL noMZ42FS2IV4VwJHRrgyxtbEk2GHmg8B4/hBIA3xB1KmskG85mHdJibkWvqrC5yo P2nPLe03iig1t+8WKc5dATE2KmaCI4fbdiRFh5yUxIvpZgoyRcV3Fz+07OWx/Rvw 8IrajDHHUkIJWMdafFFtrxl91wQieXanavKGR8P8XBCCXumjSm6y0jiHxewQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t= 1776029925; x=1776116325; bh=0yjJKk+xU4Gj7Mt9uqHDSy3SIUyDmIPvLIz 5vRhVfK4=; b=n+yaGx//ew3auO26uPVSbwsZmpgT3amC1wBN3p4DYIIVaY3tMRr xJ8IA8TkQ84MuvGvYp9fy1fTqjxu59+GTmz/aLCR4G+n7jhtW5IlrNBsm/YuQ2RB Hg2oZHW1A4rpesyH6mWc74bET51LCPr/4xyqxlcdsXm6cF552yMx6AAeAAygIlKk /CnZgKENdewUPpy+df5F0/B0pOjH0ymPp7t5jaZmTL/kG+RRaQ1j+9Klsi8gdOby 9o+NOAqHrqXlG433BPf993R9b9quN++LQudbxqRfRN3fpJR7MOXfGF5aJFX/4UEX vcSplLZAxnYG88SoMWzxLMKXYEpvODy0kIw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefhedrtddtgdefieegfecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpuffrtefokffrpgfnqfghnecuuegr ihhlohhuthemuceftddtnecunecujfgurhepfffkhffvvefujghffgggtgesthdtredttd ervdenucfhrhhomhepfdfjvghrsggvrhhtucflrdcuufhkuhhhrhgrfdcuoehhvghrsggv rhhtsehgohhjihhrrgdrrghtqeenucggtffrrghtthgvrhhnpeefhfehffegvdehuedtue fgkeefieffieejhfeggeekgeevjeegfeffgeeglefhtdenucffohhmrghinhepfhhrvggv sghsugdrohhrghenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfh hrohhmpehhvghrsggvrhhtsehgohhjihhrrgdrrghtpdhnsggprhgtphhtthhopeegpdhm ohguvgepshhmthhpohhuthdprhgtphhtthhopehglhgvsghiuhhssehfrhgvvggsshgurd horhhgpdhrtghpthhtohepshhrtgdqtghomhhmihhtthgvrhhssehfrhgvvggsshgurdho rhhgpdhrtghpthhtohepuggvvhdqtghomhhmihhtshdqshhrtgdqrghllhesfhhrvggvsg hsugdrohhrghdprhgtphhtthhopeguvghvqdgtohhmmhhithhsqdhsrhgtqdhmrghinhes fhhrvggvsghsugdrohhrgh X-ME-Proxy: Feedback-ID: i64fe486c:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 12 Apr 2026 17:38:44 -0400 (EDT) Date: Sun, 12 Apr 2026 23:38:22 +0200 Message-ID: <87h5pfvoz5.wl-herbert@gojira.at> From: "Herbert J. Skuhra" To: Gleb Smirnoff Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 40dbb06fa73c - main - inpcb: retire INP_DROPPED and in_pcbdrop() In-Reply-To: <69dbe5f7.3af83.6ab643b3@gitrepo.freebsd.org> References: <69dbe5f7.3af83.6ab643b3@gitrepo.freebsd.org> User-Agent: Wanderlust/2.15.9 (Almost Unreal) Emacs/31.0 Mule/6.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 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:151847, ipnet:103.168.172.0/24, country:AU] X-Rspamd-Queue-Id: 4fv3ng44y7z461Y X-Spamd-Bar: ---- On Sun, 12 Apr 2026 20:35:35 +0200, Gleb Smirnoff wrote: > > The branch main has been updated by glebius: > > URL: https://cgit.FreeBSD.org/src/commit/?id=40dbb06fa73cac37d57563c07e55efd0cabbd488 > > commit 40dbb06fa73cac37d57563c07e55efd0cabbd488 > Author: Gleb Smirnoff > AuthorDate: 2026-04-12 18:33:07 +0000 > Commit: Gleb Smirnoff > CommitDate: 2026-04-12 18:33:07 +0000 > > inpcb: retire INP_DROPPED and in_pcbdrop() > > The inpcb flag INP_DROPPED served two purposes. > > It was used by TCP and subsystems running on top of TCP as a flag that > marks a connection that is now in TCPS_CLOSED, but was in some other state > before (not a new-born connection). Create a new TCP flag TF_DISCONNECTED > for this purpose. > > The in_pcbdrop() was a TCP's version of in_pcbdisconnect() that also sets > INP_DROPPED. Use in_pcbdisconnect() instead. > > Second purpose of INP_DROPPED was a negative lookup mask in > inp_smr_lock(), as SMR-protected lookup may see inpcbs that had been > removed from the hash. We already have had INP_INHASHLIST that marks > inpcb that is in hash. Convert it into INP_UNCONNECTED with the opposite > meaning. This allows to combine it with INP_FREED for the negative lookup > mask. > > The Chelsio/ToE and kTLS changes are done with some style refactoring, > like moving inp/tp assignments up and using macros for that. However, no > deep thinking was taken to check if those checks are really needed, it > could be that some are not. > > Reviewed by: rrs > Differential Revision: https://reviews.freebsd.org/D56186 > --- > sys/dev/cxgbe/crypto/t6_kern_tls.c | 6 +- > sys/dev/cxgbe/crypto/t7_kern_tls.c | 2 +- > sys/dev/cxgbe/cxgbei/cxgbei.c | 17 ++-- > sys/dev/cxgbe/cxgbei/icl_cxgbei.c | 13 ++- > sys/dev/cxgbe/iw_cxgbe/qp.c | 24 +++-- > sys/dev/cxgbe/nvmf/nvmf_che.c | 23 +++-- > sys/dev/cxgbe/tom/t4_connect.c | 3 +- > sys/dev/cxgbe/tom/t4_cpl_io.c | 44 ++++----- > sys/dev/cxgbe/tom/t4_ddp.c | 18 ++-- > sys/dev/cxgbe/tom/t4_listen.c | 14 ++- > sys/dev/cxgbe/tom/t4_tls.c | 18 ++-- > sys/dev/cxgbe/tom/t4_tom.c | 10 +- > sys/kern/uipc_ktls.c | 71 ++++--------- > sys/netinet/in_pcb.c | 74 +++++--------- > sys/netinet/in_pcb.h | 9 +- > sys/netinet/in_pcb_var.h | 2 + > sys/netinet/tcp_hpts.c | 12 ++- > sys/netinet/tcp_hpts_test.c | 3 +- > sys/netinet/tcp_log_buf.c | 17 ++-- > sys/netinet/tcp_output.c | 1 + > sys/netinet/tcp_stacks/bbr.c | 2 +- > sys/netinet/tcp_stacks/rack.c | 4 +- > sys/netinet/tcp_subr.c | 3 +- > sys/netinet/tcp_timewait.c | 5 +- > sys/netinet/tcp_usrreq.c | 198 ++++++++++++++----------------------- > sys/netinet/tcp_var.h | 2 +- > sys/netinet/toecore.c | 10 +- > sys/netinet6/in6_pcb.c | 8 +- > sys/netipsec/xform_tcp.c | 8 +- > 29 files changed, 258 insertions(+), 363 deletions(-) This commit seems to break GENERIC-NODEBUG: cc -target x86_64-unknown-freebsd16.0 --sysroot=/usr/obj/home/herbert/sources/freebsd/main/src/amd64.amd64/tmp -B/usr/obj/home/herbert/sources/freebsd/main/src/amd64.amd64/tmp/usr/bin -c -O2 -pipe -fno-strict-aliasing -g -nostdinc -I. -I/home/herbert/sources/freebsd/main/src/sys -I/home/herbert/sources/freebsd/main/src/sys/contrib/ck/include -I/home/herbert/sources/freebsd/main/src/sys/contrib/libfdt -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-common -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -MD -MF.depend.tcp_usrreq.o -MTtcp_usrreq.o -fdebug-prefix-map=./machine=/home/herbert/sources/freebsd/main/src/sys/amd64/include -fdebug-prefix-map=./x86=/home/herbert/sources/freebsd/main/src/sys/x86/include -fdebug-prefix-map=./i386=/home/herbert/sources/freebsd/main/src/sys/i386/include -mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -fwrapv -fstack-protector -mretpoline -gdwarf-4 -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wcast-qual -Wundef -Wno-pointer-sign -D__printf__=__freebsd_kprintf__ -Wmissing-include-dirs -fdiagnostics-show-option -Wno-unknown-pragmas -Wswitch -Wno-error=tautological-compare -Wno-error=empty-body -Wno-error=parentheses-equality -Wno-error=unused-function -Wno-error=pointer-sign -Wno-error=shift-negative-value -Wno-address-of-packed-member -Wno-format-zero-length -mno-aes -mno-avx -std=gnu17 -Werror /home/herbert/sources/freebsd/main/src/sys/netinet/tcp_usrreq.c /home/herbert/sources/freebsd/main/src/sys/netinet/tcp_usrreq.c:2589:16: error: unused variable 'inp' [-Werror,-Wunused-variable] 2589 | struct inpcb *inp = tptoinpcb(tp); | ^~~ From nobody Sun Apr 12 21:46:21 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fv3yP4cz8z6Z13K for ; Sun, 12 Apr 2026 21:46: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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fv3yP2TCpz470r for ; Sun, 12 Apr 2026 21:46:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776030381; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FmvIHtE5K4dh8nz10LgNPommnqNfvK0b0NjNwCdrKlI=; b=IGKd8wqh4ZGjgcRr0Jb2V3ZSlF/FCTj8p7q5P31xworxkxZFeyvW/f27LeB0csnde7M0f2 VuSCjyOpRu0egt2D2nfx/hINgrhYab/37/C84Gxgr20by3fCK5uGo2F9osZ2RvWQaZM7va VMdCFfppMeXBZfAm7u78/UnFErT6DAvigKkJIaYlmmBCN0+HPA02KmVGvPIr1zOTxmCVRZ JbJNeSoa5ppAmpE0FR2rY3c9vmYoCTRqZVVnZQkCGw3OuqEBUmVNYGcbiaFA/g7pZ97bde 1nUrhUSfsu1Q1v2EEKHukTbRL5hsJR0Dwl9eJPR76ZRdoZAMKaGgvyQUB2FxgQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776030381; a=rsa-sha256; cv=none; b=lsNvXCDrgQdLwcGar9xkfPkCoGoIgH2ETCUNOKG5mkZUQMWScxHaBkriVB+UnhjNaprn0T ZCrAjkk/ANcA2uEiapkEqdmU9bnTSiZcHkfdUFKN2HjR8wHwGYmyaK02SV0timWC9O4Xuv jMhrOfykgkdZSWoew/tcemOH1+poDr/gizH43jZht+nMAA++cqtT6HwDb/AgvznLjQWAiw swjKKQ6QXc29iHW4/TaKKtVaZu0YHkY+0fnU2EauHzO92Jb3O+s2IjldQz0p6jQfsQS0fc Ktn17Kt63I+dClLifsfmCtqRWFlPM8kbl20TVVXvzei73b5UcvcZNYz4Nksg7g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776030381; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FmvIHtE5K4dh8nz10LgNPommnqNfvK0b0NjNwCdrKlI=; b=Jr4v1zhUBqRW2JUCeEvfveiJ7st/h1wlWf2m3dZiur1sdfO8X+zbXR3sE1EoBEaQircURV s43c3mm8hjoeAOSviUzsJCGt1WlewfJDk2t8LT9uCtj5KDGcg/9dKHQcLyh+xrIWuw0iuQ Tyyl5TV6YPU8j/H6wQ0t1YSMuuISWnljIZ3nNgq4CDqjMtqPIO9DnEkcAiaTCXVKFWXm9Y U0JE+rnI+de0eUjctS+gbmq/T3p2LSaVGVm57s3/Db8D5QQVH2wChpgG+JSwoheVHmX1it M2GYgZBbuXGKfVySSvKUqaGo+A07ia9V5eFg0R4hQ8myuJB+SoFcQEQZSg/RzA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fv3yP1sTLzbwp for ; Sun, 12 Apr 2026 21:46:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1e119 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 12 Apr 2026 21:46:21 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 151a1eab3b78 - main - tcp: fix !INVARIANTS 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: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 151a1eab3b785129d279af601ed716eda74886a8 Auto-Submitted: auto-generated Date: Sun, 12 Apr 2026 21:46:21 +0000 Message-Id: <69dc12ad.1e119.59001d23@gitrepo.freebsd.org> The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=151a1eab3b785129d279af601ed716eda74886a8 commit 151a1eab3b785129d279af601ed716eda74886a8 Author: Gleb Smirnoff AuthorDate: 2026-04-12 21:45:40 +0000 Commit: Gleb Smirnoff CommitDate: 2026-04-12 21:45:40 +0000 tcp: fix !INVARIANTS build Fixes: 40dbb06fa73cac37d57563c07e55efd0cabbd488 --- sys/netinet/tcp_usrreq.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c index 277f8fa2af36..6a51068d0461 100644 --- a/sys/netinet/tcp_usrreq.c +++ b/sys/netinet/tcp_usrreq.c @@ -2586,11 +2586,10 @@ unhold: static void tcp_disconnect(struct tcpcb *tp) { - struct inpcb *inp = tptoinpcb(tp); struct socket *so = tptosocket(tp); NET_EPOCH_ASSERT(); - INP_WLOCK_ASSERT(inp); + INP_WLOCK_ASSERT(tptoinpcb(tp)); /* * Neither tcp_close() nor tcp_drop() should return NULL, as the From nobody Sun Apr 12 21:46:45 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fv3yx1rFSz6Z0jK; Sun, 12 Apr 2026 21:46:49 +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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fv3yx1D5Qz47Ms; Sun, 12 Apr 2026 21:46:49 +0000 (UTC) (envelope-from glebius@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776030409; 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=NFJ0YkIT3s4JRGTxIlT2p3OQU66wvpqMDJbhvxnZqg0=; b=O1DCWQLtVYIWCtQFqwpsxbsiiMkF8oafTMD0xGpWYiOV97tQIo9QpLQ3FgRXDB8PMXCgo0 7yhi3pEoMbiQNTTK0qnMHlUhChjDOHBrzd3PxTsErqPXOBOLNBSBPTLq5P6+UO9Jmd3w0K W7jb0IxAXxEsYzgDmpIENQCK7tM80/nTlCzAqTxC6Cv1uwcHuosc0Dc6Ps/fhMDXEnLmcd +jPaJlN5FshwFVvfFJqsmvFI3khcpGC/2KJEY+gMJwlyTEgLxf3Cq47HohLwI0QZnoSOWQ Jy8Y7/jiI7f94JQp0KcTOzDcmXRA5zJEEcrSaRLtI4cO/SalddZWyg9R776GAQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776030409; a=rsa-sha256; cv=none; b=qiMxS2umuJjR8+0t8XLVRN3Ozxc72CgZngkyARosdZG3hmegCKTkVJxmSZNboeyCImTXYQ 4xb5hvZ8n4aD6v/6gtv6RuVg+vZdVgZWYVbSWip6fasEB7sFGRWRGNu0w8hZLM5n/OjPRk 3SlmSU5Y8mjfaDNLgxuPWf8kqcuKvVxmrA4xfhs55mFeluRqCMDhnh/dtwFeTEsFlumGUb RlwRbW63RKRjCxqLodzppKqF9wAAKhXyykDj8bd3e3pgxfN7cJpTW1LVglq1/67lpyXlc/ 7698IkM6AnzV6m2JJShCic34Pu/hGf1fc8JoyQyHsjI1x10vRWe7X4UsNnBi8g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776030409; 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=NFJ0YkIT3s4JRGTxIlT2p3OQU66wvpqMDJbhvxnZqg0=; b=YsKSallwn5TSVUwyPsw7YB1j1+NZQ9IuOknAgcz0cVjI2SiLNMvviMkEyO042NavStTvjX bSKoceNateUQo8F3qgy9EbfgYZF5YW+Z4q0bg7k3ycOZ48ZQZl4f1uPIG3LF6x6IGW4bw0 XD+DfBwSFKvSYmgQJIqpnQP+ZqAr7TyA4Z/qfC8uUDa9l/4xdUk0ZabrbuSVg+g+JvOG5S 7HGkCu0Hu1GYNt0FU4nHlglK/bwvYlv5pxzXGBRgOoWsTIzoIjP0+gy/jDzclEt1Hz5Mg3 MJxboizEeC8LOO80b1Pf9Ulr38jSxITLcGSq/BgE9kSMDm4jwjn8hrbkxCkNjA== 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 4fv3yw2WQ7z5Cn; Sun, 12 Apr 2026 21:46:48 +0000 (UTC) (envelope-from glebius@freebsd.org) Date: Sun, 12 Apr 2026 14:46:45 -0700 From: Gleb Smirnoff To: "Herbert J. Skuhra" Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 40dbb06fa73c - main - inpcb: retire INP_DROPPED and in_pcbdrop() Message-ID: References: <69dbe5f7.3af83.6ab643b3@gitrepo.freebsd.org> <87h5pfvoz5.wl-herbert@gojira.at> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: <87h5pfvoz5.wl-herbert@gojira.at> On Sun, Apr 12, 2026 at 11:38:22PM +0200, Herbert J. Skuhra wrote: H> This commit seems to break GENERIC-NODEBUG: ... H> /home/herbert/sources/freebsd/main/src/sys/netinet/tcp_usrreq.c H> /home/herbert/sources/freebsd/main/src/sys/netinet/tcp_usrreq.c:2589:16: error: unused variable 'inp' [-Werror,-Wunused-variable] H> 2589 | struct inpcb *inp = tptoinpcb(tp); H> | ^~~ Fix pushed. Sorry for that. -- Gleb Smirnoff