From nobody Mon Nov 24 02:41:09 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dF97933t9z6Hsrg for ; Mon, 24 Nov 2025 02:41:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dF9791lmFz3Mwm for ; Mon, 24 Nov 2025 02:41:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763952069; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Eu9E5CleWNK8UdOmtt4c7rR3obXskPTiw3AZpi/SHyM=; b=kwOyT4CV83iuAtyLSDYlLH/d5XB/hZt9S9JfKK79QKkbo4LwC7s/SPpBTgU77UxttZRISU IyL++CfA04GYmXgvZN3XZ9VSfU6w/rHIiPvVxaBHenWpbibu6ok6FBFlAQIXn7MjWn7os3 9z4qPjyeAiIsJjEngX4I9AAPcfbsJgMi8hIsXurnSV+QHlH2H+lnU5TrPlxb9PfXikKsQR J5hXQdhE/uGY3zkEeH7O/UepOt6sAEm3k2XIBSkWjgGB12UMXm1T4O3wttPaAneymMkLRv jmtDSNwCbVwqENfZP6DUjVoR3DK+nnrAW7qZO1rRuq/eaFaCFlXtNx1GsIKxkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763952069; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Eu9E5CleWNK8UdOmtt4c7rR3obXskPTiw3AZpi/SHyM=; b=WGAg3A6uS0cHRv1p0uhW4Mdzd8sgbeyyFu8pdOAy4e/XsFjdUHNLb9pWcRzLfz9Ghr0Vf6 53LC8xicOwTIjGZQ80SArU+0qe9QhYWV6i5D1hT7LUHZnDoyhpvYP2XBGCl2PZtby6Vqvc QUwtzKR3HKEIIMsbnOyc2G2PSmLfOUKduYo2i0CdKYAKdPP5stiYLkazThPxvWWOSEue7H i5OMRnkrXLHUG5owXUv7CPjQrCqMsQ8sVVHXDPzcQZErtZd9JmPgWUaoYpjfQVRZASu/++ /5uiGWrZhDe7g3rx+MkZ/ZqpI2Tq0vZu4RkNR4Cq5adKQQ1EwNIgGtZhVDqHLQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763952069; a=rsa-sha256; cv=none; b=JM/Jhk23ZvC8mqrKADwse3uXXU2YS3VuSmZdDZr4lv6ifQlPXWsEuJ2mWn4Qk4N6lZWwJX VO2HLapnrs+f9el03S+qQXLWuV4M2KSXBTwONmobUqFzbl8p0kpW+058yxcZbETS+fTiyl p8WsuNUxCNqt8LrW87SOUdWrjqKjxvsZreyIHCec9aV0RVxWa7NjF22mvwg6ZQX7zeY3Li 1ZXKmWMCMWsMUF0EAwJ9q+WEjMT0+aGBnaj8Hs5bnZXeq0SjO7dDEXQ9OrNwKelvf88JRS wKsQKZDoA4kFbA8glmzkPjlJd3xwkvjaJS6QFPNX4WAqbHq/NYPhVf75XIEt2w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dF97918b5zvv6 for ; Mon, 24 Nov 2025 02:41:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2d2ce by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 24 Nov 2025 02:41:09 +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: fe5c8baf25a5 - main - pam_krb5: Restore allow_kdc_spoof option List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fe5c8baf25a5b40285c3ef85b69391d591e4a76c Auto-Submitted: auto-generated Date: Mon, 24 Nov 2025 02:41:09 +0000 Message-Id: <6923c5c5.2d2ce.369de630@gitrepo.freebsd.org> The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=fe5c8baf25a5b40285c3ef85b69391d591e4a76c commit fe5c8baf25a5b40285c3ef85b69391d591e4a76c Author: Dag-Erling Smørgrav AuthorDate: 2025-11-24 02:40:29 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-11-24 02:40:48 +0000 pam_krb5: Restore allow_kdc_spoof option Not only does the new pam_krb5 module not have the same allow_kdc_spoof option that the old one had, its behavior in this matter defaults to insecure. Reimplement allow_kdc_spoof and switch the default back. Reviewed by: cy Differential Revision: https://reviews.freebsd.org/D53884 --- contrib/pam-krb5/docs/pam_krb5.pod | 15 +++++++++------ contrib/pam-krb5/module/auth.c | 6 ++++++ contrib/pam-krb5/module/internal.h | 3 +++ contrib/pam-krb5/module/options.c | 3 +++ 4 files changed, 21 insertions(+), 6 deletions(-) diff --git a/contrib/pam-krb5/docs/pam_krb5.pod b/contrib/pam-krb5/docs/pam_krb5.pod index 024584dfd4cd..f352af71b553 100644 --- a/contrib/pam-krb5/docs/pam_krb5.pod +++ b/contrib/pam-krb5/docs/pam_krb5.pod @@ -57,12 +57,10 @@ is vulnerable to KDC spoofing, but it requires that the system have a local key and that the PAM module be running as a user that can read the keytab file (normally F. You can point the Kerberos PAM module at a different keytab with the I option. If that keytab -cannot be read or if no keys are found in it, the default (potentially -insecure) behavior is to skip this check. If you want to instead fail -authentication if the obtained tickets cannot be checked, set -C to true in the [libdefaults] section of -F. Note that this will affect applications other than -this PAM module. +cannot be read or if no keys are found in it, the default behavior is to +fail authentication. If you want to skip this check, set the +C option to true either in the [appdefaults] section of +F or in the PAM policy. By default, whenever the user is authenticated, a basic authorization check will also be done using krb5_kuserok(). The default behavior of @@ -218,6 +216,11 @@ pam-krb5 in which that option was added with the current meaning. =over 4 +=item allow_kdc_spoof + +Allow authentication to succeed even if there is no host or service +key available in a keytab to authenticate the Kerberos KDC's ticket. + =item alt_auth_map= [3.12] This functions similarly to the I option. The diff --git a/contrib/pam-krb5/module/auth.c b/contrib/pam-krb5/module/auth.c index 065ce97b6596..46f2be791000 100644 --- a/contrib/pam-krb5/module/auth.c +++ b/contrib/pam-krb5/module/auth.c @@ -696,6 +696,12 @@ verify_creds(struct pam_args *args, krb5_creds *creds) if (cursor_valid) krb5_kt_end_seq_get(c, keytab, &cursor); } +#ifdef __FreeBSD__ + if (args->config->allow_kdc_spoof) + opts.flags &= ~KRB5_VERIFY_INIT_CREDS_OPT_AP_REQ_NOFAIL; + else + opts.flags |= KRB5_VERIFY_INIT_CREDS_OPT_AP_REQ_NOFAIL; +#endif /* __FreeBSD__ */ retval = krb5_verify_init_creds(c, creds, princ, keytab, NULL, &opts); if (retval != 0) putil_err_krb5(args, retval, "credential verification failed"); diff --git a/contrib/pam-krb5/module/internal.h b/contrib/pam-krb5/module/internal.h index f3ea30139815..c797f7a56cd3 100644 --- a/contrib/pam-krb5/module/internal.h +++ b/contrib/pam-krb5/module/internal.h @@ -62,6 +62,9 @@ struct pam_config { long minimum_uid; /* Ignore users below this UID. */ bool only_alt_auth; /* Alt principal must be used. */ bool search_k5login; /* Try password with each line of .k5login. */ +#ifdef __FreeBSD__ + bool allow_kdc_spoof;/* Allow auth even if KDC cannot be verified */ +#endif /* __FreeBSD__ */ /* Kerberos behavior. */ char *fast_ccache; /* Cache containing armor ticket. */ diff --git a/contrib/pam-krb5/module/options.c b/contrib/pam-krb5/module/options.c index 799b3a33e168..0118fb451af6 100644 --- a/contrib/pam-krb5/module/options.c +++ b/contrib/pam-krb5/module/options.c @@ -30,6 +30,9 @@ #define K(name) (#name), offsetof(struct pam_config, name) /* clang-format off */ static const struct option options[] = { +#ifdef __FreeBSD__ + { K(allow_kdc_spoof), true, BOOL (false) }, +#endif /* __FreeBSD__ */ { K(alt_auth_map), true, STRING (NULL) }, { K(anon_fast), true, BOOL (false) }, { K(banner), true, STRING ("Kerberos") }, From nobody Mon Nov 24 02:41:10 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dF97B412qz6Hspn for ; Mon, 24 Nov 2025 02:41:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dF97B2jV5z3N05 for ; Mon, 24 Nov 2025 02:41:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763952070; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZvjcCTuKolkSiYBOfw2kr2C1ug8y3No+um/zgyV6vP0=; b=Y+lT6jn7yxDrZuQhtkwZb0eIoBrV/Oe0qIB41J7epR5/imF9dABdFpBF55GZDt06pvinud uzqSOLBud7vIMyq5dg0q3NCXQuvHdXdJcGtIo8NWnt8t15N80RGBHjgCz/BzhcvPVYduzS k7J2IcBIu3VgTVT0g9vI6G1E2BzJn0dVPatJowzDE8exsC9mchoJ+jBhteUZ1XWgadKm0H T3A7/CHrNz3TVWYSmd+Lzj0ePjQo36aj9wXRYkX/krdvyCt/ZD548W3sxg/FgrXAkQgh5j 4UMIwjgrTCzUUcStB9bE7D4qgIx25Kp1xvqQpYJqAVSwcKjv1qbHdOU3iRTN/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763952070; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZvjcCTuKolkSiYBOfw2kr2C1ug8y3No+um/zgyV6vP0=; b=h1abcgLTMxBNtgdwi1xV83rQd3YXpVmrsHjSTZI8fE1Km0WO0FktDneGtvzuP8jajlcctC xz0N86xdTDL7kXkc6LdYhb420Dtw+JpLYwJvJNWPohQYiB7w0lc3IWmDOPZDCjJPZcNz14 me7lrcmBOZ9vQ6lrhpfQHPvHjwe2O94dkQQMVEsG5+sfzMYtHLkXrq7IvMeIc8T+rxn1Nt E5APfvWvf6sawkF8oP4g3SWwFtpdH3y40Phf6RgleaKln8l3OqtEU3qIhLfZAm5SwhHnXJ /XDsx+3UqVQNzzjQA+5YOTZF8AtegXg4kug0Hm1mH5otpSAUouJQlU1YPbLXEg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763952070; a=rsa-sha256; cv=none; b=UJ2SzTQfbkm4HSup3AJsgFvquo2v7BRI69ExZ7wUzapMb5Y4SmsxSOL+Rj9/VB7kHcmYWL F4gvLXrWaXDEmVG8gnFijIeH1rD4ENkHTeTPzK+8LzYSL+t0lz3BDl/ZpVvqeMYPS2d+8f IdE8aWLoN9QBHAZYWfYePliaj8u5rIfecB0Edz3It+GtWOxdthJSj2se6jkk5xuTQ6pY5A t+M2y7rOm0t+E8r5pbIQX+9K12v4xwwHaanX2+cmj1ZpUJ4Fif0FyoJ+C9igxnpfDOVEZE Y4yTlVOjIhQA35jOdCmRaDMb/A54p9lzL4h1w9LyWLSoSSVUa87lwzy4s7UnjA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dF97B2Dh4zvvH for ; Mon, 24 Nov 2025 02:41:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2e30d by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 24 Nov 2025 02:41:10 +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: 961b934407f0 - main - pam_krb5: Fix manual page in MIT case List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 961b934407f09d4241cfad76a9c8833baa2650e1 Auto-Submitted: auto-generated Date: Mon, 24 Nov 2025 02:41:10 +0000 Message-Id: <6923c5c6.2e30d.29bbe70a@gitrepo.freebsd.org> The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=961b934407f09d4241cfad76a9c8833baa2650e1 commit 961b934407f09d4241cfad76a9c8833baa2650e1 Author: Dag-Erling Smørgrav AuthorDate: 2025-11-24 02:40:37 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-11-24 02:40:49 +0000 pam_krb5: Fix manual page in MIT case * Always install the manual page as pam_krb5(8) regardless of which version we're using. * Regenerate it using pod2mdoc instead of pod2man so it doesn't claim to be part of “User Contributed Perl Documentation”. * Put the correct section number in the header and footer. * Don't cross-reference non-existent pam(7) manual page. Reviewed by: cperciva Differential Revision: https://reviews.freebsd.org/D53885 --- ObsoleteFiles.inc | 3 + lib/libpam/modules/pam_krb5/Makefile | 12 +- lib/libpam/modules/pam_krb5/pam-krb5.8 | 2205 ++++++++++++++++++-------------- 3 files changed, 1281 insertions(+), 939 deletions(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index 6ce096ac92d1..889e77de7876 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -51,6 +51,9 @@ # xargs -n1 | sort | uniq -d; # done +# 20251121: Remove duplicate pam_krb5 manual page +OLD_FILES+=share/man/man8/pam-krb5.8.gz + # 20251112: Remove old MLINK to apmconf(8) OLD_FILES+=share/man/man8/apmconf.8.gz diff --git a/lib/libpam/modules/pam_krb5/Makefile b/lib/libpam/modules/pam_krb5/Makefile index 0c933f8f7e57..d55f2d0b5971 100644 --- a/lib/libpam/modules/pam_krb5/Makefile +++ b/lib/libpam/modules/pam_krb5/Makefile @@ -30,6 +30,7 @@ SRCDIR= ${SRCTOP}/contrib/pam-krb5 .PATH: ${SRCDIR}/module \ ${SRCDIR}/portable \ ${SRCDIR}/pam-util \ + ${SRCDIR}/docs \ ${SRCDIR} PACKAGE= kerberos @@ -57,8 +58,8 @@ SRCS= account.c \ support.c \ vector.c -MANNODEV= pam-krb5.8 -MANNODEVLINKS= pam-krb5.8 pam_krb5.8 +MANNODEV= pam_krb5.8 +MANSRC.pam_krb5.8=pam-krb5.8 CFLAGS= -I${SRCDIR} \ -I${.CURDIR} \ @@ -74,6 +75,13 @@ pam-util_options.c: .PHONY module_options.c: .PHONY cp ${SRCDIR}/module/options.c module_options.c + +.ifdef VENDOR_IMPORT +# Regenerate the manual page from the pod source after vendor import +pam-krb5.8: pam_krb5.pod + sed -e 's/pam(7)/pam.conf(5)/' <${.ALLSRC} | \ + pod2mdoc -n pam_krb5 -s 8 >${.CURDIR}/${.TARGET} +.endif .else PACKAGE= kerberos diff --git a/lib/libpam/modules/pam_krb5/pam-krb5.8 b/lib/libpam/modules/pam_krb5/pam-krb5.8 index 3413748c7850..ad4fa5c422c4 100644 --- a/lib/libpam/modules/pam_krb5/pam-krb5.8 +++ b/lib/libpam/modules/pam_krb5/pam-krb5.8 @@ -1,1025 +1,1356 @@ -.\" -*- mode: troff; coding: utf-8 -*- -.\" Automatically generated by Pod::Man 5.0102 (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 -.\" ======================================================================== -.\" -.IX Title "PAM_KRB5 1" -.TH PAM_KRB5 1 2025-06-05 "perl v5.40.2" "User Contributed Perl Documentation" -.\" 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 -pam_krb5 \- Kerberos PAM module -.SH SYNOPSIS -.IX Header "SYNOPSIS" -.Vb 4 -\& auth sufficient pam_krb5.so minimum_uid=1000 -\& session required pam_krb5.so minimum_uid=1000 -\& account required pam_krb5.so minimum_uid=1000 -\& password sufficient pam_krb5.so minimum_uid=1000 -.Ve -.SH DESCRIPTION -.IX Header "DESCRIPTION" +.Dd November 21, 2025 +.Dt PAM_KRB5 8 +.Os +.Sh NAME +.Nm pam_krb5 +.Nd Kerberos PAM module +.Sh SYNOPSIS +.Bd -literal + auth sufficient pam_krb5.so minimum_uid=1000 + session required pam_krb5.so minimum_uid=1000 + account required pam_krb5.so minimum_uid=1000 + password sufficient pam_krb5.so minimum_uid=1000 +.Ed +.Sh DESCRIPTION The Kerberos service module for PAM, typically installed at -\&\fI/lib/security/pam_krb5.so\fR, provides functionality for the four PAM -operations: authentication, account management, session management, and -password management. \fIpam_krb5.so\fR is a shared object that is -dynamically loaded by the PAM subsystem as necessary, based on the system -PAM configuration. PAM is a system for plugging in external -authentication and session management modules so that each application -doesn't have to know the best way to check user authentication or create a -user session on that system. For details on how to configure PAM on your -system, see the PAM man page, often \fBpam\fR\|(7). -.PP +.Pa /lib/security/pam_krb5.so , +provides functionality for the four PAM operations: authentication, +account management, session management, and password management. +.Pa pam_krb5.so +is a shared object that is dynamically loaded by the PAM subsystem as +necessary, based on the system PAM configuration. +PAM is a system for plugging in external authentication and session +management modules so that each application doesn't have to know the +best way to check user authentication or create a user session on that +system. +For details on how to configure PAM on your system, see the PAM man +page, often pam.conf(5). +.Pp Here are the actions of this module when called from each group: -.IP auth 4 -.IX Item "auth" -Provides implementations of \fBpam_authenticate()\fR and \fBpam_setcred()\fR. The -former takes the username from the PAM session, prompts for the user's -password (unless configured to use an already-entered password), and then -performs a Kerberos initial authentication, storing the obtained -credentials (if successful) in a temporary ticket cache. The latter, -depending on the flags it is called with, either takes the contents of the -temporary ticket cache and writes it out to a persistent ticket cache -owned by the user or uses the temporary ticket cache to refresh an -existing user ticket cache. -.Sp +.Bl -tag -width Ds +.It auth +Provides implementations of +.Xr pam_authenticate 3 +and +.Xr pam_setcred 3 . +The former takes the username from the PAM session, prompts for the +user's password (unless configured to use an already-entered password), +and then performs a Kerberos initial authentication, storing the +obtained credentials (if successful) in a temporary ticket cache. +The latter, depending on the flags it is called with, either takes the +contents of the temporary ticket cache and writes it out to a persistent +ticket cache owned by the user or uses the temporary ticket cache to +refresh an existing user ticket cache. +.Pp Passwords as long or longer than PAM_MAX_RESP_SIZE octets (normally 512 -octets) will be rejected, since excessively long passwords can be used as -a denial of service attack. -.Sp +octets) will be rejected, since excessively long passwords can be used +as a denial of service attack. +.Pp After doing the initial authentication, the Kerberos PAM module will attempt to obtain tickets for a key in the local system keytab and then -verify those tickets. Unless this step is performed, the authentication -is vulnerable to KDC spoofing, but it requires that the system have a -local key and that the PAM module be running as a user that can read the -keytab file (normally \fI/etc/krb5.keytab\fR. You can point the Kerberos PAM -module at a different keytab with the \fIkeytab\fR option. If that keytab -cannot be read or if no keys are found in it, the default (potentially -insecure) behavior is to skip this check. If you want to instead fail -authentication if the obtained tickets cannot be checked, set -\&\f(CW\*(C`verify_ap_req_nofail\*(C'\fR to true in the [libdefaults] section of -\&\fI/etc/krb5.conf\fR. Note that this will affect applications other than -this PAM module. -.Sp +verify those tickets. +Unless this step is performed, the authentication is vulnerable to KDC +spoofing, but it requires that the system have a local key and that the +PAM module be running as a user that can read the keytab file (normally +.Pa /etc/krb5.keytab . +You can point the Kerberos PAM module at a different keytab with the +.Em keytab +option. +If that keytab cannot be read or if no keys are found in it, the default +behavior is to fail authentication. +If you want to skip this check, set the +.Qo Li allow_kdc_spoof Qc +option to true either in the [appdefaults] section of +.Pa /etc/krb5.conf +or in the PAM policy. +.Pp By default, whenever the user is authenticated, a basic authorization -check will also be done using \fBkrb5_kuserok()\fR. The default behavior of -this function is to check the user's account for a \fI.k5login\fR file and, -if one is present, ensure that the user's principal is listed in that -file. If \fI.k5login\fR is not present, the default check is to ensure that -the user's principal is in the default local realm and the user portion of -the principal matches the account name (this can be changed by configuring -a custom aname to localname mapping in \fIkrb5.conf\fR; see the Kerberos -documentation for details). This can be customized with several -configuration options; see below. -.Sp -If the username provided to PAM contains an \f(CW\*(C`@\*(C'\fR and Kerberos can, -treating the username as a principal, map it to a local account name, -\&\fBpam_authenticate()\fR will change the PAM user to that local account name. -This allows users to log in with their Kerberos principal and let Kerberos -do the mapping to an account. This can be disabled with the -\&\fIno_update_user\fR option. Be aware, however, that this facility cannot be -used with OpenSSH. OpenSSH will reject usernames that don't match local -accounts before this remapping can be done and will pass an invalid -password to the PAM module. Also be aware that several other common PAM -modules, such as pam_securetty, expect to be able to look up the user with -\&\fBgetpwnam()\fR and cannot be called before pam_krb5 when using this feature. -.Sp -When \fBpam_setcred()\fR is called to initialize a new ticket cache, the -environment variable KRB5CCNAME is set to the path to that ticket cache. -By default, the cache will be named \fI/tmp/krb5cc_UID_RANDOM\fR where UID is -the user's UID and RANDOM is six randomly-chosen letters. This can be -configured with the \fIccache\fR and \fIccache_dir\fR options. -.Sp -pam\-krb5 does not use the default ticket cache location or -\&\fIdefault_cc_name\fR in the \f(CW\*(C`[libdefaults]\*(C'\fR section of \fIkrb5.conf\fR. The -default cache location would share a cache for all sessions of the same -user, which causes confusing behavior when the user logs out of one of -multiple sessions. -.Sp -If \fBpam_setcred()\fR initializes a new ticket cache, it will also set up that -ticket cache so that it will be deleted when the PAM session is closed. -Normally, the calling program (\fBlogin\fR, \fBsshd\fR, etc.) will run the -user's shell as a sub-process, wait for it to exit, and then close the PAM -session, thereby cleaning up the user's session. -.IP session 4 -.IX Item "session" -Provides implementations of \fBpam_open_session()\fR, which is equivalent to -calling \fBpam_setcred()\fR with the PAM_ESTABLISH_CRED flag, and -\&\fBpam_close_session()\fR, which destroys the ticket cache created by -\&\fBpam_setcred()\fR. -.IP account 4 -.IX Item "account" -Provides an implementation of \fBpam_acct_mgmt()\fR. All it does is do the same -authorization check as performed by the \fBpam_authenticate()\fR implementation -described above. -.IP password 4 -.IX Item "password" -Provides an implementation of \fBpam_chauthtok()\fR, which implements password -changes. The user is prompted for their existing password (unless -configured to use an already entered one) and the PAM module then obtains -credentials for the special Kerberos principal \f(CW\*(C`kadmin/changepw\*(C'\fR. It -then prompts the user for a new password, twice to ensure that the user -entered it properly (again, unless configured to use an already entered -password), and then does a Kerberos password change. -.Sp +check will also be done using +.Xr krb5_kuserok 3 . +The default behavior of this function is to check the user's account for +a +.Pa .k5login +file and, if one is present, ensure that the user's principal is listed +in that file. +If +.Pa .k5login +is not present, the default check is to ensure that the user's principal +is in the default local realm and the user portion of the principal +matches the account name (this can be changed by configuring a custom +aname to localname mapping in +.Pa krb5.conf ; +see the Kerberos documentation for details). +This can be customized with several configuration options; see below. +.Pp +If the username provided to PAM contains an +.Qo Li @ Qc +and Kerberos can, treating the username as a principal, map it to a +local account name, +.Xr pam_authenticate 3 +will change the PAM user to that local account name. +This allows users to log in with their Kerberos principal and let +Kerberos do the mapping to an account. +This can be disabled with the +.Em no_update_user +option. +Be aware, however, that this facility cannot be used with OpenSSH. +OpenSSH will reject usernames that don't match local accounts before +this remapping can be done and will pass an invalid password to the PAM +module. +Also be aware that several other common PAM modules, such as +pam_securetty, expect to be able to look up the user with +.Xr getpwnam 3 +and cannot be called before pam_krb5 when using this feature. +.Pp +When +.Xr pam_setcred 3 +is called to initialize a new ticket cache, the environment variable +KRB5CCNAME is set to the path to that ticket cache. +By default, the cache will be named +.Pa /tmp/krb5cc_UID_RANDOM +where UID is the user's UID and RANDOM is six randomly-chosen letters. +This can be configured with the +.Em ccache +and +.Em ccache_dir +options. +.Pp +pam-krb5 does not use the default ticket cache location or +.Em default_cc_name +in the +.Qo Li [libdefaults] Qc +section of +.Pa krb5.conf . +The default cache location would share a cache for all sessions of the +same user, which causes confusing behavior when the user logs out of one +of multiple sessions. +.Pp +If +.Xr pam_setcred 3 +initializes a new ticket cache, it will also set up that ticket cache so +that it will be deleted when the PAM session is closed. +Normally, the calling program +.Pf ( Sy login , +.Sy sshd , +etc.) +will run the user's shell as a sub-process, wait for it to exit, and +then close the PAM session, thereby cleaning up the user's session. +.It session +Provides implementations of +.Xr pam_open_session 3 , +which is equivalent to calling +.Xr pam_setcred 3 +with the PAM_ESTABLISH_CRED flag, and +.Xr pam_close_session 3 , +which destroys the ticket cache created by +.Xr pam_setcred 3 . +.It account +Provides an implementation of +.Xr pam_acct_mgmt 3 . +All it does is do the same authorization check as performed by the +.Xr pam_authenticate 3 +implementation described above. +.It password +Provides an implementation of +.Xr pam_chauthtok 3 , +which implements password changes. +The user is prompted for their existing password (unless configured to +use an already entered one) and the PAM module then obtains credentials +for the special Kerberos principal +.Qo Li kadmin/changepw Qc . +It then prompts the user for a new password, twice to ensure that the +user entered it properly (again, unless configured to use an already +entered password), and then does a Kerberos password change. +.Pp Passwords as long or longer than PAM_MAX_RESP_SIZE octets (normally 512 -octets) will be rejected, since excessively long passwords can be used as -a denial of service attack. -.Sp -Unlike the normal Unix password module, this module will allow any user to -change any other user's password if they know the old password. Also, -unlike the normal Unix password module, root will always be prompted for -the old password, since root has no special status in Kerberos. (To -change passwords in Kerberos without knowing the old password, use -\&\fBkadmin\fR\|(8) instead.) -.PP +octets) will be rejected, since excessively long passwords can be used +as a denial of service attack. +.Pp +Unlike the normal Unix password module, this module will allow any user +to change any other user's password if they know the old password. +Also, unlike the normal Unix password module, root will always be +prompted for the old password, since root has no special status in +Kerberos. +(To change passwords in Kerberos without knowing the old password, use +kadmin(8) instead.) +.El +.Pp Both the account and session management calls of the Kerberos PAM module will return PAM_IGNORE if called in the context of a PAM session for a -user who did not authenticate with Kerberos (a return code of \f(CW\*(C`ignore\*(C'\fR in -the Linux PAM configuration language). -.PP +user who did not authenticate with Kerberos (a return code of +.Qo Li ignore Qc +in the Linux PAM configuration language). +.Pp Note that this module assumes the network is available in order to do a -Kerberos authentication. If the network is not available, some Kerberos -libraries have timeouts longer than the timeout imposed by the login -process. This means that using this module incautiously can make it -impossible to log on to console as root. For this reason, you should -always use the \fIignore_root\fR or \fIminimum_uid\fR options, list a local -authentication module such as \fBpam_unix\fR first with a control field of -\&\f(CW\*(C`sufficient\*(C'\fR so that the Kerberos PAM module will be skipped if local -password authentication was successful. -.PP -This is not the same PAM module as the Kerberos PAM module available from -Sourceforge, or the one included on Red Hat systems. It supports many of -the same options, has some additional options, and doesn't support some of -the options those modules do. -.SH CONFIGURATION -.IX Header "CONFIGURATION" -The Kerberos PAM module takes many options, not all of which are relevant -to every PAM group; options that are not relevant will be silently -ignored. Any of these options can be set in the PAM configuration as -arguments listed after \f(CW\*(C`pam_krb5.so\*(C'\fR. Some of the options can also be -set in the system \fIkrb5.conf\fR file; if this is possible, it will be noted -below in the option description. -.PP -To set a boolean option in the PAM configuration file, just give the name -of the option in the arguments. To set an option that takes an argument, -follow the option name with an equal sign (=) and the value, with no -separating whitespace. Whitespace in option arguments is not supported in -the PAM configuration. -.PP -To set an option for the PAM module in the system \fIkrb5.conf\fR file, put -that option in the \f(CW\*(C`[appdefaults]\*(C'\fR section. All options must be followed -by an equal sign (=) and a value, so for boolean options add \f(CW\*(C`= true\*(C'\fR. +Kerberos authentication. +If the network is not available, some Kerberos libraries have timeouts +longer than the timeout imposed by the login process. +This means that using this module incautiously can make it impossible to +log on to console as root. +For this reason, you should always use the +.Em ignore_root +or +.Em minimum_uid +options, list a local authentication module such as +.Sy pam_unix +first with a control field of +.Qo Li sufficient Qc +so that the Kerberos PAM module will be skipped if local password +authentication was successful. +.Pp +This is not the same PAM module as the Kerberos PAM module available +from Sourceforge, or the one included on Red Hat systems. +It supports many of the same options, has some additional options, and +doesn't support some of the options those modules do. +.Sh CONFIGURATION +The Kerberos PAM module takes many options, not all of which are +relevant to every PAM group; options that are not relevant will be +silently ignored. +Any of these options can be set in the PAM configuration as arguments +listed after +.Qo Li pam_krb5.so Qc . +Some of the options can also be set in the system +.Pa krb5.conf +file; if this is possible, it will be noted below in the option +description. +.Pp +To set a boolean option in the PAM configuration file, just give the +name of the option in the arguments. +To set an option that takes an argument, follow the option name with an +equal sign (=) and the value, with no separating whitespace. +Whitespace in option arguments is not supported in the PAM +configuration. +.Pp +To set an option for the PAM module in the system +.Pa krb5.conf +file, put that option in the +.Qo Li [appdefaults] Qc +section. +All options must be followed by an equal sign (=) and a value, so for +boolean options add +.Qo Li = true Qc . The Kerberos PAM module will look for options either at the top level of -the \f(CW\*(C`[appdefaults]\*(C'\fR section or in a subsection named \f(CW\*(C`pam\*(C'\fR, inside or -outside a section for the realm. For example, the following fragment of a -\&\fIkrb5.conf\fR file would set \fIforwardable\fR to true, \fIminimum_uid\fR to -1000, and set \fIignore_k5login\fR only if the realm is EXAMPLE.COM. -.PP -.Vb 8 -\& [appdefaults] -\& forwardable = true -\& pam = { -\& minimum_uid = 1000 -\& EXAMPLE.COM = { -\& ignore_k5login = true -\& } -\& } -.Ve -.PP -For more information on the syntax of \fIkrb5.conf\fR, see \fBkrb5.conf\fR\|(5). -Note that options that depend on the realm will be set only on the basis -of the default realm, either as configured in \fBkrb5.conf\fR\|(5) or as set by -the \fIrealm\fR option described below. If the user authenticates to an -account qualified with a realm, that realm will not be used when -determining which options will apply. -.PP -There is no difference to the PAM module whether options are specified at -the top level or in a \f(CW\*(C`pam\*(C'\fR section; the \f(CW\*(C`pam\*(C'\fR section is supported in -case there are options that should be set for the PAM module but not for -other applications. -.PP -If the same option is set in \fIkrb5.conf\fR and in the PAM configuration, -the latter takes precedent. Note, however, that due to the configuration -syntax, there's no way to turn off a boolean option in the PAM -configuration that was turned on in \fIkrb5.conf\fR. -.PP +the +.Qo Li [appdefaults] Qc +section or in a subsection named +.Qo Li pam Qc , +inside or outside a section for the realm. +For example, the following fragment of a +.Pa krb5.conf +file would set +.Em forwardable +to true, +.Em minimum_uid +to 1000, and set +.Em ignore_k5login +only if the realm is EXAMPLE.COM. +.Bd -literal + [appdefaults] + forwardable = true + pam = { + minimum_uid = 1000 + EXAMPLE.COM = { + ignore_k5login = true + } + } +.Ed +.Pp +For more information on the syntax of +.Pa krb5.conf , +see krb5.conf(5). Note that options that depend on the realm will be set +only on the basis of the default realm, either as configured in +krb5.conf(5) or as set by the +.Em realm +option described below. +If the user authenticates to an account qualified with a realm, that +realm will not be used when determining which options will apply. +.Pp +There is no difference to the PAM module whether options are specified +at the top level or in a +.Qo Li pam Qc +section; the +.Qo Li pam Qc +section is supported in case there are options that should be set for +the PAM module but not for other applications. +.Pp +If the same option is set in +.Pa krb5.conf +and in the PAM configuration, the latter takes precedent. +Note, however, that due to the configuration syntax, there's no way to +turn off a boolean option in the PAM configuration that was turned on in +.Pa krb5.conf . +.Pp The start of each option description is annotated with the version of -pam\-krb5 in which that option was added with the current meaning. -.SS Authorization -.IX Subsection "Authorization" -.IP alt_auth_map= 4 -.IX Item "alt_auth_map=" -[3.12] This functions similarly to the \fIsearch_k5login\fR option. The - argument is used as the authentication Kerberos principal, with -any \f(CW%s\fR in replaced with the username. If the username -contains an \f(CW\*(C`@\*(C'\fR, only the part of the username before the realm is used -to replace \f(CW%s\fR. If contains a realm, it will be used; -otherwise, the realm of the username (if any) will be appended to the -result. There is no quote removal. -.Sp +pam-krb5 in which that option was added with the current meaning. +.Ss Authorization +.Bl -tag -width Ds +.It allow_kdc_spoof +Allow authentication to succeed even if there is no host or service key +available in a keytab to authenticate the Kerberos KDC's ticket. +.It alt_auth_map= +[3.12] This functions similarly to the +.Em search_k5login +option. +The argument is used as the authentication Kerberos principal, +with any +.Qo Li %s Qc +in replaced with the username. +If the username contains an +.Qo Li @ Qc , +only the part of the username before the realm is used to replace +.Qo Li %s Qc . +If contains a realm, it will be used; otherwise, the realm of +the username (if any) will be appended to the result. +There is no quote removal. +.Pp If this option is present, the default behavior is to try this alternate principal first and then fall back to the standard behavior if it fails. The primary usage is to allow alternative principals to be used for -authentication in programs like \fBsudo\fR. Most examples will look like: -.Sp -.Vb 1 -\& alt_auth_map=%s/root -.Ve -.Sp +authentication in programs like +.Sy sudo . +Most examples will look like: +.Bd -literal + alt_auth_map=%s/root +.Ed +.Pp which attempts authentication as the root instance of the username first -and then falls back to the regular username (but see \fIforce_alt_auth\fR and -\&\fIonly_alt_auth\fR). -.Sp +and then falls back to the regular username (but see +.Em force_alt_auth +and +.Em only_alt_auth Ns ). +.Pp This option also allows a cheap way to attempt authentication in an -alternative realm first and then fall back to the primary realm. A -setting like: -.Sp -.Vb 1 -\& alt_auth_map=%s@EXAMPLE.COM -.Ve -.Sp +alternative realm first and then fall back to the primary realm. +A setting like: +.Bd -literal + alt_auth_map=%s@EXAMPLE.COM +.Ed +.Pp will attempt authentication in the EXAMPLE.COM realm first and then fall -back on the local default realm. This is more convenient than running the -module multiple times with multiple default realms set with \fIrealm\fR, but -it is very limited: only two realms can be tried, and the alternate realm -is always tried first. -.Sp -This option can be set in \f(CW\*(C`[appdefaults]\*(C'\fR in \fIkrb5.conf\fR, although -normally it doesn't make sense to do that; normally it is used in the PAM -options of configuration for specific programs. It is only applicable to -the auth and account groups. If this option is set for the auth group, be -sure to set it for the account group as well or account authorization may -fail. -.IP force_alt_auth 4 -.IX Item "force_alt_auth" -[3.12] This option is used with \fIalt_auth_map\fR and forces authentication -as the mapped principal if that principal exists in the KDC. Only if the -KDC returns principal unknown does the Kerberos PAM module fall back to -normal authentication. This can be used to force authentication with an -alternate instance. If \fIalt_auth_map\fR is not set, it has no effect. -.Sp -This option can be set in \f(CW\*(C`[appdefaults]\*(C'\fR in \fIkrb5.conf\fR and is only -applicable to the auth group. -.IP ignore_k5login 4 -.IX Item "ignore_k5login" -[2.0] Never look for a \fI.k5login\fR file in the user's home directory. -Instead, only check that the Kerberos principal maps to the local account -name. The default check is to ensure the realm matches the local realm -and the user portion of the principal matches the local account name, but -this can be customized by setting up an aname to localname mapping in -\&\fIkrb5.conf\fR. -.Sp -This option can be set in \f(CW\*(C`[appdefaults]\*(C'\fR in \fIkrb5.conf\fR and is only -applicable to the auth and account groups. -.IP ignore_root 4 -.IX Item "ignore_root" -[1.1] Do not do anything if the username is \f(CW\*(C`root\*(C'\fR. The authentication -and password calls will silently fail (allowing that status to be ignored -via a control of \f(CW\*(C`optional\*(C'\fR or \f(CW\*(C`sufficient\*(C'\fR), and the account and -session calls (including pam_setcred) will return PAM_IGNORE, telling the -PAM library to proceed as if they weren't mentioned in the PAM -configuration. This option is supported and will remain, but normally you -want to use \fIminimum_uid\fR instead. -.Sp -This option can be set in \f(CW\*(C`[appdefaults]\*(C'\fR in \fIkrb5.conf\fR. -.IP minimum_uid= 4 -.IX Item "minimum_uid=" -[2.0] Do not do anything if the authenticated account name corresponds to -a local account and that local account has a UID lower than . If +back on the local default realm. +This is more convenient than running the module multiple times with +multiple default realms set with +.Em realm , +but it is very limited: only two realms can be tried, and the alternate +realm is always tried first. +.Pp +This option can be set in +.Qo Li [appdefaults] Qc +in +.Pa krb5.conf , +although normally it doesn't make sense to do that; normally it is used +in the PAM options of configuration for specific programs. +It is only applicable to the auth and account groups. +If this option is set for the auth group, be sure to set it for the +account group as well or account authorization may fail. +.It force_alt_auth +[3.12] This option is used with +.Em alt_auth_map +and forces authentication as the mapped principal if that principal +exists in the KDC. Only if the KDC returns principal unknown does the +Kerberos PAM module fall back to normal authentication. +This can be used to force authentication with an alternate instance. +If +.Em alt_auth_map +is not set, it has no effect. +.Pp +This option can be set in +.Qo Li [appdefaults] Qc +in +.Pa krb5.conf +and is only applicable to the auth group. +.It ignore_k5login +[2.0] Never look for a +.Pa .k5login +file in the user's home directory. +Instead, only check that the Kerberos principal maps to the local +account name. +The default check is to ensure the realm matches the local realm and the +user portion of the principal matches the local account name, but this +can be customized by setting up an aname to localname mapping in +.Pa krb5.conf . +.Pp +This option can be set in +.Qo Li [appdefaults] Qc +in +.Pa krb5.conf +and is only applicable to the auth and account groups. +.It ignore_root +[1.1] Do not do anything if the username is +.Qo Li root Qc . +The authentication and password calls will silently fail (allowing that +status to be ignored via a control of +.Qo Li optional Qc +or +.Qo Li sufficient Qc Ns ), +and the account and session calls (including pam_setcred) will return +PAM_IGNORE, telling the PAM library to proceed as if they weren't +mentioned in the PAM configuration. +This option is supported and will remain, but normally you want to use +.Em minimum_uid +instead. +.Pp +This option can be set in +.Qo Li [appdefaults] Qc +in +.Pa krb5.conf . +.It minimum_uid= +[2.0] Do not do anything if the authenticated account name corresponds +to a local account and that local account has a UID lower than . If both of those conditions are true, the authentication and password calls will silently fail (allowing that status to be ignored via a control of -\&\f(CW\*(C`optional\*(C'\fR or \f(CW\*(C`sufficient\*(C'\fR), and the account and session calls -(including pam_setcred) will return PAM_IGNORE, telling the PAM library to -proceed as if they weren't mentioned in the PAM configuration. -.Sp -Using this option is highly recommended if you don't need to use Kerberos -to authenticate password logins to the root account (which isn't -recommended since Kerberos requires a network connection). It provides -some defense in depth against user principals that happen to match a -system account incorrectly authenticating as that system account. -.Sp -This option can be set in \f(CW\*(C`[appdefaults]\*(C'\fR in \fIkrb5.conf\fR. -.IP only_alt_auth 4 -.IX Item "only_alt_auth" -[3.12] This option is used with \fIalt_auth_map\fR and forces the use of the -mapped principal for authentication. It disables fallback to normal -authentication in all cases and overrides \fIsearch_k5login\fR and -\&\fIforce_alt_auth\fR. If \fIalt_auth_map\fR is not set, it has no effect and -the standard authentication behavior is used. -.Sp -This option can be set in \f(CW\*(C`[appdefaults]\*(C'\fR in \fIkrb5.conf\fR and is only -applicable to the auth group. -.IP search_k5login 4 -.IX Item "search_k5login" +.Qo Li optional Qc +or +.Qo Li sufficient Qc Ns ), +and the account and session calls (including pam_setcred) will return +PAM_IGNORE, telling the PAM library to proceed as if they weren't +mentioned in the PAM configuration. +.Pp +Using this option is highly recommended if you don't need to use +Kerberos to authenticate password logins to the root account (which +isn't recommended since Kerberos requires a network connection). +It provides some defense in depth against user principals that happen to +match a system account incorrectly authenticating as that system +account. +.Pp +This option can be set in +.Qo Li [appdefaults] Qc +in +.Pa krb5.conf . +.It only_alt_auth +[3.12] This option is used with +.Em alt_auth_map +and forces the use of the mapped principal for authentication. +It disables fallback to normal authentication in all cases and overrides +.Em search_k5login +and +.Em force_alt_auth . +If +.Em alt_auth_map +is not set, it has no effect and the standard authentication behavior is +used. +.Pp +This option can be set in +.Qo Li [appdefaults] Qc +in +.Pa krb5.conf +and is only applicable to the auth group. +.It search_k5login [2.0] Normally, the Kerberos implementation of pam_authenticate attempts -to obtain tickets for the authenticating username in the local realm. If -this option is set and the local user has a \fI.k5login\fR file in their home -directory, the module will instead open and read that \fI.k5login\fR file, -attempting to use the supplied password to authenticate as each principal -listed there in turn. If any of those authentications succeed, the user -will be successfully authenticated; otherwise, authentication will fail. -This option is useful for allowing password authentication (via console or -\&\fBsshd\fR without GSS-API support) to shared accounts. If there is no -\&\fI.k5login\fR file, the behavior is the same as normal. Using this option -requires that the user's \fI.k5login\fR file be readable at the time of -authentication. -.Sp -This option can be set in \f(CW\*(C`[appdefaults]\*(C'\fR in \fIkrb5.conf\fR and is only -applicable to the auth group. -.SS "Kerberos Behavior" -.IX Subsection "Kerberos Behavior" -.IP anon_fast 4 -.IX Item "anon_fast" +to obtain tickets for the authenticating username in the local realm. +If this option is set and the local user has a +.Pa .k5login +file in their home directory, the module will instead open and read that +.Pa .k5login +file, attempting to use the supplied password to authenticate as each +principal listed there in turn. +If any of those authentications succeed, the user will be successfully +authenticated; otherwise, authentication will fail. +This option is useful for allowing password authentication (via console +or +.Sy sshd +without GSS-API support) to shared accounts. +If there is no +.Pa .k5login +file, the behavior is the same as normal. +Using this option requires that the user's +.Pa .k5login +file be readable at the time of authentication. +.Pp +This option can be set in +.Qo Li [appdefaults] Qc +in +.Pa krb5.conf +and is only applicable to the auth group. +.El +.Ss Kerberos Behavior +.Bl -tag -width Ds +.It anon_fast [4.6] Attempt to use Flexible Authentication Secure Tunneling (FAST) by -first authenticating as the anonymous user (WELLKNOWN/ANONYMOUS) and using -its credentials as the FAST armor. This requires anonymous PKINIT be -enabled for the local realm, that PKINIT be configured on the local -system, and that the Kerberos library support FAST and anonymous PKINIT. -.Sp -FAST is a mechanism to protect Kerberos against password guessing attacks -and provide other security improvements. To work, FAST requires that a -ticket be obtained with a strong key to protect exchanges with potentially -weaker user passwords. This option uses anonymous authentication to -obtain that key and then uses it to protect the subsequent authentication. -.Sp +first authenticating as the anonymous user (WELLKNOWN/ANONYMOUS) and +using its credentials as the FAST armor. +This requires anonymous PKINIT be enabled for the local realm, that +PKINIT be configured on the local system, and that the Kerberos library +support FAST and anonymous PKINIT. +.Pp +FAST is a mechanism to protect Kerberos against password guessing +attacks and provide other security improvements. +To work, FAST requires that a ticket be obtained with a strong key to +protect exchanges with potentially weaker user passwords. +This option uses anonymous authentication to obtain that key and then +uses it to protect the subsequent authentication. +.Pp If anonymous PKINIT is not available or fails, FAST will not be used and the authentication will proceed as normal. -.Sp +.Pp To instead use an existing ticket cache for the FAST credentials, use -\&\fIfast_ccache\fR instead of this option. If both \fIfast_ccache\fR and -\&\fIanon_fast\fR are set, the ticket cache named by \fIfast_ccache\fR will be -tried first, and the Kerberos PAM module will fall back on attempting -anonymous PKINIT if that cache could not be used. -.Sp -This option can be set in \f(CW\*(C`[appdefaults]\*(C'\fR in \fIkrb5.conf\fR and is only -applicable to the auth and password groups. -.Sp -The operation is the same as if using the \fIfast_ccache\fR option, but the -cache is created and destroyed automatically. If both \fIfast_ccache\fR and -\&\fIanon_fast\fR options are used, the \fIfast_ccache\fR takes precedent and no -anonymous authentication is done. -.IP fast_ccache= 4 -.IX Item "fast_ccache=" -[4.3] The same as \fIanon_fast\fR, but use an existing Kerberos ticket cache -rather than anonymous PKINIT. This allows use of FAST with a realm that -doesn't support PKINIT or doesn't support anonymous authentication. -.Sp +.Em fast_ccache +instead of this option. +If both +.Em fast_ccache +and +.Em anon_fast +are set, the ticket cache named by +.Em fast_ccache +will be tried first, and the Kerberos PAM module will fall back on +attempting anonymous PKINIT if that cache could not be used. +.Pp +This option can be set in +.Qo Li [appdefaults] Qc +in +.Pa krb5.conf +and is only applicable to the auth and password groups. +.Pp +The operation is the same as if using the +.Em fast_ccache +option, but the cache is created and destroyed automatically. +If both +.Em fast_ccache +and *** 1389 LINES SKIPPED *** From nobody Mon Nov 24 03:12:15 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dF9q86hXVz6Hvl6 for ; Mon, 24 Nov 2025 03:12:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dF9q82s7Nz3SdT for ; Mon, 24 Nov 2025 03:12:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763953940; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+2jWDx+qiev+rKXzRyWsab/+UJPfVgyss5I3hv/wlb0=; b=AB9O72LuWrTJ4eTS6+BeNGSmpqsTr8wmij1RKVNbxOv59Y24oR6Pq4EDbHD+Mn5KubZ/oq H5LdUNuU+DZRSq11cTnewJ7qkJQwSIL96ZA1SxcSrROKz9MjOucVymm4Ffs4KkPpQsGDG7 sA7qWi1sf8Dl9Kcfg6vvyCYH5l4CKWjcsuL4+H97ns7eobH5sqlNfJuOEndS8HnCTUd+FO vvTSRhQfXQtsHup/a0jQEkkoluH044fzvHMVTZylf528cbTPNtXDxAZcZbbE45qMkS5bR4 T8kyNsf8QfUGm5Ev/Iwg7L5Vj1XbZl6C3h7E7ug2+Pwk6VPcWraNLa3sFQW3pA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763953940; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+2jWDx+qiev+rKXzRyWsab/+UJPfVgyss5I3hv/wlb0=; b=jS4oAXNbXMgyhLUztW9DZakPraGqRsf5yOWkPJQ5mKYr6op83UGOZDy0cAO4LrN+SKK6vT qcZdbDDpzPkVX8MDSLj6vdryMpbJOwkKSJREXr5YpfniIHX+55sg3mpeHyvUtiOysdP+9y sk3/WCk+WPdCvXkhbT3V2mv1IAe8oUga5Y9S3at5VeulYiPhOLrQGekl+l9GjChwe3toBO +k5o8tw+flZ0OTPPOF0XleuKNyFXK4rHI+xu+J9c4jNJSxVPhNbKYM2w2Dgd/c092MjBAl ODBp/Vc9L+0qw6PDpeDyPRuoKAtmvpW3XUe7ZWsmsKF5ovKax8nj4gofY4EGcQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763953940; a=rsa-sha256; cv=none; b=Wx8BoRYXtCBEhge+CC+Qz1Qv+c1tEzKpYCcEnLcFN76z800H4myR3vaF7I8plbHWG1e79F EsJzTwIPPdWHMou+czxT4P3K9fLTJYca9woW8XseFfJznmZN0sfz4g6nwQYT53Oq463vU1 ePlvp4mkNrHNToR6IwWP7gfgU8HC287X9iJ83oqvF2Kz94GnMY9buMXTj9cW8/QqQrRWYd s+V5U5j+JMBnJUwxMHH3JjV/mSRzL1ddMuL6WJ0Rc5WQOvOSeEhqwSGHw7AqHZ3yhWtBiO qRLnuQpQimI8Ae4dYpKiuZ3ng313y73iTvzyQWE5B6NjmcLdJjyimhStQcJeyQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dF9q80yKQzwsD for ; Mon, 24 Nov 2025 03:12:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2eae7 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 24 Nov 2025 03:12:15 +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: 5995c036df48 - main - ObsoleteFiles: Fix repeated typo in recent entries List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5995c036df4871b10e3afb0810cdf73da670a745 Auto-Submitted: auto-generated Date: Mon, 24 Nov 2025 03:12:15 +0000 Message-Id: <6923cd0f.2eae7.3f864e9@gitrepo.freebsd.org> The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=5995c036df4871b10e3afb0810cdf73da670a745 commit 5995c036df4871b10e3afb0810cdf73da670a745 Author: Dag-Erling Smørgrav AuthorDate: 2025-11-24 03:11:16 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-11-24 03:11:54 +0000 ObsoleteFiles: Fix repeated typo in recent entries Fixes: 685a78570b35 ("random: remove hifn(4)") Fixes: 5b9fba1cb0d8 ("Retire pccard(4)") Fixes: 3cf85a69ae7d ("hifn.4: Really remove") Fixes: 8a8c58f71e80 ("pccard.4: Really remove") Fixes: 6aaf184dc4e2 ("pcic.4: Really remove") Fixes: daa1f9b415f3 ("apm(8): Drop MLINK to apmconf(8)") Fixes: 961b934407f0 ("pam_krb5: Fix manual page in MIT case") --- ObsoleteFiles.inc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index 889e77de7876..51338fea9bf6 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -52,17 +52,17 @@ # done # 20251121: Remove duplicate pam_krb5 manual page -OLD_FILES+=share/man/man8/pam-krb5.8.gz +OLD_FILES+=usr/share/man/man8/pam-krb5.8.gz # 20251112: Remove old MLINK to apmconf(8) -OLD_FILES+=share/man/man8/apmconf.8.gz +OLD_FILES+=usr/share/man/man8/apmconf.8.gz # 20251112: Remove pccard(4) and related -OLD_FILES+=share/man/man4/pccard.4.gz -OLD_FILES+=share/man/man4/pcic.4.gz +OLD_FILES+=usr/share/man/man4/pccard.4.gz +OLD_FILES+=usr/share/man/man4/pcic.4.gz # 20251028: Remove hifn(4) -OLD_FILES+=share/man/man4/hifn.4.gz +OLD_FILES+=usr/share/man/man4/hifn.4.gz # 20251006: Remove libnss_tacplus.a (it never should have been installed) OLD_FILES+=usr/lib/libnss_tacplus.a From nobody Mon Nov 24 03:15:35 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dF9tv2nQbz6HwBr for ; Mon, 24 Nov 2025 03:15:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dF9tv22SCz3Sv5 for ; Mon, 24 Nov 2025 03:15:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763954135; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vAS5GkVZqNZdpjkw2bG06mSlUSfmA8GoHMCPuS3Dppc=; b=WySKo2mA0IBDkRKKzthfYSNZRUgwUy3/6stMboGaPbRTuHRcrRmB0lgb5R5JzsZLUmVdxm wPRMJXVoBG2HboT5LYvZ4SALTHgKGQDNXjPVTgd2afNH8Ag6xDiqEEOPH5qSr/eYT3CiI/ Eof/YbB10Rkg7AObEdLDMBD0G8nYCzowXcmHzSnUNPmtg8mha9yMQoze3ea4ldRnGfu8tV PNYQ6EuXleMmJhUSTozYj/Wo3lzedEIltAbuoMNKSlPJ6dvE+YtY7DRUXBBG1elhmWfuDW C9z05TYhfF/6nnkRzZjJnwqymF7aajpc6/Tva8S+d0HKbfrytd5egbVsE/JEpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763954135; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vAS5GkVZqNZdpjkw2bG06mSlUSfmA8GoHMCPuS3Dppc=; b=YiahHsaKMxqnPzinuYqViltnZVjC6bFShz7aFioeqWvU5d+XrqBgKJR0F0HOukb11Z0Oas 0Y4B96YUJ2nhBwGNmEurCzgWQ+V4xD0YtrMWhAMnRvt4TslEY0Hi9ovZKHH+IXye0xDMhm g0myEuZi5+e/2Mj++JFWhjz2+En3P5xZApCq3QprAkm1b2sfBjPSOA8XVWLsOtNCxRunU2 zk7CzWSpSu5V7uwgnvUrhiFt2Ytbv/Kkf9mlN4+g9JeZhoV9vIkxeGkyGBEWkjhVjEIpL+ bZpFooj93WmL1Pl7A5DjLO4FiUBE/8zW6a+y/BmiBdfM8wO3xMwmcYzQSTTvZg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763954135; a=rsa-sha256; cv=none; b=p2xWyAB/0ZGHc/sVeEJLwZz+gzJ7JTwd9TPThRmB9kVIUA4W7V3lArsNM/8R9uEYY2UyJY OAZpUh0XKxbjAgvBcw1FPQ4mu3sEtsHwAPiqp02HnR4dIzdw89NxsQyVNZ11eIqPtrQaNr 4nIZ1oAlG+UqVRYrKE8zasKS+3CAKptBgMNbQqC7PlutQNkmD4+rGfQogQfp2LoQfiW6f5 cjqli5M3pfYubIoUAte1atT1DyMJhI/GEEA4ABoSvi/Hc6wkF+SGhg/Axota/vEtsNZByN pcG4Ms8EK8m/eHBmMrdu2HEq2U8agYsKVR7Vnbz0Uml0upGikIVovIuEWEnoCQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dF9tv1ZsTzww8 for ; Mon, 24 Nov 2025 03:15:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3014c by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 24 Nov 2025 03:15:35 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: 2eb030d1c8f1 - stable/15 - pam_krb5: Restore allow_kdc_spoof option List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 2eb030d1c8f1f307c2e0570538633d4e0822a4ff Auto-Submitted: auto-generated Date: Mon, 24 Nov 2025 03:15:35 +0000 Message-Id: <6923cdd7.3014c.55ed939f@gitrepo.freebsd.org> The branch stable/15 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=2eb030d1c8f1f307c2e0570538633d4e0822a4ff commit 2eb030d1c8f1f307c2e0570538633d4e0822a4ff Author: Dag-Erling Smørgrav AuthorDate: 2025-11-24 02:40:29 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-11-24 02:42:30 +0000 pam_krb5: Restore allow_kdc_spoof option Not only does the new pam_krb5 module not have the same allow_kdc_spoof option that the old one had, its behavior in this matter defaults to insecure. Reimplement allow_kdc_spoof and switch the default back. Reviewed by: cy Differential Revision: https://reviews.freebsd.org/D53884 (cherry picked from commit fe5c8baf25a5b40285c3ef85b69391d591e4a76c) --- contrib/pam-krb5/docs/pam_krb5.pod | 15 +++++++++------ contrib/pam-krb5/module/auth.c | 6 ++++++ contrib/pam-krb5/module/internal.h | 3 +++ contrib/pam-krb5/module/options.c | 3 +++ 4 files changed, 21 insertions(+), 6 deletions(-) diff --git a/contrib/pam-krb5/docs/pam_krb5.pod b/contrib/pam-krb5/docs/pam_krb5.pod index 024584dfd4cd..f352af71b553 100644 --- a/contrib/pam-krb5/docs/pam_krb5.pod +++ b/contrib/pam-krb5/docs/pam_krb5.pod @@ -57,12 +57,10 @@ is vulnerable to KDC spoofing, but it requires that the system have a local key and that the PAM module be running as a user that can read the keytab file (normally F. You can point the Kerberos PAM module at a different keytab with the I option. If that keytab -cannot be read or if no keys are found in it, the default (potentially -insecure) behavior is to skip this check. If you want to instead fail -authentication if the obtained tickets cannot be checked, set -C to true in the [libdefaults] section of -F. Note that this will affect applications other than -this PAM module. +cannot be read or if no keys are found in it, the default behavior is to +fail authentication. If you want to skip this check, set the +C option to true either in the [appdefaults] section of +F or in the PAM policy. By default, whenever the user is authenticated, a basic authorization check will also be done using krb5_kuserok(). The default behavior of @@ -218,6 +216,11 @@ pam-krb5 in which that option was added with the current meaning. =over 4 +=item allow_kdc_spoof + +Allow authentication to succeed even if there is no host or service +key available in a keytab to authenticate the Kerberos KDC's ticket. + =item alt_auth_map= [3.12] This functions similarly to the I option. The diff --git a/contrib/pam-krb5/module/auth.c b/contrib/pam-krb5/module/auth.c index 065ce97b6596..46f2be791000 100644 --- a/contrib/pam-krb5/module/auth.c +++ b/contrib/pam-krb5/module/auth.c @@ -696,6 +696,12 @@ verify_creds(struct pam_args *args, krb5_creds *creds) if (cursor_valid) krb5_kt_end_seq_get(c, keytab, &cursor); } +#ifdef __FreeBSD__ + if (args->config->allow_kdc_spoof) + opts.flags &= ~KRB5_VERIFY_INIT_CREDS_OPT_AP_REQ_NOFAIL; + else + opts.flags |= KRB5_VERIFY_INIT_CREDS_OPT_AP_REQ_NOFAIL; +#endif /* __FreeBSD__ */ retval = krb5_verify_init_creds(c, creds, princ, keytab, NULL, &opts); if (retval != 0) putil_err_krb5(args, retval, "credential verification failed"); diff --git a/contrib/pam-krb5/module/internal.h b/contrib/pam-krb5/module/internal.h index f3ea30139815..c797f7a56cd3 100644 --- a/contrib/pam-krb5/module/internal.h +++ b/contrib/pam-krb5/module/internal.h @@ -62,6 +62,9 @@ struct pam_config { long minimum_uid; /* Ignore users below this UID. */ bool only_alt_auth; /* Alt principal must be used. */ bool search_k5login; /* Try password with each line of .k5login. */ +#ifdef __FreeBSD__ + bool allow_kdc_spoof;/* Allow auth even if KDC cannot be verified */ +#endif /* __FreeBSD__ */ /* Kerberos behavior. */ char *fast_ccache; /* Cache containing armor ticket. */ diff --git a/contrib/pam-krb5/module/options.c b/contrib/pam-krb5/module/options.c index 799b3a33e168..0118fb451af6 100644 --- a/contrib/pam-krb5/module/options.c +++ b/contrib/pam-krb5/module/options.c @@ -30,6 +30,9 @@ #define K(name) (#name), offsetof(struct pam_config, name) /* clang-format off */ static const struct option options[] = { +#ifdef __FreeBSD__ + { K(allow_kdc_spoof), true, BOOL (false) }, +#endif /* __FreeBSD__ */ { K(alt_auth_map), true, STRING (NULL) }, { K(anon_fast), true, BOOL (false) }, { K(banner), true, STRING ("Kerberos") }, From nobody Mon Nov 24 03:15:36 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dF9tw5dWBz6Hw46 for ; Mon, 24 Nov 2025 03:15:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dF9tw2z0kz3Sm6 for ; Mon, 24 Nov 2025 03:15:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763954136; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EgUoD/OgDClmCyEVCiOZnpVJ/xFvlj/xFAV2XiNCPjY=; b=koaclr1APVANTJrIza2YTzIjvOGd/j8Mn2rEBh85orIYkt4rLOHdQ5GUrBYvWKq/3y4RXz hBqqwUx+yqWkCQ0zzf5/3uM0pB7dTS64zxD0GJz4NnYcnh4Xa2L9PhW7Uhi9WA6d/pUnPx CpcjCz3WctTrufVnE/kmreJkn3fDwVdEclpA6kzK5kW4h1b9ACnCSgMrYJH7MfpbbpX1sp 1a8zaYVojxSm33NRoYVY6X8y5NFUIrakp2PpMKK9A7pemr6P1flyfq8cwsy3Y4vNJPcotT 2HHJWkbX1mSQmHSWkURJD1XjgMsBbQseg8QD6I/EBs5pwWgESbT6tcgbUZm7hA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763954136; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EgUoD/OgDClmCyEVCiOZnpVJ/xFvlj/xFAV2XiNCPjY=; b=aBZKIPQi3cXsy4jUEZGVh7I+UpdYlea2YAejtQ+htopXaondjspX2cd43LKAFQr9zWacgr Ga/o8+MN/H3d/+pDSbNVQfQaki0gFF/2FSxsXQUmKXmp88A1sXRiXH9VzzjEA8wjdYkYsF BZTJchCK4khI+pQkR8808tSMGep1sh4jo67S4vPg0lz95qy7KR2k649kKaW8rXq17acRow ye0NeaCnq0Td9ezAIlZO1JC8F9ybPS2Ur/nHZGNwFlIkFJPMOQ/5Z8o1sZE/45ZCX8BCFo zm6lUi0D2z/8sqfm4hokgmcee3GQ1mpWod2vRrNZPP/Ju6z3kBk/0qVEzHIBzw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763954136; a=rsa-sha256; cv=none; b=Iu/oE8AlOCtncI+tcGFJ2A4Kz+gILOHVBR2BrqAsToNC63htpMyKs0scNLCZn4fRRftgKw xeQEpcY16CGU14HiuXr0B+GuBqELnOwQAcJckMBjbaTslXgcBDjhpfUlXzAhdpKXG+6dEC oKcAUcsxerr30V8rEUPbz2plsFptDONtjw9nWUSm/WFTRnjdEjBFmeMIwDNxddB/YChlTC 5q2AJT0sjYGj54bFG5xRqe3NLX9TK6HxLDRZSQ4GwKd3X1IvdSE/NPFO9JTDWDBNxp6OrN t3APoQEZqw+krjB6qqaNQ8RDGbv642NY1SyLCgxIUWCWuAVfoqqES0EmYQdUZQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dF9tw2NX0zww9 for ; Mon, 24 Nov 2025 03:15:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2ea7a by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 24 Nov 2025 03:15:36 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: 4166181675d7 - stable/15 - pam_krb5: Fix manual page in MIT case List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 4166181675d79c0157ea9bd4fcaa0b5c0319d0f1 Auto-Submitted: auto-generated Date: Mon, 24 Nov 2025 03:15:36 +0000 Message-Id: <6923cdd8.2ea7a.20416632@gitrepo.freebsd.org> The branch stable/15 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=4166181675d79c0157ea9bd4fcaa0b5c0319d0f1 commit 4166181675d79c0157ea9bd4fcaa0b5c0319d0f1 Author: Dag-Erling Smørgrav AuthorDate: 2025-11-24 02:40:37 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-11-24 03:14:27 +0000 pam_krb5: Fix manual page in MIT case * Always install the manual page as pam_krb5(8) regardless of which version we're using. * Regenerate it using pod2mdoc instead of pod2man so it doesn't claim to be part of “User Contributed Perl Documentation”. * Put the correct section number in the header and footer. * Don't cross-reference non-existent pam(7) manual page. Reviewed by: cperciva Differential Revision: https://reviews.freebsd.org/D53885 (cherry picked from commit 961b934407f09d4241cfad76a9c8833baa2650e1) --- ObsoleteFiles.inc | 3 + lib/libpam/modules/pam_krb5/Makefile | 12 +- lib/libpam/modules/pam_krb5/pam-krb5.8 | 2205 ++++++++++++++++++-------------- 3 files changed, 1281 insertions(+), 939 deletions(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index 6a61bf537561..ce6319ce0d7a 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -51,6 +51,9 @@ # xargs -n1 | sort | uniq -d; # done +# 20251121: Remove duplicate pam_krb5 manual page +OLD_FILES+=usr/share/man/man8/pam-krb5.8.gz + # 20251112: Remove pccard(4) and related OLD_FILES+=share/man/man4/pccard.4.gz OLD_FILES+=share/man/man4/pcic.4.gz diff --git a/lib/libpam/modules/pam_krb5/Makefile b/lib/libpam/modules/pam_krb5/Makefile index 0c933f8f7e57..d55f2d0b5971 100644 --- a/lib/libpam/modules/pam_krb5/Makefile +++ b/lib/libpam/modules/pam_krb5/Makefile @@ -30,6 +30,7 @@ SRCDIR= ${SRCTOP}/contrib/pam-krb5 .PATH: ${SRCDIR}/module \ ${SRCDIR}/portable \ ${SRCDIR}/pam-util \ + ${SRCDIR}/docs \ ${SRCDIR} PACKAGE= kerberos @@ -57,8 +58,8 @@ SRCS= account.c \ support.c \ vector.c -MANNODEV= pam-krb5.8 -MANNODEVLINKS= pam-krb5.8 pam_krb5.8 +MANNODEV= pam_krb5.8 +MANSRC.pam_krb5.8=pam-krb5.8 CFLAGS= -I${SRCDIR} \ -I${.CURDIR} \ @@ -74,6 +75,13 @@ pam-util_options.c: .PHONY module_options.c: .PHONY cp ${SRCDIR}/module/options.c module_options.c + +.ifdef VENDOR_IMPORT +# Regenerate the manual page from the pod source after vendor import +pam-krb5.8: pam_krb5.pod + sed -e 's/pam(7)/pam.conf(5)/' <${.ALLSRC} | \ + pod2mdoc -n pam_krb5 -s 8 >${.CURDIR}/${.TARGET} +.endif .else PACKAGE= kerberos diff --git a/lib/libpam/modules/pam_krb5/pam-krb5.8 b/lib/libpam/modules/pam_krb5/pam-krb5.8 index 3413748c7850..ad4fa5c422c4 100644 --- a/lib/libpam/modules/pam_krb5/pam-krb5.8 +++ b/lib/libpam/modules/pam_krb5/pam-krb5.8 @@ -1,1025 +1,1356 @@ -.\" -*- mode: troff; coding: utf-8 -*- -.\" Automatically generated by Pod::Man 5.0102 (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 -.\" ======================================================================== -.\" -.IX Title "PAM_KRB5 1" -.TH PAM_KRB5 1 2025-06-05 "perl v5.40.2" "User Contributed Perl Documentation" -.\" 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 -pam_krb5 \- Kerberos PAM module -.SH SYNOPSIS -.IX Header "SYNOPSIS" -.Vb 4 -\& auth sufficient pam_krb5.so minimum_uid=1000 -\& session required pam_krb5.so minimum_uid=1000 -\& account required pam_krb5.so minimum_uid=1000 -\& password sufficient pam_krb5.so minimum_uid=1000 -.Ve -.SH DESCRIPTION -.IX Header "DESCRIPTION" +.Dd November 21, 2025 +.Dt PAM_KRB5 8 +.Os +.Sh NAME +.Nm pam_krb5 +.Nd Kerberos PAM module +.Sh SYNOPSIS +.Bd -literal + auth sufficient pam_krb5.so minimum_uid=1000 + session required pam_krb5.so minimum_uid=1000 + account required pam_krb5.so minimum_uid=1000 + password sufficient pam_krb5.so minimum_uid=1000 +.Ed +.Sh DESCRIPTION The Kerberos service module for PAM, typically installed at -\&\fI/lib/security/pam_krb5.so\fR, provides functionality for the four PAM -operations: authentication, account management, session management, and -password management. \fIpam_krb5.so\fR is a shared object that is -dynamically loaded by the PAM subsystem as necessary, based on the system -PAM configuration. PAM is a system for plugging in external -authentication and session management modules so that each application -doesn't have to know the best way to check user authentication or create a -user session on that system. For details on how to configure PAM on your -system, see the PAM man page, often \fBpam\fR\|(7). -.PP +.Pa /lib/security/pam_krb5.so , +provides functionality for the four PAM operations: authentication, +account management, session management, and password management. +.Pa pam_krb5.so +is a shared object that is dynamically loaded by the PAM subsystem as +necessary, based on the system PAM configuration. +PAM is a system for plugging in external authentication and session +management modules so that each application doesn't have to know the +best way to check user authentication or create a user session on that +system. +For details on how to configure PAM on your system, see the PAM man +page, often pam.conf(5). +.Pp Here are the actions of this module when called from each group: -.IP auth 4 -.IX Item "auth" -Provides implementations of \fBpam_authenticate()\fR and \fBpam_setcred()\fR. The -former takes the username from the PAM session, prompts for the user's -password (unless configured to use an already-entered password), and then -performs a Kerberos initial authentication, storing the obtained -credentials (if successful) in a temporary ticket cache. The latter, -depending on the flags it is called with, either takes the contents of the -temporary ticket cache and writes it out to a persistent ticket cache -owned by the user or uses the temporary ticket cache to refresh an -existing user ticket cache. -.Sp +.Bl -tag -width Ds +.It auth +Provides implementations of +.Xr pam_authenticate 3 +and +.Xr pam_setcred 3 . +The former takes the username from the PAM session, prompts for the +user's password (unless configured to use an already-entered password), +and then performs a Kerberos initial authentication, storing the +obtained credentials (if successful) in a temporary ticket cache. +The latter, depending on the flags it is called with, either takes the +contents of the temporary ticket cache and writes it out to a persistent +ticket cache owned by the user or uses the temporary ticket cache to +refresh an existing user ticket cache. +.Pp Passwords as long or longer than PAM_MAX_RESP_SIZE octets (normally 512 -octets) will be rejected, since excessively long passwords can be used as -a denial of service attack. -.Sp +octets) will be rejected, since excessively long passwords can be used +as a denial of service attack. +.Pp After doing the initial authentication, the Kerberos PAM module will attempt to obtain tickets for a key in the local system keytab and then -verify those tickets. Unless this step is performed, the authentication -is vulnerable to KDC spoofing, but it requires that the system have a -local key and that the PAM module be running as a user that can read the -keytab file (normally \fI/etc/krb5.keytab\fR. You can point the Kerberos PAM -module at a different keytab with the \fIkeytab\fR option. If that keytab -cannot be read or if no keys are found in it, the default (potentially -insecure) behavior is to skip this check. If you want to instead fail -authentication if the obtained tickets cannot be checked, set -\&\f(CW\*(C`verify_ap_req_nofail\*(C'\fR to true in the [libdefaults] section of -\&\fI/etc/krb5.conf\fR. Note that this will affect applications other than -this PAM module. -.Sp +verify those tickets. +Unless this step is performed, the authentication is vulnerable to KDC +spoofing, but it requires that the system have a local key and that the +PAM module be running as a user that can read the keytab file (normally +.Pa /etc/krb5.keytab . +You can point the Kerberos PAM module at a different keytab with the +.Em keytab +option. +If that keytab cannot be read or if no keys are found in it, the default +behavior is to fail authentication. +If you want to skip this check, set the +.Qo Li allow_kdc_spoof Qc +option to true either in the [appdefaults] section of +.Pa /etc/krb5.conf +or in the PAM policy. +.Pp By default, whenever the user is authenticated, a basic authorization -check will also be done using \fBkrb5_kuserok()\fR. The default behavior of -this function is to check the user's account for a \fI.k5login\fR file and, -if one is present, ensure that the user's principal is listed in that -file. If \fI.k5login\fR is not present, the default check is to ensure that -the user's principal is in the default local realm and the user portion of -the principal matches the account name (this can be changed by configuring -a custom aname to localname mapping in \fIkrb5.conf\fR; see the Kerberos -documentation for details). This can be customized with several -configuration options; see below. -.Sp -If the username provided to PAM contains an \f(CW\*(C`@\*(C'\fR and Kerberos can, -treating the username as a principal, map it to a local account name, -\&\fBpam_authenticate()\fR will change the PAM user to that local account name. -This allows users to log in with their Kerberos principal and let Kerberos -do the mapping to an account. This can be disabled with the -\&\fIno_update_user\fR option. Be aware, however, that this facility cannot be -used with OpenSSH. OpenSSH will reject usernames that don't match local -accounts before this remapping can be done and will pass an invalid -password to the PAM module. Also be aware that several other common PAM -modules, such as pam_securetty, expect to be able to look up the user with -\&\fBgetpwnam()\fR and cannot be called before pam_krb5 when using this feature. -.Sp -When \fBpam_setcred()\fR is called to initialize a new ticket cache, the -environment variable KRB5CCNAME is set to the path to that ticket cache. -By default, the cache will be named \fI/tmp/krb5cc_UID_RANDOM\fR where UID is -the user's UID and RANDOM is six randomly-chosen letters. This can be -configured with the \fIccache\fR and \fIccache_dir\fR options. -.Sp -pam\-krb5 does not use the default ticket cache location or -\&\fIdefault_cc_name\fR in the \f(CW\*(C`[libdefaults]\*(C'\fR section of \fIkrb5.conf\fR. The -default cache location would share a cache for all sessions of the same -user, which causes confusing behavior when the user logs out of one of -multiple sessions. -.Sp -If \fBpam_setcred()\fR initializes a new ticket cache, it will also set up that -ticket cache so that it will be deleted when the PAM session is closed. -Normally, the calling program (\fBlogin\fR, \fBsshd\fR, etc.) will run the -user's shell as a sub-process, wait for it to exit, and then close the PAM -session, thereby cleaning up the user's session. -.IP session 4 -.IX Item "session" -Provides implementations of \fBpam_open_session()\fR, which is equivalent to -calling \fBpam_setcred()\fR with the PAM_ESTABLISH_CRED flag, and -\&\fBpam_close_session()\fR, which destroys the ticket cache created by -\&\fBpam_setcred()\fR. -.IP account 4 -.IX Item "account" -Provides an implementation of \fBpam_acct_mgmt()\fR. All it does is do the same -authorization check as performed by the \fBpam_authenticate()\fR implementation -described above. -.IP password 4 -.IX Item "password" -Provides an implementation of \fBpam_chauthtok()\fR, which implements password -changes. The user is prompted for their existing password (unless -configured to use an already entered one) and the PAM module then obtains -credentials for the special Kerberos principal \f(CW\*(C`kadmin/changepw\*(C'\fR. It -then prompts the user for a new password, twice to ensure that the user -entered it properly (again, unless configured to use an already entered -password), and then does a Kerberos password change. -.Sp +check will also be done using +.Xr krb5_kuserok 3 . +The default behavior of this function is to check the user's account for +a +.Pa .k5login +file and, if one is present, ensure that the user's principal is listed +in that file. +If +.Pa .k5login +is not present, the default check is to ensure that the user's principal +is in the default local realm and the user portion of the principal +matches the account name (this can be changed by configuring a custom +aname to localname mapping in +.Pa krb5.conf ; +see the Kerberos documentation for details). +This can be customized with several configuration options; see below. +.Pp +If the username provided to PAM contains an +.Qo Li @ Qc +and Kerberos can, treating the username as a principal, map it to a +local account name, +.Xr pam_authenticate 3 +will change the PAM user to that local account name. +This allows users to log in with their Kerberos principal and let +Kerberos do the mapping to an account. +This can be disabled with the +.Em no_update_user +option. +Be aware, however, that this facility cannot be used with OpenSSH. +OpenSSH will reject usernames that don't match local accounts before +this remapping can be done and will pass an invalid password to the PAM +module. +Also be aware that several other common PAM modules, such as +pam_securetty, expect to be able to look up the user with +.Xr getpwnam 3 +and cannot be called before pam_krb5 when using this feature. +.Pp +When +.Xr pam_setcred 3 +is called to initialize a new ticket cache, the environment variable +KRB5CCNAME is set to the path to that ticket cache. +By default, the cache will be named +.Pa /tmp/krb5cc_UID_RANDOM +where UID is the user's UID and RANDOM is six randomly-chosen letters. +This can be configured with the +.Em ccache +and +.Em ccache_dir +options. +.Pp +pam-krb5 does not use the default ticket cache location or +.Em default_cc_name +in the +.Qo Li [libdefaults] Qc +section of +.Pa krb5.conf . +The default cache location would share a cache for all sessions of the +same user, which causes confusing behavior when the user logs out of one +of multiple sessions. +.Pp +If +.Xr pam_setcred 3 +initializes a new ticket cache, it will also set up that ticket cache so +that it will be deleted when the PAM session is closed. +Normally, the calling program +.Pf ( Sy login , +.Sy sshd , +etc.) +will run the user's shell as a sub-process, wait for it to exit, and +then close the PAM session, thereby cleaning up the user's session. +.It session +Provides implementations of +.Xr pam_open_session 3 , +which is equivalent to calling +.Xr pam_setcred 3 +with the PAM_ESTABLISH_CRED flag, and +.Xr pam_close_session 3 , +which destroys the ticket cache created by +.Xr pam_setcred 3 . +.It account +Provides an implementation of +.Xr pam_acct_mgmt 3 . +All it does is do the same authorization check as performed by the +.Xr pam_authenticate 3 +implementation described above. +.It password +Provides an implementation of +.Xr pam_chauthtok 3 , +which implements password changes. +The user is prompted for their existing password (unless configured to +use an already entered one) and the PAM module then obtains credentials +for the special Kerberos principal +.Qo Li kadmin/changepw Qc . +It then prompts the user for a new password, twice to ensure that the +user entered it properly (again, unless configured to use an already +entered password), and then does a Kerberos password change. +.Pp Passwords as long or longer than PAM_MAX_RESP_SIZE octets (normally 512 -octets) will be rejected, since excessively long passwords can be used as -a denial of service attack. -.Sp -Unlike the normal Unix password module, this module will allow any user to -change any other user's password if they know the old password. Also, -unlike the normal Unix password module, root will always be prompted for -the old password, since root has no special status in Kerberos. (To -change passwords in Kerberos without knowing the old password, use -\&\fBkadmin\fR\|(8) instead.) -.PP +octets) will be rejected, since excessively long passwords can be used +as a denial of service attack. +.Pp +Unlike the normal Unix password module, this module will allow any user +to change any other user's password if they know the old password. +Also, unlike the normal Unix password module, root will always be +prompted for the old password, since root has no special status in +Kerberos. +(To change passwords in Kerberos without knowing the old password, use +kadmin(8) instead.) +.El +.Pp Both the account and session management calls of the Kerberos PAM module will return PAM_IGNORE if called in the context of a PAM session for a -user who did not authenticate with Kerberos (a return code of \f(CW\*(C`ignore\*(C'\fR in -the Linux PAM configuration language). -.PP +user who did not authenticate with Kerberos (a return code of +.Qo Li ignore Qc +in the Linux PAM configuration language). +.Pp Note that this module assumes the network is available in order to do a -Kerberos authentication. If the network is not available, some Kerberos -libraries have timeouts longer than the timeout imposed by the login -process. This means that using this module incautiously can make it -impossible to log on to console as root. For this reason, you should -always use the \fIignore_root\fR or \fIminimum_uid\fR options, list a local -authentication module such as \fBpam_unix\fR first with a control field of -\&\f(CW\*(C`sufficient\*(C'\fR so that the Kerberos PAM module will be skipped if local -password authentication was successful. -.PP -This is not the same PAM module as the Kerberos PAM module available from -Sourceforge, or the one included on Red Hat systems. It supports many of -the same options, has some additional options, and doesn't support some of -the options those modules do. -.SH CONFIGURATION -.IX Header "CONFIGURATION" -The Kerberos PAM module takes many options, not all of which are relevant -to every PAM group; options that are not relevant will be silently -ignored. Any of these options can be set in the PAM configuration as -arguments listed after \f(CW\*(C`pam_krb5.so\*(C'\fR. Some of the options can also be -set in the system \fIkrb5.conf\fR file; if this is possible, it will be noted -below in the option description. -.PP -To set a boolean option in the PAM configuration file, just give the name -of the option in the arguments. To set an option that takes an argument, -follow the option name with an equal sign (=) and the value, with no -separating whitespace. Whitespace in option arguments is not supported in -the PAM configuration. -.PP -To set an option for the PAM module in the system \fIkrb5.conf\fR file, put -that option in the \f(CW\*(C`[appdefaults]\*(C'\fR section. All options must be followed -by an equal sign (=) and a value, so for boolean options add \f(CW\*(C`= true\*(C'\fR. +Kerberos authentication. +If the network is not available, some Kerberos libraries have timeouts +longer than the timeout imposed by the login process. +This means that using this module incautiously can make it impossible to +log on to console as root. +For this reason, you should always use the +.Em ignore_root +or +.Em minimum_uid +options, list a local authentication module such as +.Sy pam_unix +first with a control field of +.Qo Li sufficient Qc +so that the Kerberos PAM module will be skipped if local password +authentication was successful. +.Pp +This is not the same PAM module as the Kerberos PAM module available +from Sourceforge, or the one included on Red Hat systems. +It supports many of the same options, has some additional options, and +doesn't support some of the options those modules do. +.Sh CONFIGURATION +The Kerberos PAM module takes many options, not all of which are +relevant to every PAM group; options that are not relevant will be +silently ignored. +Any of these options can be set in the PAM configuration as arguments +listed after +.Qo Li pam_krb5.so Qc . +Some of the options can also be set in the system +.Pa krb5.conf +file; if this is possible, it will be noted below in the option +description. +.Pp +To set a boolean option in the PAM configuration file, just give the +name of the option in the arguments. +To set an option that takes an argument, follow the option name with an +equal sign (=) and the value, with no separating whitespace. +Whitespace in option arguments is not supported in the PAM +configuration. +.Pp +To set an option for the PAM module in the system +.Pa krb5.conf +file, put that option in the +.Qo Li [appdefaults] Qc +section. +All options must be followed by an equal sign (=) and a value, so for +boolean options add +.Qo Li = true Qc . The Kerberos PAM module will look for options either at the top level of -the \f(CW\*(C`[appdefaults]\*(C'\fR section or in a subsection named \f(CW\*(C`pam\*(C'\fR, inside or -outside a section for the realm. For example, the following fragment of a -\&\fIkrb5.conf\fR file would set \fIforwardable\fR to true, \fIminimum_uid\fR to -1000, and set \fIignore_k5login\fR only if the realm is EXAMPLE.COM. -.PP -.Vb 8 -\& [appdefaults] -\& forwardable = true -\& pam = { -\& minimum_uid = 1000 -\& EXAMPLE.COM = { -\& ignore_k5login = true -\& } -\& } -.Ve -.PP -For more information on the syntax of \fIkrb5.conf\fR, see \fBkrb5.conf\fR\|(5). -Note that options that depend on the realm will be set only on the basis -of the default realm, either as configured in \fBkrb5.conf\fR\|(5) or as set by -the \fIrealm\fR option described below. If the user authenticates to an -account qualified with a realm, that realm will not be used when -determining which options will apply. -.PP -There is no difference to the PAM module whether options are specified at -the top level or in a \f(CW\*(C`pam\*(C'\fR section; the \f(CW\*(C`pam\*(C'\fR section is supported in -case there are options that should be set for the PAM module but not for -other applications. -.PP -If the same option is set in \fIkrb5.conf\fR and in the PAM configuration, -the latter takes precedent. Note, however, that due to the configuration -syntax, there's no way to turn off a boolean option in the PAM -configuration that was turned on in \fIkrb5.conf\fR. -.PP +the +.Qo Li [appdefaults] Qc +section or in a subsection named +.Qo Li pam Qc , +inside or outside a section for the realm. +For example, the following fragment of a +.Pa krb5.conf +file would set +.Em forwardable +to true, +.Em minimum_uid +to 1000, and set +.Em ignore_k5login +only if the realm is EXAMPLE.COM. +.Bd -literal + [appdefaults] + forwardable = true + pam = { + minimum_uid = 1000 + EXAMPLE.COM = { + ignore_k5login = true + } + } +.Ed +.Pp +For more information on the syntax of +.Pa krb5.conf , +see krb5.conf(5). Note that options that depend on the realm will be set +only on the basis of the default realm, either as configured in +krb5.conf(5) or as set by the +.Em realm +option described below. +If the user authenticates to an account qualified with a realm, that +realm will not be used when determining which options will apply. +.Pp +There is no difference to the PAM module whether options are specified +at the top level or in a +.Qo Li pam Qc +section; the +.Qo Li pam Qc +section is supported in case there are options that should be set for +the PAM module but not for other applications. +.Pp +If the same option is set in +.Pa krb5.conf +and in the PAM configuration, the latter takes precedent. +Note, however, that due to the configuration syntax, there's no way to +turn off a boolean option in the PAM configuration that was turned on in +.Pa krb5.conf . +.Pp The start of each option description is annotated with the version of -pam\-krb5 in which that option was added with the current meaning. -.SS Authorization -.IX Subsection "Authorization" -.IP alt_auth_map= 4 -.IX Item "alt_auth_map=" -[3.12] This functions similarly to the \fIsearch_k5login\fR option. The - argument is used as the authentication Kerberos principal, with -any \f(CW%s\fR in replaced with the username. If the username -contains an \f(CW\*(C`@\*(C'\fR, only the part of the username before the realm is used -to replace \f(CW%s\fR. If contains a realm, it will be used; -otherwise, the realm of the username (if any) will be appended to the -result. There is no quote removal. -.Sp +pam-krb5 in which that option was added with the current meaning. +.Ss Authorization +.Bl -tag -width Ds +.It allow_kdc_spoof +Allow authentication to succeed even if there is no host or service key +available in a keytab to authenticate the Kerberos KDC's ticket. +.It alt_auth_map= +[3.12] This functions similarly to the +.Em search_k5login +option. +The argument is used as the authentication Kerberos principal, +with any +.Qo Li %s Qc +in replaced with the username. +If the username contains an +.Qo Li @ Qc , +only the part of the username before the realm is used to replace +.Qo Li %s Qc . +If contains a realm, it will be used; otherwise, the realm of +the username (if any) will be appended to the result. +There is no quote removal. +.Pp If this option is present, the default behavior is to try this alternate principal first and then fall back to the standard behavior if it fails. The primary usage is to allow alternative principals to be used for -authentication in programs like \fBsudo\fR. Most examples will look like: -.Sp -.Vb 1 -\& alt_auth_map=%s/root -.Ve -.Sp +authentication in programs like +.Sy sudo . +Most examples will look like: +.Bd -literal + alt_auth_map=%s/root +.Ed +.Pp which attempts authentication as the root instance of the username first -and then falls back to the regular username (but see \fIforce_alt_auth\fR and -\&\fIonly_alt_auth\fR). -.Sp +and then falls back to the regular username (but see +.Em force_alt_auth +and +.Em only_alt_auth Ns ). +.Pp This option also allows a cheap way to attempt authentication in an -alternative realm first and then fall back to the primary realm. A -setting like: -.Sp -.Vb 1 -\& alt_auth_map=%s@EXAMPLE.COM -.Ve -.Sp +alternative realm first and then fall back to the primary realm. +A setting like: +.Bd -literal + alt_auth_map=%s@EXAMPLE.COM +.Ed +.Pp will attempt authentication in the EXAMPLE.COM realm first and then fall -back on the local default realm. This is more convenient than running the -module multiple times with multiple default realms set with \fIrealm\fR, but -it is very limited: only two realms can be tried, and the alternate realm -is always tried first. -.Sp -This option can be set in \f(CW\*(C`[appdefaults]\*(C'\fR in \fIkrb5.conf\fR, although -normally it doesn't make sense to do that; normally it is used in the PAM -options of configuration for specific programs. It is only applicable to -the auth and account groups. If this option is set for the auth group, be -sure to set it for the account group as well or account authorization may -fail. -.IP force_alt_auth 4 -.IX Item "force_alt_auth" -[3.12] This option is used with \fIalt_auth_map\fR and forces authentication -as the mapped principal if that principal exists in the KDC. Only if the -KDC returns principal unknown does the Kerberos PAM module fall back to -normal authentication. This can be used to force authentication with an -alternate instance. If \fIalt_auth_map\fR is not set, it has no effect. -.Sp -This option can be set in \f(CW\*(C`[appdefaults]\*(C'\fR in \fIkrb5.conf\fR and is only -applicable to the auth group. -.IP ignore_k5login 4 -.IX Item "ignore_k5login" -[2.0] Never look for a \fI.k5login\fR file in the user's home directory. -Instead, only check that the Kerberos principal maps to the local account -name. The default check is to ensure the realm matches the local realm -and the user portion of the principal matches the local account name, but -this can be customized by setting up an aname to localname mapping in -\&\fIkrb5.conf\fR. -.Sp -This option can be set in \f(CW\*(C`[appdefaults]\*(C'\fR in \fIkrb5.conf\fR and is only -applicable to the auth and account groups. -.IP ignore_root 4 -.IX Item "ignore_root" -[1.1] Do not do anything if the username is \f(CW\*(C`root\*(C'\fR. The authentication -and password calls will silently fail (allowing that status to be ignored -via a control of \f(CW\*(C`optional\*(C'\fR or \f(CW\*(C`sufficient\*(C'\fR), and the account and -session calls (including pam_setcred) will return PAM_IGNORE, telling the -PAM library to proceed as if they weren't mentioned in the PAM -configuration. This option is supported and will remain, but normally you -want to use \fIminimum_uid\fR instead. -.Sp -This option can be set in \f(CW\*(C`[appdefaults]\*(C'\fR in \fIkrb5.conf\fR. -.IP minimum_uid= 4 -.IX Item "minimum_uid=" -[2.0] Do not do anything if the authenticated account name corresponds to -a local account and that local account has a UID lower than . If +back on the local default realm. +This is more convenient than running the module multiple times with +multiple default realms set with +.Em realm , +but it is very limited: only two realms can be tried, and the alternate +realm is always tried first. +.Pp +This option can be set in +.Qo Li [appdefaults] Qc +in +.Pa krb5.conf , +although normally it doesn't make sense to do that; normally it is used +in the PAM options of configuration for specific programs. +It is only applicable to the auth and account groups. +If this option is set for the auth group, be sure to set it for the +account group as well or account authorization may fail. +.It force_alt_auth +[3.12] This option is used with +.Em alt_auth_map +and forces authentication as the mapped principal if that principal +exists in the KDC. Only if the KDC returns principal unknown does the +Kerberos PAM module fall back to normal authentication. +This can be used to force authentication with an alternate instance. +If +.Em alt_auth_map +is not set, it has no effect. +.Pp +This option can be set in +.Qo Li [appdefaults] Qc +in +.Pa krb5.conf +and is only applicable to the auth group. +.It ignore_k5login +[2.0] Never look for a +.Pa .k5login +file in the user's home directory. +Instead, only check that the Kerberos principal maps to the local +account name. +The default check is to ensure the realm matches the local realm and the +user portion of the principal matches the local account name, but this +can be customized by setting up an aname to localname mapping in +.Pa krb5.conf . +.Pp +This option can be set in +.Qo Li [appdefaults] Qc +in +.Pa krb5.conf +and is only applicable to the auth and account groups. +.It ignore_root +[1.1] Do not do anything if the username is +.Qo Li root Qc . +The authentication and password calls will silently fail (allowing that +status to be ignored via a control of +.Qo Li optional Qc +or +.Qo Li sufficient Qc Ns ), +and the account and session calls (including pam_setcred) will return +PAM_IGNORE, telling the PAM library to proceed as if they weren't +mentioned in the PAM configuration. +This option is supported and will remain, but normally you want to use +.Em minimum_uid +instead. +.Pp +This option can be set in +.Qo Li [appdefaults] Qc +in +.Pa krb5.conf . +.It minimum_uid= +[2.0] Do not do anything if the authenticated account name corresponds +to a local account and that local account has a UID lower than . If both of those conditions are true, the authentication and password calls will silently fail (allowing that status to be ignored via a control of -\&\f(CW\*(C`optional\*(C'\fR or \f(CW\*(C`sufficient\*(C'\fR), and the account and session calls -(including pam_setcred) will return PAM_IGNORE, telling the PAM library to -proceed as if they weren't mentioned in the PAM configuration. -.Sp -Using this option is highly recommended if you don't need to use Kerberos -to authenticate password logins to the root account (which isn't -recommended since Kerberos requires a network connection). It provides -some defense in depth against user principals that happen to match a -system account incorrectly authenticating as that system account. -.Sp -This option can be set in \f(CW\*(C`[appdefaults]\*(C'\fR in \fIkrb5.conf\fR. -.IP only_alt_auth 4 -.IX Item "only_alt_auth" -[3.12] This option is used with \fIalt_auth_map\fR and forces the use of the -mapped principal for authentication. It disables fallback to normal -authentication in all cases and overrides \fIsearch_k5login\fR and -\&\fIforce_alt_auth\fR. If \fIalt_auth_map\fR is not set, it has no effect and -the standard authentication behavior is used. -.Sp -This option can be set in \f(CW\*(C`[appdefaults]\*(C'\fR in \fIkrb5.conf\fR and is only -applicable to the auth group. -.IP search_k5login 4 -.IX Item "search_k5login" +.Qo Li optional Qc +or +.Qo Li sufficient Qc Ns ), +and the account and session calls (including pam_setcred) will return +PAM_IGNORE, telling the PAM library to proceed as if they weren't +mentioned in the PAM configuration. +.Pp +Using this option is highly recommended if you don't need to use +Kerberos to authenticate password logins to the root account (which +isn't recommended since Kerberos requires a network connection). +It provides some defense in depth against user principals that happen to +match a system account incorrectly authenticating as that system +account. +.Pp +This option can be set in +.Qo Li [appdefaults] Qc +in +.Pa krb5.conf . +.It only_alt_auth +[3.12] This option is used with +.Em alt_auth_map +and forces the use of the mapped principal for authentication. +It disables fallback to normal authentication in all cases and overrides +.Em search_k5login +and +.Em force_alt_auth . +If +.Em alt_auth_map +is not set, it has no effect and the standard authentication behavior is +used. +.Pp +This option can be set in +.Qo Li [appdefaults] Qc +in +.Pa krb5.conf +and is only applicable to the auth group. +.It search_k5login [2.0] Normally, the Kerberos implementation of pam_authenticate attempts -to obtain tickets for the authenticating username in the local realm. If -this option is set and the local user has a \fI.k5login\fR file in their home -directory, the module will instead open and read that \fI.k5login\fR file, -attempting to use the supplied password to authenticate as each principal -listed there in turn. If any of those authentications succeed, the user -will be successfully authenticated; otherwise, authentication will fail. -This option is useful for allowing password authentication (via console or -\&\fBsshd\fR without GSS-API support) to shared accounts. If there is no -\&\fI.k5login\fR file, the behavior is the same as normal. Using this option -requires that the user's \fI.k5login\fR file be readable at the time of -authentication. -.Sp -This option can be set in \f(CW\*(C`[appdefaults]\*(C'\fR in \fIkrb5.conf\fR and is only -applicable to the auth group. -.SS "Kerberos Behavior" -.IX Subsection "Kerberos Behavior" -.IP anon_fast 4 -.IX Item "anon_fast" +to obtain tickets for the authenticating username in the local realm. +If this option is set and the local user has a +.Pa .k5login +file in their home directory, the module will instead open and read that +.Pa .k5login +file, attempting to use the supplied password to authenticate as each +principal listed there in turn. +If any of those authentications succeed, the user will be successfully +authenticated; otherwise, authentication will fail. +This option is useful for allowing password authentication (via console +or +.Sy sshd +without GSS-API support) to shared accounts. +If there is no +.Pa .k5login +file, the behavior is the same as normal. +Using this option requires that the user's +.Pa .k5login +file be readable at the time of authentication. +.Pp +This option can be set in +.Qo Li [appdefaults] Qc +in +.Pa krb5.conf +and is only applicable to the auth group. +.El +.Ss Kerberos Behavior +.Bl -tag -width Ds +.It anon_fast [4.6] Attempt to use Flexible Authentication Secure Tunneling (FAST) by -first authenticating as the anonymous user (WELLKNOWN/ANONYMOUS) and using -its credentials as the FAST armor. This requires anonymous PKINIT be -enabled for the local realm, that PKINIT be configured on the local -system, and that the Kerberos library support FAST and anonymous PKINIT. -.Sp -FAST is a mechanism to protect Kerberos against password guessing attacks -and provide other security improvements. To work, FAST requires that a -ticket be obtained with a strong key to protect exchanges with potentially -weaker user passwords. This option uses anonymous authentication to -obtain that key and then uses it to protect the subsequent authentication. -.Sp +first authenticating as the anonymous user (WELLKNOWN/ANONYMOUS) and +using its credentials as the FAST armor. +This requires anonymous PKINIT be enabled for the local realm, that +PKINIT be configured on the local system, and that the Kerberos library +support FAST and anonymous PKINIT. +.Pp +FAST is a mechanism to protect Kerberos against password guessing +attacks and provide other security improvements. +To work, FAST requires that a ticket be obtained with a strong key to +protect exchanges with potentially weaker user passwords. +This option uses anonymous authentication to obtain that key and then +uses it to protect the subsequent authentication. +.Pp If anonymous PKINIT is not available or fails, FAST will not be used and the authentication will proceed as normal. -.Sp +.Pp To instead use an existing ticket cache for the FAST credentials, use -\&\fIfast_ccache\fR instead of this option. If both \fIfast_ccache\fR and -\&\fIanon_fast\fR are set, the ticket cache named by \fIfast_ccache\fR will be -tried first, and the Kerberos PAM module will fall back on attempting -anonymous PKINIT if that cache could not be used. -.Sp -This option can be set in \f(CW\*(C`[appdefaults]\*(C'\fR in \fIkrb5.conf\fR and is only -applicable to the auth and password groups. -.Sp -The operation is the same as if using the \fIfast_ccache\fR option, but the -cache is created and destroyed automatically. If both \fIfast_ccache\fR and -\&\fIanon_fast\fR options are used, the \fIfast_ccache\fR takes precedent and no -anonymous authentication is done. -.IP fast_ccache= 4 -.IX Item "fast_ccache=" -[4.3] The same as \fIanon_fast\fR, but use an existing Kerberos ticket cache -rather than anonymous PKINIT. This allows use of FAST with a realm that -doesn't support PKINIT or doesn't support anonymous authentication. -.Sp +.Em fast_ccache +instead of this option. +If both +.Em fast_ccache +and +.Em anon_fast +are set, the ticket cache named by +.Em fast_ccache +will be tried first, and the Kerberos PAM module will fall back on +attempting anonymous PKINIT if that cache could not be used. +.Pp +This option can be set in +.Qo Li [appdefaults] Qc +in +.Pa krb5.conf +and is only applicable to the auth and password groups. +.Pp +The operation is the same as if using the +.Em fast_ccache +option, but the cache is created and destroyed automatically. +If both *** 1391 LINES SKIPPED *** From nobody Mon Nov 24 03:15:37 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dF9ty1sTbz6HvvV for ; Mon, 24 Nov 2025 03:15:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dF9tx3tSyz3SvF for ; Mon, 24 Nov 2025 03:15:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763954137; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=O6vf58jAt44EeUlZGK00+JEqB+uVIpaxvFGCQAvKiz4=; b=FAAAzah7KyT3Q+YL1QdPFb05rwEYeAymHcG11aBhHxZf7jZAOtW+DWeO9WShFn1iJEI5NT wCXaDvv8mErxNy3Esl5jhc62wG0vQ/c1H69gJrbmO4OqV1VNGGDZmPJNsst0CRzGkBjAPN msULVzOlAnttvH35m5fvJ5qqdnX1QQ+hUXyhUgXKqUX/xv9i5D/zCsMiTM2H/D9oraEYA5 yf8PLIrz2BL9MdrrV+jgXMOcYIcnInU1jga9YOCzegHuaMGo2qFXzROP5U45m2yPJtIazH JWDzGRV1+1P4121A58uoIzoHh8DI6LvvOoo0Bl5ipr5+ctbLduTGzyJIXM4dvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763954137; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=O6vf58jAt44EeUlZGK00+JEqB+uVIpaxvFGCQAvKiz4=; b=l2bKkm9EpImbk2bLxg3xX9PM9BnfYq6Y/U0ZrJgyrqD2FtwZyrNxYMXX3PRC1aLbFXRYPl L8TxDcwMki5qnPkm1K3qXafoF+hn3yjEKOrlyAdrIZs+rqYtLohRdDCHTmhDuF0IzqsCQr Kokn1piWj6ZsGLeeY0JqPWjbDY1XHu3a9isAZDWufPYk56b49cAhNJq+74VQCMSDpTsxMP hsXKyJydVUeCUeMHFGuQ4nn4UKIlJsaryx6KHMwFmc5cMHpSy2lo+7Qe5JltiLqRz+jXzK xBQ60r6Mk3zPZeI0uJoDVQ6EMu4KpbnG8HTtXvaTKpMBLkMroQ4BbwXHme5CSA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763954137; a=rsa-sha256; cv=none; b=ElHkKQ9kgtRVQtgtHCzm2Ja/eVqP8Smy5p2GPRsd9jIBnYfpO0Te7RE+jmYblGkoCAb5DI B2Hf2MeaoXU9uQGVlmmS+JzEd9UFQR98R7C7g80YGT6oyKLB2QAC6aijLEViIEKSu9G7qe Pjua3S5oUoMu4/jGN4a4eV6uZdFUqO2KShxUy5QhRqyaBRuye42M9ce074o4Lfu0wUqbf+ hqc4Rys/hcu47b8Vj9kO9eMrJ8Q75uPn/jVIbFBBFgG65+WSjORnixoPMEDYzJ5GLSCH+M HLJdqXpsHRnxaeC8jo2JPtMrMdiGHXxw2MXEdvjm4Dq3wwuXCGk5EI/G55cBkQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dF9tx3GN9zx9W for ; Mon, 24 Nov 2025 03:15:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 30c52 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 24 Nov 2025 03:15:37 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: 1773d3d5d4c8 - stable/15 - ObsoleteFiles: Fix typo in recent entry List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 1773d3d5d4c8d641cd03dcfd92745d9220501a46 Auto-Submitted: auto-generated Date: Mon, 24 Nov 2025 03:15:37 +0000 Message-Id: <6923cdd9.30c52.3aa36c9d@gitrepo.freebsd.org> The branch stable/15 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=1773d3d5d4c8d641cd03dcfd92745d9220501a46 commit 1773d3d5d4c8d641cd03dcfd92745d9220501a46 Author: Dag-Erling Smørgrav AuthorDate: 2025-11-24 03:14:39 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-11-24 03:14:39 +0000 ObsoleteFiles: Fix typo in recent entry Fixes: feb8971db4b1 ("pcic.4: Remove stale manual") --- ObsoleteFiles.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index ce6319ce0d7a..0a35f9c33f8b 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -55,8 +55,8 @@ OLD_FILES+=usr/share/man/man8/pam-krb5.8.gz # 20251112: Remove pccard(4) and related -OLD_FILES+=share/man/man4/pccard.4.gz -OLD_FILES+=share/man/man4/pcic.4.gz +OLD_FILES+=usr/share/man/man4/pccard.4.gz +OLD_FILES+=usr/share/man/man4/pcic.4.gz # 20251006: Remove libnss_tacplus.a (it never should have been installed) OLD_FILES+=usr/lib/libnss_tacplus.a From nobody Mon Nov 24 03:59:46 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dFBsz3t9Kz6HytC for ; Mon, 24 Nov 2025 03:59:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dFBst2kcvz3Xv5 for ; Mon, 24 Nov 2025 03:59:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763956786; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xxiobMs06Gb3+ngOcayuSj3Y2WaADEHRPQnXitGuVM4=; b=jz1iVfFIDcIeGjnvW3XB4ZglYaIbE50PNCe1+aYqjTuGJ6wDvkL5IbSjpEVoKfqoMvpvBo L3f5d8CsQmy7d2qPRgliwelL0jvXk+1FwLwMtj0drwLPdXkPVvbfdHv8AFDnZdltIzhiS6 XXbsLy81O4+mq1Es4p3VvxjQi0PkMqSm66puuQDYcQAOLAe7Jcxwb/3C9hRxBu1g4J29v3 DK5ddE6N/yywZGPFjIYb0zrlHPneG/phoQhvI/udGFlFlGXk7HCfc0NpDBxztFagtwtSWH NQh+e+6ncTRRa623E31maR2QZ1Rs3yy4gtFmihNKgcGS/Wqc/OK5ZF95d5VAyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763956786; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xxiobMs06Gb3+ngOcayuSj3Y2WaADEHRPQnXitGuVM4=; b=Xmx3WV2fRjTLWYRSCP+FVAE3m+M/GeD1itK78qZzPLiXdIcbwEEfQIe7zgjahOOKzbW5V4 lZCjuV5BDOyW6seSvZxaaGbxyI8eIqbmvtRe+7PhOsl7ItB5xqNb8rf7nAAXWrkSftKNRj qiGOcIKS8hjHMgHekriKtpoKtjqDn/i7XbtG/GP/WlPlzDoXgzpGi6kLldYGpEahhGpqCd B3Irl1cBxGwa/VA1SzktXU4d1TKoEIWC3x5qoHXRRRXsDFG3r97ZRc4sujkrg5k9WT3XCj PX4jjMgukpalWSAZXNrxtjVvkOO+zk3H1kWzkKGnk1iU59IokdS+SW0a6WzcqQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763956786; a=rsa-sha256; cv=none; b=aJIUyY1epQUNqanBf904IfX33likrxxMWCZUNv2pilQ0B8oBzKCIf36gZBlxivdzY0Zrhf pNXflocmx/MlfHNb0JD6c/MqoaLbHi+Nl7G1WdQLkGUFKdrTJeYHm3GX/slyhGky/kGGap AWInsBl0gmfepdDKTD0Aptwqq81ms1a5nY6xw5f4nLGXHQtX1zDqwO+bGnmzJ9KsWvh6g+ FoCGQe54CU8Xh9PAUYwALz+7txym+W6YI766JkzJrSqNuBvpidPtnJ+4ylEi7c4UQo5M8C FMHT2I49Si56XfMPHkyep5tl41z1xkTQqV+8Ik0yCvgolAhHuyWHcOho25UmNA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dFBst28Zvzy8w for ; Mon, 24 Nov 2025 03:59:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3389a by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 24 Nov 2025 03:59:46 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: 383ad19726a8 - stable/15 - ntpd: Fix segfault when same IP on multiple interfaces List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 383ad19726a8778b9ed7440ea917253366c3a811 Auto-Submitted: auto-generated Date: Mon, 24 Nov 2025 03:59:46 +0000 Message-Id: <6923d832.3389a.72364595@gitrepo.freebsd.org> The branch stable/15 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=383ad19726a8778b9ed7440ea917253366c3a811 commit 383ad19726a8778b9ed7440ea917253366c3a811 Author: Cy Schubert AuthorDate: 2025-11-21 00:16:04 +0000 Commit: Cy Schubert CommitDate: 2025-11-24 03:59:36 +0000 ntpd: Fix segfault when same IP on multiple interfaces Use the protype socket to obtain the IP address for an error message. Using the resultant socket address, a NULL because create_interface() had failed, results in SIGSEGV. To reproduce this bug, ifconfig bridge100 create ifconfig bridge100 10.10.10.10/24 ifconfig bridge101 create ifconfig bridge101 10.10.10.10/24 ntpd -n PR: 291119 MFC after: 3 days (cherry picked from commit ac1f48b4a7be104d222dea60f1da946fcb345fb1) --- contrib/ntp/ntpd/ntp_io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/ntp/ntpd/ntp_io.c b/contrib/ntp/ntpd/ntp_io.c index 9c4f6c1553e3..97b85ee83e36 100644 --- a/contrib/ntp/ntpd/ntp_io.c +++ b/contrib/ntp/ntpd/ntp_io.c @@ -1923,7 +1923,7 @@ update_interfaces( msyslog(LOG_ERR, "cannot bind address %s", - stoa(&ep->sin)); + stoa(&ep2->sin)); } free(ep2); } From nobody Mon Nov 24 04:00:23 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dFBtc0SMSz6HypJ for ; Mon, 24 Nov 2025 04:00:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dFBtb55yTz3YGD for ; Mon, 24 Nov 2025 04:00:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763956823; h=from:from:reply-to:subject:subject: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+kLXdgcSaYM8xGagmMA7QYsCC1Zb5ean0pSxBCcZK4=; b=f/wcvYl82BnLQ6URvyV+ZLt8P2a69pTjkzN5hC26vNvP7Vyli9PNfQwqVICXmZOxrgx9k4 1JG4llmnLE+3KlgNUhUX4ZTpFFGrdjekXK28u78fbt+cuw0VpB09ldx9qeRfkWsnShqwJ6 GrHAnci05K+jJPVEgZUlnygNQE6Nx91i3ZznHIkjt1xyjACso3y3m5AJoAZyKXoGNfm+so wECI6JD0ui1WC/Q0AOYAqeVXkIrTBNOVbiigYbRC0a4+FDrHVlrq+EzaZWIxRs36DXoNLp M/sbvxMl/bGNKUKcniHE0JaKCp6kDIPVW3AL/XZQ8YMoH0mFlWYcUWcZ0Etefw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763956823; h=from:from:reply-to:subject:subject: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+kLXdgcSaYM8xGagmMA7QYsCC1Zb5ean0pSxBCcZK4=; b=aVvC+ZN9CRyRmGgDHQQfgW6jJ+eREpiwTOxJD94DDzqTo5D/CRKs1yogv0GzZwvBiz9fHT KHNo5Uq9ENxy4sjSe9y1IzaBlG3w8W+KIqpfBSXgCOYZCB8nJJ4kuRRbaKNfOO0U54ipK9 t58VUlH18+t2vhToNNFToyG7NFdfw9UF1A5ckmomKlcPg7578qUMnJ49EiTxyJHfdDhOAw ACAEmb8pLwPhryzf5Ymbxhs9LpM94F+dopuDH4ZAgoxbThOw41520AuEp/VoYGtkTSo4rY cH1fVAa1PBV9MUKCcijMV1XDhUT9dcNxJW5lCQTBmBiEZ4IKHiZs/QGWiCHcCg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763956823; a=rsa-sha256; cv=none; b=ksSypVRKh3GZVWcz34wsEq1F3mlOUzB5EtETA4ItDzi8bwW9ZVbcx0taoFIaQKpOzmU7+c 1/xYJ7XBxa3i+l5TeWYh/XEMD/dI6qZGjiahOQf9ETzVAHSnp+34Y+uF1UKKscRGhghKqF p/H+nk3MtuwLxy/gBL7o1H2YRkwR8Sf0aVWkLbUocVWQJ2cvvQ63gnfdlY3aefjK32K6GP dsJkNRyuga17kItotK8neKUvnqHOiU9eHpfXQ21aqJbM8g+n7vqDs/P7Te0pYvr0r6Jb0Y sB17fn0AF7KQoZozORWqbeNncEkVH/76mAD5DnX6ErNOFuUgJdN7kFUyLtuzjQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dFBtb4c5fzyML for ; Mon, 24 Nov 2025 04:00:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 338cb by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 24 Nov 2025 04:00:23 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: 25587b30c30a - stable/14 - ntpd: Fix segfault when same IP on multiple interfaces List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 25587b30c30afe8219c2cd34d8e3877418a3612e Auto-Submitted: auto-generated Date: Mon, 24 Nov 2025 04:00:23 +0000 Message-Id: <6923d857.338cb.6f1ebea2@gitrepo.freebsd.org> The branch stable/14 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=25587b30c30afe8219c2cd34d8e3877418a3612e commit 25587b30c30afe8219c2cd34d8e3877418a3612e Author: Cy Schubert AuthorDate: 2025-11-21 00:16:04 +0000 Commit: Cy Schubert CommitDate: 2025-11-24 04:00:14 +0000 ntpd: Fix segfault when same IP on multiple interfaces Use the protype socket to obtain the IP address for an error message. Using the resultant socket address, a NULL because create_interface() had failed, results in SIGSEGV. To reproduce this bug, ifconfig bridge100 create ifconfig bridge100 10.10.10.10/24 ifconfig bridge101 create ifconfig bridge101 10.10.10.10/24 ntpd -n PR: 291119 (cherry picked from commit ac1f48b4a7be104d222dea60f1da946fcb345fb1) --- contrib/ntp/ntpd/ntp_io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/ntp/ntpd/ntp_io.c b/contrib/ntp/ntpd/ntp_io.c index 9c4f6c1553e3..97b85ee83e36 100644 --- a/contrib/ntp/ntpd/ntp_io.c +++ b/contrib/ntp/ntpd/ntp_io.c @@ -1923,7 +1923,7 @@ update_interfaces( msyslog(LOG_ERR, "cannot bind address %s", - stoa(&ep->sin)); + stoa(&ep2->sin)); } free(ep2); } From nobody Mon Nov 24 04:00:51 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dFBv75WNnz6Hym1 for ; Mon, 24 Nov 2025 04:00:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dFBv74nkWz3YkB for ; Mon, 24 Nov 2025 04:00:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763956851; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Vha3MCOwfmXj0uVyc5dT09OjMMASdf7/fxCPXLZ5TlA=; b=wRO/B3T/OTi4zfm5Q3OEDDoqdPP4mrxHEkS6pmkxxrZa5hmeFHMUpONG9IEUnxNqX0MzWi s0FG61NTRNkolrfbm5WyY+W8zKpU0qsFTaAv0xRlOfG10jNvJNer4RTpX72WQN+xl7r8O/ r/2/IK81SaWBVqjGTTzfLZwQVlnYjn3eHGzQWPJI9cSJdw3V7n6+EXiFVzLp8BpVaek8aA I6BkU0/0WBAMX+hlnwks6L3WCGRAXTGESCU90wWi3avyzuF/mCH+Ug58fW+MM5qjlBqbRX fvYUFo8MYCZDmSiip2mGJfGP/Y4tbr3fAFZUJj97wi5xMOF/e/hmiLdWKmhNtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763956851; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Vha3MCOwfmXj0uVyc5dT09OjMMASdf7/fxCPXLZ5TlA=; b=LVSDAeasOGnSZ+f7FE1+ppbLM5yfm4M97ZPOprjiXkGhmVpciUcgzRdt08zlMtZ/EjAtzj 1qfTfpC2B0gOxh3v0tTzlfbsWphPBL4AzUP30lzSPqqHADAqGsxo0g6JQ6N0sQNrlgk82y qCB20b0Pl5BkC0rYdcvugQsZpw9XIxApe31u9JcSIWy7wJ8NkzvYzQk3T92i+kZuCVsQ+W M5LRcwAkzhUwc2qgCoPrfbs3Gfnn09s6gU2/4Y0kiL+ny+gjJJc5YUle7a4xNi9nSgKWSV 1cgwXnHos+ukHKP4A+Sc8JmmXxGkZGxdnKrvIor8a7flxSVmW5QlWL7uJb8HBQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763956851; a=rsa-sha256; cv=none; b=bNr50Q7jnCni1mpyvxf+JUOrgxZjdMfuvlPPovh/C8HGiOHw27zhyqVEOR4qiTT6SnTvU8 ALA/sc2SBRZ2Pd14Ja8/7c3cWShKVNWnyKTlRl7MZkJ6rPa0h6YKRgECK/Pr5ABEkxdqAI BMOq1xU1SM1IxK9encaVHjydsbiLBo03B6KgjVdYiE9B3NkWMX2Jicw4itRqeFrENMtYit inuCf8rnvk0oaIi6HVfN/TY+ynpx5w3CVefy/rxEWGd2s9g7zGVcJ3H60Feo5eizar8b0E l5SZ/51NNeOThXBn+qkzuu5QjIUL7D7ofoJ2rKdyKpGTA9VXsUezf5xt1ZGJfA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dFBv7443mzyNL for ; Mon, 24 Nov 2025 04:00:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 35d06 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 24 Nov 2025 04:00:51 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: d9c345c9d3ca - stable/13 - ntpd: Fix segfault when same IP on multiple interfaces List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: d9c345c9d3cac00d055ca748e43b308861529a01 Auto-Submitted: auto-generated Date: Mon, 24 Nov 2025 04:00:51 +0000 Message-Id: <6923d873.35d06.150cfe7e@gitrepo.freebsd.org> The branch stable/13 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=d9c345c9d3cac00d055ca748e43b308861529a01 commit d9c345c9d3cac00d055ca748e43b308861529a01 Author: Cy Schubert AuthorDate: 2025-11-21 00:16:04 +0000 Commit: Cy Schubert CommitDate: 2025-11-24 04:00:43 +0000 ntpd: Fix segfault when same IP on multiple interfaces Use the protype socket to obtain the IP address for an error message. Using the resultant socket address, a NULL because create_interface() had failed, results in SIGSEGV. To reproduce this bug, ifconfig bridge100 create ifconfig bridge100 10.10.10.10/24 ifconfig bridge101 create ifconfig bridge101 10.10.10.10/24 ntpd -n PR: 291119 (cherry picked from commit ac1f48b4a7be104d222dea60f1da946fcb345fb1) --- contrib/ntp/ntpd/ntp_io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/ntp/ntpd/ntp_io.c b/contrib/ntp/ntpd/ntp_io.c index 9c4f6c1553e3..97b85ee83e36 100644 --- a/contrib/ntp/ntpd/ntp_io.c +++ b/contrib/ntp/ntpd/ntp_io.c @@ -1923,7 +1923,7 @@ update_interfaces( msyslog(LOG_ERR, "cannot bind address %s", - stoa(&ep->sin)); + stoa(&ep2->sin)); } free(ep2); } From nobody Mon Nov 24 05:58:29 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dFFVw0D6Wz6J7BF for ; Mon, 24 Nov 2025 05:58:32 +0000 (UTC) (envelope-from 0100019ab47136fd-ddab7c7c-ccb0-49ae-ace6-e49eebc49cdc-000000@amazonses.com) Received: from a8-237.smtp-out.amazonses.com (a8-237.smtp-out.amazonses.com [54.240.8.237]) (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 4dFFVt5msNz3kV7 for ; Mon, 24 Nov 2025 05:58:30 +0000 (UTC) (envelope-from 0100019ab47136fd-ddab7c7c-ccb0-49ae-ace6-e49eebc49cdc-000000@amazonses.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=tarsnap.com header.s=vnqrkfnvu6csdl6mwgk5t6ix3nnepx57 header.b=arnr48G8; dkim=pass header.d=amazonses.com header.s=6gbrjpgwjskckoa6a5zn6fwqkn67xbtw header.b=DWj8tklm; dmarc=pass (policy=none) header.from=tarsnap.com; spf=pass (mx1.freebsd.org: domain of 0100019ab47136fd-ddab7c7c-ccb0-49ae-ace6-e49eebc49cdc-000000@amazonses.com designates 54.240.8.237 as permitted sender) smtp.mailfrom=0100019ab47136fd-ddab7c7c-ccb0-49ae-ace6-e49eebc49cdc-000000@amazonses.com DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=vnqrkfnvu6csdl6mwgk5t6ix3nnepx57; d=tarsnap.com; t=1763963910; h=Message-ID:Date:MIME-Version:Subject:To:References:From:In-Reply-To:Content-Type:Content-Transfer-Encoding; bh=Ew+cv23uKwrgMJRvmTV1NoiXt+yAMnpiMzmaHfc513Q=; b=arnr48G8R8NsMn50dQqF/ds0kSR/gbaKxpDTq5F32eCJdreN1Xdp5phRWOhjiv4P HUFfKWY55SPefDVj3+MYBanLSH5BttNjLulfU3u2c3e3OXzC+l+FTR8T1tvMYfI8zfD 5L/KwFyn+679phsAH4PB33XCc3/krpUGB+88JDr4= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=6gbrjpgwjskckoa6a5zn6fwqkn67xbtw; d=amazonses.com; t=1763963910; h=Message-ID:Date:MIME-Version:Subject:To:References:From:In-Reply-To:Content-Type:Content-Transfer-Encoding:Feedback-ID; bh=Ew+cv23uKwrgMJRvmTV1NoiXt+yAMnpiMzmaHfc513Q=; b=DWj8tklm/fa2OvUJX6gYxVUjKCud9YiEZjmSzB6XGIkSN0drUXeuN/Q3bfSqGefa UFeo4Kttl9lKmeL94X1ItwNFvzOqIfVgtwqYrVGgV/jHagSG9EauarHvapJPgBCIgXP ODbzjPk04irQJLfhmDIHsPlUNvnFQbbUjxuEUDSM= Message-ID: <0100019ab47136fd-ddab7c7c-ccb0-49ae-ace6-e49eebc49cdc-000000@email.amazonses.com> Date: Mon, 24 Nov 2025 05:58:29 +0000 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: b2b3d2a962eb - main - rtld-elf: move powerpc-specific auxv compat code into arch hook To: Konstantin Belousov , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <69206a47.27746.245d9408@gitrepo.freebsd.org> Content-Language: en-US From: Colin Percival Autocrypt: addr=cperciva@tarsnap.com; keydata= xsFNBGWMSrYBEACdWRqDn3B3SKO7IG0/fGHYtfs26f3Q5QeAcasy1fQLniwGQWn5rlILhbCD K/jdNoDm5Zxq20eqyffoDNObCjnHgg4tGANdi+RmDy+7CDpE789H8dss9y7Pt5DlGGAXQQnt hxush3EYS/Ctprd9UUL/lzOOLOU1aNtzB84tNrJBtcJmL7OYHfyTSNFxvedqJrrasejIQOLI t/DQ89BPzz+vsKHz7FJPXh3fsVkzLA00DJYcfkgxyABfJNA7U6yMwd4DVSdx/SsvfIDMVXnu UXCXswo106WPZbYGlZPpq0wW6iibtTerJix+8AeuwXvl9O1p8yESK4ErkIxCnmghTSz+pdzj z/6xBRkdDM9VdZ0r+CzsaNXMpDOzFuKyjaiYBdgCLljbDnXIHFcqXenrZ7Xwkm09g/M4uVSh pIUG2RYa6tsHSQoGCp3f2RZv1znfViKQFbbL83QjtPA20AhseZSYbHp1FPhXyy9J0wkGL16L e99g6gdGeIRE82BZjBjKGDkoyDPq+oDRSFl8NtzmIKy+cfz00nViqcTF4bREXEawFGhlpO0X O9q8mijI9iFB6zaPBiSdJGBL5ML5qLTNCl8Zlf4m1TBvmRTqF/lzMHVXHidDoUhpSh/y3AFZ 1KrYc27ztJQywDJPJPWPbtY8YhFLFs377gfP8WldsZjzp8nvoQARAQABzSVDb2xpbiBQZXJj aXZhbCA8Y3BlcmNpdmFAdGFyc25hcC5jb20+wsGRBBMBCAA7FiEEglY7hNBiDtwN+4ZBOJfy 4i5lrT8FAmWMSyYCGwMICwkNCAwHCwMFFQoJCAsFFgMCAQACHgUCF4AACgkQOJfy4i5lrT+i Yg/+PYyJNoFuygtV5t/skcjYmvEC93mnazEvh+x99vGYZnGKeJ8NDOF4QCUzeHquOWxDi8Zl reXyswKcrIquPxxX6+YyGe97VbvLnez3ksfzOYRj1F4qV0Rq8ZNK51+bvIrbcS3SfDaRioAk D7WWwFor8y/hSwxYkfsKbtP5PRcem20JUxuC085zqWLaKv5t5n2CBzAGMjwJaQ3tM3AXVwWJ uJaHA6ot/6fntJlmkfcyCYyyr0D6b0guRj3STbZ2hNn5o2AI+f6LJJ31s2sPFjl6rs7fORf3 hFSNOHDd2HxfVBXFdQy24ROkC4orBBz2xh9GScjxxT/hbXkfufkubFubw7n0HkvHzA3UF+Qq A8JiI3n+d7ocsP0/5BQ2sZdeqPGJgHx6RkAMuW1tJ29wSvCN1qMgFwhYkpQdfvHlociQrimU fvlRfSrBEe8o7tvIuEdpvwvCZSTJqQbVoMw8UHFE7nzyCXUSab5h6PbjakCqim13ekVO2KFF TTPcz5o5jEeUY75tzbIwcDfFbT5KqNjWy06TVdM9VEJDHSfOfxHR3kSEwZ+tT2aTvL3grsUn gFwSNcj4Cl4CRFfUw8zVZY+7O7RiMlhBqykikvUurrdGKc1Scwa0yuppdA6eVvylyTWSQGrQ +uLWtV1LUKN7ZqKJWBkLPt9nS4XZWGyBvxOHYqjOwU0EZYxKtgEQANYfgbtUMVnhjxDHhWLp g5kLHK3YW0TfJKzpXqDB7NiqxHofn4OcbZnVC3MKggcbs9o1/UtsjnlsG8550PfiYkDXvPiO RJwgbGs6MGIDK797C6cnBLQ8xwBa9SL4cl5iQFnhWmt6vwnJ+an/cm5JpYves3wL7jV09qU9 57hkHXEUcl38r4FssZzVcLKPUVTa3Un+QGRTGDGe/f4ctjMaqv0ZCM+l2ixPhf/vqESrfSLv V/+T3dmtUfXjazO3SABvsHwxgGuTTYOlKoPCaebr+BRdqm0xeIShoIlhvTI8y4clchqx/Uxg UG5X2kvU13k3DS3Q8uLE4Et9x1CcZT6WGgBZSR6R0WfD0SDnzufNnRWJ0dEPA2MtJHE7+85R Vi9j/IgZV+y5Ur+bnPkjDG1s2SVciX5v9HQ0oilcBhvx0j5lGE9hhurD9F+fCvkr4KdbCknE 6Y8ce8pCNBUoB/DqibJivOzTk9K9MGB5x0De5TerIrFiaw3/mQC9nGeO9dtE7wvDJetWeoTq 4BEaCzpufNqbkpOaTQILr4V6Gp7M6v97g83TVAwZntz/q8ptwuKQPZ2JaSFLZn7oWUpYXA5s +SIODFHLn6iMoYpBQskHQjnj4lEPJadl4qj+ZKA89iDAKsniyoFXsbJe2CPbMS1yzBxKZq6K D/jpt7BOnuHr/JrXABEBAAHCwXYEGAEIACAWIQSCVjuE0GIO3A37hkE4l/LiLmWtPwUCZYxK tgIbDAAKCRA4l/LiLmWtP3jmEACQrh9gWe8F1Tkw3m6VoHKwLc5he4tX3WpQa//soPO6iGG3 S3WPruQ46NrAaAojoOcKI9UONDO5rxG0ZTX53S+lu2EO47jbcLwOCjaEpjKpDRt9ZXBQE8Xl mtBE9Bp3W9gpjB1nE3KNM1mJYgsK0QdRpwwfh4pVgGpOj8j23I6MCK+v99zEBnpgCn2GX8W/ kctRXHqWwndHysOJtRP/zrl7dDaABF1f9efUl0LL3TD3GJ9VDz+DNOin/uK2a1hiJo8QzTRk PpfUQ2ebzDsrd1i/pOWkMSkdH+rEu4AGrXWtaBwrMyrGkL6Icb6yO+P9/z0W2wlgBf3P1YRt JPgQt/Dj3yvA/UnaV/QmuVQPjl13o24UnJGsZM8XGnNdfWBKkC1Q6VXC4QT+dyBHYH9MuE9d 6oGl8pFM1+cTfEfbM62/rRoPkF1yHMsI/903VxEvuUIKfhEZAVLFyHldooNxuchntHQP9y8J 8Ou9bWYQP7MnEn+kwSwrZkjurfPkan+xQvp6dDYnj3V0GwA5pprBMaB928VIDVOv+1PNQI3t Cvk5VPv/skq+TJRMHW7bFSt8PRa91cUf1FOLIz9APDiJOzXkwxUEHGV3zPSaUhs1JYjyBeGT wDAvtLUdjOnRhEUOwlnIrztmvyciutjJoVzKEEjj5WXnHk9L9kQ1bpAjkjTONw== In-Reply-To: <69206a47.27746.245d9408@gitrepo.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Feedback-ID: ::1.us-east-1.Lv9FVjaNvvR5llaqfLoOVbo2VxOELl7cjN0AOyXnPlk=:AmazonSES X-SES-Outgoing: 2025.11.24-54.240.8.237 X-Spamd-Bar: - X-Spamd-Result: default: False [-1.50 / 15.00]; FORGED_MUA_THUNDERBIRD_MSGID_UNKNOWN(2.50)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; DMARC_POLICY_ALLOW(-0.50)[tarsnap.com,none]; RWL_MAILSPIKE_EXCELLENT(-0.40)[54.240.8.237:from]; FORGED_SENDER(0.30)[cperciva@tarsnap.com,0100019ab47136fd-ddab7c7c-ccb0-49ae-ace6-e49eebc49cdc-000000@amazonses.com]; R_SPF_ALLOW(-0.20)[+ip4:54.240.0.0/18]; R_DKIM_ALLOW(-0.20)[tarsnap.com:s=vnqrkfnvu6csdl6mwgk5t6ix3nnepx57,amazonses.com:s=6gbrjpgwjskckoa6a5zn6fwqkn67xbtw]; MIME_GOOD(-0.10)[text/plain]; ONCE_RECEIVED(0.10)[]; ASN(0.00)[asn:14618, ipnet:54.240.8.0/21, country:US]; RCVD_IN_DNSWL_NONE(0.00)[54.240.8.237:from]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; TO_DN_SOME(0.00)[]; RCVD_COUNT_ZERO(0.00)[0]; DKIM_TRACE(0.00)[tarsnap.com:+,amazonses.com:+]; FROM_HAS_DN(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-all@FreeBSD.org]; FROM_NEQ_ENVFROM(0.00)[cperciva@tarsnap.com,0100019ab47136fd-ddab7c7c-ccb0-49ae-ace6-e49eebc49cdc-000000@amazonses.com]; DWL_DNSWL_NONE(0.00)[amazonses.com:dkim]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCPT_COUNT_THREE(0.00)[4] X-Rspamd-Queue-Id: 4dFFVt5msNz3kV7 On 11/21/25 05:33, Konstantin Belousov wrote: > commit b2b3d2a962eb00005641546fbe672b95e5d0672a > Author: Konstantin Belousov > AuthorDate: 2025-11-18 11:06:04 +0000 > Commit: Konstantin Belousov > CommitDate: 2025-11-21 13:33:17 +0000 > > rtld-elf: move powerpc-specific auxv compat code into arch hook > > Tested by: Timothy Pearson (tpearson_raptorengineering.com) > Sponsored by: The FreeBSD Foundation > MFC after: 1 week > Differential revision: https://reviews.freebsd.org/D53801 > --- a/libexec/rtld-elf/powerpc64/reloc.c > +++ b/libexec/rtld-elf/powerpc64/reloc.c > @@ -737,3 +737,29 @@ __tls_get_addr(tls_index* ti) > return (tls_get_addr_common(_tcb_get(), ti->ti_module, ti->ti_offset + > TLS_DTV_OFFSET)); > } > + > +void > +arch_fix_auxv(Elf_Auxinfo *aux, Elf_Auxinfo *aux_info[]) > +{ > + Elf_Auxinfo *aux; This does not compile: > /usr/src/libexec/rtld-elf/powerpc64/reloc.c:744:15: error: redefinition of 'aux' > 744 | Elf_Auxinfo *aux; > | ^ > /usr/src/libexec/rtld-elf/powerpc64/reloc.c:742:28: note: previous definition is here Which makes me wonder just how much testing this precise patch has received. ;-) -- Colin Percival FreeBSD Release Engineering Lead & EC2 platform maintainer Founder, Tarsnap | www.tarsnap.com | Online backups for the truly paranoid From nobody Mon Nov 24 05:59:36 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dFFX81jnqz6J6vH for ; Mon, 24 Nov 2025 05:59:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dFFX80xW3z3m6C for ; Mon, 24 Nov 2025 05:59:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763963976; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Zcd1MVbsWyekdz9KhAX/h0hRLgiKIKOyNNSm6ud1ltY=; b=uzyWZ7JWdo/vHCV/H8jWnn85r2a4TiGM3VXemUwly15Wt3zgDmq4j40LophBlI3vdAxKpV cRU8CdJIyf1isNaFF7cb2u3CY0xMTa3TDO8vOQpnM7h4dmAnYe3WgjdiKKZDmMoaj8rkNm eGPaUmJl/7fEdi7ouFj9XlORmDcpCgVss+pkrkz6Xyk69+fnfYXt7X/TRpfil9W+Eqdg6N +Ntz/vcsJrw8lVXhtUMXkIxVInc8SsQXmOCjXV/333xv9/dBGn5+czTNBWG2/K115mZTru TfH3SHwm8itlG+Ubhmf9o+ofOmxN81EnSw0GnBp0D1p0bZ1n7otDGCG2IywO6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763963976; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Zcd1MVbsWyekdz9KhAX/h0hRLgiKIKOyNNSm6ud1ltY=; b=IF/b/KEuPY4KMIVRZdspIFbaPhuApy5No8KGRs6OBNwdv+v4qTuZJNL68krPycr3mQz8eL Odl1aJgPHle0fktVdGsn2WdrywLrR54cNNmruuk9Qy1D4Jn8Vj19BjlBoTzljgGAL3ujxV p1DSswf5BPJhVAQ7MkVvIhVLJBjwiA1uCNvGKbnDzByV47m7nQ29yEoEXoICPDwane9hhf SJrnCEIfdDyfmrV94gE2IkbaFmvYMQ7Vqn2YnVS6/h2SMaLAjyLZ8tN1qpdVzVYEhRccGc 7rBhnz9YUtU+y7vcRzsoXNYKRkBHAjjQc8ehnLU0gn8QoRzd9IDplEmoP2QEoQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763963976; a=rsa-sha256; cv=none; b=iGNdEkVNmRFj2gIU3S4nlCwP8Wdwup/foRdlKqft+4gdLb3rueUMyIzbslpOv/SAeWOYqZ o72ISMVETXu5SRiU0jjy5hDKZxxaPASodCZLn1rPl1luJe5SSbGyJVhnT9/F5ya5I/8gAY uIuxm9/0znjxrL6u8CuQ6y9y/pM3eFDsmMCgFJNuvLH3qDN+9zgxCCvPdoWC7Oc0aWQh/n zDZadYOkSkAaG+0XY34idrj3RTQVoNlNQ1AQKqgOidI+7i86piuC5p16AwVQaV8ypFjcfG nyUtRClU4xkdLCALy+xbxkxXZA3oH7Xvl9LpzfM3V79q6B7dLxVdOvKQcetJeA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dFFX80S3Hz11vc for ; Mon, 24 Nov 2025 05:59:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 21308 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 24 Nov 2025 05:59:36 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: 605c437af5da - stable/15 - ypldap(8): Fix a typo in a debug message List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 605c437af5da967e257afc0a16f56bb5efd8da53 Auto-Submitted: auto-generated Date: Mon, 24 Nov 2025 05:59:36 +0000 Message-Id: <6923f448.21308.47bd1037@gitrepo.freebsd.org> The branch stable/15 has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=605c437af5da967e257afc0a16f56bb5efd8da53 commit 605c437af5da967e257afc0a16f56bb5efd8da53 Author: Gordon Bergling AuthorDate: 2025-11-19 14:31:13 +0000 Commit: Gordon Bergling CommitDate: 2025-11-24 05:58:15 +0000 ypldap(8): Fix a typo in a debug message - s/unexpect/unexpected/ (cherry picked from commit 843a4ad5814fe4344b245819880d423343b2d5ab) --- usr.sbin/ypldap/ldapclient.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/ypldap/ldapclient.c b/usr.sbin/ypldap/ldapclient.c index a246a25a9605..76918de90366 100644 --- a/usr.sbin/ypldap/ldapclient.c +++ b/usr.sbin/ypldap/ldapclient.c @@ -317,7 +317,7 @@ client_dispatch_parent(int fd, short events, void *p) client_configure(env); break; default: - log_debug("client_dispatch_parent: unexpect imsg %d", + log_debug("client_dispatch_parent: unexpected imsg %d", imsg.hdr.type); break; From nobody Mon Nov 24 05:59:37 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dFFX93Glgz6J784 for ; Mon, 24 Nov 2025 05:59:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dFFX91WB6z3lvh for ; Mon, 24 Nov 2025 05:59:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763963977; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wjmjDawYzMTThWIVunLlzm3ZUcdrJAv2cOBFVC3/vqQ=; b=LoomtlIpzCsR3kY9FDryBtFaWr8CxYsvWe85EuGS0HqMsphgKNmNNW/PpxyrZrJrEVF8s2 1gT+klu0E5fz0Ap6xc305MIQD9g+CTF3OTB4zEUOL+b1RNU9Jf7amc7diEqBK8+61k3tr0 7gYvKwUJfCKquhn8i3GWoBoHS+EKV6GttzbG9KeXgiUj8JRDkfT9xIL18UTp8eR5yo4iNF SJDtLlMZeuFniOZSxpPgD14CyQWeWyb4jmLXwB7ApE3y4gljPAgLf4VYd124ZWRh6s0vI0 m652tnPzwAJ9A8axHHFz26+/cEn8mnT635+xup2Bl64guIGjw8g+ZPE2cIbK3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763963977; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wjmjDawYzMTThWIVunLlzm3ZUcdrJAv2cOBFVC3/vqQ=; b=QDA6atN1MO8JQ3NCgAgtnXM89pWfTzAwuxt5d+D9pCmUgUgvKh+Wk52IggQ5mPHKPoAirK 5KV8uYO/vXCzRm/nbcY1WWhH0oVeZcvPz3s8994r0SkrGaISTcpKsCm7JBilFyp/fEolVF HdUmiGo/oWZKr0But/lwC9Pt7PGwBWkkb2mr+KXEBCBz7vmMe5pTRhsnSsvioN0ZfibM4F 5lNjinUsrPwHknNh0qUz7gUlSC8Q/Eu4bMJ4XzdmJOdtATr0wV1ffZRnZpmJNsvwcLK4ei roj1UJJXhYWMPMeAmqa67RTZajWxfYhkGw4rEA3ZVnbYSD+3DQnJAIkiuSUhRA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763963977; a=rsa-sha256; cv=none; b=G1jjqjxFZmrJNlRlrj4SDZQF2HHByBh7VsbkSeqsImNR7oNLrvQ7dyo7moeZjwH8dinAO3 P50j8VhXk+y/pAKJ580XU6aXxVgEQjiD1P3QpAzz25Ur5Smk0cF3aorrvdQKDuuwXedHoK tL1u3J+GImfSYjXdIijk+2gl+YkJHrIevxUewI4VpC8tGKH4FuOKooqYzpRyWhea1h8mbU upNS+4kIyNhbOX1JQZ4Qnid4VL0iOxJLfDPbq8AArohptiLi4lYXeYjOa8kuEA/g5L66Eb /4NCP5rlbKz1d/JvTz2/KqSo3mh2XcsCsEzTCeN+j4+jR6LNPWmPrBnplZzpfA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dFFX90r6nz12HP for ; Mon, 24 Nov 2025 05:59:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 22167 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 24 Nov 2025 05:59:37 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: ccbd07c46ebc - stable/15 - mpool(3): Fix a typo in statistical message List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: ccbd07c46ebc85ac27dc77a0b6b8b1295931fa08 Auto-Submitted: auto-generated Date: Mon, 24 Nov 2025 05:59:37 +0000 Message-Id: <6923f449.22167.2de552cf@gitrepo.freebsd.org> The branch stable/15 has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=ccbd07c46ebc85ac27dc77a0b6b8b1295931fa08 commit ccbd07c46ebc85ac27dc77a0b6b8b1295931fa08 Author: Gordon Bergling AuthorDate: 2025-11-19 14:16:33 +0000 Commit: Gordon Bergling CommitDate: 2025-11-24 05:58:32 +0000 mpool(3): Fix a typo in statistical message - s/cacheing/caching/ (cherry picked from commit d76ea20f99965e8f3b9dbfcb41ca148711d528bb) --- lib/libc/db/mpool/mpool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libc/db/mpool/mpool.c b/lib/libc/db/mpool/mpool.c index 9dab032134bc..1bab66d73baf 100644 --- a/lib/libc/db/mpool/mpool.c +++ b/lib/libc/db/mpool/mpool.c @@ -455,7 +455,7 @@ mpool_stat(MPOOL *mp) (void)fprintf(stderr, "%lu pages in the file\n", mp->npages); (void)fprintf(stderr, - "page size %lu, cacheing %lu pages of %lu page max cache\n", + "page size %lu, caching %lu pages of %lu page max cache\n", mp->pagesize, mp->curcache, mp->maxcache); (void)fprintf(stderr, "%lu page puts, %lu page gets, %lu page new\n", mp->pageput, mp->pageget, mp->pagenew); From nobody Mon Nov 24 05:59:38 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dFFXB2tzYz6J6xc for ; Mon, 24 Nov 2025 05:59:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dFFXB1bKQz3lvp for ; Mon, 24 Nov 2025 05:59:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763963978; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DbOSqKtMWZIwKggAGmvWx1iKKrWMtgsG7NFo8kfKsgY=; b=mHIUSvlSBNc/iEKRDFC15w2q5DST+PpNa2LmcuB5f6toN8Glmvyn27iN3NLGIeayTI5c/5 JRnDpJ9EuM/53ngHjH7dZQajSByKtOqIMIzpCqrtJ8d/U4wMdQ/+gTCch0ISbQej0fytmr QMBwlPRbrr9oiqWkNqW2BuVBRlf6iFo1i6LzdWpvldiGsDgelQ3nMfwdzXAsFMzlhIgStt W3IYuxyMkkdHtrdkvqpXM3S6G7S7o4BjRCd27Qa8lWDKygEYGB/Dn72uszoX+0Ss+DEt2G zJXMK5i1UFju50wFDyz+bT5J/seGKpl8SsV6jQdPN5dSGpzOTIuistTtarvCJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763963978; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DbOSqKtMWZIwKggAGmvWx1iKKrWMtgsG7NFo8kfKsgY=; b=phal3joRi1uWmiSQO+Puz8oz7po14Ad8hD1I9rae0v5evE2EcRD+ipKWh2FLjU88eqLNgx JRCrtE74cKMrsk97iHIfURQH/ssNx7vzpnDn39qU1Cs7lCYtdmRgCAl2RRY7DPhSRtp8QD mNEs5F2shB+irKR2r8NYrXF2dFXWya4/i6R0hh9qoa6jKfHWLr5QcYZ1g75Yv5QPjtf20L Mxe/bObGfEN+No9NI9P881YYECwgfnNWNwSSRNyvX5oMIWJfXziSc6sx8vMC21yA44qm2A d1TkH80kXhcyXEsQUdyK6bN4IVE2Zu5rsspbMsdt43sk5t9nYIv85swafaexog== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763963978; a=rsa-sha256; cv=none; b=tHeRKfdyn7CZeVBtTqB1u3gBqbw/9qnd871CRMoS6w2FgQtVQde7F1oIZh9Ng0NBMB2ntq i7RRHSyPrv6APFqk/QD4+QW8lXQ2ib445duB6zwJBUhgBE5yvAy+6w6NLiKoNXGksSFiXw ueS8BylggDq0Tv7wP79Yk9KCmFJ/QmYZL/VKVhl1Dk/OC/yTjwgZg0cAMSTN6DATGpHTgD DrY4gmgHhV9GzZ6/8UxxsEiJ1m4zmp7DxP5cAIPL+JF/Bei5FIogObc4J5FtGdI1ve9GHj A7AH+YFTQuavMr2bDlzb/tjrX8hk5oLCleo2kcIAShmA5f9KL/KXdCHniMHHLw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dFFXB18Blz12HQ for ; Mon, 24 Nov 2025 05:59:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id f64b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 24 Nov 2025 05:59:38 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: 29edde7fda13 - stable/15 - lpr(1): Fix a typo in a debug message List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 29edde7fda13a02c3654687fbad9d067c3bda5a2 Auto-Submitted: auto-generated Date: Mon, 24 Nov 2025 05:59:38 +0000 Message-Id: <6923f44a.f64b.44f1fec5@gitrepo.freebsd.org> The branch stable/15 has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=29edde7fda13a02c3654687fbad9d067c3bda5a2 commit 29edde7fda13a02c3654687fbad9d067c3bda5a2 Author: Gordon Bergling AuthorDate: 2025-11-19 14:30:02 +0000 Commit: Gordon Bergling CommitDate: 2025-11-24 05:58:48 +0000 lpr(1): Fix a typo in a debug message - s/unexpect/unexpected/ (cherry picked from commit 66d4a37bc389bf19ebf2210b0fff762baa659c32) --- usr.sbin/lpr/lpr/lpr.1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/lpr/lpr/lpr.1 b/usr.sbin/lpr/lpr/lpr.1 index 8acb9d23d9da..b73870a0f46e 100644 --- a/usr.sbin/lpr/lpr/lpr.1 +++ b/usr.sbin/lpr/lpr/lpr.1 @@ -105,7 +105,7 @@ phototypesetter commands from ancient versions of .Xr troff 1 Pq Pa ports/textproc/groff . .It Fl v The files are assumed to contain a raster image for devices like the -Benson Varian. +Benson Variant. .El .Pp These options apply to the handling of From nobody Mon Nov 24 05:59:39 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dFFXC3cVZz6J7Mq for ; Mon, 24 Nov 2025 05:59:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dFFXC2Cymz3lt7 for ; Mon, 24 Nov 2025 05:59:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763963979; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=m6FIpX40XByLNNM/ftQj6SkF+df0tnUF0D/qQiZ9HH4=; b=UiE546I5lLmLYTrhhPflRWureXmOiBRqyIbEDnIYTDOlo27kHIz1sjWEMxXvF/nx9P0Uj1 kQrZNP1EYpaZaDibBSl4+07mq7cFDQO3wXnVBYZG1DQmO/zFHySZZqle5HR4MAJrUcvo3w vB6hVwZpRjn13rJ66ZuCp0tOGA80l5y/6JQLHl9ouuz6uL9xskoZNcri6w4NpHMnCzqEyH uM2/GmfYB0vyDlFRtgCa6H5iLg/ai7Q1nXuKgkR5oWLvPtE2+upafMtYhOffHVW5M2PfCm 2ZaYAtoXD+XEUix+0nqDVobWm70ZaWZS4FWClKjHkT02xocbdy0vfZsc+g9jCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763963979; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=m6FIpX40XByLNNM/ftQj6SkF+df0tnUF0D/qQiZ9HH4=; b=N4S88uFR69OOZ+mh3Jem7eZj1nmvfmFfx3x+JQtnKATRfrJuMdClUzvKn5Szv4BxPJcXIs 2cKkKPzG4V5BCuZR3hEHuw9DTRUOprxqAKVX11jsRlZRD+VyyvzAQxuayQPcAOdOhlUt7U nBaWVPTAvqM8ZQpQQinqRdtSrW2AhuVN5dNYurmXqUPoqmQrfz0bAjzOM8k916uNgo7AYW HLy1kQeRSR2RWX0P0qSt2ycDBAJrDqf2pE6EWc9J9s5jRvJteADgv5a6tDvIVv+UHkIR0d e27j6Q81AUezPEh/LCsSr7o9UDduBsaBK0yZflzJsqDX52x9loMTVYsDsqkFvg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763963979; a=rsa-sha256; cv=none; b=G2RCFQf+lmTRIYYlM8IQqUxJ+SSNvD99RF3J3V7dJIBBviGpCIzjhmAZsmf+rSOOnfZgMp rCA9ciXxn5GMyshcwiBSZp/NFdpxW/KD9D8+ONNvbpcqQGG7uKRujo+Q5j4mMCXiHRyjd2 HAS5KeO+9+yj1yMbgVZb0ajfjjYD6G7IDuCgCfLXcrHZcvFRwqLG/DriY7CnI+SgU00vP7 J5qhX5p9x2y1d/wvRoDwlFCJQnG/rGBJRfMp8aExx6SZsgMJCxL91r5HVOB6V4/6tDIIgd LFSrPjNPe+JMZENyDWddlkIKBrpKLyB+By3durtAW3dSQXVEK23/+EqXjuicTA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dFFXC1VC1z12HR for ; Mon, 24 Nov 2025 05:59:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2152c by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 24 Nov 2025 05:59:39 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: e44d079dacc4 - stable/15 - isp.4: Fix a typo in the manual page List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: e44d079dacc46e5c6f5e5b0562ddb178ae761792 Auto-Submitted: auto-generated Date: Mon, 24 Nov 2025 05:59:39 +0000 Message-Id: <6923f44b.2152c.6925f09a@gitrepo.freebsd.org> The branch stable/15 has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=e44d079dacc46e5c6f5e5b0562ddb178ae761792 commit e44d079dacc46e5c6f5e5b0562ddb178ae761792 Author: Gordon Bergling AuthorDate: 2025-11-21 09:14:35 +0000 Commit: Gordon Bergling CommitDate: 2025-11-24 05:59:06 +0000 isp.4: Fix a typo in the manual page - s/Chanel/Channel/ (cherry picked from commit 8158b813d90f01368b2045709feee1980a323198) --- share/man/man4/isp.4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/man/man4/isp.4 b/share/man/man4/isp.4 index 6fea63fdd5d5..a8f985a59d09 100644 --- a/share/man/man4/isp.4 +++ b/share/man/man4/isp.4 @@ -85,7 +85,7 @@ It may be disabled using configuration and hint options described below. .Sh HARDWARE The .Nm -driver supports the following optical Fibre Chanel adapters: +driver supports the following optical Fibre Channel adapters: .Bl -column "Qlogic 2690/2692/2694 (2684/2692)" "Speed" "PCI-X" .It Model: Ta Speed: Ta Bus: .It Qlogic QLE2874 (2814) Ta 64Gb Ta PCIe From nobody Mon Nov 24 05:59:40 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dFFXD48XZz6J7Gw for ; Mon, 24 Nov 2025 05:59:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dFFXD2b9Rz3lqK for ; Mon, 24 Nov 2025 05:59:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763963980; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WQYmkcIslYOILc2dHrrRBOTbB1tySebrHnieATFU4s4=; b=JucsoBLdWSLnAcpl6VSD2ccS/i4ytZoGZ0VyIcV/y6hLuDQRll09tytW6sip6R5//ZI/R6 9f0t1jTqxEnus8lJpkUQJQ5OcPLX0JHnYndwIeL1yZne+c+rEk6OKSdGuWrgZiwntzXdyL EJ/V9KFUKBe8GlRzsSNJo8aMV7g/nVTL7UcSvb4vQ+yf4pbO9mBBLT0hiuEh2QHcJlz4BO DMBjx8BB88xPr06YNNx2Ro+pZHMtZgranbFm4HXYc7FTr1kQct/13u7EuYmgyBI8CAkPP4 0wdJ+R1hwN2WiQFZ2rAdD3T4a37/vapATEBIN9u56uULbtmcb77r9Ld24PxmWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763963980; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WQYmkcIslYOILc2dHrrRBOTbB1tySebrHnieATFU4s4=; b=ObTcXIS7pnKhhR6K2DHxBwQ4dUph/xFluT6Pt2S67U6dU/N5PDzId1GPDkDnSt+JtUl3oq /gU1zaIh64xwUOSg4ywLftudk6v63qpsZHpA7PFu9DMjWBbBULe4J8CiIICwYel9KpM28s xJ8WLcrS+tPkBT/91Y3CFS5EOLHphy4C/4dyitUZjaFe0ekWb5vFcJ1A0ojJnKB+JzTm/O uU3t4XGuFZEqWZFqKq+L138rBqNKh558kHUZx6G8jMeTVqTpSu+kGUw/yYi/Yaef6SOxIj um3wAd19iD6xhCyQzrku4UyZWNphy3q4tB4CmF3TlZsq2MFOYuPU0d3XcnNFuA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763963980; a=rsa-sha256; cv=none; b=olN/fAvuRnae4NswW7kHnx9Z+GQItaBd+Jh5tMm3xbKydmIADMdEjFpm2q54YTeuxvhjtD SwITpRS/ybNAR3a5YonMwJ9vfMfN4OBgWDvVQvQRLzP2kiVVh06KUtxsDnMUhpcxsO4gKQ +ZdOR/8YI/0G0nTaLKPXDRQu5UCHRZ5nQBimAEk5/Ykk0ujuVLUnd/lKGxD1SbFuldZTSt iozK3oXfxNi8qr0H9FsjTZs6F0/9gqUOt+V4FExCjmSlnJ3JOGf/ZhTeN5Q55VZGGgymjx JVZCfymjxCg+tODri/hC33uEI7gHP+PQ7eeKUoZm0wSS8kwmvMNp+4twrgqcxw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dFFXD1sd1z11qS for ; Mon, 24 Nov 2025 05:59:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id e443 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 24 Nov 2025 05:59:40 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: 7f0bb9773e27 - stable/15 - snd_dummy.4: Fix a typo in the manual page List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 7f0bb9773e27e1d6b56e3899be59444537be9400 Auto-Submitted: auto-generated Date: Mon, 24 Nov 2025 05:59:40 +0000 Message-Id: <6923f44c.e443.37e1ab7a@gitrepo.freebsd.org> The branch stable/15 has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=7f0bb9773e27e1d6b56e3899be59444537be9400 commit 7f0bb9773e27e1d6b56e3899be59444537be9400 Author: Gordon Bergling AuthorDate: 2025-11-21 09:13:39 +0000 Commit: Gordon Bergling CommitDate: 2025-11-24 05:59:22 +0000 snd_dummy.4: Fix a typo in the manual page - s/devic/device/ (cherry picked from commit bb3bfc7ca87ef9b2309bfac38aa0083727b27dc6) --- share/man/man4/snd_dummy.4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/man/man4/snd_dummy.4 b/share/man/man4/snd_dummy.4 index 172b8ed70729..5e9d8aa5dd89 100644 --- a/share/man/man4/snd_dummy.4 +++ b/share/man/man4/snd_dummy.4 @@ -60,7 +60,7 @@ Alias to the device's .Pa /dev/dsp%d file created by .Xr sound 4 . -This makes it easy for tests to open the dummy devic when there are more +This makes it easy for tests to open the dummy device when there are more devices present in the system. .El .Sh SEE ALSO From nobody Mon Nov 24 06:00:57 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dFFYk07yRz6J7KY for ; Mon, 24 Nov 2025 06:00:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dFFYj6Q89z3nZY for ; Mon, 24 Nov 2025 06:00:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763964057; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TVtZ3ci3kDA2lQMqbU3siE3U6HLMjwhgEWAKkn/8MC0=; b=SPTscso1u3ps3ZNyBExXUvOUd0Nqav+k4IH4lNkGBkavcY5OWCEAmABVU/zcbJQiCrlJLm SfwwDUIsfU3921Loccyed8jkNChOwVZ8i7OqdrpDQPfkZVveSt7+SqEZe0ZyJqDs8D+Q+h Uog9wBJSTJVtvRAMJlxn1g/w2+nrYwrBdianKptOh/hBm5h0k3XzMgEi1vbwRb87bZveK+ UIKe8H5Lw2DL55hYrxazQbjhv4bUAUCgdy19BWrSFt5HDVEiNMKSARUMYvWJHjuq+zBUhw cXRX2uXNROfvuwBIVvGVsjVdfZlKVnhjZtRC8sG84bS0Gpgikhn13nUD7hPNHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763964057; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TVtZ3ci3kDA2lQMqbU3siE3U6HLMjwhgEWAKkn/8MC0=; b=fpepbyUzjYlCkpjz481YtQ4GW/O3ul1loZq/3SGtd/w3n/DhslTa585q1JJjfif7QWam5T zS/Oy3wzat9aIdYEgDA1TRQ7dV9hIA5pJ9tI5xPoH2b7HiXLc2e6h/nn7LrW8g2AJzZxOA 7gci/odkzasP7PAer1pAjyUvqi39Oxx8ikfnRKco8mwe6skDJZHm34Wmv1T+D84md5zDJy XWAhfNmi7j9SvZRwqK6oB1DjKf18Ig4PeEBXUpeOMWIze99E/xTAh91NAZmrYRjGuOvEj6 wZpubHOe03+/7xhnkz/xHbAGMVSQsdG28eZuIHRATsQA0OoJkoWVCJDE4K+d7g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763964057; a=rsa-sha256; cv=none; b=ZklxnvLeyK7dSckaJmvXsg+mGrP2g8X3QLckh6qJaDqBMIxHFWZiR83BYOh1PNZPss79zO 7ar/j4rVaVDJbMEtiwNYmT407Ye9Gh+ksvHqZ1MJ5GqQzDh864OulEfqKwUEVzVCrVrSwW 42/lLaPdgEAefBT1RF1K4EzK9+W2XarycugRjnN9W+Bd/K2Q+GWgsKutUH8u/Jhk/7LedE oSiCU9S0kZcNyK5LpIDcCrKkexsDVY6mhrXKzQ6IgNoj7qIQo8PPja8ChHWdMczlkr1uyy u6ZEmP/s7CDDGwnYT44XHC3GjfOsWDHDrVMSMwABB0eokTmyZC3rDUPQM6uJXQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dFFYj61nYz12S2 for ; Mon, 24 Nov 2025 06:00:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 215e4 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 24 Nov 2025 06:00:57 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: 1780b0d53712 - stable/14 - ypldap(8): Fix a typo in a debug message List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 1780b0d53712184762b01835f5a2cc34db164020 Auto-Submitted: auto-generated Date: Mon, 24 Nov 2025 06:00:57 +0000 Message-Id: <6923f499.215e4.41011b4b@gitrepo.freebsd.org> The branch stable/14 has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=1780b0d53712184762b01835f5a2cc34db164020 commit 1780b0d53712184762b01835f5a2cc34db164020 Author: Gordon Bergling AuthorDate: 2025-11-19 14:31:13 +0000 Commit: Gordon Bergling CommitDate: 2025-11-24 05:59:59 +0000 ypldap(8): Fix a typo in a debug message - s/unexpect/unexpected/ (cherry picked from commit 843a4ad5814fe4344b245819880d423343b2d5ab) --- usr.sbin/ypldap/ldapclient.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/ypldap/ldapclient.c b/usr.sbin/ypldap/ldapclient.c index acd4410d939f..520bbb4d71cf 100644 --- a/usr.sbin/ypldap/ldapclient.c +++ b/usr.sbin/ypldap/ldapclient.c @@ -317,7 +317,7 @@ client_dispatch_parent(int fd, short events, void *p) client_configure(env); break; default: - log_debug("client_dispatch_parent: unexpect imsg %d", + log_debug("client_dispatch_parent: unexpected imsg %d", imsg.hdr.type); break; From nobody Mon Nov 24 06:00:58 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dFFYl2G6Wz6J7HC for ; Mon, 24 Nov 2025 06:00:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dFFYl0DFJz3nmc for ; Mon, 24 Nov 2025 06:00:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763964059; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XjBILa4PdRGS6UztPbGQ9fjQ8GEp07tuw1P7cU6gpWQ=; b=VeMTKyVTpufOPi4LQs1FAFM0l1NaPNp+ACp5ZL7H/UXqoZD5HrFooRnuvD49Ja31dZE297 nGX+r2IqtZz3UtluD4/F1VctVxryEvHzLCETnonwsLwNjMNpTua62cBaptgMi+RQgIqHbH Zvw1hLvKwCboKveU2TBj4rnkDbPJzRHL7yznw9bXxM+70TMWdouM9IG8BRRQNOCBsrxh3V aPPY20ZiwekZjHjciA9i/WFj5QitrAQr6DHLRfiLmHJHTVJGFagC2TFRE4FGuJ9qauiFnv 9tvcvMsjN2jLjKmN+YMwjhTxmep3r0hBje7ABfeZ3innM4YJLD30CvqoaxywAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763964059; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XjBILa4PdRGS6UztPbGQ9fjQ8GEp07tuw1P7cU6gpWQ=; b=azRg/njllrHitbMVqKF+2VWo9IGj7HvD7lpyXJHtvvE/MrKZrR534PJnojKHDbxRo6XntK cYFx9Nof9zknYAglHvUTbwzhV0u+f5wGXfYPYgZw79Asl0/Qy+jGxU8GMn8uHwkeZTT/ql MJJxNeELT7UrgALPxGMkFG6MOegvLLVKRHb7/QdIn9gXMajB1vaOhgSSpzn2XxtZrso5JW xDND9dncwmlflxYoR949VPO9wKGW37C5NrI7B8crOid/HIxTkcjk3+90sdNRAJm5imH8hT TuvbR38Nfpy9VVwCGhn1k2oQ8ZVngGSwTxOINRydFp6tPfy0ls6qbIE/Z/QX7Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763964059; a=rsa-sha256; cv=none; b=VBSZyE+JalQs914/zgp7zdMaFR0ecrud9JQvMQmYV5Y8oeBKWvJmOToD7Y0n97HP+9J4/9 grRdvBRw2dUw+Bg272RC2AFusrYUZ5EuSNII23360ESIKwt6QDDS4xQbLmHM63fchuNwUS fhGFTGqKSXLlZmUfvbE2dIcIuX0z+3/BorbI36mGbG7eTxhk//V2JqCkOVz43gXbS6N1lO oyS3is2Zurd4NBeomanxVtkc9H6sERpQJ2QktBsGk6R5t+QVVokOKGfKKI6neE6+6mOGdq c1B3fZ1MqCsKDyjOrNYR8DiIEu19l0ErSF3ja+XNeifYhclRanqMOKU88NP9uQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dFFYk6pyfz12jj for ; Mon, 24 Nov 2025 06:00:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2250a by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 24 Nov 2025 06:00:58 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: ad81800724fb - stable/14 - mpool(3): Fix a typo in statistical message List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: ad81800724fb078d8a99d7db82731f5e666c69ce Auto-Submitted: auto-generated Date: Mon, 24 Nov 2025 06:00:58 +0000 Message-Id: <6923f49a.2250a.8164a9a@gitrepo.freebsd.org> The branch stable/14 has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=ad81800724fb078d8a99d7db82731f5e666c69ce commit ad81800724fb078d8a99d7db82731f5e666c69ce Author: Gordon Bergling AuthorDate: 2025-11-19 14:16:33 +0000 Commit: Gordon Bergling CommitDate: 2025-11-24 06:00:11 +0000 mpool(3): Fix a typo in statistical message - s/cacheing/caching/ (cherry picked from commit d76ea20f99965e8f3b9dbfcb41ca148711d528bb) --- lib/libc/db/mpool/mpool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libc/db/mpool/mpool.c b/lib/libc/db/mpool/mpool.c index feeea517315c..c1b5eba2d463 100644 --- a/lib/libc/db/mpool/mpool.c +++ b/lib/libc/db/mpool/mpool.c @@ -458,7 +458,7 @@ mpool_stat(MPOOL *mp) (void)fprintf(stderr, "%lu pages in the file\n", mp->npages); (void)fprintf(stderr, - "page size %lu, cacheing %lu pages of %lu page max cache\n", + "page size %lu, caching %lu pages of %lu page max cache\n", mp->pagesize, mp->curcache, mp->maxcache); (void)fprintf(stderr, "%lu page puts, %lu page gets, %lu page new\n", mp->pageput, mp->pageget, mp->pagenew); From nobody Mon Nov 24 06:01:00 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dFFYm3kw9z6J7Pm for ; Mon, 24 Nov 2025 06:01:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dFFYm16gkz3nZj for ; Mon, 24 Nov 2025 06:01:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763964060; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NVrZcYw+WZhGOAWb25o9FFmSf1lfXpxa/d/Tb11XDHg=; b=mgGXN6ccbDkEK0gDb2X0EgqOOLcjkd/bpO1fCnZ2ebBB3K8B67diOC6Rprm3C2Ju85ZtzV Ovk1COg4fR09qh0/ibvTk0a1SPKzCLvZkwWSM2td+Uf4oA2v9DAPPEggFtHBzM3ULcF3Ht wZ22si+wFoo33ZXL+96wA4ynPHIF2L5RQIteppLHgEP2LVheCt/sbdLUFGAs/bWGcvgLx6 LZyCnRALkB3bRMzN8KrWXhxk0LhhhESIZ8kGFYoJQCcNxNrosav00hV9oo6/yOKeLFzfFt Na0pSRzp0i0yndLq9DE4vT3FK3QojXYFtCGbB4VxjjI56dPJdVzvlZIousS59A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763964060; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NVrZcYw+WZhGOAWb25o9FFmSf1lfXpxa/d/Tb11XDHg=; b=kOXQow/q7sdt1sRP/GEQMPQO66U51sDFTOfNXubYbiBaE8xUOWN68UcJoXl+sA8beocabQ pKvYvI0ihqPZTYsvhBwRfuI777N9Q3zmodsZCI4RwpDuB2cQSKg6NuhPm7LPgI8uNH9zfN g4fLW6geKHxHRFP1FyTaVFZVoYEBgO/2ZZBUWTAvv/FFHuj2K+WAam4hH59YwfarMej/U6 BRabR3QppWeUEvkTVoMKi9wQ4RcRfUbsBsAaweQJeqaR4Q/SDtwfHWjywsZZz9tYA0QHXp c/2ORC/U93rt/Tp6o38AAJ75fuOLrDaVtF49SIvd63fyIAcakYF6zebSNc3JXw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763964060; a=rsa-sha256; cv=none; b=PxqM7tz/Bp2/G9b149ev38g/MD55eoEnjWNj8Skc8ULnskMxLNcweAJgreniDccPHVBEaH dDBR+7OHVIWk1pfzTjApRGCY4evckCbt/A0MK5eLip+L+ZV03+IIFqmlpTI6XMx96yZDcz m4Igbim8F6j5nB8Rz+S6iAyeXnj9m/s6iyrBiGg3vZpORhHwx2m9LnRzuU3n+TUU543yIZ gy95qTgMwlgkMFEOy4mrnVslovKBZESAJ+S9YJfmHcbsWyLHt89exjH1v0tsKSu5DsWIs+ V0AovwPPX1jKcLF0m1W5TrhrioMwEpmVsStk1k/6n4GLGCDGmSMzRNnkbGkqJA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dFFYm0W4hz12Hh for ; Mon, 24 Nov 2025 06:01:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id f5e1 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 24 Nov 2025 06:01:00 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: 37432fae629f - stable/14 - lpr(1): Fix a typo in a debug message List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 37432fae629f566a6dc5ae416fe98de5a5367c26 Auto-Submitted: auto-generated Date: Mon, 24 Nov 2025 06:01:00 +0000 Message-Id: <6923f49c.f5e1.6a055994@gitrepo.freebsd.org> The branch stable/14 has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=37432fae629f566a6dc5ae416fe98de5a5367c26 commit 37432fae629f566a6dc5ae416fe98de5a5367c26 Author: Gordon Bergling AuthorDate: 2025-11-19 14:30:02 +0000 Commit: Gordon Bergling CommitDate: 2025-11-24 06:00:23 +0000 lpr(1): Fix a typo in a debug message - s/unexpect/unexpected/ (cherry picked from commit 66d4a37bc389bf19ebf2210b0fff762baa659c32) --- usr.sbin/lpr/lpr/lpr.1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/lpr/lpr/lpr.1 b/usr.sbin/lpr/lpr/lpr.1 index 8c2859aeeb6b..362fac0f8da7 100644 --- a/usr.sbin/lpr/lpr/lpr.1 +++ b/usr.sbin/lpr/lpr/lpr.1 @@ -107,7 +107,7 @@ phototypesetter commands from ancient versions of .Xr troff 1 Pq Pa ports/textproc/groff . .It Fl v The files are assumed to contain a raster image for devices like the -Benson Varian. +Benson Variant. .El .Pp These options apply to the handling of From nobody Mon Nov 24 06:01:01 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dFFYn3rGrz6J78b for ; Mon, 24 Nov 2025 06:01:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dFFYn1lffz3nXQ for ; Mon, 24 Nov 2025 06:01:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763964061; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0/pDZnw3o6cg+3fHHld8bL8lACLMUVHbd+scSKU2sG0=; b=gBSkuQwcjj5VU4FuRzQmzi1Z8U9ZmzFNcW7ZvrTzG56Y56XMUnUKM/6NDpRePSuITzHTTr pQ+DQFEngyS7/F8gs/Lq5jo7/D9VOL2Txd94nmH3Ksrk1R9zR9t/EjYkruvoaGpHjgOTsg 0zNpUuVragryX5hb2gw8qw5ZSKQdUGILePifF4X76b4G8/NLnUwcFMOQW5T+lPtabvCCaM 91bpkNNgrs7lbtnzfcl6nf6lb4rEXjvV9MK7kTkTKKb8wC2HmjFt5oHH/En4XIiFYF1adu RhR8uNDFNerU7BvIzdHnp2ilWek1dEBUOvOaHeukuKYkdw9FWg2LQy0+LO7nyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763964061; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0/pDZnw3o6cg+3fHHld8bL8lACLMUVHbd+scSKU2sG0=; b=OebNiIXzLI4L+ZP7Jzd0w/U9rH920zi3nXlbbTpbSXGVfu8rhRWj1BNg8uE5mOPsiPpKNX hTXfXiGjiUiOsOc8w/dpq6jizm8j/WRyPbYxRLQD1V6eR5xWzOeE+cFa4cGYV62y45/hn5 01XfQa8Bv4JlIoPNAxmiNoVCTUpMCcSX3Stf6h47D4NSbHuT965V9ghIrYqkIbNJlOUuab 7Q0GQSHx763OlQxzxFFH/whTd+j12VVYfhN/abuZDMN835WMkcxV5DOP9BSkvWmiDuk1S5 XJSQZy7DHEpn3Fh1DK5dZhBCuPi43SQuGxO+hK87KVM9AyvL7SuZSiujg0sncw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763964061; a=rsa-sha256; cv=none; b=u5smggSEg06bNo40F0I+RyqVH0BeLWVy/hEaVFsNp7++TuWTrz9dQxb+pgoj9eSrxVRpZF aL6DdlKG6wl8+sTvzLF0Xzrny7yuDZRdx2iY+GZa5KpGu5HgXbYgwKGbKsnkVna1tnnT3i E84LfKtV62Uu5KIZm00/HgltF3u4cGzlx2MV+jVjPaLaiG/Fr1M4UU6qcfM38EjqdpkTvl rtB/Hja0llzgMdxBKouI20gg2WpX0oKbFCnki4TJAwcWiEAnuCSgSOkVQ1vljwVdKuceTx LJto9MAIBV41WfF5KfV7q8ZTeuI8CRj6q6sLTFwU6WWVLM1N/moAWCBDgtGehw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dFFYn1J2Tz12Hk for ; Mon, 24 Nov 2025 06:01:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 22217 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 24 Nov 2025 06:01:01 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: e9a7a3e810db - stable/14 - isp.4: Fix a typo in the manual page List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: e9a7a3e810db7889f34e0826b5fd5083d66e9197 Auto-Submitted: auto-generated Date: Mon, 24 Nov 2025 06:01:01 +0000 Message-Id: <6923f49d.22217.529a3453@gitrepo.freebsd.org> The branch stable/14 has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=e9a7a3e810db7889f34e0826b5fd5083d66e9197 commit e9a7a3e810db7889f34e0826b5fd5083d66e9197 Author: Gordon Bergling AuthorDate: 2025-11-21 09:14:35 +0000 Commit: Gordon Bergling CommitDate: 2025-11-24 06:00:35 +0000 isp.4: Fix a typo in the manual page - s/Chanel/Channel/ (cherry picked from commit 8158b813d90f01368b2045709feee1980a323198) --- share/man/man4/isp.4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/man/man4/isp.4 b/share/man/man4/isp.4 index 475e088aa459..c665df0d5683 100644 --- a/share/man/man4/isp.4 +++ b/share/man/man4/isp.4 @@ -85,7 +85,7 @@ It may be disabled using configuration and hint options described below. .Sh HARDWARE The .Nm -driver supports the following optical Fibre Chanel adapters: +driver supports the following optical Fibre Channel adapters: .Bl -column "Qlogic 2690/2692/2694 (2684/2692)" "Speed" "PCI-X" .It Model: Ta Speed: Ta Bus: .It Qlogic QLE2874 (2814) Ta 64Gb Ta PCIe From nobody Mon Nov 24 06:21:50 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dFG1q0S5Jz6J8fC for ; Mon, 24 Nov 2025 06:21:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dFG1p3mVVz3qc8 for ; Mon, 24 Nov 2025 06:21:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763965310; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QlDmPHfTSEKSNuDN27847FMo4TraK91v4+gIjz/aJxM=; b=SdDUzL5emhHiYZsgoW3Vm1Fu0DeEW193Tf/MgUUvZ/v/md3G5vsDAr6SvdOdsFM4MJ8OHI Vv5UmVoZaVhYR83Gu/8vucrfWinfHfXRomHKLHTIsnn6Vh/kgywDK6I74jd3CzDa8YxHNu OLsb6lQWKNJfGd4wlcTudEy59G95smhhasLZLh07Wsgfq478k0Gj3Uj+lzkxyPSg9NyP9u grl6gd49Zb5jvaOZAlUl3f+yl4Tn2da/Kn+dC62bg9uQPzXXGfBSVWOlgwUFSDDdPO45Gd 8M5pvl9jdql+MzYOomx0v4JYa5T9nYE4qte/A86VxSVXRhHkJo3oDfB4ZtXEPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763965310; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QlDmPHfTSEKSNuDN27847FMo4TraK91v4+gIjz/aJxM=; b=so0lCYIT5glPQIJuBNnjakcoqCmo8R++Vrtv2DFqHF86745KPD0AjpRI0h2DhQnLbUh84U peG5zZhhJMOWakNwj0UXuJ+BajTMMdKMkdNiw2RttmqKrij4K+BOpRESozgooeJRJs4AhR sLGmbYtUl/ZbSwDnehAPb3xlCDP6AHbM6f+Ptq7+gCG99SLBME3Uc5ZTzxQOIGnBuCKV3e T8U35CUkQNeR3tZmlk3aZ/qqKj/GbUEQpwjfcl2eLri58E8EX7m810t1zgTsn7vOTmiS7X ifOTuAtSCvJjRg/BV99DB5kI2Gt7IZy6FbdgafRdYX24ph8gae4Fox0SzuFvzg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763965310; a=rsa-sha256; cv=none; b=SAvncm9ONvhexgtEoGaAnukvFrZwYLxawcbKiv+kDEj9IvIq9Sz7mJuoLy5ZQF3A1nh4tG aUtRzm/fp205JVfFfgDQ9OQdCE/qBe1825+M72aIVNQ6B2w7dZ9N5NwOpSDyPigLLw8fes L870EXGNAw5fkp9vNrAFSFeFh6Jxq7iPuSnoFB0GV9nSHTm5FTCoUMnsHQlMrQuRReNSzs P9yVLBxBLQTsAaM2StNjdy7iAGYcTV4VUGIltWVDcN34LTk4nMTGbzuRjvhb6DE0zPvWP3 bSDPDEDiWqXa0oE5LWn46JllGyhAJwhtmtxpru/bvmmmqukSBCSNl5CF1bZFHg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dFG1p3JWXz12fD for ; Mon, 24 Nov 2025 06:21:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2376a by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 24 Nov 2025 06:21:50 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: 815f08560050 - stable/15 - release: Ship DVD with only emacs@nox flavour List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 815f08560050e6084fac4053dc650c9d88976fd9 Auto-Submitted: auto-generated Date: Mon, 24 Nov 2025 06:21:50 +0000 Message-Id: <6923f97e.2376a.2db7e761@gitrepo.freebsd.org> The branch stable/15 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=815f08560050e6084fac4053dc650c9d88976fd9 commit 815f08560050e6084fac4053dc650c9d88976fd9 Author: Colin Percival AuthorDate: 2025-11-23 06:03:03 +0000 Commit: Colin Percival CommitDate: 2025-11-24 06:21:38 +0000 release: Ship DVD with only emacs@nox flavour Contrary to the claim made in a previous commit, removing KDE and adding all of vim and emacs results in an image which does not fit into 4.7 GB; to be specific, it lands at 4.722 GB rather than the claimed 4.689 GB. (This descrepancy resulted from doing test DVD image builds using an out-of-date tree, and became visible when the 15.0-RC3 images were built.) Limit the emacs packages shipped on the DVD to the "nox" flavor; this brings the disk image down to 4.407 GB, aka under the 4.7 GB limit for standard DVDs. Fixes: 6cc6beb4c889 ("release: Remove KDE from dvd1.iso") MFC after: 1 day (for 15.0-RC4) (cherry picked from commit c8cf5a99f82bc52849960e689442421ad5a6d412) --- release/scripts/pkg-stage.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release/scripts/pkg-stage.sh b/release/scripts/pkg-stage.sh index 083b1baa3358..c575f2d32bae 100755 --- a/release/scripts/pkg-stage.sh +++ b/release/scripts/pkg-stage.sh @@ -15,7 +15,7 @@ export PORTSDIR="${PORTSDIR:-/usr/ports}" _DVD_PACKAGES=" devel/git@lite -editors/emacs +editors/emacs@nox editors/vim misc/freebsd-doc-all net/mpd5 From nobody Mon Nov 24 06:23:21 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dFG3Y6jCkz6J8r3 for ; Mon, 24 Nov 2025 06:23:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dFG3Y5lfzz3rFY for ; Mon, 24 Nov 2025 06:23:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763965401; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lTc3WdpDkUSVEcNvUUlwKXuG5twT6NoYfeSFu27aT/A=; b=sQYkzC5EgwocB7UFq+WMpPvscAYXR5s2lRmYki53/95o76FfpxsSfZznhsuaHhOrdNAL53 k4Wkg3orSnyAT+F5Gt3YEzSP9yTRoV3j9nQrKh44RJD+wnt1g+Le2zUv3A9ak2M6e0y+pB 6n2ojC82hefpK5z+8y9cTClCB0eza/KSodTkQe3UiSkspVq9zzonETg8D3N8qhUMKKpR85 fQ0X6ma1EXqg5Y+fQYLRZi0OhZZ1r0TN233zPCYfEyOVySLqDYtZKI/sPn/82UGA990p3j iLPvck6w1o2Eqsqcm1uPQXI06/pmgC/2+9i38VglvLrb4gWwQMPKqTTearFlBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763965401; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lTc3WdpDkUSVEcNvUUlwKXuG5twT6NoYfeSFu27aT/A=; b=oZd21x1tiXm4Ihs+G2Ni7MxCex7Jo+2zGzGJ9nD21kwFe/TlepqlCvcHGSLwwx7aK+EGJQ iCvZmIDbsIFko62BJdWnD6LRBe4tsjzKyFagmA9R6qGpoeiXTCLzdl0knQ8N0Rrb/qRNuv V0b8Z3LJnRLNMxq03wgSDEhFukfCB5B4uAqOvWV6QtoI6yqBja5ugUl/XRGQrWStqzQwiB LwLzqnJYTla5yoNduVLrAIGJ7DrkvEtbpjztpyvo8NdVHZuUCm0pMWqXhwP0XMjkOUZTLm EKKMHOyp77KAYgq+L9uL+Vlm3JAlYIJ1UKUSZZkxe5j0AwEuOCvKECNOJx7/4w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763965401; a=rsa-sha256; cv=none; b=eed5AV2L8H9dS12yxMiDH7VbXBleEGhZkqZjgpf3/hafALgrVdMTp8Mx07HJ8zQBTD5mSz h1pWO/azATwmYDiX0m6GoRLy1jmxfwYtXc0yZz6ptlBATMJ+PynaHF504HnDts4WbaWz/v Rd67DPDeDYFjbbyjeH4pxFILmuC4aSMUpTd6TAUlGobzxiweNerp+SVxQXL5WZQbdapbxg VBl/e7hoeC3fbp5whcVHEZDIHML1OKcdNHtstIGRxUEbXOqDW7S1KfQgpYJP9WcYJKY4mu prRK/E7QU4O3abySPw4U5VsR+IKcAcjF+hcxenlgFy1HTiCnG3/r7cPbrt1VGw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dFG3Y53Zwz12K2 for ; Mon, 24 Nov 2025 06:23:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2450b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 24 Nov 2025 06:23:21 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: 9f43dc502cbb - releng/15.0 - release: Ship DVD with only emacs@nox flavour List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.0 X-Git-Reftype: branch X-Git-Commit: 9f43dc502cbbecf39d012d4c8a4546524ddded25 Auto-Submitted: auto-generated Date: Mon, 24 Nov 2025 06:23:21 +0000 Message-Id: <6923f9d9.2450b.67f83610@gitrepo.freebsd.org> The branch releng/15.0 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=9f43dc502cbbecf39d012d4c8a4546524ddded25 commit 9f43dc502cbbecf39d012d4c8a4546524ddded25 Author: Colin Percival AuthorDate: 2025-11-23 06:03:03 +0000 Commit: Colin Percival CommitDate: 2025-11-24 06:23:02 +0000 release: Ship DVD with only emacs@nox flavour Contrary to the claim made in a previous commit, removing KDE and adding all of vim and emacs results in an image which does not fit into 4.7 GB; to be specific, it lands at 4.722 GB rather than the claimed 4.689 GB. (This descrepancy resulted from doing test DVD image builds using an out-of-date tree, and became visible when the 15.0-RC3 images were built.) Limit the emacs packages shipped on the DVD to the "nox" flavor; this brings the disk image down to 4.407 GB, aka under the 4.7 GB limit for standard DVDs. Approved by: re (cperciva) Fixes: 6cc6beb4c889 ("release: Remove KDE from dvd1.iso") MFC after: 1 day (for 15.0-RC4) (cherry picked from commit c8cf5a99f82bc52849960e689442421ad5a6d412) (cherry picked from commit 815f08560050e6084fac4053dc650c9d88976fd9) --- release/scripts/pkg-stage.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release/scripts/pkg-stage.sh b/release/scripts/pkg-stage.sh index 083b1baa3358..c575f2d32bae 100755 --- a/release/scripts/pkg-stage.sh +++ b/release/scripts/pkg-stage.sh @@ -15,7 +15,7 @@ export PORTSDIR="${PORTSDIR:-/usr/ports}" _DVD_PACKAGES=" devel/git@lite -editors/emacs +editors/emacs@nox editors/vim misc/freebsd-doc-all net/mpd5 From nobody Mon Nov 24 06:23:22 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dFG3b2djRz6J8tv for ; Mon, 24 Nov 2025 06:23:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dFG3Z6Cwtz3rHc for ; Mon, 24 Nov 2025 06:23:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763965402; 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=fR7pPERrrCwb1PHOX6+rqKUVEJ8e/YEBiwroby0eNT8=; b=ACEUF0yuv1dfRWx+W6KSxitV3WRTRCKHGglZZO9EzcESMn3ndCJQ2jz2tCh+ShaYYYYcsE KhEsCAbKl83yDmTH1SLtFHASBHWBi0Z+bPykPciYVdue19m+teDbqrfo4jVVnNHabSbnCN VMYxVaX9uKTu2t4vQ2TsFydyeDJMlC4w8ajyPY2TbemXpq/wTCIsl9diqK/ntDTbINfWtb +qrndRg1RJtsnO5itSz5Lg+mE77MOcvkopCR2OstEeyDUA5g1Q6rq6F2ypXg+uFRCehcUb cBj5tHtIEn7RO1QdoPrmFrLdwJOjZPXtRbvFd4BV7yEsiMfz7zE54TJzv+z1aw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763965402; 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=fR7pPERrrCwb1PHOX6+rqKUVEJ8e/YEBiwroby0eNT8=; b=sI+KsGr05v16kUGTinstCpGUNCYxFB5ZLPtBO7F1dTM4YQuC8Md+B7V8kjn+O+1QH6essE JYVR41GT1tiLYyEEvjmMb9qU7+Obi5LIPkEkdFOlI46tsgC/C2hPqYYbLVrjMRK1BgsX21 KeuQ1d2Zq/GeNejJWw74ITC9Mf/Aj3ekazhliBI1SI7OKkjtPQ8oBOnfitlQkvfgTdTnzQ 0sAPMpEReyjLJKa9q3mXeK8+5eKQvBDjzMycm2KCs0tcPeQ0kvyLp4HzI53BI3l4+WlXlJ alx2CaDjGLDzBcNiS3VYI8yas8L0mROcit4kTCz4evBouaa6LK9NBE5lVW6bCw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763965402; a=rsa-sha256; cv=none; b=ncm7PSCk+aUdasXXtnX9FJakDoxE+rE2ppJg/ghoDgO+TbbA5cy7hKgRf6qXnVuV9RU64V 1zrM3kEg6L+0/4X5rSzC6ajGxcdjTpksvjucmvhOFSO3fjPphNbyCvtLMWDzvxqf2FxMWI 3371188UiAfLro1LnjfGNWr4R2knHBxZLv6BDncEK+WXJ86SHFrUY1ldgDkTh6LUVufgLC pf6yJCjKHiUEH9OAKUbXm+j2oD8e2lncVdO/yBzBY8j7pTJ7uS6zdgOYR0kKfC2L+fCrbd v0pNO+MlsY+HXndtjTPmJzLawxtsq/JuznDoPFpGbq74ydlLl2JqYHsw4u9Ojw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dFG3Z5mVQz12jH for ; Mon, 24 Nov 2025 06:23:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2237e by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 24 Nov 2025 06:23:22 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav From: Colin Percival Subject: git: 8fdafb396677 - releng/15.0 - pam_krb5: Restore allow_kdc_spoof option List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.0 X-Git-Reftype: branch X-Git-Commit: 8fdafb396677a616c4899b1d1de29a3aa611dfa6 Auto-Submitted: auto-generated Date: Mon, 24 Nov 2025 06:23:22 +0000 Message-Id: <6923f9da.2237e.48dfcd6f@gitrepo.freebsd.org> The branch releng/15.0 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=8fdafb396677a616c4899b1d1de29a3aa611dfa6 commit 8fdafb396677a616c4899b1d1de29a3aa611dfa6 Author: Dag-Erling Smørgrav AuthorDate: 2025-11-24 02:40:29 +0000 Commit: Colin Percival CommitDate: 2025-11-24 06:23:08 +0000 pam_krb5: Restore allow_kdc_spoof option Not only does the new pam_krb5 module not have the same allow_kdc_spoof option that the old one had, its behavior in this matter defaults to insecure. Reimplement allow_kdc_spoof and switch the default back. Approved by: re (cperciva) Reviewed by: cy Differential Revision: https://reviews.freebsd.org/D53884 (cherry picked from commit fe5c8baf25a5b40285c3ef85b69391d591e4a76c) (cherry picked from commit 2eb030d1c8f1f307c2e0570538633d4e0822a4ff) --- contrib/pam-krb5/docs/pam_krb5.pod | 15 +++++++++------ contrib/pam-krb5/module/auth.c | 6 ++++++ contrib/pam-krb5/module/internal.h | 3 +++ contrib/pam-krb5/module/options.c | 3 +++ 4 files changed, 21 insertions(+), 6 deletions(-) diff --git a/contrib/pam-krb5/docs/pam_krb5.pod b/contrib/pam-krb5/docs/pam_krb5.pod index 024584dfd4cd..f352af71b553 100644 --- a/contrib/pam-krb5/docs/pam_krb5.pod +++ b/contrib/pam-krb5/docs/pam_krb5.pod @@ -57,12 +57,10 @@ is vulnerable to KDC spoofing, but it requires that the system have a local key and that the PAM module be running as a user that can read the keytab file (normally F. You can point the Kerberos PAM module at a different keytab with the I option. If that keytab -cannot be read or if no keys are found in it, the default (potentially -insecure) behavior is to skip this check. If you want to instead fail -authentication if the obtained tickets cannot be checked, set -C to true in the [libdefaults] section of -F. Note that this will affect applications other than -this PAM module. +cannot be read or if no keys are found in it, the default behavior is to +fail authentication. If you want to skip this check, set the +C option to true either in the [appdefaults] section of +F or in the PAM policy. By default, whenever the user is authenticated, a basic authorization check will also be done using krb5_kuserok(). The default behavior of @@ -218,6 +216,11 @@ pam-krb5 in which that option was added with the current meaning. =over 4 +=item allow_kdc_spoof + +Allow authentication to succeed even if there is no host or service +key available in a keytab to authenticate the Kerberos KDC's ticket. + =item alt_auth_map= [3.12] This functions similarly to the I option. The diff --git a/contrib/pam-krb5/module/auth.c b/contrib/pam-krb5/module/auth.c index 065ce97b6596..46f2be791000 100644 --- a/contrib/pam-krb5/module/auth.c +++ b/contrib/pam-krb5/module/auth.c @@ -696,6 +696,12 @@ verify_creds(struct pam_args *args, krb5_creds *creds) if (cursor_valid) krb5_kt_end_seq_get(c, keytab, &cursor); } +#ifdef __FreeBSD__ + if (args->config->allow_kdc_spoof) + opts.flags &= ~KRB5_VERIFY_INIT_CREDS_OPT_AP_REQ_NOFAIL; + else + opts.flags |= KRB5_VERIFY_INIT_CREDS_OPT_AP_REQ_NOFAIL; +#endif /* __FreeBSD__ */ retval = krb5_verify_init_creds(c, creds, princ, keytab, NULL, &opts); if (retval != 0) putil_err_krb5(args, retval, "credential verification failed"); diff --git a/contrib/pam-krb5/module/internal.h b/contrib/pam-krb5/module/internal.h index f3ea30139815..c797f7a56cd3 100644 --- a/contrib/pam-krb5/module/internal.h +++ b/contrib/pam-krb5/module/internal.h @@ -62,6 +62,9 @@ struct pam_config { long minimum_uid; /* Ignore users below this UID. */ bool only_alt_auth; /* Alt principal must be used. */ bool search_k5login; /* Try password with each line of .k5login. */ +#ifdef __FreeBSD__ + bool allow_kdc_spoof;/* Allow auth even if KDC cannot be verified */ +#endif /* __FreeBSD__ */ /* Kerberos behavior. */ char *fast_ccache; /* Cache containing armor ticket. */ diff --git a/contrib/pam-krb5/module/options.c b/contrib/pam-krb5/module/options.c index 799b3a33e168..0118fb451af6 100644 --- a/contrib/pam-krb5/module/options.c +++ b/contrib/pam-krb5/module/options.c @@ -30,6 +30,9 @@ #define K(name) (#name), offsetof(struct pam_config, name) /* clang-format off */ static const struct option options[] = { +#ifdef __FreeBSD__ + { K(allow_kdc_spoof), true, BOOL (false) }, +#endif /* __FreeBSD__ */ { K(alt_auth_map), true, STRING (NULL) }, { K(anon_fast), true, BOOL (false) }, { K(banner), true, STRING ("Kerberos") }, From nobody Mon Nov 24 06:23:23 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dFG3c113Jz6J8cd for ; Mon, 24 Nov 2025 06:23:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dFG3b6vSXz3rQR for ; Mon, 24 Nov 2025 06:23:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763965403; 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=IhSB14yF5Y9HnOYMvAhdCbuSpyB55K54LUb7FVHlb9M=; b=Ei8KXBFscUnTbIY6tzm4fQx28p8p/ah0BBGDECphKY7JuG2h94dyxTeexh+nBH/1z6MAPS tpmYha05q/fNYQX4n5AwO0AmgdwHF7OcIWA6TLoubtReEJwNgCX+x+XP5Uf2yX7WAANciz kclEe34ZuNb2pzL8tlsW9NFyI9YoKOmM0qwhasGsucDJBFlAx3DGJ2rpFWnTN4qY486/BE n+fa1Aye08S3S4mlU8y/+QeYc/bxPlCY4FP32VHCc+2sNwAIgvPFoNXgOzqFBcYJmUoSq5 UAAaNqekuKqY3AdUZUKmpIZ035vMb7v4oRghGqY6ngFWpsgNlyIISbnsScMxGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763965403; 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=IhSB14yF5Y9HnOYMvAhdCbuSpyB55K54LUb7FVHlb9M=; b=IQV0ORQbgUatl0eSn2uQnuXqwAOfJTS1ohjs4buVMMFdFbYu0HagpR11czlnXy3vDltKgf RV4A2atYF2ogfjQl3RxS0UtHSxm8JXbyTgaXpOQhrD/Mqv9QiT876AJVJQIokYxHqJcY99 i1AtzbojyCnlq5jn6jJnACJaaGt/N6z0gaV8usty7cEBB6scl0R5kSxevbvNFy3ARM4s/Y n5r9mUcwxBKUABZ/wzmHsFDco+dncmpqWTlIcPThwXMiXuFTbwBe+R+ks1DD7xkxs6BuTm MMXz8UOkoH+L7aV0bJeio6yUdGrqMpvC/T3UmXNWr4FHy9QQjwHJTGa/q3NIrQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763965403; a=rsa-sha256; cv=none; b=MitKXj8L/EdLIdt1rof5k6CAnbM1jo7xubyq/bbx9G9fE6CklwAf8+suuFKnXyOD/+9hL6 wEo21wkHGwE4HMY264Nzr9a7f4oXvlaqgQA4DWyVfFpOd8RQfHdb10FyWBS/ZAXwKOrU4e Fy2sLEvGz7e09ThAQProy9N4SkJhHSiCNtawFyRpGQNOn9IInAbaz4M0lJpu/2FrjOrYJw yU/wvQzQSwU1UIWJga8RNfgl7Xf5RYC/D6bv1eOHLzUeOsmxqpvUaUlQF6VIZQwboV1fL1 2wpEWb8X8MgK8tlPOFq6yVK2kuI0m0PyGV8dz8RBoViwd9TMNYkdw6TDnDENCw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dFG3b6SS0z132y for ; Mon, 24 Nov 2025 06:23:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 243d3 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 24 Nov 2025 06:23:23 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav From: Colin Percival Subject: git: bada4c39b20c - releng/15.0 - pam_krb5: Fix manual page in MIT case List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.0 X-Git-Reftype: branch X-Git-Commit: bada4c39b20c4378b485cff061c3b8da688e1621 Auto-Submitted: auto-generated Date: Mon, 24 Nov 2025 06:23:23 +0000 Message-Id: <6923f9db.243d3.1faf266a@gitrepo.freebsd.org> The branch releng/15.0 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=bada4c39b20c4378b485cff061c3b8da688e1621 commit bada4c39b20c4378b485cff061c3b8da688e1621 Author: Dag-Erling Smørgrav AuthorDate: 2025-11-24 02:40:37 +0000 Commit: Colin Percival CommitDate: 2025-11-24 06:23:11 +0000 pam_krb5: Fix manual page in MIT case * Always install the manual page as pam_krb5(8) regardless of which version we're using. * Regenerate it using pod2mdoc instead of pod2man so it doesn't claim to be part of “User Contributed Perl Documentation”. * Put the correct section number in the header and footer. * Don't cross-reference non-existent pam(7) manual page. Approved by: re (cperciva) Reviewed by: cperciva Differential Revision: https://reviews.freebsd.org/D53885 (cherry picked from commit 961b934407f09d4241cfad76a9c8833baa2650e1) (cherry picked from commit 4166181675d79c0157ea9bd4fcaa0b5c0319d0f1) --- ObsoleteFiles.inc | 3 + lib/libpam/modules/pam_krb5/Makefile | 12 +- lib/libpam/modules/pam_krb5/pam-krb5.8 | 2205 ++++++++++++++++++-------------- 3 files changed, 1281 insertions(+), 939 deletions(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index 6cbec0879b70..2032434f5323 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -51,6 +51,9 @@ # xargs -n1 | sort | uniq -d; # done +# 20251121: Remove duplicate pam_krb5 manual page +OLD_FILES+=usr/share/man/man8/pam-krb5.8.gz + # 20251112: Remove pccard(4) and related OLD_FILES+=share/man/man4/pccard.4.gz OLD_FILES+=share/man/man4/pcic.4.gz diff --git a/lib/libpam/modules/pam_krb5/Makefile b/lib/libpam/modules/pam_krb5/Makefile index 0c933f8f7e57..d55f2d0b5971 100644 --- a/lib/libpam/modules/pam_krb5/Makefile +++ b/lib/libpam/modules/pam_krb5/Makefile @@ -30,6 +30,7 @@ SRCDIR= ${SRCTOP}/contrib/pam-krb5 .PATH: ${SRCDIR}/module \ ${SRCDIR}/portable \ ${SRCDIR}/pam-util \ + ${SRCDIR}/docs \ ${SRCDIR} PACKAGE= kerberos @@ -57,8 +58,8 @@ SRCS= account.c \ support.c \ vector.c -MANNODEV= pam-krb5.8 -MANNODEVLINKS= pam-krb5.8 pam_krb5.8 +MANNODEV= pam_krb5.8 +MANSRC.pam_krb5.8=pam-krb5.8 CFLAGS= -I${SRCDIR} \ -I${.CURDIR} \ @@ -74,6 +75,13 @@ pam-util_options.c: .PHONY module_options.c: .PHONY cp ${SRCDIR}/module/options.c module_options.c + +.ifdef VENDOR_IMPORT +# Regenerate the manual page from the pod source after vendor import +pam-krb5.8: pam_krb5.pod + sed -e 's/pam(7)/pam.conf(5)/' <${.ALLSRC} | \ + pod2mdoc -n pam_krb5 -s 8 >${.CURDIR}/${.TARGET} +.endif .else PACKAGE= kerberos diff --git a/lib/libpam/modules/pam_krb5/pam-krb5.8 b/lib/libpam/modules/pam_krb5/pam-krb5.8 index 3413748c7850..ad4fa5c422c4 100644 --- a/lib/libpam/modules/pam_krb5/pam-krb5.8 +++ b/lib/libpam/modules/pam_krb5/pam-krb5.8 @@ -1,1025 +1,1356 @@ -.\" -*- mode: troff; coding: utf-8 -*- -.\" Automatically generated by Pod::Man 5.0102 (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 -.\" ======================================================================== -.\" -.IX Title "PAM_KRB5 1" -.TH PAM_KRB5 1 2025-06-05 "perl v5.40.2" "User Contributed Perl Documentation" -.\" 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 -pam_krb5 \- Kerberos PAM module -.SH SYNOPSIS -.IX Header "SYNOPSIS" -.Vb 4 -\& auth sufficient pam_krb5.so minimum_uid=1000 -\& session required pam_krb5.so minimum_uid=1000 -\& account required pam_krb5.so minimum_uid=1000 -\& password sufficient pam_krb5.so minimum_uid=1000 -.Ve -.SH DESCRIPTION -.IX Header "DESCRIPTION" +.Dd November 21, 2025 +.Dt PAM_KRB5 8 +.Os +.Sh NAME +.Nm pam_krb5 +.Nd Kerberos PAM module +.Sh SYNOPSIS +.Bd -literal + auth sufficient pam_krb5.so minimum_uid=1000 + session required pam_krb5.so minimum_uid=1000 + account required pam_krb5.so minimum_uid=1000 + password sufficient pam_krb5.so minimum_uid=1000 +.Ed +.Sh DESCRIPTION The Kerberos service module for PAM, typically installed at -\&\fI/lib/security/pam_krb5.so\fR, provides functionality for the four PAM -operations: authentication, account management, session management, and -password management. \fIpam_krb5.so\fR is a shared object that is -dynamically loaded by the PAM subsystem as necessary, based on the system -PAM configuration. PAM is a system for plugging in external -authentication and session management modules so that each application -doesn't have to know the best way to check user authentication or create a -user session on that system. For details on how to configure PAM on your -system, see the PAM man page, often \fBpam\fR\|(7). -.PP +.Pa /lib/security/pam_krb5.so , +provides functionality for the four PAM operations: authentication, +account management, session management, and password management. +.Pa pam_krb5.so +is a shared object that is dynamically loaded by the PAM subsystem as +necessary, based on the system PAM configuration. +PAM is a system for plugging in external authentication and session +management modules so that each application doesn't have to know the +best way to check user authentication or create a user session on that +system. +For details on how to configure PAM on your system, see the PAM man +page, often pam.conf(5). +.Pp Here are the actions of this module when called from each group: -.IP auth 4 -.IX Item "auth" -Provides implementations of \fBpam_authenticate()\fR and \fBpam_setcred()\fR. The -former takes the username from the PAM session, prompts for the user's -password (unless configured to use an already-entered password), and then -performs a Kerberos initial authentication, storing the obtained -credentials (if successful) in a temporary ticket cache. The latter, -depending on the flags it is called with, either takes the contents of the -temporary ticket cache and writes it out to a persistent ticket cache -owned by the user or uses the temporary ticket cache to refresh an -existing user ticket cache. -.Sp +.Bl -tag -width Ds +.It auth +Provides implementations of +.Xr pam_authenticate 3 +and +.Xr pam_setcred 3 . +The former takes the username from the PAM session, prompts for the +user's password (unless configured to use an already-entered password), +and then performs a Kerberos initial authentication, storing the +obtained credentials (if successful) in a temporary ticket cache. +The latter, depending on the flags it is called with, either takes the +contents of the temporary ticket cache and writes it out to a persistent +ticket cache owned by the user or uses the temporary ticket cache to +refresh an existing user ticket cache. +.Pp Passwords as long or longer than PAM_MAX_RESP_SIZE octets (normally 512 -octets) will be rejected, since excessively long passwords can be used as -a denial of service attack. -.Sp +octets) will be rejected, since excessively long passwords can be used +as a denial of service attack. +.Pp After doing the initial authentication, the Kerberos PAM module will attempt to obtain tickets for a key in the local system keytab and then -verify those tickets. Unless this step is performed, the authentication -is vulnerable to KDC spoofing, but it requires that the system have a -local key and that the PAM module be running as a user that can read the -keytab file (normally \fI/etc/krb5.keytab\fR. You can point the Kerberos PAM -module at a different keytab with the \fIkeytab\fR option. If that keytab -cannot be read or if no keys are found in it, the default (potentially -insecure) behavior is to skip this check. If you want to instead fail -authentication if the obtained tickets cannot be checked, set -\&\f(CW\*(C`verify_ap_req_nofail\*(C'\fR to true in the [libdefaults] section of -\&\fI/etc/krb5.conf\fR. Note that this will affect applications other than -this PAM module. -.Sp +verify those tickets. +Unless this step is performed, the authentication is vulnerable to KDC +spoofing, but it requires that the system have a local key and that the +PAM module be running as a user that can read the keytab file (normally +.Pa /etc/krb5.keytab . +You can point the Kerberos PAM module at a different keytab with the +.Em keytab +option. +If that keytab cannot be read or if no keys are found in it, the default +behavior is to fail authentication. +If you want to skip this check, set the +.Qo Li allow_kdc_spoof Qc +option to true either in the [appdefaults] section of +.Pa /etc/krb5.conf +or in the PAM policy. +.Pp By default, whenever the user is authenticated, a basic authorization -check will also be done using \fBkrb5_kuserok()\fR. The default behavior of -this function is to check the user's account for a \fI.k5login\fR file and, -if one is present, ensure that the user's principal is listed in that -file. If \fI.k5login\fR is not present, the default check is to ensure that -the user's principal is in the default local realm and the user portion of -the principal matches the account name (this can be changed by configuring -a custom aname to localname mapping in \fIkrb5.conf\fR; see the Kerberos -documentation for details). This can be customized with several -configuration options; see below. -.Sp -If the username provided to PAM contains an \f(CW\*(C`@\*(C'\fR and Kerberos can, -treating the username as a principal, map it to a local account name, -\&\fBpam_authenticate()\fR will change the PAM user to that local account name. -This allows users to log in with their Kerberos principal and let Kerberos -do the mapping to an account. This can be disabled with the -\&\fIno_update_user\fR option. Be aware, however, that this facility cannot be -used with OpenSSH. OpenSSH will reject usernames that don't match local -accounts before this remapping can be done and will pass an invalid -password to the PAM module. Also be aware that several other common PAM -modules, such as pam_securetty, expect to be able to look up the user with -\&\fBgetpwnam()\fR and cannot be called before pam_krb5 when using this feature. -.Sp -When \fBpam_setcred()\fR is called to initialize a new ticket cache, the -environment variable KRB5CCNAME is set to the path to that ticket cache. -By default, the cache will be named \fI/tmp/krb5cc_UID_RANDOM\fR where UID is -the user's UID and RANDOM is six randomly-chosen letters. This can be -configured with the \fIccache\fR and \fIccache_dir\fR options. -.Sp -pam\-krb5 does not use the default ticket cache location or -\&\fIdefault_cc_name\fR in the \f(CW\*(C`[libdefaults]\*(C'\fR section of \fIkrb5.conf\fR. The -default cache location would share a cache for all sessions of the same -user, which causes confusing behavior when the user logs out of one of -multiple sessions. -.Sp -If \fBpam_setcred()\fR initializes a new ticket cache, it will also set up that -ticket cache so that it will be deleted when the PAM session is closed. -Normally, the calling program (\fBlogin\fR, \fBsshd\fR, etc.) will run the -user's shell as a sub-process, wait for it to exit, and then close the PAM -session, thereby cleaning up the user's session. -.IP session 4 -.IX Item "session" -Provides implementations of \fBpam_open_session()\fR, which is equivalent to -calling \fBpam_setcred()\fR with the PAM_ESTABLISH_CRED flag, and -\&\fBpam_close_session()\fR, which destroys the ticket cache created by -\&\fBpam_setcred()\fR. -.IP account 4 -.IX Item "account" -Provides an implementation of \fBpam_acct_mgmt()\fR. All it does is do the same -authorization check as performed by the \fBpam_authenticate()\fR implementation -described above. -.IP password 4 -.IX Item "password" -Provides an implementation of \fBpam_chauthtok()\fR, which implements password -changes. The user is prompted for their existing password (unless -configured to use an already entered one) and the PAM module then obtains -credentials for the special Kerberos principal \f(CW\*(C`kadmin/changepw\*(C'\fR. It -then prompts the user for a new password, twice to ensure that the user -entered it properly (again, unless configured to use an already entered -password), and then does a Kerberos password change. -.Sp +check will also be done using +.Xr krb5_kuserok 3 . +The default behavior of this function is to check the user's account for +a +.Pa .k5login +file and, if one is present, ensure that the user's principal is listed +in that file. +If +.Pa .k5login +is not present, the default check is to ensure that the user's principal +is in the default local realm and the user portion of the principal +matches the account name (this can be changed by configuring a custom +aname to localname mapping in +.Pa krb5.conf ; +see the Kerberos documentation for details). +This can be customized with several configuration options; see below. +.Pp +If the username provided to PAM contains an +.Qo Li @ Qc +and Kerberos can, treating the username as a principal, map it to a +local account name, +.Xr pam_authenticate 3 +will change the PAM user to that local account name. +This allows users to log in with their Kerberos principal and let +Kerberos do the mapping to an account. +This can be disabled with the +.Em no_update_user +option. +Be aware, however, that this facility cannot be used with OpenSSH. +OpenSSH will reject usernames that don't match local accounts before +this remapping can be done and will pass an invalid password to the PAM +module. +Also be aware that several other common PAM modules, such as +pam_securetty, expect to be able to look up the user with +.Xr getpwnam 3 +and cannot be called before pam_krb5 when using this feature. +.Pp +When +.Xr pam_setcred 3 +is called to initialize a new ticket cache, the environment variable +KRB5CCNAME is set to the path to that ticket cache. +By default, the cache will be named +.Pa /tmp/krb5cc_UID_RANDOM +where UID is the user's UID and RANDOM is six randomly-chosen letters. +This can be configured with the +.Em ccache +and +.Em ccache_dir +options. +.Pp +pam-krb5 does not use the default ticket cache location or +.Em default_cc_name +in the +.Qo Li [libdefaults] Qc +section of +.Pa krb5.conf . +The default cache location would share a cache for all sessions of the +same user, which causes confusing behavior when the user logs out of one +of multiple sessions. +.Pp +If +.Xr pam_setcred 3 +initializes a new ticket cache, it will also set up that ticket cache so +that it will be deleted when the PAM session is closed. +Normally, the calling program +.Pf ( Sy login , +.Sy sshd , +etc.) +will run the user's shell as a sub-process, wait for it to exit, and +then close the PAM session, thereby cleaning up the user's session. +.It session +Provides implementations of +.Xr pam_open_session 3 , +which is equivalent to calling +.Xr pam_setcred 3 +with the PAM_ESTABLISH_CRED flag, and +.Xr pam_close_session 3 , +which destroys the ticket cache created by +.Xr pam_setcred 3 . +.It account +Provides an implementation of +.Xr pam_acct_mgmt 3 . +All it does is do the same authorization check as performed by the +.Xr pam_authenticate 3 +implementation described above. +.It password +Provides an implementation of +.Xr pam_chauthtok 3 , +which implements password changes. +The user is prompted for their existing password (unless configured to +use an already entered one) and the PAM module then obtains credentials +for the special Kerberos principal +.Qo Li kadmin/changepw Qc . +It then prompts the user for a new password, twice to ensure that the +user entered it properly (again, unless configured to use an already +entered password), and then does a Kerberos password change. +.Pp Passwords as long or longer than PAM_MAX_RESP_SIZE octets (normally 512 -octets) will be rejected, since excessively long passwords can be used as -a denial of service attack. -.Sp -Unlike the normal Unix password module, this module will allow any user to -change any other user's password if they know the old password. Also, -unlike the normal Unix password module, root will always be prompted for -the old password, since root has no special status in Kerberos. (To -change passwords in Kerberos without knowing the old password, use -\&\fBkadmin\fR\|(8) instead.) -.PP +octets) will be rejected, since excessively long passwords can be used +as a denial of service attack. +.Pp +Unlike the normal Unix password module, this module will allow any user +to change any other user's password if they know the old password. +Also, unlike the normal Unix password module, root will always be +prompted for the old password, since root has no special status in +Kerberos. +(To change passwords in Kerberos without knowing the old password, use +kadmin(8) instead.) +.El +.Pp Both the account and session management calls of the Kerberos PAM module will return PAM_IGNORE if called in the context of a PAM session for a -user who did not authenticate with Kerberos (a return code of \f(CW\*(C`ignore\*(C'\fR in -the Linux PAM configuration language). -.PP +user who did not authenticate with Kerberos (a return code of +.Qo Li ignore Qc +in the Linux PAM configuration language). +.Pp Note that this module assumes the network is available in order to do a -Kerberos authentication. If the network is not available, some Kerberos -libraries have timeouts longer than the timeout imposed by the login -process. This means that using this module incautiously can make it -impossible to log on to console as root. For this reason, you should -always use the \fIignore_root\fR or \fIminimum_uid\fR options, list a local -authentication module such as \fBpam_unix\fR first with a control field of -\&\f(CW\*(C`sufficient\*(C'\fR so that the Kerberos PAM module will be skipped if local -password authentication was successful. -.PP -This is not the same PAM module as the Kerberos PAM module available from -Sourceforge, or the one included on Red Hat systems. It supports many of -the same options, has some additional options, and doesn't support some of -the options those modules do. -.SH CONFIGURATION -.IX Header "CONFIGURATION" -The Kerberos PAM module takes many options, not all of which are relevant -to every PAM group; options that are not relevant will be silently -ignored. Any of these options can be set in the PAM configuration as -arguments listed after \f(CW\*(C`pam_krb5.so\*(C'\fR. Some of the options can also be -set in the system \fIkrb5.conf\fR file; if this is possible, it will be noted -below in the option description. -.PP -To set a boolean option in the PAM configuration file, just give the name -of the option in the arguments. To set an option that takes an argument, -follow the option name with an equal sign (=) and the value, with no -separating whitespace. Whitespace in option arguments is not supported in -the PAM configuration. -.PP -To set an option for the PAM module in the system \fIkrb5.conf\fR file, put -that option in the \f(CW\*(C`[appdefaults]\*(C'\fR section. All options must be followed -by an equal sign (=) and a value, so for boolean options add \f(CW\*(C`= true\*(C'\fR. +Kerberos authentication. +If the network is not available, some Kerberos libraries have timeouts +longer than the timeout imposed by the login process. +This means that using this module incautiously can make it impossible to +log on to console as root. +For this reason, you should always use the +.Em ignore_root +or +.Em minimum_uid +options, list a local authentication module such as +.Sy pam_unix +first with a control field of +.Qo Li sufficient Qc +so that the Kerberos PAM module will be skipped if local password +authentication was successful. +.Pp +This is not the same PAM module as the Kerberos PAM module available +from Sourceforge, or the one included on Red Hat systems. +It supports many of the same options, has some additional options, and +doesn't support some of the options those modules do. +.Sh CONFIGURATION +The Kerberos PAM module takes many options, not all of which are +relevant to every PAM group; options that are not relevant will be +silently ignored. +Any of these options can be set in the PAM configuration as arguments +listed after +.Qo Li pam_krb5.so Qc . +Some of the options can also be set in the system +.Pa krb5.conf +file; if this is possible, it will be noted below in the option +description. +.Pp +To set a boolean option in the PAM configuration file, just give the +name of the option in the arguments. +To set an option that takes an argument, follow the option name with an +equal sign (=) and the value, with no separating whitespace. +Whitespace in option arguments is not supported in the PAM +configuration. +.Pp +To set an option for the PAM module in the system +.Pa krb5.conf +file, put that option in the +.Qo Li [appdefaults] Qc +section. +All options must be followed by an equal sign (=) and a value, so for +boolean options add +.Qo Li = true Qc . The Kerberos PAM module will look for options either at the top level of -the \f(CW\*(C`[appdefaults]\*(C'\fR section or in a subsection named \f(CW\*(C`pam\*(C'\fR, inside or -outside a section for the realm. For example, the following fragment of a -\&\fIkrb5.conf\fR file would set \fIforwardable\fR to true, \fIminimum_uid\fR to -1000, and set \fIignore_k5login\fR only if the realm is EXAMPLE.COM. -.PP -.Vb 8 -\& [appdefaults] -\& forwardable = true -\& pam = { -\& minimum_uid = 1000 -\& EXAMPLE.COM = { -\& ignore_k5login = true -\& } -\& } -.Ve -.PP -For more information on the syntax of \fIkrb5.conf\fR, see \fBkrb5.conf\fR\|(5). -Note that options that depend on the realm will be set only on the basis -of the default realm, either as configured in \fBkrb5.conf\fR\|(5) or as set by -the \fIrealm\fR option described below. If the user authenticates to an -account qualified with a realm, that realm will not be used when -determining which options will apply. -.PP -There is no difference to the PAM module whether options are specified at -the top level or in a \f(CW\*(C`pam\*(C'\fR section; the \f(CW\*(C`pam\*(C'\fR section is supported in -case there are options that should be set for the PAM module but not for -other applications. -.PP -If the same option is set in \fIkrb5.conf\fR and in the PAM configuration, -the latter takes precedent. Note, however, that due to the configuration -syntax, there's no way to turn off a boolean option in the PAM -configuration that was turned on in \fIkrb5.conf\fR. -.PP +the +.Qo Li [appdefaults] Qc +section or in a subsection named +.Qo Li pam Qc , +inside or outside a section for the realm. +For example, the following fragment of a +.Pa krb5.conf +file would set +.Em forwardable +to true, +.Em minimum_uid +to 1000, and set +.Em ignore_k5login +only if the realm is EXAMPLE.COM. +.Bd -literal + [appdefaults] + forwardable = true + pam = { + minimum_uid = 1000 + EXAMPLE.COM = { + ignore_k5login = true + } + } +.Ed +.Pp +For more information on the syntax of +.Pa krb5.conf , +see krb5.conf(5). Note that options that depend on the realm will be set +only on the basis of the default realm, either as configured in +krb5.conf(5) or as set by the +.Em realm +option described below. +If the user authenticates to an account qualified with a realm, that +realm will not be used when determining which options will apply. +.Pp +There is no difference to the PAM module whether options are specified +at the top level or in a +.Qo Li pam Qc +section; the +.Qo Li pam Qc +section is supported in case there are options that should be set for +the PAM module but not for other applications. +.Pp +If the same option is set in +.Pa krb5.conf +and in the PAM configuration, the latter takes precedent. +Note, however, that due to the configuration syntax, there's no way to +turn off a boolean option in the PAM configuration that was turned on in +.Pa krb5.conf . +.Pp The start of each option description is annotated with the version of -pam\-krb5 in which that option was added with the current meaning. -.SS Authorization -.IX Subsection "Authorization" -.IP alt_auth_map= 4 -.IX Item "alt_auth_map=" -[3.12] This functions similarly to the \fIsearch_k5login\fR option. The - argument is used as the authentication Kerberos principal, with -any \f(CW%s\fR in replaced with the username. If the username -contains an \f(CW\*(C`@\*(C'\fR, only the part of the username before the realm is used -to replace \f(CW%s\fR. If contains a realm, it will be used; -otherwise, the realm of the username (if any) will be appended to the -result. There is no quote removal. -.Sp +pam-krb5 in which that option was added with the current meaning. +.Ss Authorization +.Bl -tag -width Ds +.It allow_kdc_spoof +Allow authentication to succeed even if there is no host or service key +available in a keytab to authenticate the Kerberos KDC's ticket. +.It alt_auth_map= +[3.12] This functions similarly to the +.Em search_k5login +option. +The argument is used as the authentication Kerberos principal, +with any +.Qo Li %s Qc +in replaced with the username. +If the username contains an +.Qo Li @ Qc , +only the part of the username before the realm is used to replace +.Qo Li %s Qc . +If contains a realm, it will be used; otherwise, the realm of +the username (if any) will be appended to the result. +There is no quote removal. +.Pp If this option is present, the default behavior is to try this alternate principal first and then fall back to the standard behavior if it fails. The primary usage is to allow alternative principals to be used for -authentication in programs like \fBsudo\fR. Most examples will look like: -.Sp -.Vb 1 -\& alt_auth_map=%s/root -.Ve -.Sp +authentication in programs like +.Sy sudo . +Most examples will look like: +.Bd -literal + alt_auth_map=%s/root +.Ed +.Pp which attempts authentication as the root instance of the username first -and then falls back to the regular username (but see \fIforce_alt_auth\fR and -\&\fIonly_alt_auth\fR). -.Sp +and then falls back to the regular username (but see +.Em force_alt_auth +and +.Em only_alt_auth Ns ). +.Pp This option also allows a cheap way to attempt authentication in an -alternative realm first and then fall back to the primary realm. A -setting like: -.Sp -.Vb 1 -\& alt_auth_map=%s@EXAMPLE.COM -.Ve -.Sp +alternative realm first and then fall back to the primary realm. +A setting like: +.Bd -literal + alt_auth_map=%s@EXAMPLE.COM +.Ed +.Pp will attempt authentication in the EXAMPLE.COM realm first and then fall -back on the local default realm. This is more convenient than running the -module multiple times with multiple default realms set with \fIrealm\fR, but -it is very limited: only two realms can be tried, and the alternate realm -is always tried first. -.Sp -This option can be set in \f(CW\*(C`[appdefaults]\*(C'\fR in \fIkrb5.conf\fR, although -normally it doesn't make sense to do that; normally it is used in the PAM -options of configuration for specific programs. It is only applicable to -the auth and account groups. If this option is set for the auth group, be -sure to set it for the account group as well or account authorization may -fail. -.IP force_alt_auth 4 -.IX Item "force_alt_auth" -[3.12] This option is used with \fIalt_auth_map\fR and forces authentication -as the mapped principal if that principal exists in the KDC. Only if the -KDC returns principal unknown does the Kerberos PAM module fall back to -normal authentication. This can be used to force authentication with an -alternate instance. If \fIalt_auth_map\fR is not set, it has no effect. -.Sp -This option can be set in \f(CW\*(C`[appdefaults]\*(C'\fR in \fIkrb5.conf\fR and is only -applicable to the auth group. -.IP ignore_k5login 4 -.IX Item "ignore_k5login" -[2.0] Never look for a \fI.k5login\fR file in the user's home directory. -Instead, only check that the Kerberos principal maps to the local account -name. The default check is to ensure the realm matches the local realm -and the user portion of the principal matches the local account name, but -this can be customized by setting up an aname to localname mapping in -\&\fIkrb5.conf\fR. -.Sp -This option can be set in \f(CW\*(C`[appdefaults]\*(C'\fR in \fIkrb5.conf\fR and is only -applicable to the auth and account groups. -.IP ignore_root 4 -.IX Item "ignore_root" -[1.1] Do not do anything if the username is \f(CW\*(C`root\*(C'\fR. The authentication -and password calls will silently fail (allowing that status to be ignored -via a control of \f(CW\*(C`optional\*(C'\fR or \f(CW\*(C`sufficient\*(C'\fR), and the account and -session calls (including pam_setcred) will return PAM_IGNORE, telling the -PAM library to proceed as if they weren't mentioned in the PAM -configuration. This option is supported and will remain, but normally you -want to use \fIminimum_uid\fR instead. -.Sp -This option can be set in \f(CW\*(C`[appdefaults]\*(C'\fR in \fIkrb5.conf\fR. -.IP minimum_uid= 4 -.IX Item "minimum_uid=" -[2.0] Do not do anything if the authenticated account name corresponds to -a local account and that local account has a UID lower than . If +back on the local default realm. +This is more convenient than running the module multiple times with +multiple default realms set with +.Em realm , +but it is very limited: only two realms can be tried, and the alternate +realm is always tried first. +.Pp +This option can be set in +.Qo Li [appdefaults] Qc +in +.Pa krb5.conf , +although normally it doesn't make sense to do that; normally it is used +in the PAM options of configuration for specific programs. +It is only applicable to the auth and account groups. +If this option is set for the auth group, be sure to set it for the +account group as well or account authorization may fail. +.It force_alt_auth +[3.12] This option is used with +.Em alt_auth_map +and forces authentication as the mapped principal if that principal +exists in the KDC. Only if the KDC returns principal unknown does the +Kerberos PAM module fall back to normal authentication. +This can be used to force authentication with an alternate instance. +If +.Em alt_auth_map +is not set, it has no effect. +.Pp +This option can be set in +.Qo Li [appdefaults] Qc +in +.Pa krb5.conf +and is only applicable to the auth group. +.It ignore_k5login +[2.0] Never look for a +.Pa .k5login +file in the user's home directory. +Instead, only check that the Kerberos principal maps to the local +account name. +The default check is to ensure the realm matches the local realm and the +user portion of the principal matches the local account name, but this +can be customized by setting up an aname to localname mapping in +.Pa krb5.conf . +.Pp +This option can be set in +.Qo Li [appdefaults] Qc +in +.Pa krb5.conf +and is only applicable to the auth and account groups. +.It ignore_root +[1.1] Do not do anything if the username is +.Qo Li root Qc . +The authentication and password calls will silently fail (allowing that +status to be ignored via a control of +.Qo Li optional Qc +or +.Qo Li sufficient Qc Ns ), +and the account and session calls (including pam_setcred) will return +PAM_IGNORE, telling the PAM library to proceed as if they weren't +mentioned in the PAM configuration. +This option is supported and will remain, but normally you want to use +.Em minimum_uid +instead. +.Pp +This option can be set in +.Qo Li [appdefaults] Qc +in +.Pa krb5.conf . +.It minimum_uid= +[2.0] Do not do anything if the authenticated account name corresponds +to a local account and that local account has a UID lower than . If both of those conditions are true, the authentication and password calls will silently fail (allowing that status to be ignored via a control of -\&\f(CW\*(C`optional\*(C'\fR or \f(CW\*(C`sufficient\*(C'\fR), and the account and session calls -(including pam_setcred) will return PAM_IGNORE, telling the PAM library to -proceed as if they weren't mentioned in the PAM configuration. -.Sp -Using this option is highly recommended if you don't need to use Kerberos -to authenticate password logins to the root account (which isn't -recommended since Kerberos requires a network connection). It provides -some defense in depth against user principals that happen to match a -system account incorrectly authenticating as that system account. -.Sp -This option can be set in \f(CW\*(C`[appdefaults]\*(C'\fR in \fIkrb5.conf\fR. -.IP only_alt_auth 4 -.IX Item "only_alt_auth" -[3.12] This option is used with \fIalt_auth_map\fR and forces the use of the -mapped principal for authentication. It disables fallback to normal -authentication in all cases and overrides \fIsearch_k5login\fR and -\&\fIforce_alt_auth\fR. If \fIalt_auth_map\fR is not set, it has no effect and -the standard authentication behavior is used. -.Sp -This option can be set in \f(CW\*(C`[appdefaults]\*(C'\fR in \fIkrb5.conf\fR and is only -applicable to the auth group. -.IP search_k5login 4 -.IX Item "search_k5login" +.Qo Li optional Qc +or +.Qo Li sufficient Qc Ns ), +and the account and session calls (including pam_setcred) will return +PAM_IGNORE, telling the PAM library to proceed as if they weren't +mentioned in the PAM configuration. +.Pp +Using this option is highly recommended if you don't need to use +Kerberos to authenticate password logins to the root account (which +isn't recommended since Kerberos requires a network connection). +It provides some defense in depth against user principals that happen to +match a system account incorrectly authenticating as that system +account. +.Pp +This option can be set in +.Qo Li [appdefaults] Qc +in +.Pa krb5.conf . +.It only_alt_auth +[3.12] This option is used with +.Em alt_auth_map +and forces the use of the mapped principal for authentication. +It disables fallback to normal authentication in all cases and overrides +.Em search_k5login +and +.Em force_alt_auth . +If +.Em alt_auth_map +is not set, it has no effect and the standard authentication behavior is +used. +.Pp +This option can be set in +.Qo Li [appdefaults] Qc +in +.Pa krb5.conf +and is only applicable to the auth group. +.It search_k5login [2.0] Normally, the Kerberos implementation of pam_authenticate attempts -to obtain tickets for the authenticating username in the local realm. If -this option is set and the local user has a \fI.k5login\fR file in their home -directory, the module will instead open and read that \fI.k5login\fR file, -attempting to use the supplied password to authenticate as each principal -listed there in turn. If any of those authentications succeed, the user -will be successfully authenticated; otherwise, authentication will fail. -This option is useful for allowing password authentication (via console or -\&\fBsshd\fR without GSS-API support) to shared accounts. If there is no -\&\fI.k5login\fR file, the behavior is the same as normal. Using this option -requires that the user's \fI.k5login\fR file be readable at the time of -authentication. -.Sp -This option can be set in \f(CW\*(C`[appdefaults]\*(C'\fR in \fIkrb5.conf\fR and is only -applicable to the auth group. -.SS "Kerberos Behavior" -.IX Subsection "Kerberos Behavior" -.IP anon_fast 4 -.IX Item "anon_fast" +to obtain tickets for the authenticating username in the local realm. +If this option is set and the local user has a +.Pa .k5login +file in their home directory, the module will instead open and read that +.Pa .k5login +file, attempting to use the supplied password to authenticate as each +principal listed there in turn. +If any of those authentications succeed, the user will be successfully +authenticated; otherwise, authentication will fail. +This option is useful for allowing password authentication (via console +or +.Sy sshd +without GSS-API support) to shared accounts. +If there is no +.Pa .k5login +file, the behavior is the same as normal. +Using this option requires that the user's +.Pa .k5login +file be readable at the time of authentication. +.Pp +This option can be set in +.Qo Li [appdefaults] Qc +in +.Pa krb5.conf +and is only applicable to the auth group. +.El +.Ss Kerberos Behavior +.Bl -tag -width Ds +.It anon_fast [4.6] Attempt to use Flexible Authentication Secure Tunneling (FAST) by -first authenticating as the anonymous user (WELLKNOWN/ANONYMOUS) and using -its credentials as the FAST armor. This requires anonymous PKINIT be -enabled for the local realm, that PKINIT be configured on the local -system, and that the Kerberos library support FAST and anonymous PKINIT. -.Sp -FAST is a mechanism to protect Kerberos against password guessing attacks -and provide other security improvements. To work, FAST requires that a -ticket be obtained with a strong key to protect exchanges with potentially -weaker user passwords. This option uses anonymous authentication to -obtain that key and then uses it to protect the subsequent authentication. -.Sp +first authenticating as the anonymous user (WELLKNOWN/ANONYMOUS) and +using its credentials as the FAST armor. +This requires anonymous PKINIT be enabled for the local realm, that +PKINIT be configured on the local system, and that the Kerberos library +support FAST and anonymous PKINIT. +.Pp +FAST is a mechanism to protect Kerberos against password guessing +attacks and provide other security improvements. +To work, FAST requires that a ticket be obtained with a strong key to +protect exchanges with potentially weaker user passwords. +This option uses anonymous authentication to obtain that key and then +uses it to protect the subsequent authentication. +.Pp If anonymous PKINIT is not available or fails, FAST will not be used and the authentication will proceed as normal. -.Sp +.Pp To instead use an existing ticket cache for the FAST credentials, use -\&\fIfast_ccache\fR instead of this option. If both \fIfast_ccache\fR and -\&\fIanon_fast\fR are set, the ticket cache named by \fIfast_ccache\fR will be -tried first, and the Kerberos PAM module will fall back on attempting -anonymous PKINIT if that cache could not be used. -.Sp -This option can be set in \f(CW\*(C`[appdefaults]\*(C'\fR in \fIkrb5.conf\fR and is only -applicable to the auth and password groups. -.Sp -The operation is the same as if using the \fIfast_ccache\fR option, but the -cache is created and destroyed automatically. If both \fIfast_ccache\fR and -\&\fIanon_fast\fR options are used, the \fIfast_ccache\fR takes precedent and no -anonymous authentication is done. -.IP fast_ccache= 4 -.IX Item "fast_ccache=" -[4.3] The same as \fIanon_fast\fR, but use an existing Kerberos ticket cache -rather than anonymous PKINIT. This allows use of FAST with a realm that -doesn't support PKINIT or doesn't support anonymous authentication. -.Sp +.Em fast_ccache +instead of this option. +If both +.Em fast_ccache +and +.Em anon_fast +are set, the ticket cache named by +.Em fast_ccache +will be tried first, and the Kerberos PAM module will fall back on +attempting anonymous PKINIT if that cache could not be used. +.Pp +This option can be set in +.Qo Li [appdefaults] Qc +in +.Pa krb5.conf +and is only applicable to the auth and password groups. +.Pp +The operation is the same as if using the *** 1394 LINES SKIPPED *** From nobody Mon Nov 24 08:34:37 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dFJz14VWPz6JJsq for ; Mon, 24 Nov 2025 08:34:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dFJz11kJgz46xp for ; Mon, 24 Nov 2025 08:34:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763973277; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LC5nM35z63+GiD6zg2ALrwnZPVI6slSi6Pidc8byPKM=; b=mZ9vR2I+JhoguTv2bdxb6UoNJmMunOWvCnFLpxt4/KvUr2Ka/TlCmpAMl3ZClpH3NZlKEJ +fjcSCERNmWLFLwA9HCEP82XIB28IAYGnoZXO8EavqdOvfnWnZL2GXPzDneH42H+yEzkOd w0WoxmVBJO92UieHdGUdRE44sI1k8hg+HsMVXimNnAyZ0XeY/BK+RNTqcE2tmvSILoIiRx 80Wy/Z719vela0CREesqUF1klIzSZQgmF82uvyftH4dq90LWLuBNPcP9QtbdW26r5fk4iH L9enl5+7225VvMUGhHgWnsW0JUu5vzUgwCkI4R+Zhs+/4q3Va8HpcMQmyZoEKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763973277; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LC5nM35z63+GiD6zg2ALrwnZPVI6slSi6Pidc8byPKM=; b=fpfvZkfRUWplsrHJVoasobMOz0aXcpU3gxqRcn1nLkmTXs2BnLnMcr14UbMnxnYOsXHGUy 8mfe0N1X4bJI0q6g+7xkVnIhLdnJfq8bJLiSWJrcrNUofXfSD/nIcqmQhxTR1YFhZ+xLuo RFJsDEr3qBMzUmTPaG12+OZdWRpca+fn8rN84hVb1BeLADZchqrMvjUmgdNlxU8p15S3xJ cUX9SV5TpD5NvsYzmH2eeoUJdxiG/5/kroCzI79jTnah3AyMF/MHyp1Kc1N3N4HIWa3+NK Xl2nxpPg2IRe7DrqGy6nVCtRinuNcUqNY0jTPHRg1GnGY1T8fxBmmy0QcjmfbQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763973277; a=rsa-sha256; cv=none; b=SQAfB3OQ0LL4/oJUTfwDPteJ8adICF948xEiUf2CkpSl7dvBVtERsQxKt0ABsI30MOITQM OuY8bb+ThrSLNUCrwtRx7UA+zoHrN73XIRmxQCBguAbOBXOZJqGsaK375V7RuI0Tl3AaXW I5+g/55KQB6Kr8XJdvIQM+U5n8pJUhJ0OYjUE6IF8R6sOe48N8NhY4cRA0q49qgNlERXLi We02iWBX5cF8OjW8Qmz7LMyUPXEj8uaBAeo/eFMWfpJVpgyXw3CjrSm/1U2n231MIOrunK 66m4F+Plp/5gA/7y7v5BdDk65NEY6r0Z6DQsJYOC1mD5CVy/AyS+x6qhy8lL6g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dFJz10yRLz16PM for ; Mon, 24 Nov 2025 08:34:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3180d by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 24 Nov 2025 08:34:37 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Wolfram Schneider Subject: git: a067eb525e10 - main - mount.8: document nosymfollow option List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wosch X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a067eb525e10acc9d7e1f3b1a8a6dfeca42b4424 Auto-Submitted: auto-generated Date: Mon, 24 Nov 2025 08:34:37 +0000 Message-Id: <6924189d.3180d.12a74b9@gitrepo.freebsd.org> The branch main has been updated by wosch: URL: https://cgit.FreeBSD.org/src/commit/?id=a067eb525e10acc9d7e1f3b1a8a6dfeca42b4424 commit a067eb525e10acc9d7e1f3b1a8a6dfeca42b4424 Author: Wolfram Schneider AuthorDate: 2025-11-24 08:33:07 +0000 Commit: Wolfram Schneider CommitDate: 2025-11-24 08:33:07 +0000 mount.8: document nosymfollow option Document the nosymfollow mount option in more details. Forgotten in 5ddc8ded1dbe650b7d83240a1f86a1eb6e2b9b5a --- sbin/mount/mount.8 | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/sbin/mount/mount.8 b/sbin/mount/mount.8 index 154ad293aee4..877001727a8f 100644 --- a/sbin/mount/mount.8 +++ b/sbin/mount/mount.8 @@ -270,8 +270,11 @@ Note: this option is worthless if a public available suid or sgid wrapper is installed on your system. It is set automatically when the user does not have super-user privileges. .It Cm nosymfollow -Do not follow symlinks -on the mounted file system. +Do not follow symlinks on the mounted file system. +.Pp +This option is intended to be used when mounting file systems +from untrusted external storage systems or public writable /tmp file systems. +You can still create or remove symlinks, or read the value of a symbolic link. .It Cm ro Mount the filesystem read-only, even the super-user may not write it. Equivalent to @@ -571,6 +574,7 @@ support for a particular file system might be provided either on a static .Xr lsvfs 1 , .Xr setfacl 1 , .Xr nmount 2 , +.Xr symlink 2 , .Xr acl 3 , .Xr getmntinfo 3 , .Xr libxo 3 , @@ -584,6 +588,7 @@ support for a particular file system might be provided either on a static .Xr tarfs 4 , .Xr tmpfs 4 , .Xr fstab 5 , +.Xr symlink 7 , .Xr automount 8 , .Xr fstyp 8 , .Xr kldload 8 , From nobody Mon Nov 24 08:47:52 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dFKGb3bvzz6JKk3; Mon, 24 Nov 2025 08:48:07 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4dFKGZ3GK3z49d9; Mon, 24 Nov 2025 08:48:06 +0000 (UTC) (envelope-from kostikbel@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=fail reason="No valid SPF, No valid DKIM" header.from=gmail.com (policy=none); spf=softfail (mx1.freebsd.org: 2001:470:d5e7:1::1 is neither permitted nor denied by domain of kostikbel@gmail.com) smtp.mailfrom=kostikbel@gmail.com Received: from tom.home (kib@localhost [127.0.0.1] (may be forged)) by kib.kiev.ua (8.18.1/8.18.1) with ESMTP id 5AO8lq5J026309; Mon, 24 Nov 2025 10:47:55 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 5AO8lq5J026309 Received: (from kostik@localhost) by tom.home (8.18.1/8.18.1/Submit) id 5AO8lq32026308; Mon, 24 Nov 2025 10:47:52 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 24 Nov 2025 10:47:52 +0200 From: Konstantin Belousov To: Colin Percival Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: b2b3d2a962eb - main - rtld-elf: move powerpc-specific auxv compat code into arch hook Message-ID: References: <69206a47.27746.245d9408@gitrepo.freebsd.org> <0100019ab4713726-027a4a44-11b8-48f3-8321-3e34256c858a-000000@email.amazonses.com> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0100019ab4713726-027a4a44-11b8-48f3-8321-3e34256c858a-000000@email.amazonses.com> X-Spamd-Bar: - X-Spamd-Result: default: False [-1.20 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-0.998]; NEURAL_SPAM_SHORT(0.80)[0.798]; MIME_GOOD(-0.10)[text/plain]; DMARC_POLICY_SOFTFAIL(0.10)[gmail.com : No valid SPF, No valid DKIM,none]; MIME_TRACE(0.00)[0:+]; TO_DN_SOME(0.00)[]; ARC_NA(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US]; MISSING_XM_UA(0.00)[]; R_DKIM_NA(0.00)[]; HAS_XAW(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org,dev-commits-src-main@freebsd.org]; R_SPF_SOFTFAIL(0.00)[~all:c]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_TLS_LAST(0.00)[]; RCPT_COUNT_THREE(0.00)[4] X-Rspamd-Queue-Id: 4dFKGZ3GK3z49d9 On Mon, Nov 24, 2025 at 05:58:29AM +0000, Colin Percival wrote: > On 11/21/25 05:33, Konstantin Belousov wrote: > > commit b2b3d2a962eb00005641546fbe672b95e5d0672a > > Author: Konstantin Belousov > > AuthorDate: 2025-11-18 11:06:04 +0000 > > Commit: Konstantin Belousov > > CommitDate: 2025-11-21 13:33:17 +0000 > > > > rtld-elf: move powerpc-specific auxv compat code into arch hook > > Tested by: Timothy Pearson (tpearson_raptorengineering.com) > > Sponsored by: The FreeBSD Foundation > > MFC after: 1 week > > Differential revision: https://reviews.freebsd.org/D53801 > > --- a/libexec/rtld-elf/powerpc64/reloc.c > > +++ b/libexec/rtld-elf/powerpc64/reloc.c > > @@ -737,3 +737,29 @@ __tls_get_addr(tls_index* ti) > > return (tls_get_addr_common(_tcb_get(), ti->ti_module, ti->ti_offset + > > TLS_DTV_OFFSET)); > > } > > + > > +void > > +arch_fix_auxv(Elf_Auxinfo *aux, Elf_Auxinfo *aux_info[]) > > +{ > > + Elf_Auxinfo *aux; > > This does not compile: > > /usr/src/libexec/rtld-elf/powerpc64/reloc.c:744:15: error: redefinition of 'aux' > > 744 | Elf_Auxinfo *aux; > > | ^ > > /usr/src/libexec/rtld-elf/powerpc64/reloc.c:742:28: note: previous definition is here > > Which makes me wonder just how much testing this precise patch has > received. ;-) I ran tinderbox, and it was tested on power by Timothy Pearson. Hm, I think I see what happen: patch was updated, then reverted, and then I blindly took the change from the previous variant of the differential, loosing the additional change. I will commit the fix after my tb finishes. From nobody Mon Nov 24 12:21:13 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dFQ0Z627Sz6Jb4V for ; Mon, 24 Nov 2025 12:21:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dFQ0Z2j3Nz3PtH for ; Mon, 24 Nov 2025 12:21:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763986878; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YHV7/V4JozscMOwYiUaYqXd0BTLHkbk+F6t4l7lMFCY=; b=P70BaPU9vP2Ydb4TjKb99e5hIAjL+MAfwIHBQfptlDOef6IZYhjXdZ8MU4Jbo8fr3r9NTI F5HEa+iWpXe+CoN/y4J08nE/galDeaHTCXJYBngKbU//PHwuOATmMIh/XIOeIAHdtNMRDX NNGCoBeBvni7n4FSwwhye+e9r1lDQSiWOrfr9XxTrJWvTAAp1zpb7rfYt0irJlOIPkexTZ yjvDmtfg/X7iOXDXbV3GiD4ODlCNv5Vsh4BZIMZc4+M6xHhFPcopeSifDstngVi2eTohzp ul0skk0dt3aT2olRaGVKqoSPI4iTZtpjo4WCHNElyi5Y0uHwxkuCOW3GTAzrOQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763986878; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YHV7/V4JozscMOwYiUaYqXd0BTLHkbk+F6t4l7lMFCY=; b=dLT+Fp9iFBB4LFw5Zivl8ix4HQF16Ogq8m8nr1QkH98g/xV55xFQG0cREtDv9RtCA7EWdW QaSj4QAYTuvM2mBfgC0dHD3Cvm+LnQTHFbfOA6aBdKoGr0mylLvRh4rk3lxPCuNwdrdkVc KLdIqQXVqHaZMFzqcfHjinPPWvho+ug3OHWhAdX8vVc5H3kwwGLjafZ9setqkMKopWQO0I /v/rbH7VhtcXKtEbwYZecQwDrAYZ5SFXHwI2XmOvvuH1hLK4WKAb8905iwEBCZSwCP+1/9 3O3hFsMpe8g0zwNgr3BGzVamMEn2CFbJ/zI0eqKGdj/az4gv1OwQCMkpARrNtw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763986878; a=rsa-sha256; cv=none; b=yja+8GeIqzCcFaGl/mC5AqaLNVNSHE/tJHhrxCftmqpFaq7lcDY2u/WNGN9wchERU2o7/7 ELyHGOV8SsgmyQRkG3FpUmmKCUetqLf/GSXAgAHrk6wHK1z8sTWQ7fRMVH8j/N6kWYTbMC 2EiIZOG6wGOlx8KVqy299cHteYBADCtDhZHSp22UFocA+POTNW03ZfJN0XeovflcO7BN1Z aqiiynuIp5pHa4YkS4r9VPOnNa690nI5DZ9YHhBggPrh+ovfpbLC/MPlnubVDytP30KZtX XiuLEV+4jR67nnn3crCbKFvHz+bhrcBdkdam49PpSLIoLtvpQUkN7Tch8YiWMg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dFQ0Z2H6sz1C0C for ; Mon, 24 Nov 2025 12:21:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id ec31 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 24 Nov 2025 12:21:13 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: 120f8a4c2ae8 - main - arm: Add missing argument in mtx_init() calls List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 120f8a4c2ae8a011827d83b098ecf70c791f794b Auto-Submitted: auto-generated Date: Mon, 24 Nov 2025 12:21:13 +0000 Message-Id: <69244db9.ec31.50ab677@gitrepo.freebsd.org> The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=120f8a4c2ae8a011827d83b098ecf70c791f794b commit 120f8a4c2ae8a011827d83b098ecf70c791f794b Author: Christos Margiolis AuthorDate: 2025-11-24 12:19:25 +0000 Commit: Christos Margiolis CommitDate: 2025-11-24 12:19:25 +0000 arm: Add missing argument in mtx_init() calls Fixes: 9d18115ca0ab ("sound: Retire snd_mtx* wrappers") Reported by: CI Sponsored by: The FreeBSD Foundation MFC after: 4 days --- sys/arm/freescale/imx/imx6_ssi.c | 6 +----- sys/arm/freescale/vybrid/vf_sai.c | 6 +----- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/sys/arm/freescale/imx/imx6_ssi.c b/sys/arm/freescale/imx/imx6_ssi.c index 76870cfb29c9..f4ef955761b4 100644 --- a/sys/arm/freescale/imx/imx6_ssi.c +++ b/sys/arm/freescale/imx/imx6_ssi.c @@ -736,11 +736,7 @@ ssi_attach(device_t dev) sc->pos = 0; sc->conf = malloc(sizeof(struct sdma_conf), M_DEVBUF, M_WAITOK | M_ZERO); - mtx_init(&sc->lock, device_get_nameunit(dev), "ssi softc"); - if (sc->lock == NULL) { - device_printf(dev, "Can't create mtx\n"); - return (ENXIO); - } + mtx_init(&sc->lock, device_get_nameunit(dev), "ssi softc", MTX_DEF); if (bus_alloc_resources(dev, ssi_spec, sc->res)) { device_printf(dev, "could not allocate resources\n"); diff --git a/sys/arm/freescale/vybrid/vf_sai.c b/sys/arm/freescale/vybrid/vf_sai.c index 6ccfcae2bc2e..d3a3ab93fe80 100644 --- a/sys/arm/freescale/vybrid/vf_sai.c +++ b/sys/arm/freescale/vybrid/vf_sai.c @@ -691,11 +691,7 @@ sai_attach(device_t dev) sc->sr = &rate_map[0]; sc->pos = 0; - mtx_init(&sc->lock, device_get_nameunit(dev), "sai softc"); - if (sc->lock == NULL) { - device_printf(dev, "Cant create mtx\n"); - return (ENXIO); - } + mtx_init(&sc->lock, device_get_nameunit(dev), "sai softc", MTX_DEF); if (bus_alloc_resources(dev, sai_spec, sc->res)) { device_printf(dev, "could not allocate resources\n"); From nobody Mon Nov 24 12:25:23 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dFQ5H6WSfz6JbCF for ; Mon, 24 Nov 2025 12:25:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dFQ5H5fLdz3QNl for ; Mon, 24 Nov 2025 12:25:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763987123; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zlyS35OFLajw9u/itrGEP8zoKOgoceewF+QSW+hzHPw=; b=TSju6fMsgLxAgo09FoE7bgcIIUeYXHByf7yn9gc3P+/8DFAPLIC/mKR/qpcTC9mmG5tf2Z ilaVBoVikA1hOqxFk92zwBXTlWrxarBJ+Vjy13sBwRHxFckvfsg69OJcEHYCYkvoqsfNpX o7JHgpCzz+Z11Mq9FFGvR5ZKKR4s4FGTLLXGdVbL1V4xTEuphQDH5v5kOP3AOFjckAEtaF FPTBg+LKpU3dBgfCeSueFP8cjHzG3wfXK1wnIgPn/MsWiiC8AvXTb7PkVvGZUQ8E2RUHq7 zqu79j2sZQzOahMzGMuqtP6PsEsx0LH6MEbZQ1P5+Rav3iJ5jK6EmNLKJEeq5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763987123; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zlyS35OFLajw9u/itrGEP8zoKOgoceewF+QSW+hzHPw=; b=IhzgPYaFBkKHS3fafel3eJdyBwniBwMypLstzgB3bNujCfxDMzOl/e7iorItCaZHwRsOeS KTSrIZX150BsGyiS7fgCLwqKiw1MT+LZgfGcA7bVhUyfIPhux4d4yS7JVmEhTO00sWG2rU o45XZKIXLEm6ecL688nJ3Jy2/Us5JgnHDzo/8kfoWE4WmwPz8VNVIH0Gx88UCcgtIUe22Z qA0MztKi0SHdSbZWFKWTDfajDBTOwu/a7BcyiZoZSYwISDPrE1qevtlrjO0D3Pz/ROhS37 A3dtbVSX28j/g/B2WscZHlFFL/ovbxeVQ7Zjd9l1ifkhZTtqo7LTniMOPypF0g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763987123; a=rsa-sha256; cv=none; b=yunvxlaG3j3G8TUO/US/igbod59gpzZJrggxYltTxnDSGEtkhtTDPhYgncs0yht57zBJlX NimXuOv6sWAD9JI4a0EDuiyJNlG+WPMUEQ44N7J2NbRBSXBAczDDy8daFVlpFsAZLqiQZO bkEYslR0rwjYn4F+E/8W4X/2VrlqR4GjrgEZvcPeavMoYoS8barKwHxvZynP79phOegVlp lnMBNwffSgsrZHlhHDS85kQxA90Bb1yXFGNe1z2ExxINcbPxYXl2z/60epsizTux4gLJex +B2c+JpqiyQ4V1ptoUgsdQwqs7Nf7P2o7qhxkNICVPzNzIHb7MoTmbKUz5pKSg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dFQ5H5C04z1CsV for ; Mon, 24 Nov 2025 12:25:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id fc88 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 24 Nov 2025 12:25:23 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: 4991bb6a5c45 - stable/15 - snd_hda: Patch Lenovo V15 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 4991bb6a5c45b518df9b1a265c4f6f8c17ea4493 Auto-Submitted: auto-generated Date: Mon, 24 Nov 2025 12:25:23 +0000 Message-Id: <69244eb3.fc88.15ca5dd6@gitrepo.freebsd.org> The branch stable/15 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=4991bb6a5c45b518df9b1a265c4f6f8c17ea4493 commit 4991bb6a5c45b518df9b1a265c4f6f8c17ea4493 Author: Christos Margiolis AuthorDate: 2025-11-17 16:09:18 +0000 Commit: Christos Margiolis CommitDate: 2025-11-24 12:25:19 +0000 snd_hda: Patch Lenovo V15 PR: 290496 Tested by: adrian Sponsored by: The FreeBSD Foundation MFC after: 1 week (cherry picked from commit 5f624d923db0f2fb33990948cffdc24da44deaa8) --- sys/dev/sound/pci/hda/hdaa_patches.c | 3 ++- sys/dev/sound/pci/hda/hdac.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/dev/sound/pci/hda/hdaa_patches.c b/sys/dev/sound/pci/hda/hdaa_patches.c index 91bb244578c7..d4267aae80f8 100644 --- a/sys/dev/sound/pci/hda/hdaa_patches.c +++ b/sys/dev/sound/pci/hda/hdaa_patches.c @@ -341,7 +341,8 @@ hdac_pin_patch(struct hdaa_widget *w) } else if (id == HDA_CODEC_ALC257 && (subid == LENOVO_L5AMD_SUBVENDOR || subid == LENOVO_L5INTEL_SUBVENDOR || - subid == LENOVO_IDEAPAD3_SUBVENDOR)) { + subid == LENOVO_IDEAPAD3_SUBVENDOR || + subid == LENOVO_V15_SUBVENDOR)) { switch (nid) { case 20: patch_str = "as=1 seq=0"; diff --git a/sys/dev/sound/pci/hda/hdac.h b/sys/dev/sound/pci/hda/hdac.h index c11e6b2d6810..04b925b31fd4 100644 --- a/sys/dev/sound/pci/hda/hdac.h +++ b/sys/dev/sound/pci/hda/hdac.h @@ -389,6 +389,7 @@ #define LENOVO_3000_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x384e) #define LENOVO_IDEAPAD330_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x3808) #define LENOVO_IDEAPAD3_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x3881) +#define LENOVO_V15_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x3886) #define LENOVO_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0xffff) /* Samsung */ From nobody Mon Nov 24 13:35:37 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dFRfK5zszz6HCpk for ; Mon, 24 Nov 2025 13: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dFRfK3jL1z3Wms for ; Mon, 24 Nov 2025 13: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=1763991337; 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=37wrGh5hbX5l8pcopMFJuifzJWEPdODIMVHG3SHebOw=; b=KvceL6JG+iys7QMcaBq26e9XFwErdkFRvJuSXEdXIp4Kx/8+1KmofuovQ9bW6Avvsbh8rt aouqyGlXnlhjI0jARwmWP/KwctvlawlIM4NkPuB+VDbiL5a4mIFUBInD0tjLX71USgVYOT hBvWtG5RXZm3yC2hRlYgaJ20wRsYX2Lq866slVjLi10jImbdcEcrb7dSql6aa8A8HA7LRg QPkmuUflgl7Kr4o93Jm9X7aTdMF9jb9HjCRipErC9ypTTEEDCCdPnFEwBNjEsJlkUgooD0 oWmN8KzaLQG2F0t77NsZmZkoXprcJzvnpDzf1tJYToslIE9dS/jXXvxZCstYgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763991337; 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=37wrGh5hbX5l8pcopMFJuifzJWEPdODIMVHG3SHebOw=; b=MQdxaKoeFH47t1xLrW2/UdlUxYpGDy2sfQ/Oy/nVCZ6Qd/KhKNzOZ5Gk8lEW/HqvAJb8Bn F70aurWC3iFZQTy2c4vUEpgm7IFNJOGjpG1d5tkL2pusUIWK5f9FsMdXBfCqilXmFyBM86 EdHayXou4qVn/NgFCeT3XrbVzAZ16uwq8hSB5NJIkNLpwCknKIVtIx6O5B1IftUWBECDRI CJzj8nUGDOqvt00Q5ATTd644z3DDb939lkk7C9Tsd2HtxDAiSOXqVZX4sBgbMm9chgdWpK c/ij/+KBbrRNk2b02grmD5dlOB4zRGZRIggS0MlT13goxVPMXmH7ZHH4AGvgWA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763991337; a=rsa-sha256; cv=none; b=gXm/g4cJZu2YifXG9iwIcU8NGa6oPX171kK5Eb8KLuNM5H26R8HyfsFcJOwoIKNC2bRewe NeeY+9vb4EH4KDNAAgFsS8J+ilkO1xJiqK/jvVGKTQ1WgjBMfc9VNbYfgiZxjvB9M1TMz+ /0dHR4/Es3YWRZOrJxSkrXI5k9vnmpy3QBL5XUgpzBlIluLJ1kyoBDO2nN3Q5jN+gKGEM5 56iMLYQKxEH88r/vHzhLaEhQnG094truPIR2tJBz5N12Gmy3Y7BcIrbHXVt3ltCqfAy119 kec5JLjQUPyKoG3pnhA/75e3mDBUO/+0FQDuVvioEkWT2D2CEpbPTs19mJ1vgw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dFRfK35sWz1w7 for ; Mon, 24 Nov 2025 13:35:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 26f9a by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 24 Nov 2025 13:35:37 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Nicolas Provost From: Christos Margiolis Subject: git: 8f8b8e4af91d - main - sound: Fix revents in midi_poll() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8f8b8e4af91d4e158caf6ba4b728482311bfc7c3 Auto-Submitted: auto-generated Date: Mon, 24 Nov 2025 13:35:37 +0000 Message-Id: <69245f29.26f9a.69f58ba6@gitrepo.freebsd.org> The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=8f8b8e4af91d4e158caf6ba4b728482311bfc7c3 commit 8f8b8e4af91d4e158caf6ba4b728482311bfc7c3 Author: Nicolas Provost AuthorDate: 2025-11-24 13:35:08 +0000 Commit: Christos Margiolis CommitDate: 2025-11-24 13:35:08 +0000 sound: Fix revents in midi_poll() Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: christos Pull Request: https://github.com/freebsd/freebsd-src/pull/1887 --- sys/dev/sound/midi/midi.c | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/sys/dev/sound/midi/midi.c b/sys/dev/sound/midi/midi.c index e14a28557406..cca7b93abf5f 100644 --- a/sys/dev/sound/midi/midi.c +++ b/sys/dev/sound/midi/midi.c @@ -658,21 +658,19 @@ midi_poll(struct cdev *i_dev, int events, struct thread *td) mtx_lock(&m->lock); mtx_lock(&m->qlock); - if (events & (POLLIN | POLLRDNORM)) + if (events & (POLLIN | POLLRDNORM)) { if (!MIDIQ_EMPTY(m->inq)) - events |= events & (POLLIN | POLLRDNORM); - - if (events & (POLLOUT | POLLWRNORM)) - if (MIDIQ_AVAIL(m->outq) < m->hiwat) - events |= events & (POLLOUT | POLLWRNORM); - - if (revents == 0) { - if (events & (POLLIN | POLLRDNORM)) + revents |= events & (POLLIN | POLLRDNORM); + else selrecord(td, &m->rsel); - - if (events & (POLLOUT | POLLWRNORM)) + } + if (events & (POLLOUT | POLLWRNORM)) { + if (MIDIQ_AVAIL(m->outq) < m->hiwat) + revents |= events & (POLLOUT | POLLWRNORM); + else selrecord(td, &m->wsel); } + mtx_unlock(&m->lock); mtx_unlock(&m->qlock); From nobody Mon Nov 24 13:53:57 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dFS3V0cM9z6HFBs for ; Mon, 24 Nov 2025 13:53:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dFS3T6qDjz3YfG for ; Mon, 24 Nov 2025 13:53:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763992438; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=J3FGzT2WCb0O0r0TjXX3RK0jbDAT9oXsrAFKiIfXTPY=; b=bcEGkBd1j/Syg70wB+heInMp4yYjuENHfhbNGxP8EY9i2EgkMU0VeC23jnGDf+U35Vds5f sa/S9bbkst1gf9Au+pIJdLLq1Lv0DYKRp5tIqzn47exQbvoRLc62ZbkC8qUlDARRSY+6uP WqEYJmjU6wAI6tM89dAO9OCbcOr4UN2R4nnef1EE/6+vqF+Sh0IsHIvjXmm7Sdj/5FDteT lwJOvfIIWJ7eu2Uiy8Ir9daHW3IteQ39ltpTBg51MAwvMg45q5zYgpH7QMDh3kwGie4iVE OnAb6vT+65HcC7wp1AdDK9dKCkhGHtcaZp56pvbTWzJN8GBx5f7JvMP+jbv3UQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763992438; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=J3FGzT2WCb0O0r0TjXX3RK0jbDAT9oXsrAFKiIfXTPY=; b=XueAYuZrPDnztuR78y3GlQ57jdr1SAK0dbmImrD+fSld9gP6OLuHbEZ1kkDepflW2axzkt DBnVtmJJf4gM8YyRmagjwWjk4+r2WVKy6DNx1O+4dNBOL0TbaOSSJVsvlkvzX2c0TCuFRk ilfIYkl7jnvFlZr+PZJ+u4j2C8WhlGqo2RAWbejqvl0zjQbCXcvK1vuceXkRMtA57qzVqV EQgT7WWwivEdj9Zze5tcbHUWYjYTWNzq0ZqKS/BxYKYAwn4/RwVUtcJGcart6qaQEG0ikX Rb6aj1ZVWrM/jjT2Ypb/7coj6VAvOQ0Z9UtX8vYXyvW+lu/5it9Uj+Wsj+iBdg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763992438; a=rsa-sha256; cv=none; b=uYYrAFNVaCNFfL+GPGV9J7XvVYBoLQ2WlQgRSf8yrwYypiqsyGuHFfUxx/fYFiIZhLvYWK ILdf6C+EZBYZFunbAowFzUMsTjv2BVeZzFtQVbQfKONMp8mY9HAoploAtPgdTZ2RPP0Pcg OLssunrQi603UpoS4F5udLknXlFR5X4O+YBnQ8S8+xVMZKoWpuwARo5Nimqtn1SxdR1neW +mpFb3IwKWAERDcdtaHZYm3CtB5Egy7Ezhzd031MoilaiImuzjxzuYzBEUZtJpHWtmbwCD 251RicrEt9pES13oS0zNsKknh5v/muRlcdkw+j1pUpLmn1l8M032uNOaUrnLeg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dFS3T5zhkz2HL for ; Mon, 24 Nov 2025 13:53:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 28d4d by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 24 Nov 2025 13:53:57 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 0628c252bd16 - main - rtld: fix powerpc build List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0628c252bd161ccdd1228a3b8aefeb471044ca04 Auto-Submitted: auto-generated Date: Mon, 24 Nov 2025 13:53:57 +0000 Message-Id: <69246375.28d4d.42d735f2@gitrepo.freebsd.org> The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=0628c252bd161ccdd1228a3b8aefeb471044ca04 commit 0628c252bd161ccdd1228a3b8aefeb471044ca04 Author: Konstantin Belousov AuthorDate: 2025-11-24 08:44:52 +0000 Commit: Konstantin Belousov CommitDate: 2025-11-24 13:53:49 +0000 rtld: fix powerpc build In arch_fix_auxv(), remove local variable shadowing the argument, remove write-only variable, and declare the loop variable. The wrong patch was committed after series of local reverts and re-apply. Fixes: b2b3d2a962eb00005641546fbe672b95e5d0672a Sponsored by: The FreeBSD Foundation MFC after: 1 week --- libexec/rtld-elf/powerpc/reloc.c | 4 +--- libexec/rtld-elf/powerpc64/reloc.c | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/libexec/rtld-elf/powerpc/reloc.c b/libexec/rtld-elf/powerpc/reloc.c index a38cadfe76ba..c160028cea6d 100644 --- a/libexec/rtld-elf/powerpc/reloc.c +++ b/libexec/rtld-elf/powerpc/reloc.c @@ -844,10 +844,8 @@ __tls_get_addr(tls_index* ti) void arch_fix_auxv(Elf_Auxinfo *aux, Elf_Auxinfo *aux_info[]) { - Elf_Auxinfo *aux; - bool old_auxv_format; + Elf_Auxinfo *auxp; - old_auxv_format = true; for (auxp = aux; auxp->a_type != AT_NULL; auxp++) { if (auxp->a_type == 23) /* AT_STACKPROT */ return; diff --git a/libexec/rtld-elf/powerpc64/reloc.c b/libexec/rtld-elf/powerpc64/reloc.c index 29c52d8fc19f..4a4107aef861 100644 --- a/libexec/rtld-elf/powerpc64/reloc.c +++ b/libexec/rtld-elf/powerpc64/reloc.c @@ -741,10 +741,8 @@ __tls_get_addr(tls_index* ti) void arch_fix_auxv(Elf_Auxinfo *aux, Elf_Auxinfo *aux_info[]) { - Elf_Auxinfo *aux; - bool old_auxv_format; + Elf_Auxinfo *auxp; - old_auxv_format = true; for (auxp = aux; auxp->a_type != AT_NULL; auxp++) { if (auxp->a_type == 23) /* AT_STACKPROT */ return; From nobody Mon Nov 24 14:29:05 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dFSr22YNdz6HHSV for ; Mon, 24 Nov 2025 14:29:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dFSr20Lgcz3c0f for ; Mon, 24 Nov 2025 14:29:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763994546; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mE9YbnoKvKDAThlZQGpuiOSM+TS7ttYO5uNNvWCiGQ0=; b=mDs3bcaB2UnCtJlAjQELB7SYiupOxTAkHB3ZQIiHXDWW0OvIIJNiwpNwRjR1dNfPACltJw PsqIE+2Z8KoDxaRiVfcL7gDXygwmPDyOb2mq0VHf4ThYHlcION9SYdz76D15k8cbNTKTxo APf+TPKF2YnUyZwEsSD1TOhjsnjoXXnwHkLObj9/Ch4ZB8HOkKrxv9FgCA/vlfW+5ToXgd 51r0oFG4BtFSGV0RxY1JOdbTQgaxetoPMZ7zLv3yw9FkE0i9pRGhloKL1XPQl2lM4LVCwp 5vOakfdInHbSPZRPbbg+WWiiW+FOj+9S+FbDwOMsdvfgLIgQYzV+7AfNqgszIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763994546; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mE9YbnoKvKDAThlZQGpuiOSM+TS7ttYO5uNNvWCiGQ0=; b=jfFL8mocz91+UxBb8Faxsth+EqEvCZspW98JMc2aUM2/xEYdeTWLXeKY7vDBp7Fgi/AwGy i3ROf0RSjo+9aoYGChsQMedqrHSydE1gz8jljECF1+CGwevEMZsupzlOXs+qXmduXfDaUk 4UdyJrAbqzG7sX8qvqIxVtIypW1EmDHN4EcaAoXEZvFQTvdMgeHF0eSpHqFRXDbG8lb0Da tLMWLHfmXrNRIJ/C6jyzz0oMEgmqUY1niEdyfl41B7gwAVs3nnwnJmtJ+1Na0lEAAMcuVO LZUuV/Xc5NM08t2XVmr5qoC4T57FFxpqE7NWJK4lK2TVl5x67NNYVQt4hgdbiQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763994546; a=rsa-sha256; cv=none; b=qx0tsOqyd9/gBosXo+QqGgooCf1wClvhsnpIJPl5oxsMpHGGX4rx43FwHC0RSk0DWLzri4 ewHh3T+XQGOVy18HPxWL2TEKHUL+6BKUw8CigLX22PJf13KXl2z+O5cRplxDttMoUBHIaQ 9/h1FqG4pzlGTfHCmIIVj8OjbDqC3FZ8eVZEhIuZqBg6Y9J4BxipUI3QHJJSHdyimgApLG ISJS7gx6wQWWIndwGyEvQOH50J0bnj3IQhOlIrJXs+/2Zh/Kgm2CgHqrL9YeZR+BuBIBEH ALe1rhd08TjtuGnDMCr3/f8nVKqkITnctJrTJGW4qgemYk6TbHjdlipPPnDcaQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dFSr16pFpz2qP for ; Mon, 24 Nov 2025 14:29:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2e085 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 24 Nov 2025 14:29:05 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 673924122470 - main - krb5: Use sh to run mk_cmds List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 673924122470463dfb9089e12b1b4496783a77b8 Auto-Submitted: auto-generated Date: Mon, 24 Nov 2025 14:29:05 +0000 Message-Id: <69246bb1.2e085.77e8d996@gitrepo.freebsd.org> The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=673924122470463dfb9089e12b1b4496783a77b8 commit 673924122470463dfb9089e12b1b4496783a77b8 Author: Mark Johnston AuthorDate: 2025-11-21 17:54:38 +0000 Commit: Mark Johnston CommitDate: 2025-11-24 14:28:42 +0000 krb5: Use sh to run mk_cmds Otherwise etcupdate apparently can fail if its private object directory under /var/db is in a filesystem mounted noexec. We shouldn't be building this target at all, but for now, just apply this workaround. PR: 291043 Reviewed by: ivy, cy, des MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D53861 --- krb5/util/ss/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/krb5/util/ss/Makefile b/krb5/util/ss/Makefile index 2c48ccf56573..30e1bf7b025e 100644 --- a/krb5/util/ss/Makefile +++ b/krb5/util/ss/Makefile @@ -85,7 +85,7 @@ ${GEN_SS_ERR_C}: ${GEN_SS_ERR} rm -f et-c-${.PREFIX}.et et-c-${.PREFIX}.c std_rqs.c: mk_cmds std_rqs.ct ss_err.h - ./mk_cmds ${KRB5_DIR}/util/ss/std_rqs.ct + sh mk_cmds ${KRB5_DIR}/util/ss/std_rqs.ct .include From nobody Mon Nov 24 14:29:07 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dFSr331rMz6HH2c for ; Mon, 24 Nov 2025 14:29:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dFSr313tQz3c2k for ; Mon, 24 Nov 2025 14:29:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763994547; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2eA6ZwYW4ZLoiSGixi8nbWjNelpufec+c1zSa1i5o6A=; b=sGml5gXTG+7/Ae7FiPlPOXMpxwigHues7YHPA7vK5TbT9mpD+rWlbdA3JN5q1oKBnlN/5f +TyVolCv8PRjS6bmBPaAIjHS9eTqryL9eoNBXOYjPEpxMLAdZ5rhe+9IqHBDz2zqceS2KE sE/sV827Ry6nDGsauCEFEZRnZC3C2B3mbiwW84xSDqizgYg20Dec0YXr07oFsUXuPcGo+0 NQMcEFAQLh/IwOF8iFHPWtBy9RHlmD38oo1XyZ222F/EMCUx9aSUgZeinsAMZRl33lcJVJ l2g59Gkcc97TzPzhofxMY2BmZf8nzo35fhU2hYor8tMMcVyFOI8Qy/Y+Z0Qiww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763994547; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2eA6ZwYW4ZLoiSGixi8nbWjNelpufec+c1zSa1i5o6A=; b=hY1URR1Qlk2k8GsAKsm3WaIBDh6Kjb5p8QjZY41j8KPBOmdlRW1I2Ii+pub+bwk+z3+mfF gYZG86kGl96NoTDFTkzCAsEOO4ChPgIW/cLilxIEZoXOeeiG+LA/Nn7pdBsJ6PhjOKS4YN t4U1zNTOfNv0hz9nGrN6d+2h8LnikxBPoO8KXKqonsEecwCSXRPhNh7E/K1ZRITn3IUHo7 zr9donq2MtCg4B1PQhp5w14qwumH05t/xO51nl46QeCrG4hjzI5GJ3gGUXfAgmXTzeBaXF bT6TEFcQXC9zaXQAwftapgl4qvJmJo9JfhqEj57n3yaqzarXQC9Xwo5uHjYPIw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763994547; a=rsa-sha256; cv=none; b=fh/z/I1KXiqubEJTFzm3TEEO4BSja2Ge7GvJU/WVdwmZnr+mD5P+GZqqT3TwxPwEXyn6+e SZJ0CPraaPUArBPXwJK61UV2YqO+igoMkIGfWJsnv4zK4ge1tNkLNu9HogbI8B5z3qtc9Q LeEg4SryTBJ4Tok9Bn0tmHqP1k5lfwG89bi8cfDg3atzz0gMePBDSEbE90+EiliWNRTvjj tmxT1klMOp6lJEg9+OVQrtdXb7cQIWNHHJUmrlILtc8bPCi2mxb2wP3V9aPR98d01s+Icu wkwbIKv0Z/KtEBWbXUQapwuTJgpbqh6uUdF8V0UdQQF5MYQQgLEHSzUgSVmf8g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dFSr30RtTz3XC for ; Mon, 24 Nov 2025 14:29:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2c1d4 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 24 Nov 2025 14:29:07 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: bac572b2b1c9 - main - bhyve/slirp: Avoid a nested declaration of environ List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bac572b2b1c9aec0ebfd3ae1fd02b314984cb716 Auto-Submitted: auto-generated Date: Mon, 24 Nov 2025 14:29:07 +0000 Message-Id: <69246bb3.2c1d4.19bb91f6@gitrepo.freebsd.org> The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=bac572b2b1c9aec0ebfd3ae1fd02b314984cb716 commit bac572b2b1c9aec0ebfd3ae1fd02b314984cb716 Author: Mark Johnston AuthorDate: 2025-11-24 14:08:21 +0000 Commit: Mark Johnston CommitDate: 2025-11-24 14:28:42 +0000 bhyve/slirp: Avoid a nested declaration of environ Fixes: 0e62ebd20172 ("bhyve: Move the slirp backend out into a separate process") --- usr.sbin/bhyve/net_backend_slirp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/usr.sbin/bhyve/net_backend_slirp.c b/usr.sbin/bhyve/net_backend_slirp.c index c98e54b2ee88..f2b483c5e314 100644 --- a/usr.sbin/bhyve/net_backend_slirp.c +++ b/usr.sbin/bhyve/net_backend_slirp.c @@ -73,11 +73,12 @@ struct slirp_priv { struct mevent *mevp; }; +extern char **environ; + static int slirp_init(struct net_backend *be, const char *devname __unused, nvlist_t *nvl, net_be_rxeof_t cb, void *param) { - extern char **environ; struct slirp_priv *priv = NET_BE_PRIV(be); nvlist_t *config; posix_spawn_file_actions_t fa; From nobody Mon Nov 24 14:29:08 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dFSr44HrJz6HHYx for ; Mon, 24 Nov 2025 14:29:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dFSr41l0rz3bp6 for ; Mon, 24 Nov 2025 14:29:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763994548; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SCpmTvyOE/Vhif536izdQTP1znnEtk9fsffZsnisJoU=; b=w/1mwsncr903oaX/ct+2dGO2bocfq52/U4wz4k1oZeuiBzvt8qJCJ4FnPNSrmOwKS1y0gz Jvt0LBWK5hyO8xVfGFjsNkj2tWfVSPfNAOD6ZF1gm4wUitKoqiOERAhpGfm/iAZ55yaoXj g/qlCAZeMHF7ap10onMoFDfSm43mc34tFvsq7DNoou+t4spxZgDKOdBxAPqxwXkD5QJXqt 38Y5AynEs7IQ/dfEwwgv4grDIfHZeh8bgxrG/CmhFKIjKpvWXfVSTRXzGfYb81dFUcTLy3 gjbiBKIx4Xk7JDivpWePWqOuZftNMguFwY4UY4BLWDtQXnwCbsjx6m+6wSTFDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763994548; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SCpmTvyOE/Vhif536izdQTP1znnEtk9fsffZsnisJoU=; b=mjBxzBQ3dF/wP2ibZhFk8grtnxy/Fitcs9drH+5Ty/qRgUfwYrf0+5qx9X2SRGTTSB9LVG a3HsHgDKn9f5dqISTx9rIlzcbS0VlocftyfQ+T/V70lnY+Sn5Z3xWTIelkOeuDe41m9E+Q VI8Xea0XtWl2fpgeDFi0OaA2kG9lbie/jxPtWpEbhf8mKh2UaAPndzRShMAzDEKIyiZhIb 8YnCBBamaftl1H+pwdgSuDkyfw0K10tJxe0wq8n5EQjPWnaomr47QncNPU3TAcqV6JqQyA mb4TCJN2SleIPqOq7QfG99gwOGWFtS2h6V+QfCrK+H3mfiwbS+Iukulb/+x3lg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763994548; a=rsa-sha256; cv=none; b=Q1tTe1LChHNFB4p8EjSTqv7St4nm4KmkASU/sTeERKLXj9uECGQBW2VweSTk0Ggi6M5Gtp yEKgimWC1UG+lsN8eRU26A2oLnoao6YBi3BzOlX+iI9G4knT4K63ZY72zS7h1GU3szdSPy +fkxZ7O9FG4So6q552FXBtBirmKO7wGdDnPMXnEgdkHlAN0Rmgvb58sMeTQ0crGhrXobCg +gGgc1nsuTDedfWZoCHcIY2RNzuIDuFSBraOIU3XIVKz7DM4e6Jun4oLLUQJQjDUajmICb zcaC/4aiC3TTq0CL6YtmexeU7cVTk0vJOOpTFNx6tJqhEv1NojFRNYQWnSlHWw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dFSr41F7Pz3FN for ; Mon, 24 Nov 2025 14:29:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2d0b5 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 24 Nov 2025 14:29:08 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: b0c7eaf83d21 - main - bhyve/slirp: Drop privileges before entering capability mode List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b0c7eaf83d21bbc333e247ab9e136965b3ca54ed Auto-Submitted: auto-generated Date: Mon, 24 Nov 2025 14:29:08 +0000 Message-Id: <69246bb4.2d0b5.1f05f590@gitrepo.freebsd.org> The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=b0c7eaf83d21bbc333e247ab9e136965b3ca54ed commit b0c7eaf83d21bbc333e247ab9e136965b3ca54ed Author: Mark Johnston AuthorDate: 2025-11-24 14:15:27 +0000 Commit: Mark Johnston CommitDate: 2025-11-24 14:28:42 +0000 bhyve/slirp: Drop privileges before entering capability mode When in restricted mode, the slirp-helper process enters a capsicum sandbox, after which we cannot look up the uid for the "nobody" user. Reverse the order. Reported by: kp Fixes: 0e62ebd20172 ("bhyve: Move the slirp backend out into a separate process") --- usr.sbin/bhyve/slirp/slirp-helper.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/usr.sbin/bhyve/slirp/slirp-helper.c b/usr.sbin/bhyve/slirp/slirp-helper.c index ee62dd212369..06f393aab724 100644 --- a/usr.sbin/bhyve/slirp/slirp-helper.c +++ b/usr.sbin/bhyve/slirp/slirp-helper.c @@ -547,6 +547,11 @@ main(int argc, char **argv) priv.slirp = slirp; + /* + * Drop root privileges if we have them. + */ + drop_privs(); + /* * In restricted mode, we can enter a Capsicum sandbox without losing * functionality. @@ -554,11 +559,6 @@ main(int argc, char **argv) if (restricted && caph_enter() != 0) err(1, "caph_enter"); - /* - * Drop root privileges if we have them. - */ - drop_privs(); - /* * Enter our main loop. If bhyve goes away, we should observe a hangup * on the socket and exit. From nobody Mon Nov 24 15:37:25 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dFVLs3Vbpz6HNmP for ; Mon, 24 Nov 2025 15:37:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dFVLs2vJkz3kx0 for ; Mon, 24 Nov 2025 15:37:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763998645; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=okVBTPddrSV67u8tPUIuyxA7+67rbBV8m99wm0ih8NE=; b=mHEtmstzWzp3Lva1YPwkn+hqn9k7xyMzS4cliVcwn2qgffAEHoR+siGZbHpBUur/FsV5P9 g7S/dm7+iDPzs8vkBA9JVRczPoxB/WGmNSgs9J+PWpi3ovmUFfkc4hh5D57yiOWxsYAyqW c/nJU+DwFzLi29V7zM1+mTWxkQB59VtxIgfLXVnSJK8C0N98SHEyJDaKKrgLH9Bgp0W/zV TqL0nOtWVBYTsjRRtkPJlT68IEItJhdgzeOAnQgkdNva0dnyN7Gp862CoUxUc+fOUBXmLb hgXuAXd0giml9tSfbI/loXV9/6m9WF7gsTjk0xDleF7tccVPKUt+byZ3w6OK1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763998645; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=okVBTPddrSV67u8tPUIuyxA7+67rbBV8m99wm0ih8NE=; b=oKRSc3JGf9/WoGibKHR9PMt9dpIgcD4K5ni1TjZ182cXGuCiLw+wfDP8wHu3jTL+I2/abF FOfkycTUasDWHt5pz/fCV2e/IMPaM7TL9N/tJvweVwqdJNv2+x3eOJ/00Va0zZLFcrrnS9 vV0dJcrsbMl6X44ehTBLZr73ogZoNyyCHJ/G3CiO1ZBjUDMLvzwX+Tpj0xaE29kh6vVEyr SLAjktWnLiYN3N5AwhfYsbdL2WWNky8Nrq+Z7/1M3WF7VdLdMnCX40ziaTbpSZFJlbfNKN muq5LGGamBUgzFIBLdl6Ly+x5ntRVOR1oLrEox4DIk1Vjdes++XFzUJN0cOIcg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763998645; a=rsa-sha256; cv=none; b=EuAlC8G9EFDhpmo/C994iosYEx53owE2/F/TxTP4iCW8TXZjSQj1lR/lzeutKwGrq3dwss 3D3kaYDDJQkO280YRxm27Zy8UPAA00pvSkQ+EpPEzdYLVKVD6p+S8ZKELahjCJ6EnWejvO SBcRpSB8f1pPnX7iP5Y7/jUDzXvAeNTR8txwYAsytbSLkC8z8lcpWo8dUWkq3V0CxvmYwL 1l3Y1qSil3q1TxXn3icbxFjiEwkALZehc0q4rxtvXfimGxUoSxx4r9biZWTgRGCozqjda0 R6SBYCHEQjE7/p+K34CToRe6d2wRzvymMAeYRkOxHEUOlz+LN7+IalI/4YAwaw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dFVLs2DHZz4nn for ; Mon, 24 Nov 2025 15:37:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 32f47 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 24 Nov 2025 15:37:25 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Gallatin Subject: git: 2fe37927d419 - main - loopback: Clear hash unconditionally. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gallatin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2fe37927d41990abe8d1c336e75fd75873285e90 Auto-Submitted: auto-generated Date: Mon, 24 Nov 2025 15:37:25 +0000 Message-Id: <69247bb5.32f47.35facef0@gitrepo.freebsd.org> The branch main has been updated by gallatin: URL: https://cgit.FreeBSD.org/src/commit/?id=2fe37927d41990abe8d1c336e75fd75873285e90 commit 2fe37927d41990abe8d1c336e75fd75873285e90 Author: Andrew Gallatin AuthorDate: 2025-11-24 15:36:32 +0000 Commit: Andrew Gallatin CommitDate: 2025-11-24 15:36:41 +0000 loopback: Clear hash unconditionally. Clear the RSS hash on transmit, now that RSS hashing is enabled unconditionally, and the network stack may want to trust that it is getting the correct hash on input. Differential Revision: https://reviews.freebsd.org/D53090 Reviewed by: zlei Sponsored by: Netflix --- sys/net/if_loop.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/sys/net/if_loop.c b/sys/net/if_loop.c index 3005965a4fcb..ec0ff0e77aa6 100644 --- a/sys/net/if_loop.c +++ b/sys/net/if_loop.c @@ -219,9 +219,7 @@ looutput(struct ifnet *ifp, struct mbuf *m, const struct sockaddr *dst, if_inc_counter(ifp, IFCOUNTER_OPACKETS, 1); if_inc_counter(ifp, IFCOUNTER_OBYTES, m->m_pkthdr.len); -#ifdef RSS M_HASHTYPE_CLEAR(m); -#endif /* BPF writes need to be handled specially. */ if (dst->sa_family == AF_UNSPEC || dst->sa_family == pseudo_AF_HDRCMPLT) From nobody Mon Nov 24 15:37:26 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dFVLt4HZvz6HNmT for ; Mon, 24 Nov 2025 15:37:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dFVLt2y2nz3l4n for ; Mon, 24 Nov 2025 15:37:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763998646; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FCa9anz2G7IExOLWgr1+bMoezKr0vCcJMtAsRjXLUmU=; b=EUYPgj5ZZTlkYRHGdyGITxoNReYEM0OyffXvkzmELWMxkmdGCZADuBr+R0QxgFW+CsfaVt kktLeWw29vXc+AYMyg4P0utj2hzoLsx7wqgWyqwx3RjjqyY0VVQurFjl5OvBv0A4C32GJj 5bN1ylxapdT3gg6+8cm30O3iwOpI5l2a/+uLuegtzqfJqKIIMKQqj0PHBdQibdxYepINP3 /dA2gp7r22SYXJEf4nNztRvjmWmMgyEwc2iw3zieMJwiqDX9dvU+biglsrzPvoh0MUzU3o qNcMgKlfkZzyZLU6gitnHmS55j8rQxI5J9LpPoXUQtnWWKyrjW8dLljL+gF/wQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763998646; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FCa9anz2G7IExOLWgr1+bMoezKr0vCcJMtAsRjXLUmU=; b=iRHoM/CJ/GsyTK9MA5JP+Ygfw8hqaAEQAl0FmKfQBtoJAyh2JWlxfrF0JdRYhYjXLNQiUs R4gNJz65uqwdh3+iaX8TfO+lhaNjzmu4uQu5zN7lTpvNUS3kaxcBK7wWNc6bQXQXwAT60x MXHltMz0cA8/EFGWgLE2q2zFxVvgwYCTEIfLPUjZ2XutENWuBmXe5yoXW+M18n9yynO1nm oHhn/4BTj/rNul5zRMDkit+LpTxWEcvXFL3T0LOG/9bKfLgNRxGioUY07aO3feFERSvxrG n9CMdIfh67J8ZqcTsRVyslh1noPBkTMoPqpFBX1MS9lzkV1dj6uyRXtcsp8k7w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763998646; a=rsa-sha256; cv=none; b=Bg6/9yZijJIACVouamiZMxnshO7TRiOI1VBC8joneObOAguF+/nOCiZSkSX+t2AhbVhjGY wWNYqKTvnBPf3GbiF0Syy/ZrZgX7GwUszmJRZscg4Kl0Q9hjdaRnbTohFKyeT5jhVthAgj P/FxIAYa/01+hroGc+Fyr8gW1CvwE9cVZrI6hcqsGySmUAYEVLfUvxpuQiUEZrGIZPpPcS vXx0NZ0MsPo28QSNH2x6h7fN3JFZkdd5tEBgEb5XKJh7quI9vSFL3yKSHPKnSh+UMiNaBK GHxf1jBnGqS7e6a3IEILN1uFhwOVAJ5aO58Ao+tsY+8thVwdrBwTd++jJL43Pg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dFVLt2XZNz4np for ; Mon, 24 Nov 2025 15:37:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 331a2 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 24 Nov 2025 15:37:26 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Gallatin Subject: git: 8f94088bc5d3 - main - mlx5: use newly exposed RSS hash key API rather than ad-hoc hashing List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gallatin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8f94088bc5d3ee586b36f8f7b269223b420ac957 Auto-Submitted: auto-generated Date: Mon, 24 Nov 2025 15:37:26 +0000 Message-Id: <69247bb6.331a2.770dcda2@gitrepo.freebsd.org> The branch main has been updated by gallatin: URL: https://cgit.FreeBSD.org/src/commit/?id=8f94088bc5d3ee586b36f8f7b269223b420ac957 commit 8f94088bc5d3ee586b36f8f7b269223b420ac957 Author: Andrew Gallatin AuthorDate: 2025-11-24 15:36:09 +0000 Commit: Andrew Gallatin CommitDate: 2025-11-24 15:36:41 +0000 mlx5: use newly exposed RSS hash key API rather than ad-hoc hashing Differential Revision: https://reviews.freebsd.org/D53091 Reviewed by: kib Sponsored by: Netflix --- sys/dev/mlx5/mlx5_en/en.h | 2 -- sys/dev/mlx5/mlx5_en/mlx5_en_main.c | 30 +----------------------------- sys/dev/mlx5/mlx5_en/mlx5_en_rx.c | 4 ---- 3 files changed, 1 insertion(+), 35 deletions(-) diff --git a/sys/dev/mlx5/mlx5_en/en.h b/sys/dev/mlx5/mlx5_en/en.h index f59902be226a..768f58188220 100644 --- a/sys/dev/mlx5/mlx5_en/en.h +++ b/sys/dev/mlx5/mlx5_en/en.h @@ -53,10 +53,8 @@ #include #include -#ifdef RSS #include #include -#endif #include diff --git a/sys/dev/mlx5/mlx5_en/mlx5_en_main.c b/sys/dev/mlx5/mlx5_en/mlx5_en_main.c index 4658bebb7845..daa98752c59b 100644 --- a/sys/dev/mlx5/mlx5_en/mlx5_en_main.c +++ b/sys/dev/mlx5/mlx5_en/mlx5_en_main.c @@ -2915,24 +2915,7 @@ err_modify: static void mlx5e_get_rss_key(void *key_ptr) { -#ifdef RSS rss_getkey(key_ptr); -#else - static const u32 rsskey[] = { - cpu_to_be32(0xD181C62C), - cpu_to_be32(0xF7F4DB5B), - cpu_to_be32(0x1983A2FC), - cpu_to_be32(0x943E1ADB), - cpu_to_be32(0xD9389E6B), - cpu_to_be32(0xD1039C2C), - cpu_to_be32(0xA74499AD), - cpu_to_be32(0x593D56D9), - cpu_to_be32(0xF3253C06), - cpu_to_be32(0x2ADC1FFC), - }; - CTASSERT(sizeof(rsskey) == MLX5E_RSS_KEY_SIZE); - memcpy(key_ptr, rsskey, MLX5E_RSS_KEY_SIZE); -#endif } static void @@ -3044,15 +3027,12 @@ mlx5e_build_tir_ctx(struct mlx5e_priv *priv, u32 * tirc, int tt, bool inner_vxla CTASSERT(MLX5_FLD_SZ_BYTES(tirc, rx_hash_toeplitz_key) >= MLX5E_RSS_KEY_SIZE); -#ifdef RSS + /* * The FreeBSD RSS implementation does currently not * support symmetric Toeplitz hashes: */ MLX5_SET(tirc, tirc, rx_hash_symmetric, 0); -#else - MLX5_SET(tirc, tirc, rx_hash_symmetric, 1); -#endif mlx5e_get_rss_key(hkey); switch (tt) { @@ -3061,12 +3041,10 @@ mlx5e_build_tir_ctx(struct mlx5e_priv *priv, u32 * tirc, int tt, bool inner_vxla MLX5_L3_PROT_TYPE_IPV4); MLX5_SET(rx_hash_field_select, hfs, l4_prot_type, MLX5_L4_PROT_TYPE_TCP); -#ifdef RSS if (!(rss_gethashconfig() & RSS_HASHTYPE_RSS_TCP_IPV4)) { MLX5_SET(rx_hash_field_select, hfs, selected_fields, MLX5_HASH_IP); } else -#endif MLX5_SET(rx_hash_field_select, hfs, selected_fields, MLX5_HASH_ALL); break; @@ -3076,12 +3054,10 @@ mlx5e_build_tir_ctx(struct mlx5e_priv *priv, u32 * tirc, int tt, bool inner_vxla MLX5_L3_PROT_TYPE_IPV6); MLX5_SET(rx_hash_field_select, hfs, l4_prot_type, MLX5_L4_PROT_TYPE_TCP); -#ifdef RSS if (!(rss_gethashconfig() & RSS_HASHTYPE_RSS_TCP_IPV6)) { MLX5_SET(rx_hash_field_select, hfs, selected_fields, MLX5_HASH_IP); } else -#endif MLX5_SET(rx_hash_field_select, hfs, selected_fields, MLX5_HASH_ALL); break; @@ -3091,12 +3067,10 @@ mlx5e_build_tir_ctx(struct mlx5e_priv *priv, u32 * tirc, int tt, bool inner_vxla MLX5_L3_PROT_TYPE_IPV4); MLX5_SET(rx_hash_field_select, hfs, l4_prot_type, MLX5_L4_PROT_TYPE_UDP); -#ifdef RSS if (!(rss_gethashconfig() & RSS_HASHTYPE_RSS_UDP_IPV4)) { MLX5_SET(rx_hash_field_select, hfs, selected_fields, MLX5_HASH_IP); } else -#endif MLX5_SET(rx_hash_field_select, hfs, selected_fields, MLX5_HASH_ALL); break; @@ -3106,12 +3080,10 @@ mlx5e_build_tir_ctx(struct mlx5e_priv *priv, u32 * tirc, int tt, bool inner_vxla MLX5_L3_PROT_TYPE_IPV6); MLX5_SET(rx_hash_field_select, hfs, l4_prot_type, MLX5_L4_PROT_TYPE_UDP); -#ifdef RSS if (!(rss_gethashconfig() & RSS_HASHTYPE_RSS_UDP_IPV6)) { MLX5_SET(rx_hash_field_select, hfs, selected_fields, MLX5_HASH_IP); } else -#endif MLX5_SET(rx_hash_field_select, hfs, selected_fields, MLX5_HASH_ALL); break; diff --git a/sys/dev/mlx5/mlx5_en/mlx5_en_rx.c b/sys/dev/mlx5/mlx5_en/mlx5_en_rx.c index eb569488631a..262558d529dc 100644 --- a/sys/dev/mlx5/mlx5_en/mlx5_en_rx.c +++ b/sys/dev/mlx5/mlx5_en/mlx5_en_rx.c @@ -358,7 +358,6 @@ mlx5e_build_rx_mbuf(struct mlx5_cqe64 *cqe, struct mlx5e_rq *rq, /* check if a Toeplitz hash was computed */ if (cqe->rss_hash_type != 0) { mb->m_pkthdr.flowid = be32_to_cpu(cqe->rss_hash_result); -#ifdef RSS /* decode the RSS hash type */ switch (cqe->rss_hash_type & (CQE_RSS_DST_HTYPE_L4 | CQE_RSS_DST_HTYPE_IP)) { @@ -386,9 +385,6 @@ mlx5e_build_rx_mbuf(struct mlx5_cqe64 *cqe, struct mlx5e_rq *rq, M_HASHTYPE_SET(mb, M_HASHTYPE_OPAQUE_HASH); break; } -#else - M_HASHTYPE_SET(mb, M_HASHTYPE_OPAQUE_HASH); -#endif #ifdef M_HASHTYPE_SETINNER if (cqe_is_tunneled(cqe)) M_HASHTYPE_SETINNER(mb); From nobody Mon Nov 24 15:54:20 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dFVkN6cW6z6HPbk for ; Mon, 24 Nov 2025 15:54:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dFVkN5vnhz3qMD for ; Mon, 24 Nov 2025 15:54:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763999660; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3bAc4K8FBSnnG6seGNFfNDn9YaUs/G1K+ermz64Jjnc=; b=g2xzjSr1c/JunkufAZpKDsMymfEoNFvdtruUnWHhzEHfAGAvJbugOSouLoLzglj64vwHz4 hHUiKOJivGmI5j4GFamyFd7y/sAnnRiemnHzQiy2BMLKkuSMJiayL7i408Zc5nM987h1uF H5jh4uOIBmnRPvNTNL4cWqmWJRa7nw68fgdSxE0LjH9ffiAREb8qwS8U09Nd3UY77F6dM1 N15WnkPvZgn8lc70A8FPnl67GTUJGMEwXEV2T0WRd02LhcxwJErawTz36m6qePeNwQ9eHD x+9uWdQkMOSfJpAriNhwyMQEDZzedZHj9ChR8Kh1KpxQza5w7Uo/8UN3nV5X1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763999660; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3bAc4K8FBSnnG6seGNFfNDn9YaUs/G1K+ermz64Jjnc=; b=Izp+4zLJTjhAzx5+OxoZBxfWP1hvoXT2M2w417xQ+WGhSw2O0pjVZ187JW95yG2uN2hmco b4lmCSqtvgMJYwbxmip39ZJCijbHsa4hd5FdfqIXMCv/taJqGJhuVg2d9XgrQiiwDpouBI jQKJ9fLfOrqtoGcCgvvD0RafGUWD325w4/lsuG2qvZsaJ6fDKYzg3Ru4bt7vTqtI84nq9F SW0GJJc/VH9QmPNb/QxfJVGptiGX5I0eO+8PSmURT1qgqZxpDUATfGNIXla9Mx3dgA9g4h 6lqYoGgTX1re8f6Hbwade3E747ZVZXnnRWjOWxJ33wtEQV/EtYiDTre1Jx1XgQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763999660; a=rsa-sha256; cv=none; b=l+uZ5Mf9dnTaPEHYeg3NoSNTM71xa4WSDlTiIlhXoKa8oON8yEHCIBP27DxOhRmKIGYSRQ xF/54c+KljFSs+HMJRxhP1uWcSODfFfIft3sfRKqP2id0MbGvPlhWP6EeR6vqVG9CAeZqw N3AlgEgxbItywRlTjWeJyWbDfpoGoY3Weum3PZ7wfwwlgIr4e/FC6+h5W0Bt7l06zRg5UB Wtyh16kfxch4pfpg/EbSNwVxBiavFT6NSKf7j+ah1IG4Jv1Wx398dI4nqviR3m8wcK3cfm QEuF+kItqE4826HZYGeveDsU9dDTu9fHW8b2z9QqvZQmeeVRhWOw3XVdPs7QTQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dFVkN4phjz60S for ; Mon, 24 Nov 2025 15:54:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 341f0 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 24 Nov 2025 15:54:20 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 7980cf5d6f71 - main - Centralize definition of ZFSTOP List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7980cf5d6f71adef3ca38825f4aa8aa38a59e43c Auto-Submitted: auto-generated Date: Mon, 24 Nov 2025 15:54:20 +0000 Message-Id: <69247fac.341f0.314bfe7e@gitrepo.freebsd.org> The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=7980cf5d6f71adef3ca38825f4aa8aa38a59e43c commit 7980cf5d6f71adef3ca38825f4aa8aa38a59e43c Author: John Baldwin AuthorDate: 2025-11-24 15:46:56 +0000 Commit: John Baldwin CommitDate: 2025-11-24 15:46:56 +0000 Centralize definition of ZFSTOP Define this helper variable in one place and make it available while building the entire base system. Reviewed by: sjg Obtained from: CheriBSD (mostly) Differential Revision: https://reviews.freebsd.org/D53790 --- cddl/lib/libtpool/tests/Makefile | 2 -- cddl/lib/libzpool/Makefile | 2 -- cddl/sbin/zfs/Makefile | 2 -- cddl/sbin/zpool/Makefile | 2 -- cddl/share/zfs/compatibility.d/Makefile | 2 -- cddl/usr.bin/zinject/Makefile | 2 -- cddl/usr.bin/zstream/Makefile | 2 -- cddl/usr.bin/ztest/Makefile | 2 -- cddl/usr.libexec/zfs_prepare_disk/Makefile | 2 -- cddl/usr.libexec/zpool_influxdb/Makefile | 2 -- cddl/usr.sbin/zdb/Makefile | 2 -- cddl/usr.sbin/zhack/Makefile | 2 -- share/mk/src.sys.mk | 3 +++ 13 files changed, 3 insertions(+), 24 deletions(-) diff --git a/cddl/lib/libtpool/tests/Makefile b/cddl/lib/libtpool/tests/Makefile index 19e43cc18821..72a82b6afa59 100644 --- a/cddl/lib/libtpool/tests/Makefile +++ b/cddl/lib/libtpool/tests/Makefile @@ -1,5 +1,3 @@ -ZFSTOP= ${SRCTOP}/sys/contrib/openzfs - ATF_TESTS_C+= libtpool_test TEST_METADATA+= timeout="10" diff --git a/cddl/lib/libzpool/Makefile b/cddl/lib/libzpool/Makefile index 031cc27fb431..57d9fb16e7ab 100644 --- a/cddl/lib/libzpool/Makefile +++ b/cddl/lib/libzpool/Makefile @@ -1,5 +1,3 @@ -ZFSTOP= ${SRCTOP}/sys/contrib/openzfs - .PATH: ${ZFSTOP}/lib/libzpool # ZFS_COMMON_SRCS diff --git a/cddl/sbin/zfs/Makefile b/cddl/sbin/zfs/Makefile index 9a0a5198602e..3b9abe4446e8 100644 --- a/cddl/sbin/zfs/Makefile +++ b/cddl/sbin/zfs/Makefile @@ -1,5 +1,3 @@ -ZFSTOP= ${SRCTOP}/sys/contrib/openzfs - .PATH: ${ZFSTOP}/cmd/zfs .PATH: ${ZFSTOP}/man/man7 .PATH: ${ZFSTOP}/man/man8 diff --git a/cddl/sbin/zpool/Makefile b/cddl/sbin/zpool/Makefile index ab7b852b4d9a..be498d730011 100644 --- a/cddl/sbin/zpool/Makefile +++ b/cddl/sbin/zpool/Makefile @@ -1,5 +1,3 @@ -ZFSTOP= ${SRCTOP}/sys/contrib/openzfs - .PATH: ${ZFSTOP}/man/man4 .PATH: ${ZFSTOP}/man/man5 .PATH: ${ZFSTOP}/man/man7 diff --git a/cddl/share/zfs/compatibility.d/Makefile b/cddl/share/zfs/compatibility.d/Makefile index 6d3663081ae6..4bc8da774168 100644 --- a/cddl/share/zfs/compatibility.d/Makefile +++ b/cddl/share/zfs/compatibility.d/Makefile @@ -1,5 +1,3 @@ -ZFSTOP= ${SRCTOP}/sys/contrib/openzfs - .PATH: ${ZFSTOP}/cmd/zpool/compatibility.d PACKAGE= zfs diff --git a/cddl/usr.bin/zinject/Makefile b/cddl/usr.bin/zinject/Makefile index fd8437ed3f2c..2305c36ccbab 100644 --- a/cddl/usr.bin/zinject/Makefile +++ b/cddl/usr.bin/zinject/Makefile @@ -1,5 +1,3 @@ -ZFSTOP= ${SRCTOP}/sys/contrib/openzfs - .PATH: ${ZFSTOP}/cmd/zinject .PATH: ${ZFSTOP}/man/man8 diff --git a/cddl/usr.bin/zstream/Makefile b/cddl/usr.bin/zstream/Makefile index 7b753f79c4d7..09f4b81025c9 100644 --- a/cddl/usr.bin/zstream/Makefile +++ b/cddl/usr.bin/zstream/Makefile @@ -1,5 +1,3 @@ -ZFSTOP= ${SRCTOP}/sys/contrib/openzfs - .PATH: ${ZFSTOP}/cmd/zstream .PATH: ${ZFSTOP}/man/man8 diff --git a/cddl/usr.bin/ztest/Makefile b/cddl/usr.bin/ztest/Makefile index ef4bd561b41a..755764493ddf 100644 --- a/cddl/usr.bin/ztest/Makefile +++ b/cddl/usr.bin/ztest/Makefile @@ -1,7 +1,5 @@ .include -ZFSTOP= ${SRCTOP}/sys/contrib/openzfs - .PATH: ${ZFSTOP}/cmd .PATH: ${ZFSTOP}/man/man1 diff --git a/cddl/usr.libexec/zfs_prepare_disk/Makefile b/cddl/usr.libexec/zfs_prepare_disk/Makefile index 0d3f9b56b28c..1a261c5684bc 100644 --- a/cddl/usr.libexec/zfs_prepare_disk/Makefile +++ b/cddl/usr.libexec/zfs_prepare_disk/Makefile @@ -1,5 +1,3 @@ -ZFSTOP= ${SRCTOP}/sys/contrib/openzfs - .PATH: ${ZFSTOP}/scripts PACKAGE= zfs diff --git a/cddl/usr.libexec/zpool_influxdb/Makefile b/cddl/usr.libexec/zpool_influxdb/Makefile index f91ce1a7a213..53779443573d 100644 --- a/cddl/usr.libexec/zpool_influxdb/Makefile +++ b/cddl/usr.libexec/zpool_influxdb/Makefile @@ -1,5 +1,3 @@ -ZFSTOP= ${SRCTOP}/sys/contrib/openzfs - .PATH: ${ZFSTOP}/cmd/zpool_influxdb .PATH: ${ZFSTOP}/man/man8 diff --git a/cddl/usr.sbin/zdb/Makefile b/cddl/usr.sbin/zdb/Makefile index f8f7eea6050b..2e8f88603645 100644 --- a/cddl/usr.sbin/zdb/Makefile +++ b/cddl/usr.sbin/zdb/Makefile @@ -1,5 +1,3 @@ -ZFSTOP= ${SRCTOP}/sys/contrib/openzfs - .PATH: ${ZFSTOP}/cmd/zdb .PATH: ${ZFSTOP}/man/man8 diff --git a/cddl/usr.sbin/zhack/Makefile b/cddl/usr.sbin/zhack/Makefile index 2b981919e17b..0d83856eb080 100644 --- a/cddl/usr.sbin/zhack/Makefile +++ b/cddl/usr.sbin/zhack/Makefile @@ -1,5 +1,3 @@ -ZFSTOP= ${SRCTOP}/sys/contrib/openzfs - .PATH: ${ZFSTOP}/cmd .PATH: ${ZFSTOP}/man/man1 diff --git a/share/mk/src.sys.mk b/share/mk/src.sys.mk index ec035fb71e54..6d6523f24754 100644 --- a/share/mk/src.sys.mk +++ b/share/mk/src.sys.mk @@ -48,6 +48,9 @@ CFLAGS+= -fmacro-prefix-map=${SRCTOP}=/usr/src -fdebug-prefix-map=${SRCTOP}=/usr DEFAULTWARNS?= 6 +# ZFS source directory +ZFSTOP?= ${SRCTOP}/sys/contrib/openzfs + # tempting, but bsd.compiler.mk causes problems this early # probably need to remove dependence on bsd.own.mk #.include "src.opts.mk" From nobody Mon Nov 24 15:54:21 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dFVkQ0B0Lz6HQ3S for ; Mon, 24 Nov 2025 15:54:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dFVkP61hkz3qPp for ; Mon, 24 Nov 2025 15:54:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763999661; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mDwWD9ETfOLzMrJ+4ODKhjfeUzX62AuYLuJsoAQ2Euc=; b=czJUHRwQELo+Raaqr3kstSDW8v2sjRE32+gVmosU8ESg32blelpp789gJfK4Nyxyvcn9sI DlYpllhjdmQeMFPnoilmH40dI18S4LdoN9rjxXpUD+iG1oiCGjsdQB8Ep39cHTyvIFCpIv NR4htRcMu0kYr/VOz01FKpwbqvd8ZJw8FxP3Jjwn/fNhDZCHwLqdfpdDqLlU5YvzOHXvPn LzrsFF6stcwFxJ6tncLynUAPGAZOlAmXu0o0v5VswjIxp6oaqbuAfyOEGyQRaVSPKGtyNL wX2TEzFsSfTMFbrMe5Ugm2xH8laixrH0WIU/LHaLsXM9b2haMzvCW8hyY61TsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763999661; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mDwWD9ETfOLzMrJ+4ODKhjfeUzX62AuYLuJsoAQ2Euc=; b=YeMZNvCUsZQq8vpzJLtkxuKXNiVxButarGyLOJBrmTCx1APtMuVpxU8TDgGvX7SI5LvFfw QqRA3jx3rZU1gqk46M+hc5RrNiqcMd5h5g/gqlzjGIS3E/sIRzEQRxtUENKrCG53POKIMK 3GB/LgKWq5oX0yf7dN488ZdThNSCUb93v4RdzUqJtCa+Uz0wttIs3JjNTg6vDD5yD6U1yk S+thrAdFsnix/lIy4972bSA9mbNuouiLYOFe2xNzfEYs3nnPzkPKiXpv7Krk/LGsKXOD2T AVkXUF0rGbFRIxHwDgUkWYGdBU5BRh9JdBWVjRYIUTi9d6H2WyLtJXMN2nE8vw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763999661; a=rsa-sha256; cv=none; b=oWibxnaNKdi17U1IILu+2qBH0bFQlEV1rbsd5cC/uH6J5MBrPDzaCUaeBal3NM6OJ0hJPf qMmd7MmlygV5esRCUwbT21qzVbPp82azZi+8CRrQKxyPzjt3w0naN2Fiue31fYy8ldcK9D iRUwxyNIisE8Z2HI8QTjTdQrf02qbe092iSLcZUFTxAW2jHf9qugU/BUbRCAkGfVfEkiLE AYQcnUtk08phxqL0IuHntuTDlE/QuQ5Bx5p/TBR/+K1siNxDcH+qkjazN3jwp7jOfClZf3 pnY+eEqFoU4DO4JJd7jt6s141TEBael6JHpZnLlzzcEWzZSSvnRTkU65xdQyZQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dFVkP5HdGz5Qc for ; Mon, 24 Nov 2025 15:54:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 36692 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 24 Nov 2025 15:54:21 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: e928afc531e6 - main - Use ZFSTOP more broadly List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e928afc531e68b7a142ee49d8f7e5c8426d54033 Auto-Submitted: auto-generated Date: Mon, 24 Nov 2025 15:54:21 +0000 Message-Id: <69247fad.36692.6135685e@gitrepo.freebsd.org> The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=e928afc531e68b7a142ee49d8f7e5c8426d54033 commit e928afc531e68b7a142ee49d8f7e5c8426d54033 Author: John Baldwin AuthorDate: 2025-11-24 15:47:10 +0000 Commit: John Baldwin CommitDate: 2025-11-24 15:47:10 +0000 Use ZFSTOP more broadly Reviewed by: brooks Obtained from: CheriBSD Differential Revision: https://reviews.freebsd.org/D53791 --- cddl/lib/drti/Makefile | 8 ++++---- cddl/lib/libavl/Makefile | 11 ++++++----- cddl/lib/libctf/Makefile | 8 ++++---- cddl/lib/libdtrace/Makefile | 8 ++++---- cddl/lib/libicp/Makefile | 14 +++++++------- cddl/lib/libicp_rescue/Makefile | 16 ++++++++-------- cddl/lib/libnvpair/Makefile | 14 +++++++------- cddl/lib/libspl/Makefile | 14 +++++++------- cddl/lib/libtpool/Makefile | 14 +++++++------- cddl/lib/libuutil/Makefile | 10 +++++----- cddl/lib/libzdb/Makefile | 18 +++++++++--------- cddl/lib/libzfs/Makefile | 32 ++++++++++++++++---------------- cddl/lib/libzfs_core/Makefile | 26 +++++++++++++------------- cddl/lib/libzfsbootenv/Makefile | 18 +++++++++--------- cddl/lib/libzpool/Makefile | 2 +- cddl/lib/libzutil/Makefile | 20 ++++++++++---------- cddl/lib/pam_zfs_key/Makefile | 20 ++++++++++---------- cddl/sbin/zpool/Makefile | 2 +- cddl/usr.bin/ctfconvert/Makefile | 6 +++--- cddl/usr.bin/ctfdump/Makefile | 6 +++--- cddl/usr.bin/ctfmerge/Makefile | 6 +++--- cddl/usr.bin/zinject/Makefile | 2 +- cddl/usr.bin/zstream/Makefile | 2 +- cddl/usr.bin/ztest/Makefile | 2 +- cddl/usr.sbin/dtrace/Makefile | 6 +++--- cddl/usr.sbin/lockstat/Makefile | 6 +++--- cddl/usr.sbin/plockstat/Makefile | 6 +++--- cddl/usr.sbin/zdb/Makefile | 2 +- cddl/usr.sbin/zfsd/Makefile.common | 10 +++++----- cddl/usr.sbin/zhack/Makefile | 12 ++++++------ include/Makefile | 2 +- lib/libbe/Makefile | 14 +++++++------- lib/libbe/tests/Makefile | 8 ++++---- lib/libproc/Makefile | 8 ++++---- lib/libprocstat/Makefile | 1 - sbin/bectl/Makefile | 10 +++++----- usr.sbin/fstyp/Makefile | 12 ++++++------ 37 files changed, 188 insertions(+), 188 deletions(-) diff --git a/cddl/lib/drti/Makefile b/cddl/lib/drti/Makefile index 50250887e379..dda6168a8195 100644 --- a/cddl/lib/drti/Makefile +++ b/cddl/lib/drti/Makefile @@ -12,11 +12,11 @@ CLEANFILES= ${FILES} .undef LIBRARIES_ONLY CFLAGS+= -DIN_BASE CFLAGS+= -DSKIP_SPL_SYS_CONDVAR_H -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/include -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/ -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/os/freebsd +CFLAGS+= -I${ZFSTOP}/include +CFLAGS+= -I${ZFSTOP}/lib/libspl/include/ +CFLAGS+= -I${ZFSTOP}/lib/libspl/include/os/freebsd CFLAGS+= -I${SRCTOP}/sys -CFLAGS+= -include ${SRCTOP}/sys/contrib/openzfs/include/os/freebsd/spl/sys/ccompile.h +CFLAGS+= -include ${ZFSTOP}/include/os/freebsd/spl/sys/ccompile.h CFLAGS+= -DHAVE_ISSETUGID CFLAGS+= -I${SRCTOP}/sys/cddl/compat/opensolaris \ -I${SRCTOP}/cddl/compat/opensolaris/include \ diff --git a/cddl/lib/libavl/Makefile b/cddl/lib/libavl/Makefile index 4ce1de20a3d9..aef8c34c853c 100644 --- a/cddl/lib/libavl/Makefile +++ b/cddl/lib/libavl/Makefile @@ -1,4 +1,4 @@ -.PATH: ${SRCTOP}/sys/contrib/openzfs/module/avl +.PATH: ${ZFSTOP}/module/avl PACKAGE= zfs LIB_PACKAGE= @@ -8,9 +8,10 @@ LIBADD= spl SRCS= avl.c WARNS?= 3 CFLAGS+= -DIN_BASE -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/include -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/ -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/os/freebsd +CFLAGS+= -I${ZFSTOP}/include +CFLAGS+= -I${ZFSTOP}/lib/libspl/include/ +CFLAGS+= -I${ZFSTOP}/lib/libspl/include/os/freebsd CFLAGS+= -I${SRCTOP}/sys -CFLAGS+= -include ${SRCTOP}/sys/contrib/openzfs/include/os/freebsd/spl/sys/ccompile.h +CFLAGS+= -include ${ZFSTOP}/include/os/freebsd/spl/sys/ccompile.h + .include diff --git a/cddl/lib/libctf/Makefile b/cddl/lib/libctf/Makefile index 1c605182bc1d..b47f4a47551a 100644 --- a/cddl/lib/libctf/Makefile +++ b/cddl/lib/libctf/Makefile @@ -22,10 +22,10 @@ WARNS?= 2 CFLAGS+= -DCTF_OLD_VERSIONS CFLAGS+= -DIN_BASE -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/include -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/ -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/os/freebsd -CFLAGS+= -include ${SRCTOP}/sys/contrib/openzfs/include/os/freebsd/spl/sys/ccompile.h +CFLAGS+= -I${ZFSTOP}/include +CFLAGS+= -I${ZFSTOP}/lib/libspl/include/ +CFLAGS+= -I${ZFSTOP}/lib/libspl/include/os/freebsd +CFLAGS+= -include ${ZFSTOP}/include/os/freebsd/spl/sys/ccompile.h CFLAGS+= -DHAVE_ISSETUGID CFLAGS+= -I${SRCTOP}/sys/cddl/compat/opensolaris \ diff --git a/cddl/lib/libdtrace/Makefile b/cddl/lib/libdtrace/Makefile index dae6200d80c1..0742d0b5cd5a 100644 --- a/cddl/lib/libdtrace/Makefile +++ b/cddl/lib/libdtrace/Makefile @@ -78,11 +78,11 @@ WARNS?= 1 CFLAGS+= -DIN_BASE CFLAGS+= -DSKIP_SPL_SYS_CONDVAR_H -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/include -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/ -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/os/freebsd +CFLAGS+= -I${ZFSTOP}/include +CFLAGS+= -I${ZFSTOP}/lib/libspl/include/ +CFLAGS+= -I${ZFSTOP}/lib/libspl/include/os/freebsd CFLAGS+= -I${SRCTOP}/sys -CFLAGS+= -include ${SRCTOP}/sys/contrib/openzfs/include/os/freebsd/spl/sys/ccompile.h +CFLAGS+= -include ${ZFSTOP}/include/os/freebsd/spl/sys/ccompile.h CFLAGS+= -DHAVE_ISSETUGID diff --git a/cddl/lib/libicp/Makefile b/cddl/lib/libicp/Makefile index 833ecbb1c7f7..15846e67a14b 100644 --- a/cddl/lib/libicp/Makefile +++ b/cddl/lib/libicp/Makefile @@ -1,4 +1,4 @@ -.PATH: ${SRCTOP}/sys/contrib/openzfs/module/icp +.PATH: ${ZFSTOP}/module/icp PACKAGE= zfs LIB_PACKAGE= @@ -97,14 +97,14 @@ WARNS?= 2 SHLIB_MAJOR= 3 CSTD= c99 CFLAGS+= -DIN_BASE -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/include -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/ -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/os/freebsd +CFLAGS+= -I${ZFSTOP}/include +CFLAGS+= -I${ZFSTOP}/lib/libspl/include/ +CFLAGS+= -I${ZFSTOP}/lib/libspl/include/os/freebsd CFLAGS+= -I${SRCTOP}/sys CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/include -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/module/icp/include -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libzpool/include -CFLAGS+= -include ${SRCTOP}/sys/contrib/openzfs/include/os/freebsd/spl/sys/ccompile.h +CFLAGS+= -I${ZFSTOP}/module/icp/include +CFLAGS+= -I${ZFSTOP}/lib/libzpool/include +CFLAGS+= -include ${ZFSTOP}/include/os/freebsd/spl/sys/ccompile.h CFLAGS+= -DHAVE_ISSETUGID CFLAGS+= -include ${SRCTOP}/sys/modules/zfs/zfs_config.h diff --git a/cddl/lib/libicp_rescue/Makefile b/cddl/lib/libicp_rescue/Makefile index 0a5a81f4ab7f..8dc8c396774c 100644 --- a/cddl/lib/libicp_rescue/Makefile +++ b/cddl/lib/libicp_rescue/Makefile @@ -1,4 +1,4 @@ -.PATH: ${SRCTOP}/sys/contrib/openzfs/module/icp +.PATH: ${ZFSTOP}/module/icp PACKAGE= utilities LIB= icp_rescue @@ -86,7 +86,7 @@ KERNEL_C = \ core/kcf_prov_tabs.c \ $(ASM_SOURCES_C) -.PATH: ${SRCTOP}/sys/contrib/openzfs/module/zfs +.PATH: ${ZFSTOP}/module/zfs KERNEL_C+= zfs_impl.c SRCS= $(ASM_SOURCES_AS) $(KERNEL_C) @@ -95,14 +95,14 @@ WARNS?= 2 SHLIB_MAJOR= 3 CSTD= c99 CFLAGS+= -DIN_BASE -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/include -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/ -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/os/freebsd +CFLAGS+= -I${ZFSTOP}/include +CFLAGS+= -I${ZFSTOP}/lib/libspl/include/ +CFLAGS+= -I${ZFSTOP}/lib/libspl/include/os/freebsd CFLAGS+= -I${SRCTOP}/sys CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/include -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/module/icp/include -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libzpool/include -CFLAGS+= -include ${SRCTOP}/sys/contrib/openzfs/include/os/freebsd/spl/sys/ccompile.h +CFLAGS+= -I${ZFSTOP}/module/icp/include +CFLAGS+= -I${ZFSTOP}/lib/libzpool/include +CFLAGS+= -include ${ZFSTOP}/include/os/freebsd/spl/sys/ccompile.h CFLAGS+= -DHAVE_ISSETUGID -UHAVE_AVX -DRESCUE CFLAGS+= -include ${SRCTOP}/sys/modules/zfs/zfs_config.h diff --git a/cddl/lib/libnvpair/Makefile b/cddl/lib/libnvpair/Makefile index 8245b324688b..c66424cef219 100644 --- a/cddl/lib/libnvpair/Makefile +++ b/cddl/lib/libnvpair/Makefile @@ -1,6 +1,6 @@ -.PATH: ${SRCTOP}/sys/contrib/openzfs/module/nvpair -.PATH: ${SRCTOP}/sys/contrib/openzfs/lib/libnvpair -.PATH: ${SRCTOP}/sys/contrib/openzfs/include +.PATH: ${ZFSTOP}/module/nvpair +.PATH: ${ZFSTOP}/lib/libnvpair +.PATH: ${ZFSTOP}/include PACKAGE= zfs LIB_PACKAGE= @@ -20,12 +20,12 @@ SRCS+= nvpair_alloc_fixed.c \ WARNS?= 2 CFLAGS+= -DIN_BASE -DHAVE_RPC_TYPES -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/include -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/ -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/os/freebsd +CFLAGS+= -I${ZFSTOP}/include +CFLAGS+= -I${ZFSTOP}/lib/libspl/include/ +CFLAGS+= -I${ZFSTOP}/lib/libspl/include/os/freebsd CFLAGS+= -I${SRCTOP}/sys CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/include -CFLAGS+= -include ${SRCTOP}/sys/contrib/openzfs/include/os/freebsd/spl/sys/ccompile.h +CFLAGS+= -include ${ZFSTOP}/include/os/freebsd/spl/sys/ccompile.h CFLAGS+= -DHAVE_ISSETUGID -DHAVE_CONFIG_H -DHAVE_XDR_BYTESREC .include diff --git a/cddl/lib/libspl/Makefile b/cddl/lib/libspl/Makefile index 173e9116e284..b0f47172e52d 100644 --- a/cddl/lib/libspl/Makefile +++ b/cddl/lib/libspl/Makefile @@ -1,8 +1,8 @@ .include .include -.PATH: ${SRCTOP}/sys/contrib/openzfs/lib/libspl -.PATH: ${SRCTOP}/sys/contrib/openzfs/include +.PATH: ${ZFSTOP}/lib/libspl +.PATH: ${ZFSTOP}/include PACKAGE= zfs LIB_PACKAGE= @@ -49,12 +49,12 @@ SRCS += \ WARNS?= 2 CSTD= c99 CFLAGS+= -DIN_BASE -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/include -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/ -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/os/freebsd +CFLAGS+= -I${ZFSTOP}/include +CFLAGS+= -I${ZFSTOP}/lib/libspl/include/ +CFLAGS+= -I${ZFSTOP}/lib/libspl/include/os/freebsd CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/include -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/module/icp/include -CFLAGS+= -include ${SRCTOP}/sys/contrib/openzfs/include/os/freebsd/spl/sys/ccompile.h +CFLAGS+= -I${ZFSTOP}/module/icp/include +CFLAGS+= -include ${ZFSTOP}/include/os/freebsd/spl/sys/ccompile.h CFLAGS+= -DHAVE_ISSETUGID CFLAGS+= -include ${SRCTOP}/sys/modules/zfs/zfs_config.h .if ${COMPILER_TYPE} == "clang" diff --git a/cddl/lib/libtpool/Makefile b/cddl/lib/libtpool/Makefile index 3a50a21bf62c..1ebfc52f5be9 100644 --- a/cddl/lib/libtpool/Makefile +++ b/cddl/lib/libtpool/Makefile @@ -1,5 +1,5 @@ -.PATH: ${SRCTOP}/sys/contrib/openzfs/lib/libtpool -.PATH: ${SRCTOP}/sys/contrib/openzfs/include +.PATH: ${ZFSTOP}/lib/libtpool +.PATH: ${ZFSTOP}/include PACKAGE= zfs LIB_PACKAGE= @@ -14,13 +14,13 @@ SRCS= thread_pool.c WARNS?= 2 CSTD= c99 CFLAGS+= -DIN_BASE -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/include -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/ -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/os/freebsd +CFLAGS+= -I${ZFSTOP}/include +CFLAGS+= -I${ZFSTOP}/lib/libspl/include/ +CFLAGS+= -I${ZFSTOP}/lib/libspl/include/os/freebsd CFLAGS+= -I${SRCTOP}/sys CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/include -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/module/icp/include -CFLAGS+= -include ${SRCTOP}/sys/contrib/openzfs/include/os/freebsd/spl/sys/ccompile.h +CFLAGS+= -I${ZFSTOP}/module/icp/include +CFLAGS+= -include ${ZFSTOP}/include/os/freebsd/spl/sys/ccompile.h CFLAGS+= -DHAVE_ISSETUGID CFLAGS+= -include ${SRCTOP}/sys/modules/zfs/zfs_config.h diff --git a/cddl/lib/libuutil/Makefile b/cddl/lib/libuutil/Makefile index 947e755d4aae..ca5a71d811f7 100644 --- a/cddl/lib/libuutil/Makefile +++ b/cddl/lib/libuutil/Makefile @@ -1,4 +1,4 @@ -.PATH: ${SRCTOP}/sys/contrib/openzfs/lib/libuutil +.PATH: ${ZFSTOP}/lib/libuutil PACKAGE= zfs LIB_PACKAGE= @@ -14,12 +14,12 @@ SRCS=\ WARNS?= 2 CFLAGS+= -DIN_BASE -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/include -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/ -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/os/freebsd +CFLAGS+= -I${ZFSTOP}/include +CFLAGS+= -I${ZFSTOP}/lib/libspl/include/ +CFLAGS+= -I${ZFSTOP}/lib/libspl/include/os/freebsd CFLAGS+= -I${SRCTOP}/sys CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/include -CFLAGS+= -include ${SRCTOP}/sys/contrib/openzfs/include/os/freebsd/spl/sys/ccompile.h +CFLAGS+= -include ${ZFSTOP}/include/os/freebsd/spl/sys/ccompile.h LIBADD= avl spl diff --git a/cddl/lib/libzdb/Makefile b/cddl/lib/libzdb/Makefile index 040d7d2c63f9..f5a6a42d7aad 100644 --- a/cddl/lib/libzdb/Makefile +++ b/cddl/lib/libzdb/Makefile @@ -1,5 +1,5 @@ -.PATH: ${SRCTOP}/sys/contrib/openzfs/lib/libzdb -.PATH: ${SRCTOP}/sys/contrib/openzfs/include +.PATH: ${ZFSTOP}/lib/libzdb +.PATH: ${ZFSTOP}/include PACKAGE= zfs LIB_PACKAGE= @@ -13,15 +13,15 @@ SRCS = libzdb.c WARNS?= 2 CSTD= c99 -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/include -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/os/freebsd -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libzpool/include -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/include/os/freebsd/zfs +CFLAGS+= -I${ZFSTOP}/include +CFLAGS+= -I${ZFSTOP}/lib/libspl/include +CFLAGS+= -I${ZFSTOP}/lib/libspl/include/os/freebsd +CFLAGS+= -I${ZFSTOP}/lib/libzpool/include +CFLAGS+= -I${ZFSTOP}/include/os/freebsd/zfs CFLAGS+= -I${SRCTOP}/sys CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/include -CFLAGS+= -include ${SRCTOP}/sys/contrib/openzfs/include/os/freebsd/spl/sys/ccompile.h -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libzutil +CFLAGS+= -include ${ZFSTOP}/include/os/freebsd/spl/sys/ccompile.h +CFLAGS+= -I${ZFSTOP}/lib/libzutil CFLAGS+= -DHAVE_ISSETUGID -DIN_BASE CFLAGS+= -include ${SRCTOP}/sys/modules/zfs/zfs_config.h diff --git a/cddl/lib/libzfs/Makefile b/cddl/lib/libzfs/Makefile index 376e32fb893f..ed0c240b1113 100644 --- a/cddl/lib/libzfs/Makefile +++ b/cddl/lib/libzfs/Makefile @@ -1,11 +1,11 @@ -.PATH: ${SRCTOP}/sys/contrib/openzfs/module/icp -.PATH: ${SRCTOP}/sys/contrib/openzfs/module/zcommon -.PATH: ${SRCTOP}/sys/contrib/openzfs/lib/libzfs -.PATH: ${SRCTOP}/sys/contrib/openzfs/lib/libzfs/os/freebsd -.PATH: ${SRCTOP}/sys/contrib/openzfs/lib/libshare -.PATH: ${SRCTOP}/sys/contrib/openzfs/include -.PATH: ${SRCTOP}/sys/contrib/openzfs/module/zstd -.PATH: ${SRCTOP}/sys/contrib/openzfs/module/zstd/lib +.PATH: ${ZFSTOP}/module/icp +.PATH: ${ZFSTOP}/module/zcommon +.PATH: ${ZFSTOP}/lib/libzfs +.PATH: ${ZFSTOP}/lib/libzfs/os/freebsd +.PATH: ${ZFSTOP}/lib/libshare +.PATH: ${ZFSTOP}/include +.PATH: ${ZFSTOP}/module/zstd +.PATH: ${ZFSTOP}/module/zstd/lib PACKAGE= zfs LIB_PACKAGE= @@ -89,17 +89,17 @@ WARNS?= 2 SHLIB_MAJOR= 4 CSTD= c99 CFLAGS+= -DIN_BASE -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/include -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/include/os/freebsd -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/os/freebsd -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libshare -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libzpool/include +CFLAGS+= -I${ZFSTOP}/include +CFLAGS+= -I${ZFSTOP}/include/os/freebsd +CFLAGS+= -I${ZFSTOP}/lib/libspl/include +CFLAGS+= -I${ZFSTOP}/lib/libspl/include/os/freebsd +CFLAGS+= -I${ZFSTOP}/lib/libshare +CFLAGS+= -I${ZFSTOP}/lib/libzpool/include CFLAGS+= -I${SRCTOP}/sys/contrib/ck/include CFLAGS+= -I${SRCTOP}/sys CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/include -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/module/icp/include -CFLAGS+= -include ${SRCTOP}/sys/contrib/openzfs/include/os/freebsd/spl/sys/ccompile.h +CFLAGS+= -I${ZFSTOP}/module/icp/include +CFLAGS+= -include ${ZFSTOP}/include/os/freebsd/spl/sys/ccompile.h CFLAGS+= -DHAVE_ISSETUGID CFLAGS+= -DHAVE_EXECVPE CFLAGS+= -include ${SRCTOP}/sys/modules/zfs/zfs_config.h diff --git a/cddl/lib/libzfs_core/Makefile b/cddl/lib/libzfs_core/Makefile index 10533c5de05b..72b0f519e21d 100644 --- a/cddl/lib/libzfs_core/Makefile +++ b/cddl/lib/libzfs_core/Makefile @@ -1,7 +1,7 @@ -.PATH: ${SRCTOP}/sys/contrib/openzfs/lib/libzfs_core -.PATH: ${SRCTOP}/sys/contrib/openzfs/include -.PATH: ${SRCTOP}/sys/contrib/openzfs/include/os/freebsd/zfs -.PATH: ${SRCTOP}/sys/contrib/openzfs/module/os/freebsd/zfs +.PATH: ${ZFSTOP}/lib/libzfs_core +.PATH: ${ZFSTOP}/include +.PATH: ${ZFSTOP}/include/os/freebsd/zfs +.PATH: ${ZFSTOP}/module/os/freebsd/zfs PACKAGE= zfs LIB_PACKAGE= @@ -17,17 +17,17 @@ SRCS= libzfs_core.c \ WARNS?= 2 CSTD= c99 CFLAGS+= -DIN_BASE -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/include -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libzfs_core -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libzfs_core/common -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/ -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/os/freebsd -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libzpool/include -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/include/os/freebsd/zfs +CFLAGS+= -I${ZFSTOP}/include +CFLAGS+= -I${ZFSTOP}/lib/libzfs_core +CFLAGS+= -I${ZFSTOP}/lib/libzfs_core/common +CFLAGS+= -I${ZFSTOP}/lib/libspl/include/ +CFLAGS+= -I${ZFSTOP}/lib/libspl/include/os/freebsd +CFLAGS+= -I${ZFSTOP}/lib/libzpool/include +CFLAGS+= -I${ZFSTOP}/include/os/freebsd/zfs CFLAGS+= -I${SRCTOP}/sys CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/include -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/module/icp/include -CFLAGS+= -include ${SRCTOP}/sys/contrib/openzfs/include/os/freebsd/spl/sys/ccompile.h +CFLAGS+= -I${ZFSTOP}/module/icp/include +CFLAGS+= -include ${ZFSTOP}/include/os/freebsd/spl/sys/ccompile.h CFLAGS+= -DHAVE_ISSETUGID CFLAGS+= -include ${SRCTOP}/sys/modules/zfs/zfs_config.h diff --git a/cddl/lib/libzfsbootenv/Makefile b/cddl/lib/libzfsbootenv/Makefile index 22f5da1ee5b1..eba6a1d8bea8 100644 --- a/cddl/lib/libzfsbootenv/Makefile +++ b/cddl/lib/libzfsbootenv/Makefile @@ -1,5 +1,5 @@ -.PATH: ${SRCTOP}/sys/contrib/openzfs/lib/libzfsbootenv -.PATH: ${SRCTOP}/sys/contrib/openzfs/include +.PATH: ${ZFSTOP}/lib/libzfsbootenv +.PATH: ${ZFSTOP}/include PACKAGE= zfs LIB_PACKAGE= @@ -20,16 +20,16 @@ SRCS= $(USER_C) CSTD= c99 CFLAGS+= -DIN_BASE -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/include -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/ -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/os/freebsd -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libzpool/include +CFLAGS+= -I${ZFSTOP}/include +CFLAGS+= -I${ZFSTOP}/lib/libspl/include/ +CFLAGS+= -I${ZFSTOP}/lib/libspl/include/os/freebsd +CFLAGS+= -I${ZFSTOP}/lib/libzpool/include CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/include -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/module/icp/include -CFLAGS+= -include ${SRCTOP}/sys/contrib/openzfs/include/os/freebsd/spl/sys/ccompile.h +CFLAGS+= -I${ZFSTOP}/module/icp/include +CFLAGS+= -include ${ZFSTOP}/include/os/freebsd/spl/sys/ccompile.h CFLAGS+= -DHAVE_ISSETUGID CFLAGS+= -include ${SRCTOP}/sys/modules/zfs/zfs_config.h -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/include/os/freebsd/zfs +CFLAGS+= -I${ZFSTOP}/include/os/freebsd/zfs CFLAGS.lzbe_device.c= -Wno-cast-qual CFLAGS.lzbe_util.c= -Wno-cast-qual CFLAGS.lzbe_pair.c= -Wno-cast-qual diff --git a/cddl/lib/libzpool/Makefile b/cddl/lib/libzpool/Makefile index 57d9fb16e7ab..80fec2eb3fb1 100644 --- a/cddl/lib/libzpool/Makefile +++ b/cddl/lib/libzpool/Makefile @@ -261,7 +261,7 @@ CFLAGS+= \ -I${ZFSTOP}/include \ -I${ZFSTOP}/lib/libspl/include \ -I${ZFSTOP}/lib/libspl/include/os/freebsd \ - -I${SRCTOP}/sys/contrib/openzfs/lib/libzpool/include \ + -I${ZFSTOP}/lib/libzpool/include \ -I${SRCTOP}/sys \ -I${SRCTOP}/cddl/compat/opensolaris/include \ -I${ZFSTOP}/module/icp/include \ diff --git a/cddl/lib/libzutil/Makefile b/cddl/lib/libzutil/Makefile index 37e9e8dd5e63..952ebda889b2 100644 --- a/cddl/lib/libzutil/Makefile +++ b/cddl/lib/libzutil/Makefile @@ -1,6 +1,6 @@ -.PATH: ${SRCTOP}/sys/contrib/openzfs/lib/libzutil -.PATH: ${SRCTOP}/sys/contrib/openzfs/lib/libzutil/os/freebsd -.PATH: ${SRCTOP}/sys/contrib/openzfs/module/os/freebsd/zfs +.PATH: ${ZFSTOP}/lib/libzutil +.PATH: ${ZFSTOP}/lib/libzutil/os/freebsd +.PATH: ${ZFSTOP}/module/os/freebsd/zfs PACKAGE= zfs LIB_PACKAGE= @@ -27,15 +27,15 @@ SRCS += zfs_ioctl_compat.c WARNS?= 2 CSTD= c99 -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/include -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/ -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/os/freebsd -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libzpool/include -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/include/os/freebsd/zfs +CFLAGS+= -I${ZFSTOP}/include +CFLAGS+= -I${ZFSTOP}/lib/libspl/include/ +CFLAGS+= -I${ZFSTOP}/lib/libspl/include/os/freebsd +CFLAGS+= -I${ZFSTOP}/lib/libzpool/include +CFLAGS+= -I${ZFSTOP}/include/os/freebsd/zfs CFLAGS+= -I${SRCTOP}/sys CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/include -CFLAGS+= -include ${SRCTOP}/sys/contrib/openzfs/include/os/freebsd/spl/sys/ccompile.h -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libzutil +CFLAGS+= -include ${ZFSTOP}/include/os/freebsd/spl/sys/ccompile.h +CFLAGS+= -I${ZFSTOP}/lib/libzutil CFLAGS+= -DHAVE_ISSETUGID -DIN_BASE CFLAGS+= -include ${SRCTOP}/sys/modules/zfs/zfs_config.h diff --git a/cddl/lib/pam_zfs_key/Makefile b/cddl/lib/pam_zfs_key/Makefile index 517ca402d4da..345321b5926d 100644 --- a/cddl/lib/pam_zfs_key/Makefile +++ b/cddl/lib/pam_zfs_key/Makefile @@ -1,5 +1,5 @@ -.PATH: ${SRCTOP}/sys/contrib/openzfs/contrib/pam_zfs_key -.PATH: ${SRCTOP}/sys/contrib/openzfs/include +.PATH: ${ZFSTOP}/contrib/pam_zfs_key +.PATH: ${ZFSTOP}/include PACKAGE= zfs LIB= pam_zfs_key @@ -13,17 +13,17 @@ SRCS= pam_zfs_key.c WARNS?= 2 CSTD= c99 CFLAGS+= -DIN_BASE -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/include -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/ -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/os/freebsd -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libzpool/include +CFLAGS+= -I${ZFSTOP}/include +CFLAGS+= -I${ZFSTOP} +CFLAGS+= -I${ZFSTOP}/lib/libspl/include/ +CFLAGS+= -I${ZFSTOP}/lib/libspl/include/os/freebsd +CFLAGS+= -I${ZFSTOP}/lib/libzpool/include CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/include -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/module/icp/include -CFLAGS+= -include ${SRCTOP}/sys/contrib/openzfs/include/os/freebsd/spl/sys/ccompile.h +CFLAGS+= -I${ZFSTOP}/module/icp/include +CFLAGS+= -include ${ZFSTOP}/include/os/freebsd/spl/sys/ccompile.h CFLAGS+= -DHAVE_ISSETUGID CFLAGS+= -include ${SRCTOP}/sys/modules/zfs/zfs_config.h -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/include/os/freebsd/zfs +CFLAGS+= -I${ZFSTOP}/include/os/freebsd/zfs CFLAGS+= -DRUNSTATEDIR=\"/var/run\" .include "../../lib/libpam/modules/Makefile.inc" diff --git a/cddl/sbin/zpool/Makefile b/cddl/sbin/zpool/Makefile index be498d730011..e2d8bf61e75b 100644 --- a/cddl/sbin/zpool/Makefile +++ b/cddl/sbin/zpool/Makefile @@ -65,7 +65,7 @@ CFLAGS+= \ -I${ZFSTOP}/include \ -I${ZFSTOP}/lib/libspl/include \ -I${ZFSTOP}/lib/libspl/include/os/freebsd \ - -I${SRCTOP}/sys/contrib/openzfs/lib/libzpool/include \ + -I${ZFSTOP}/lib/libzpool/include \ -I${SRCTOP}/sys \ -I${SRCTOP}/cddl/compat/opensolaris/include \ -I${ZFSTOP}/cmd/zpool \ diff --git a/cddl/usr.bin/ctfconvert/Makefile b/cddl/usr.bin/ctfconvert/Makefile index df53c46b7246..8ce1fce2a711 100644 --- a/cddl/usr.bin/ctfconvert/Makefile +++ b/cddl/usr.bin/ctfconvert/Makefile @@ -25,9 +25,9 @@ SRCS= alist.c \ util.c CFLAGS+= -DIN_BASE -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/include -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/ -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/os/freebsd +CFLAGS+= -I${ZFSTOP}/include +CFLAGS+= -I${ZFSTOP}/lib/libspl/include/ +CFLAGS+= -I${ZFSTOP}/lib/libspl/include/os/freebsd CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/include CFLAGS+= -I${SRCTOP}/sys/cddl/compat/opensolaris \ -I${SRCTOP}/cddl/compat/opensolaris/include \ diff --git a/cddl/usr.bin/ctfdump/Makefile b/cddl/usr.bin/ctfdump/Makefile index 357598583ae7..03d4632603ba 100644 --- a/cddl/usr.bin/ctfdump/Makefile +++ b/cddl/usr.bin/ctfdump/Makefile @@ -8,9 +8,9 @@ SRCS= dump.c \ utils.c CFLAGS+= -DIN_BASE -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/include -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/ -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/os/freebsd +CFLAGS+= -I${ZFSTOP}/include +CFLAGS+= -I${ZFSTOP}/lib/libspl/include/ +CFLAGS+= -I${ZFSTOP}/lib/libspl/include/os/freebsd CFLAGS+= -I${SRCTOP}/sys CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/include CFLAGS+= -I${OPENSOLARIS_USR_DISTDIR} \ diff --git a/cddl/usr.bin/ctfmerge/Makefile b/cddl/usr.bin/ctfmerge/Makefile index 81bccc047a25..73c929605414 100644 --- a/cddl/usr.bin/ctfmerge/Makefile +++ b/cddl/usr.bin/ctfmerge/Makefile @@ -25,9 +25,9 @@ WARNS?= 1 CFLAGS+= -DIN_BASE -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/include -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/ -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/os/freebsd +CFLAGS+= -I${ZFSTOP}/include +CFLAGS+= -I${ZFSTOP}/lib/libspl/include/ +CFLAGS+= -I${ZFSTOP}/lib/libspl/include/os/freebsd CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/include CFLAGS+= -I${SRCTOP}/sys/cddl/compat/opensolaris \ -I${SRCTOP}/cddl/compat/opensolaris/include \ diff --git a/cddl/usr.bin/zinject/Makefile b/cddl/usr.bin/zinject/Makefile index 2305c36ccbab..cd22feda937a 100644 --- a/cddl/usr.bin/zinject/Makefile +++ b/cddl/usr.bin/zinject/Makefile @@ -13,7 +13,7 @@ CFLAGS+= \ -I${ZFSTOP}/include \ -I${ZFSTOP}/lib/libspl/include \ -I${ZFSTOP}/lib/libspl/include/os/freebsd \ - -I${SRCTOP}/sys/contrib/openzfs/lib/libzpool/include \ + -I${ZFSTOP}/lib/libzpool/include \ -I${SRCTOP}/sys \ -I${SRCTOP}/cddl/compat/opensolaris/include \ -I${ZFSTOP}/module/icp/include \ diff --git a/cddl/usr.bin/zstream/Makefile b/cddl/usr.bin/zstream/Makefile index 09f4b81025c9..d3371101f6dc 100644 --- a/cddl/usr.bin/zstream/Makefile +++ b/cddl/usr.bin/zstream/Makefile @@ -23,7 +23,7 @@ CFLAGS+= \ -I${ZFSTOP}/include \ -I${ZFSTOP}/lib/libspl/include \ -I${ZFSTOP}/lib/libspl/include/os/freebsd \ - -I${SRCTOP}/sys/contrib/openzfs/lib/libzpool/include \ + -I${ZFSTOP}/lib/libzpool/include \ -I${SRCTOP}/sys \ -I${SRCTOP}/cddl/compat/opensolaris/include \ -I${ZFSTOP}/module/icp/include \ diff --git a/cddl/usr.bin/ztest/Makefile b/cddl/usr.bin/ztest/Makefile index 755764493ddf..192c0222377a 100644 --- a/cddl/usr.bin/ztest/Makefile +++ b/cddl/usr.bin/ztest/Makefile @@ -13,7 +13,7 @@ CFLAGS+= \ -I${ZFSTOP}/include \ -I${ZFSTOP}/lib/libspl/include \ -I${ZFSTOP}/lib/libspl/include/os/freebsd \ - -I${SRCTOP}/sys/contrib/openzfs/lib/libzpool/include \ + -I${ZFSTOP}/lib/libzpool/include \ -I${SRCTOP}/cddl/compat/opensolaris/include \ -I${ZFSTOP}/module/icp/include \ -include ${ZFSTOP}/include/os/freebsd/spl/sys/ccompile.h \ diff --git a/cddl/usr.sbin/dtrace/Makefile b/cddl/usr.sbin/dtrace/Makefile index cdfd8af8fe72..2cc5376c5fed 100644 --- a/cddl/usr.sbin/dtrace/Makefile +++ b/cddl/usr.sbin/dtrace/Makefile @@ -11,9 +11,9 @@ WARNS?= 1 CFLAGS+= -DIN_BASE CFLAGS+= -DSKIP_SPL_SYS_CONDVAR_H -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/include -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/ -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/os/freebsd +CFLAGS+= -I${ZFSTOP}/include +CFLAGS+= -I${ZFSTOP}/lib/libspl/include/ +CFLAGS+= -I${ZFSTOP}/lib/libspl/include/os/freebsd CFLAGS+= -I${SRCTOP}/sys CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/include CFLAGS+= -I${SRCTOP}/sys/cddl/compat/opensolaris \ diff --git a/cddl/usr.sbin/lockstat/Makefile b/cddl/usr.sbin/lockstat/Makefile index 498e2a5857e0..cd2cb8c0c861 100644 --- a/cddl/usr.sbin/lockstat/Makefile +++ b/cddl/usr.sbin/lockstat/Makefile @@ -11,9 +11,9 @@ WARNS?= 1 CFLAGS+= -DIN_BASE CFLAGS+= -DSKIP_SPL_SYS_CONDVAR_H -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/include -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/ -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/os/freebsd +CFLAGS+= -I${ZFSTOP}/include +CFLAGS+= -I${ZFSTOP}/lib/libspl/include/ +CFLAGS+= -I${ZFSTOP}/lib/libspl/include/os/freebsd CFLAGS+= -I${SRCTOP}/sys CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/include CFLAGS+= -I${SRCTOP}/sys/cddl/compat/opensolaris diff --git a/cddl/usr.sbin/plockstat/Makefile b/cddl/usr.sbin/plockstat/Makefile index 2880c6aeafc7..dcc51d9ac2b4 100644 --- a/cddl/usr.sbin/plockstat/Makefile +++ b/cddl/usr.sbin/plockstat/Makefile @@ -11,9 +11,9 @@ WARNS?= 1 CFLAGS+= -DIN_BASE CFLAGS+= -DSKIP_SPL_SYS_CONDVAR_H -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/include -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/ -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/os/freebsd +CFLAGS+= -I${ZFSTOP}/include +CFLAGS+= -I${ZFSTOP}/lib/libspl/include/ +CFLAGS+= -I${ZFSTOP}/lib/libspl/include/os/freebsd CFLAGS+= -I${SRCTOP}/sys CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/include CFLAGS+= -I${SRCTOP}/sys/cddl/compat/opensolaris \ diff --git a/cddl/usr.sbin/zdb/Makefile b/cddl/usr.sbin/zdb/Makefile index 2e8f88603645..6707d8fdaae7 100644 --- a/cddl/usr.sbin/zdb/Makefile +++ b/cddl/usr.sbin/zdb/Makefile @@ -16,7 +16,7 @@ CFLAGS+= \ -I${ZFSTOP}/lib/libspl/include \ -I${ZFSTOP}/lib/libspl/include/os/freebsd \ -I${ZFSTOP}/lib/libspl/include/os/freebsd/spl \ - -I${SRCTOP}/sys/contrib/openzfs/lib/libzpool/include \ + -I${ZFSTOP}/lib/libzpool/include \ -I${SRCTOP}/sys \ -include ${ZFSTOP}/include/os/freebsd/spl/sys/ccompile.h \ -DHAVE_ISSETUGID diff --git a/cddl/usr.sbin/zfsd/Makefile.common b/cddl/usr.sbin/zfsd/Makefile.common index 487caf54a0ce..c610a3bf3e5b 100644 --- a/cddl/usr.sbin/zfsd/Makefile.common +++ b/cddl/usr.sbin/zfsd/Makefile.common @@ -14,12 +14,12 @@ WARNS?= 2 IGNORE_PRAGMA= YES CFLAGS+= -DIN_BASE -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/include -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/os/freebsd -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libzpool/include +CFLAGS+= -I${ZFSTOP}/include +CFLAGS+= -I${ZFSTOP}/lib/libspl/include +CFLAGS+= -I${ZFSTOP}/lib/libspl/include/os/freebsd +CFLAGS+= -I${ZFSTOP}/lib/libzpool/include CFLAGS+= -I${SRCTOP}/sys -CFLAGS+= -include ${SRCTOP}/sys/contrib/openzfs/include/os/freebsd/spl/sys/ccompile.h +CFLAGS+= -include ${ZFSTOP}/include/os/freebsd/spl/sys/ccompile.h CFLAGS+= -I${SRCTOP}/cddl/usr.sbin CFLAGS+= -DHAVE_ISSETUGID diff --git a/cddl/usr.sbin/zhack/Makefile b/cddl/usr.sbin/zhack/Makefile index 0d83856eb080..a238da39a243 100644 --- a/cddl/usr.sbin/zhack/Makefile +++ b/cddl/usr.sbin/zhack/Makefile @@ -10,14 +10,14 @@ CSTD= c99 WARNS?= 2 CFLAGS+= -DIN_BASE -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/include -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/ -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/os/freebsd -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libzpool/include +CFLAGS+= -I${ZFSTOP}/include +CFLAGS+= -I${ZFSTOP}/lib/libspl/include/ +CFLAGS+= -I${ZFSTOP}/lib/libspl/include/os/freebsd +CFLAGS+= -I${ZFSTOP}/lib/libzpool/include CFLAGS+= -I${SRCTOP}/sys CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/include -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/module/icp/include -CFLAGS+= -include ${SRCTOP}/sys/contrib/openzfs/include/os/freebsd/spl/sys/ccompile.h +CFLAGS+= -I${ZFSTOP}/module/icp/include +CFLAGS+= -include ${ZFSTOP}/include/os/freebsd/spl/sys/ccompile.h CFLAGS+= -DHAVE_ISSETUGID CFLAGS+= -include ${SRCTOP}/sys/modules/zfs/zfs_config.h diff --git a/include/Makefile b/include/Makefile index 661b2ee131ca..b8cbf0ecc1c2 100644 --- a/include/Makefile +++ b/include/Makefile @@ -233,7 +233,7 @@ RPCDIR= ${INCLUDEDIR}/rpc TEKEN= teken.h TEKENDIR= ${INCLUDEDIR}/teken -.PATH: ${SRCTOP}/sys/contrib/openzfs/include/sys +.PATH: ${ZFSTOP}/include/sys NVPAIR= nvpair.h NVPAIRDIR= ${INCLUDEDIR}/sys diff --git a/lib/libbe/Makefile b/lib/libbe/Makefile index 3ba456aee4b7..860a4aa1962a 100644 --- a/lib/libbe/Makefile +++ b/lib/libbe/Makefile @@ -53,15 +53,15 @@ LIBADD+= spl LIBADD+= zfsbootenv CFLAGS+= -DIN_BASE -DHAVE_RPC_TYPES -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/include -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/include/os/freebsd -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/os/freebsd -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libzfs -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libzpool/include +CFLAGS+= -I${ZFSTOP}/include +CFLAGS+= -I${ZFSTOP}/include/os/freebsd +CFLAGS+= -I${ZFSTOP}/lib/libspl/include +CFLAGS+= -I${ZFSTOP}/lib/libspl/include/os/freebsd +CFLAGS+= -I${ZFSTOP}/lib/libzfs +CFLAGS+= -I${ZFSTOP}/lib/libzpool/include CFLAGS+= -I${SRCTOP}/sys CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/include -CFLAGS+= -include ${SRCTOP}/sys/contrib/openzfs/include/os/freebsd/spl/sys/ccompile.h +CFLAGS+= -include ${ZFSTOP}/include/os/freebsd/spl/sys/ccompile.h CFLAGS+= -DHAVE_ISSETUGID -DHAVE_STRLCAT -DHAVE_STRLCPY CFLAGS.be.c= -Wno-cast-qual CFLAGS.be_access.c= -Wno-cast-qual diff --git a/lib/libbe/tests/Makefile b/lib/libbe/tests/Makefile index 80731ed1effc..dfe49bd7f3e5 100644 --- a/lib/libbe/tests/Makefile +++ b/lib/libbe/tests/Makefile @@ -14,12 +14,12 @@ LIBADD+= zfs \ CFLAGS+= -I${SRCTOP}/lib/libbe CFLAGS+= -DIN_BASE -DHAVE_RPC_TYPES -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/include -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/ -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/os/freebsd +CFLAGS+= -I${ZFSTOP}/include +CFLAGS+= -I${ZFSTOP}/lib/libspl/include/ +CFLAGS+= -I${ZFSTOP}/lib/libspl/include/os/freebsd CFLAGS+= -I${SRCTOP}/sys CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/include -CFLAGS+= -include ${SRCTOP}/sys/contrib/openzfs/include/os/freebsd/spl/sys/ccompile.h +CFLAGS+= -include ${ZFSTOP}/include/os/freebsd/spl/sys/ccompile.h CFLAGS+= -DHAVE_ISSETUGID .include diff --git a/lib/libproc/Makefile b/lib/libproc/Makefile index 5720dfdb6621..670c4399f63e 100644 --- a/lib/libproc/Makefile +++ b/lib/libproc/Makefile @@ -20,10 +20,10 @@ LIBADD+= ctf IGNORE_PRAGMA= YES CFLAGS+= -DIN_BASE CFLAGS+= -DSKIP_SPL_SYS_CONDVAR_H -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/include -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/ -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/os/freebsd -CFLAGS+= -include ${SRCTOP}/sys/contrib/openzfs/include/os/freebsd/spl/sys/ccompile.h +CFLAGS+= -I${ZFSTOP}/include +CFLAGS+= -I${ZFSTOP}/lib/libspl/include/ +CFLAGS+= -I${ZFSTOP}/lib/libspl/include/os/freebsd +CFLAGS+= -include ${ZFSTOP}/include/os/freebsd/spl/sys/ccompile.h CFLAGS+= -DHAVE_ISSETUGID -DHAVE_BOOLEAN -DHAVE_STRLCAT -DHAVE_STRLCPY CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libctf/common \ -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common \ diff --git a/lib/libprocstat/Makefile b/lib/libprocstat/Makefile index ab0c8157b393..648da69e2fcb 100644 --- a/lib/libprocstat/Makefile +++ b/lib/libprocstat/Makefile @@ -55,7 +55,6 @@ MLINKS+=libprocstat.3 procstat_close.3 \ .if ${MK_CDDL} != "no" CFLAGS+= -DLIBPROCSTAT_ZFS SRCS+= zfs.c -ZFSTOP= ${SRCTOP}/sys/contrib/openzfs CFLAGS.zfs.c+= -DIN_BASE CFLAGS.zfs.c+= -DHAVE_ISSETUGID CFLAGS.zfs.c+= -DZFS_DEBUG diff --git a/sbin/bectl/Makefile b/sbin/bectl/Makefile index cfd6ee2ccb97..0eb56d247ab5 100644 --- a/sbin/bectl/Makefile +++ b/sbin/bectl/Makefile @@ -15,13 +15,13 @@ LIBADD+= be \ pthread CFLAGS+= -DIN_BASE -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/include -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/ -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/os/freebsd +CFLAGS+= -I${ZFSTOP}/include +CFLAGS+= -I${ZFSTOP}/lib/libspl/include/ +CFLAGS+= -I${ZFSTOP}/lib/libspl/include/os/freebsd CFLAGS+= -I${SRCTOP}/sys CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/include -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/module/icp/include -CFLAGS+= -include ${SRCTOP}/sys/contrib/openzfs/include/os/freebsd/spl/sys/ccompile.h +CFLAGS+= -I${ZFSTOP}/module/icp/include +CFLAGS+= -include ${ZFSTOP}/include/os/freebsd/spl/sys/ccompile.h CFLAGS+= -DHAVE_ISSETUGID -DHAVE_STRLCAT -DHAVE_STRLCPY CFLAGS+= -include ${SRCTOP}/sys/modules/zfs/zfs_config.h diff --git a/usr.sbin/fstyp/Makefile b/usr.sbin/fstyp/Makefile index c1f812cb5b97..02fb9030ab1f 100644 --- a/usr.sbin/fstyp/Makefile +++ b/usr.sbin/fstyp/Makefile @@ -26,12 +26,12 @@ IGNORE_PRAGMA= YES CFLAGS+= -DHAVE_ZFS CFLAGS.zfs.c+= -DIN_BASE -CFLAGS.zfs.c+= -I${SRCTOP}/sys/contrib/openzfs/include -CFLAGS.zfs.c+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include -CFLAGS.zfs.c+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/os/freebsd -CFLAGS.zfs.c+= -I${SRCTOP}/sys/contrib/openzfs/lib/libzpool/include -CFLAGS.zfs.c+= -I${SRCTOP}/sys/contrib/openzfs/module/icp/include -CFLAGS.zfs.c+= -include ${SRCTOP}/sys/contrib/openzfs/include/os/freebsd/spl/sys/ccompile.h +CFLAGS.zfs.c+= -I${ZFSTOP}/include +CFLAGS.zfs.c+= -I${ZFSTOP}/lib/libspl/include +CFLAGS.zfs.c+= -I${ZFSTOP}/lib/libspl/include/os/freebsd +CFLAGS.zfs.c+= -I${ZFSTOP}/lib/libzpool/include +CFLAGS.zfs.c+= -I${ZFSTOP}/module/icp/include +CFLAGS.zfs.c+= -include ${ZFSTOP}/include/os/freebsd/spl/sys/ccompile.h CFLAGS.zfs.c+= -DHAVE_ISSETUGID CFLAGS.zfs.c+= -include ${SRCTOP}/sys/modules/zfs/zfs_config.h CFLAGS.zfs.c+= -Wno-cast-qual From nobody Mon Nov 24 15:54:22 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dFVkR2BpDz6HPvZ for ; Mon, 24 Nov 2025 15:54:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dFVkQ6bHJz3q9r for ; Mon, 24 Nov 2025 15:54:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763999662; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mrXDoMFdvN5LugwxiJEoaPwZyJpBW/Uz+i22AC21FQ4=; b=YFztQTb3HNxgkoIrthBrEJMM85MBPm4Qluoo5sl5DdUU9+pFv50Y5cuct3HCWtjLpJf9Xc 2qVrO7Slr0Mdix+vAPuIgj0bd6ZEVjqtygxOFNDu4U3OHXdydaH/2KOKmx+aUjXDkTSxTv 57fK/Y1oinyaufSZC/f/PQsp4QgnnaUrPXb24oHU9Es1ZZ6zLQKtWtHtFLo55iHtsBmxNO RjknKmYBPCcG8uVuYGuI3ePfziftgyxCwScBxtfraupneRQdgbe268iicQGgc5WkFbHr9U T1xvKSp+TgA0TF1lchqGxrfdm9EQ6wRtU5hVAXrMDqk90fhXVt9MchYnsWwCZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763999662; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mrXDoMFdvN5LugwxiJEoaPwZyJpBW/Uz+i22AC21FQ4=; b=q5HZXEe+1+XlSqldNFHDNpSY8VOvWEeivP7yyDYCf7Wze9L0KP0dRgMt4yvnmu2Rl3pyZE 3SBT1jT8uKhqNJUQCEylJ7T64CWFXYShdJKvO22dY7MqIX3TMzXgDL9ptZPoaSFQubEHrg mNYjts3Z7jOum0qjtbxfLmW0+23qV1drt+0mbm5ZNBxcqqDHsDDdkN839exrtwNx88z/+v 0u2m+ldAshp6yVFZUL8LkVJflowpVcveCVT0B+reuznlfSwKx4P48tl+QbLgtRP31GeQF4 XqHOSDTDtcz+S4isrKg01oF3WZmOCG3j8dwOziu1DhirLRkpwZX2IFerQN/ZcA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763999662; a=rsa-sha256; cv=none; b=TNuWr5I+WFU6/XxawXgQ5kwo1csiPUk5n2H1Wh1n5JEVfcvZDzl/fSDGpYB3lAcwYEqW7m naZ3iPceZoFkfcT8mkXvadYyXaF1brL+0JThjoIuHovMhD/ZrqWwebKbxJWtrmIivnknxx m0XxOHWTHpEND27UIm4Jp/69xws545FYOtbz2m242nzm92OR9DINai12yKnGuJ9Cgu462s EPqk2vn97uI4hyUM2/fhRM037Duto7xxEoxpB+TvWEjG+fz/nNh6VEokQIWJMDh047gXNS baKDrvCX0Sg2fjTeFgLfqFxnvx1FnJ0+tNnZ2E5GLVxoLXcjSs09c4wkgZR/5g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dFVkQ68N1z5fS for ; Mon, 24 Nov 2025 15:54:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 36bd4 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 24 Nov 2025 15:54:22 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 134d00bd2c91 - main - MAC: Use the current thread's user ABI to determine the layout of struct mac List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 134d00bd2c910cc7cc21c11fba093ff82bbb9344 Auto-Submitted: auto-generated Date: Mon, 24 Nov 2025 15:54:22 +0000 Message-Id: <69247fae.36bd4.2f8d77a7@gitrepo.freebsd.org> The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=134d00bd2c910cc7cc21c11fba093ff82bbb9344 commit 134d00bd2c910cc7cc21c11fba093ff82bbb9344 Author: John Baldwin AuthorDate: 2025-11-24 15:47:20 +0000 Commit: John Baldwin CommitDate: 2025-11-24 15:47:20 +0000 MAC: Use the current thread's user ABI to determine the layout of struct mac This removes mac_label_copyin32() as mac_label_copyin() can now handle both native and 32-bit struct mac objects. Reviewed by: olce, brooks Obtained from: CheriBSD Sponsored by: AFRL, DARPA Differential Revision: https://reviews.freebsd.org/D53755 --- sys/kern/kern_prot.c | 7 +------ sys/security/mac/mac_syscalls.c | 25 +++++-------------------- sys/security/mac/mac_syscalls.h | 9 +-------- 3 files changed, 7 insertions(+), 34 deletions(-) diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index 81099aa7d28d..5d57cdb7928d 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -635,12 +635,7 @@ user_setcred(struct thread *td, const u_int flags, #ifdef MAC if ((flags & SETCREDF_MAC_LABEL) != 0) { -#ifdef COMPAT_FREEBSD32 - if (is_32bit) - error = mac_label_copyin32(umac, &mac, NULL); - else -#endif - error = mac_label_copyin(umac, &mac, NULL); + error = mac_label_copyin(umac, &mac, NULL); if (error != 0) goto free_groups; wcred.sc_label = &mac; diff --git a/sys/security/mac/mac_syscalls.c b/sys/security/mac/mac_syscalls.c index 26181781a394..13c7998041f9 100644 --- a/sys/security/mac/mac_syscalls.c +++ b/sys/security/mac/mac_syscalls.c @@ -57,6 +57,7 @@ #include #include #include +#include #include #include #include @@ -94,15 +95,15 @@ struct mac32 { * after use by calling free_copied_label() (which see). On success, 'u_string' * if not NULL is filled with the userspace address for 'u_mac->m_string'. */ -static int -mac_label_copyin_impl(const void *const u_mac, struct mac *const mac, - char **const u_string, bool is_32bit) +int +mac_label_copyin(const void *const u_mac, struct mac *const mac, + char **const u_string) { char *buffer; int error; #ifdef COMPAT_FREEBSD32 - if (is_32bit) { + if (SV_CURPROC_FLAG(SV_ILP32)) { struct mac32 mac32; error = copyin(u_mac, &mac32, sizeof(mac32)); @@ -138,28 +139,12 @@ mac_label_copyin_impl(const void *const u_mac, struct mac *const mac, return (0); } -int -mac_label_copyin(const struct mac *const u_mac, struct mac *const mac, - char **const u_string) -{ - return (mac_label_copyin_impl(u_mac, mac, u_string, false)); -} - void free_copied_label(const struct mac *const mac) { free(mac->m_string, M_MACTEMP); } -#ifdef COMPAT_FREEBSD32 -int -mac_label_copyin32(const struct mac32 *const u_mac, - struct mac *const mac, char **const u_string) -{ - return (mac_label_copyin_impl(u_mac, mac, u_string, true)); -} -#endif - int sys___mac_get_pid(struct thread *td, struct __mac_get_pid_args *uap) { diff --git a/sys/security/mac/mac_syscalls.h b/sys/security/mac/mac_syscalls.h index 4efeaf300d31..f95ff3ef1264 100644 --- a/sys/security/mac/mac_syscalls.h +++ b/sys/security/mac/mac_syscalls.h @@ -19,17 +19,10 @@ #error "no user-serviceable parts inside" #endif -int mac_label_copyin(const struct mac *const u_mac, struct mac *const mac, +int mac_label_copyin(const void *const u_mac, struct mac *const mac, char **const u_string); void free_copied_label(const struct mac *const mac); -#ifdef COMPAT_FREEBSD32 -struct mac32; - -int mac_label_copyin32(const struct mac32 *const u_mac, - struct mac *const mac, char **const u_string); -#endif /* COMPAT_FREEBSD32 */ - int mac_set_proc_prepare(struct thread *const td, const struct mac *const mac, void **const mac_set_proc_data); int mac_set_proc_core(struct thread *const td, struct ucred *const newcred, From nobody Mon Nov 24 15:54:23 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dFVkS2YlQz6HPdg for ; Mon, 24 Nov 2025 15:54:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dFVkS0L8fz3qVj for ; Mon, 24 Nov 2025 15:54:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763999664; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xsgmjETfrEZya5C/i8LZVSegaqfzjBYYmuoK5Dl1PzA=; b=AWZT8vVTAbo2V5Rjzu+NH3AvhBcA+nEkiBbew/6wyeMcJUuQcZS5edHmbMgoMQBs5T8xFm 92ckiMN7Otuh2dqz5KzCz1vwQ7bS2rkfNi1fwqMrND59qMs9zHiBMQvDiiuPCm+tpjqTbV RFqL0bmGB7O/u1zmgQrYQUGEMm5y6iwougHBJU8owsRqnS0bKqPzr5CS/zUO0+oZIMxSs2 bItFsxQ/EJ3yDLefE+6bGXk0TTMuDSIhKP1StvJZPY2PVj8Nqnb58Kx8cozPd+1WqM5qWQ qjzApaPgiwx09kaVhMyE1QsNjw6RqqU2k9TI6Sb/KmhCBwjNNtokEAsHs7bJpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763999664; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xsgmjETfrEZya5C/i8LZVSegaqfzjBYYmuoK5Dl1PzA=; b=FDctUiO+ifTyPQjyCsRkHCagnCb5ZTZZfkZk0HQ73Zf2Sb9qsdB3BKcvYW/9IrgpezOiuR 2aD6OsHjTQUU+WA5bXnHYuC4h16VQ0XOMOuSfk1UOHIpvOOLeY4Rfev0LMm+aJWUDm/I6Q ZqnSIIPw10g5PNiK2D9UXpp8zYX6oQWaKoiEbgoQVulnRzCQhZcSwXGTfDdP4Gdyu63wTZ 1od60yrmcEoEfGzoxCFCqCz7NADPJx7eaU+hJ3nI2V5FxYCfHUx37xWBBYAxvHZirxHNan gLvR0N2w5jg3DlKeZQeL4ayFrR/vZMLJ6Yd5slKOPQfYk+fg239CwK7JLa7sVQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763999664; a=rsa-sha256; cv=none; b=TsyfOTB5EgjCIzckinnrFrRs3D/UJlbWvAKc9UJqluipc8+QPTokkwGthC02eM2TpCwCA/ bSigmgI5fGdhy+RreoVpuklorDr6OFx15T+L//P0I8iQZlPZuFt7APcHAb/RdMD5tguGKE ZOjDaXS/p9uRiOoiaw2QcdSnbjl+TKHd7SxWG6I2mGsSPR9x02dQF/+6YgFWMHAQ/C72+3 dxJt28/EzCzzfaU/l5HEuSBMOrpFPbFKAjgx6kQJ3j1pLo3N4lEfVLqeBhcIyiy//HI6Jj lKdUSdpGetIxpM7sKjQUS56CHThMvutwuwVQxn44GSyFjQLJ2Sml6bv2IcMUeA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dFVkR70MPz5RQ for ; Mon, 24 Nov 2025 15:54:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 36578 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 24 Nov 2025 15:54:23 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 6292eecfd95c - main - setcred: Move initial copyin of struct setcred out to per-ABI syscall List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6292eecfd95c78abc1ab14f20ceaa507ab9c636a Auto-Submitted: auto-generated Date: Mon, 24 Nov 2025 15:54:23 +0000 Message-Id: <69247faf.36578.662833c4@gitrepo.freebsd.org> The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=6292eecfd95c78abc1ab14f20ceaa507ab9c636a commit 6292eecfd95c78abc1ab14f20ceaa507ab9c636a Author: John Baldwin AuthorDate: 2025-11-24 15:48:48 +0000 Commit: John Baldwin CommitDate: 2025-11-24 15:48:48 +0000 setcred: Move initial copyin of struct setcred out to per-ABI syscall This is the more typical approach used in the tree for system calls with per-ABI structure layouts. Reviewed by: olce, brooks Obtained from: CheriBSD Sponsored by: AFRL, DARPA Differential Revision: https://reviews.freebsd.org/D53756 --- sys/compat/freebsd32/freebsd32_misc.c | 18 ++++++++++-- sys/kern/kern_prot.c | 52 ++++++++++++----------------------- sys/sys/ucred.h | 4 +-- 3 files changed, 35 insertions(+), 39 deletions(-) diff --git a/sys/compat/freebsd32/freebsd32_misc.c b/sys/compat/freebsd32/freebsd32_misc.c index e62c76924d22..33b4872ba10f 100644 --- a/sys/compat/freebsd32/freebsd32_misc.c +++ b/sys/compat/freebsd32/freebsd32_misc.c @@ -4240,6 +4240,20 @@ ofreebsd32_sethostid(struct thread *td, struct ofreebsd32_sethostid_args *uap) int freebsd32_setcred(struct thread *td, struct freebsd32_setcred_args *uap) { - /* Last argument is 'is_32bit'. */ - return (user_setcred(td, uap->flags, uap->wcred, uap->size, true)); + struct setcred wcred; + struct setcred32 wcred32; + int error; + + if (uap->size != sizeof(wcred32)) + return (EINVAL); + error = copyin(uap->wcred, &wcred32, sizeof(wcred32)); + if (error != 0) + return (error); + /* These fields have exactly the same sizes and positions. */ + memcpy(&wcred, &wcred32, __rangeof(struct setcred32, + setcred32_copy_start, setcred32_copy_end)); + /* Remaining fields are pointers and need PTRIN*(). */ + PTRIN_CP(wcred32, wcred, sc_supp_groups); + PTRIN_CP(wcred32, wcred, sc_label); + return (user_setcred(td, uap->flags, &wcred)); } diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index 5d57cdb7928d..8021beed90e8 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -570,10 +570,8 @@ kern_setcred_copyin_supp_groups(struct setcred *const wcred, } int -user_setcred(struct thread *td, const u_int flags, - const void *const uwcred, const size_t size, bool is_32bit) +user_setcred(struct thread *td, const u_int flags, struct setcred *const wcred) { - struct setcred wcred; #ifdef MAC struct mac mac; /* Pointer to 'struct mac' or 'struct mac32'. */ @@ -593,42 +591,18 @@ user_setcred(struct thread *td, const u_int flags, if ((flags & ~SETCREDF_MASK) != 0) return (EINVAL); -#ifdef COMPAT_FREEBSD32 - if (is_32bit) { - struct setcred32 wcred32; - - if (size != sizeof(wcred32)) - return (EINVAL); - error = copyin(uwcred, &wcred32, sizeof(wcred32)); - if (error != 0) - return (error); - /* These fields have exactly the same sizes and positions. */ - memcpy(&wcred, &wcred32, __rangeof(struct setcred32, - setcred32_copy_start, setcred32_copy_end)); - /* Remaining fields are pointers and need PTRIN*(). */ - PTRIN_CP(wcred32, wcred, sc_supp_groups); - PTRIN_CP(wcred32, wcred, sc_label); - } else -#endif /* COMPAT_FREEBSD32 */ - { - if (size != sizeof(wcred)) - return (EINVAL); - error = copyin(uwcred, &wcred, sizeof(wcred)); - if (error != 0) - return (error); - } #ifdef MAC - umac = wcred.sc_label; + umac = wcred->sc_label; #endif /* Also done on !MAC as a defensive measure. */ - wcred.sc_label = NULL; + wcred->sc_label = NULL; /* * Copy supplementary groups as needed. There is no specific * alternative for 32-bit compatibility as 'gid_t' has the same size * everywhere. */ - error = kern_setcred_copyin_supp_groups(&wcred, flags, smallgroups, + error = kern_setcred_copyin_supp_groups(wcred, flags, smallgroups, &groups); if (error != 0) goto free_groups; @@ -638,15 +612,15 @@ user_setcred(struct thread *td, const u_int flags, error = mac_label_copyin(umac, &mac, NULL); if (error != 0) goto free_groups; - wcred.sc_label = &mac; + wcred->sc_label = &mac; } #endif - error = kern_setcred(td, flags, &wcred, groups); + error = kern_setcred(td, flags, wcred, groups); #ifdef MAC - if (wcred.sc_label != NULL) - free_copied_label(wcred.sc_label); + if (wcred->sc_label != NULL) + free_copied_label(wcred->sc_label); #endif free_groups: @@ -667,7 +641,15 @@ struct setcred_args { int sys_setcred(struct thread *td, struct setcred_args *uap) { - return (user_setcred(td, uap->flags, uap->wcred, uap->size, false)); + struct setcred wcred; + int error; + + if (uap->size != sizeof(wcred)) + return (EINVAL); + error = copyin(uap->wcred, &wcred, sizeof(wcred)); + if (error != 0) + return (error); + return (user_setcred(td, uap->flags, &wcred)); } /* diff --git a/sys/sys/ucred.h b/sys/sys/ucred.h index 254f58841993..12d34d990bff 100644 --- a/sys/sys/ucred.h +++ b/sys/sys/ucred.h @@ -198,8 +198,8 @@ struct setcred32 { struct thread; /* Common native and 32-bit compatibility entry point. */ -int user_setcred(struct thread *td, const u_int flags, - const void *const uwcred, const size_t size, bool is_32bit); +int user_setcred(struct thread *td, const u_int flags, + struct setcred *const wcred); struct proc; From nobody Mon Nov 24 15:54:25 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dFVkT52yJz6HPvg for ; Mon, 24 Nov 2025 15:54:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dFVkT0y86z3qSN for ; Mon, 24 Nov 2025 15:54:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763999665; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=I/4C1UqROavZXx3raAA8fIIy+QLX2Nq3MUJ4gaJxZnc=; b=MhdXNhkaBLY7iGAqNTGKKoKJADbot3DzSzQeTFfJWGfbKf1stgbGqiVvrniv/zJEIRQmla Tp2xCVT/xmu9avCd/um6FLYv9M1lj1AlNjNNLINvG8sODMV6hbCjsr1PUW3ScqMkyKjB7t tFLZxTYYGc9gH4GVztpkcT+515ka4sOMjInREkXINAcp8KFy77APjXAdhlm9lDxseBfAU5 pVH1p4cFCdX8RIB6VSl839eTGd54izqe5vKM3zJymL7Pi7yIU78o5a+PVaBAV/aKrmMCve Czv84SQxf5D7MJMh9VCl2xHrZXGmTX5ensYJQO3Gfy/GcWIP6xstJCkGT0P3vQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763999665; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=I/4C1UqROavZXx3raAA8fIIy+QLX2Nq3MUJ4gaJxZnc=; b=AgD/9mvyKpJtzBkdfWcye1Eg6bweL1158hXXH+4CGku7+6U3W486qIQC0r5L9rIuJ6Ep2E ikTaQOhQc1QtB0sizXcGtC5HsiipCv82bm/zkc1s4ryEo94Uvr8W6S0S4n3NHH3nCddYEF HRZZAaisVWUG+d+G2izYEBsgTRzEJ6g0mn3EkfNMrl3Zpa9ymkCI1LTyT03k6494rRvFSU FyFCO7wkGGq++x1XPtHv7FtBZePxskssMgO/YTxF9ITeUPA6RpWNzFP7Vu0v8tk28yL3JX be+v8zYapG1q4Xor5x7yIDJoKWyxMSryN1eSp6nbg5u5K2mNczv81Y/LyBMXEw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763999665; a=rsa-sha256; cv=none; b=Q7XEX4Cw0UfvRSTT3CMqnMmhGGS2IHTDW+7VZY1172S7kl2//U4RVbcq1tM3OUsjCRTqVP lziP+FKpr4Nzjee1I0E5FW5oSCoCqN1+k7gn5tB/ltJvDBOyFpUPVe5ZyAcDEcv2Ks1po3 YFEDWNHTE6+FvJeHSUCOGlYFy4sBnUpFzw30h2Njuh21wqkYFbHjSAeofhmNigykVvq2By PcN9DVxrxobuzk8Umq7HMeoE36MTY/c/qsEt/gD82OChQFQ2z8Yx0OYPsLLShe27U7Egr3 VKcLl+oboD2GFR5P70Mwp8xqF9vn1fbG+JLTstQ5pd4mMIXrkofwGkF+mBEv6Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dFVkT0Hf1z5x7 for ; Mon, 24 Nov 2025 15:54:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 35e23 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 24 Nov 2025 15:54:25 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: f7ab908244e5 - main - freebsd32_setcred: Copy all of the setcred fields individually List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f7ab908244e50c8c8edf314424c860e34ea3d7e9 Auto-Submitted: auto-generated Date: Mon, 24 Nov 2025 15:54:25 +0000 Message-Id: <69247fb1.35e23.5267f1f0@gitrepo.freebsd.org> The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=f7ab908244e50c8c8edf314424c860e34ea3d7e9 commit f7ab908244e50c8c8edf314424c860e34ea3d7e9 Author: John Baldwin AuthorDate: 2025-11-24 15:49:09 +0000 Commit: John Baldwin CommitDate: 2025-11-24 15:49:09 +0000 freebsd32_setcred: Copy all of the setcred fields individually This is the more typical style used in compat syscalls. Modern compilers are smart enough to coalesce multiple member assignments into a bulk copy. Reviewed by: olce, brooks Obtained from: CheriBSD Sponsored by: AFRL, DARPA Differential Revision: https://reviews.freebsd.org/D53757 --- sys/compat/freebsd32/freebsd32_misc.c | 12 ++++++++---- sys/sys/ucred.h | 2 -- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/sys/compat/freebsd32/freebsd32_misc.c b/sys/compat/freebsd32/freebsd32_misc.c index 33b4872ba10f..7913940338c2 100644 --- a/sys/compat/freebsd32/freebsd32_misc.c +++ b/sys/compat/freebsd32/freebsd32_misc.c @@ -4249,10 +4249,14 @@ freebsd32_setcred(struct thread *td, struct freebsd32_setcred_args *uap) error = copyin(uap->wcred, &wcred32, sizeof(wcred32)); if (error != 0) return (error); - /* These fields have exactly the same sizes and positions. */ - memcpy(&wcred, &wcred32, __rangeof(struct setcred32, - setcred32_copy_start, setcred32_copy_end)); - /* Remaining fields are pointers and need PTRIN*(). */ + memset(&wcred, 0, sizeof(wcred)); + CP(wcred32, wcred, sc_uid); + CP(wcred32, wcred, sc_ruid); + CP(wcred32, wcred, sc_svuid); + CP(wcred32, wcred, sc_gid); + CP(wcred32, wcred, sc_rgid); + CP(wcred32, wcred, sc_svgid); + CP(wcred32, wcred, sc_supp_groups_nb); PTRIN_CP(wcred32, wcred, sc_supp_groups); PTRIN_CP(wcred32, wcred, sc_label); return (user_setcred(td, uap->flags, &wcred)); diff --git a/sys/sys/ucred.h b/sys/sys/ucred.h index 12d34d990bff..ba241cf9ff3a 100644 --- a/sys/sys/ucred.h +++ b/sys/sys/ucred.h @@ -181,7 +181,6 @@ struct setcred { SETCREDF_MAC_LABEL) struct setcred32 { -#define setcred32_copy_start sc_uid uid_t sc_uid; uid_t sc_ruid; uid_t sc_svuid; @@ -190,7 +189,6 @@ struct setcred32 { gid_t sc_svgid; u_int sc_pad; u_int sc_supp_groups_nb; -#define setcred32_copy_end sc_supp_groups uint32_t sc_supp_groups; /* gid_t [*] */ uint32_t sc_label; /* struct mac32 [*] */ }; From nobody Mon Nov 24 15:58:26 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dFVq66fPPz6HQFW for ; Mon, 24 Nov 2025 15:58:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dFVq64NYqz3s61 for ; Mon, 24 Nov 2025 15:58:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763999906; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zKneL1/xN+VkHjHXd0b1gaGA1/nDLxJT54cG+1YW6rA=; b=qG6KzMnAhLpnleT8sPZ6R8noxviICvho3+o7bGU/LxoJ3/ORBIByrI1DvXB14Z39Cnk6Nz IWI7LP2u75MoGxH+xGl1BfR223hXf5nTWzdzpa11uXuHv0AWAzS/GFOjHwXYYwv1BdLFd8 Q2ok+82p4MKcWYR0E0Ti8hss+UYeGSYCEYpaU21a0nZHWHaXUD46P6mF6JAgaYuw38FlJc JAn8w6F5bkzFoor6UN4YP/b7tsD4yJZNPMpFybZUyZ71HgWuAPYOq4oli73eZxZfUjlUKh H2+2XYgf+YSOpoUAar+89HkPD8Mv9WEOHsDREVJ+avs/lvRzcNOlHjpNcMg02w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763999906; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zKneL1/xN+VkHjHXd0b1gaGA1/nDLxJT54cG+1YW6rA=; b=RF71XWqyMcFpUiJ4V4aTmCaKBY3Dwgs0VJ7qbekRndlaRbkuCWCUSvaGGv9tuRqNXAse7b LUsecodfNcCqJV5cJFgbs0n3ttVSHV7573yZQ+CUO4O2SpYrMQmsXjHatVd/w+DTkTm6sO vja9z+k6H+p86Q+CIRyGNd5Vavu3xIqqS/1Alhis42IL13khM5wDeo3SwSS7k3ZO1OOPv0 w6a0BoVS15r5djejpCtjZAiw3yaYkhuOKglq9yZIH4HQh1caseBzdQQK+DaJw8O3+i/l1p e2h1i8csGpoKrakZpf/9LEbeYocwR0fB4VzvjmcP3xc6sjVLEN3gQYxb4o3Bwg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763999906; a=rsa-sha256; cv=none; b=bAQaW79ZI699iiBPU2Rbuz80dpP5hkLH9Bz1+NGTYa5F3j479UBxODC2Aa5XjmZxL4MGTG NrOr/bU1xpIn7MZEEo6wM/4Z/R47cZ93qAqR8QsNCCOflLK/eXqZr+PsqJKqkd8ou2ozx3 tDoLVZ4Nkw5+R3WDwDKyLPTWbyzFMmIgGyM10qvN2MBin0W31/ygHg1F5jj6zSt8q469CU XAwwZrk9YJxmgv4MKyybTl3vDUQO7/amvuvXxCCPYQSxuDhY+C4kHoyETGgUTLta2extfM OJIIxluAyKgTFkSG4y7vCMCiz7429oVOVgYdwWnqGoDG8iseAeEj8Hu7bdhphQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dFVq63Bnvz5xD for ; Mon, 24 Nov 2025 15:58:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 350ac by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 24 Nov 2025 15:58:26 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 828df4d36d9d - main - netlink: Fix overallocation of netlink message buffers List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 828df4d36d9d5a6ca0dcc294d65572b4a0474142 Auto-Submitted: auto-generated Date: Mon, 24 Nov 2025 15:58:26 +0000 Message-Id: <692480a2.350ac.238c5337@gitrepo.freebsd.org> The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=828df4d36d9d5a6ca0dcc294d65572b4a0474142 commit 828df4d36d9d5a6ca0dcc294d65572b4a0474142 Author: John Baldwin AuthorDate: 2025-11-24 15:55:05 +0000 Commit: John Baldwin CommitDate: 2025-11-24 15:55:05 +0000 netlink: Fix overallocation of netlink message buffers Prior to commit 0c511bafdd5b309505c13c8dc7c6816686d1e103, each time snl_realloc_msg_buffer was called, it called snl_allocz to request a new buffer. If an existing linear buffer was used, then after the call, the linear buffer effectively contained the old buffer contents followed by the new buffer (so there was definitely wasted memory), but the linear buffer state was consistent (lb->offset correctly accounted for both copies). For example, if the initial linear buffer was 256 bytes in size, lb->size would be 256. Using 16 bytes followed by 32 bytes would first set lb->offset to 16, then the second realloc would allocate 48 bytes (16 + 32) setting lb->offset to 64 (16 + 48). Commit 0c511bafdd5b309505c13c8dc7c6816686d1e103 aimed to avoid this memory waste by resetting the base pointer to the start of the existing linear buffer if the new allocation was later in the same linear buffer. This avoided some of the waste, but broke the accounting. Using the same example above, the second realloc would reuse the pointer at an offset of 0, but the linear buffer would still claim that 64 bytes was allocated via lb->offset rather than the true allocation of 48 bytes. One approach to fix this would be to "extend" the allocation of an existing linear buffer where a realloc would try to increase lb->offset without setting a new base pointer so long as there was still room remaining in the linear buffer for the new request. However, this change takes a simpler approach. If snl_allocz() returned an allocation from a new linear buffer, just claim the entire linear buffer for use by the snl_writer ensuring the accounting is correct in both the linear buffer and the snl writer. With this approach, the initial snl_writer size would be 256 bytes for a 256 byte linear buffer and would only grow if it needs to allocate an entirely new linear buffer. Reviewed by: igoro Fixes: 0c511bafdd5b ("netlink: fix snl_writer and linear_buffer re-allocation logic") Sponsored by: AFRL, DARPA Differential Revision: https://reviews.freebsd.org/D53697 --- sys/netlink/netlink_snl.h | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/sys/netlink/netlink_snl.h b/sys/netlink/netlink_snl.h index 57f7e1e29d08..1e560e029718 100644 --- a/sys/netlink/netlink_snl.h +++ b/sys/netlink/netlink_snl.h @@ -1082,6 +1082,7 @@ snl_init_writer(struct snl_state *ss, struct snl_writer *nw) static inline bool snl_realloc_msg_buffer(struct snl_writer *nw, size_t sz) { + void *new_base; uint32_t new_size = nw->size * 2; while (new_size < nw->size + sz) @@ -1090,23 +1091,27 @@ snl_realloc_msg_buffer(struct snl_writer *nw, size_t sz) if (nw->error) return (false); - if (snl_allocz(nw->ss, new_size) == NULL) { + new_base = snl_allocz(nw->ss, new_size); + if (new_base == NULL) { nw->error = true; return (false); } - nw->size = new_size; - void *new_base = nw->ss->lb->base; - if (new_base != nw->base) { - memcpy(new_base, nw->base, nw->offset); - if (nw->hdr != NULL) { - int hdr_off = (char *)(nw->hdr) - nw->base; + if (new_base == nw->ss->lb->base) { + /* Claim the entire linear buffer. */ + nw->size = nw->ss->lb->size; + nw->ss->lb->offset = nw->ss->lb->size; + } else + nw->size = new_size; - nw->hdr = (struct nlmsghdr *) - (void *)((char *)new_base + hdr_off); - } - nw->base = (char *)new_base; + memcpy(new_base, nw->base, nw->offset); + if (nw->hdr != NULL) { + int hdr_off = (char *)(nw->hdr) - nw->base; + + nw->hdr = (struct nlmsghdr *) + (void *)((char *)new_base + hdr_off); } + nw->base = (char *)new_base; return (true); } From nobody Mon Nov 24 16:23:23 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dFWMv5lSbz6HS8R for ; Mon, 24 Nov 2025 16:23:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dFWMv2gJXz3xNt for ; Mon, 24 Nov 2025 16:23:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764001403; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Z1RU7wb9P6JgteL4xnEhiVlKOnFhS3MvCYj+WSmntZo=; b=riesY6EORQy6NxLgyuTubA2evuydB9k/WWt4W+Bf3zLKfeSeGzBthmBsvwQmQq80gpi539 ZOGyT2zM/ojHBii3b4cpuZToOqJQC81Bg5If2t6ILFoKY3ifHSmyKc3utgClT5of8khaWi YD6msG3oT9nuPz/WouNGtA+K79sWH0WcfFPjn+Mgtudp3gP3eOIgeLeNPG06LVvE0i7yfK M8Q5rJRrA0ew+ADdAV3W7sVW1ALWPi0CWM584dw1ll/wV/baWPNiHjKMY7Xtst8EIzZcPi JqBID8dfHJ4zIb7neXLc62MYN0OCLaZHuR9pR0bZfNGY+8+07EOwisTPB7fnfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764001403; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Z1RU7wb9P6JgteL4xnEhiVlKOnFhS3MvCYj+WSmntZo=; b=pzv14bCydP167hQ3Emi7xA+768fJF679AWAkoJ6jpgRc42h8AtoBGFMS/x6gNHUs85WQoV XJOh8jIca8NRYNC2XLsF4F/vzw2qp5zfoyLND8hPCdYmnPOukDGb5t2j4VWOfqWxsgZloZ hyWYpGjI8MqVQAa0ZCtrztQeZ/6qYljmL2XhQZ4UVsJHaqHkmIItREMLC+/sIzj4pIxdR5 z8hBKnYV7yULTJpIKu0p4o5Ky/pCWRQ2aEGK9qmrOTqRP68WC9p2CSqRQrY1QGePJ2GyMk tu+I97cfdzoZ2EAn1a4NGuVF/pnd3aUOZGk2167WFxSmO+2ELXS3r1TSyIYabQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764001403; a=rsa-sha256; cv=none; b=kXDq/FPK0sGX/xJVvMaLhNEqDmkzMXHNfepLDkiB+tgXzoOYhiPs0m410akvarUrnXJEib OWT23fdzN71lwwhDBEy6ywfol8+08iCSQue9hWUkMxOii1MycQgQw20wYm+UWJ55XKpBvM 8TArydA6zjVXszEGM16hNwkExx1sDldsNNyWWqG6YhnciH2kpw9o+p+lhJT6/+CfICeq0f 1OHO0vvx7kZkc9tilORT/0sFBAYZQpijQJD3vqgK/ku6lL4KFHsyaV+g6e7aDkzj4cMKuy XrV5atHUMu9cgoqneafdPwEEjLAoqHVC2IyyX87qYM1saIRCr9B7yziamJURYQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dFWMv2Bbvz6VB for ; Mon, 24 Nov 2025 16:23:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 38e0f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 24 Nov 2025 16:23:23 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 8a766c9e81c3 - main - nvme: Fix some comments List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8a766c9e81c3d9638fd0a1c3c2aa51cee2379539 Auto-Submitted: auto-generated Date: Mon, 24 Nov 2025 16:23:23 +0000 Message-Id: <6924867b.38e0f.549f8ae4@gitrepo.freebsd.org> The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=8a766c9e81c3d9638fd0a1c3c2aa51cee2379539 commit 8a766c9e81c3d9638fd0a1c3c2aa51cee2379539 Author: Warner Losh AuthorDate: 2025-11-19 00:00:12 +0000 Commit: Warner Losh CommitDate: 2025-11-24 16:23:18 +0000 nvme: Fix some comments Tweak a couple of comments and fix a spelling error. Sponsored by: Netflix --- sys/dev/nvme/nvme.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sys/dev/nvme/nvme.h b/sys/dev/nvme/nvme.h index c8eba3df9c2a..3de65a4a481f 100644 --- a/sys/dev/nvme/nvme.h +++ b/sys/dev/nvme/nvme.h @@ -1540,8 +1540,7 @@ enum nvme_log_page { /* 0xC0-0xFF - vendor specific */ /* - * The following are Intel Specific log pages, but they seem - * to be widely implemented. + * The following are Intel Specific log pages for older models. */ INTEL_LOG_READ_LAT_LOG = 0xc1, INTEL_LOG_WRITE_LAT_LOG = 0xc2, @@ -1550,7 +1549,7 @@ enum nvme_log_page { INTEL_LOG_DRIVE_MKT_NAME = 0xdd, /* - * HGST log page, with lots ofs sub pages. + * HGST log page, with lots of sub pages. */ HGST_INFO_LOG = 0xc1, }; From nobody Mon Nov 24 17:31:26 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dFXtR06qtz6HYWQ for ; Mon, 24 Nov 2025 17:31:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dFXtQ0qrmz44wN for ; Mon, 24 Nov 2025 17:31:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764005486; 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=qmexoPRHXWjAoh4tJXArQ302MK62/gzqKQHRN9MQ5mY=; b=mmsk83UDZgks/NwtT7j2U4mtmb05MQLlxu6DGVhEjRv2tpNbQ6JR7cfkGsTVNbK4DAuUa9 OUGaUW6c2KXdYMmfJepZ6ebtST+XqIe35G3kR3cf0igDE8PdMp8N01zJakIFDiUipMDw6n 4UhfcQ/C8OQA4k+9hjyJB7vBJ+vOznDVKp++TJjSspgb1vlkINoPesiaAhWh6+HfYQ2baK nrGbTSO80qanDfJAckRA5XbblXTiqtY+2LsS3BK2fVFmrACQFSCOiwetrMTHseVpi1xBDZ +fpOogyrGbgUaHlpCLRSwhWZ/ezwe3GwT47REERECe6skRPNZNJlgDTuAlfj4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764005486; 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=qmexoPRHXWjAoh4tJXArQ302MK62/gzqKQHRN9MQ5mY=; b=azeviXGlkWoUn9r0Titt3QPpB6sMfMZc88sL5Bfk3LZtlgq5hpj/EqDpvhwkez5uOSeAzC nJ3Wt2ed73htBmluPNavD46PdJXDrXKC4z/NXaHRy6E+z0IO4Wh9fNc4O+6i9M40c4W/QF 7ulvOTZqDsEk/YHu3JH/lpcuXZwLaymZXw6o+Cax0rl6e52RmNv55zZFkL7l+WdCNSe0VU ol3imVd8k2De1X3V2/C8W74MjxaXgvaeZAkimCWHi+c05mpu/nvT4zMo5MSKpElqTp8Yo8 ZbhwbuCpiqxkjIQTX8nCeTmxShtImJuG+wM/Lkm6aZBuyZZt12K6W9w+uRtV5A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764005486; a=rsa-sha256; cv=none; b=f8bDK1LJnX5Ob9SKATE5S9K1SIyZkEEFVDsENfnN2xMLc7F8IHPkPsWJAC7VOWpQQpFQ/A zX1D9PUSa7SOMTQTgakkdAsQNoI+ZF+Azv3pkizO3eTMCJs53Z9aBeaJtJvF8hMRwPYpK1 FgD/h9DmmXPyv9iezf52s20hflhupl9kRngoQGvkzqLoPgbs64pcjrikx6yML7aDvFItX9 kWnUAoh/4ELD2PJK0Ul3yvJV+1GbWBBX25k3lz/rrUHafqcxvYQJMH6IO8r+TvT2m/mRdM 1gNi4T5cdbJM0RUxC2R121lpXwwj5IoUKTl3E4aypA3UdPMQY9HEwHZ42o+4bA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dFXtQ0Qdlz7Y7 for ; Mon, 24 Nov 2025 17:31:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3e9a0 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 24 Nov 2025 17:31:26 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Mark Johnston From: Colin Percival Subject: git: 76883b793db8 - releng/15.0 - inotify: Work around the vput() bug directly List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.0 X-Git-Reftype: branch X-Git-Commit: 76883b793db8385dd98bc81ac993f73eeda6164f Auto-Submitted: auto-generated Date: Mon, 24 Nov 2025 17:31:26 +0000 Message-Id: <6924966e.3e9a0.3ec1daa2@gitrepo.freebsd.org> The branch releng/15.0 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=76883b793db8385dd98bc81ac993f73eeda6164f commit 76883b793db8385dd98bc81ac993f73eeda6164f Author: Mark Johnston AuthorDate: 2025-11-15 18:00:44 +0000 Commit: Colin Percival CommitDate: 2025-11-24 17:31:16 +0000 inotify: Work around the vput() bug directly For 15.0, apply a minimal fix which at least ensures that inotify can't trigger the latent race described in commit 99cb3dca4773 ("vnode: Rework vput() to avoid holding the vnode lock after decrementing"). Approved by: re (cperciva) Reviewed by: olce, kib MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D53774 (cherry picked from commit ebc17879f0885ca87644980f6275b9759b311eb3) (cherry picked from commit 1f6e3abf41718e8e4a309be122f0a6048e9c5772) --- sys/kern/vfs_inotify.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/sys/kern/vfs_inotify.c b/sys/kern/vfs_inotify.c index b265a5ff3a62..de8f99ea8d2f 100644 --- a/sys/kern/vfs_inotify.c +++ b/sys/kern/vfs_inotify.c @@ -380,7 +380,14 @@ inotify_unlink_watch_locked(struct inotify_softc *sc, struct inotify_watch *watc static void inotify_free_watch(struct inotify_watch *watch) { - vrele(watch->vp); + /* + * Formally, we don't need to lock the vnode here. However, if we + * don't, and vrele() releases the last reference, it's possible the + * vnode will be recycled while a different thread holds the vnode lock. + * Work around this bug by acquiring the lock here. + */ + (void)vn_lock(watch->vp, LK_EXCLUSIVE | LK_RETRY); + vput(watch->vp); free(watch, M_INOTIFY); } From nobody Mon Nov 24 17:42:51 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dFY7b4l2sz6HYhw for ; Mon, 24 Nov 2025 17:42:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dFY7b3p8mz46LF for ; Mon, 24 Nov 2025 17:42:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764006171; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aXltT/d0NoDiuwDxNbTdytMBKWEQ6a5k8c3xZbtZmXU=; b=gOJAQxaQRb6N78/EO8M0/KMSXIWhjCJojSwXAWj1wQct7JXnRio9l1oXn9i3JYKCKIonuX 1xIFVun0d7RZBGO40fa+ofrQ6RIGlY/rQP8qUnUS2rGN/czPmVR6i9nMX9+wJ4IZhdRYB9 r+hVOID3/HtlhUaqh2Tt2Q5eD5IQjjFVJ2xRcpmBz01iXlL1pcGH60S93VITbA+1MN+qoq y0kA7O/RNW0OaDHnCemzNebkIvi5gSAuDRrCbvxWhGpVMGD6eTVAANoFdRPZTIZagdpZhx aoHGMKTyPUSQIFxfhkWtKFJWTtohMhUvYkts1n6bT2XCNp30bdcv/EUE1Tacog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764006171; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aXltT/d0NoDiuwDxNbTdytMBKWEQ6a5k8c3xZbtZmXU=; b=Drxy1Hh5/7vfCIs7dfJaQzrOxfO1H8r84FdK9x1h2qs/+nNQmc7WovCzGouMe8RUIItr1e 2N+Y2i23QfFbuMfOBwMx4T6yIssiVH01vd13yRh8YE/QuZvVr3RjGsAsl0aR4vFfxRsiVB CYpsCZeeVAFse5XHLRtKr9PYVbVQMahOifpawXWK0bQjJrfmyqBQN89MtB37GHorxaLF+9 d7GGw5IgERqIP4fmt/Pay/+kKXaFuhg2YW1uIS1W34ZSR+Yu5+A7gHOrDrTu/0iVzUEpJQ 7FQMEPNUN5yIhNbpIju5LYioxFQR+LFbU4oHBUzlcm7M85Evf/IuM3pxHhXDyQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764006171; a=rsa-sha256; cv=none; b=o0P/jZkBTS53b92Iv8llwha/ajsXJb1RYtFwFO2ImO5D7foAQ0pXH10J3Oubwk/CYwqFCt aWjAgPp5iMOFigxd+MHwkRqL5hgKbODEFgfp7Ls4Tt5KmOt0wQ9kIEmWmnIflx/WWi9Feh ZOowgqZucU+M95rVUnNtyBfAth5N2hYMoHAhh/j2O9OqRCOVzToACNYpb8+y63TslGbJhA YD7SvSRLU3DKZaVUjyySzgyaiNHk9uIjE/bhgFs9sS+Mk+vh+6Lmjsh9TP5Ifb/2IOdvO2 y2Sn9pqRBGMjFnQ7WTo6SM22gVS5ECTsl3PKSxAspK7X3HKvRrIjO0ou7hS+aw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dFY7b3Nw7z8Z4 for ; Mon, 24 Nov 2025 17:42:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 8b07 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 24 Nov 2025 17:42:51 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: 91e2d7b9b273 - releng/15.0 - 15.0: Update to RC4 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.0 X-Git-Reftype: branch X-Git-Commit: 91e2d7b9b2732001909b551980bb9dfdcf80805e Auto-Submitted: auto-generated Date: Mon, 24 Nov 2025 17:42:51 +0000 Message-Id: <6924991b.8b07.59dbb944@gitrepo.freebsd.org> The branch releng/15.0 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=91e2d7b9b2732001909b551980bb9dfdcf80805e commit 91e2d7b9b2732001909b551980bb9dfdcf80805e Author: Colin Percival AuthorDate: 2025-11-24 17:42:12 +0000 Commit: Colin Percival CommitDate: 2025-11-24 17:42:12 +0000 15.0: Update to RC4 This will hopefully be the final RC build before the release. Approved by: re (implicit) --- sys/conf/newvers.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh index e5095a8b04bc..53749b31fb6e 100644 --- a/sys/conf/newvers.sh +++ b/sys/conf/newvers.sh @@ -51,7 +51,7 @@ TYPE="FreeBSD" REVISION="15.0" -BRANCH="RC3" +BRANCH="RC4" if [ -n "${BRANCH_OVERRIDE}" ]; then BRANCH=${BRANCH_OVERRIDE} fi From nobody Mon Nov 24 18:09:09 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dFYjx4YMpz6HbTR for ; Mon, 24 Nov 2025 18:09:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dFYjx1fc6z49Fl for ; Mon, 24 Nov 2025 18:09:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764007749; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9wcWkvR8x+UDO4S8uZCne4RrcnUMs7Rqq2rQPz+PgLU=; b=bZjoVwq4+gzUKbrPfuQvd5O9gEs5Bmtcnx8SK+yMZHUDmQkZ8izQBOEapdYs5n06R8hipU 7jSLOrnn4b7+PUKY/PAspS2cUgVOBHhFaTm5iCABb0CzqkcuT1hGz85hdqy4Vxot+oeshx Xl3IV7jBB3Hha7SL07/AivNutTxkQHIkMSLYoothEmyXmUogkbO46iAfcenfNSIRYzA45i WKdwWEZ/syiH9Y4CH+n/JX+Fi4nY2TgCqlL3skSMH0Ghz713kJnPfo/pNF6jYyFUptFKPJ MAjlAdoc3MIvumtgED6nWRTYvrwJqTcU/Qs5SZirH3itGvNVvJQVSXcH/ZIk8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764007749; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9wcWkvR8x+UDO4S8uZCne4RrcnUMs7Rqq2rQPz+PgLU=; b=pNFdB+pIop0c1qz3pwLcbLCVfsDQDAca+8iyXAq1jY79zWet2aYr3qmDY2vuJEdk2ftZMJ rHhLqEoV7AUIExJp9TNZxSDhNxcCWQNwtI30q5x+AlglrEAFYTgZfXjdkkIxsrzBc5t+iO Gm+A1Kpt7im98djS7w5x6m9VJWNz58EY6yeMv4pKAe04dJvbxjZuVhrPq5fNmOyVwSpwU5 n6q4d5dW5YWe/Uwl8IyDTafEP0NYlX1KCxVjZb7BIHkkb0bnIzob6wHpySY3SK6Czkh4jp OmZ7nWrMLnmgQNDN8+0JsK+fmWyG83necqaWj0k2KAICdoSoxJ0wMd/0A6Cj8Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764007749; a=rsa-sha256; cv=none; b=iR6607qg1AAFnCMR7Oi72c/rGHFnEiIZFdzJfsEQgJeen+Vjj7E2wcbKoLKyeeYRRdCz3D 6YwCLmA9/tFSyRe2tNqgRKQme2UuMTN3Q1Ut91F8cdfdeN8sBmUAMVxj5s2gVcoJ453J1k utc12wLyRJoBldzNJtoPD2MF7Mnj4AhiHte74UwTZfAPrVq04+ylZFCRv9CugnAn9WWD4g jy1HbaDP6/ScX0w177GkUEDGapF0k9kHidvI2rmQPLQw1S0UG8kNY7wiWkMhzKShl4iWHn 3NwuYQtXUa4bZXb1NKUuW4TniJhd3dKEnJpb0yGfIQ6M6sbwc7cZI/oeX/28fQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dFYjx0Jl5z98N for ; Mon, 24 Nov 2025 18:09:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id ad31 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 24 Nov 2025 18:09:09 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 72a447d0bc76 - main - vm_object_page_remove(): clear pager even if there is no resident pages List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 72a447d0bc768c7fe8a9c972f710c75afebd581b Auto-Submitted: auto-generated Date: Mon, 24 Nov 2025 18:09:09 +0000 Message-Id: <69249f45.ad31.63f811db@gitrepo.freebsd.org> The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=72a447d0bc768c7fe8a9c972f710c75afebd581b commit 72a447d0bc768c7fe8a9c972f710c75afebd581b Author: Konstantin Belousov AuthorDate: 2025-11-22 20:39:27 +0000 Commit: Konstantin Belousov CommitDate: 2025-11-24 18:08:31 +0000 vm_object_page_remove(): clear pager even if there is no resident pages Swap pager might still carry the data. Debugging help from: mmel Reviewed by: alc Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D53891 --- sys/vm/vm_object.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c index 5b4517d2bf0c..413ba5459e3d 100644 --- a/sys/vm/vm_object.c +++ b/sys/vm/vm_object.c @@ -1988,7 +1988,7 @@ vm_object_page_remove(vm_object_t object, vm_pindex_t start, vm_pindex_t end, (options & (OBJPR_CLEANONLY | OBJPR_NOTMAPPED)) == OBJPR_NOTMAPPED, ("vm_object_page_remove: illegal options for object %p", object)); if (object->resident_page_count == 0) - return; + goto remove_pager; vm_object_pip_add(object, 1); vm_page_iter_limit_init(&pages, object, end); again: @@ -2061,6 +2061,7 @@ wired: } vm_object_pip_wakeup(object); +remove_pager: vm_pager_freespace(object, start, (end == 0 ? object->size : end) - start); } From nobody Mon Nov 24 18:43:34 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dFZTg0fRpz6Hfbc for ; Mon, 24 Nov 2025 18:43:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dFZTf55xTz3Hwq for ; Mon, 24 Nov 2025 18:43:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764009814; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UfvHyypAEhUp8LKftzfg5cm8xf59lh7Phz8fuOHEZWs=; b=A+yIgcFmLkzVGGQGxsQV/6FpJ7YCDzW/oqe/Hi7D36MYL+FH61rSweL9dThdg4klIOgZF4 0rjU6/24kVLevmkpiUu3Flv1ZhFq9WQ24CyuCQlLf735oT31MUECxJ/rnEawgiMKEoNnyw ByLt8YQTHokiv0MOlkXXTjHxWz9CSI92R3KskYrdqkUAcTioTl7SPxWs8K7v8m2A7k/1dl /8w8kFcOvcT7APFTOafLEwCaCWyx8vbOOxZ33iekJ7tg5glYwOtknbpCB97+b5nyO/cAA3 QwweI2iBvq4FCDoPQkU1Pu7uBmP0mC8+hvKwZejn74RSs6cHBekT/+9kZMWldg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764009814; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UfvHyypAEhUp8LKftzfg5cm8xf59lh7Phz8fuOHEZWs=; b=ZtUMxnneYO6wPOEuWi2GzZRrjAT+sUJ1enzIcMw6WOSdPxVPVutheta/Pw7GqGj13gBvAh biGmVOmoTo7Swu600ipezUGrBNMZC5AQzv9zPRVBaNvGj8B+so4OqULR1vpS3rqaD+dUnB ute+bN8A+L+hr/2Cy+Vu9jHlSEapPeYi8K7BsydLnbaNQoKvIoBQ52lWmDdf+vZh4PusFV GQCgUJiYPu6sRIo2dc2e7/wargwCjZaAlGqDoSQaYltFUKsrueySmdRBuxAeWze9P6ACs0 2E8J9GNWaYDPnTWVO8U9lyQPPcBY0blbhW4R77BDfYqxCc6spig9prWP9+h4tg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764009814; a=rsa-sha256; cv=none; b=OMsNTAzmblY2BHCGt6tLCiXnGK0YWnky76qaFJKC2PLT0NU3yaLyezxJjfwJTQcDSRfbVn oFwyqzGm26eEIwWWh+QpLoOuwnhsABgyqZCcjL5Zgfzy1OmlhXmkunh3HOy7aOJ+Uh10Vf GZY2dVOMbvawEl4gMZREp+hliUddfTF/VgG88cXKZAe/W/Yo6HT5HJtFl659WClVswZ3Fi +ULsMjjF7UGKToJlh8B1i5iOhqvMoZa80LVfeeyz5VL530b12N5hHTZOglstfje8L5ZJDy WJYsQQdmUAmBQJNNNj8sGlHQ+yqIQIzYpRaViuNVbsf1TeepYkSEbOKLKWTrJA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dFZTf4j4cz9vZ for ; Mon, 24 Nov 2025 18:43:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id ee23 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 24 Nov 2025 18:43:34 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: d78231ed04d3 - main - cxgbe: Fix the RSS build List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d78231ed04d333f64a73c891a45a94981baad251 Auto-Submitted: auto-generated Date: Mon, 24 Nov 2025 18:43:34 +0000 Message-Id: <6924a756.ee23.5ef6ff13@gitrepo.freebsd.org> The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=d78231ed04d333f64a73c891a45a94981baad251 commit d78231ed04d333f64a73c891a45a94981baad251 Author: Mark Johnston AuthorDate: 2025-11-24 18:39:54 +0000 Commit: Mark Johnston CommitDate: 2025-11-24 18:39:54 +0000 cxgbe: Fix the RSS build When "options RSS" is configured, opt_rss.h defines the "RSS" token. PR: 291068 Fixes: 17b4a0acfaf5 ("cxgbe(4): T7 related updates to shared code") --- sys/dev/cxgbe/common/t4_msg.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/cxgbe/common/t4_msg.h b/sys/dev/cxgbe/common/t4_msg.h index 214080964fbb..31a52dbb616e 100644 --- a/sys/dev/cxgbe/common/t4_msg.h +++ b/sys/dev/cxgbe/common/t4_msg.h @@ -2478,7 +2478,7 @@ struct cpl_rx_data_ack_core { #define F_RX_DACK_CHANGE V_RX_DACK_CHANGE(1U) struct cpl_rx_phys_addr { - __be32 RSS[2]; + __be32 rss[2]; __be32 op_to_tid; __be32 pci_rlx_order_to_len; __be64 phys_addr; From nobody Mon Nov 24 18:46:17 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dFZXn70BRz6HflL for ; Mon, 24 Nov 2025 18:46:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dFZXn6MLgz3Jxy for ; Mon, 24 Nov 2025 18:46:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764009977; 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=xE/jAZexPtDiq3VFjGhWKhRQIup2s+e3jRUw/MThkXM=; b=G6K1ldH5CRraaYTi8L/xYKZuQgsfik2Ne/UEQVCKaCbseAQmzezzn6WXbMP86obd6Nv+vK 2Ou3ltTI1KEDOUGMC7/yF2GQANdpwNMY0Ogl73XSbmP1rHGp6j3kSc9uSktBwAT9NkMFMw WEp5JrKoNrpddaG122dAzOZJaOog2B5xTkYpamHrCjUjhzJOvbD7V3HUkPS2F8PwfqRMNa xQfgzkHm5YE5BjfRU8PyyimxJWA1LLY54Q3KBgWK6fLH5VjxAVUDbO8JUcxBS0Z6XjPxVD i82bUph9B0Lms7xKBvBhBQ9/w19RNvKw7Qf/Yvpsj6loynCodlkfx6eE5i7xRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764009977; 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=xE/jAZexPtDiq3VFjGhWKhRQIup2s+e3jRUw/MThkXM=; b=oj4aIWlgYeKmXXWC2X6vvwklGcTu2irIm7TVdUCk/bFJY8WZwattbSO1yYxBTH3Pz2VYyO RTIy11cPTPMOJFDLS3Hg9mhXRg94yrTcR6Slsc1rE1vcK1IGS07DtSh66M9IbsfEc9rKyY cnHTcN9Vyx/QszkXTA+UhQqPEVDF3XoPQfODLmFhNKuBsm3fNpM/HxBvxR+luE7g1A+jAa jGunReeD+JzwUKiAWCyg9SqyXe3QymBX5SmL6sTi5XGG/dAPAP6SjVbCa46lYJfTZe5dpe GohzW0T85AH1dPGS6I7a3gVLfaTOdCNiJ8IiYBZEvdhvlGmwsV2iFyG9v5r8MQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764009977; a=rsa-sha256; cv=none; b=k27btew6dWHREcf255d032Lmrzu8puplK9pg6KL61wdRLsOyqdQA0HY67CDKqNP/dLJKt0 bBXw3YIroX3RIGzJ+WXt9R6fu9KZzMcDlyMwsbTedYGhYwiUbI1niDa6jMaLCdK9CUBtfh 7P8ZkJDtkGEYbgKX1as/YCIddvfhpJ5stJ9WyBnvzDl7voLXN3yJpghqmpjddfzDeNzAps wUhGRteoa/pL7zMviQyDDsn4hw2eGFP37PFZ8Vwc42kBQXAEXTzjdrhLri2rBio88485uo D5j14dcgu4JC8PtukrYF1OdtlrPfUrq7HsfJBJ9vqtEKfufIS800aXQjUWX6IA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dFZXn5BhSzBQ7 for ; Mon, 24 Nov 2025 18:46:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id d956 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 24 Nov 2025 18:46:17 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Bartosz Sobczak From: Krzysztof Galazka Subject: git: 7b6644e160ed - main - irdma(4): fix potential memory leak on qhash cqp operation List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 7b6644e160ed63b633e7c68a3cacf2c71d216cd5 Auto-Submitted: auto-generated Date: Mon, 24 Nov 2025 18:46:17 +0000 Message-Id: <6924a7f9.d956.8cfc1fb@gitrepo.freebsd.org> The branch main has been updated by kgalazka: URL: https://cgit.FreeBSD.org/src/commit/?id=7b6644e160ed63b633e7c68a3cacf2c71d216cd5 commit 7b6644e160ed63b633e7c68a3cacf2c71d216cd5 Author: Bartosz Sobczak AuthorDate: 2025-11-24 18:41:41 +0000 Commit: Krzysztof Galazka CommitDate: 2025-11-24 18:45:58 +0000 irdma(4): fix potential memory leak on qhash cqp operation It was found that in some circumstances when launching non-waiting create qhash cqp operation the refcount on the cqp_request may be not properly decremented leading to a memory leak. Signed-off-by: Bartosz Sobczak Reviewed by: anzhu_netapp.com Tested by: mateusz.moga_intel.com Approved by: kbowling (mentor) MFC after: 1 week Sponsored by: Intel Corporation Differential Revision: https://reviews.freebsd.org/D53732 --- sys/dev/irdma/icrdma.c | 4 +- sys/dev/irdma/irdma_cm.c | 38 +------------ sys/dev/irdma/irdma_hw.c | 132 ++++++++++++++++++++++++++++++++++++--------- sys/dev/irdma/irdma_main.h | 3 +- 4 files changed, 114 insertions(+), 63 deletions(-) diff --git a/sys/dev/irdma/icrdma.c b/sys/dev/irdma/icrdma.c index 576a185b013f..a4f3904a820c 100644 --- a/sys/dev/irdma/icrdma.c +++ b/sys/dev/irdma/icrdma.c @@ -1,7 +1,7 @@ /*- * SPDX-License-Identifier: GPL-2.0 or Linux-OpenIB * - * Copyright (c) 2021 - 2023 Intel Corporation + * Copyright (c) 2021 - 2025 Intel Corporation * * This software is available to you under a choice of one of two * licenses. You may choose to be licensed under the terms of the GNU @@ -52,7 +52,7 @@ /** * Driver version */ -char irdma_driver_version[] = "1.2.36-k"; +char irdma_driver_version[] = "1.2.37-k"; /** * irdma_init_tunable - prepare tunables diff --git a/sys/dev/irdma/irdma_cm.c b/sys/dev/irdma/irdma_cm.c index d4d4f328fb43..f3ca761b32f6 100644 --- a/sys/dev/irdma/irdma_cm.c +++ b/sys/dev/irdma/irdma_cm.c @@ -1,7 +1,7 @@ /*- * SPDX-License-Identifier: GPL-2.0 or Linux-OpenIB * - * Copyright (c) 2015 - 2023 Intel Corporation + * Copyright (c) 2015 - 2025 Intel Corporation * * This software is available to you under a choice of one of two * licenses. You may choose to be licensed under the terms of the GNU @@ -1683,31 +1683,6 @@ irdma_get_vlan_ipv4(struct iw_cm_id *cm_id, u32 *addr) return vlan_id; } -static int -irdma_manage_qhash_wait(struct irdma_pci_f *rf, struct irdma_cm_info *cm_info) -{ - struct irdma_cqp_request *cqp_request = cm_info->cqp_request; - int cnt = rf->sc_dev.hw_attrs.max_cqp_compl_wait_time_ms * CQP_TIMEOUT_THRESHOLD; - u32 ret_val; - - if (!cqp_request) - return -ENOMEM; - do { - irdma_cqp_ce_handler(rf, &rf->ccq.sc_cq); - mdelay(1); - } while (!READ_ONCE(cqp_request->request_done) && --cnt); - - ret_val = cqp_request->compl_info.op_ret_val; - irdma_put_cqp_request(&rf->cqp, cqp_request); - if (cnt) { - if (!ret_val) - return 0; - return -EINVAL; - } - - return -ETIMEDOUT; -} - /** * irdma_add_mqh_ifa_cb - Adds multiple qhashes for IPv4/IPv6 * @arg: Calback argument structure from irdma_add_mqh @@ -1771,16 +1746,7 @@ irdma_add_mqh_ifa_cb(void *arg, struct ifaddr *ifa, u_int count) irdma_iw_get_vlan_prio(child_listen_node->loc_addr, cm_info->user_pri, cm_info->ipv4); - ret = irdma_manage_qhash(iwdev, cm_info, - IRDMA_QHASH_TYPE_TCP_SYN, - IRDMA_QHASH_MANAGE_TYPE_ADD, - NULL, false); - if (ret) { - kfree(child_listen_node); - return ret; - } - /* wait for qhash finish */ - ret = irdma_manage_qhash_wait(iwdev->rf, cm_info); + ret = irdma_add_qhash_wait_no_lock(iwdev, cm_info); if (ret) { kfree(child_listen_node); return ret; diff --git a/sys/dev/irdma/irdma_hw.c b/sys/dev/irdma/irdma_hw.c index 05004b1ccc83..64c05b8663e0 100644 --- a/sys/dev/irdma/irdma_hw.c +++ b/sys/dev/irdma/irdma_hw.c @@ -1,7 +1,7 @@ /*- * SPDX-License-Identifier: GPL-2.0 or Linux-OpenIB * - * Copyright (c) 2015 - 2023 Intel Corporation + * Copyright (c) 2015 - 2025 Intel Corporation * * This software is available to you under a choice of one of two * licenses. You may choose to be licensed under the terms of the GNU @@ -2581,35 +2581,22 @@ irdma_send_syn_cqp_callback(struct irdma_cqp_request *cqp_request) } /** - * irdma_manage_qhash - add or modify qhash + * irdma_qhash_info_prepare - fill info for qhash op * @iwdev: irdma device + * @cqp_info: cqp info * @cminfo: cm info for qhash * @etype: type (syn or quad) * @mtype: type of qhash - * @cmnode: cmnode associated with connection - * @wait: wait for completion */ -int -irdma_manage_qhash(struct irdma_device *iwdev, struct irdma_cm_info *cminfo, - enum irdma_quad_entry_type etype, - enum irdma_quad_hash_manage_type mtype, void *cmnode, - bool wait) +static void +irdma_qhash_info_prepare(struct irdma_device *iwdev, + struct cqp_cmds_info *cqp_info, + struct irdma_cm_info *cminfo, + enum irdma_quad_entry_type etype, + enum irdma_quad_hash_manage_type mtype) { struct irdma_qhash_table_info *info; - struct irdma_cqp *iwcqp = &iwdev->rf->cqp; - struct irdma_cqp_request *cqp_request; - struct cqp_cmds_info *cqp_info; - struct irdma_cm_node *cm_node = cmnode; - int status; - - cqp_request = irdma_alloc_and_get_cqp_request(iwcqp, wait); - if (!cqp_request) - return -ENOMEM; - cminfo->cqp_request = cqp_request; - if (!wait) - atomic_inc(&cqp_request->refcnt); - cqp_info = &cqp_request->info; info = &cqp_info->in.u.manage_qhash_table_entry.info; memset(info, 0, sizeof(*info)); info->vsi = &iwdev->vsi; @@ -2641,6 +2628,105 @@ irdma_manage_qhash(struct irdma_device *iwdev, struct irdma_cm_info *cminfo, info->src_ip[2] = cminfo->rem_addr[2]; info->src_ip[3] = cminfo->rem_addr[3]; } + cqp_info->cqp_cmd = IRDMA_OP_MANAGE_QHASH_TABLE_ENTRY; + cqp_info->post_sq = 1; +} + +/** + * irdma_add_qhash_wait_no_lock - add qhash, blocking w/o lock + * @iwdev: irdma device + * @cminfo: cm info for qhash + */ +int +irdma_add_qhash_wait_no_lock(struct irdma_device *iwdev, + struct irdma_cm_info *cminfo) +{ + struct irdma_qhash_table_info *info; + struct irdma_cqp *iwcqp = &iwdev->rf->cqp; + struct irdma_cqp_request *cqp_request; + struct cqp_cmds_info *cqp_info; + int cnt = iwdev->rf->sc_dev.hw_attrs.max_cqp_compl_wait_time_ms * CQP_TIMEOUT_THRESHOLD; + int status; + int ret_val; + + cqp_request = irdma_alloc_and_get_cqp_request(iwcqp, false); + if (!cqp_request) + return -ENOMEM; + + cqp_info = &cqp_request->info; + info = &cqp_info->in.u.manage_qhash_table_entry.info; + irdma_qhash_info_prepare(iwdev, cqp_info, cminfo, IRDMA_QHASH_TYPE_TCP_SYN, + IRDMA_QHASH_MANAGE_TYPE_ADD); + if (info->ipv4_valid) + irdma_debug(&iwdev->rf->sc_dev, IRDMA_DEBUG_CM, + "ADD caller: %pS loc_port=0x%04x rem_port=0x%04x loc_addr=%x rem_addr=%x mac=%x:%x:%x:%x:%x:%x, vlan_id=%d\n", + __builtin_return_address(0), info->src_port, + info->dest_port, info->src_ip[0], info->dest_ip[0], + info->mac_addr[0], info->mac_addr[1], + info->mac_addr[2], info->mac_addr[3], + info->mac_addr[4], info->mac_addr[5], + cminfo->vlan_id); + else + irdma_debug(&iwdev->rf->sc_dev, IRDMA_DEBUG_CM, + "ADD caller: %pS loc_port=0x%04x rem_port=0x%04x loc_addr=%x:%x:%x:%x rem_addr=%x:%x:%x:%x mac=%x:%x:%x:%x:%x:%x, vlan_id=%d\n", + __builtin_return_address(0), info->src_port, + info->dest_port, IRDMA_PRINT_IP6(info->src_ip), + IRDMA_PRINT_IP6(info->dest_ip), info->mac_addr[0], + info->mac_addr[1], info->mac_addr[2], + info->mac_addr[3], info->mac_addr[4], + info->mac_addr[5], cminfo->vlan_id); + + cqp_info->in.u.manage_qhash_table_entry.cqp = &iwdev->rf->cqp.sc_cqp; + cqp_info->in.u.manage_qhash_table_entry.scratch = (uintptr_t)cqp_request; + status = irdma_handle_cqp_op(iwdev->rf, cqp_request); + if (status) { + irdma_put_cqp_request(iwcqp, cqp_request); + irdma_dev_warn(&iwdev->ibdev, "manage_qhash cqp op failure %d\n", status); + return status; + } + + do { + irdma_cqp_ce_handler(iwdev->rf, &iwdev->rf->ccq.sc_cq); + mdelay(1); + } while (!READ_ONCE(cqp_request->request_done) && --cnt); + + ret_val = cqp_request->compl_info.op_ret_val; + status = (cnt) ? ret_val : -ETIMEDOUT; + + irdma_put_cqp_request(iwcqp, cqp_request); + + return status; +} + +/** + * irdma_manage_qhash - add or modify qhash + * @iwdev: irdma device + * @cminfo: cm info for qhash + * @etype: type (syn or quad) + * @mtype: type of qhash + * @cmnode: cmnode associated with connection + * @wait: wait for completion + */ +int +irdma_manage_qhash(struct irdma_device *iwdev, struct irdma_cm_info *cminfo, + enum irdma_quad_entry_type etype, + enum irdma_quad_hash_manage_type mtype, void *cmnode, + bool wait) +{ + struct irdma_qhash_table_info *info; + struct irdma_cqp *iwcqp = &iwdev->rf->cqp; + struct irdma_cqp_request *cqp_request; + struct cqp_cmds_info *cqp_info; + struct irdma_cm_node *cm_node = cmnode; + int status; + + cqp_request = irdma_alloc_and_get_cqp_request(iwcqp, wait); + if (!cqp_request) + return -ENOMEM; + + cqp_info = &cqp_request->info; + info = &cqp_info->in.u.manage_qhash_table_entry.info; + irdma_qhash_info_prepare(iwdev, cqp_info, cminfo, etype, mtype); if (cmnode) { cqp_request->callback_fcn = irdma_send_syn_cqp_callback; cqp_request->param = cmnode; @@ -2671,8 +2757,6 @@ irdma_manage_qhash(struct irdma_device *iwdev, struct irdma_cm_info *cminfo, cqp_info->in.u.manage_qhash_table_entry.cqp = &iwdev->rf->cqp.sc_cqp; cqp_info->in.u.manage_qhash_table_entry.scratch = (uintptr_t)cqp_request; - cqp_info->cqp_cmd = IRDMA_OP_MANAGE_QHASH_TABLE_ENTRY; - cqp_info->post_sq = 1; status = irdma_handle_cqp_op(iwdev->rf, cqp_request); if (status && cm_node && !wait) irdma_rem_ref_cm_node(cm_node); diff --git a/sys/dev/irdma/irdma_main.h b/sys/dev/irdma/irdma_main.h index 5b292ceafea8..9181f3b70463 100644 --- a/sys/dev/irdma/irdma_main.h +++ b/sys/dev/irdma/irdma_main.h @@ -1,7 +1,7 @@ /*- * SPDX-License-Identifier: GPL-2.0 or Linux-OpenIB * - * Copyright (c) 2015 - 2023 Intel Corporation + * Copyright (c) 2015 - 2025 Intel Corporation * * This software is available to you under a choice of one of two * licenses. You may choose to be licensed under the terms of the GNU @@ -563,6 +563,7 @@ int irdma_manage_qhash(struct irdma_device *iwdev, struct irdma_cm_info *cminfo, enum irdma_quad_entry_type etype, enum irdma_quad_hash_manage_type mtype, void *cmnode, bool wait); +int irdma_add_qhash_wait_no_lock(struct irdma_device *iwdev, struct irdma_cm_info *cminfo); void irdma_receive_ilq(struct irdma_sc_vsi *vsi, struct irdma_puda_buf *rbuf); void irdma_free_sqbuf(struct irdma_sc_vsi *vsi, void *bufp); void irdma_free_qp_rsrc(struct irdma_qp *iwqp); From nobody Mon Nov 24 20:28:47 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dFcq356Hgz6HnNs for ; Mon, 24 Nov 2025 20:28:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dFcq34Pybz3W28 for ; Mon, 24 Nov 2025 20:28:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764016127; 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=UB2emz1KRTiWAoH8WtwCa+5Hp7N9oVyRAv4TnV9YFsQ=; b=mpwPjuhYeYFLE/QrYjn6pAIEBY+7VZGaMkG+9g1XL+dmQYg3jdjGQlNrtukFrZJ8VWoFjZ Qzk9U9OOzsh2kkHGvx2yT5H/e9MJ/sjHuXgfNwwXpPq/uS5Tv5hGLjdBJrHOwxs6RyIV0j BRP8Pn+m0F1+Roj0ED2w69dZ7OGfKhfGphhsxPERDdwtjTPIPydDzl9j2iF9Gx24XjzdzR jpCCmV8Kooy2NQx7GciGB0LGy3itKrlr/6K2C/ZrQiVDsLbzEsYivjPRzijEvS4LMOxtit slf2Gk3qnYAh+sujlhqdF0QIH25OzpKsjpDW3uv8fLPUo6q2BYP7iCqUqrNePQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764016127; 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=UB2emz1KRTiWAoH8WtwCa+5Hp7N9oVyRAv4TnV9YFsQ=; b=j7t+xa3d5uIVZWIcF6v//1hwwOYJ2p1DZfid0zUrlkuTBrXGZwC16V461LpMdThLLqWagh PC4OPvd0U0YWQoNJ4e1Gs7RGtvwna6pvgYa8dhiRwPB8PYHZW/6BANyJ94/DHVtp8ysF4I OkWUPD+n3KwX3dY9LlqkMS8zCeaD0mKIUlhsZSos5msrwvPIm49iXYbKOqLdBEd1MFSk/i gBaL5vexis5BMvq4Wm7H4rQ/M98zjXmZTVShBZDzoQPCehvCSLk3Y1a1iiZatQrfQe5Hx0 bhwzOIPJQkpe3hagmhJ6E1HJwt8IZRDMgYXCrjSnXkzwysqFvL19g0DuOROkzg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764016127; a=rsa-sha256; cv=none; b=DvBvTKNojti7eg4DuwTSZYBl9v/vZ+JY12/mB5/AKsIvK5u2pfQV3I43zOLTkSXzlxNSDH cv+6AV21LyQpe24nrDlwFSSHR+bYJ3Sjjnq8BkvguQ8A+9P5TSoIOIUvsNjrz6ScxUZ/ld zI6kb6E9NCTeNUJtuE1gSp2tkNPTHPS4AH0rAmIstjruNoFe9Ck0udaW1uGo/ylo5jckO+ BrvPXHXY6/oOEj+/2yLcZYH6fYftOjOSx2SWP1WJM4gXp1jL1L98XbRnRRluDByeP1kaBp PEabB3GIyx4jifEcfqteZvecoQEmeJ0CGrobfDrTqpnX1K6ua1erWiKjdaLfMA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dFcq33ztQzTq6 for ; Mon, 24 Nov 2025 20:28:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 29a8b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 24 Nov 2025 20:28:47 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Boris Lytochkin From: Andrey V. Elsukov Subject: git: ff3c48a64fe2 - stable/15 - ipfw: fix lookup dst-ip opcode List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ae X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: ff3c48a64fe2f9c1acf531e088dfb14e31404bae Auto-Submitted: auto-generated Date: Mon, 24 Nov 2025 20:28:47 +0000 Message-Id: <6924bfff.29a8b.6dc58e0d@gitrepo.freebsd.org> The branch stable/15 has been updated by ae: URL: https://cgit.FreeBSD.org/src/commit/?id=ff3c48a64fe2f9c1acf531e088dfb14e31404bae commit ff3c48a64fe2f9c1acf531e088dfb14e31404bae Author: Boris Lytochkin AuthorDate: 2025-11-18 10:31:56 +0000 Commit: Andrey V. Elsukov CommitDate: 2025-11-24 20:28:09 +0000 ipfw: fix lookup dst-ip opcode Opcode handling should not fall through to the LOOKUP_DSCP type. Reviewed by: melifaro Obtained from: Yandex LLC Differential Revision: https://reviews.freebsd.org/D53775 (cherry picked from commit 8012c61bef3bb19a48d8459b38b65e27d46c186c) --- sys/netpfil/ipfw/ip_fw2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/netpfil/ipfw/ip_fw2.c b/sys/netpfil/ipfw/ip_fw2.c index b59d8d08bf80..2b7f38d2e9a6 100644 --- a/sys/netpfil/ipfw/ip_fw2.c +++ b/sys/netpfil/ipfw/ip_fw2.c @@ -2120,8 +2120,8 @@ do { \ pkey = &args->f_id.dst_ip6; else pkey = &args->f_id.src_ip6; - } else /* only for L3 */ - break; + } + break; case LOOKUP_DSCP: if (is_ipv4) key = ip->ip_tos >> 2; From nobody Mon Nov 24 20:31:40 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dFctN21pKz6HnPv for ; Mon, 24 Nov 2025 20:31:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dFctN13QFz3Wxs for ; Mon, 24 Nov 2025 20:31:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764016300; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/luGaQ0po2GnLoaihNbgcC+fS3pPgVJQ16doDBae0aw=; b=wNc0tkN3vzWiU5EH11WwL9IxuZNlpcexZjYRsGllciDwOI11hUuIDC7jAlCMfYPSo9LvEB 67bh1NcBKOCvMuEymTD122HNdd+zhCWSj6amjtr9RF8Grj558ELCiYZEahz5eF0hs6jBZU B+kcasQiJelLBb6JrV0tfobaWtsO4ShKrlMcp5/8F7MneuL9zKsFp7Fua8zl1G9/Gq7W8C X+pe3Os4vQBatbEb7MeKozdYks8JXXw7GsXCZ3sgsB0NOwbk4pSJqsJKi12rnxIHzo1+KT Ne6EO1idocOrPGH9eWTdQPV3haM8LAldtCI5KIFbt6pGudkJ+g5bMLaR0wsmww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764016300; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/luGaQ0po2GnLoaihNbgcC+fS3pPgVJQ16doDBae0aw=; b=P3NeRMKYKi+H/227B0DG2boAVJR2aUH5RyLXtRtDeHK0tK2W6d/A92960dVR0pmz6ttox5 6QLeP0A3RcbHR3N9U42XM0n5WpRD/Zds13IrPZpOepuwWMgZxIXukkzAThHsuBvtSnaf6U J/+zaweaYwWqKkBbcBoALmDiOM6qWv6RTrD5FK2wsRZRoQ8eytW51HYMXTS0963GVRkx10 onByZenOHwEXOeiwH388GOP5gYoHQ23BXr0+SDT08qndNOhAIzQIf/OYkp4tzcw1g2YxEf WVZrFeHcXPR5kuAMvAHwFS0fiwy5B9wQYGOIRlbVoVITt6r2pO9SFsJ6uU+2FA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764016300; a=rsa-sha256; cv=none; b=gvPpHYsLd1eysr0PU5brnvT3IqB3+AnVgZrcxkoLYlATaJXuqP8wgqwcR0jwUUdRRxl1pb 7EurMYBpv4BFEmzHxw3GtKomejW6I84o/OunbaJzSR+lJ/VB1xXC6DxJvTRWUjPT6KOHej iXUtZ5YGxzlS/MVsMhobXF2iEIJgKwMUIjN/4aw8NszwjzIkZnKxNKGLwnuCOtaNOt0fpK PVDw56lqVkMNzKWYJA2koetC0b8+1eeN1IM0fnorNIbEe29INMkTfkJfhCCMMSNML9FoqR 1igcwglFWK/jdlJ5yDGVBByoxC4Wy53CTmwplDCrE9iz3L5Y3Peh2+z2mlBKdQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dFctN0c6pzTwG for ; Mon, 24 Nov 2025 20:31:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 28e66 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 24 Nov 2025 20:31:40 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: b92b1b475830 - main - mdo(1): Avoid calling getgroups() in some unnecessary cases List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b92b1b47583036bd02e656564ff22c92b8949077 Auto-Submitted: auto-generated Date: Mon, 24 Nov 2025 20:31:40 +0000 Message-Id: <6924c0ac.28e66.58c10bc5@gitrepo.freebsd.org> The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=b92b1b47583036bd02e656564ff22c92b8949077 commit b92b1b47583036bd02e656564ff22c92b8949077 Author: Olivier Certner AuthorDate: 2025-11-14 11:59:09 +0000 Commit: Olivier Certner CommitDate: 2025-11-24 20:31:00 +0000 mdo(1): Avoid calling getgroups() in some unnecessary cases If the basis for supplementary groups are the current ones, we do not need to fetch them when they are to be replaced entirely (which we already have been doing), as in the '!start_from_current_groups' case, but specifically also when they are not going to be touched at all. This change in passing makes the modified code block's comment saying that SETCREDF_SUPP_GROUPS need not be set here correct. MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D53771 --- usr.bin/mdo/mdo.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/usr.bin/mdo/mdo.c b/usr.bin/mdo/mdo.c index 3eb5d4e5c23f..879423bc0128 100644 --- a/usr.bin/mdo/mdo.c +++ b/usr.bin/mdo/mdo.c @@ -753,8 +753,14 @@ main(int argc, char **argv) */ setcred_flags |= SETCREDF_SUPP_GROUPS; } - } else if (supp_groups_str == NULL && (supp_mod_str == NULL || - supp_mod_str[0] != '@')) { + } else if (supp_groups_str == NULL && supp_mod_str != NULL && + supp_mod_str[0] != '@') { + /* + * We do not need to determine the current groups if, as for the + * '!start_from_current_groups' case, we are going to replace + * them entirely, but here also if we do not amend them at all + * (because they are by definition already in place). + */ const int ngroups = getgroups(0, NULL); if (ngroups > 0) { From nobody Mon Nov 24 20:31:41 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dFctP41ldz6HnMb for ; Mon, 24 Nov 2025 20:31:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dFctP1wtqz3Wl0 for ; Mon, 24 Nov 2025 20:31:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764016301; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gsgqtQPrAIjeUuTWjXelp2h51xR0gz6EssRflVioK7g=; b=DndPyXNA/YkCSEBzLSoXntqWQ8pB1N+cExsZhllWAep3U0DuN74S8IX3JaQZxtiw/LAOPl prrjougc9F1He5aI9Fky86nUQndZryaWkfTP6ARm0yUmmapr6/dGodk4w018V4f0o3zE/G Tw65ufclJI2jGd7pO9vm0iFG7GXOV75BZ44n+G4MuXdbG8gYO9+LcSisYfa5pt9ZIw6jo3 8lT0Ec0fqXhkXYdZfpt340ZSvmixE4Gc9RmmIi+mAGYKTlYqvLXdfOiqixlJslDPutxFDH oGC0+yO3/7O6KyLIbdUeOtalM4zx4ALbf3unAfDOH70McHBotGT7MHpn0+rEiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764016301; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gsgqtQPrAIjeUuTWjXelp2h51xR0gz6EssRflVioK7g=; b=CsPbAptIC1lj3n6F81oRad3Z4jsmRfZSgAVpDecVAuXlooRwXGZCzPwQMd0hrXPYkKrEhp qXT+dwx2X1r/VwqsXHDvD1uWkJ99l0Jo35PC7CJI4IJNJLtnSfg/rxrdvFGDtOC5rpfcVZ 6guyu5V40w+eLiXdaYylQw04PbIAO3cylXv9eifteau9IJI8RyjfTSvMwSp2TNyBVd5pPY WqatWkN2TouR/UXCw9kqIrY55XJMw43OnlIS0tml4A1ApE32POJvNj+85tNjwHk0iHucXW kM+QnRjcQgeFoGNArWDr5Q72rZUCQ/BMqycKhF9UQj2bzcdLlrHbLMeDiuubHg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764016301; a=rsa-sha256; cv=none; b=gbqRotCnb5sFq0toNnNUAqCRY5uLX2+OesGe/u6ENPsipzdkNAzf+7k4DLENr1BzPcWkJ7 3SAR+5cMn7oYLBR977P97l06Kdc8N5E3sxDfL5Da82g12fkQbBOcpgT4FH7XkFJr/XSXXX PqzYr6irBC94CDPObho9ajRU6r1KiJtpXTdRzxrSd8s/kgRx8fhaFdemjU+q+qsbQCuVzO 2rkBGFV6xVFeBmCcBnMl29E8MWhzEDV6dclKny6uD98+52Bt9kObZrIZNczVjtyKO06d+z ZcIplSKHPWoa+NfEMxwYVkwo2tAuLY9+mQOQLXSs3m/jrV8CRBj0eaZmjeNVeg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dFctP1TGnzTmc for ; Mon, 24 Nov 2025 20:31:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 29d3c by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 24 Nov 2025 20:31:41 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: 4cd93df95e69 - main - setcred(): Remove an optimization for when cr_groups[0] was the egid List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4cd93df95e697942adf0ff038fc8f357cbb07cf9 Auto-Submitted: auto-generated Date: Mon, 24 Nov 2025 20:31:41 +0000 Message-Id: <6924c0ad.29d3c.675b4b84@gitrepo.freebsd.org> The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=4cd93df95e697942adf0ff038fc8f357cbb07cf9 commit 4cd93df95e697942adf0ff038fc8f357cbb07cf9 Author: Olivier Certner AuthorDate: 2025-11-14 18:22:53 +0000 Commit: Olivier Certner CommitDate: 2025-11-24 20:31:06 +0000 setcred(): Remove an optimization for when cr_groups[0] was the egid Because setcred() has (always) treated the effective GID separately from the supplementary groups, when cr_groups[0] was storing the effective GID, it internally needed to build an array containing both the effective GID and the specified supplementary groups to eventually call crsetgroups_internal(). As kern_setcred() was only used to actually implement user_setcred()/sys_setcred(), which need to allocate a buffer to copy in the userland groups array into, some optimization was put in place where these would allocate an array with one more element than 'wc_supp_groups', copyin() the latter into the subarray starting at index 1 and pass the pointer to the whole array to kern_setcred() in 'preallocated_groups'. This would allow kern_setcred() not to have to allocate memory again to make room for the additional effective GID. Since commit be1f7435ef21 ("kern: start tracking cr_gid outside of cr_groups[]"), crsetgroups_internal() only takes supplementary groups, so this machinery has become obsolete. It was not removed as part of that commit, but just minimally amended to simplify the changes and lower the risks. Finally remove it. Reviewed by: kevans MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D53772 --- sys/kern/kern_prot.c | 112 ++++++++++++++++++++------------------------------ sys/sys/syscallsubr.h | 2 +- 2 files changed, 46 insertions(+), 68 deletions(-) diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index 8021beed90e8..34d68927be71 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -526,44 +526,44 @@ gidp_cmp(const void *p1, const void *p2) } /* - * Final storage for supplementary groups will be returned via 'groups'. - * '*groups' must be NULL on input, and if not equal to 'smallgroups' - * on output, must be freed (M_TEMP) *even if* an error is returned. + * 'smallgroups' must be an (uninitialized) array of length CRED_SMALLGROUPS_NB. + * Always sets 'sc_supp_groups', either to a valid kernel-space groups array + * (which may or may not be 'smallgroups'), or NULL if SETCREDF_SUPP_GROUPS was + * not specified, or a buffer containing garbage on copyin() failure. In the + * last two cases, 'sc_supp_groups_nb' is additionally set to 0 as a security + * measure. 'sc_supp_groups' must be freed (M_TEMP) if not equal to + * 'smallgroups' even on failure. */ static int kern_setcred_copyin_supp_groups(struct setcred *const wcred, - const u_int flags, gid_t *const smallgroups, gid_t **const groups) + const u_int flags, gid_t *const smallgroups) { - MPASS(*groups == NULL); + gid_t *groups; + int error; - if (flags & SETCREDF_SUPP_GROUPS) { - int error; + if ((flags & SETCREDF_SUPP_GROUPS) == 0) { + wcred->sc_supp_groups_nb = 0; + wcred->sc_supp_groups = NULL; + return (0); + } - /* - * Check for the limit for number of groups right now in order - * to limit the amount of bytes to copy. - */ - if (wcred->sc_supp_groups_nb > ngroups_max) - return (EINVAL); + /* + * Check the number of groups' limit right now in order to limit the + * amount of bytes to copy. + */ + if (wcred->sc_supp_groups_nb > ngroups_max) + return (EINVAL); - /* - * Since we are going to be copying the supplementary groups - * from userland, make room also for the effective GID right - * now, to avoid having to allocate and copy again the - * supplementary groups. - */ - *groups = wcred->sc_supp_groups_nb <= CRED_SMALLGROUPS_NB ? - smallgroups : malloc(wcred->sc_supp_groups_nb * - sizeof(*groups), M_TEMP, M_WAITOK); + groups = wcred->sc_supp_groups_nb <= CRED_SMALLGROUPS_NB ? + smallgroups : malloc(wcred->sc_supp_groups_nb * sizeof(gid_t), + M_TEMP, M_WAITOK); - error = copyin(wcred->sc_supp_groups, *groups, - wcred->sc_supp_groups_nb * sizeof(*groups)); - if (error != 0) - return (error); - wcred->sc_supp_groups = *groups; - } else { + error = copyin(wcred->sc_supp_groups, groups, + wcred->sc_supp_groups_nb * sizeof(gid_t)); + wcred->sc_supp_groups = groups; + if (error != 0) { wcred->sc_supp_groups_nb = 0; - wcred->sc_supp_groups = NULL; + return (error); } return (0); @@ -578,7 +578,6 @@ user_setcred(struct thread *td, const u_int flags, struct setcred *const wcred) void *umac; #endif gid_t smallgroups[CRED_SMALLGROUPS_NB]; - gid_t *groups = NULL; int error; /* @@ -602,8 +601,7 @@ user_setcred(struct thread *td, const u_int flags, struct setcred *const wcred) * alternative for 32-bit compatibility as 'gid_t' has the same size * everywhere. */ - error = kern_setcred_copyin_supp_groups(wcred, flags, smallgroups, - &groups); + error = kern_setcred_copyin_supp_groups(wcred, flags, smallgroups); if (error != 0) goto free_groups; @@ -616,7 +614,7 @@ user_setcred(struct thread *td, const u_int flags, struct setcred *const wcred) } #endif - error = kern_setcred(td, flags, wcred, groups); + error = kern_setcred(td, flags, wcred); #ifdef MAC if (wcred->sc_label != NULL) @@ -624,8 +622,8 @@ user_setcred(struct thread *td, const u_int flags, struct setcred *const wcred) #endif free_groups: - if (groups != smallgroups) - free(groups, M_TEMP); + if (wcred->sc_supp_groups != smallgroups) + free(wcred->sc_supp_groups, M_TEMP); return (error); } @@ -654,24 +652,18 @@ sys_setcred(struct thread *td, struct setcred_args *uap) /* * CAUTION: This function normalizes groups in 'wcred'. - * - * If 'preallocated_groups' is non-NULL, it must be an already allocated array - * of size 'wcred->sc_supp_groups_nb' containing the supplementary groups, and - * 'wcred->sc_supp_groups' then must point to it. */ int kern_setcred(struct thread *const td, const u_int flags, - struct setcred *const wcred, gid_t *preallocated_groups) + struct setcred *const wcred) { struct proc *const p = td->td_proc; - struct ucred *new_cred, *old_cred, *to_free_cred; + struct ucred *new_cred, *old_cred, *to_free_cred = NULL; struct uidinfo *uip = NULL, *ruip = NULL; #ifdef MAC void *mac_set_proc_data = NULL; bool proc_label_set = false; #endif - gid_t *groups = NULL; - gid_t smallgroups[CRED_SMALLGROUPS_NB]; int error; bool cred_set = false; @@ -683,32 +675,18 @@ kern_setcred(struct thread *const td, const u_int flags, * Part 1: We allocate and perform preparatory operations with no locks. */ - if (flags & SETCREDF_SUPP_GROUPS) { - if (wcred->sc_supp_groups_nb > ngroups_max) + if ((flags & SETCREDF_SUPP_GROUPS) != 0 && + wcred->sc_supp_groups_nb > ngroups_max) return (EINVAL); - if (preallocated_groups != NULL) { - groups = preallocated_groups; - MPASS(preallocated_groups == wcred->sc_supp_groups); - } else { - if (wcred->sc_supp_groups_nb <= CRED_SMALLGROUPS_NB) - groups = smallgroups; - else - groups = malloc(wcred->sc_supp_groups_nb * - sizeof(*groups), M_TEMP, M_WAITOK); - memcpy(groups, wcred->sc_supp_groups, - wcred->sc_supp_groups_nb * sizeof(*groups)); - } - } if (flags & SETCREDF_MAC_LABEL) { #ifdef MAC error = mac_set_proc_prepare(td, wcred->sc_label, &mac_set_proc_data); if (error != 0) - goto free_groups; + return (error); #else - error = ENOTSUP; - goto free_groups; + return (ENOTSUP); #endif } @@ -734,8 +712,10 @@ kern_setcred(struct thread *const td, const u_int flags, * Output the raw supplementary groups array for better * traceability. */ - AUDIT_ARG_GROUPSET(groups, wcred->sc_supp_groups_nb); - groups_normalize(&wcred->sc_supp_groups_nb, groups); + AUDIT_ARG_GROUPSET(wcred->sc_supp_groups, + wcred->sc_supp_groups_nb); + groups_normalize(&wcred->sc_supp_groups_nb, + wcred->sc_supp_groups); } /* @@ -776,7 +756,7 @@ kern_setcred(struct thread *const td, const u_int flags, */ if (flags & SETCREDF_SUPP_GROUPS) crsetgroups_internal(new_cred, wcred->sc_supp_groups_nb, - groups); + wcred->sc_supp_groups); if (flags & SETCREDF_GID) change_egid(new_cred, wcred->sc_gid); if (flags & SETCREDF_RGID) @@ -863,9 +843,7 @@ unlock_finish: uifree(uip); if (ruip != NULL) uifree(ruip); -free_groups: - if (groups != preallocated_groups && groups != smallgroups) - free(groups, M_TEMP); /* Deals with 'groups' being NULL. */ + return (error); } diff --git a/sys/sys/syscallsubr.h b/sys/sys/syscallsubr.h index 350e4073604e..4ddd2eba25c8 100644 --- a/sys/sys/syscallsubr.h +++ b/sys/sys/syscallsubr.h @@ -326,7 +326,7 @@ int kern_select(struct thread *td, int nd, fd_set *fd_in, fd_set *fd_ou, int kern_sendit(struct thread *td, int s, struct msghdr *mp, int flags, struct mbuf *control, enum uio_seg segflg); int kern_setcred(struct thread *const td, const u_int flags, - struct setcred *const wcred, gid_t *preallocated_groups); + struct setcred *const wcred); int kern_setgroups(struct thread *td, int *ngrpp, gid_t *groups); int kern_setitimer(struct thread *, u_int, struct itimerval *, struct itimerval *); From nobody Mon Nov 24 21:44:51 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dFfW63Lsgz6Hsw5; Mon, 24 Nov 2025 21:45:06 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) 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 "E8" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dFfW52MM3z3gDK; Mon, 24 Nov 2025 21:45:05 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=zabbadoz.net header.s=20240622 header.b=f+S3+3IS; dmarc=pass (policy=none) header.from=zabbadoz.net; spf=pass (mx1.freebsd.org: domain of bzeeb-lists@lists.zabbadoz.net designates 2003:a:140a:2200:6:594:fffe:19 as permitted sender) smtp.mailfrom=bzeeb-lists@lists.zabbadoz.net 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 94660A64805; Mon, 24 Nov 2025 21:44:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=zabbadoz.net; s=20240622; t=1764020679; bh=U0ZxGxVLPLf597gCD74pmiCHTNr+T+hQ9FjCbc5hTs8=; h=Date:From:To:cc:Subject:In-Reply-To:References; b=f+S3+3ISwx4vNaO8+VqhZGeJVuxUTEcLMRKbmVs/Q/THF+gnLYbLSBrY6wpxkpemd VdAqYZlsLsFnJfZ0xLRt13BkNbvJBVEe/FSxJUE/x6b8b64LKJh8jPmXHQ/GBTVv7Q 7nLc00JNJQeDbmkVJs8uycPdqgYHNpypBbb/zA02EuJDKy1+qC8QQEgjXmCEJ1MOUJ NwZoJGwRx7EWXBiA69pmQ1KgiNGVtGjB/U5ZeOnS1gjWWu8mTajm/9Ar0NevgLcszQ q8sMfq2pYORlfi+u+bDVTtNuknRLu6o09T+qo6injQhxXaHxeF2E1KVki7FbiDX7Go 4l7BfI5VEtAc12g9cXo0tYSMNYZ9H7p7db1TWu3ukivBj5M+7hsm49R3beKREQEeAk b3LSds154dG1OAdsx+WN+tKlB+pus5wVxExrS4IuzTGkUgTQm8eOz/KFDYwfgbjqOd xsEzZQQ8u7Tvhqz+C9XZhiuvvt7jzfyrzp9WgCiVga7lFkLllCIx/7TymWnQhSMxaq 7/FODsFVRDHn2xvlsrQ0i8n3xDSGx9mMLHgc+R6qlpEpt4UdXr8ciCKH9UAeM9RUb0 RNEto2U1zSyajsx0xKkXxscwNVvz4VoCrVqQ/o6qk/7HIVUGptnbB0/gheLbQOLvc5 mCVCK+w6IwdWJ94WXIwF5LmA= 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 7A15B2D029E6; Mon, 24 Nov 2025 21:44:52 +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 JZrzF8d5oJZ5; Mon, 24 Nov 2025 21:44:51 +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 7CEE72D029D8; Mon, 24 Nov 2025 21:44:51 +0000 (UTC) Date: Mon, 24 Nov 2025 21:44:51 +0000 (UTC) From: "Bjoern A. Zeeb" To: Andrew Gallatin cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 012ecdde3a81 - main - ice: use newly exposed RSS hash key API rather than ad-hoc hashing In-Reply-To: <6921c920.308a4.39021509@gitrepo.freebsd.org> Message-ID: <9r78995p-qr67-070-rn81-o0n870nqp0oo@mnoonqbm.arg> References: <6921c920.308a4.39021509@gitrepo.freebsd.org> X-OpenPGP-Key-Id: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed X-Spamd-Bar: --- X-Spamd-Result: default: False [-4.00 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.999]; DMARC_POLICY_ALLOW(-0.50)[zabbadoz.net,none]; R_DKIM_ALLOW(-0.20)[zabbadoz.net:s=20240622]; R_SPF_ALLOW(-0.20)[+ip6:2003:a:140a:2200:6:594:fffe:19]; MIME_GOOD(-0.10)[text/plain]; TO_DN_SOME(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; MISSING_XM_UA(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-all@FreeBSD.org,dev-commits-src-main@FreeBSD.org]; RCVD_COUNT_THREE(0.00)[4]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DKIM_TRACE(0.00)[zabbadoz.net:+] X-Rspamd-Queue-Id: 4dFfW52MM3z3gDK On Sat, 22 Nov 2025, Andrew Gallatin wrote: Hi Drew, > The branch main has been updated by gallatin: > > URL: https://cgit.FreeBSD.org/src/commit/?id=012ecdde3a810c52cc2f68a22afa1a1b7d699bff > > commit 012ecdde3a810c52cc2f68a22afa1a1b7d699bff > Author: Andrew Gallatin > AuthorDate: 2025-11-22 14:29:33 +0000 > Commit: Andrew Gallatin > CommitDate: 2025-11-22 14:29:33 +0000 > > ice: use newly exposed RSS hash key API rather than ad-hoc hashing Sorry for leaving both here on one of the commits; a GENERIC kernel compile now yields these two warnings: /usr/src/sys/dev/cxgbe/t4_main.c:7159:1: warning: unused function 'hashen_to_hashconfig' [-Wunused-function] 7159 | hashen_to_hashconfig(int hashen) | ^~~~~~~~~~~~~~~~~~~~ 1 warning generated. /usr/src/sys/dev/ice/ice_lib.c:7357:1: warning: unused function 'ice_get_default_rss_key' [-Wunused-function] 7357 | ice_get_default_rss_key(u8 *seed) | ^~~~~~~~~~~~~~~~~~~~~~~ 1 warning generated. -- Bjoern A. Zeeb r15:7 From nobody Mon Nov 24 23:11:23 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dFhQg6Wshz6J0hj for ; Mon, 24 Nov 2025 23:11:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dFhQg2lbCz3sxg for ; Mon, 24 Nov 2025 23:11:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764025883; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RC3b01uoq76sgvRfPx0qKswcKOBpRk68cSU41tssXDE=; b=HHXn+rwFKNkFLNFuIn1v/exI96z57272tj8ZEPhzMvFoE3POyGfazWYck/DOGxA0ytwe0i 7fdAKP98CrM5Zz4XcORxsyQrvV6tzSDhn1TjQl4K8qtTZKn+I5bndmbwtcZ2ZyPrtnEWBZ FmmpP783nStOlFZkL+BqBR1Wq+81M9nt/aFXZolHyc2c6NRcmms4hjZNGollDW1baYKAJ/ oOpc4F8SDSAEzi4LGfqn83ssZ0OVbeRXqOkOoEO9sJFfm5RrjqlzIM/bCK7tGeEiaxfkQv xwJ2hsK1hCif7Ng8JNB7kVx5+yyRCeHwYnke2IRp192mviYrk2UuwbwNLPR8vg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764025883; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RC3b01uoq76sgvRfPx0qKswcKOBpRk68cSU41tssXDE=; b=SSewRD9HTqSDnBBn6l+GraTaWfkN6K/juHmaxWFccJ0/oFk7RDJ6yPIlRB/wl1iKH4UHFx DGvCCxhLdxPJhUzGwpX90vVr6PvjrXDd3xL5dNvAZytxQEPxdF+j02DsU3DfRPS+xk3T/+ OHKJ22x7to8jS8BbHIw0v+7PbhVKBQHqv2wJTQDDXARUQcLnjrf+iWq3ZBWyV4tdG8+YTJ 7v3SDBD2F36iUhqLxg8W5K4WR0rEagJdR/DUQod8XA9M2d5DHoeqRdq1UoUjq7BTrrxfiE U9SZ96lxO9BK/jMx8+KEA1XVXbezH0JtToJz6rcGFqdABuOFJd1yYfEd+3V+qw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764025883; a=rsa-sha256; cv=none; b=lttPgq3pKzaaEyvoX961kgXUzbSEa9qS/EqS99OwwyfvTseomGtKvQsEAPtZQPpLt4GcRW UmLZ+XxiVVz0v82OGEJ/t7b3zQfpyO0kGLCdvH1BKN/8VSapDIMOKPut39tYwm7L4OWxBn 4FTxEjSobOiSY4Kc/65XbqypMtLyWTQvbg5eio4j4A43JNf7Kea0MNpwYQSjrWY1FgIY7e jhEWp3S1pEp1CjvZXtHpDMzRwUhxS5B5rnmj5Q6vf1cpZQi13fK12Vj+VK7EZ2GOqWDfIL JY9OQ5d9Mr+SGNdEenuq0MxdX/ixZEgOQXzuRNIQcH7NqYYmhTECKNjz7hMxSg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dFhQg1yRbzb6q for ; Mon, 24 Nov 2025 23:11:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id a947 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 24 Nov 2025 23:11:23 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Navdeep Parhar Subject: git: a303b1455fb5 - main - cxgbe(4): Fix compile warning for !RSS kernels List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: a303b1455fb5f76b193e10b0a96fabe4e93e9f40 Auto-Submitted: auto-generated Date: Mon, 24 Nov 2025 23:11:23 +0000 Message-Id: <6924e61b.a947.516a98ae@gitrepo.freebsd.org> The branch main has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=a303b1455fb5f76b193e10b0a96fabe4e93e9f40 commit a303b1455fb5f76b193e10b0a96fabe4e93e9f40 Author: Navdeep Parhar AuthorDate: 2025-11-24 21:00:47 +0000 Commit: Navdeep Parhar CommitDate: 2025-11-24 21:56:00 +0000 cxgbe(4): Fix compile warning for !RSS kernels .../sys/dev/cxgbe/t4_main.c:7197:1: warning: unused function 'hashen_to_hashconfig' [-Wunused-function] 7197 | hashen_to_hashconfig(int hashen) | ^~~~~~~~~~~~~~~~~~~~ 1 warning generated. Reported by: bz Fixes: d381a6b4a552 cxgbe: use newly exposed RSS hash key API rather than ad-hoc hashing --- sys/dev/cxgbe/t4_main.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sys/dev/cxgbe/t4_main.c b/sys/dev/cxgbe/t4_main.c index 15b3fd94fa54..946eb84457a3 100644 --- a/sys/dev/cxgbe/t4_main.c +++ b/sys/dev/cxgbe/t4_main.c @@ -7194,11 +7194,10 @@ vi_full_init(struct vi_info *vi) { struct adapter *sc = vi->adapter; struct sge_rxq *rxq; - int rc, i, j; + int rc, i, j, extra; int hashconfig = rss_gethashconfig(); #ifdef RSS int nbuckets = rss_getnumbuckets(); - int extra; #endif ASSERT_SYNCHRONIZED_OP(sc); @@ -7255,7 +7254,6 @@ vi_full_init(struct vi_info *vi) vi->hashen = hashconfig_to_hashen(hashconfig); -#ifdef RSS /* * We may have had to enable some hashes even though the global config * wants them disabled. This is a potential problem that must be @@ -7289,7 +7287,7 @@ vi_full_init(struct vi_info *vi) CH_ALERT(vi, "UDP/IPv4 4-tuple hashing forced on.\n"); if (extra & RSS_HASHTYPE_RSS_UDP_IPV6) CH_ALERT(vi, "UDP/IPv6 4-tuple hashing forced on.\n"); -#endif + rc = -t4_config_vi_rss(sc, sc->mbox, vi->viid, vi->hashen, vi->rss[0], 0, 0); if (rc != 0) { From nobody Mon Nov 24 23:11:52 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dFhRN5lKvz6J0l9 for ; Mon, 24 Nov 2025 23:12:00 +0000 (UTC) (envelope-from nparhar@gmail.com) Received: from mail-pf1-x42d.google.com (mail-pf1-x42d.google.com [IPv6:2607:f8b0:4864:20::42d]) (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 4dFhRN0V01z3tK3 for ; Mon, 24 Nov 2025 23:12:00 +0000 (UTC) (envelope-from nparhar@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-pf1-x42d.google.com with SMTP id d2e1a72fcca58-7b8e49d8b35so5707890b3a.3 for ; Mon, 24 Nov 2025 15:12:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1764025914; x=1764630714; darn=freebsd.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=YQSJbSbYuggy+14l/1f27usKTxLJ3QpAidzwJgQHh9Y=; b=Ra0yRmofrA2j7PVobW6iglFzvQjM15YS0y4rZ+uw+kKYqniZOSbUCfirPQ6SuJ2MG+ 3uiR91IpikCoAnRBZpsHywvb47vC2Fyp+v4LeOU5nH9hSa3BenQb2Bc2uceA+LqLQDt8 vchkJWjrd85GsNyzuaercfYevOxEoe5BZI+RU8Mw4qRwHMKbg55ZLWQOEdXwr7PmUAXC lfcIs7DuKkUEug3qRXCY2CWc7cQObohx9cNSGUBC5WMmX2jGbDVqeRlY9Ff0xeMS+Ogt Jbdlvu+S1gUfOS/JGTyFAHXgPpRWV5xY/Km9MdR+Q/90d+/vQDdg89zC19fLdD15D5LF u/og== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764025914; x=1764630714; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=YQSJbSbYuggy+14l/1f27usKTxLJ3QpAidzwJgQHh9Y=; b=j6jzvx/7dWLAGoZKwMU6AEmIrRJuuizMTqXfXfIEVQdgx80JGvw9GVdE4iJA6BZcs1 PKpv4U87zbTfCxDA52n/uy3CKT4kNokUAlojj6QFXum+wvitLWa1iwgqLySB+1U6KIJr 9Nzw0c+FFpku2+T992Q4Ndh70BYQKMlK6AIfy8+D8dvD7l8ZyD1FCa//UjpPmB+gD3Ho KuEe0jSjiutxh38oniy6U264V1VdWNUBXX/YSXuPslwTU5gNdDa82imf8yFepXHoDmZT 2Ur4yW6TE+fX87fFp8+cjzrIbgyrMNUiXVfgZutAQRHjf9ctnM1JMZAM4Telk41TOjvr phgw== X-Forwarded-Encrypted: i=1; AJvYcCUV1CjAJZto2bN0kMBv+hNC+Cij6RjcUV2L9X7YtVELnu/hnGg+9OjWMG4G2ld9PekslEIAvw+9j1wJv9h6tlsK7qrp@freebsd.org X-Gm-Message-State: AOJu0YwCzAn58trxaryqHzVHq37Ljm5RSF/2ddNDk5LjAwxyyEZSQ/z2 XiO+/YzB3ply8eVkplG4qssJUnfImW/eoH1GWQszL96Hs2hYvJPyzYUK X-Gm-Gg: ASbGncsSyHfsb1Cz03u03mHjtC+FBAtugN7gibgsbaNjxUktejMwYa0Kqq9J8iX/VSa IbAQh1V2trLTLUmJGYeYq7IDQfncgC3ASO9vvb1QK4PHwr6lvEoDD+jpSk8Z1NIfHpLtOw+srJV s1ASF7GLJ92UPoEMHao+c4EyO3lTCy99alEX/gq64cPkNsGypeCe77iTeA1d++6olaoS/mqDX7q j8Ie27DSPhvLNd8dWxQ6ofb+B8Kt2+hbyMBrtwpjpGZAqABV4GWPRDDu0g7Itu04ucr9fulCjhN QNzaoc0kYwI0iltb9vZWEnm8MeEZQqk8vgR+OD3Ss+5Uvi/fLqA048QsV4035yP11A1wgb6Eoei Ng/kSpq8su/AzHujIZpKfFiSlTM5Hzi4VUQEtyLl2F10Ap0YuTA2eKGxqxGE7+9ES0XajMJizWC WI6Qww6A== X-Google-Smtp-Source: AGHT+IFooIxc9uUMPOWO9lQHrWuYUkTq0rmU+vgjtJ3kwU2/URDuzPiTTOemLZ+EzJpa2RhI2B4OlA== X-Received: by 2002:a05:701b:2717:b0:119:e569:f619 with SMTP id a92af1059eb24-11c9d7135f3mr9812836c88.18.1764025913554; Mon, 24 Nov 2025 15:11:53 -0800 (PST) Received: from [10.192.161.10] ([12.32.117.8]) by smtp.googlemail.com with ESMTPSA id a92af1059eb24-11c93e5674csm74399760c88.8.2025.11.24.15.11.52 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 24 Nov 2025 15:11:53 -0800 (PST) Message-ID: <61910cdd-5be3-45c0-8c65-d5c9851ae98a@gmail.com> Date: Mon, 24 Nov 2025 15:11:52 -0800 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 012ecdde3a81 - main - ice: use newly exposed RSS hash key API rather than ad-hoc hashing Content-Language: en-US To: "Bjoern A. Zeeb" , Andrew Gallatin Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <6921c920.308a4.39021509@gitrepo.freebsd.org> <9r78995p-qr67-070-rn81-o0n870nqp0oo@mnoonqbm.arg> From: Navdeep Parhar In-Reply-To: <9r78995p-qr67-070-rn81-o0n870nqp0oo@mnoonqbm.arg> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: base64 X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4dFhRN0V01z3tK3 T24gMTEvMjQvMjUgMTo0NCBQTSwgQmpvZXJuIEEuIFplZWIgd3JvdGU6DQo+IE9uIFNhdCwg MjIgTm92IDIwMjUsIEFuZHJldyBHYWxsYXRpbiB3cm90ZToNCj4gDQo+IEhpIERyZXcsDQo+ IA0KPj4gVGhlIGJyYW5jaCBtYWluIGhhcyBiZWVuIHVwZGF0ZWQgYnkgZ2FsbGF0aW46DQo+ Pg0KPj4gVVJMOiBodHRwczovL2NnaXQuRnJlZUJTRC5vcmcvc3JjL2NvbW1pdC8/IA0KPj4g aWQ9MDEyZWNkZGUzYTgxMGM1MmNjMmY2OGEyMmFmYTFhMWI3ZDY5OWJmZg0KPj4NCj4+IGNv bW1pdCAwMTJlY2RkZTNhODEwYzUyY2MyZjY4YTIyYWZhMWExYjdkNjk5YmZmDQo+PiBBdXRo b3I6wqDCoMKgwqAgQW5kcmV3IEdhbGxhdGluIDxnYWxsYXRpbkBGcmVlQlNELm9yZz4NCj4+ IEF1dGhvckRhdGU6IDIwMjUtMTEtMjIgMTQ6Mjk6MzMgKzAwMDANCj4+IENvbW1pdDrCoMKg wqDCoCBBbmRyZXcgR2FsbGF0aW4gPGdhbGxhdGluQEZyZWVCU0Qub3JnPg0KPj4gQ29tbWl0 RGF0ZTogMjAyNS0xMS0yMiAxNDoyOTozMyArMDAwMA0KPj4NCj4+IMKgwqAgaWNlOiB1c2Ug bmV3bHkgZXhwb3NlZCBSU1MgaGFzaCBrZXkgQVBJIHJhdGhlciB0aGFuIGFkLWhvYyBoYXNo aW5nDQo+IA0KPiBTb3JyeSBmb3IgbGVhdmluZyBib3RoIGhlcmUgb24gb25lIG9mIHRoZSBj b21taXRzOw0KPiBhIEdFTkVSSUMga2VybmVsIGNvbXBpbGUgbm93IHlpZWxkcyB0aGVzZSB0 d28gd2FybmluZ3M6DQo+IA0KPiAvdXNyL3NyYy9zeXMvZGV2L2N4Z2JlL3Q0X21haW4uYzo3 MTU5OjE6IHdhcm5pbmc6IHVudXNlZCBmdW5jdGlvbiANCj4gJ2hhc2hlbl90b19oYXNoY29u ZmlnJyBbLVd1bnVzZWQtZnVuY3Rpb25dDQo+ICDCoDcxNTkgfCBoYXNoZW5fdG9faGFzaGNv bmZpZyhpbnQgaGFzaGVuKQ0KPiAgwqDCoMKgwqDCoCB8IF5+fn5+fn5+fn5+fn5+fn5+fn5+ DQo+IDEgd2FybmluZyBnZW5lcmF0ZWQuDQoNClRoaXMgb25lIGlzIGZpeGVkIGluIGEzMDNi MTQ1NWZiNS4NCg0KUmVnYXJkcywNCk5hdmRlZXANCg== From nobody Tue Nov 25 00:43:01 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dFkSP5tCvz6H6j9 for ; Tue, 25 Nov 2025 00:43:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dFkSP59Qtz426b for ; Tue, 25 Nov 2025 00:43:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764031381; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=J4btw5fGfmmmqrGYSVoLqek44gv8IG6vcAhJdlmv0gs=; b=IAZfAN9Ginjijg2ZkD5QDk+dnSMzk7yux0LG1PCKkrIFav09H8zGRXXNyEGhOa0cg5euwV vtJhPPAwrLeLVyU7G1mmPisj1QGLpTYxZZ7R6SHhxWGEmycpGoJn5sJ6aZiGekRMl6kQPC JD9Mey9nBgOfDYM23OjnyvbEc1ctronUugd0+tNFOi5AuMYnQ/bWKZaBcjl85lqyzXBkDL 13yxhQ0l8An4X0ULMRo/4K0uWUKrUXUC3XIxpTZG0d5vKmF6pxC8rumvNbf0a8PpMNDlGg n3EclhkB7n6dCmUUBJ4Nbs68KZPUFZ0cfO+juaT/r7iWr3GIXHhMIQEyeUwnFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764031381; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=J4btw5fGfmmmqrGYSVoLqek44gv8IG6vcAhJdlmv0gs=; b=cUY68rr5KDqNguyJkGo9suBZmWXzyojnoPZo3AME4DJIdb5Jpeoe+aXG5ADRqNwqe8QjQn 52aKjttVMn/cPlxHcJeDX758ptnioiKm4hSmGO1D0qEpwn32lxjNxaku+eADvVTqSfTian I7uxutXB2qQzDJbP0kY2IS/mSy9K2cH+wKdB9Hxmh/tSOEttco3L2HMr+SF8IfDg1K+6ET dA4EVCgT+VMUVWTRXwBVY/niz5Kd/p2UJUHNKGWJPXk3Pb/LS3lYofX42zKtaIHeUApiVY I2mDPktH6d0v3IHwX9WjOA+sbrLd+KqE7v2oDnAedZxy7zxOtWVs7QKyXojXIg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764031381; a=rsa-sha256; cv=none; b=gX545dOSGFUibznyIPxUL7Brwlf1/kQBPzfmBnllbt529p99n0cHiq/O7jDsrfXo6cy8OE bqPOI9xb21T6R3Z7HB20DDHJ/P1D8Gi+AAdUZPo7UTHrmz6jsy7hf0XJN6H6bsFRpnDTB6 5MidihiJ+dwKDxvqfZ4iCiO6KAgsyINOwbK27xqeqzLrR1KaDQlfLRFqlIED4pYdOxn0nG 5SIkitpvgL1t2dYsU5sIxCJP8qrvsL7qbitYaf5E9PywaL112RidQV9tzFm0q4ZyT5ZtRl 4KFd1bTe0MER0R/dx2ZdSvGcUg1UyIKaNaveN5upqB/PFQ04kFB1wIQGq781iQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dFkSP4mm8zdP6 for ; Tue, 25 Nov 2025 00:43:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 24f53 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 25 Nov 2025 00:43:01 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Jose Luis Duran Subject: git: a5adb1ca3526 - stable/15 - nuageinit: Silence luacheck warnings and fix typos List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: a5adb1ca3526e3a0139cf4305effa8ec527580f3 Auto-Submitted: auto-generated Date: Tue, 25 Nov 2025 00:43:01 +0000 Message-Id: <6924fb95.24f53.4220a51b@gitrepo.freebsd.org> The branch stable/15 has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=a5adb1ca3526e3a0139cf4305effa8ec527580f3 commit a5adb1ca3526e3a0139cf4305effa8ec527580f3 Author: Jose Luis Duran AuthorDate: 2025-10-21 13:28:45 +0000 Commit: Jose Luis Duran CommitDate: 2025-11-25 00:39:15 +0000 nuageinit: Silence luacheck warnings and fix typos No functional change intended. Reviewed by: bapt, dtxdf, kevans MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D53238 (cherry picked from commit 81af04b081402d131c7e34b30c88b7c337271fad) --- libexec/nuageinit/nuage.lua | 6 ++---- libexec/nuageinit/nuageinit | 24 +++++++++++------------- libexec/nuageinit/tests/addfile.lua | 2 +- libexec/nuageinit/tests/nuageinit.sh | 2 +- 4 files changed, 15 insertions(+), 19 deletions(-) diff --git a/libexec/nuageinit/nuage.lua b/libexec/nuageinit/nuage.lua index 3eeb2ea0b44c..2d962b540b23 100644 --- a/libexec/nuageinit/nuage.lua +++ b/libexec/nuageinit/nuage.lua @@ -69,7 +69,7 @@ local function errmsg(str, prepend) end local function chmod(path, mode) - local mode = tonumber(mode, 8) + mode = tonumber(mode, 8) local _, err, msg = sys_stat.chmod(path, mode) if err then errmsg("chmod(" .. path .. ", " .. mode .. ") failed: " .. msg) @@ -150,8 +150,6 @@ local function splitlines(s) end local function getgroups() - local ret = {} - local root = os.getenv("NUAGE_FAKE_ROOTDIR") local cmd = "pw " if root then @@ -579,7 +577,7 @@ local function settimezone(timezone) root = "/" end - f, _, rc = os.execute("tzsetup -s -C " .. root .. " " .. timezone) + local f, _, rc = os.execute("tzsetup -s -C " .. root .. " " .. timezone) if not f then warnmsg("Impossible to configure time zone ( rc = " .. rc .. " )") diff --git a/libexec/nuageinit/nuageinit b/libexec/nuageinit/nuageinit index f68e45701b6c..148f5b3b30cd 100755 --- a/libexec/nuageinit/nuageinit +++ b/libexec/nuageinit/nuageinit @@ -228,10 +228,10 @@ local function nameservers(interface, obj) local resolv_conf = root .. "/etc/resolv.conf" - resolv_conf_attr = lfs.attributes(resolv_conf) + local resolv_conf_attr = lfs.attributes(resolv_conf) if resolv_conf_attr == nil then - resolv_conf_handler = open_resolv_conf() + local resolv_conf_handler = open_resolv_conf() resolv_conf_handler:close() end @@ -294,10 +294,11 @@ local function match_rules(rules) -- with the matching interfaces must be returned. This changes the way we initially -- thought about our implementation, since at first we only needed one interface, -- but cloud-init performs actions on a group of matching interfaces. + local interface local interfaces = {} if rules.macaddress then local ifaces = get_ifaces_by_mac() - local interface = ifaces[rules.macaddress] + interface = ifaces[rules.macaddress] if not interface then nuage.warn("not interface matching by MAC address: " .. rules.macaddress) return @@ -347,11 +348,11 @@ local function write_files(files, defer) end end -local function write_files_not_defered(obj) +local function write_files_not_deferred(obj) write_files(obj.write_files, false) end -local function write_files_defered(obj) +local function write_files_deferred(obj) write_files(obj.write_files, true) end -- Set network configuration from user_data @@ -380,6 +381,7 @@ local function network_config(obj) extra_opts = extra_opts .. " wol" end if v.mtu then + local mtu if type(v.mtu) == "number" then mtu = tostring(v.mtu) else @@ -679,14 +681,14 @@ if line == "#cloud-config" then network_config, ssh_pwauth, runcmd, - write_files_not_defered, + write_files_not_deferred, } local post_network_calls = { packages, users, chpasswd, - write_files_defered, + write_files_deferred, } f = io.open(ni_path .. "/" .. ud) @@ -703,12 +705,8 @@ if line == "#cloud-config" then for i = 1, #calls_table do if citype == "nocloud" and calls_table[i] == network_config then - netobj = parse_network_config() - if netobj == nil then - network_config(obj) - else - network_config(netobj) - end + local netobj = parse_network_config() or obj + network_config(netobj) else calls_table[i](obj) end diff --git a/libexec/nuageinit/tests/addfile.lua b/libexec/nuageinit/tests/addfile.lua index 98d020e557c0..ea98369f1909 100644 --- a/libexec/nuageinit/tests/addfile.lua +++ b/libexec/nuageinit/tests/addfile.lua @@ -35,7 +35,7 @@ if str ~= f.content then n.err("Invalid file content") end --- the file is overwriten +-- the file is overwritten f.content = "test" str = addfile_and_getres(f) diff --git a/libexec/nuageinit/tests/nuageinit.sh b/libexec/nuageinit/tests/nuageinit.sh index 2b7c5226c97a..851f7110378a 100644 --- a/libexec/nuageinit/tests/nuageinit.sh +++ b/libexec/nuageinit/tests/nuageinit.sh @@ -890,7 +890,7 @@ EOF atf_check -o inline:"plop" cat file1 atf_check -o inline:"" cat emptyfile atf_check -o inline:"bla\n" cat file_base64 - test -f foo && atf_fail "foo creation should have been defered" + test -f foo && atf_fail "foo creation should have been deferred" atf_check -o match:"^-rwxr-xr-x.*nobody" ls -l file_base64 rm file1 emptyfile file_base64 atf_check -o empty /usr/libexec/nuageinit "${PWD}"/media/nuageinit postnet From nobody Tue Nov 25 00:43:02 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dFkSR20Yjz6J61x for ; Tue, 25 Nov 2025 00:43:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dFkSQ6rW7z42Hg for ; Tue, 25 Nov 2025 00:43:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764031383; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BchFr2j2vR+FS3BqAkT1mC505IuYvMZ9oBdhAcg2lP4=; b=WQh5rBCYVh6lxErf+FnfMeGyYIikmdg7t661YItTJGd6K9hbYBsRRMmEOE3LV8rQUuYZhM OFjmiUA7xIHCAypKZMn+3hUtpAxC29zKNLixhn5X4zrDxK+DMpDqAK4HylpC+zXwV61/pE 7x8Ugxj9xJjg70Hbd2EMy+iazjjKjfr3PN7bSSD3ElIhO8vDhrKg+5Ihz+whNBRmomR7Mm 3riR0XL+8w4UsrW2t5JpHY9sb0LXAl1HoofBkfwKnQkcOVWLK2zBDA+jo6dSC6pNmMoSGD KBr/TUPhIBrEN38rQPTC1RN+UG/N6BbQagoadSj/kOXrtv6t1fP0ILpcJGHhqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764031383; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BchFr2j2vR+FS3BqAkT1mC505IuYvMZ9oBdhAcg2lP4=; b=hGRUlU2Je0JTEyHGLMJSSeTvJQMUCm0l5Gbzd/LDhOf7DGohwx74rydtcUOnSz9p/rK6kE jLlYxRDOhZyxZx9XEddGEwEtoXAPUXRj61rY1Lu6OxbvIuHFPrHzJzzZGpaUqpnSO8CSBR LjkysO7AIYSn0YSAAWx2oofmk2BrcQl9QwqOOd/Ky/84ERSn2uVZo0xqZBOVDioRCtAo07 49LfkomSa7/D1aFj1mUb3Ka4clD45wJWqdJcI+KR6EwzcjH++bAN7sgCOELO1+rGZ7MEnf aiCxZPhB4CTicVmmXjd0mJaKfITIRokmEn1d3Na5BmUhyG0AteR7oQshzkrOkg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764031383; a=rsa-sha256; cv=none; b=e+xAQ8yym7GK1OiUzOCxTkC8b5p6jgB56NzVWkFHYkxr+SapoLBhtwqEKlUTgLZQPvqfvG dz+OhAaw7xlYrRfn3kB6k/opant5cRaa/wQveYNb9IJRdGSzE/qcIVSw3lJ6zPC+39v1qi NfW9xIu3Lsw5MYQ0H3qx71EL54ivWD2j0k2Hl9R8Mih3luqPj9CXD9yCqNfLSVrLxWo+Nz Vnb/ZjxQedu0jAeqD+l9B01ZbYnPuWw8bvMDA8EjLgVS9Z2zKrOj0fuapqhArhs325kUmu DOxI/xIj6joDUK+SFmrIOmjHyWl/2RKllfHaSVA5TvR1FeU66OTXjCRFi+Iytw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dFkSQ5YhKzf5w for ; Tue, 25 Nov 2025 00:43:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 24715 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 25 Nov 2025 00:43:02 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Jose Luis Duran Subject: git: a7cadff8cccc - stable/15 - nuageinit: Add guards against empty user data List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: a7cadff8ccccfa3f3cde9a501a0fe9a78299d41a Auto-Submitted: auto-generated Date: Tue, 25 Nov 2025 00:43:02 +0000 Message-Id: <6924fb96.24715.16eeea8f@gitrepo.freebsd.org> The branch stable/15 has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=a7cadff8ccccfa3f3cde9a501a0fe9a78299d41a commit a7cadff8ccccfa3f3cde9a501a0fe9a78299d41a Author: Jose Luis Duran AuthorDate: 2025-10-21 13:11:50 +0000 Commit: Jose Luis Duran CommitDate: 2025-11-25 00:39:37 +0000 nuageinit: Add guards against empty user data Add guards against attempting to process a user data file with an empty first line or contents. PR: 290395 Reviewed by: bapt (earlier), dtxdf, markj MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D53239 (cherry picked from commit 57d25b6333523491ac7a3e869bd5d16127203eed) --- libexec/nuageinit/nuageinit | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/libexec/nuageinit/nuageinit b/libexec/nuageinit/nuageinit index 148f5b3b30cd..0870d6570d0e 100755 --- a/libexec/nuageinit/nuageinit +++ b/libexec/nuageinit/nuageinit @@ -662,8 +662,16 @@ if not f then os.exit(0) end local line = f:read("*l") +if not line or #string.gsub(line, "^%s*(.-)%s*$", "%1") == 0 then + f:close() + os.exit(0) +end if citype ~= "postnet" then local content = f:read("*a") + if not content or #string.gsub(content, "^%s*(.-)%s*$", "%1") == 0 then + f:close() + os.exit(0) + end nuage.mkdir_p(root .. "/var/cache/nuageinit") local tof = assert(io.open(root .. "/var/cache/nuageinit/user_data", "w")) tof:write(line .. "\n" .. content) From nobody Tue Nov 25 00:43:21 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dFkSn6gBZz6H6jJ for ; Tue, 25 Nov 2025 00:43:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dFkSn644nz431v for ; Tue, 25 Nov 2025 00:43:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764031401; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=p9ANSpRpu9LnJUWSdHRFQM8EVVMGd1ly5N3n4mrBihM=; b=G46rQmIxTWXKFGHj0N+68yY2Dy9/ofiWi5xSy1iBDQTIJ9gNFtupSsk/eg+uwRJNZ5lAaw NoTCFM7IeeSUXzVowXD2HEq6Chu2OA2WLAZCFyg3FzGUYHOU9qXDuDnqB5LNCERj4PDzx8 +GrUe9bCNpmhdymGYFMyelcsr72dhyvD8+ZTPQsJbhQhZPllT53Oyv/hQo1arflqEQ8dKa 2AlbyjU21xRmHTJH50ZT0gMXTAcG1djG6O/qrvaC/fNTBA7qn82iuE4Gfawg+tIFw6TCvF yaWtLXnv4WM3JlkaulX8/eEWDEZPqeWF7BWp7NOsqKBIAxnXQtc+17dL4xmigQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764031401; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=p9ANSpRpu9LnJUWSdHRFQM8EVVMGd1ly5N3n4mrBihM=; b=bk9eAgq1lnj/Pnbfhjw6txz6v8I+KCt2kuazXCpqXCyixoM9JlorcNeP/lDj97xKJao6So +LwOYpUQ0ljqogyhTTbJJRvEaMFA3lYiZElceA4cyQd/3lFMSRTpBsbBq/UB2riPuXNYQu 51/AgjkIwINhbHV2sO1w9oqBOurSs1dDRJ56YQZI4dvXrkj88Kcos9UZXU8YRZMLActRxv LiP6OOungZOp4EbK/fRxN2Re59FC5mc+SpPm2PhKG4fWvbcevTklQMzi1id1W8XhIpbTBI tDp/NtB62Zi9LPyn5SRwPzotbbijUsMtelr6k+aWyQuMkwaLlouEV9gHNiQESA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764031401; a=rsa-sha256; cv=none; b=RRkeSgInpzjLRvISKPZDC8PcVLK/PjkW9TiWCLENlF3dVcBVPV7MWRZt8UvWiS/5H+VT+x oJP6kFz0IPjnENkfyRFrRuK6fhvtL5zLRSxUK4s34rtlq3YA8XVyWigwoKzGP1DLDQibow HjU3/cn1WDd55BStqviRoReyhAAKs1UKnHFDQAYyUPLL0A2Yc+BimUYuCFSnUHrAD27ZHK 32+no2U5kk0LSnmmFmFHxqwFkKmHx5G1xVFnTkWjh/3tBplBEDgBuWLyNc89vtqCDz1JUl LO2tz/kfzR7glSiOv+vKA7UcgtmanRro0FPQZCHGiUv7c+m4vPyDdcxf9LILzA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dFkSn5f71zf5x for ; Tue, 25 Nov 2025 00:43:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2469b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 25 Nov 2025 00:43:21 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Jose Luis Duran Subject: git: 9eca9724b870 - stable/14 - nuageinit: Silence luacheck warnings and fix typos List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 9eca9724b8706cd185f99ed5a638fad9ce9abe1b Auto-Submitted: auto-generated Date: Tue, 25 Nov 2025 00:43:21 +0000 Message-Id: <6924fba9.2469b.2dc4e669@gitrepo.freebsd.org> The branch stable/14 has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=9eca9724b8706cd185f99ed5a638fad9ce9abe1b commit 9eca9724b8706cd185f99ed5a638fad9ce9abe1b Author: Jose Luis Duran AuthorDate: 2025-10-21 13:28:45 +0000 Commit: Jose Luis Duran CommitDate: 2025-11-25 00:42:23 +0000 nuageinit: Silence luacheck warnings and fix typos No functional change intended. Reviewed by: bapt, dtxdf, kevans MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D53238 (cherry picked from commit 81af04b081402d131c7e34b30c88b7c337271fad) --- libexec/nuageinit/nuage.lua | 6 ++---- libexec/nuageinit/nuageinit | 24 +++++++++++------------- libexec/nuageinit/tests/addfile.lua | 2 +- libexec/nuageinit/tests/nuageinit.sh | 2 +- 4 files changed, 15 insertions(+), 19 deletions(-) diff --git a/libexec/nuageinit/nuage.lua b/libexec/nuageinit/nuage.lua index 3eeb2ea0b44c..2d962b540b23 100644 --- a/libexec/nuageinit/nuage.lua +++ b/libexec/nuageinit/nuage.lua @@ -69,7 +69,7 @@ local function errmsg(str, prepend) end local function chmod(path, mode) - local mode = tonumber(mode, 8) + mode = tonumber(mode, 8) local _, err, msg = sys_stat.chmod(path, mode) if err then errmsg("chmod(" .. path .. ", " .. mode .. ") failed: " .. msg) @@ -150,8 +150,6 @@ local function splitlines(s) end local function getgroups() - local ret = {} - local root = os.getenv("NUAGE_FAKE_ROOTDIR") local cmd = "pw " if root then @@ -579,7 +577,7 @@ local function settimezone(timezone) root = "/" end - f, _, rc = os.execute("tzsetup -s -C " .. root .. " " .. timezone) + local f, _, rc = os.execute("tzsetup -s -C " .. root .. " " .. timezone) if not f then warnmsg("Impossible to configure time zone ( rc = " .. rc .. " )") diff --git a/libexec/nuageinit/nuageinit b/libexec/nuageinit/nuageinit index f68e45701b6c..148f5b3b30cd 100755 --- a/libexec/nuageinit/nuageinit +++ b/libexec/nuageinit/nuageinit @@ -228,10 +228,10 @@ local function nameservers(interface, obj) local resolv_conf = root .. "/etc/resolv.conf" - resolv_conf_attr = lfs.attributes(resolv_conf) + local resolv_conf_attr = lfs.attributes(resolv_conf) if resolv_conf_attr == nil then - resolv_conf_handler = open_resolv_conf() + local resolv_conf_handler = open_resolv_conf() resolv_conf_handler:close() end @@ -294,10 +294,11 @@ local function match_rules(rules) -- with the matching interfaces must be returned. This changes the way we initially -- thought about our implementation, since at first we only needed one interface, -- but cloud-init performs actions on a group of matching interfaces. + local interface local interfaces = {} if rules.macaddress then local ifaces = get_ifaces_by_mac() - local interface = ifaces[rules.macaddress] + interface = ifaces[rules.macaddress] if not interface then nuage.warn("not interface matching by MAC address: " .. rules.macaddress) return @@ -347,11 +348,11 @@ local function write_files(files, defer) end end -local function write_files_not_defered(obj) +local function write_files_not_deferred(obj) write_files(obj.write_files, false) end -local function write_files_defered(obj) +local function write_files_deferred(obj) write_files(obj.write_files, true) end -- Set network configuration from user_data @@ -380,6 +381,7 @@ local function network_config(obj) extra_opts = extra_opts .. " wol" end if v.mtu then + local mtu if type(v.mtu) == "number" then mtu = tostring(v.mtu) else @@ -679,14 +681,14 @@ if line == "#cloud-config" then network_config, ssh_pwauth, runcmd, - write_files_not_defered, + write_files_not_deferred, } local post_network_calls = { packages, users, chpasswd, - write_files_defered, + write_files_deferred, } f = io.open(ni_path .. "/" .. ud) @@ -703,12 +705,8 @@ if line == "#cloud-config" then for i = 1, #calls_table do if citype == "nocloud" and calls_table[i] == network_config then - netobj = parse_network_config() - if netobj == nil then - network_config(obj) - else - network_config(netobj) - end + local netobj = parse_network_config() or obj + network_config(netobj) else calls_table[i](obj) end diff --git a/libexec/nuageinit/tests/addfile.lua b/libexec/nuageinit/tests/addfile.lua index 98d020e557c0..ea98369f1909 100644 --- a/libexec/nuageinit/tests/addfile.lua +++ b/libexec/nuageinit/tests/addfile.lua @@ -35,7 +35,7 @@ if str ~= f.content then n.err("Invalid file content") end --- the file is overwriten +-- the file is overwritten f.content = "test" str = addfile_and_getres(f) diff --git a/libexec/nuageinit/tests/nuageinit.sh b/libexec/nuageinit/tests/nuageinit.sh index 2b7c5226c97a..851f7110378a 100644 --- a/libexec/nuageinit/tests/nuageinit.sh +++ b/libexec/nuageinit/tests/nuageinit.sh @@ -890,7 +890,7 @@ EOF atf_check -o inline:"plop" cat file1 atf_check -o inline:"" cat emptyfile atf_check -o inline:"bla\n" cat file_base64 - test -f foo && atf_fail "foo creation should have been defered" + test -f foo && atf_fail "foo creation should have been deferred" atf_check -o match:"^-rwxr-xr-x.*nobody" ls -l file_base64 rm file1 emptyfile file_base64 atf_check -o empty /usr/libexec/nuageinit "${PWD}"/media/nuageinit postnet From nobody Tue Nov 25 00:43:22 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dFkSq1d4sz6J625 for ; Tue, 25 Nov 2025 00:43:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dFkSp6Pzbz42pC for ; Tue, 25 Nov 2025 00: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=1764031402; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GTGz+pAIsWE3A3nL8OKQiKOURUwHvo2CxRTqrVbUYDM=; b=CBFxkp6JFPlLCsDS6Rs9V00RjXlgQCYzRZ+2ISLhcEmal6gVb5zx9yTWcZW4af2cILDTQd iDiN8ndjpKtzH0pn7sw73poLh+Zrxjh+BySUdG/+4De1gUL8WkHh0uLc0T9iQyJSRHT3jr yUMZTi/TY3MX/SiD08inEhcg40A4ShXAtOsGjohYRt5CFjOHz3FHRPkt+bJY7Zu++1ebI/ 7N0OXIxKxD/cm9Zm9TknQYWrBvfqzi9iyB4jzWPUqzD+bgNtWKu+/8e8Txc8pNcLTtksOB QX2eO2THyy+UyF2mQ3K+HK5NaI08379UszDFVXw/v4f53RAt2V7rLwCGX708Hg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764031402; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GTGz+pAIsWE3A3nL8OKQiKOURUwHvo2CxRTqrVbUYDM=; b=WfW8WDAdgKdMoNOtqVx4bbk4LWS+a6h93KqsTJWEvbHTJPkZf1mbO/4Y2dIZ1V/otTIhCl mJCmgs7q2jnNAkv8OT7KZSTztKi768dyidVryXxl8egjgECx3I4rKTbHZZ4ux+9/eE5uC6 lsUBSHvOifxNY5882LFUKX4Fy3TxnGemooPNAYEowNjkyP/Lv1TD4LjQQ2G1TKmhicT4HO uNpZCNERqX9umOuZlbISBXA1/9nPKX4X6AgGYDDcsb0x94KVJrRPyUN0myTLmhDLE4dF/N jXf2qFqF8fJ9bdHoTIp6PHWV/UUiWQdw+7PQxRzLqKXC3gY09PcfKQZIIJDkEw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764031402; a=rsa-sha256; cv=none; b=eZvfAJjNa6e9qiFPTTAAIyGStidWqFY43jIBoK++GvQZEBFd+mT+lsU/sT1raloFFn2WLR PnCgplyZh71O+5fRp94JifV7OiCfV+4RZ+TnCOelxZibyozB7UWgBLPhQV+pe+bTPPjpju LuRn/fTn8yQjE11g87kw6UibkWC2BlSqU62lD9GH0bHLiSWYG6/DEO/OiSgFOax68IkLan xQsqLt4TrXybzfUU+utFG9gr1qR1xfaFVEMRx45Mw1OEGlZUYLk+HxvmJpOWRd6NsNSvEl K7wBSAXIwUZdYCzYQ+DZwTJbWIB6BD1frK994k8tE808qXY0OC6um69QH2M6kQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dFkSp600XzfHp for ; Tue, 25 Nov 2025 00:43:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2556a by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 25 Nov 2025 00:43:22 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Jose Luis Duran Subject: git: 646c0a2fe646 - stable/14 - nuageinit: Add guards against empty user data List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 646c0a2fe64651dc6315ff4b0ed6ba00924ca080 Auto-Submitted: auto-generated Date: Tue, 25 Nov 2025 00:43:22 +0000 Message-Id: <6924fbaa.2556a.5442e7b8@gitrepo.freebsd.org> The branch stable/14 has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=646c0a2fe64651dc6315ff4b0ed6ba00924ca080 commit 646c0a2fe64651dc6315ff4b0ed6ba00924ca080 Author: Jose Luis Duran AuthorDate: 2025-10-21 13:11:50 +0000 Commit: Jose Luis Duran CommitDate: 2025-11-25 00:42:36 +0000 nuageinit: Add guards against empty user data Add guards against attempting to process a user data file with an empty first line or contents. PR: 290395 Reviewed by: bapt (earlier), dtxdf, markj MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D53239 (cherry picked from commit 57d25b6333523491ac7a3e869bd5d16127203eed) --- libexec/nuageinit/nuageinit | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/libexec/nuageinit/nuageinit b/libexec/nuageinit/nuageinit index 148f5b3b30cd..0870d6570d0e 100755 --- a/libexec/nuageinit/nuageinit +++ b/libexec/nuageinit/nuageinit @@ -662,8 +662,16 @@ if not f then os.exit(0) end local line = f:read("*l") +if not line or #string.gsub(line, "^%s*(.-)%s*$", "%1") == 0 then + f:close() + os.exit(0) +end if citype ~= "postnet" then local content = f:read("*a") + if not content or #string.gsub(content, "^%s*(.-)%s*$", "%1") == 0 then + f:close() + os.exit(0) + end nuage.mkdir_p(root .. "/var/cache/nuageinit") local tof = assert(io.open(root .. "/var/cache/nuageinit/user_data", "w")) tof:write(line .. "\n" .. content) From nobody Tue Nov 25 03:08:06 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dFngp5Hyyz6HM32 for ; Tue, 25 Nov 2025 03:08:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dFngp4nwtz3RG2 for ; Tue, 25 Nov 2025 03:08:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764040086; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4XdLwulCDlyhGt9MeIx2xGYgSWD7zht5bDcDNQ6cUKE=; b=euuJKSQVPMdtTwwckxTtGvgxFo2XSNYwMOguA1gimfnsvXl7FnW8ENNa5g/QoE3i0d1d9M mCs6r9YVGKZDxI1fcnadksuW1aABX9D1dMLpHWAoahvqA5QpmWvLFs5y22lC6pV4iND+Qf vzwlLw0rLX4wT8KHTi/DQ5EeRiK8wS7Vsu0Quv88yO8rIa2spmIemjpLBGmuXX4O6E4ZA/ ADHE1TEEK4hEnQLT3weKhBqd2G/jVaxnYLcJpbZC4K0j210xZnfpghHwV2TLbjXKv4qZJd ZjP1OEta3hnw8gvU1SsX4fNWr1hyugqJ6A11ooFIceYKNruJkquTNIm+iUWJbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764040086; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4XdLwulCDlyhGt9MeIx2xGYgSWD7zht5bDcDNQ6cUKE=; b=hsB/bnSVeBhYpn6J/Gyf05OapMeFgGYYS9eU7kASL6Vxq8VfcIuteeMmOa6jEFwG33RLRY RMQUFbq8rgW1hlIpj3WFEoEI+IVMcZALfh6nE0GYxVf0zNp0r7Y79K39HrraS3BtKTHSqQ 2E1GsFlvpAhi8j78anr0i068Vyr/fpaOTibEaI6V7qRAHbs+LVhdJb7pgmWhO3h4oi+m3D /TbNW0JutgyWIjdQOozpjPjFMv7gnPiI+oXO+6pi4AxazYJ2J28IUfiv1bgOjeAnSkRi5A dp0cw6EDrDuulEYlOx1cPi2Z+l3AJRigaNoJbAeqJyZkWLL6BGSUj9UWztoRDg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764040086; a=rsa-sha256; cv=none; b=GAVt8OuxOrLu93/mcpyRs/8KTEi0RYYM1GaCACz0giWxldKgRUQSBbuX43f4fCv0VdJGre nhO4pnP/1Za/UCh2lUptc87tzNkfF/kEerP1yEmz5ckfjkMgPbh9h4S6tMYvIGB9YvgUqg WfyxDfqgYamtsBOI3u3gnzSr4uwNcnvgROB76TY2oGEv741sQiB+EqjNeU4dqmQlEWLqJA Vd5pwOGGu8g5TiIZiorYBSs5aIPeazQSGS4hm5XffbEISItiGg0nuCkvPlTteg7kDJxun0 CRZF1z6nbbqxJ6ORt+d/8g0C3G0YbrzvhfAi6BuOhty9Ataujgl8Wr5vu+Idkw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dFngp4L8YzjcY for ; Tue, 25 Nov 2025 03:08:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 31939 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 25 Nov 2025 03:08:06 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 05346243dfa4 - main - stand: Move from OZFS to ZFSTOP List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 05346243dfa4ed85c4c3a31f2a32a861fd649c07 Auto-Submitted: auto-generated Date: Tue, 25 Nov 2025 03:08:06 +0000 Message-Id: <69251d96.31939.23d143fd@gitrepo.freebsd.org> The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=05346243dfa4ed85c4c3a31f2a32a861fd649c07 commit 05346243dfa4ed85c4c3a31f2a32a861fd649c07 Author: Warner Losh AuthorDate: 2025-11-25 00:35:19 +0000 Commit: Warner Losh CommitDate: 2025-11-25 00:35:46 +0000 stand: Move from OZFS to ZFSTOP Use ZFSTOP instead of OZFS. They are the saame thing. Sponsored by: Netflix Reviewed by: tsoome Differential Revision: https://reviews.freebsd.org/D53900 --- stand/defs.mk | 5 ++--- stand/libsa/zfs/Makefile.inc | 16 ++++++++-------- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/stand/defs.mk b/stand/defs.mk index 54149f5f7b9e..f6c43ef7bd01 100644 --- a/stand/defs.mk +++ b/stand/defs.mk @@ -59,9 +59,8 @@ SASRC= ${BOOTSRC}/libsa SYSDIR= ${SRCTOP}/sys UBOOTSRC= ${BOOTSRC}/uboot ZFSSRC= ${SASRC}/zfs -OZFS= ${SRCTOP}/sys/contrib/openzfs -ZFSOSSRC= ${OZFS}/module/os/freebsd/ -ZFSOSINC= ${OZFS}/include/os/freebsd +ZFSOSSRC= ${ZFSTOP}/module/os/freebsd/ +ZFSOSINC= ${ZFSTOP}/include/os/freebsd LIBCSRC= ${SRCTOP}/lib/libc BOOTOBJ= ${OBJTOP}/stand diff --git a/stand/libsa/zfs/Makefile.inc b/stand/libsa/zfs/Makefile.inc index 2e9d5679f71f..5ecf68d3bc09 100644 --- a/stand/libsa/zfs/Makefile.inc +++ b/stand/libsa/zfs/Makefile.inc @@ -1,12 +1,12 @@ .PATH: ${ZFSSRC} .PATH: ${SYSDIR}/crypto/skein .PATH: ${ZFSOSSRC}/spl -.PATH: ${OZFS}/module/zstd -.PATH: ${OZFS}/module/zstd/lib/common -.PATH: ${OZFS}/module/zstd/lib/compress -.PATH: ${OZFS}/module/zstd/lib/decompress -.PATH: ${OZFS}/module/icp/asm-aarch64/blake3 -.PATH: ${OZFS}/module/icp/algs/blake3 +.PATH: ${ZFSTOP}/module/zstd +.PATH: ${ZFSTOP}/module/zstd/lib/common +.PATH: ${ZFSTOP}/module/zstd/lib/compress +.PATH: ${ZFSTOP}/module/zstd/lib/decompress +.PATH: ${ZFSTOP}/module/icp/asm-aarch64/blake3 +.PATH: ${ZFSTOP}/module/icp/algs/blake3 ZFS_SRC= zfs.c nvlist.c skein.c skein_block.c list.c ZFS_SRC+= zfs_zstd.c ZFS_SRC+= blake3.c blake3_generic.c blake3_impl.c @@ -41,7 +41,7 @@ ZFS_EARLY= -I${ZFSSRC}/spl \ # from FreeBSD. # .for i in ${ZFS_SRC} ${ZSTD_SRC} -CFLAGS.$i+= -include ${ZFSOSINC}/spl/sys/ccompile.h -Wformat -Wall -I${OZFS}/include \ +CFLAGS.$i+= -include ${ZFSOSINC}/spl/sys/ccompile.h -Wformat -Wall -I${ZFSTOP}/include \ -DNEED_SOLARIS_BOOLEAN .endfor @@ -76,7 +76,7 @@ CFLAGS.$i+= -U__BMI__ ${NO_WBITWISE_INSTEAD_OF_LOGICAL} CFLAGS.zfs_zstd.c+= -DIN_BASE -DIN_LIBSA -CFLAGS.blake3_impl.c+= -I${OZFS}/module/icp/algs/blake3 -I${OZFS}/module/icp/include -DIN_LIBSA +CFLAGS.blake3_impl.c+= -I${ZFSTOP}/module/icp/algs/blake3 -I${ZFSTOP}/module/icp/include -DIN_LIBSA # Do not unroll skein loops, reduce code size CFLAGS.skein_block.c+= -DSKEIN_LOOP=111 From nobody Tue Nov 25 03:08:07 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dFngr0hfcz6HLqF for ; Tue, 25 Nov 2025 03:08:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dFngq5Tlmz3RVj for ; Tue, 25 Nov 2025 03:08:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764040087; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DJLJdXsvUjNo1l1qhtlXaa7rSlY7cnrQtPpWhmng+Fk=; b=qfAiBo9inr93h0sibeQL96GMN/K80+0i2Jaw9Gc8dbzujAW33v8xK1qop+UZt5HZHQTqot 7+wUcG2pXUm6TsTTWiAjiQEtW/3Ogm02hTgD+nhd1s/1PbORUglTJ651NB0aXVPSxx5E/o uWOKzUrpDNYlBUMQHG/tdszQXrlxYdFl209PFKux6Sroe3lnJ/OtQuNep7lQfjEw3bX/As 6uecNZXtWItOnw90Xr23bf1q12pfmI72G49aMULgGOfQ/2dJmhugWva1czfDJMkFfQ/GBr B0CG+aWmrBZykvoLX7R8L7VxESl1guER0kFEBzkUO6OQ0T1mRidVka47QRupKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764040087; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DJLJdXsvUjNo1l1qhtlXaa7rSlY7cnrQtPpWhmng+Fk=; b=e2gUV6ThRza1ejk1KuM39GWYpcqYkYTrhLw8NJ4huHxLbiMu/sZM/Nfn6/cXP8kAG/6AbY g+2kIwPXs1mORWa2PzTuQaNvNnP5HhNhHWVU1kxHGO7Ik3YupdUTY3Cx8n4luI8hw4ntFO Ej58PHCPWloyE/wJqzTJKu07FH+6VPN9u9xuMw9OeyJjR2toA3ll3WyIlGxIP+HE/xHcu6 TGniDxj3EV+qs1vT7bW3Rf95CoKeN6c3SIdamtGHPJAlYDgqJLBVTbz1lFv3wwNzY6VZEU Bgqqpi80DVZfl3x8hzfbuZVTSnv/S/ukcpXTnQBCjHngTDddviAaBzH1+VGX/g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764040087; a=rsa-sha256; cv=none; b=mDD+2pjzC0i0WJRSLVu3nJAL2AQFuav716G1KrbMvKrAQJeGDbQIfnkS/oXD+AzRJpwYOO 4kaklRlNvX4Hb+X2NggDLnUEAgrMpn6qQgz9Q2rogQlgPV5fIcL+kFd2X4tlGy3shojptP wSoC2s8Gg4AJz9pEptqLebtVuDAUZLbotWn1V5n2aRlX0IWyT16eDcM+FJW6/qj1ZtWaAr gdAKKbmvnTBu6LwuFgo9xciH1WdanC3pwCyeS2Gt3ka9YD5LIPdRgFEkBcef2JYGKuXDZs vRwhzjxZXufiwCFPXceldNlf/cJDD35ytlBo0dZggFJB1iGewA4XnhQeUVuFrw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dFngq54ppzjhX for ; Tue, 25 Nov 2025 03:08:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 320b7 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 25 Nov 2025 03:08:07 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 3c857567c10f - main - stand: Rename ZFSSRC to SAZFSSRC to avoid confusion List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3c857567c10f9e30c86133729532188f5c3664f0 Auto-Submitted: auto-generated Date: Tue, 25 Nov 2025 03:08:07 +0000 Message-Id: <69251d97.320b7.379a7ea3@gitrepo.freebsd.org> The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=3c857567c10f9e30c86133729532188f5c3664f0 commit 3c857567c10f9e30c86133729532188f5c3664f0 Author: Warner Losh AuthorDate: 2025-11-25 00:35:30 +0000 Commit: Warner Losh CommitDate: 2025-11-25 00:50:26 +0000 stand: Rename ZFSSRC to SAZFSSRC to avoid confusion ZFSSRC is abiguous on its surface and too clos to ZFSTOP, so rename it to SAZFSSRC. Sponsored by: Netflix Reviewed by: tsoome Differential Revision: https://reviews.freebsd.org/D53901 --- stand/defs.mk | 2 +- stand/efi/boot1/Makefile | 2 +- stand/efi/libefi/Makefile | 2 +- stand/efi/loader/Makefile | 2 +- stand/i386/gptzfsboot/Makefile | 4 ++-- stand/kboot/kboot/Makefile | 2 +- stand/libsa/zfs/Makefile.inc | 4 ++-- stand/loader.mk | 2 +- 8 files changed, 10 insertions(+), 10 deletions(-) diff --git a/stand/defs.mk b/stand/defs.mk index f6c43ef7bd01..504493ebe648 100644 --- a/stand/defs.mk +++ b/stand/defs.mk @@ -56,9 +56,9 @@ LIBLUASRC= ${BOOTSRC}/liblua LIBOFWSRC= ${BOOTSRC}/libofw LUASRC= ${SRCTOP}/contrib/lua/src SASRC= ${BOOTSRC}/libsa +SAZFSSRC= ${SASRC}/zfs SYSDIR= ${SRCTOP}/sys UBOOTSRC= ${BOOTSRC}/uboot -ZFSSRC= ${SASRC}/zfs ZFSOSSRC= ${ZFSTOP}/module/os/freebsd/ ZFSOSINC= ${ZFSTOP}/include/os/freebsd LIBCSRC= ${SRCTOP}/lib/libc diff --git a/stand/efi/boot1/Makefile b/stand/efi/boot1/Makefile index c9f04546b56b..17fa849beb0b 100644 --- a/stand/efi/boot1/Makefile +++ b/stand/efi/boot1/Makefile @@ -32,7 +32,7 @@ CWARNFLAGS.zfs_module.c += -Wno-unused-function SRCS+= boot1.c proto.c self_reloc.c start.S ufs_module.c .if ${MK_LOADER_ZFS} != "no" SRCS+= zfs_module.c -CFLAGS.zfs_module.c+= -I${ZFSSRC} +CFLAGS.zfs_module.c+= -I${SAZFSSRC} CFLAGS.zfs_module.c+= -I${SYSDIR}/cddl/boot/zfs CFLAGS.zfs_module.c+= -I${SYSDIR}/crypto/skein CFLAGS.zfs_module.c+= -I${SYSDIR}/contrib/openzfs/include diff --git a/stand/efi/libefi/Makefile b/stand/efi/libefi/Makefile index aaf9ef666fde..4f4586fbf253 100644 --- a/stand/efi/libefi/Makefile +++ b/stand/efi/libefi/Makefile @@ -53,7 +53,7 @@ CFLAGS.efi_console.c+= -I${SRCTOP}/sys/teken -I${SRCTOP}/contrib/pnglite CFLAGS.efi_console.c+= -I${.CURDIR}/../loader CFLAGS.teken.c+= -I${SRCTOP}/sys/teken .if ${MK_LOADER_ZFS} != "no" -CFLAGS+= -I${ZFSSRC} +CFLAGS+= -I${SAZFSSRC} CFLAGS+= -I${SYSDIR}/cddl/boot/zfs CFLAGS+= -I${SYSDIR}/cddl/contrib/opensolaris/uts/common CFLAGS+= -DEFI_ZFS_BOOT diff --git a/stand/efi/loader/Makefile b/stand/efi/loader/Makefile index 8000e2f6df7d..addb7652249d 100644 --- a/stand/efi/loader/Makefile +++ b/stand/efi/loader/Makefile @@ -36,7 +36,7 @@ CFLAGS+= -I${EFISRC}/acpica/include CFLAGS+= -I${.CURDIR}/../loader .if ${MK_LOADER_ZFS} != "no" -CFLAGS+= -I${ZFSSRC} +CFLAGS+= -I${SAZFSSRC} CFLAGS+= -I${SYSDIR}/contrib/openzfs/include CFLAGS+= -I${SYSDIR}/contrib/openzfs/include/os/freebsd/zfs CFLAGS+= -DEFI_ZFS_BOOT diff --git a/stand/i386/gptzfsboot/Makefile b/stand/i386/gptzfsboot/Makefile index ebdd4958c5f2..2b3b5422031b 100644 --- a/stand/i386/gptzfsboot/Makefile +++ b/stand/i386/gptzfsboot/Makefile @@ -27,7 +27,7 @@ CFLAGS+=-DBOOTPROG=\"gptzfsboot\" \ -I${LDRSRC} \ -I${BOOTSRC}/i386/common \ -I${BOOTSRC}/i386/libi386 \ - -I${ZFSSRC} \ + -I${SAZFSSRC} \ -I${SYSDIR}/crypto/skein \ -I${SYSDIR}/cddl/boot/zfs \ -I${SYSDIR}/contrib/openzfs/include \ @@ -77,6 +77,6 @@ gptzfsboot.bin: gptzfsboot.out gptzfsboot.out: ${BTXCRT} ${OBJS} ${LD} ${LD_FLAGS} --defsym ORG=${ORG2} -T ${LDSCRIPT} -o ${.TARGET} ${.ALLSRC} ${LIBI386} ${LIBSA32} -zfsboot.o: ${ZFSSRC}/zfsimpl.c +zfsboot.o: ${SAZFSSRC}/zfsimpl.c .include diff --git a/stand/kboot/kboot/Makefile b/stand/kboot/kboot/Makefile index 19bae09df5ea..68bb67096851 100644 --- a/stand/kboot/kboot/Makefile +++ b/stand/kboot/kboot/Makefile @@ -32,7 +32,7 @@ SRCS+= kbootfdt.c .endif .if ${MK_LOADER_ZFS} != "no" -CFLAGS+= -I${ZFSSRC} +CFLAGS+= -I${SAZFSSRC} CFLAGS+= -I${SYSDIR}/contrib/openzfs/include CFLAGS+= -I${SYSDIR}/contrib/openzfs/include/os/freebsd/zfs HAVE_ZFS=yes diff --git a/stand/libsa/zfs/Makefile.inc b/stand/libsa/zfs/Makefile.inc index 5ecf68d3bc09..c747078a115b 100644 --- a/stand/libsa/zfs/Makefile.inc +++ b/stand/libsa/zfs/Makefile.inc @@ -1,4 +1,4 @@ -.PATH: ${ZFSSRC} +.PATH: ${SAZFSSRC} .PATH: ${SYSDIR}/crypto/skein .PATH: ${ZFSOSSRC}/spl .PATH: ${ZFSTOP}/module/zstd @@ -30,7 +30,7 @@ SRCS+= ${ZFS_SRC} ${ZSTD_SRC} ${ZFS_SRC_AS} # tweak something defined in that file. # -ZFS_EARLY= -I${ZFSSRC}/spl \ +ZFS_EARLY= -I${SAZFSSRC}/spl \ -I${ZFSOSINC} \ -I${ZFSOSINC}/spl \ -I${ZFSOSINC}/zfs diff --git a/stand/loader.mk b/stand/loader.mk index e26ba1401912..496252e7a534 100644 --- a/stand/loader.mk +++ b/stand/loader.mk @@ -152,7 +152,7 @@ CFLAGS+= -DLOADER_MBR_SUPPORT .if ${HAVE_ZFS:Uno} == "yes" CFLAGS+= -DLOADER_ZFS_SUPPORT -CFLAGS+= -I${ZFSSRC} +CFLAGS+= -I${SAZFSSRC} CFLAGS+= -I${SYSDIR}/cddl/boot/zfs CFLAGS+= -I${SYSDIR}/cddl/contrib/opensolaris/uts/common SRCS+= zfs_cmd.c From nobody Tue Nov 25 03:19:25 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dFnwt1ZKwz6HMfr for ; Tue, 25 Nov 2025 03:19:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dFnws5hNwz3TsS for ; Tue, 25 Nov 2025 03:19:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764040765; 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=hp1I8fEhvhluYNY0o2MEYVSx3x2D6lZkDHDubqCyMdo=; b=Ig18p6oB3xUZgdTU8Ww1N4rwaLzF6wd++UpkH+Sp1u4x3+G7GoDfVK6LcRCrKxJV8Ck3hm ioTx/t5hSr7LsglreDpa13IH23JuXmYVl2nW1ErQlIXe6m4q5KcG58AxRYcUOvJdY0VoNW seGFQsxToQbslgAmGqmGBBe0LgMeSQG+s/GFE52urUUQjqcfb5zwbLroTmw1ID0njXtVgq IM+bYXYuMd89n+RuTyLyPyj84S6HHaO9nVGOkwm+GQByevuc1k3PUfmhsOzYFGmnUwZ9rH KKI7lnbiHlBxduDXtodeAnbht8MEq+v3iL0k9okeIZ7RYRknVf1F3qWyMXPJZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764040765; 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=hp1I8fEhvhluYNY0o2MEYVSx3x2D6lZkDHDubqCyMdo=; b=qNzfUgSITAS0Hqt5yREbeV/Sn2Qha8/5t2xM7Q5nh/8PirlneDdI8/rHvj+sJDMuDu0nLA 7/yuUA8o3F4Ts+pJ1SrIdqRwt3vM0Jg/h1Yj3eVQYd9++iTtbFvkUFrnLLNzby9kpQuQ1w uFCdPhkcF05wbrIyRryRjfZe/FbZ0foOlOg+V6oQXEtxDHem/dpjfn/e7Z//EHPgw9b+Gb dTAkYNtMumPNeEyC+UlZBqbKPEccikkiAuHxakEXOsB4+IRNaf82MbLXjXnOsfIdmdLt0u FwUexI/4Cv4m/1BLghajvzDtQ40TEvCD1J5fxAjAyDLBsz9L1gwYWA5WJFe3WQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764040765; a=rsa-sha256; cv=none; b=g0ILeqb9TvkUf4VTKTp2KZnd5mkNRqtadb06B2rg4XQep1WWOHmiVhmjlNpFSaZopQzVNq GWh9xh26yz/PtYVx+3Fn2xK/cE/7jFer3JZ0O+fwlfMjSZvxyFkUumdW16yi5Bswe8aCqr YwD0nY6W/D8Sb10zpGwgh/F8ce+1ReMnMuu0HMBYZzRRawhzO4/ie72GDJONI2CNAeBFqW yU2ROU+S5+xfz4tmg2/kM5orIs2akySz+k3R6Wl8vw4umnNJQ6Rl76vlssB+EXV+ZeoQrQ sENeQY4ph8aP3Im+s7KDA2Ipbn++SG1ynccVCvnHVABy1oi4r2jGRT649lvdDQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dFnws54jQzjyJ for ; Tue, 25 Nov 2025 03:19:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 329c8 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 25 Nov 2025 03:19:25 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Bryan Drewery From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: 43b1b7cbb69b - stable/15 - sh tests: Fix racy test11.0 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 43b1b7cbb69b64a0afabcfa1541cc2403e4b952f Auto-Submitted: auto-generated Date: Tue, 25 Nov 2025 03:19:25 +0000 Message-Id: <6925203d.329c8.6d6db14@gitrepo.freebsd.org> The branch stable/15 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=43b1b7cbb69b64a0afabcfa1541cc2403e4b952f commit 43b1b7cbb69b64a0afabcfa1541cc2403e4b952f Author: Bryan Drewery AuthorDate: 2025-11-07 17:28:37 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-11-25 03:18:23 +0000 sh tests: Fix racy test11.0 This was sometimes exiting while the child fifo was created resulting in [ENOTEMPTY] from rm. The child fifo isn't needed, just sleep. PR: 290837 Fixes: e31fb97148f ("read builtin: Empty variables on timeout") MFC after: 3 days (cherry picked from commit 5d55553e160a93788372785300f5bd07c2451f93) --- bin/sh/tests/builtins/read11.0 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/sh/tests/builtins/read11.0 b/bin/sh/tests/builtins/read11.0 index c75ed9c92a83..5bae80318b15 100644 --- a/bin/sh/tests/builtins/read11.0 +++ b/bin/sh/tests/builtins/read11.0 @@ -5,8 +5,8 @@ T=$(mktemp -d ${TMPDIR:-/tmp}/sh-test.XXXXXX) trap 'rm -rf "$T"' 0 cd $T mkfifo fifo1 -# Open fifo1 for writing and then read block on a dummy fifo -{ mkfifo fifo2; read dummy fifo1 & +# Open fifo1 for writing +{ sleep 10; } >fifo1 & # Wait for the child to open fifo1 for writing exec 3; Tue, 25 Nov 2025 03:19:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dFnwt6g3Nz3Tnd for ; Tue, 25 Nov 2025 03:19:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764040767; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5eraX2N5PUNj928e/TZ3C+PRP6R0ogc3ee7ECi9RVvA=; b=OO3MZjxTiFtoX2O5+cToSE6/Q0fz8Ms4MICHnZqNiINm/CxXvWbJFWE9ZgUdqVkJozsWIe m0YjVbG+oeLwxjWiCNPPihmNfvoaisXTIGjWCSXby4TqgGkjwCHj37NnLG5Elz2GFFbvqq /yUcV5Vv0giO4hmDXSG9lyLt1TD6XPudYfrxFSjS4+HZHTlzA9HRiMfH7+sQsVnqgejvYq 9RVZKsHDURr0weDmZdMk8FBae4aFmR3bqCWIyaKuQBo3svvhrAnUkg7vq8mBQT+b5kdwbt eNJ9Gz9VV3aB+6q+zMLwJr3IoYJEm3BS1xTHnGwIxG/52webve1ZL8JOZAHfkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764040767; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5eraX2N5PUNj928e/TZ3C+PRP6R0ogc3ee7ECi9RVvA=; b=w1Mmg9PghbweoQi19CzabyG7nAuxsHYTTW/fDJC1CMkDt0odjTGNE3NSL1GkTjzB6Ie4l4 F7vxwZmz848vDR4hmiF4jjRsLDknQWUgqaPcaH96HD79OrW2kFqpLH6jTi1IH7lazl9som DfvFXV2IBlCoVGXoifuJ6TdZV74PGtNusD/Sf9EJbpxFtITnflMh7mWzJkbIG6+LdYchV6 T0p0gl8bEVvBWCsje3UEzmzWmr+ZNyTShkKmzoxVxNUSKl/a9sxs1Y37AJf+TSJ9P7uimz l/MgDvAJh9h7IF59pRDXd2HaVgNaBZ6yns+I8/4/EZMFwDLY+fZVMmEtfOKT6Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764040767; a=rsa-sha256; cv=none; b=QefNf25xkkjTesxdf3rvDR+y1e05eTjtaL8AsVSJgiQ06mpgfBdWu5ccX1kMiQo0/mdSe/ g+OALzMOzvygeWNEAHqgCu1z93mkG0Vki2ovwIBsLNq9tgTVLUyow/zngfQaS4UTAK2AWU ZKMSOE+IJRjVe+j6IpM098vw481eF42gVEYHldxq4ZrHd/eVlR8hf9h4Qs4/BjXh1bqtEJ 6RkkdzQPeMjfwyV2pgxC5oTSW9nIbiM+x2cmYd1+C8DjnCxaKgaLS0H0QSPnZMHhBo5Zkk SbY9i5lfxIcLb/Vqt6GxTzPvAiwXbq0ALhaSVkuaXGeOztUUrbxCtX8oEvBE5A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dFnwt5vwhzkQR for ; Tue, 25 Nov 2025 03:19:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 33dbe by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 25 Nov 2025 03:19:26 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: fb57eac42c15 - stable/15 - sh: Don't assume EINTR means SIGALRM List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: fb57eac42c1598119aa8614f3886dca0379ae816 Auto-Submitted: auto-generated Date: Tue, 25 Nov 2025 03:19:26 +0000 Message-Id: <6925203e.33dbe.3a581c57@gitrepo.freebsd.org> The branch stable/15 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=fb57eac42c1598119aa8614f3886dca0379ae816 commit fb57eac42c1598119aa8614f3886dca0379ae816 Author: Dag-Erling Smørgrav AuthorDate: 2025-11-19 10:43:13 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-11-25 03:18:24 +0000 sh: Don't assume EINTR means SIGALRM While waiting for input in the read builtin, if select() is interrupted but there is no pending signal, we act like we timed out, and return the same status as if we had been interrupted by SIGALRM, instead of looping until we actually do time out. * Replace the single select() call with a ppoll() loop. * Improve validation of the timeout value. We now accept things like "1h30m15s", which we used to silently truncate to "1h". The flip side is that we no longer accept things like "1hour" or "5sec". * Modify the existing `read -t 0` test case to verify that read returns immediately when there is input and fails immediately when there isn't. * Add a second test case which performs the same tests with a non-zero timeout value. PR: 290844 MFC after: 1 week Fixes: c4539460e3a4 ("sh: Improve error handling in read builtin:") Reviewed by: jilles, bdrewery Differential Revision: https://reviews.freebsd.org/D53761 (cherry picked from commit 3c2643a7dbac370b7232f4e5ac15fd77b9ff396d) --- bin/sh/miscbltin.c | 83 +++++++++++++++++++++++++++++------------- bin/sh/sh.1 | 6 ++- bin/sh/tests/builtins/Makefile | 1 + bin/sh/tests/builtins/read11.0 | 19 +++++++++- bin/sh/tests/builtins/read12.0 | 32 ++++++++++++++++ 5 files changed, 112 insertions(+), 29 deletions(-) diff --git a/bin/sh/miscbltin.c b/bin/sh/miscbltin.c index 9d0280bb548a..bbf0aa5b8bde 100644 --- a/bin/sh/miscbltin.c +++ b/bin/sh/miscbltin.c @@ -40,11 +40,14 @@ #include #include #include -#include + #include +#include +#include #include #include #include +#include #include "shell.h" #include "options.h" @@ -162,17 +165,18 @@ readcmd(int argc __unused, char **argv __unused) int is_ifs; int saveall = 0; ptrdiff_t lastnonifs, lastnonifsws; - struct timeval tv; - char *tvptr; - fd_set ifds; + sigset_t set, oset; + intmax_t number, timeout; + struct timespec tnow, tend, tresid; + struct pollfd pfd; + char *endptr; ssize_t nread; int sig; struct fdctx fdctx; rflag = 0; prompt = NULL; - tv.tv_sec = -1; - tv.tv_usec = 0; + timeout = -1; while ((i = nextopt("erp:t:")) != '\0') { switch(i) { case 'p': @@ -184,22 +188,29 @@ readcmd(int argc __unused, char **argv __unused) rflag = 1; break; case 't': - tv.tv_sec = strtol(shoptarg, &tvptr, 0); - if (tvptr == shoptarg) - error("timeout value"); - switch(*tvptr) { - case 0: - case 's': - break; - case 'h': - tv.tv_sec *= 60; - /* FALLTHROUGH */ - case 'm': - tv.tv_sec *= 60; - break; - default: - error("timeout unit"); - } + timeout = 0; + do { + number = strtol(shoptarg, &endptr, 0); + if (number < 0 || endptr == shoptarg) + error("timeout value"); + switch (*endptr) { + case 's': + endptr++; + break; + case 'h': + number *= 60; + /* FALLTHROUGH */ + case 'm': + number *= 60; + endptr++; + break; + } + if (*endptr != '\0' && + !(*endptr >= '0' && *endptr <= '9')) + error("timeout unit"); + timeout += number; + shoptarg = endptr; + } while (*shoptarg != '\0'); break; } } @@ -212,13 +223,33 @@ readcmd(int argc __unused, char **argv __unused) if ((ifs = bltinlookup("IFS", 1)) == NULL) ifs = " \t\n"; - if (tv.tv_sec >= 0) { + if (timeout >= 0) { /* * Wait for something to become available. */ - FD_ZERO(&ifds); - FD_SET(0, &ifds); - status = select(1, &ifds, NULL, NULL, &tv); + pfd.fd = STDIN_FILENO; + pfd.events = POLLIN; + status = sig = 0; + sigfillset(&set); + sigprocmask(SIG_SETMASK, &set, &oset); + if (pendingsig) { + /* caught a signal already */ + status = -1; + } else if (timeout == 0) { + status = poll(&pfd, 1, 0); + } else { + clock_gettime(CLOCK_UPTIME, &tnow); + tend = tnow; + tend.tv_sec += timeout; + do { + timespecsub(&tend, &tnow, &tresid); + status = ppoll(&pfd, 1, &tresid, &oset); + if (status >= 0 || pendingsig != 0) + break; + clock_gettime(CLOCK_UPTIME, &tnow); + } while (timespeccmp(&tnow, &tend, <)); + } + sigprocmask(SIG_SETMASK, &oset, NULL); /* * If there's nothing ready, return an error. */ diff --git a/bin/sh/sh.1 b/bin/sh/sh.1 index 7ef22fa352bb..affb653cd3ae 100644 --- a/bin/sh/sh.1 +++ b/bin/sh/sh.1 @@ -31,7 +31,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd May 1, 2025 +.Dd November 17, 2025 .Dt SH 1 .Os .Sh NAME @@ -2544,6 +2544,10 @@ to explicitly specify seconds, minutes or hours. If none is supplied, .Ql s is assumed. +Multiple value-unit groups may be stringed together, in which case +they are added up, e.g.\& +.Ql 1h30m15s +which adds up to 5,415 seconds. .Pp The .Fl e diff --git a/bin/sh/tests/builtins/Makefile b/bin/sh/tests/builtins/Makefile index 7fdecb23c817..b3e353024969 100644 --- a/bin/sh/tests/builtins/Makefile +++ b/bin/sh/tests/builtins/Makefile @@ -143,6 +143,7 @@ ${PACKAGE}FILES+= read8.0 ${PACKAGE}FILES+= read9.0 ${PACKAGE}FILES+= read10.0 ${PACKAGE}FILES+= read11.0 +${PACKAGE}FILES+= read12.0 ${PACKAGE}FILES+= return1.0 ${PACKAGE}FILES+= return2.1 ${PACKAGE}FILES+= return3.1 diff --git a/bin/sh/tests/builtins/read11.0 b/bin/sh/tests/builtins/read11.0 index 5bae80318b15..07bd3e70644c 100644 --- a/bin/sh/tests/builtins/read11.0 +++ b/bin/sh/tests/builtins/read11.0 @@ -1,3 +1,5 @@ +# Verify that `read -t 0 v` succeeds immediately if input is available +# and fails immediately if not set -e @@ -6,12 +8,25 @@ trap 'rm -rf "$T"' 0 cd $T mkfifo fifo1 # Open fifo1 for writing -{ sleep 10; } >fifo1 & +{ echo new_value; sleep 10; } >fifo1 & # Wait for the child to open fifo1 for writing exec 3fifo1 & +# Wait for the child to open fifo1 for writing +exec 3; Tue, 25 Nov 2025 03:19:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dFnwv72zvz3Tng for ; Tue, 25 Nov 2025 03:19:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764040768; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2bU3eho0PiFpaFF9g7m5446YujN49RkgKi/XURMrGOI=; b=f87PY0vjqdYkB9LLOZCdUOnyP1tlnytvMPWH1WJpPLVNi7ksvbFV9ruxTIAYA2JlybW6WN RjsORZSsUmH6qHB7N/OKxU320cQRCxiorr/JoQ/ZlCvs69UhpB+eeCy/2UZDKmkUx7aAVC ZVI7+6dl/P32H6U5ZsTmTFhCr4Fy5NUASxHXrfYdbtJ5L5ffRen75hsN3znvbnvZl6BqY5 sz6wG3x3HmU8cGGv5xz3mxH0ADe3jQP0nzjrjhwDcgSYRGYcJrTMCbNMeH9l2qLJ2lKOP0 w4RzrOiGBoytWFdQaBwOBC3DHI2siTzwfm1VH8IIr+jHEt315jD8gdSdkEfiAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764040768; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2bU3eho0PiFpaFF9g7m5446YujN49RkgKi/XURMrGOI=; b=oDSqmcRJcEMqI93OzOp2HPFAMD5XdWOzE0U11MTqfzOvSIJCPemLppVzyPO9AVQZwYOvjg pqCORXtB+2y5nLXTUpXPotho6I6Eh4X7OTaNNaS+vr+4NANFE6lrSbWyssa65/jewkUcS/ K58N6zVQ1w9namLewTgGlXYiwOMTQ7nQNLOV0fh/usegaW7gbIsZPqCZ/QF/dbH4QZdzih w1pizNTasl86P1TE1FUWrZ2BP6XE7Td1scLhgt3kpeULMqfkJuEH9pR+5qpxsRWarVGYVx W1yscrkkSPsdVAQh/uMov+VvJLQuZ+OB7ki44ChIiIG9Hd4DS5txlKDn400vMg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764040768; a=rsa-sha256; cv=none; b=Kh6UG+TjOGcNQWhmYYNIa06zjsTedrr1VI9kbS8TDicwJHHVQmDAUe099akvtlxpQo95TU 3aWkkY6s29u0vUy2BhNEVf9zdp8KGVtcEf4pCz7lKLQKER90CbQ5jqv6O/J8/IXq/6eBus 5HiGQmpGlScjnCPb5KP13RVuMJhFm3okMJPu2vItoKuvYf2/JOe1V5YqFZMTHNR+a6Zfz9 hYoHCAfTThDI4VjOsPo67sEmCtGsXykELGsn3ik+P/JRARH2f2cztkgSEE+oKfAxt2iQC+ 60nA7yi22Y29svBBAzhyRXTzf0Mo3NmvbusBXBCqpI29pUzBGGqQBydAnJdIWQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dFnwv6c1CzkDf for ; Tue, 25 Nov 2025 03:19:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 330d2 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 25 Nov 2025 03:19:27 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: 4004f9a70c10 - stable/15 - openssh: Don't attempt to connect to unsupported addresses List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 4004f9a70c10b2e6b8e71595f731605484308e5c Auto-Submitted: auto-generated Date: Tue, 25 Nov 2025 03:19:27 +0000 Message-Id: <6925203f.330d2.539256d0@gitrepo.freebsd.org> The branch stable/15 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=4004f9a70c10b2e6b8e71595f731605484308e5c commit 4004f9a70c10b2e6b8e71595f731605484308e5c Author: Dag-Erling Smørgrav AuthorDate: 2025-11-21 06:28:13 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-11-25 03:18:24 +0000 openssh: Don't attempt to connect to unsupported addresses When iterating over known addresses for the requested target host name, skip those that are not supported by the running kernel. MFC after: 1 week PR: 195231 Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D53588 (cherry picked from commit 5818b6ee552b302f5300934f9b8cb94881867a5f) --- crypto/openssh/FREEBSD-upgrade | 7 +++++++ crypto/openssh/sshconnect.c | 9 +++++++++ 2 files changed, 16 insertions(+) diff --git a/crypto/openssh/FREEBSD-upgrade b/crypto/openssh/FREEBSD-upgrade index 98503de12ddb..815c11a8f8ca 100644 --- a/crypto/openssh/FREEBSD-upgrade +++ b/crypto/openssh/FREEBSD-upgrade @@ -181,6 +181,13 @@ skip setting DISABLE_LASTLOG which we've applied for FreeBSD, but the autoconf machinery really ought to be reworked. Reported upstream at https://lists.mindrot.org/pipermail/openssh-unix-dev/2022-May/040242.html + +11) Protocol selection + + We use the non-portable feature_present(3) API to determine which + internet protocols are supported by the kernel before trying to + connect to the target host. This avoids confusing the user with + spurious error messages. This port was brought to you by (in no particular order) DARPA, NAI diff --git a/crypto/openssh/sshconnect.c b/crypto/openssh/sshconnect.c index c86182d13673..24da9aed0007 100644 --- a/crypto/openssh/sshconnect.c +++ b/crypto/openssh/sshconnect.c @@ -458,6 +458,8 @@ ssh_connect_direct(struct ssh *ssh, const char *host, struct addrinfo *aitop, memset(ntop, 0, sizeof(ntop)); memset(strport, 0, sizeof(strport)); + int inet_supported = feature_present("inet"); + int inet6_supported = feature_present("inet6"); for (attempt = 0; attempt < connection_attempts; attempt++) { if (attempt > 0) { /* Sleep a moment before retrying. */ @@ -482,6 +484,13 @@ ssh_connect_direct(struct ssh *ssh, const char *host, struct addrinfo *aitop, errno = oerrno; continue; } + if ((ai->ai_family == AF_INET && !inet_supported) || + (ai->ai_family == AF_INET6 && !inet6_supported)) { + debug2_f("skipping address [%s]:%s: " + "unsupported address family", ntop, strport); + errno = EAFNOSUPPORT; + continue; + } if (options.address_family != AF_UNSPEC && ai->ai_family != options.address_family) { debug2_f("skipping address [%s]:%s: " From nobody Tue Nov 25 03:19:29 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dFnwy0VLgz6HMhs for ; Tue, 25 Nov 2025 03:19:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dFnwx6979z3Tqb for ; Tue, 25 Nov 2025 03:19:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764040769; 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=e/AwOIaOOBFpY6b61fXPUxiwkj62KSjNT/Dr9RdIrqU=; b=gwj5JB/0t+BkCO7POZoe7s/H+8Xc6Cb5PZxjNKJLfe7BeRKz9ox1LgR5bEueUd1IJsfakX ZgjvP88hyvPf58dlHW1s6nSeGKViU1GY1R4ELvvyMNW66ZmEMNs6f0y19xoZm0Ylih/O1p D9z2lZNpOhBOk5J6jFKpM1eGnBCKGhCiwogyF0vASQ7eXBsQQYv6qfxWlgnbpQ0wiehlYd ue03sFr/Gz3ueKf8+4n3yVExiBI2DnlTmvmN0U6exDDi5DSERRZAbYRUnLFYS6dTGFOp+F P1/Qhfi5kG1sh2OWK6mSrsrQ6hpzjo0zVuoYPfTXYVDAX8NdBzfqRO3EqMXzUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764040769; 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=e/AwOIaOOBFpY6b61fXPUxiwkj62KSjNT/Dr9RdIrqU=; b=kG5V0pGgNemvePFWk4BrB68J7jXVr734rA7tV3omCKatNJZPa6NPePReWgY6RgQOUFgLZ4 r++50iVoi/yktk6lHuyjlkFeaJuMhYCihYTjtrfR3EqQC9xgwGRfemBbirdxS1xfau96Vi DoEOpRqOhB+EBnr6BU20UgsgEX6jrbQ341RStVwYfTZ6xjrixlrROyEPU0OvO/qbCA7hl1 gguXG3zHXjWdCS5CwE1jk98axgu2Dy+MD39p4CTjMvaQstoOBAvyvZJKky7mgJstTQ0pYr XV+OnEL4kxUwiOAsWUM5XbArGivIDJKHXeEdcAcgvVmoCbjzRfFmyFmkhJfvmQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764040769; a=rsa-sha256; cv=none; b=kcsq7GQyghoCpt0UbcR5odxxx0UhwxiTnpYf+ChRiACZ0mOPss8rFKVMPptgXcgXd69LBP 9w2+3DTB9XpGR8ySOQkobV4HR3kWlrS3PSexS6XrnEjgw+XuvUdc6fcioZqJpmZ4hBAE1+ KPAxoUyi27fTpdZNFfqCx/85ivcFNYLCT2kUCdp+cQ6H4AuPRmFkNsu5sGZESExz8CwZQA 8bqbQIHYIjzwvFC+hwEIctqOH1Qov37vW/J1N8pnY/N9yEnoV3mIYOm6PyB2fr8tkXj3wP 5gwaX3GQ6J2VuHj0FaM5/Fn08GdbRcZcFSSaEGUYgUMwIMVm3k1tIXHOotxsuw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dFnwx4dSpzjDk for ; Tue, 25 Nov 2025 03:19:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 33054 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 25 Nov 2025 03:19:29 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Bryan Drewery From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: e9019e777ca3 - stable/14 - sh tests: Fix racy test11.0 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: e9019e777ca3bbb3217df7b54590dcb075430f4e Auto-Submitted: auto-generated Date: Tue, 25 Nov 2025 03:19:29 +0000 Message-Id: <69252041.33054.574763e9@gitrepo.freebsd.org> The branch stable/14 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=e9019e777ca3bbb3217df7b54590dcb075430f4e commit e9019e777ca3bbb3217df7b54590dcb075430f4e Author: Bryan Drewery AuthorDate: 2025-11-07 17:28:37 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-11-25 03:19:16 +0000 sh tests: Fix racy test11.0 This was sometimes exiting while the child fifo was created resulting in [ENOTEMPTY] from rm. The child fifo isn't needed, just sleep. PR: 290837 Fixes: e31fb97148f ("read builtin: Empty variables on timeout") MFC after: 3 days (cherry picked from commit 5d55553e160a93788372785300f5bd07c2451f93) --- bin/sh/tests/builtins/read11.0 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/sh/tests/builtins/read11.0 b/bin/sh/tests/builtins/read11.0 index c75ed9c92a83..5bae80318b15 100644 --- a/bin/sh/tests/builtins/read11.0 +++ b/bin/sh/tests/builtins/read11.0 @@ -5,8 +5,8 @@ T=$(mktemp -d ${TMPDIR:-/tmp}/sh-test.XXXXXX) trap 'rm -rf "$T"' 0 cd $T mkfifo fifo1 -# Open fifo1 for writing and then read block on a dummy fifo -{ mkfifo fifo2; read dummy fifo1 & +# Open fifo1 for writing +{ sleep 10; } >fifo1 & # Wait for the child to open fifo1 for writing exec 3; Tue, 25 Nov 2025 03:19:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dFnwy5dHWz3TlH for ; Tue, 25 Nov 2025 03:19:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764040770; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YVk/QmlSmymK88ji+syBQEKlLiLKuqcK4m208Ezcryk=; b=XlFUT5dA47mNrqzX6WBCRayUmUwnhXcUBWJiaVRH9q/ziDa+N3lk8c0Dod5MOVGECG2hcX p1WHpYxrByTMAUGwD6/0o4SAajTmYZB6yPP67hGT7syqMFlVuwBbNwXJAk5WnzzjyXgwXS Bxo8FOc2CSyAMKhSF/XNTnjaqYNNZb9O/g22BiHjFmpaqmaO1Af1N57o6AdI8ye3tycJUU e3uVBw+l9awo6/TogBjQkcNkvW59rJH+bSf5tDmyf77sBZakewiKUUWrKGEVKC6Th6Xyn/ jmg2I0pjEM6AcJUvsMSIfEEtbZn0R5mqStPG6Mz3LI+4S9YQ6R3uCebIQ+luWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764040770; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YVk/QmlSmymK88ji+syBQEKlLiLKuqcK4m208Ezcryk=; b=Gd9ixAbEZ5wOILMnMrVlkx1fGDUatk/3SSsRYvINb+/PwaSj3o5EAmi0qXRJs7TuJeRWOa vIDFlOTtahrM9EfBztTG3BX0AK1zKoZF1Q7fyHUtFHDZ5GOfHcLYetWNQmTQjGz3xK+lRS fKQhEwetmI5G6abY83l6jBG2WNSolx5LPlesCs165J6cfWkDcZHR5ywg49HnZjAJsH20aA EmhLElVeJEFk1iePsJiapZ2U/SSxILLsdbrf7GsRZua3BBe9O0EzPcxQHw59I0t+Q2vKwL NOw4tua5nFMDTt3+JJK2mutRA2sz5ZBjbIjpVhLH2Ht7D5LyeMRqHJBzW1F2ig== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764040770; a=rsa-sha256; cv=none; b=ZHmibW/dvnYBkTD048DZcQ9Gcd7GRoBMsqbTMB2+g93CiCT3b/kLdxpVXE2bwo6TFuwhRp uwkWVm6h0G36jmsNSzdzX3LpR/9soFTQVzPewmbCeMAvxgA93c0WhRiZaqJZwsy+mX6cbQ XmzzBESdMUE3imfDN4JX54OBhEy2PDFaoMiZ3UEBAQBl6MS7FDHB8rwKOFkywgQW/MDjFT 9hjAHPfR31qmDh8KweDuzetV0UuEZdp5S5z9zj1Yfd4svqfndFr5OlhXGgLjjQwgLJduaM 8KfVCSpzqgAa//j5Hm+RNW+aDE8Ha75FDjXx/MgGXc+/WSmDvGPT9hrRPBOkPQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dFnwy53rszjDl for ; Tue, 25 Nov 2025 03:19:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 33b44 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 25 Nov 2025 03:19:30 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: 7f691e07efe6 - stable/14 - sh: Don't assume EINTR means SIGALRM List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 7f691e07efe63ea01273833e44fd03ee00106b2b Auto-Submitted: auto-generated Date: Tue, 25 Nov 2025 03:19:30 +0000 Message-Id: <69252042.33b44.5f3748f@gitrepo.freebsd.org> The branch stable/14 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=7f691e07efe63ea01273833e44fd03ee00106b2b commit 7f691e07efe63ea01273833e44fd03ee00106b2b Author: Dag-Erling Smørgrav AuthorDate: 2025-11-19 10:43:13 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-11-25 03:19:16 +0000 sh: Don't assume EINTR means SIGALRM While waiting for input in the read builtin, if select() is interrupted but there is no pending signal, we act like we timed out, and return the same status as if we had been interrupted by SIGALRM, instead of looping until we actually do time out. * Replace the single select() call with a ppoll() loop. * Improve validation of the timeout value. We now accept things like "1h30m15s", which we used to silently truncate to "1h". The flip side is that we no longer accept things like "1hour" or "5sec". * Modify the existing `read -t 0` test case to verify that read returns immediately when there is input and fails immediately when there isn't. * Add a second test case which performs the same tests with a non-zero timeout value. PR: 290844 MFC after: 1 week Fixes: c4539460e3a4 ("sh: Improve error handling in read builtin:") Reviewed by: jilles, bdrewery Differential Revision: https://reviews.freebsd.org/D53761 (cherry picked from commit 3c2643a7dbac370b7232f4e5ac15fd77b9ff396d) --- bin/sh/miscbltin.c | 83 +++++++++++++++++++++++++++++------------- bin/sh/sh.1 | 6 ++- bin/sh/tests/builtins/Makefile | 1 + bin/sh/tests/builtins/read11.0 | 19 +++++++++- bin/sh/tests/builtins/read12.0 | 32 ++++++++++++++++ 5 files changed, 112 insertions(+), 29 deletions(-) diff --git a/bin/sh/miscbltin.c b/bin/sh/miscbltin.c index 39b3effb99df..70b2aac58e93 100644 --- a/bin/sh/miscbltin.c +++ b/bin/sh/miscbltin.c @@ -46,11 +46,14 @@ static char sccsid[] = "@(#)miscbltin.c 8.4 (Berkeley) 5/4/95"; #include #include #include -#include + #include +#include +#include #include #include #include +#include #include "shell.h" #include "options.h" @@ -168,17 +171,18 @@ readcmd(int argc __unused, char **argv __unused) int is_ifs; int saveall = 0; ptrdiff_t lastnonifs, lastnonifsws; - struct timeval tv; - char *tvptr; - fd_set ifds; + sigset_t set, oset; + intmax_t number, timeout; + struct timespec tnow, tend, tresid; + struct pollfd pfd; + char *endptr; ssize_t nread; int sig; struct fdctx fdctx; rflag = 0; prompt = NULL; - tv.tv_sec = -1; - tv.tv_usec = 0; + timeout = -1; while ((i = nextopt("erp:t:")) != '\0') { switch(i) { case 'p': @@ -190,22 +194,29 @@ readcmd(int argc __unused, char **argv __unused) rflag = 1; break; case 't': - tv.tv_sec = strtol(shoptarg, &tvptr, 0); - if (tvptr == shoptarg) - error("timeout value"); - switch(*tvptr) { - case 0: - case 's': - break; - case 'h': - tv.tv_sec *= 60; - /* FALLTHROUGH */ - case 'm': - tv.tv_sec *= 60; - break; - default: - error("timeout unit"); - } + timeout = 0; + do { + number = strtol(shoptarg, &endptr, 0); + if (number < 0 || endptr == shoptarg) + error("timeout value"); + switch (*endptr) { + case 's': + endptr++; + break; + case 'h': + number *= 60; + /* FALLTHROUGH */ + case 'm': + number *= 60; + endptr++; + break; + } + if (*endptr != '\0' && + !(*endptr >= '0' && *endptr <= '9')) + error("timeout unit"); + timeout += number; + shoptarg = endptr; + } while (*shoptarg != '\0'); break; } } @@ -218,13 +229,33 @@ readcmd(int argc __unused, char **argv __unused) if ((ifs = bltinlookup("IFS", 1)) == NULL) ifs = " \t\n"; - if (tv.tv_sec >= 0) { + if (timeout >= 0) { /* * Wait for something to become available. */ - FD_ZERO(&ifds); - FD_SET(0, &ifds); - status = select(1, &ifds, NULL, NULL, &tv); + pfd.fd = STDIN_FILENO; + pfd.events = POLLIN; + status = sig = 0; + sigfillset(&set); + sigprocmask(SIG_SETMASK, &set, &oset); + if (pendingsig) { + /* caught a signal already */ + status = -1; + } else if (timeout == 0) { + status = poll(&pfd, 1, 0); + } else { + clock_gettime(CLOCK_UPTIME, &tnow); + tend = tnow; + tend.tv_sec += timeout; + do { + timespecsub(&tend, &tnow, &tresid); + status = ppoll(&pfd, 1, &tresid, &oset); + if (status >= 0 || pendingsig != 0) + break; + clock_gettime(CLOCK_UPTIME, &tnow); + } while (timespeccmp(&tnow, &tend, <)); + } + sigprocmask(SIG_SETMASK, &oset, NULL); /* * If there's nothing ready, return an error. */ diff --git a/bin/sh/sh.1 b/bin/sh/sh.1 index c11920e2f2a7..eb517b6938ee 100644 --- a/bin/sh/sh.1 +++ b/bin/sh/sh.1 @@ -33,7 +33,7 @@ .\" .\" from: @(#)sh.1 8.6 (Berkeley) 5/4/95 .\" -.Dd March 8, 2025 +.Dd November 17, 2025 .Dt SH 1 .Os .Sh NAME @@ -2504,6 +2504,10 @@ to explicitly specify seconds, minutes or hours. If none is supplied, .Ql s is assumed. +Multiple value-unit groups may be stringed together, in which case +they are added up, e.g.\& +.Ql 1h30m15s +which adds up to 5,415 seconds. .Pp The .Fl e diff --git a/bin/sh/tests/builtins/Makefile b/bin/sh/tests/builtins/Makefile index c3ed122791b5..56de5e57732b 100644 --- a/bin/sh/tests/builtins/Makefile +++ b/bin/sh/tests/builtins/Makefile @@ -143,6 +143,7 @@ ${PACKAGE}FILES+= read8.0 ${PACKAGE}FILES+= read9.0 ${PACKAGE}FILES+= read10.0 ${PACKAGE}FILES+= read11.0 +${PACKAGE}FILES+= read12.0 ${PACKAGE}FILES+= return1.0 ${PACKAGE}FILES+= return2.1 ${PACKAGE}FILES+= return3.1 diff --git a/bin/sh/tests/builtins/read11.0 b/bin/sh/tests/builtins/read11.0 index 5bae80318b15..07bd3e70644c 100644 --- a/bin/sh/tests/builtins/read11.0 +++ b/bin/sh/tests/builtins/read11.0 @@ -1,3 +1,5 @@ +# Verify that `read -t 0 v` succeeds immediately if input is available +# and fails immediately if not set -e @@ -6,12 +8,25 @@ trap 'rm -rf "$T"' 0 cd $T mkfifo fifo1 # Open fifo1 for writing -{ sleep 10; } >fifo1 & +{ echo new_value; sleep 10; } >fifo1 & # Wait for the child to open fifo1 for writing exec 3fifo1 & +# Wait for the child to open fifo1 for writing +exec 3; Tue, 25 Nov 2025 03:19:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dFnwz6PSPz3Tvw for ; Tue, 25 Nov 2025 03:19:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764040771; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=q0ZuCWrN0AhgaHM82zK3SW/xAZSTzOe4IAIZPI2M2xI=; b=L0FPKXvYJFYEu/Zqz/fRZguK1JPQzxlTfg+3JnuMaNPX12MYtq8NACrP+lLeFLu89Ba6Rc 5li8m1yw+g8k0NhVI1Jh6GaLmHFx4ikmvGKwXPRLY0PfHVPHH6FROt01uSMsj0dK2gJ6rL FWRmkwzTRPr8/0OaVbJIV5Ga4zUIxWdAhjpnmOKFkALrlySvZzTWjfOtiWeSZ8TcfxuxDt 4kgyXmgkNy7nJq3c5dynOPTTXstTuWi4GA3JgbUS9X3m82DpV/PLu6aoTIU4qr6kI8q0oy ar8A/V+AGt1V/Zje2ChwiX5vgdJHNjc/qrl1g5DVDl3Cyj9CJyBj5so2NHt0vw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764040771; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=q0ZuCWrN0AhgaHM82zK3SW/xAZSTzOe4IAIZPI2M2xI=; b=nisLoB8IXjfFRjX7BY9PBDxykrrzzY8txsS4uuuj6bVfXkve4isqp8PwSDx5FQVAXVvRma nnuwvpLZaPY/HA7hK/y804/TkpDuSTPNhb4pONMlNV9sk474j5fhQlb9bkbCsNO72aV4th PcO80tmuK8HgonsNYvlGfjv+M6CC9SkynJ6/DJpnKmQ61sNoBPaA49dG0FhQDjrVSgSlTL yZL+snzafe9+nCP41MmHC1CvVQca9dXlPtPYubcrpB4cf59Wouus/KkohDokSMd2HM45TT /gUOxH3meZPKwBwEJgXM8I6tumVVs52Ql4QEAz5cc7gVwC0OjWHPZLiQaoHZtg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764040771; a=rsa-sha256; cv=none; b=iAGDtJgkQN2Ppl8D8GZkZC+Ud7E2qZWZ70cbNj/NxzZF26/ckAyzNl6vU/PhDrgbQULen9 vGFaBXWfGsfHXi3OGUrxZFhfE0SVC5uNJNW43gO3rET+iHrEmCFiHtSqS3KPY6mUD9tzd2 X1oM/QlH8HHrx8VT/Yc4274FiZbhDQZRNqrdOeFN09QrQraGxKfZz8esRjLh6lEhcI3CrM dBOZmoW0kpf5jCJMWZDaupcUOy64G2q9j21rhEytVf4pUn+5mSWaOZpMm4NvGGD4hez0ic rMbCR421akOiBacFzQTXlhNC7MPgg9RRX0pIdn7XA/X3HypFkoIqRJHSkZGmdg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dFnwz5xtlzk0Z for ; Tue, 25 Nov 2025 03:19:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 33823 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 25 Nov 2025 03:19:31 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: 00e4b169f409 - stable/14 - openssh: Don't attempt to connect to unsupported addresses List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 00e4b169f4090e3b4bf1454c989df82d94b7d62e Auto-Submitted: auto-generated Date: Tue, 25 Nov 2025 03:19:31 +0000 Message-Id: <69252043.33823.4e15c483@gitrepo.freebsd.org> The branch stable/14 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=00e4b169f4090e3b4bf1454c989df82d94b7d62e commit 00e4b169f4090e3b4bf1454c989df82d94b7d62e Author: Dag-Erling Smørgrav AuthorDate: 2025-11-21 06:28:13 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-11-25 03:19:17 +0000 openssh: Don't attempt to connect to unsupported addresses When iterating over known addresses for the requested target host name, skip those that are not supported by the running kernel. MFC after: 1 week PR: 195231 Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D53588 (cherry picked from commit 5818b6ee552b302f5300934f9b8cb94881867a5f) --- crypto/openssh/FREEBSD-upgrade | 7 +++++++ crypto/openssh/sshconnect.c | 9 +++++++++ 2 files changed, 16 insertions(+) diff --git a/crypto/openssh/FREEBSD-upgrade b/crypto/openssh/FREEBSD-upgrade index efea4cda77b4..d8fc986b71ca 100644 --- a/crypto/openssh/FREEBSD-upgrade +++ b/crypto/openssh/FREEBSD-upgrade @@ -177,6 +177,13 @@ skip setting DISABLE_LASTLOG which we've applied for FreeBSD, but the autoconf machinery really ought to be reworked. Reported upstream at https://lists.mindrot.org/pipermail/openssh-unix-dev/2022-May/040242.html + +11) Protocol selection + + We use the non-portable feature_present(3) API to determine which + internet protocols are supported by the kernel before trying to + connect to the target host. This avoids confusing the user with + spurious error messages. This port was brought to you by (in no particular order) DARPA, NAI diff --git a/crypto/openssh/sshconnect.c b/crypto/openssh/sshconnect.c index 7cf6b638674c..f0c080cb140b 100644 --- a/crypto/openssh/sshconnect.c +++ b/crypto/openssh/sshconnect.c @@ -458,6 +458,8 @@ ssh_connect_direct(struct ssh *ssh, const char *host, struct addrinfo *aitop, memset(ntop, 0, sizeof(ntop)); memset(strport, 0, sizeof(strport)); + int inet_supported = feature_present("inet"); + int inet6_supported = feature_present("inet6"); for (attempt = 0; attempt < connection_attempts; attempt++) { if (attempt > 0) { /* Sleep a moment before retrying. */ @@ -482,6 +484,13 @@ ssh_connect_direct(struct ssh *ssh, const char *host, struct addrinfo *aitop, errno = oerrno; continue; } + if ((ai->ai_family == AF_INET && !inet_supported) || + (ai->ai_family == AF_INET6 && !inet6_supported)) { + debug2_f("skipping address [%s]:%s: " + "unsupported address family", ntop, strport); + errno = EAFNOSUPPORT; + continue; + } if (options.address_family != AF_UNSPEC && ai->ai_family != options.address_family) { debug2_f("skipping address [%s]:%s: " From nobody Tue Nov 25 03:19:41 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dFnx93nfbz6HMlJ for ; Tue, 25 Nov 2025 03:19:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dFnx917Zmz3Txb for ; Tue, 25 Nov 2025 03:19:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764040781; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lQQXNbHATC1hoSM+V2EbGOWY3Vpx2lKwFS+J8Xr/O08=; b=xYYnseccjjq0s1z5vjwd0KOc6IVXKnO5LjC3CzE9lG5wh4s5IkGA4lUqdw2oXEvpxAnq3a z1Eh0QCEwxYhj3Ipd6E/+Hvv6zy4gEMvvgCQ7mvhdN3+j697PBeYPZspygOTCvmB6RWVdB vTozvySgXtvSvO13IFDxKwWyU4nt/4/mFm7djBLGVrr6T6P+I4vAIVZoACC6/rZlVKTwGl s9UYmXQNyqLRTGJQmFyyCdrchgbQuDwENbZmWtxfZpaNdE/dRRNg+WAoysR5QW0X6HJ91Z ZOGoh2TMo8onaZs3UJNwHwAmJ9YwVzIWohxUjv3cBJnoNYDVYusgx6erC2C0zA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764040781; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lQQXNbHATC1hoSM+V2EbGOWY3Vpx2lKwFS+J8Xr/O08=; b=jca4+CiXTZCBX3TIjfqHeVgZXoM1d5Aa17+/RRlH83JqF55MIVItUSSMwKZePLV74axeKG o3j0Vmak48OBYtiB5uJdVecxycGZg66m0anjMcdd0MIXn1NZcKavSFtY1AXUHSRxl7kNbE 2CbbSysu+7vO4/Mv9JU2xN+c0fsSV8ZZclhUsj/J5viRoAew36vGGxLuTagVkXNcY/7La/ UzZE3oqgm8SOkL5pZqX90F9qGZ/FENibYE24jl4BC5TOFKLYjWqxOA25vuuFjJMk2TLDIo UwosUJM62Wgb1nMJHPoS5Q1J+0BRYah7dbNTYZzTzA7EcyOa4Hvt4UcCdcKkVQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764040781; a=rsa-sha256; cv=none; b=nle1rz63LnqyU8J7JltH7Hei72wkwJL15J/h+WkGpEjaMcxSjMwcYVBSewormc45DvXQsh BKC1Pfq8cn2csls0BV/BKOB5mLekYPxFjPw9KTGrK4Pa/HTySPElgRuwSmpYJ7bSbHdqDy bxX9CeiygjAODI/MMDL0jy8x/ffjAsn1gFnserz85CAgOfpXhtuugqGDUU5m2tkBPdGnFw pVGS1+5AAQAnrTpCl4MZvL45l21iqCCQIZPPS3D0z/uIyn6vnLw0NxjbOg0C+qLuIlgWG9 GgezJP+tWHM7MuiiiL24xA1VQww+NwFdfNzhWqlhvDLC4XmtgyBXqLA6NNu1Yg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dFnx90LQtzjyR for ; Tue, 25 Nov 2025 03:19:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 329cf by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 25 Nov 2025 03:19:41 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: f6bd9b266dc4 - stable/13 - openssh: Don't attempt to connect to unsupported addresses List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: f6bd9b266dc4aa342f735a7ade07061f54f7f740 Auto-Submitted: auto-generated Date: Tue, 25 Nov 2025 03:19:41 +0000 Message-Id: <6925204d.329cf.1813b80c@gitrepo.freebsd.org> The branch stable/13 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=f6bd9b266dc4aa342f735a7ade07061f54f7f740 commit f6bd9b266dc4aa342f735a7ade07061f54f7f740 Author: Dag-Erling Smørgrav AuthorDate: 2025-11-21 06:28:13 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-11-25 03:19:35 +0000 openssh: Don't attempt to connect to unsupported addresses When iterating over known addresses for the requested target host name, skip those that are not supported by the running kernel. MFC after: 1 week PR: 195231 Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D53588 (cherry picked from commit 5818b6ee552b302f5300934f9b8cb94881867a5f) --- crypto/openssh/FREEBSD-upgrade | 6 ++++++ crypto/openssh/sshconnect.c | 9 +++++++++ 2 files changed, 15 insertions(+) diff --git a/crypto/openssh/FREEBSD-upgrade b/crypto/openssh/FREEBSD-upgrade index 625677c1a5c1..3742874c0729 100644 --- a/crypto/openssh/FREEBSD-upgrade +++ b/crypto/openssh/FREEBSD-upgrade @@ -179,6 +179,12 @@ ignore HPN-related configuration options to avoid breaking existing configurations. +9) Protocol selection + + We use the non-portable feature_present(3) API to determine which + internet protocols are supported by the kernel before trying to + connect to the target host. This avoids confusing the user with + spurious error messages. This port was brought to you by (in no particular order) DARPA, NAI diff --git a/crypto/openssh/sshconnect.c b/crypto/openssh/sshconnect.c index bd4190c6e8bc..91cbd55df0d1 100644 --- a/crypto/openssh/sshconnect.c +++ b/crypto/openssh/sshconnect.c @@ -458,6 +458,8 @@ ssh_connect_direct(struct ssh *ssh, const char *host, struct addrinfo *aitop, memset(ntop, 0, sizeof(ntop)); memset(strport, 0, sizeof(strport)); + int inet_supported = feature_present("inet"); + int inet6_supported = feature_present("inet6"); for (attempt = 0; attempt < connection_attempts; attempt++) { if (attempt > 0) { /* Sleep a moment before retrying. */ @@ -482,6 +484,13 @@ ssh_connect_direct(struct ssh *ssh, const char *host, struct addrinfo *aitop, errno = oerrno; continue; } + if ((ai->ai_family == AF_INET && !inet_supported) || + (ai->ai_family == AF_INET6 && !inet6_supported)) { + debug2_f("skipping address [%s]:%s: " + "unsupported address family", ntop, strport); + errno = EAFNOSUPPORT; + continue; + } if (options.address_family != AF_UNSPEC && ai->ai_family != options.address_family) { debug2_f("skipping address [%s]:%s: " From nobody Tue Nov 25 04:30:51 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dFqWJ1jTsz6HScR for ; Tue, 25 Nov 2025 04:30:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dFqWJ0bFcz3dfs for ; Tue, 25 Nov 2025 04:30:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764045052; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2dWJAEdOvR+mKluSCLpT4IbO3+ve1pALAB/SYYiDvqI=; b=ranNR7Tq1OAHzRKvl6cdJmbeKlMtYpz/z0xTkqxNfUPGhG1fLg3zNjMv2/I67fvcxEctzT mlCWRu0euoP9tVchLofp+cnLsiHqWOGY5FdhyLOKb0jsbJ8QRzCN/W7f+oUhlUBdcsXhGw nWSMJD1Ech7aMDKXpMbGgu1N+ydRqiHoj0RcEYOTF1UEXcaEiVUeuppVI7n53u1Ktkp2As dXieqdzk0sQNFq/cB8l3FZ7TpyG5QWUtNEJHmqBzwIuDTGVfmyfGtzvh1uuPQsuwFypKbP Jn+7MhlXejG4fU4BNMN6AmWJz235jYbdOmLpvvkn4ENuUEXYrtJ1j1fWO0GoGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764045052; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2dWJAEdOvR+mKluSCLpT4IbO3+ve1pALAB/SYYiDvqI=; b=N4buoR+2KyG+i/vSKqm4DJAHnqGrHu6OQOM/6Mzhr/cLU/8M4JK60Ad/ALIIMc406FQuqC imyOA9hueGsI9vrxnsBtVpst5S8rqNh5NKDAjLFIZgcS+5oqEN60uZvy1wm934hcrkfX24 zZ+aWaCNjhLbJfu1e+WFYIzItk1bli3z6Es+9nKNbNY/R9Akj4FcbYLE6XesEGxe95OjVI 0QAxhK7z9pkOYFTcCPtgnrhH13zjTvlpYMiQMbqdNTcIRwKt/kMTt6qE5qvsunT9x0er7R 4TJfQDIKBVUJHwS8bjWsCA2WZlY8frNaJhuqY/5wn6fQoHfI4PHfLf7fK7ZE3w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764045052; a=rsa-sha256; cv=none; b=F6mgCnc4J9OEr1Zbpa0qnCckpvajON3h2jczrBNJe+lKAUhkWTsqbQW0hgn/SgDdlKhLt5 MHmcypxJHdtQ9I2Ke7ETVcORbQj7DfOd5/GXpYz4BsaGrdyp+RbAlcEiP7+SoNNFhnZAsD aOiYn05/cc65chTodGE1qX1FMD+AEcgUeg6OINbQv7TU1DSTiUSB8ODeMLlOrfmzAAyUBp IZfd85Nndms2BSBLqwYaCuxTiMrWpBf4o1RMa1KFLVHkIBCFXZGP5K5gEy3ZnpkmC8mgAM prEtGZzFXeaHIOlNViNMzJT7a0/UkpD4ShdchSKXl+xufd0hJbTGUMAjsvb/AQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dFqWJ02HVzmR3 for ; Tue, 25 Nov 2025 04:30:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3b8ff by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 25 Nov 2025 04:30:51 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jessica Clarke Subject: git: aac0ef54dce9 - main - kern: Fix section name for embedded firmware blobs List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jrtc27 X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: aac0ef54dce9d59a5ccc1151693906778cba45c9 Auto-Submitted: auto-generated Date: Tue, 25 Nov 2025 04:30:51 +0000 Message-Id: <692530fb.3b8ff.129f6fc4@gitrepo.freebsd.org> The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=aac0ef54dce9d59a5ccc1151693906778cba45c9 commit aac0ef54dce9d59a5ccc1151693906778cba45c9 Author: Jessica Clarke AuthorDate: 2025-11-25 04:29:22 +0000 Commit: Jessica Clarke CommitDate: 2025-11-25 04:29:22 +0000 kern: Fix section name for embedded firmware blobs In practice this just ends up as an orphan section and so is placed next to .rodata-like sections, so it's pretty harmless, but not intended. Fixes: a095390344fb ("Use a template assembly file for firmware object files.") --- sys/kern/firmw.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/firmw.S b/sys/kern/firmw.S index cd808d4a9396..1d74f17e449e 100644 --- a/sys/kern/firmw.S +++ b/sys/kern/firmw.S @@ -35,7 +35,7 @@ #define FIRMW_START(S) __CONCAT(_binary_, __CONCAT(S, _start)) #define FIRMW_END(S) __CONCAT(_binary_, __CONCAT(S, _end)) - .section rodata, "a", %progbits + .section .rodata, "a", %progbits .globl FIRMW_START(FIRMW_SYMBOL) .type FIRMW_START(FIRMW_SYMBOL), %object FIRMW_START(FIRMW_SYMBOL): From nobody Tue Nov 25 08:46:09 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dFx9t0xcPz6Hnq2 for ; Tue, 25 Nov 2025 08:46:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dFx9s5qkFz3xZC for ; Tue, 25 Nov 2025 08:46:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764060369; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+QL691kf8e7lTKnU/VyYf+Xn3mCSS/C6LdFgEInaJ4Y=; b=RX1W8jIGPKf6GecaHv7cCc+RuJoARgTtoT3Wf/7RobG1O2HdSlqcx54D5WFS/9sDzLbU+B +++SbAxHmnXBaSCYnDaqx/T7O9JS0YaYF1CtDPe5zGMbhSu5c8bgCpRxLFDAlvBdxdVyft n8EmAPyCGIPelHJd/8zvv7IZWbLMTm3bYDwAd1jFQtq6U/9GgHhMSEVpah6mm8soripYQR W1u0sLiumiG52AQ5En/7gTawvHuicDunTKA3sDL5DLJYpKwEziSBgkfmVrothWkCcTssTB 6pxwYq1RMOsJfqz9vF+CsxDNJYHwQcSYwruNJebXBIK/CGYewFAdf+wBlPfNEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764060369; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+QL691kf8e7lTKnU/VyYf+Xn3mCSS/C6LdFgEInaJ4Y=; b=nR3s38TmB4L9ncO6ul15UjpKyZPNgrS/2Ah4IyQrccCJkEW49kac/0XRVSlogb2AqEh+cp FooMgzSYipaRXCWROvN546ysaiAb/tNpS/7HHITdlRzdKQYgYBvVIV9qV6qyQ+gdqtfGkO pCUxVRZw96gbVQ3gTjL3YApVWQIbKLrzyo0OmfOPIg9yUKfE4H/57maxapiG/ynTgpqSZz hqUz0HmtexCcH7PjDwV+zEFkmnY9hzyvdw3RixikQG6SDOk5Y9IDa/DgdD4hZnzl2EzYJd 9NI9Gcfy10FBgW9V6s+VAYHpF95e1f/NhQxYD33r0dK67Vd7wGpnWH3klmnspw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764060369; a=rsa-sha256; cv=none; b=ZP3dy+WAps9tXW9Mjd4EPyw+TIv2UChrxIjw0/u3IBI34Y08wTJllEml2bcrbhjgz3QmMr 6Z1/lRDTSAeRVNbRdnMRani/yJKYEQfuwcO6WIy/ipkBoB0VfYssAj8AssUsxic6LbBFMW BNGCYFfWpxJHIQ4lX1dHFjaB8+ziI72qQqTMHJ/THnjeT8idk+Rawjm9XA2AodXJ6VUCJn yqOW60Koit2mlMd9hCQIFQQpeNS3CfGoeTIQAAZc/2JOvSrjC6PzoIvL+n44jBIv2N/3eb ulX/C/7a69J5PkKm68ZiTVirXb8/N3f91Qp7HFXaMhmMwbJ44M1UKNOKxWcJ2Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dFx9s58ckztQG for ; Tue, 25 Nov 2025 08:46:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2d876 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 25 Nov 2025 08:46:09 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ruslan Bukin Subject: git: b87f6330013f - main - nvme(4): Increase HMB alignment. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: br X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b87f6330013f2d04ef83c453f95db5cd3247e6e1 Auto-Submitted: auto-generated Date: Tue, 25 Nov 2025 08:46:09 +0000 Message-Id: <69256cd1.2d876.36d668be@gitrepo.freebsd.org> The branch main has been updated by br: URL: https://cgit.FreeBSD.org/src/commit/?id=b87f6330013f2d04ef83c453f95db5cd3247e6e1 commit b87f6330013f2d04ef83c453f95db5cd3247e6e1 Author: Ruslan Bukin AuthorDate: 2025-11-25 08:38:37 +0000 Commit: Ruslan Bukin CommitDate: 2025-11-25 08:38:37 +0000 nvme(4): Increase HMB alignment. The NVME controller in Crucial P310 disk does not accept 16-byte aligned host memory buffer on Codasip Prime platform, but works fine on PAGE_SIZE aligned memory. Instead of adding a quirk, just increase alignment for everyone. Reviewed by: jhb Discussed with: imp Sponsored by: CHERI Research Centre Differential Revision: https://reviews.freebsd.org/D53296 --- sys/dev/nvme/nvme_ctrlr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/nvme/nvme_ctrlr.c b/sys/dev/nvme/nvme_ctrlr.c index 41542d24c107..1ad4735cbef8 100644 --- a/sys/dev/nvme/nvme_ctrlr.c +++ b/sys/dev/nvme/nvme_ctrlr.c @@ -907,7 +907,7 @@ again: size = sizeof(struct nvme_hmb_desc) * ctrlr->hmb_nchunks; err = bus_dma_tag_create(bus_get_dma_tag(ctrlr->dev), - 16, 0, BUS_SPACE_MAXADDR, BUS_SPACE_MAXADDR, NULL, NULL, + PAGE_SIZE, 0, BUS_SPACE_MAXADDR, BUS_SPACE_MAXADDR, NULL, NULL, size, 1, size, 0, NULL, NULL, &ctrlr->hmb_desc_tag); if (err != 0) { nvme_printf(ctrlr, "HMB desc tag create failed %d\n", err); From nobody Tue Nov 25 09:22:00 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dFxzD6hvpz6Hqgm for ; Tue, 25 Nov 2025 09:22:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dFxzD5mjdz42kq for ; Tue, 25 Nov 2025 09:22:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764062520; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=t3Oe04l2MgZ5vHxYyg0URGg5bVu0TBPKzVsT81UJx98=; b=FWA/Hq46mwGdpdPmSQEK1GGqiSi4ZQEWArWenT0IXE938eY3PH7xZPqyz+d5WXpnfmjsmj c0MmllPh3+/nIFIGlA+Z95DDIqxAiPZSzu5kFTP1ipx9Alf/TzAhqlOiRp9cFAKNWWOiKv yAvs+NT4v5RyLf+aQyRGzKHyjcybjIpnwSphiCndoMB17kPLeMQSeFfzArQy1OXP0zjtzu mufZRceaZXuxFZu8UXolUV2vZyfPr64fl6hQ+nrgmfWTBjDKwKIc8HhGqU/Ud1wKxVnXrN rYCWWlR40Aew4YAwJttEbiXegeYxiQXK8ZG1jW4gyeMGxiGtIlrmaWPqOhNjLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764062520; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=t3Oe04l2MgZ5vHxYyg0URGg5bVu0TBPKzVsT81UJx98=; b=CHfLJD6kLMFFqZW74tFAJERArKHtW4d5aTLJakhtJl9F4RvbI9Lgf+5wjuZKq9AL/Of6UM DTUvz8Xd+cUyDQ4lYdCyykdVkIF0m01uyWRkXZOLbo/Q++GZbM04KVWrqhol7eFbkbswb4 58umX6ly49WmNkjFqXjYJGbkYptqCBQNzEC8AlfEqMZwbdRIoy/3pa1R7rdI0RLR7Oa4lx nod2YmSalnmki5Pg0cDHlEB1xziWctDXH+LBw/4ihwVlwxZCZkhn4VP+mEkeYIrdLNhTuS 6xbzlJg+xzv0WBxLj2csKKdjGdGLyB8fZ4gLCElc5bcoRtpSDMfmwad3iYJstQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764062520; a=rsa-sha256; cv=none; b=SCg6uChtOlWR71eNjiaw2x7V3UJd47lpWLe6lAwjKaYod9+8kdvbfbfILKXS8mF3Nhhzpw iERyPRnkg4DQ1yAuvfbeSny2Sc+bN66qpAHMZAvHbxUUXZ1TroqZ5/VgfS+n3hyMfGOfOi HZVgc2xHdBJiRHb26/j3HQtdHOIq5UkTsVqKBofGSyAB9K9PN98rlCehgHdaj+eHcYl5r2 tNUt8cO9/y3C+L+NQ2ZDP9dVEuvnHPT37FDRsG438w1PeY1j+jgkMfbJNueD0z04o1HHCc DsaOY/2B00SRx3PngdU7rvbw9s8ab8csIbOdgsXfOomx6epnLK3QV6CazcpRTQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dFxzD5F2Mzvh8 for ; Tue, 25 Nov 2025 09:22:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2f1ed by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 25 Nov 2025 09:22:00 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ruslan Bukin Subject: git: 64ee9c166ce5 - main - em(4): fix capability bounds needed to access checksum context. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: br X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 64ee9c166ce5e807e575d205ac2e15cc5cf6581b Auto-Submitted: auto-generated Date: Tue, 25 Nov 2025 09:22:00 +0000 Message-Id: <69257538.2f1ed.5e0428f9@gitrepo.freebsd.org> The branch main has been updated by br: URL: https://cgit.FreeBSD.org/src/commit/?id=64ee9c166ce5e807e575d205ac2e15cc5cf6581b commit 64ee9c166ce5e807e575d205ac2e15cc5cf6581b Author: Ruslan Bukin AuthorDate: 2025-11-25 09:16:39 +0000 Commit: Ruslan Bukin CommitDate: 2025-11-25 09:20:03 +0000 em(4): fix capability bounds needed to access checksum context. Ensure the offp capability bounds cover entire struct with checksum fields. This is needed for CHERI systems to avoid bounds violation trap, as otherwise offp allowed to dereference 4 bytes of csum_flags field only so bzero failed. Tested on ARM Morello. Reviewed by: kbowling Discussed with: jrtc27 Sponsored by: CHERI Research Centre Differential Revision: https://reviews.freebsd.org/D53903 --- sys/dev/e1000/if_em.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/e1000/if_em.c b/sys/dev/e1000/if_em.c index bc841ba87ceb..7d7655a7ae6f 100644 --- a/sys/dev/e1000/if_em.c +++ b/sys/dev/e1000/if_em.c @@ -3638,7 +3638,7 @@ em_initialize_transmit_unit(if_ctx_t ctx) bus_addr = txr->tx_paddr; /* Clear checksum offload context. */ - offp = (caddr_t)&txr->csum_flags; + offp = (caddr_t)txr + offsetof(struct tx_ring, csum_flags); endp = (caddr_t)(txr + 1); bzero(offp, endp - offp); From nobody Tue Nov 25 09:49:27 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dFyZv4gy5z6HsXJ for ; Tue, 25 Nov 2025 09:49:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dFyZv2r2fz451L for ; Tue, 25 Nov 2025 09:49:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764064167; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lbqEGsahDfrRKZUgdW12UQic95TGqTQ2qLpxLQHOsbc=; b=n6C4rFo37AwrxHSm/1EZH8vG1hdRtzMl9n1qa+ox5pxco1KKcoTSBL/vmKLg0P7jBYiILE 9aE8zKCr4OyQq4g7oggjrOy07qdF+h4YCedAjJXH4iVHlO8zbBPg1LFAubylnlNtkGrkeP rdgLMcNM0eHXbjOyChjR2VZOswqZjhUidF3ZYqRCOX7/CaXIZIGOAXJ14eJ19kwEt+QViy SiOlQGxbNq2omJZq02N/VqmMSNgTPs/3p6hQXs5JxMuGZ9/Rz3nfKv6PcQL8VLK7YVCKUJ x59YYObP79heyJ5nKlYlDa4DeCHhAvh4KbQyja7cNVYiY0gqpeMaZnhDH4zDGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764064167; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lbqEGsahDfrRKZUgdW12UQic95TGqTQ2qLpxLQHOsbc=; b=QN3MBdn22vilfiyY/ozhjof/hVsjKVFfOR1HYHpz9uKUq8pOOg2r7PDE8CV8Azowq8J/1g gKsRlivzGyUwtKp+qziUcdakUGh7cckvZyhgOOv/6r/4bhd+eZnx0orMori8Sih7G47mpy nMJSZ+diB6BgztqwAnDKBe63WE9+mvXB5pm5/YQX73S31asi+zWy679fCkJh0eC6P9QmVe ic2qCivGxqKg/44bIb2TVXC0WhYUBABIud+iv3Frbwb12mxzFJkM5C9sJn4rQQC52BiWK7 RN9aySKDLQ9cpE7xSw5HMkn+APOwomXf2KJ5yYMoHelhws6zgkgr15BszqRVwQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764064167; a=rsa-sha256; cv=none; b=kHE2RtPl6aGj9xINZDFJjXIqOBb2IDR6vEgfQ0nEihtn+QDVYWPgMi7R41hgHcj9lNSYn+ h6VbkygzY1wj/GRgTr3nB9bC4igcJLmfqGPo9Fc1W77hYxVSnUTVIsVZNtadEV3g3DrqmZ c+BKNURDy6jmNeKM7VDiXppwSyqHhtYUP1G3eRCfI1SQHzupLyx+JI8VCWGjEnXVTzhm9S ZkJlkm3sV5O7P9b+DqZypST6KpEn8VS3NLDWRpliAxC9mvjzoIdHdhqMX4zW35P461E3sb CGS41ofJvyIHl81jGbA4yO/cxU2LNVToob+PL+QbwaXWubOPhZQk21pCbxgNUQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dFyZv1G6SzwQT for ; Tue, 25 Nov 2025 09:49:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 33406 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 25 Nov 2025 09:49:27 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 7799b57146cd - stable/15 - if_ovpn: use IFT_TUNNEL List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 7799b57146cdb79a2fcc23ea434eb0f41efbc06e Auto-Submitted: auto-generated Date: Tue, 25 Nov 2025 09:49:27 +0000 Message-Id: <69257ba7.33406.1d38ab44@gitrepo.freebsd.org> The branch stable/15 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=7799b57146cdb79a2fcc23ea434eb0f41efbc06e commit 7799b57146cdb79a2fcc23ea434eb0f41efbc06e Author: Kristof Provost AuthorDate: 2025-11-17 19:42:24 +0000 Commit: Kristof Provost CommitDate: 2025-11-25 09:39:23 +0000 if_ovpn: use IFT_TUNNEL IFT_ENC has special behaviour in pf we don't desire, and this also ensures that for all interface types there is N:1:1 correspondence between if_type:dlt:header len. Requested by: glebius MFC after: 1 week (cherry picked from commit ff9f76a206c80c263050816735d537a151ee2999) --- sys/net/if_ovpn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/net/if_ovpn.c b/sys/net/if_ovpn.c index fe015632f33e..8ce3491d072e 100644 --- a/sys/net/if_ovpn.c +++ b/sys/net/if_ovpn.c @@ -2689,7 +2689,7 @@ ovpn_clone_create(struct if_clone *ifc, char *name, size_t len, return (EEXIST); sc = malloc(sizeof(struct ovpn_softc), M_OVPN, M_WAITOK | M_ZERO); - sc->ifp = if_alloc(IFT_ENC); + sc->ifp = if_alloc(IFT_TUNNEL); rm_init_flags(&sc->lock, "if_ovpn_lock", RM_RECURSE); sc->refcount = 0; From nobody Tue Nov 25 09:49:27 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dFyZw0QSVz6HsVC for ; Tue, 25 Nov 2025 09:49:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dFyZv58vmz44mZ for ; Tue, 25 Nov 2025 09:49:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764064167; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0kH6PG4WVIETglXs7Y6YSk3DX4W7c+uu2hzpf3G46zM=; b=UX8MDrd9gfUp6+3wKVuiVbDoNKgiJ25HKlJrbXFpKtTzFvS29iE8NmH2T0ESyeimZJqN7b l7Q6s49hrlSol4NEa0qD2Kay+wLDPyepKsVVGIz6DOcpLuK4jz9XPhJeHjy7+spXnCy8u1 UGibM/FY1faQHSxKlk6TVVFwmogwjVkBanbkeGDtdqjisuFXPRWzF24bse5082JECMExIY sTXVBi+wXEVqwKsknhh4SYwutE/EdI2xk7XZF41GQtAoZ6wZbwm1F7rZLnIxFUiJP8BRMB HkLrVh+73m0tC6PwgxhDJ95l+2fHvyl4onleyhJ38alnjaHrSa4TwgWFBLGC0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764064167; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0kH6PG4WVIETglXs7Y6YSk3DX4W7c+uu2hzpf3G46zM=; b=CMCpyPcuMIb4z8lTuDaDNuzdZ7cbQNv3tZYPb8JV2vzb88Rgyon+ohvfslXbpdWYh3KG6/ mQ8CNR+kZPLFDPYlgRYUMlQyRo32Cnzf3V1TDZuza1bE2edPtiYCi0eNrANfIr15zsGNFu sEm8/VuDBrI0GAY0xmSD+LVDAZlezfxRThxb5ZhsV2Px6NnkW9mahmMvS8ASG1Qm4WmJDZ gH6rLs6TR+RKtkQK3yRJbB0UTeee2XsZAu1oPc9eYjEU/jWpBbDBGTQdjYhb2RRZ60zQnb Z6ES1GHY3vuAKReqIPxMWfs4bDLOkg/tu+s9yXy2VzwVR7JyJrP3R091ihlAKg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764064167; a=rsa-sha256; cv=none; b=VYHWrZwV9LI8xXE0QB7Amrt5AcvS5jghCOy/0XUqaWZeXtow+zvCjZ6/jIAPjpI0GTkCBy hC8QZLeWx8C018B7JEbTjmkmsDjCgnuRphqLCGS6nQ5HYHwug3Hae8V2oIqMpoDyiyqM1P 4c5C6unzLoJgjFzLeZuUZR5zXbgF0boqro87ct4KdzNZr0p89myoikD815Q2isOrUTCa5M a0ME8LWvJsK+Wy5Sci5t2tSa4QlQoVoLfz+LW1tIlBCP7ypABun5zpLVLtf9y+coSTEtl9 M9v4UYwBwTtwkRtb+HV81GHsxhab55svMhTO1tv16x4Hg1eQx0tYWj5QtPN2ew== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dFyZv4PpDzw3B for ; Tue, 25 Nov 2025 09:49:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 32f2b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 25 Nov 2025 09:49:27 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 58eacc815513 - stable/14 - if_ovpn: use IFT_TUNNEL List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 58eacc815513ceecbeb08783475e1b9375c7370a Auto-Submitted: auto-generated Date: Tue, 25 Nov 2025 09:49:27 +0000 Message-Id: <69257ba7.32f2b.3690945c@gitrepo.freebsd.org> The branch stable/14 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=58eacc815513ceecbeb08783475e1b9375c7370a commit 58eacc815513ceecbeb08783475e1b9375c7370a Author: Kristof Provost AuthorDate: 2025-11-17 19:42:24 +0000 Commit: Kristof Provost CommitDate: 2025-11-25 09:39:08 +0000 if_ovpn: use IFT_TUNNEL IFT_ENC has special behaviour in pf we don't desire, and this also ensures that for all interface types there is N:1:1 correspondence between if_type:dlt:header len. Requested by: glebius MFC after: 1 week (cherry picked from commit ff9f76a206c80c263050816735d537a151ee2999) --- sys/net/if_ovpn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/net/if_ovpn.c b/sys/net/if_ovpn.c index 13e6db2764fb..631b3f4dfa26 100644 --- a/sys/net/if_ovpn.c +++ b/sys/net/if_ovpn.c @@ -2726,7 +2726,7 @@ ovpn_clone_create(struct if_clone *ifc, char *name, size_t len, return (EEXIST); sc = malloc(sizeof(struct ovpn_softc), M_OVPN, M_WAITOK | M_ZERO); - sc->ifp = if_alloc(IFT_ENC); + sc->ifp = if_alloc(IFT_TUNNEL); rm_init_flags(&sc->lock, "if_ovpn_lock", RM_RECURSE); sc->refcount = 0; From nobody Tue Nov 25 09:49:28 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dFyZw4HdTz6HsjP for ; Tue, 25 Nov 2025 09:49:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dFyZw27k2z457n for ; Tue, 25 Nov 2025 09:49:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764064168; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FCCN+Q8tYmhnzUkKEQrzjl1AiDUf6sGWY2j9eppcmxk=; b=RmRte5SekPk2D56C6/CiqPXNeXgNCnTYwxqBmTKXuCCL9Y3UWe1hZcfv3A9jOOR8spswqc 3kbUfl+1od9qZC3Y171uWGWrHsO07UsLMYz9SmMZyMcOf45EF4mL2HLbiR/PXAb4m1reM2 W9P7zNjQHJqRGHjxhy8Oi9RsnCpb46GMzFPsaasxYwEtFZm5O1mn61CuIzhE9G9nJoQSgt DtrwIffcbihi97dxFYcEPIWi2HIeX+kvfGgQTn/traxhpK+Vb5GqttyanCUeYGyeQkhbfG Xj9HFLNvnGDlEV+qkIuYyLBw/GPp92oQwF2sK9JU/k6otl1Iw1G93m6BUSyoBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764064168; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FCCN+Q8tYmhnzUkKEQrzjl1AiDUf6sGWY2j9eppcmxk=; b=T0wZcCvUbCvuxAcwTNKfOyRS80zRiEK/0U3mstrMyDc3Sh8v8kqKF838XAr4tysSP7J7d6 Pvtx4uLzFCS5wH6rQ9NHAiAsvMX5MtTE6J9UTHdudRxgISTFFutbTV6RM7rTpI9ITgoX9S j/cU3Wp9ZLpmwmngMzZWriabyzZIV5lioyz067PjAmb2ZzUYv2XWOVmGg7gVZHOsobFrUy RHtPli7l94/cVf5859YkQebAcrhS0xOCvuThHfFW3ICZAZjYovJS2au/WqMx0ulskJqNLQ 8+jVzd4SWzQVaI+3wMPmeYADNT3o7OBvJFiRewPauN4wMhPpGUWyitjEzSSCNg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764064168; a=rsa-sha256; cv=none; b=sIYdVzRIaXIv25YazpAeH6eUMLjxNPbgDN3N7dEcwWXu3j3FAKdAjQibJ/9JiTXI0AHjzp 7o0Cjrm3wt4HhRL/NlyWgEd9mvFd3JwG2Patv1J9MAWkcSGyow+pkUbmBAfrXwwCU/RSkN Dm6d4Xw7ZvxR4fL2CfxOpjWF2lwSHbnMU5cOO8+PhHgsbDs6inyqKPZShLg9Kerj1imWO1 rW8JntdQ40TW8CNMWZ58Fob+Cr9Bi9NWx4mTyuYfPhWbccqM3JGOBPpikX8SYQ7BsInEgc yiJmstLtWO1JsI/q/eAO2MXcpeSUe87pj9zuIjXyupChgo6uEl193JdTUOBo3g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dFyZw1bbnzw05 for ; Tue, 25 Nov 2025 09:49:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 31a70 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 25 Nov 2025 09:49:28 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 870a7a949bf9 - stable/15 - pf: fix udp_mapping cleanup List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 870a7a949bf986e63cecc305bab90e7e8bfc0ccd Auto-Submitted: auto-generated Date: Tue, 25 Nov 2025 09:49:28 +0000 Message-Id: <69257ba8.31a70.7263aa6@gitrepo.freebsd.org> The branch stable/15 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=870a7a949bf986e63cecc305bab90e7e8bfc0ccd commit 870a7a949bf986e63cecc305bab90e7e8bfc0ccd Author: Kristof Provost AuthorDate: 2025-11-13 13:54:54 +0000 Commit: Kristof Provost CommitDate: 2025-11-25 09:39:24 +0000 pf: fix udp_mapping cleanup If we fail to obtain a new source port (pf_get_sport()) while we've created a udp_mapping (for 'endpoint independent nat') we must free the udp_mapping in pf_get_sport(). Otherwise the calling function will call pf_udp_mapping_release(). This will then attempt to remove the udp_mapping from a list it's not in, and crash. Actually free the udp_mapping in all failure cases. While here sprinkle in a few more assertions to ensure we don't forget leak udp_mappings and add a test case to provoke this problem. Reviewed by: thj MFC after: 1 week See also: https://redmine.pfsense.org/issues/16517 Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D53737 (cherry picked from commit c12013f5bb3819e64499f02ecd199a635003c7ce) --- sys/netpfil/pf/pf_lb.c | 29 ++++++++++++++++++++++------- tests/sys/netpfil/pf/nat.sh | 30 ++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+), 7 deletions(-) diff --git a/sys/netpfil/pf/pf_lb.c b/sys/netpfil/pf/pf_lb.c index bee9f4637091..c6cdc4e03f3e 100644 --- a/sys/netpfil/pf/pf_lb.c +++ b/sys/netpfil/pf/pf_lb.c @@ -301,9 +301,8 @@ pf_get_sport(struct pf_pdesc *pd, struct pf_krule *r, struct pf_addr *naddr, bzero(&init_addr, sizeof(init_addr)); - if (udp_mapping) { - MPASS(*udp_mapping == NULL); - } + MPASS(udp_mapping == NULL || + *udp_mapping == NULL); /* * If we are UDP and have an existing mapping we can get source port @@ -354,16 +353,22 @@ pf_get_sport(struct pf_pdesc *pd, struct pf_krule *r, struct pf_addr *naddr, if (pd->ndport == htons(ICMP_ECHO)) { low = 1; high = 65535; - } else + } else { + MPASS(udp_mapping == NULL || + *udp_mapping == NULL); return (0); /* Don't try to modify non-echo ICMP */ + } } #ifdef INET6 if (pd->proto == IPPROTO_ICMPV6) { if (pd->ndport == htons(ICMP6_ECHO_REQUEST)) { low = 1; high = 65535; - } else + } else { + MPASS(udp_mapping == NULL || + *udp_mapping == NULL); return (0); /* Don't try to modify non-echo ICMP */ + } } #endif /* INET6 */ @@ -386,6 +391,8 @@ pf_get_sport(struct pf_pdesc *pd, struct pf_krule *r, struct pf_addr *naddr, */ if (pd->proto == IPPROTO_SCTP) { key.port[sidx] = pd->nsport; + MPASS(udp_mapping == NULL || + *udp_mapping == NULL); if (!pf_find_state_all_exists(&key, dir)) { *nport = pd->nsport; return (0); @@ -400,6 +407,8 @@ pf_get_sport(struct pf_pdesc *pd, struct pf_krule *r, struct pf_addr *naddr, */ key.port[sidx] = pd->nsport; if (!pf_find_state_all_exists(&key, dir)) { + MPASS(udp_mapping == NULL || + *udp_mapping == NULL); *nport = pd->nsport; return (0); } @@ -413,6 +422,8 @@ pf_get_sport(struct pf_pdesc *pd, struct pf_krule *r, struct pf_addr *naddr, return (0); } } else { + MPASS(udp_mapping == NULL || + *udp_mapping == NULL); *nport = htons(low); return (0); } @@ -440,6 +451,8 @@ pf_get_sport(struct pf_pdesc *pd, struct pf_krule *r, struct pf_addr *naddr, key.port[sidx] = htons(tmp); if (!pf_find_state_all_exists(&key, dir)) { *nport = htons(tmp); + MPASS(udp_mapping == NULL || + *udp_mapping == NULL); return (0); } } @@ -457,6 +470,8 @@ pf_get_sport(struct pf_pdesc *pd, struct pf_krule *r, struct pf_addr *naddr, } else { key.port[sidx] = htons(tmp); if (!pf_find_state_all_exists(&key, dir)) { + MPASS(udp_mapping == NULL || + *udp_mapping == NULL); *nport = htons(tmp); return (0); } @@ -473,13 +488,13 @@ pf_get_sport(struct pf_pdesc *pd, struct pf_krule *r, struct pf_addr *naddr, */ if (pf_map_addr_sn(pd->naf, r, &pd->nsaddr, naddr, &(pd->naf), NULL, &init_addr, rpool, sn_type)) - return (1); + goto failed; break; case PF_POOL_NONE: case PF_POOL_SRCHASH: case PF_POOL_BITMASK: default: - return (1); + goto failed; } } while (! PF_AEQ(&init_addr, naddr, pd->naf) ); diff --git a/tests/sys/netpfil/pf/nat.sh b/tests/sys/netpfil/pf/nat.sh index 25cac1810349..7d5db6743424 100644 --- a/tests/sys/netpfil/pf/nat.sh +++ b/tests/sys/netpfil/pf/nat.sh @@ -257,6 +257,35 @@ endpoint_independent_compat_cleanup() rm -f server2.out } +atf_test_case "endpoint_independent_exhaust" "cleanup" +endpoint_independent_exhaust_head() +{ + atf_set descr 'Test that a client behind NAT gets the same external IP:port for different servers' + atf_set require.user root +} + +endpoint_independent_exhaust_body() +{ + endpoint_independent_setup # Sets ${epair_…} variables + + endpoint_independent_common \ + "nat on ${epair_nat}a inet from ! (${epair_nat}a) to any -> (${epair_nat}a)" \ + "nat on ${epair_nat}a inet from ! (${epair_nat}a) to any -> (${epair_nat}a) port 3000:3001 sticky-address endpoint-independent" + + # Exhaust the available nat ports + for i in $(seq 1 10); do + echo "ping" | jexec client nc -u 198.51.100.32 1234 -w 0 + echo "ping" | jexec client nc -u 198.51.100.22 1234 -w 0 + done +} + +endpoint_independent_exhaust_cleanup() +{ + pft_cleanup + rm -f server1.out + rm -f server2.out +} + atf_test_case "endpoint_independent_pass" "cleanup" endpoint_independent_pass_head() { @@ -851,6 +880,7 @@ atf_init_test_cases() atf_add_test_case "exhaust" atf_add_test_case "nested_anchor" atf_add_test_case "endpoint_independent_compat" + atf_add_test_case "endpoint_independent_exhaust" atf_add_test_case "endpoint_independent_pass" atf_add_test_case "nat6_nolinklocal" atf_add_test_case "empty_table_source_hash" From nobody Tue Nov 25 13:49:40 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dG3w50VkMz6J9rY for ; Tue, 25 Nov 2025 13:49:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dG3w44sPyz3KNJ for ; Tue, 25 Nov 2025 13:49:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764078580; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hSIu8O5tIhKpvK0f33YxwfFoq4uEeVgsaORVcJJVcmQ=; b=X3BCE7aJZ+Zs6Vjo8sSxDp6KkU3dlx5BF0hVUK8FF4KM74IYdTBKtXLlCGgLz+a5DsrdcD QYjP9SR5CjVqFOGUtp0z4cF1JQEiWLYaVGSAtG27Aal3UVML6pJmd4iVGFd07Pi5QxT53b LtdS5v6PDwlxqAdcRJTruASuPMZwoWkA5nbltl00JqhrVfaqJ7LUv1wR0KAb6sEWfjbYRq dC1yg2TspVeEKBVqzZQKZG/6y1I0T2OVlZSZzeUkEbWB5tLyRLG8QhzsSBlfuU1Ccs4RQ3 1ZRFNdvdwFpzZ3T+ifN2DV+pXXU487cOH8ArJ07Dgn+UKD36qqcu2HKBYfq4IA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764078580; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hSIu8O5tIhKpvK0f33YxwfFoq4uEeVgsaORVcJJVcmQ=; b=vjwqAslKr2y3TzjdfCMBN88X6G4GvL1+5jKyrQddXa5M3CcKKWHKpvE5G7db0B2TShPHfm iaQNufcVTNNbqFIjZ9yk+Bt2G5IFNNa3Pr+6+5jV63chKg/Fx8z1k4FnqWnz0RqbADsbsk kWjdtxHg9QE9Z4u8r+jUMcTGLCfCNPS2kVs+YzjHYTBL6Z3KwSnYGyPnZDBsgIF/o3vxnR tYSLZY+9HhfvaWR9DcrqPKfsHGWW1IJ0T+lnsZP3RC3AXSyyxei2BGgTR/xAwkjEbhfo4H E26+kGV9bjQC8xz2+LOrh112rOgvkINb74Ch1nRf2kjZ7W7ia0mUWsEfCV3ZHg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764078580; a=rsa-sha256; cv=none; b=jEkPb930hHdPhq4XvN3xwIoLGAYOwSCa17HTeHZXDdiKdiVRaoNMyom8g6DxBSxvPbBWgi ne38MgdfpPuTvfNT6bIDse+JFMjiM+RGlnzMjbvw1ZQLmRpvJtOxFTcQ5mOERsoATyFwxv 5jMWHdByNfmSb5CBGqkeSXuzMqQHvN0uyxt8MTA3lUDSm7d6LdpjRqQmoKL0u0+qBt9bEN fesd+rjkaJbW6iwbO4F0eRBzQdFAzAjGjGSrfo7uonwYlGMKZn1Se01tuC2+auB+HjI/hE uIlm4L6Nex88ZZhE0lUBpQB5nWA4hEtdXmtrfBmkS1gPw2P8nvf50M21/FLj4w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dG3w449Xtz13Kv for ; Tue, 25 Nov 2025 13:49:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2c48c by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 25 Nov 2025 13:49:40 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 9562994a7aac - main - kernel linker: Disable local sym resolution by default List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9562994a7aacee2baae6ddee1a7b558b48ae39ef Auto-Submitted: auto-generated Date: Tue, 25 Nov 2025 13:49:40 +0000 Message-Id: <6925b3f4.2c48c.61345a6b@gitrepo.freebsd.org> The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=9562994a7aacee2baae6ddee1a7b558b48ae39ef commit 9562994a7aacee2baae6ddee1a7b558b48ae39ef Author: Ed Maste AuthorDate: 2024-11-25 19:05:54 +0000 Commit: Ed Maste CommitDate: 2025-11-25 13:49:20 +0000 kernel linker: Disable local sym resolution by default In 95c20faf11a1 and ecd8245e0d77 kib introduced support to have the kernel linker stop resolving local symbols from other files, but did not enable it by default to avoid surprises. Flip the default now, before FreeBSD 16.0. The debug.link_elf_leak_locals and debug.link_elf_obj_leak_locals sysctls are available to revert to the previous behaviour if necessary. PR: 207898 Reviewed by: bz Relnotes: Yes Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D47742 --- UPDATING | 9 +++++++++ sys/kern/link_elf.c | 2 +- sys/kern/link_elf_obj.c | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/UPDATING b/UPDATING index aaef0e5b4cd3..7f0cb44181d3 100644 --- a/UPDATING +++ b/UPDATING @@ -27,6 +27,15 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 16.x IS SLOW: world, or to merely disable the most expensive debugging functionality at runtime, run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20251125: + The `debug.link_elf_leak_locals` and `debug.link_elf_obj_leak_locals` + sysctls now default to 0, so the kernel module linker no longer + performs symbol resolution against local symbols from other modules. + + If a kernel module now fails to load because of an unresolved symbol, + set these sysctls to 1 and file a bug report including details about + the affected module. + 20251115: The FreeBSD-base repository is now defined in /etc/pkg/FreeBSD.conf, disabled by default. In -CURRENT and -STABLE this points at nightly diff --git a/sys/kern/link_elf.c b/sys/kern/link_elf.c index ebd203858b66..f910fc3d5df5 100644 --- a/sys/kern/link_elf.c +++ b/sys/kern/link_elf.c @@ -203,7 +203,7 @@ static struct linker_class link_elf_class = { link_elf_methods, sizeof(struct elf_file) }; -static bool link_elf_leak_locals = true; +static bool link_elf_leak_locals = false; SYSCTL_BOOL(_debug, OID_AUTO, link_elf_leak_locals, CTLFLAG_RWTUN, &link_elf_leak_locals, 0, "Allow local symbols to participate in global module symbol resolution"); diff --git a/sys/kern/link_elf_obj.c b/sys/kern/link_elf_obj.c index a3a53a39bfd6..759cd75cba31 100644 --- a/sys/kern/link_elf_obj.c +++ b/sys/kern/link_elf_obj.c @@ -192,7 +192,7 @@ static struct linker_class link_elf_class = { link_elf_methods, sizeof(struct elf_file) }; -static bool link_elf_obj_leak_locals = true; +static bool link_elf_obj_leak_locals = false; SYSCTL_BOOL(_debug, OID_AUTO, link_elf_obj_leak_locals, CTLFLAG_RWTUN, &link_elf_obj_leak_locals, 0, "Allow local symbols to participate in global module symbol resolution"); From nobody Tue Nov 25 13:50:20 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dG3wr3bSFz6JBY9 for ; Tue, 25 Nov 2025 13:50:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dG3wr2WyTz3KvK for ; Tue, 25 Nov 2025 13:50:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764078620; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=i39LoQuRGqpak1061/0is9OovXZm1GAFpPNTEYAqlIE=; b=gmh4npYl8cruUvY3GgNrXzd/axht1LWQ6TfcdgsEkknFvfBqCAD+zKjeHypEvgm/EJxDde t8zVbmidZJW4hMwwqUJfSG3ZZD4b0OyU2Skjm/CNz3fkxZQe12cD3c85tDR52XKXnDQ3WV aoNiRNzYHgmWifLhHPJ/tONq8n+NolXgmIEhYjd82ZdbyV6WdeEqitgBQFCVXICsC/m5dk 4C6em/Yv5CcP37JgpROCDsL0MbPR0Owh9nqz1OEc20lP2naVLI0MPYdnSbPedYHhnslmbt fIp2SrQub0xbwHb6kuP3vWYw9BjWXUPiO4CXymRu/5mBPoDBAVISpNAxa89Ufw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764078620; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=i39LoQuRGqpak1061/0is9OovXZm1GAFpPNTEYAqlIE=; b=NRam7XRG4aevyShywWjuKi0Tq9C1N/YymRQ5ZbsWh5mdqpT2yWNDfE3iiQq1lR2xS8zt28 zmSr8AAgyR28jpgDR7zUvDsLZBPsdO9hKm+1g7ULqf/P1gOdHqScjaebykhXdDUQN2y+XT aVMBRECJlH4MuyBalTtRrsLLIHyvXoKGs50nMQOFoilUwtkDL2KS6SymfdRHsgPCs5Y4qd KGirnrl98uSpuJylOIKaBXRlDRoMlZVj2G7co2iDGbxnPo0DqGa35S74t3aTjcIpBseJnq 7VPYRB3wk8OyUtm/ImIP7r+kP28K5b/qYEeBuw1BTWZ0Haxp78kimGEe22MzKQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764078620; a=rsa-sha256; cv=none; b=P2LhqQVBcA3VuAUzS4IgdJb3s5uf870lmc4bzqgoxFf4e6H5GJDRsBn0MFpckEo4AEqnCt C6iTHjrNBkYtHzEd6usIWX+FQwghjcVE78izC5EUYJAPx5cocE5LVVzKHnu60pa+nigU9v nqc3SGkeNJdrrkpqycWGcP2Be/FFKjCZbAwQ65JzyTfy4oIVzSFNmJGD2YPlKWqC8Hs0O5 pry4M7bShUKV1ryGUFkKypNuQ5yXE9+q9JYEQWRtsayL8YjwdeVIS2SLJjhLGNixeqce9/ 91kU7HEdBFM68a8W03w3YVJ515kM5SNr346FFtQkChne6Nta8O3gZsZ8USZkOg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dG3wr1npTz137b for ; Tue, 25 Nov 2025 13:50:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2d192 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 25 Nov 2025 13:50:20 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 238ad591da9e - main - libpfctl: improve error handling List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 238ad591da9eede122a708be925b6b6a20e9046b Auto-Submitted: auto-generated Date: Tue, 25 Nov 2025 13:50:20 +0000 Message-Id: <6925b41c.2d192.726c8765@gitrepo.freebsd.org> The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=238ad591da9eede122a708be925b6b6a20e9046b commit 238ad591da9eede122a708be925b6b6a20e9046b Author: Kristof Provost AuthorDate: 2025-11-25 13:48:29 +0000 Commit: Kristof Provost CommitDate: 2025-11-25 13:50:09 +0000 libpfctl: improve error handling If we fail to open /dev/pf don't try to close it again. That would result in errno getting overwritten by close(), hiding potentially useful information. MFC after: 2 weeks Sponsored by: Rubicon Communications, LLC ("Netgate") --- lib/libpfctl/libpfctl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/libpfctl/libpfctl.c b/lib/libpfctl/libpfctl.c index e747763ae6ef..3db596d6fd38 100644 --- a/lib/libpfctl/libpfctl.c +++ b/lib/libpfctl/libpfctl.c @@ -76,7 +76,6 @@ pfctl_open(const char *pf_device) struct pfctl_handle *h; h = calloc(1, sizeof(struct pfctl_handle)); - h->fd = -1; h->fd = open(pf_device, O_RDWR); if (h->fd < 0) @@ -87,7 +86,8 @@ pfctl_open(const char *pf_device) return (h); error: - close(h->fd); + if (h->fd != -1) + close(h->fd); snl_free(&h->ss); free(h); From nobody Tue Nov 25 14:02:12 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dG4BX4YMnz6JBqm for ; Tue, 25 Nov 2025 14:02:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dG4BX3fwsz3NFj for ; Tue, 25 Nov 2025 14:02:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764079332; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1cxLiYDuSmhXfYN4K0RLCPjuw+1sLfH3SpzK4lZz7aU=; b=TbNoiJX8z6IuSI7zHnJut2Pd3qkHpz076X5nngHKvPNuVQhvAZnHwSecofL/l7zTT4E/3x m32upi1lfNYbXwJVxgxdv+olaeThCnurlB+Majk9lpldWfS0Hhcy6OEAw2l86xOeFGdXE1 FlZnqEIO/+VWvPKNkvOhF4+YASZFUn9/yGk0OX/P9GwZzD5ME0WbnM/Fak2v0iFMtAQEU+ wO57uZHOxFb10354XkhWPSxtWSg30k8cADWZzAPv7IQckKsG28Avq+RGzcJnJElUH1Rpn7 J2JD3+IkN+sgsYUhvCULs0JVa5eYwJaUPIW+CFSP0gILKubUWMf9JCc04xjMUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764079332; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1cxLiYDuSmhXfYN4K0RLCPjuw+1sLfH3SpzK4lZz7aU=; b=GzjDza+uXWHr/I+C2N+FD42f58Ja81MGNl2QKt53WwCszVlqWeA3JxlYmqy5sBhncKWgY5 jEPbwgLrtyUIqh7KYrgwhN2/mbQMqtPg/ApxbzUMzla4CWFtRu4g3M14iWao11ckc91tWr GQvlbZ3HgbZblhN/K6JEPb38RkaAz5pzAPHa+mV4aXJOUa7/gwakHSo3fSTMa80ygSv/qg pXcXJ8SxtztY7iDlCS5Ed2CMfEzVNekdMjxOS5mXnC3pT/OB827xUK+gEn11VQCiy0CTHf vGoG9vUTt5dyic+mPGHuD6NlFk1bQBcgdy3HBfq7pBB6LAqtsyT0DLFGiW+oGA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764079332; a=rsa-sha256; cv=none; b=J5LsML5D60LsD7Y96e6soP19ELy7F/ZNgpgoR1WQc//RMEJ1dnEZR+jhy0zZSI7SKHRo1x CVa8uS4pqGeCEbkwSDUnw2XKddIDpEJdhZOukNg/7tvFTbO71kovX5l8P/+bX+DPhKQcsY pJbT0EZQhi9Ku4vH3dnhQ4O+vRn7asefhwKiKTEOtMhgiDR/xj88MGHp0Cbtjqullk46lU sHAh+VQA6AIKsxUUgHeqEyQbTifxu/VZyIj+XVyu8jA1Z2uDdx5zCk+/ImZX+XZqvyJZnl G6lNPzsuX5JAByS7NiYgbh3GbMC7R49k47QOu1b/kQkIaKHLFCT+2PZX0wCFDw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dG4BX3C2Bz138N for ; Tue, 25 Nov 2025 14:02:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2d140 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 25 Nov 2025 14:02:12 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: f8bf6f81d6c2 - stable/14 - kevent: Hold the knlist mutex when invoking f_event(NOTE_FORK) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: f8bf6f81d6c2b73b065befedddac3bf29f2963de Auto-Submitted: auto-generated Date: Tue, 25 Nov 2025 14:02:12 +0000 Message-Id: <6925b6e4.2d140.4f1a4e33@gitrepo.freebsd.org> The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=f8bf6f81d6c2b73b065befedddac3bf29f2963de commit f8bf6f81d6c2b73b065befedddac3bf29f2963de Author: Mark Johnston AuthorDate: 2025-11-18 14:22:04 +0000 Commit: Mark Johnston CommitDate: 2025-11-25 13:57:14 +0000 kevent: Hold the knlist mutex when invoking f_event(NOTE_FORK) In general f_event is supposed to be called with the knlist mutex held, so lock it earlier to follow this protocol. Also make sure that the update to kn_fflags is synchronized. Lock the kqueue itself earlier in the case where the knote is activated, to avoid locking and unlocking the kqueue twice. PR: 291005 Reported by: Qiu-ji Chen Reviewed by: kib MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D53762 (cherry picked from commit d795c753e262b97a93dc353aa66b858e1b1969d1) --- sys/kern/kern_event.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/sys/kern/kern_event.c b/sys/kern/kern_event.c index d1145c37e128..4aba212544f7 100644 --- a/sys/kern/kern_event.c +++ b/sys/kern/kern_event.c @@ -603,12 +603,20 @@ knote_fork(struct knlist *list, int pid) kev.data = kn->kn_id; /* parent */ kev.udata = kn->kn_kevent.udata;/* preserve udata */ error = kqueue_register(kq, &kev, NULL, M_NOWAIT); + + /* + * Serialize updates to the kn_kevent fields with threads + * scanning the queue. + */ + list->kl_lock(list->kl_lockarg); if (error) kn->kn_fflags |= NOTE_TRACKERR; - if (kn->kn_fop->f_event(kn, NOTE_FORK)) - KNOTE_ACTIVATE(kn, 0); - list->kl_lock(list->kl_lockarg); - KQ_LOCK(kq); + if (kn->kn_fop->f_event(kn, NOTE_FORK)) { + KQ_LOCK(kq); + KNOTE_ACTIVATE(kn, 1); + } else { + KQ_LOCK(kq); + } kn_leave_flux(kn); KQ_UNLOCK_FLUX(kq); } From nobody Tue Nov 25 14:02:28 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dG4Br4fWmz6JBqq for ; Tue, 25 Nov 2025 14:02:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dG4Br3Nnqz3NdJ for ; Tue, 25 Nov 2025 14:02:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764079348; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=14liq3eF8ump4gsjnQtdrWuvftj5cvnAE6cxwciJu5A=; b=uKe61f6RLTV1YsKljWYsVCBaB6LZi2m5O8Z9FV8AXwd+452dj13oyASvuNW5JGxzC8lJ+f /xDJcubzDs0avzp42MBqdqocd0D0K6w4WTQ61HB6l2SRKRGxq+WoPI4I4dpFpnpfwclTPk uQIN5w+kLawujJjXBYoyZFS3Z3H7495fZJOx5WSy5Fg0eSKLXP09KFS+ALcpPn/F+727TK Q+yr5++xeBqtlj9oYb7GlK38zWwBYYwY8TUEFy+A05Pz7dCBp2gpRSMrtQSh0Kt2wmDVM5 2G0U7AJFLp4kO36MWe3A0w4nBAJZ3CngVdVQzGErr2HkBeICtJEJ1UxgqyJKdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764079348; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=14liq3eF8ump4gsjnQtdrWuvftj5cvnAE6cxwciJu5A=; b=uAGAYCB0m8FrkHxbWS02fZ2k33bY7Q8z7hEf00Omw4zxtbgPqbsVy3DIZewApNzVI5vnP9 H7sL9N3OthSe1nMzgKCH8XKttDgpIJUM78g0eQ2fNsPgVpP/P+TBiFu1YFgWlOpD44P3Qr nJh8OVFQzNxTcqv78zMPkKG+XVSsXqDDEkIFvrjWxSMWm/yQWe128kU05/8+tD5t63vOMi 45qrDS4KvWevfeLuu4rToRUkbsQ15sRsCPaf3SMsgGYgus0WAVQ5bFMqUDfZL6YwKTRd3i u8IbnjA05/hb1km4/w4cOl0efeLoYfuUg7uMo7aqJyvTUsIXP/m68PUk60ffFQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764079348; a=rsa-sha256; cv=none; b=gXQRsDZMS058Y7BeX6/IYTD3X1J+l0WDv4545LYuJmECUABbmQdoNI3CZFfy3SjxTPqdZU HrY3E1Y8pfWwDaI58YMoZlQxxJ/QzcOKMQ7jxTdBVk8AzQASTkgr0afJTNkNsnSjlQFp+0 5KrEzNOMbL/E4Y+zHFCNSwyMqGn10DUm1thOmWcOSLN04oDCt9EE/a+clTwyMv+G6yxmCJ HqHuLfyYJInSq5wl07c5UJhdLV8O98kbofbSOQOHouOySgZrf+51Luru0jVeA2LdOBP67v 85Lms3RSHg/AfTa6e1I/P3dyRkZEGImtN5L4X/Dpt/Ig1jEG82pWr7TnL6KlPA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dG4Br2xwwz13vn for ; Tue, 25 Nov 2025 14:02:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2da45 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 25 Nov 2025 14:02:28 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 23ddcd227ab7 - stable/15 - kevent: Hold the knlist mutex when invoking f_event(NOTE_FORK) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 23ddcd227ab71b1d687f9ea298696f7d082c9cd5 Auto-Submitted: auto-generated Date: Tue, 25 Nov 2025 14:02:28 +0000 Message-Id: <6925b6f4.2da45.303f61bd@gitrepo.freebsd.org> The branch stable/15 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=23ddcd227ab71b1d687f9ea298696f7d082c9cd5 commit 23ddcd227ab71b1d687f9ea298696f7d082c9cd5 Author: Mark Johnston AuthorDate: 2025-11-18 14:22:04 +0000 Commit: Mark Johnston CommitDate: 2025-11-25 14:02:20 +0000 kevent: Hold the knlist mutex when invoking f_event(NOTE_FORK) In general f_event is supposed to be called with the knlist mutex held, so lock it earlier to follow this protocol. Also make sure that the update to kn_fflags is synchronized. Lock the kqueue itself earlier in the case where the knote is activated, to avoid locking and unlocking the kqueue twice. PR: 291005 Reported by: Qiu-ji Chen Reviewed by: kib MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D53762 (cherry picked from commit d795c753e262b97a93dc353aa66b858e1b1969d1) --- sys/kern/kern_event.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/sys/kern/kern_event.c b/sys/kern/kern_event.c index 84af7b264d08..c18bf3b12352 100644 --- a/sys/kern/kern_event.c +++ b/sys/kern/kern_event.c @@ -627,12 +627,20 @@ knote_fork(struct knlist *list, int pid) kev.data = kn->kn_id; /* parent */ kev.udata = kn->kn_kevent.udata;/* preserve udata */ error = kqueue_register(kq, &kev, NULL, M_NOWAIT); + + /* + * Serialize updates to the kn_kevent fields with threads + * scanning the queue. + */ + list->kl_lock(list->kl_lockarg); if (error) kn->kn_fflags |= NOTE_TRACKERR; - if (kn->kn_fop->f_event(kn, NOTE_FORK)) - KNOTE_ACTIVATE(kn, 0); - list->kl_lock(list->kl_lockarg); - KQ_LOCK(kq); + if (kn->kn_fop->f_event(kn, NOTE_FORK)) { + KQ_LOCK(kq); + KNOTE_ACTIVATE(kn, 1); + } else { + KQ_LOCK(kq); + } kn_leave_flux(kn); KQ_UNLOCK_FLUX(kq); } From nobody Tue Nov 25 14:15:17 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dG4Td5gkkz6JCls for ; Tue, 25 Nov 2025 14:15:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dG4Td526hz3PmL for ; Tue, 25 Nov 2025 14:15:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764080117; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ukxo0uCAqRI0eGEZSTV5u972SoWwv22P4++AzUor4j0=; b=qJ93lEFNfRuKhJqBb0tw1NoOITjB9Ku4NiPFmLtZZRoC1L8+wssoU8BMD8hgaCaXmUK9Lw ecjxYDf19VpeEw0Swi/jVEAU9vRNfNSNNYvHrJCkra6PXCT6LlzWgy8viLujZmtdDh2ZZi ke27Y0zSgI++s6RiyKgRyPENJZqldhzEff7cFWfZ6AMcuD7Dt2XvQcU1uQU3pKAXnIvrce u61QGAjgkuKOFBYcNHKakO+GLoCWGPScuQHbR3nY4Altp7/a1UmRxdDWwwbQeAnkKgBqeK GFvF0iluF0EDGFezm+PrbqIXJKmDbOSJdC8K9SKQhEDAfFTlDjtdKOLB15dLzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764080117; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ukxo0uCAqRI0eGEZSTV5u972SoWwv22P4++AzUor4j0=; b=SqK3dfWlaoeCuvvbHUX/5xXKfgEwo2xDrqVoSgN3beQVOOyArn9jj54Y1AIh9tPyJ41mbD yOgHGeeuSX8kB/kjhdgjd0iNHKpGFMhU08jnTVk6WpVWGYvdwo784f/8D7bbKaz92K/CMW UqPpkYuSFb9c8aHKKxc+KeVFInWQxVs+SH6O2cY6SovQL3uU3+n3+PR/Myr8q8Nk+TeXFl QRe+SE3uNxsjCJ5hSWvz0LjrKyizKIOEdrrwKtvkwxtjxnrHgUSfDgnB57UBf4ZOHPFeIR dd1mRxbSKhzaWAmbJRQh5JOQNs6+lCCTWOyLW0zFkrsuu9GDHsvdo/ZWeMM6Hw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764080117; a=rsa-sha256; cv=none; b=TCWtFvpLBl/Qs8hhYKHKAMXN0X4ts4RiRX4BL7Am6zSL1zEvlsd4LkKq8PokhRlSWTlNR5 eDjcfxHWl2znQFVPLT/wUklMTq4xFg1zDtyPjT2orN7AX6XzLk9te/tUKZRbVI72kfE9xU YFtysTFi6UKdbSQdyAlPFb6V3zqfS5h9ogEpF9qx+9fpl5bWLkZY3/c1Mn+Xa7dQbGVtmJ vlTKQHOV29BnBZKSgEZYbZdzZ63Z4tTX6uvJn0Yj5wF2kQbdD2Xqz8MIDOp/w1UOX56NMe hanFrTYaAFf/fLAnOFeceZNgDE4+1dHAmkdvFl+DqUrMUOe6jZQTYnuJyTw/ng== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dG4Td4bHMz13yx for ; Tue, 25 Nov 2025 14:15:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2f391 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 25 Nov 2025 14:15:17 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: George V. Neville-Neil Subject: git: a8151f196c3c - main - Add description of the LD_DEBUG environment variable. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gnn X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a8151f196c3cc6af2f8de5682e8522df5986dcd6 Auto-Submitted: auto-generated Date: Tue, 25 Nov 2025 14:15:17 +0000 Message-Id: <6925b9f5.2f391.76b3a462@gitrepo.freebsd.org> The branch main has been updated by gnn: URL: https://cgit.FreeBSD.org/src/commit/?id=a8151f196c3cc6af2f8de5682e8522df5986dcd6 commit a8151f196c3cc6af2f8de5682e8522df5986dcd6 Author: George V. Neville-Neil AuthorDate: 2025-11-25 14:14:26 +0000 Commit: George V. Neville-Neil CommitDate: 2025-11-25 14:14:26 +0000 Add description of the LD_DEBUG environment variable. --- libexec/rtld-elf/rtld.1 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libexec/rtld-elf/rtld.1 b/libexec/rtld-elf/rtld.1 index 62e4fc5676c2..04dcb28d7f8f 100644 --- a/libexec/rtld-elf/rtld.1 +++ b/libexec/rtld-elf/rtld.1 @@ -26,7 +26,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd July 24, 2024 +.Dd November 25, 2025 .Dt RTLD 1 .Os .Sh NAME @@ -153,6 +153,11 @@ If set, .Nm will print a table containing all relocations after symbol binding and relocation. +.It Ev LD_DEBUG +If set, +.Nm +will print voluminous internal debugging messages as it loads +and links a program. .It Ev LD_DUMP_REL_PRE If set, .Nm From nobody Tue Nov 25 15:04:43 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dG5Zh0dbfz6JHJp for ; Tue, 25 Nov 2025 15:04:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dG5Zg6xBhz3YsR for ; Tue, 25 Nov 2025 15:04:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764083084; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1gB1OC14ObAtgs1Emd0H2h4zuVeWhQ90Cl5yKzr3Lss=; b=yxhBaywDUeznd78MIlv/EMWZfwiDZxnGLMdkK+9VXUrwPANMe1V7eVkNo7KdN2zlINCPgl zobufEfxXCIm8zB5tnXh05soD3wNJO0vA1a2mniCvyj/CNc5MmPIzG9HM+ytptGwkLqUqy xFsdbN2HB0JxQOKgxg0Yh5Ic7ViwnD2U9ALmObZnJpV92BzXxh3npG8QE95fFTPls7PvWn wN68vuv7Ak5thQ6DaP5AoqcpLUfHyeKfr2zFXZB4KSygp+sy69aTI850IVS+wRPA+Av2D5 Y7OjB6AE4upwi8gB6h2zRKr963GVof6YjjJaWplLxNYf1furejIQnv1f2YbrVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764083084; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1gB1OC14ObAtgs1Emd0H2h4zuVeWhQ90Cl5yKzr3Lss=; b=Sy3la0G+NW3H392YFqMyTWXNw5/fuqEjC8g6DkmEP1N9VmHxKRNdk+Q+9tjX8H3UzkRtw5 0F5sB7maB6EXzfUQYeB1DYGSurZqidPDCtTMD+ekIcjqbUXPb5kt8dIZO/G4JxQ/iLrEI4 JSrgh31klKrBxrnkhGyIQcM8AAYQaTS0FNj73uZmG4qDzOfkwc+mWhMpnbl5Ww7JBUmq7g qTBQi+x0xe8owEHJ6O5k2MvuEmgLYnT8SLg70x//iH3giOBV5q3d1QSn7MgVU5qtTVVF1o gnyWcq7hT7xJuWhgMMhYSNwfy8+BE5/dxQaOpwjYdicNLYCLfVf4rpvgq2FylQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764083084; a=rsa-sha256; cv=none; b=ekyQeLwJ7fHxmskC/Y2DKzuBUC3qggZAJ9ZqtA8tg1twjsXITf8Vp7BlpZZpnHw2ErGiHL cPdlSJ/1w50HndH+yFuWlH2yK2/tiandGozQekJXjvhde2DYKqcc7eIc9GjGdssZsvMygm jOMpBx2r9W362xORm3R/JE1Tx3/eBHm8T/MY64ZFXIOn1B9CSeCK2EbPvSl790g8ioPVNV YZYO9A3b+3NuuwGuNCYjl2dpzKrJvFTG/cypF2f7YE92gKTbWeHObq8SsoxFdPeEjvE9UD iwbOXGpo9NfuLnIHzySkNdRLZ67GsxIl0Hfgbsg+agKxAUGsGDeI54WfaUA4+w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dG5Zg6Fzdz156k for ; Tue, 25 Nov 2025 15:04:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 348ed by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 25 Nov 2025 15:04:43 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: bc3b72ff4895 - main - pf: relax sctp v_tag verification List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bc3b72ff48953551e0e8bd6e5a2c718ecd973285 Auto-Submitted: auto-generated Date: Tue, 25 Nov 2025 15:04:43 +0000 Message-Id: <6925c58b.348ed.7b222851@gitrepo.freebsd.org> The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=bc3b72ff48953551e0e8bd6e5a2c718ecd973285 commit bc3b72ff48953551e0e8bd6e5a2c718ecd973285 Author: Kristof Provost AuthorDate: 2025-11-25 09:59:02 +0000 Commit: Kristof Provost CommitDate: 2025-11-25 14:59:55 +0000 pf: relax sctp v_tag verification pf was too strict when validating SCTP tags. When a server receives a retransmitted INIT it will reply with a random initiate tag every time. However, pf saves the first initiate tag and expects every subsequent INIT_ACK retransmission to have the same tag. This is not the case, leading to endless INIT/INIT_ACK cycles. Allow the tag to be updated as long as we've not gone past COOKIE_WAIT. Add a test case to verify this. MFC after: 2 weeks See also: https://redmine.pfsense.org/issues/16516 Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/netpfil/pf/pf.c | 6 +++- tests/sys/netpfil/pf/sctp.py | 67 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 72 insertions(+), 1 deletion(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 5e919e35b07b..74d2182fe77b 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -7396,7 +7396,11 @@ pf_sctp_track(struct pf_kstate *state, struct pf_pdesc *pd, } if (src->scrub != NULL) { - if (src->scrub->pfss_v_tag == 0) + /* + * Allow tags to be updated, in case of retransmission of + * INIT/INIT_ACK chunks. + **/ + if (src->state <= SCTP_COOKIE_WAIT) src->scrub->pfss_v_tag = pd->hdr.sctp.v_tag; else if (src->scrub->pfss_v_tag != pd->hdr.sctp.v_tag) return (PF_DROP); diff --git a/tests/sys/netpfil/pf/sctp.py b/tests/sys/netpfil/pf/sctp.py index f492f26b63a1..9f1d7dea4ef6 100644 --- a/tests/sys/netpfil/pf/sctp.py +++ b/tests/sys/netpfil/pf/sctp.py @@ -551,6 +551,73 @@ class TestSCTP(VnetTestTemplate): assert re.search(r"epair.*sctp 192.0.2.1:.*192.0.2.3:1234", states) assert re.search(r"epair.*sctp 192.0.2.1:.*192.0.2.2:1234", states) +class TestSCTP_SRV(VnetTestTemplate): + REQUIRED_MODULES = ["sctp", "pf"] + TOPOLOGY = { + "vnet1": {"ifaces": ["if1"]}, + "vnet2": {"ifaces": ["if1"]}, + "if1": {"prefixes4": [("192.0.2.1/24", "192.0.2.2/24")]}, + } + + def vnet2_handler(self, vnet): + ToolsHelper.print_output("/sbin/pfctl -e") + ToolsHelper.pf_rules([ + "set state-policy if-bound", + "pass inet proto sctp", + "pass on lo"]) + + # Start an SCTP server process, pipe the ppid + data back to the other vnet? + srv = SCTPServer(socket.AF_INET, port=1234) + while True: + srv.accept(vnet) + + @pytest.mark.require_user("root") + @pytest.mark.require_progs(["scapy"]) + def test_initiate_tag_check(self): + # Ensure we don't send ABORTs in response to the other end's INIT_ACK + # That'd interfere with our test. + ToolsHelper.print_output("/sbin/sysctl net.inet.sctp.blackhole=2") + + import scapy.all as sp + + packet = sp.IP(src="192.0.2.1", dst="192.0.2.2") \ + / sp.SCTP(sport=1234, dport=1234) \ + / sp.SCTPChunkInit(init_tag=1, n_in_streams=1, n_out_streams=1, a_rwnd=1500) + packet.show() + + r = sp.sr1(packet, timeout=3) + assert r + r.show() + assert r.getlayer(sp.SCTP) + assert r.getlayer(sp.SCTPChunkInitAck) + assert r.getlayer(sp.SCTP).tag == 1 + + # Send another INIT with the same initiate tag, expect another init ack + packet = sp.IP(src="192.0.2.1", dst="192.0.2.2") \ + / sp.SCTP(sport=1234, dport=1234) \ + / sp.SCTPChunkInit(init_tag=1, n_in_streams=1, n_out_streams=1, a_rwnd=1500) + packet.show() + + r = sp.sr1(packet, timeout=3) + assert r + r.show() + assert r.getlayer(sp.SCTP) + assert r.getlayer(sp.SCTPChunkInitAck) + assert r.getlayer(sp.SCTP).tag == 1 + + # Send an INIT with a different initiate tag, expect another init ack + packet = sp.IP(src="192.0.2.1", dst="192.0.2.2") \ + / sp.SCTP(sport=1234, dport=1234) \ + / sp.SCTPChunkInit(init_tag=42, n_in_streams=1, n_out_streams=1, a_rwnd=1500) + packet.show() + + r = sp.sr1(packet, timeout=3) + assert r + r.show() + assert r.getlayer(sp.SCTP) + assert r.getlayer(sp.SCTPChunkInitAck) + assert r.getlayer(sp.SCTP).tag == 42 + class TestSCTPv6(VnetTestTemplate): REQUIRED_MODULES = ["sctp", "pf"] TOPOLOGY = { From nobody Tue Nov 25 16:17:51 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dG7C360KSz6HP87 for ; Tue, 25 Nov 2025 16:17:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dG7C35J3lz3jxp for ; Tue, 25 Nov 2025 16:17:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764087471; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wPq6L+KYkfcmwKDmJ63YcuVP0CAEwkf/kbHf4h8nGRw=; b=ZRtokLJJpOf7jeSIDk3vllHVRNjNjzQSEgkDArzfelAerBzp34qefQK4I+o/7RWJUm/2QI PKPEh4bV0KD4AIhfxJU3DisgP9gVUR5uPx9e/CEHxrNZnflW7cgA9QVFeRsjn311IJ5uDZ HOVzdLxgXBF4th3MOMw+zBQznroqAzhA4jO0GN5OIwSwU31lgA9oXOgomyVo81f5g2SWcl pthGPKoP2WOOZKwEks/GuZd7hpi5uw+fugFEdouohydW+g6hNIkLzHYEDGUbsN219n63jp UBn1S/PFma5CmyASw0k2XdgP9o2DLJdYqGsfpz5iQbazgCYtObc52Hs2SiV+uw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764087471; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wPq6L+KYkfcmwKDmJ63YcuVP0CAEwkf/kbHf4h8nGRw=; b=hNDcdJAICFeIfMrSrttwGXrA6vTxk26mBEPlEkCAgo6m1KoBgRhAZXednG4MW1fMamiift DzdFtT3mX4mvkXQSLepH+k6LCs58gZ2YCFPEd63Q2dhghM+KHRXu69qCrtYmN140CFgQ8/ TV35b8+z729+n8E5LLYVa2cP/7XPIROnllHGBo1RCXfaiU3Gqzf9Lqt051wJTbYM6CRbj2 AO1NgCNf+O3/c3RVUnCLORcALg9hQeN4o33JgiQoxfqDLGm3s2FZ5WWE3zsUmuR8Ks8Shb Tz+uVKJoBXVHbUCxiWcXZW9bq95s+xhO2SQrFERJqHycUriqjMprkj3rJcA5/w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764087471; a=rsa-sha256; cv=none; b=ILaGTd77DXj6zhpjIi5AP8l2dczJe+tNywBCEVsf33mMON8+XN0FFPAVhNxqMoOKVoBKl8 mm3bycQDJNEzJkGyOMfz/xmsqbna2DL1ne6+kcp45zZqfn0k5hfrbzbHZ2GDxGcfel6ceG F9gGfqZgD+L54K56fpkskZ/XcNldtAQnEp8Bd8jtmjAbuXRnGLkqDH4G+CvG+pz+V783bf rtY+qhmmEheHCuYKkRW5nmUMnCRmYwsJInkJCIs8YWC0sKeT/cJo1GhUSR7nkXVmVMtebR lAtRlLRklodXCpYBMdZap8HHIwPd1vYfA1ACR8rzeoZSJ70YCUmwgwud3Vw3Jg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dG7C34Mblz17V9 for ; Tue, 25 Nov 2025 16:17:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3b42c by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 25 Nov 2025 16:17:51 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 301b8a806f79 - main - nvme: Minor style(9) fixes List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 301b8a806f79292ee3324ca938a4d938df1911e8 Auto-Submitted: auto-generated Date: Tue, 25 Nov 2025 16:17:51 +0000 Message-Id: <6925d6af.3b42c.336a0065@gitrepo.freebsd.org> The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=301b8a806f79292ee3324ca938a4d938df1911e8 commit 301b8a806f79292ee3324ca938a4d938df1911e8 Author: Warner Losh AuthorDate: 2025-11-25 16:10:23 +0000 Commit: Warner Losh CommitDate: 2025-11-25 16:12:51 +0000 nvme: Minor style(9) fixes needs to be first after . And we don't need both sys/param.h and sys/types.h. Fixes: 032fbda024d78 Sponsored by: Netflix --- sys/dev/nvme/nvme.h | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/sys/dev/nvme/nvme.h b/sys/dev/nvme/nvme.h index 3de65a4a481f..ddbc149802f4 100644 --- a/sys/dev/nvme/nvme.h +++ b/sys/dev/nvme/nvme.h @@ -29,15 +29,13 @@ #ifndef __NVME_H__ #define __NVME_H__ -#ifdef _KERNEL -#include -#endif - #include -#include -#ifndef _KERNEL +#ifdef _KERNEL +#include +#else #include #endif +#include struct sbuf; @@ -1909,7 +1907,6 @@ void nvme_sc_sbuf(const struct nvme_completion *cpl, struct sbuf *sbuf); void nvme_strvis(uint8_t *dst, const uint8_t *src, int dstlen, int srclen); #ifdef _KERNEL -#include #include struct bio; From nobody Tue Nov 25 17:14:28 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dG8SN3VPpz6HT7j for ; Tue, 25 Nov 2025 17:14:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dG8SN2XXWz3r21 for ; Tue, 25 Nov 2025 17:14:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764090868; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7VMAJy4HpM99nYgFeiiZ6aZoU+VWS56r7H2pQNAmf7E=; b=GEouVks66pUDfrHX9PDmPW+7UmBKZfjaU0+Etb+ZogBoVWSZEuzRYFmvc6p8H9G/so4WKV UMy5Ygqg3Y3iL1bkczuMplPw1b3S8vPxO1JTv1WWuqxcqjMuj5647rjKUHjZmkSh6q6ZWM 0M9FAUHZAcFqHHRlW60C4wzHvf1TaeWhc4/QS36smdpJ944y3J4xov4ijW2CEr+hKwVHWN 5IblAaJY4OdxwrNZR0sFgCNkIOVU/sjTVs1/IBz/X2c3YgLBw5qQ4CJsPEmecEgab7jC5C xHSnNFk/hbGavuhztOFyiv6G9O368v/q8h7FvkSDgJ1TesxA6AzoZ5rlDpQwag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764090868; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7VMAJy4HpM99nYgFeiiZ6aZoU+VWS56r7H2pQNAmf7E=; b=yvcKdmsgqSxhbYl0twiVFcdfcVSqxGXKIttb/myDNZs1tyTDXl15s7R8TnJqIarnMXqCDU 0pFEb4RgesoEF8Tzp9l5IoKhOWNUN6rCbYTv4DA5fJG+Y7ZFwizdxhwXtwkqy96ph0ahcC uPyXukdGnH3oxZdA+vMhOUHbOAr1FYq/PzUdQ7mtLeW3fE0ejaerDK7teQeG7LkeyFRf+t ElLDvprSrktbIQoYySIZEevkLKDGExcVD/oAukqnEmxfRpAzyr4UtQOZLukO2g8Lq7jFMw kePxmKxexT1GsKJYRhTRVFnfPGTy6M0dCJQwaRhgxmeiw465U8dlC4eQBcAhzw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764090868; a=rsa-sha256; cv=none; b=teCz7fmiikVVANlMsm45dBtYf4Lg9bqrBnRW015y+6xOTtenddP1qY9S+w4ZmwmIMeklW9 JioiLJxT1zLrMQDQae0X8Fzs7T98DDfxvUOvA0148KfRGxDkyneS1uPa8paLhB3dDWdVca VCQmrlm66VJuJV06G/hn+OkDUANkGv/1BPPAKrsW6JaHNe6SHX7Ydt7ciNj5iTue49TFgv DfOpxrWPFU2f8i5tFFBpiK6wnYeLquMCE+W0+yVHalfkd+ul/p9/INoKEL3JPGuXY2IfPw +PUDQTNzhfQgy802cn4wAf61aH6YJQ6Dke+Nn5N9jkNp/JHgfzpgODDPsps1/g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dG8SN25LXz186s for ; Tue, 25 Nov 2025 17:14:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 8ba9 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 25 Nov 2025 17:14:28 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: fad4c92b78a1 - main - Revert "kernel linker: Disable local sym resolution by default" List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fad4c92b78a123f87195173ac118655fa8e325cd Auto-Submitted: auto-generated Date: Tue, 25 Nov 2025 17:14:28 +0000 Message-Id: <6925e3f4.8ba9.54553559@gitrepo.freebsd.org> The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=fad4c92b78a123f87195173ac118655fa8e325cd commit fad4c92b78a123f87195173ac118655fa8e325cd Author: Ed Maste AuthorDate: 2025-11-25 17:12:36 +0000 Commit: Ed Maste CommitDate: 2025-11-25 17:14:10 +0000 Revert "kernel linker: Disable local sym resolution by default" I've received a report of a failure from resolving kern_kmq_open. Revert for now as we are currently in stabweek. This reverts commit 9562994a7aacee2baae6ddee1a7b558b48ae39ef. Reported by: mav --- UPDATING | 9 --------- sys/kern/link_elf.c | 2 +- sys/kern/link_elf_obj.c | 2 +- 3 files changed, 2 insertions(+), 11 deletions(-) diff --git a/UPDATING b/UPDATING index 7f0cb44181d3..aaef0e5b4cd3 100644 --- a/UPDATING +++ b/UPDATING @@ -27,15 +27,6 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 16.x IS SLOW: world, or to merely disable the most expensive debugging functionality at runtime, run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) -20251125: - The `debug.link_elf_leak_locals` and `debug.link_elf_obj_leak_locals` - sysctls now default to 0, so the kernel module linker no longer - performs symbol resolution against local symbols from other modules. - - If a kernel module now fails to load because of an unresolved symbol, - set these sysctls to 1 and file a bug report including details about - the affected module. - 20251115: The FreeBSD-base repository is now defined in /etc/pkg/FreeBSD.conf, disabled by default. In -CURRENT and -STABLE this points at nightly diff --git a/sys/kern/link_elf.c b/sys/kern/link_elf.c index f910fc3d5df5..ebd203858b66 100644 --- a/sys/kern/link_elf.c +++ b/sys/kern/link_elf.c @@ -203,7 +203,7 @@ static struct linker_class link_elf_class = { link_elf_methods, sizeof(struct elf_file) }; -static bool link_elf_leak_locals = false; +static bool link_elf_leak_locals = true; SYSCTL_BOOL(_debug, OID_AUTO, link_elf_leak_locals, CTLFLAG_RWTUN, &link_elf_leak_locals, 0, "Allow local symbols to participate in global module symbol resolution"); diff --git a/sys/kern/link_elf_obj.c b/sys/kern/link_elf_obj.c index 759cd75cba31..a3a53a39bfd6 100644 --- a/sys/kern/link_elf_obj.c +++ b/sys/kern/link_elf_obj.c @@ -192,7 +192,7 @@ static struct linker_class link_elf_class = { link_elf_methods, sizeof(struct elf_file) }; -static bool link_elf_obj_leak_locals = false; +static bool link_elf_obj_leak_locals = true; SYSCTL_BOOL(_debug, OID_AUTO, link_elf_obj_leak_locals, CTLFLAG_RWTUN, &link_elf_obj_leak_locals, 0, "Allow local symbols to participate in global module symbol resolution"); From nobody Tue Nov 25 17:39:24 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dG91Q3Pclz6HW0j; Tue, 25 Nov 2025 17:39:38 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) 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 "E8" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dG91Q0ZhSz3tjQ; Tue, 25 Nov 2025 17:39:38 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Authentication-Results: mx1.freebsd.org; none 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 47BE4A64805; Tue, 25 Nov 2025 17:39:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=zabbadoz.net; s=20240622; t=1764092353; bh=GqBfSzO18v9LBnifEIE34G2NA/JBgzSCUQa85HeGYnk=; h=Date:From:To:cc:Subject:In-Reply-To:References; b=isaWlZO4z6jtBT1T6MefGrAoY+jHiIOG21eV9Yz0B2+Rln1AfLQkKQRbQY8W9LS+/ rj+vyCtdlsG4uyamMXKooE12QUUdY5MhmQCA/w3ExvBTU8uP7QWec0BarAVfk6v6Su kcyf6tsOfOKJaKp7b2euVPzmVu7DU2JpMok92sqvKghmb2wv/aJPQbpKOjE4Vm2PsO 6MTWbIw2syWOnJhILmHmSHgzXkEgyQkL6WsgZjVPu2GF9LRqsORlaR8tb0S67MJ9mi FyeuJW8qM44poAhUBGBwm4G0awEMn6HSObHDi6VB6C9AmM0HQPquu/JWXgh6ZP/K9R 32HSLEm+5sUDjxVX6b0zxqWdimCHRwh/RV1v+2OivfUiVQFEtOt1Q2zgwBQxq9zDk0 bc+922yLLMQS83mDuyunqzzbPneco00XpnMZAU6Tx54fpeQUVPRzl0kgxmMqAUOOAA fG6xYCwc5nkT0j++g24cNnvkF3vkKV9Sj15ovw8Likmjn4q0AqQPhzhiz5VkL0vyHK 8EFamt6AwLdH5GccW9wV2cBBIcYPEKNkf5NHF4oUXrhr30YT6SJaq6Eq0eO5n+TWpi qr5dgRDTF96R7KNo4XkcsdzKGe+/3GhRbunGHP6NAsfRkx0gngnVAfiTew24ZPM1wQ k/4DJJWYOZ7oOpy/lsMp+0K0= 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 32DC92D029E6; Tue, 25 Nov 2025 17:39:26 +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 UOjkCmch0Mjh; Tue, 25 Nov 2025 17:39:25 +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 37AFB2D029D8; Tue, 25 Nov 2025 17:39:25 +0000 (UTC) Date: Tue, 25 Nov 2025 17:39:24 +0000 (UTC) From: "Bjoern A. Zeeb" To: Ed Maste cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: fad4c92b78a1 - main - Revert "kernel linker: Disable local sym resolution by default" In-Reply-To: <6925e3f4.8ba9.54553559@gitrepo.freebsd.org> Message-ID: <32r4p844-8so-n29s-rq37-9r9p4q40o36@mnoonqbm.arg> References: <6925e3f4.8ba9.54553559@gitrepo.freebsd.org> X-OpenPGP-Key-Id: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:3320, ipnet:2003::/19, country:DE] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4dG91Q0ZhSz3tjQ On Tue, 25 Nov 2025, Ed Maste wrote: > The branch main has been updated by emaste: > > URL: https://cgit.FreeBSD.org/src/commit/?id=fad4c92b78a123f87195173ac118655fa8e325cd > > commit fad4c92b78a123f87195173ac118655fa8e325cd > Author: Ed Maste > AuthorDate: 2025-11-25 17:12:36 +0000 > Commit: Ed Maste > CommitDate: 2025-11-25 17:14:10 +0000 > > Revert "kernel linker: Disable local sym resolution by default" > > I've received a report of a failure from resolving kern_kmq_open. > Revert for now as we are currently in stabweek. > > This reverts commit 9562994a7aacee2baae6ddee1a7b558b48ae39ef. > > Reported by: mav Would it not have been easier to fix the cause (to stabilize this for good)? I assume it's sys/modules/mqueue/Makefile ? /bz -- Bjoern A. Zeeb r15:7 From nobody Tue Nov 25 18:05:16 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dG9bF3l77z6HYT2 for ; Tue, 25 Nov 2025 18:05:29 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-io1-f44.google.com (mail-io1-f44.google.com [209.85.166.44]) (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 4dG9bF1bzCz3xvK for ; Tue, 25 Nov 2025 18:05:29 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-io1-f44.google.com with SMTP id ca18e2360f4ac-948c58fe8c2so229325739f.1 for ; Tue, 25 Nov 2025 10:05:29 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764093928; x=1764698728; 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=VFpewTtQV2/6o1akwkFbBIwkLgv3dlTHfUijz6/wAvk=; b=bOkM4lCjYjnxlXtMbNgdSe6AB4KHCDbQ1TBHRDegm6L/u4v7rN0nFJXfYx6LXRmSgU vPd2j0he4m/DOOFrT+I48k3yWA1mo2GFWOymVPEnTfMRdCtNawE3UkM+e8uYMAEjaYSw yJ/EkSS+1xrJacYRwyCQN3QneYj6L+Tphm+np2atX541Vf03JucZQCIy5qu36GXFv0X2 QAgIVL6qnVYUTKj97sfQYTEZphn6iL6sUHJKhNxprIjSNyLBcD0n4BFqljLPu209jfOP Y7uFcXbos6NobbJbZlb4tbdAqMFyVOr38CPs8uobxX4zepsHKHc94guFBp3A2u5KQM1/ GLpg== X-Forwarded-Encrypted: i=1; AJvYcCWTQQIAdkUc4HLsACcyL9r70nz54gLEHQfn7e0oTJcOcj1Dz2RAgA4WbppSsr92jJXFoqi3iRcchtad/09XwLhyiXvE@freebsd.org X-Gm-Message-State: AOJu0YxuJTxqnItMBGr1398R3uO8i+qyaETZJT2NgKZ1xFG9iQZiDaAC 5AeRtvK3zDlsADjGx8yYS41KuQcTeXauXGeDCXJwrtaVm0dr/R0la5hkZ6IjxGDHr8ZrE70qH5E ctzLxv0ZAyjT37Gfq5yR11leSji81k44= X-Gm-Gg: ASbGncuRam1AcrQXDK/jBwHB+jofsaariTN2vVCBZkGfv+fe/FhHFfybzZhLHGJiwMn YSOMNgDQxBS/j8ITTg9dN56zP03hspJCdvXvfY2rXZ+DPBM+P6gRMIF9ujnk8W01DdySSPw/DHq Q+xeodYnZLM0MGbBMKkdHFpzJJKxbX9IsGgpmZL+5tcclhqYNo1egm08f87nBd3vtAze2tHkOIE 8xqu/OB92N0iuRWteedtiTEFVzin1z/4c2VJI23NpWgJmmhTTilJn1qIaca2jMnXdT3Rsf4pQ7C jJXXwM011d5bRNtM1XksCTZ/DfYwdiCz0G7SIQH8eUU56YZyYRF+BUlba3zLyA== X-Google-Smtp-Source: AGHT+IGlK65Hc0U60/M8hyGEGmsBsxTB179hFQ+MdxZiPGxN8TAfFnFM6VapC20Gswdr1ngMBblmpA0eNV0cJTemc/w= X-Received: by 2002:a05:6638:c741:10b0:5b7:d710:6626 with SMTP id 8926c6da1cb9f-5b967ae138fmr11737070173.21.1764093927959; Tue, 25 Nov 2025 10:05:27 -0800 (PST) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 References: <6925e3f4.8ba9.54553559@gitrepo.freebsd.org> <32r4p844-8so-n29s-rq37-9r9p4q40o36@mnoonqbm.arg> In-Reply-To: <32r4p844-8so-n29s-rq37-9r9p4q40o36@mnoonqbm.arg> From: Ed Maste Date: Tue, 25 Nov 2025 13:05:16 -0500 X-Gm-Features: AWmQ_bnkaWvmeAscxzR2SWJMn_ISLm4gfI_teDGG14YD7CghQyPYezKE_9L9T-s Message-ID: Subject: Re: git: fad4c92b78a1 - main - Revert "kernel linker: Disable local sym resolution by default" To: "Bjoern A. Zeeb" Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4dG9bF1bzCz3xvK On Tue, 25 Nov 2025 at 12:39, Bjoern A. Zeeb wrote: > > On Tue, 25 Nov 2025, Ed Maste wrote: > > > The branch main has been updated by emaste: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=fad4c92b78a123f87195173ac118655fa8e325cd > > > > commit fad4c92b78a123f87195173ac118655fa8e325cd > > Author: Ed Maste > > AuthorDate: 2025-11-25 17:12:36 +0000 > > Commit: Ed Maste > > CommitDate: 2025-11-25 17:14:10 +0000 > > > > Revert "kernel linker: Disable local sym resolution by default" > > > > I've received a report of a failure from resolving kern_kmq_open. > > Revert for now as we are currently in stabweek. > > > > This reverts commit 9562994a7aacee2baae6ddee1a7b558b48ae39ef. > > > > Reported by: mav > > Would it not have been easier to fix the cause (to stabilize this for good)? > > I assume it's sys/modules/mqueue/Makefile ? That's one issue, cy@ reported a different one that I don't yet understand. I intend to recommit this next week - I just reverted it for now because we're in stabweek. From nobody Tue Nov 25 18:17:26 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dG9s31VQ9z6HZ0L for ; Tue, 25 Nov 2025 18:17:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dG9s30jgfz40vC for ; Tue, 25 Nov 2025 18:17:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764094647; 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=Tz1+nHU4XrkF3mKdhvZDCckszcX8GRwbbhHn3HWLS08=; b=v3LdnTvpDo7+UX+FPY3ObpXQRDWhenmB7jj/KljbZkUS1AF7FSM7ip6/Zj5mMaSZ2LyNLM o+zjECTBGSpg39tu6E8cZLpE01L4hw4kykS9B35lsHolZEByZ/3uvIdycCdfz85l8V7abt l9wI0qbZK9hrp18e6Q4gjD/4NF4p0/pPO6XK2PCOGNuqmRyHLgX6WuXaboR6UNip91J5Eg 6Sc0e/mcRiqrXE0jNvry5Jb/vWtQHs4xAFV1HOLIw/2PXDHs1sNUSzjBhX5U0RoKrTNcKF S4ayPwVBPhmeJiMTMHgQ/fH7oghicwL8R4leUwen87mqnmGeY1bjBVVhR2s4Vg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764094647; 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=Tz1+nHU4XrkF3mKdhvZDCckszcX8GRwbbhHn3HWLS08=; b=e2BK7Jt3xmipwZ6iLBEDV0EJm0dF4nJZuzoLLClFEgwZcEEsNVybd6bcsCxnVJtAhMiB10 25yZZpms6ObHPhcd1mFXCYmAPZqKJNkRTbcEA+2qWdcpttb4t6Tp5oJeJS9XC7lgWMglwy 9vyibJmwQmEoDXC970WnKwNfX4Z5te9bbC/BEXCa/028vsmgESuNKL8lRqpM5MOBiZpw+v gzEU4Rm6FQlbQoTF1vDvtii0fm5QR5eIzBbF0nm0PPQCYHpDVi4GB+usG/SHXJuZuxK1O0 unX/2lacuFrjlZW5RRW4+lwP+6BjrEWaGHpsphniWRqeDczcTn9NoFQfBTa+Vg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764094647; a=rsa-sha256; cv=none; b=GrefCQkLPcD+GBzCIKZQ3dQWrSrQfnF1R0Mr/E2CqiafGKBIjbZISZoFRP7+Frp83KbMJq KQcXDaffLLawCDshFKIpvNTNryukdt9G+GfcGwHld/qdGZHtK4IxFCxIfeGF5HKX6Px/UY 5sedUOV6FB4I3q1fgCnWIHuLtRNkfy/QiMBfziyhaBoTSpLRyh8vTiZXNdPpf2mVy5foIm EOsQvEOMCWeWVbXdBS3+PMY1FbzIXQynADKkvG2zw/RCT84UD2HcPpjku+3CKkZdj6m0kZ 6LvfojPWZPVBaMT24vdJEsyvv9w8qFoiZpfXB8bXASAh5gBt3vCOklHY2t7ckw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dG9s26xx6z19xF for ; Tue, 25 Nov 2025 18:17:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id e9b5 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 25 Nov 2025 18:17:26 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Jose Luis Duran From: Warner Losh Subject: git: 0e614a4afe48 - main - libefivar: Fix (some) typos List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0e614a4afe48f602fafad128e6a053c89f7445cd Auto-Submitted: auto-generated Date: Tue, 25 Nov 2025 18:17:26 +0000 Message-Id: <6925f2b6.e9b5.16e4ed29@gitrepo.freebsd.org> The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=0e614a4afe48f602fafad128e6a053c89f7445cd commit 0e614a4afe48f602fafad128e6a053c89f7445cd Author: Jose Luis Duran AuthorDate: 2025-11-15 17:25:32 +0000 Commit: Warner Losh CommitDate: 2025-11-25 18:17:23 +0000 libefivar: Fix (some) typos Fix typos in the files that are owned by the project. Bring back a "duplicate word" removal (node node), which should have been "node Node", the second "node" is not capitalized in the reference file (yet). We'll bring it back capitalized to avoid it from triggering automated checking scripts and possibly reverting this change again. A few other typos were not fixed, as we strive to keep as close to the reference files as possible, these fixes should be submitted to the reference project (tianocore/edk2) in the not so distant future. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1894 --- lib/libefivar/FreeBSD-update | 2 +- lib/libefivar/efivar-dp-xlate.c | 10 +++++----- lib/libefivar/efivar.h | 2 +- lib/libefivar/uefi-dputil.c | 2 +- sys/sys/efi-edk2.h | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/libefivar/FreeBSD-update b/lib/libefivar/FreeBSD-update index 52d0db4021ef..53b8f0dfff1a 100644 --- a/lib/libefivar/FreeBSD-update +++ b/lib/libefivar/FreeBSD-update @@ -8,7 +8,7 @@ These files are first mechnaically processed with sed -e "s/L'/'/g;"'s/L"/"/g;s/%g/%36s/g;s/%a/%s/g;s/^VOID/static VOID/g;s/ *$//g' -for several reasons. We're moving from wide rotuines to narrow routines. The +for several reasons. We're moving from wide routines to narrow routines. The UTC-2 this code is written for is a bad match for wchar_t which is an int. It's a much better match for plain narrow characters on FreeBSD. So we pretend that CHAR16 for these files is really char * (ASCII). diff --git a/lib/libefivar/efivar-dp-xlate.c b/lib/libefivar/efivar-dp-xlate.c index 78d82ba4bce0..2012842b6f80 100644 --- a/lib/libefivar/efivar-dp-xlate.c +++ b/lib/libefivar/efivar-dp-xlate.c @@ -221,7 +221,7 @@ efi_hd_to_unix(struct gmesh *mesh, const_efidp dp, char **dev, char **relpath, c provider = pp; for (i = 0; i < n; i++) { /* - * Skip all pseudo filesystems. This also skips the real filesytsem + * Skip all pseudo filesystems. This also skips the real filesystem * of ZFS. There's no EFI designator for ZFS in the standard, so * we'll need to invent one, but its decoding will be handled in * a separate function. @@ -328,7 +328,7 @@ errout: * * Extract the path from the File path node(s). translate any \ file separators * to /. Append the result to the mount point. Copy the resulting path into - * *path. Stat that path. If it is not found, return the errorr from stat. + * *path. Stat that path. If it is not found, return the error from stat. * * Finally, check to make sure the resulting path is still on the same * device. If not, return ENODEV. @@ -433,7 +433,7 @@ efivar_device_path_to_unix_path(const_efidp dp, char **dev, char **relpath, char * For paths of the first form: * find where the filesystem is mount (either the file directly, or * its parent directory). - * translate any logical device name (eg lable) to a physical one + * translate any logical device name (eg label) to a physical one * If not possible, return ENXIO * If the physical path is unsupported (Eg not on a GPT or MBR disk), * return ENXIO @@ -442,7 +442,7 @@ efivar_device_path_to_unix_path(const_efidp dp, char **dev, char **relpath, char * as a file path. * * For paths matching the second form: - * find the EFI partition corresponding to the root fileystem. + * find the EFI partition corresponding to the root filesystem. * If none found, return ENXIO * Create a media device path node for the found partition * Append a File Path to the end for the rest of the file. @@ -553,7 +553,7 @@ find_geom_efimedia(struct gmesh *mesh, const char *dev) efimedia = geom_pp_attr(mesh, pp, "efimedia"); /* - * If this device doesn't hav an efimedia attribute, see if it is a + * If this device doesn't have an efimedia attribute, see if it is a * glabel node, and if so look for the underlying provider to get the * efimedia attribute from. */ diff --git a/lib/libefivar/efivar.h b/lib/libefivar/efivar.h index e159f4cccd3d..238b23a8b2b8 100644 --- a/lib/libefivar/efivar.h +++ b/lib/libefivar/efivar.h @@ -31,7 +31,7 @@ #include #include -/* Shoud these be elsewhere ? */ +/* Should these be elsewhere ? */ #define EFI_VARIABLE_NON_VOLATILE 0x00000001 #define EFI_VARIABLE_BOOTSERVICE_ACCESS 0x00000002 #define EFI_VARIABLE_RUNTIME_ACCESS 0x00000004 diff --git a/lib/libefivar/uefi-dputil.c b/lib/libefivar/uefi-dputil.c index c31da14eed2d..1f6a051ce600 100644 --- a/lib/libefivar/uefi-dputil.c +++ b/lib/libefivar/uefi-dputil.c @@ -127,7 +127,7 @@ GetDevicePathSize ( @param MaxSize The maximum size of the device path data structure. @retval TRUE DevicePath is valid. - @retval FALSE The length of any node in the DevicePath is less + @retval FALSE The length of any node Node in the DevicePath is less than sizeof (EFI_DEVICE_PATH_PROTOCOL). @retval FALSE If MaxSize is not zero, the size of the DevicePath exceeds MaxSize. diff --git a/sys/sys/efi-edk2.h b/sys/sys/efi-edk2.h index b27b26bd613c..d591c253a3e0 100644 --- a/sys/sys/efi-edk2.h +++ b/sys/sys/efi-edk2.h @@ -72,7 +72,7 @@ typedef void VOID; /* * Note: the EDK2 code assumed #pragma packed works and PACKED is a * workaround for some old toolchain issues for EDK2 that aren't - * relevent to FreeBSD. + * relevant to FreeBSD. */ #define PACKED From nobody Tue Nov 25 18:17:27 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dG9s41YTjz6HZGZ for ; Tue, 25 Nov 2025 18:17:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dG9s40QKmz40rj for ; Tue, 25 Nov 2025 18:17:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764094648; 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=dgxJ2v2xtQ4Se6Zs1F/NE/qGr0hAzSXiV9W5dYHp6wM=; b=Yi/d3ZUcDQLoDvzEgehqpLiHgNaCAfqGUhsQ3l8g8+y2iCXqKTZS7aYuAcaMgdpcpOxJ+5 DO3kyAtpUJu0UFUW8WNjZOdeEc1UrpczOtsm2zLG661uWLJuh0jd3YB/w4GVVkzPCK5jEb W4TfSMk24TJAmC+mJNUMUrbPoX+ol6AULMeO5qIchZ4cuugve3hd5jOy3W66/laaHNVK5o Imhv/+OG+bxPgGTCzGz7/7PmofUiTJLWPWZNX8qMIYwRYtfNOitElAy/zukJrExxMXzMxH lqGBxejigzwPm30emdiCH8GConvRTtVhZ/BrMUqRO+lEQSPtiij0sDsvv9ulQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764094648; 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=dgxJ2v2xtQ4Se6Zs1F/NE/qGr0hAzSXiV9W5dYHp6wM=; b=EBSFK01pHTXidwOkjRbRR8U+8iTFD99AlRExrY7bH4zqCHwQbaE3pnZbUbn+iDOcAdOLll gccarSNsVH1lHU05DTTEHSLqyCq2Sq8onkKMxTALDRY4F+xpPtIh08RduG+hEkrpRNbFnF k0gjA+16iZSAISSGWabXO2zVPecNz/mvAR9ZHNMNhE3gNfbNIwlAYLrAeIIOlcxyfHLtnW Om+jKxWuNvwDTySm3nhY8kO+QZLPCnMKdhCXJtxG5HnAtKuvhO4/JZ5r2ZlEVnPFgfuwvh DV964FcZ3Vr2RxyOQpMkmOEN5lUlMUy/1jjViCvy84YBb3je8iGsXBLvC4q3Qg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764094648; a=rsa-sha256; cv=none; b=mHe1hanVkHCEjpDe4YeB6BoAnl44iWDQJOpzphfAsoa70jqjF3dA23myAbaasLEl2K6stq FBWno/0ltXmiPVxvrk26og9rhhWgsWt5H8JUkItr+2LIpQoYeseYEeCoYlHckT2bPztQSP cS2xtxhQsXJIfAX9shnfca+zpmiEG9dYKyn5cXPWYvTrQndCRGbMip1G0pVQV5t9lNyAn0 nzIJP5BbXPv+IE7Q05i1epJFbNgRS3aYmJLMNxWhiJZ3d1Vt6GL5N426JMAJnLUEGOMRQa +MLPfmlRsOliqxhsW6+4J/HmpMg/sGC5VcfXNA/X5Hr+43HESTVqV8UdHm2GIA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dG9s4022rz1B03 for ; Tue, 25 Nov 2025 18:17:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id e70a by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 25 Nov 2025 18:17:27 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Jose Luis Duran From: Warner Losh Subject: git: b38f48d33616 - main - libefivar: Standardize #ifndef __FreeBSD__ List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b38f48d33616337a8931c1c61f9e53981d4c0bcc Auto-Submitted: auto-generated Date: Tue, 25 Nov 2025 18:17:27 +0000 Message-Id: <6925f2b7.e70a.39d5f71d@gitrepo.freebsd.org> The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=b38f48d33616337a8931c1c61f9e53981d4c0bcc commit b38f48d33616337a8931c1c61f9e53981d4c0bcc Author: Jose Luis Duran AuthorDate: 2025-11-13 16:08:44 +0000 Commit: Warner Losh CommitDate: 2025-11-25 18:17:23 +0000 libefivar: Standardize #ifndef __FreeBSD__ Standardize preprocessor directives that comment out unused functions (essentially #if 0). No functional change intended. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1894 --- lib/libefivar/efivar-dp-parse.c | 1 - lib/libefivar/uefi-dplib.h | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/libefivar/efivar-dp-parse.c b/lib/libefivar/efivar-dp-parse.c index c594e94580da..f2eb46a54509 100644 --- a/lib/libefivar/efivar-dp-parse.c +++ b/lib/libefivar/efivar-dp-parse.c @@ -313,7 +313,6 @@ GetNextDeviceNodeStr ( return ReturnStr; } - #ifndef __FreeBSD__ /** Return whether the integer string is a hex string. diff --git a/lib/libefivar/uefi-dplib.h b/lib/libefivar/uefi-dplib.h index 4787088dac19..c048a280a08e 100644 --- a/lib/libefivar/uefi-dplib.h +++ b/lib/libefivar/uefi-dplib.h @@ -175,8 +175,7 @@ typedef struct { #pragma pack() -#ifdef FreeBSD /* Remove these on FreeBSD */ - +#ifndef __FreeBSD__ /* Remove these on FreeBSD */ /** Returns the size of a device path in bytes. From nobody Tue Nov 25 18:17:29 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dG9s52Nmsz6HZJq for ; Tue, 25 Nov 2025 18:17:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dG9s50z1Hz40vG for ; Tue, 25 Nov 2025 18:17:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764094649; 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=dTzIJfAgAm0mtb739551C5pNO4ig9UP45t7WVhQ2nqg=; b=t+7urvFYWS7ekABtqBLPUbjtAQIPt6PIu2NM6rbVzCKHh5VU5iHcNGX0z+R07Hy5fdk1LA mIo49nY1vD8rNg+z7bKd790I/Z8Lc2OI8gBCjZq2uDacu+SyVGbbyXiKE8SC3PsJKwxpKf vDAB/a705bTMTsltw+ZH/bL4cu4FRKWsM5tvSsKzj04x3POMKjVETrcEOTf3TchHZVv8v/ WJR3DqY+R+xanyIrcBy53prqLocFIHNHta0LweMaAhuZaiNPWANc71PQxTqgZ8uFigW6bC PzCtMXP18xkfO7CtKyh9b6SrOuoevIkpKNE8oWkgPOE9daEY4sa0pkt6W/nQiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764094649; 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=dTzIJfAgAm0mtb739551C5pNO4ig9UP45t7WVhQ2nqg=; b=QrSXTjXNVKIp777qhTt0lqHMN3m9WSmnvTzhagLnvxZwyQ8GdHhL3ARV4v562mcKYn4CDQ YC9LrQUU4rxnnnXhJV3M3ai0Xf7/VJkwq2EOBls24uilA105PV7XwxrRLdAKhJafTd8NM6 /egTMtePLEwiicjSpunByOOjp7IMPu5FDJGQXKY8RJ0dqr2MagPp1EDl7wDTASBKDgQMM6 Kt3Ob+1a7xZfT9LftdMCIw02X93nuMOctEfzor0BRVri1vIJHm4xcchuChG3GPdULlKmwx hAOm4iyKCUr61zo+HD1i14/Y1Kaua4jfBmTe/Ou3cS+td35xD6TRnO6xIMLeAg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764094649; a=rsa-sha256; cv=none; b=Embb7OnTHIXhcq6GXFzzKIMQWmxq2WyUn+2fSTThm8LKsYNU/pNsGPzL913fSoaEAClDsB Y3sc+4cHNh7nn3oCN1Yjo7ppHWFHeSnQ54sTeYWnngeJXYbvG3DC3+xqVtbmQmJiiYPBtN Fq1/JH7x8eou/kKwZOof9nEhGXaxcKQFNfK6c98jvKM8lA6d7bG46r3r4mfsc+Ki7fNYuA ahxekn7Uiph6OkFgWeWXvsWOC8tJVXygROfAghRZ+liH05z9hZ63Ww7hU9nY1NmWHlk49f HUDhrjBefOtBH2T7l8c18nA4CQx9exs1omFDOpaIJmWH6c5a5W2/f+Yny7EFbw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dG9s50MPrz19PM for ; Tue, 25 Nov 2025 18:17:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id b9fc by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 25 Nov 2025 18:17:29 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Jose Luis Duran From: Warner Losh Subject: git: ef191142dc2c - main - libefivar: Move functions to match reference file List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ef191142dc2c51e51209090daf7e938222174ecf Auto-Submitted: auto-generated Date: Tue, 25 Nov 2025 18:17:29 +0000 Message-Id: <6925f2b9.b9fc.74b9b2cc@gitrepo.freebsd.org> The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=ef191142dc2c51e51209090daf7e938222174ecf commit ef191142dc2c51e51209090daf7e938222174ecf Author: Jose Luis Duran AuthorDate: 2025-11-13 20:54:15 +0000 Commit: Warner Losh CommitDate: 2025-11-25 18:17:24 +0000 libefivar: Move functions to match reference file Move a few functions to match their locations in the reference file. No functional change intended. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1894 --- lib/libefivar/uefi-dputil.c | 200 ++++++++++++++++++++++---------------------- 1 file changed, 99 insertions(+), 101 deletions(-) diff --git a/lib/libefivar/uefi-dputil.c b/lib/libefivar/uefi-dputil.c index 1f6a051ce600..f7d5d3ba6c8e 100644 --- a/lib/libefivar/uefi-dputil.c +++ b/lib/libefivar/uefi-dputil.c @@ -75,50 +75,6 @@ static CONST EFI_DEVICE_PATH_PROTOCOL mUefiDevicePathLibEndDevicePath = { } }; - -/** - Returns the size of a device path in bytes. - - This function returns the size, in bytes, of the device path data structure - specified by DevicePath including the end of device path node. - If DevicePath is NULL or invalid, then 0 is returned. - - @param DevicePath A pointer to a device path data structure. - - @retval 0 If DevicePath is NULL or invalid. - @retval Others The size of a device path in bytes. - -**/ -UINTN -EFIAPI -GetDevicePathSize ( - IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath - ) -{ - CONST EFI_DEVICE_PATH_PROTOCOL *Start; - - if (DevicePath == NULL) { - return 0; - } - - if (!IsDevicePathValid (DevicePath, 0)) { - return 0; - } - - // - // Search for the end of the device path structure - // - Start = DevicePath; - while (!IsDevicePathEnd (DevicePath)) { - DevicePath = NextDevicePathNode (DevicePath); - } - - // - // Compute the size and add back in the size of the end device path structure - // - return ((UINTN) DevicePath - (UINTN) Start) + DevicePathNodeLength (DevicePath); -} - /** Determine whether a given device path is valid. If DevicePath is NULL, then ASSERT(). @@ -212,7 +168,6 @@ DevicePathType ( return ((const EFI_DEVICE_PATH_PROTOCOL *)(Node))->Type; } - /** Returns the SubType field of a device path node. @@ -342,32 +297,6 @@ IsDevicePathEnd ( return (BOOLEAN) (IsDevicePathEndType (Node) && DevicePathSubType(Node) == END_ENTIRE_DEVICE_PATH_SUBTYPE); } -/** - Fills in all the fields of a device path node that is the end of an entire device path. - - Fills in all the fields of a device path node specified by Node so Node represents - the end of an entire device path. The Type field of Node is set to - END_DEVICE_PATH_TYPE, the SubType field of Node is set to - END_ENTIRE_DEVICE_PATH_SUBTYPE, and the Length field of Node is set to - END_DEVICE_PATH_LENGTH. Node is not required to be aligned on a 16-bit boundary, - so it is recommended that a function such as WriteUnaligned16() be used to set - the contents of the Length field. - - If Node is NULL, then ASSERT(). - - @param Node A pointer to a device path node data structure. - -**/ -VOID -EFIAPI -SetDevicePathEndNode ( - OUT VOID *Node - ) -{ - ASSERT (Node != NULL); - memcpy (Node, &mUefiDevicePathLibEndDevicePath, sizeof (mUefiDevicePathLibEndDevicePath)); -} - /** Sets the length, in bytes, of a device path node. @@ -401,49 +330,72 @@ SetDevicePathNodeLength ( } /** - Creates a device node. + Fills in all the fields of a device path node that is the end of an entire device path. - This function creates a new device node in a newly allocated buffer of size - NodeLength and initializes the device path node header with NodeType and NodeSubType. - The new device path node is returned. - If NodeLength is smaller than a device path header, then NULL is returned. - If there is not enough memory to allocate space for the new device path, then - NULL is returned. - The memory is allocated from EFI boot services memory. It is the responsibility - of the caller to free the memory allocated. + Fills in all the fields of a device path node specified by Node so Node represents + the end of an entire device path. The Type field of Node is set to + END_DEVICE_PATH_TYPE, the SubType field of Node is set to + END_ENTIRE_DEVICE_PATH_SUBTYPE, and the Length field of Node is set to + END_DEVICE_PATH_LENGTH. Node is not required to be aligned on a 16-bit boundary, + so it is recommended that a function such as WriteUnaligned16() be used to set + the contents of the Length field. - @param NodeType The device node type for the new device node. - @param NodeSubType The device node sub-type for the new device node. - @param NodeLength The length of the new device node. + If Node is NULL, then ASSERT(). - @return The new device path. + @param Node A pointer to a device path node data structure. **/ -EFI_DEVICE_PATH_PROTOCOL * +VOID EFIAPI -CreateDeviceNode ( - IN UINT8 NodeType, - IN UINT8 NodeSubType, - IN UINT16 NodeLength +SetDevicePathEndNode ( + OUT VOID *Node ) { - EFI_DEVICE_PATH_PROTOCOL *DevicePath; + ASSERT (Node != NULL); + memcpy (Node, &mUefiDevicePathLibEndDevicePath, sizeof (mUefiDevicePathLibEndDevicePath)); +} - if (NodeLength < sizeof (EFI_DEVICE_PATH_PROTOCOL)) { - // - // NodeLength is less than the size of the header. - // - return NULL; +/** + Returns the size of a device path in bytes. + + This function returns the size, in bytes, of the device path data structure + specified by DevicePath including the end of device path node. + If DevicePath is NULL or invalid, then 0 is returned. + + @param DevicePath A pointer to a device path data structure. + + @retval 0 If DevicePath is NULL or invalid. + @retval Others The size of a device path in bytes. + +**/ +UINTN +EFIAPI +GetDevicePathSize ( + IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath + ) +{ + CONST EFI_DEVICE_PATH_PROTOCOL *Start; + + if (DevicePath == NULL) { + return 0; } - DevicePath = AllocateZeroPool (NodeLength); - if (DevicePath != NULL) { - DevicePath->Type = NodeType; - DevicePath->SubType = NodeSubType; - SetDevicePathNodeLength (DevicePath, NodeLength); + if (!IsDevicePathValid (DevicePath, 0)) { + return 0; } - return DevicePath; + // + // Search for the end of the device path structure + // + Start = DevicePath; + while (!IsDevicePathEnd (DevicePath)) { + DevicePath = NextDevicePathNode (DevicePath); + } + + // + // Compute the size and add back in the size of the end device path structure + // + return ((UINTN) DevicePath - (UINTN) Start) + DevicePathNodeLength (DevicePath); } /** @@ -627,3 +579,49 @@ AppendDevicePathNode ( return NewDevicePath; } + +/** + Creates a device node. + + This function creates a new device node in a newly allocated buffer of size + NodeLength and initializes the device path node header with NodeType and NodeSubType. + The new device path node is returned. + If NodeLength is smaller than a device path header, then NULL is returned. + If there is not enough memory to allocate space for the new device path, then + NULL is returned. + The memory is allocated from EFI boot services memory. It is the responsibility + of the caller to free the memory allocated. + + @param NodeType The device node type for the new device node. + @param NodeSubType The device node sub-type for the new device node. + @param NodeLength The length of the new device node. + + @return The new device path. + +**/ +EFI_DEVICE_PATH_PROTOCOL * +EFIAPI +CreateDeviceNode ( + IN UINT8 NodeType, + IN UINT8 NodeSubType, + IN UINT16 NodeLength + ) +{ + EFI_DEVICE_PATH_PROTOCOL *DevicePath; + + if (NodeLength < sizeof (EFI_DEVICE_PATH_PROTOCOL)) { + // + // NodeLength is less than the size of the header. + // + return NULL; + } + + DevicePath = AllocateZeroPool (NodeLength); + if (DevicePath != NULL) { + DevicePath->Type = NodeType; + DevicePath->SubType = NodeSubType; + SetDevicePathNodeLength (DevicePath, NodeLength); + } + + return DevicePath; +} From nobody Tue Nov 25 18:17:30 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dG9s64drlz6HZJv for ; Tue, 25 Nov 2025 18:17:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dG9s61zHDz411C for ; Tue, 25 Nov 2025 18:17:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764094650; 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=ryYWZ4lOFTguRI4440QZkY3do/7rxaoHif1mu9oovno=; b=tNkats1IaHwgDY6s9iQmYHNWlPSNQXjHdqgE6wWsxnONDPpGvdHh3teJGvByt77KHEK3rf AtbNJtbHeXmDKJraiu8vSpFR3U6jnqr+4ZNQw67ZThXDg0LKts2NwnLEmuVShyGfNqazmU HlkFswEEgI7wqamaez9jC2wHx3klxGsR3lyEnt4UHx78qg339ZXPO9/wR067mNG/0yfx/d RYiaLkISvUE3OGeHTdZAXHsOeH7jhOCNhPRuQXouDR2CNkKlgAIVwl3R0HGT6Kd+sEi1Se xR9goeM3W9PvPnrUdk25qfg00D3KJccZ+BrHS6vx09alCXMJuNnG4F2NBce7Eg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764094650; 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=ryYWZ4lOFTguRI4440QZkY3do/7rxaoHif1mu9oovno=; b=hvZO+tVaVl3JQLuvuDaGG6wUzg8NqKb9Wy/B6jQ+62rdRUAk5hunHQUCuYeSiWViPH2GBB rzB/RmWehs7t7H5ws7SS0hRZFm9aPsfZNt1XlkZVonfpb4VqZX7vCeIaRABTBtW73mLeIY vOzI37ulYNzeoP529pxd8KkYo/kbMEZA1L7VtTI2Ff5s0vLurKwBf7DfNe0k2simX344qN DPCXTW3EyEaVkiV1QM1OtD8xYr5LKHASn744u51dfGytclRiD1j1fvhoMi1DXmpDvrkcim 8cTa0ucGInWVLqgqAc2o0YHSS6esV1drc3SSB8ovLYzY3ow3BUo/nQUxJeFK1Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764094650; a=rsa-sha256; cv=none; b=us2S52kEtXmzO4TUSeJ5tUkBEXIHkhwqdUAHcUOf6TZCwrHdFdZQQwK1OxnxkJP6PGlucF zVf7d2yHMG3w6X2pjgy6JA5hmDH0pMnOyb8Iv6TV5MHf4Q/R2vujmzwGiQJ+B6ANLMVeMn rvr3PEI6Z2EHBg9B4aEEeo333Ga3BPK1kNKRds/m6ZdrF5Kb5IL9rmh0nTdJIJaCs2FKJB DOwQk6aZcVl5q2WBCcBovI39DvU8f5ey3ssh8vjupYF40SvCkw4eZKC4dAUvCY3Mhx6hBY zqBhHw5m98M84MvxrFnKMSawaVTy/cGGGbXcQ9pYPgprgWpCJO6RROwectz0UA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dG9s60lPPz19PN for ; Tue, 25 Nov 2025 18:17:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id e9ba by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 25 Nov 2025 18:17:30 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Jose Luis Duran From: Warner Losh Subject: git: 5b7b60af7ba1 - main - libefivar: Add and comment out unused functions List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5b7b60af7ba164faa915002b336075e50c120f02 Auto-Submitted: auto-generated Date: Tue, 25 Nov 2025 18:17:30 +0000 Message-Id: <6925f2ba.e9ba.46ae9d9b@gitrepo.freebsd.org> The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=5b7b60af7ba164faa915002b336075e50c120f02 commit 5b7b60af7ba164faa915002b336075e50c120f02 Author: Jose Luis Duran AuthorDate: 2025-11-13 17:35:54 +0000 Commit: Warner Losh CommitDate: 2025-11-25 18:17:24 +0000 libefivar: Add and comment out unused functions This commit introduces gratuitous white space and unused functions. This functionality is guarded/commented out. This change is necessary to reduce the differences with the reference file in subsequent commits. No functional change intended. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1894 --- lib/libefivar/uefi-dputil.c | 322 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 320 insertions(+), 2 deletions(-) diff --git a/lib/libefivar/uefi-dputil.c b/lib/libefivar/uefi-dputil.c index f7d5d3ba6c8e..b2c41c7ba369 100644 --- a/lib/libefivar/uefi-dputil.c +++ b/lib/libefivar/uefi-dputil.c @@ -35,8 +35,6 @@ #include #include "uefi-dplib.h" -/* XXX maybe I should include the entire DevicePathUtiltiies.c and ifdef out what we don't use */ - /* * Taken from MdePkg/Library/UefiDevicePathLib/DevicePathUtilities.c * hash a11928f3310518ab1c6fd34e8d0fdbb72de9602c 2017-Mar-01 @@ -63,6 +61,8 @@ **/ +// #include "UefiDevicePathLib.h" + // // Template for an end-of-device path node. // @@ -212,6 +212,7 @@ DevicePathNodeLength ( ) { ASSERT (Node != NULL); +// return ReadUnaligned16 ((UINT16 *)&((EFI_DEVICE_PATH_PROTOCOL *)(Node))->Length[0]); return ((const EFI_DEVICE_PATH_PROTOCOL *)Node)->Length[0] | (((const EFI_DEVICE_PATH_PROTOCOL *)Node)->Length[1] << 8); } @@ -297,6 +298,35 @@ IsDevicePathEnd ( return (BOOLEAN) (IsDevicePathEndType (Node) && DevicePathSubType(Node) == END_ENTIRE_DEVICE_PATH_SUBTYPE); } +#ifndef __FreeBSD__ +/** + Determines if a device path node is an end node of a device path instance. + + Determines if a device path node specified by Node is an end node of a device + path instance. If Node represents the end of a device path instance, then TRUE + is returned. Otherwise, FALSE is returned. + + If Node is NULL, then ASSERT(). + + @param Node A pointer to a device path node data structure. + + @retval TRUE The device path node specified by Node is the end of a device + path instance. + @retval FALSE The device path node specified by Node is not the end of a + device path instance. + +**/ +BOOLEAN +EFIAPI +IsDevicePathEndInstance ( + IN CONST VOID *Node + ) +{ + ASSERT (Node != NULL); + return (BOOLEAN) (IsDevicePathEndType (Node) && DevicePathSubType(Node) == END_INSTANCE_DEVICE_PATH_SUBTYPE); +} +#endif + /** Sets the length, in bytes, of a device path node. @@ -580,6 +610,159 @@ AppendDevicePathNode ( return NewDevicePath; } +#ifndef __FreeBSD__ +/** + Creates a new device path by appending the specified device path instance to the specified device + path. + + This function creates a new device path by appending a copy of the device path + instance specified by DevicePathInstance to a copy of the device path specified + by DevicePath in a allocated buffer. + The end-of-device-path device node is moved after the end of the appended device + path instance and a new end-of-device-path-instance node is inserted between. + If DevicePath is NULL, then a copy if DevicePathInstance is returned. + If DevicePathInstance is NULL, then NULL is returned. + If DevicePath or DevicePathInstance is invalid, then NULL is returned. + If there is not enough memory to allocate space for the new device path, then + NULL is returned. + The memory is allocated from EFI boot services memory. It is the responsibility + of the caller to free the memory allocated. + + @param DevicePath A pointer to a device path data structure. + @param DevicePathInstance A pointer to a device path instance. + + @return A pointer to the new device path. + +**/ +EFI_DEVICE_PATH_PROTOCOL * +EFIAPI +UefiDevicePathLibAppendDevicePathInstance ( + IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath, OPTIONAL + IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePathInstance OPTIONAL + ) +{ + EFI_DEVICE_PATH_PROTOCOL *NewDevicePath; + EFI_DEVICE_PATH_PROTOCOL *TempDevicePath; + UINTN SrcSize; + UINTN InstanceSize; + + if (DevicePath == NULL) { + return DuplicateDevicePath (DevicePathInstance); + } + + if (DevicePathInstance == NULL) { + return NULL; + } + + if (!IsDevicePathValid (DevicePath, 0) || !IsDevicePathValid (DevicePathInstance, 0)) { + return NULL; + } + + SrcSize = GetDevicePathSize (DevicePath); + InstanceSize = GetDevicePathSize (DevicePathInstance); + + NewDevicePath = AllocatePool (SrcSize + InstanceSize); + if (NewDevicePath != NULL) { + + TempDevicePath = CopyMem (NewDevicePath, DevicePath, SrcSize);; + + while (!IsDevicePathEnd (TempDevicePath)) { + TempDevicePath = NextDevicePathNode (TempDevicePath); + } + + TempDevicePath->SubType = END_INSTANCE_DEVICE_PATH_SUBTYPE; + TempDevicePath = NextDevicePathNode (TempDevicePath); + CopyMem (TempDevicePath, DevicePathInstance, InstanceSize); + } + + return NewDevicePath; +} + +/** + Creates a copy of the current device path instance and returns a pointer to the next device path + instance. + + This function creates a copy of the current device path instance. It also updates + DevicePath to point to the next device path instance in the device path (or NULL + if no more) and updates Size to hold the size of the device path instance copy. + If DevicePath is NULL, then NULL is returned. + If DevicePath points to a invalid device path, then NULL is returned. + If there is not enough memory to allocate space for the new device path, then + NULL is returned. + The memory is allocated from EFI boot services memory. It is the responsibility + of the caller to free the memory allocated. + If Size is NULL, then ASSERT(). + + @param DevicePath On input, this holds the pointer to the current + device path instance. On output, this holds + the pointer to the next device path instance + or NULL if there are no more device path + instances in the device path pointer to a + device path data structure. + @param Size On output, this holds the size of the device + path instance, in bytes or zero, if DevicePath + is NULL. + + @return A pointer to the current device path instance. + +**/ +EFI_DEVICE_PATH_PROTOCOL * +EFIAPI +UefiDevicePathLibGetNextDevicePathInstance ( + IN OUT EFI_DEVICE_PATH_PROTOCOL **DevicePath, + OUT UINTN *Size + ) +{ + EFI_DEVICE_PATH_PROTOCOL *DevPath; + EFI_DEVICE_PATH_PROTOCOL *ReturnValue; + UINT8 Temp; + + ASSERT (Size != NULL); + + if (DevicePath == NULL || *DevicePath == NULL) { + *Size = 0; + return NULL; + } + + if (!IsDevicePathValid (*DevicePath, 0)) { + return NULL; + } + + // + // Find the end of the device path instance + // + DevPath = *DevicePath; + while (!IsDevicePathEndType (DevPath)) { + DevPath = NextDevicePathNode (DevPath); + } + + // + // Compute the size of the device path instance + // + *Size = ((UINTN) DevPath - (UINTN) (*DevicePath)) + sizeof (EFI_DEVICE_PATH_PROTOCOL); + + // + // Make a copy and return the device path instance + // + Temp = DevPath->SubType; + DevPath->SubType = END_ENTIRE_DEVICE_PATH_SUBTYPE; + ReturnValue = DuplicateDevicePath (*DevicePath); + DevPath->SubType = Temp; + + // + // If DevPath is the end of an entire device path, then another instance + // does not follow, so *DevicePath is set to NULL. + // + if (DevicePathSubType (DevPath) == END_ENTIRE_DEVICE_PATH_SUBTYPE) { + *DevicePath = NULL; + } else { + *DevicePath = NextDevicePathNode (DevPath); + } + + return ReturnValue; +} +#endif + /** Creates a device node. @@ -625,3 +808,138 @@ CreateDeviceNode ( return DevicePath; } + +#ifndef __FreeBSD__ +/** + Determines if a device path is single or multi-instance. + + This function returns TRUE if the device path specified by DevicePath is + multi-instance. + Otherwise, FALSE is returned. + If DevicePath is NULL or invalid, then FALSE is returned. + + @param DevicePath A pointer to a device path data structure. + + @retval TRUE DevicePath is multi-instance. + @retval FALSE DevicePath is not multi-instance, or DevicePath + is NULL or invalid. + +**/ +BOOLEAN +EFIAPI +UefiDevicePathLibIsDevicePathMultiInstance ( + IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath + ) +{ + CONST EFI_DEVICE_PATH_PROTOCOL *Node; + + if (DevicePath == NULL) { + return FALSE; + } + + if (!IsDevicePathValid (DevicePath, 0)) { + return FALSE; + } + + Node = DevicePath; + while (!IsDevicePathEnd (Node)) { + if (IsDevicePathEndInstance (Node)) { + return TRUE; + } + + Node = NextDevicePathNode (Node); + } + + return FALSE; +} + + +/** + Retrieves the device path protocol from a handle. + + This function returns the device path protocol from the handle specified by Handle. + If Handle is NULL or Handle does not contain a device path protocol, then NULL + is returned. + + @param Handle The handle from which to retrieve the device + path protocol. + + @return The device path protocol from the handle specified by Handle. + +**/ +EFI_DEVICE_PATH_PROTOCOL * +EFIAPI +DevicePathFromHandle ( + IN EFI_HANDLE Handle + ) +{ + EFI_DEVICE_PATH_PROTOCOL *DevicePath; + EFI_STATUS Status; + + Status = gBS->HandleProtocol ( + Handle, + &gEfiDevicePathProtocolGuid, + (VOID *) &DevicePath + ); + if (EFI_ERROR (Status)) { + DevicePath = NULL; + } + return DevicePath; +} + +/** + Allocates a device path for a file and appends it to an existing device path. + + If Device is a valid device handle that contains a device path protocol, then a device path for + the file specified by FileName is allocated and appended to the device path associated with the + handle Device. The allocated device path is returned. If Device is NULL or Device is a handle + that does not support the device path protocol, then a device path containing a single device + path node for the file specified by FileName is allocated and returned. + The memory for the new device path is allocated from EFI boot services memory. It is the responsibility + of the caller to free the memory allocated. + + If FileName is NULL, then ASSERT(). + If FileName is not aligned on a 16-bit boundary, then ASSERT(). + + @param Device A pointer to a device handle. This parameter + is optional and may be NULL. + @param FileName A pointer to a Null-terminated Unicode string. + + @return The allocated device path. + +**/ +EFI_DEVICE_PATH_PROTOCOL * +EFIAPI +FileDevicePath ( + IN EFI_HANDLE Device, OPTIONAL + IN CONST CHAR16 *FileName + ) +{ + UINTN Size; + FILEPATH_DEVICE_PATH *FilePath; + EFI_DEVICE_PATH_PROTOCOL *DevicePath; + EFI_DEVICE_PATH_PROTOCOL *FileDevicePath; + + DevicePath = NULL; + + Size = StrSize (FileName); + FileDevicePath = AllocatePool (Size + SIZE_OF_FILEPATH_DEVICE_PATH + END_DEVICE_PATH_LENGTH); + if (FileDevicePath != NULL) { + FilePath = (FILEPATH_DEVICE_PATH *) FileDevicePath; + FilePath->Header.Type = MEDIA_DEVICE_PATH; + FilePath->Header.SubType = MEDIA_FILEPATH_DP; + CopyMem (&FilePath->PathName, FileName, Size); + SetDevicePathNodeLength (&FilePath->Header, Size + SIZE_OF_FILEPATH_DEVICE_PATH); + SetDevicePathEndNode (NextDevicePathNode (&FilePath->Header)); + + if (Device != NULL) { + DevicePath = DevicePathFromHandle (Device); + } + + DevicePath = AppendDevicePath (DevicePath, FileDevicePath); + FreePool (FileDevicePath); + } + + return DevicePath; +} +#endif From nobody Tue Nov 25 18:17:31 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dG9s74FDBz6HYrY for ; Tue, 25 Nov 2025 18:17:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dG9s71yrZz40sG for ; Tue, 25 Nov 2025 18:17:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764094651; 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=Bzb36x4kJwoH57HA6kKUkRt4MmglHkqhzngYaFBRkxI=; b=sb8F2/ArfpsNmwNU5QQ31K+gWrFr8ELtznpA81J0DQnZG6rTNG59B4PDJGKJ0QVBIc0vKR Aebfq2Wmn6uymoMo9+fF6xvBymHrrB2kcBgf4Wv+4QEtGeMyN93EruvtLwhc412Kjtl6ME opyttttRjE6dTbFmVBXpuBdD2mOcYiyDMEjm240dPhAmJW5JSv7A8S+hjndn205hGDBpSD fmSktENeNAoreMdM/hY8bNZAJdZf0saNkVUr8aNyEo5aBIPzTCeOjeiDFoeGZvwf/GPzXb hLc22JzReqv2dUsmsTPrviHeVki8W8971LHMsqhe2tBLs3bWe/T1y80tCqnzuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764094651; 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=Bzb36x4kJwoH57HA6kKUkRt4MmglHkqhzngYaFBRkxI=; b=lRfIwy3tQxJoEUDkZ8BGqfujaMX2SGT1HTAesc34Jlqic1nx/4e3ppZxxk/dJoacJVB7+Z 3ZO8mWEg4Uc0q0gvKQhR3ysnaDRjEh+VIr8oK8PaJAt3kCt404z66qniFSF6O44pxa2SkZ jTYkkJqQavgkcM1saNn1WF8ylg5QEiT40X8Lp6/7vUHOdFJr9fSBTBBYNNh4XzHLHdyW/q et5V1L0Jh2luc67KeSMMtviIcB1HmWKTgXqZwieGNwKjsjdGqBEzDacBhqHEU/WueVy1Yw sAGShrzHxB1+AvfabSuGkfGwQy1SIoy3W1gNu4QwcH6IT4DF4qTQJYhS1t3nrg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764094651; a=rsa-sha256; cv=none; b=ySOCVWfaT0gOx4G0F2gi1TiiQMhciTKMmZnmo9DjbROxemXR2GWRC6d5oMe5fLVP0MFJ/1 VkC+UcvT0C52PnJZ8Dilj1+IDO5b+ZPaLLpNjpFZzVU0tjGwX2Af1qpNi1i5px64hX7ikz wkw6yvZuQ25nzBzKAnqkKiGWI3wNlxNnkdDw+uWRBdIZxUStNyIUIzXN4RxRh6s4bzgvbt YzuZFXx1Igof509GSBPe/ej/B2hNlacgBi+PR5LEqpgvNrqetsGWciVY9i9mXGk4iZGKVs btKi2+0XiQd4cUcEX/B+7PSDyVfyve3OGJAJav3SrV1q4IpN2ihXu2OOjMQ1EA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dG9s71W44z1B06 for ; Tue, 25 Nov 2025 18:17:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id f401 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 25 Nov 2025 18:17:31 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Jose Luis Duran From: Warner Losh Subject: git: 9677ae7864fa - main - libefivar: MdePkg: Clean up source files List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9677ae7864fa785bb994e5f07e25bad3cf1139db Auto-Submitted: auto-generated Date: Tue, 25 Nov 2025 18:17:31 +0000 Message-Id: <6925f2bb.f401.738ccb72@gitrepo.freebsd.org> The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=9677ae7864fa785bb994e5f07e25bad3cf1139db commit 9677ae7864fa785bb994e5f07e25bad3cf1139db Author: Jose Luis Duran AuthorDate: 2025-11-13 16:36:48 +0000 Commit: Warner Losh CommitDate: 2025-11-25 18:17:24 +0000 libefivar: MdePkg: Clean up source files 1. Do not use tab characters 2. No trailing white space in one line 3. All files must end with CRLF No functional change. Obtained from: https://github.com/tianocore/edk2/commit/9095d37b8fe5bfc3d02adad6ba7fd7359ebc0107 Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1894 --- lib/libefivar/uefi-dputil.c | 76 ++++++++++++++++++++++----------------------- 1 file changed, 38 insertions(+), 38 deletions(-) diff --git a/lib/libefivar/uefi-dputil.c b/lib/libefivar/uefi-dputil.c index b2c41c7ba369..129b805ab650 100644 --- a/lib/libefivar/uefi-dputil.c +++ b/lib/libefivar/uefi-dputil.c @@ -37,7 +37,7 @@ /* * Taken from MdePkg/Library/UefiDevicePathLib/DevicePathUtilities.c - * hash a11928f3310518ab1c6fd34e8d0fdbb72de9602c 2017-Mar-01 + * hash 9095d37b8fe5bfc3d02adad6ba7fd7359ebc0107 2018-Jun-28 */ /** @file @@ -50,7 +50,7 @@ environment varibles. Multi-instance device paths should never be placed on a Handle. - Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.
+ Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -302,17 +302,17 @@ IsDevicePathEnd ( /** Determines if a device path node is an end node of a device path instance. - Determines if a device path node specified by Node is an end node of a device - path instance. If Node represents the end of a device path instance, then TRUE + Determines if a device path node specified by Node is an end node of a device + path instance. If Node represents the end of a device path instance, then TRUE is returned. Otherwise, FALSE is returned. If Node is NULL, then ASSERT(). @param Node A pointer to a device path node data structure. - @retval TRUE The device path node specified by Node is the end of a device + @retval TRUE The device path node specified by Node is the end of a device path instance. - @retval FALSE The device path node specified by Node is not the end of a + @retval FALSE The device path node specified by Node is not the end of a device path instance. **/ @@ -614,20 +614,20 @@ AppendDevicePathNode ( /** Creates a new device path by appending the specified device path instance to the specified device path. - - This function creates a new device path by appending a copy of the device path - instance specified by DevicePathInstance to a copy of the device path specified + + This function creates a new device path by appending a copy of the device path + instance specified by DevicePathInstance to a copy of the device path specified by DevicePath in a allocated buffer. - The end-of-device-path device node is moved after the end of the appended device - path instance and a new end-of-device-path-instance node is inserted between. + The end-of-device-path device node is moved after the end of the appended device + path instance and a new end-of-device-path-instance node is inserted between. If DevicePath is NULL, then a copy if DevicePathInstance is returned. If DevicePathInstance is NULL, then NULL is returned. If DevicePath or DevicePathInstance is invalid, then NULL is returned. - If there is not enough memory to allocate space for the new device path, then - NULL is returned. - The memory is allocated from EFI boot services memory. It is the responsibility + If there is not enough memory to allocate space for the new device path, then + NULL is returned. + The memory is allocated from EFI boot services memory. It is the responsibility of the caller to free the memory allocated. - + @param DevicePath A pointer to a device path data structure. @param DevicePathInstance A pointer to a device path instance. @@ -663,13 +663,13 @@ UefiDevicePathLibAppendDevicePathInstance ( NewDevicePath = AllocatePool (SrcSize + InstanceSize); if (NewDevicePath != NULL) { - + TempDevicePath = CopyMem (NewDevicePath, DevicePath, SrcSize);; - + while (!IsDevicePathEnd (TempDevicePath)) { TempDevicePath = NextDevicePathNode (TempDevicePath); } - + TempDevicePath->SubType = END_INSTANCE_DEVICE_PATH_SUBTYPE; TempDevicePath = NextDevicePathNode (TempDevicePath); CopyMem (TempDevicePath, DevicePathInstance, InstanceSize); @@ -682,25 +682,25 @@ UefiDevicePathLibAppendDevicePathInstance ( Creates a copy of the current device path instance and returns a pointer to the next device path instance. - This function creates a copy of the current device path instance. It also updates - DevicePath to point to the next device path instance in the device path (or NULL + This function creates a copy of the current device path instance. It also updates + DevicePath to point to the next device path instance in the device path (or NULL if no more) and updates Size to hold the size of the device path instance copy. If DevicePath is NULL, then NULL is returned. If DevicePath points to a invalid device path, then NULL is returned. - If there is not enough memory to allocate space for the new device path, then - NULL is returned. - The memory is allocated from EFI boot services memory. It is the responsibility + If there is not enough memory to allocate space for the new device path, then + NULL is returned. + The memory is allocated from EFI boot services memory. It is the responsibility of the caller to free the memory allocated. If Size is NULL, then ASSERT(). - - @param DevicePath On input, this holds the pointer to the current - device path instance. On output, this holds - the pointer to the next device path instance + + @param DevicePath On input, this holds the pointer to the current + device path instance. On output, this holds + the pointer to the next device path instance or NULL if there are no more device path - instances in the device path pointer to a + instances in the device path pointer to a device path data structure. - @param Size On output, this holds the size of the device - path instance, in bytes or zero, if DevicePath + @param Size On output, this holds the size of the device + path instance, in bytes or zero, if DevicePath is NULL. @return A pointer to the current device path instance. @@ -740,7 +740,7 @@ UefiDevicePathLibGetNextDevicePathInstance ( // Compute the size of the device path instance // *Size = ((UINTN) DevPath - (UINTN) (*DevicePath)) + sizeof (EFI_DEVICE_PATH_PROTOCOL); - + // // Make a copy and return the device path instance // @@ -821,7 +821,7 @@ CreateDeviceNode ( @param DevicePath A pointer to a device path data structure. @retval TRUE DevicePath is multi-instance. - @retval FALSE DevicePath is not multi-instance, or DevicePath + @retval FALSE DevicePath is not multi-instance, or DevicePath is NULL or invalid. **/ @@ -857,11 +857,11 @@ UefiDevicePathLibIsDevicePathMultiInstance ( /** Retrieves the device path protocol from a handle. - This function returns the device path protocol from the handle specified by Handle. - If Handle is NULL or Handle does not contain a device path protocol, then NULL + This function returns the device path protocol from the handle specified by Handle. + If Handle is NULL or Handle does not contain a device path protocol, then NULL is returned. - - @param Handle The handle from which to retrieve the device + + @param Handle The handle from which to retrieve the device path protocol. @return The device path protocol from the handle specified by Handle. @@ -897,11 +897,11 @@ DevicePathFromHandle ( path node for the file specified by FileName is allocated and returned. The memory for the new device path is allocated from EFI boot services memory. It is the responsibility of the caller to free the memory allocated. - + If FileName is NULL, then ASSERT(). If FileName is not aligned on a 16-bit boundary, then ASSERT(). - @param Device A pointer to a device handle. This parameter + @param Device A pointer to a device handle. This parameter is optional and may be NULL. @param FileName A pointer to a Null-terminated Unicode string. From nobody Tue Nov 25 18:17:32 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dG9s862ttz6HZH1 for ; Tue, 25 Nov 2025 18:17:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dG9s82cvCz4141 for ; Tue, 25 Nov 2025 18:17:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764094652; 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=jE8ygx3RbJMIhzSFJXpIlV6DPEDVuAHaR+aJYzzMvXs=; b=Jm+Iec/1yVLJbJIDrl5QbTxhHwu+/0evmZD1M7/kIU2Ox6yTAkOTTwq6IY3+BlCRgrBSJ7 rOT4d6FVIzy4zq056OQIP+W9I5G5ozwQuc4RXmcc6mPjiqdJtQDm+gmB8M+MwS7qVDLqfi GF6NsxJY80/tUf03bOmj6/AcZlMfGJiOJQ2TsWamkF7EM/gCZ2g09AxsuBJRRGFu45lySt 9JNZuzgshQoc7RWfVFKEOcWxU8Wn+88hyASh4k0mtVc82r8LAP3RtHIXCh/PQwNSLu2TZ+ a3xDY8vv4zDeqCc/PTpkOWZ0kilvLX8+7J+UnkoF/3YdMaKRjrO43DAxUmaXPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764094652; 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=jE8ygx3RbJMIhzSFJXpIlV6DPEDVuAHaR+aJYzzMvXs=; b=Ky2LOLxjTpYZkmkCHonX6D37cBFB/SPV3LyjhFlvOkFgtF/k5GuaVoBD3hfdt/mt5ivs7w eSp2/xSAKDCNtB3XZHWVwjMWzlpOMOrljzkOfJreeJoR9mUKJHjRD2rII7qPM7K3tuiH2q dXWok2JbeZCXZIImT6mzX1lsPS0T+vsEu9Vx3xGblyyoTqE3k31RtA4Uo3QDY0qQVgpfUV g1l7/VUF4ue/t+MqSMyGuhk6jYS9UGno8vIKwxaWyn72rlpW8Y9OfUGomop0jDUS1cZfaN ObT/LtS6EzJSSJC2rHPh4NFqlRr+hLwdh3JQ5yM1EyB5x3mTzRy0ODWWLcZvfg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764094652; a=rsa-sha256; cv=none; b=a+K+6wCWoTWOi9TcWF8xSRONEPPg4coCp3T4H6NRg967Qc4pVJn5jzfJlI6JNODNvSwPG8 rtqYSK4xwR6HXQZMDyXTw81+bA3YCFHvwkPO0yv5xOT+aKhKPvRK1B1VzrnHdrzxXtl1RY u9uictBjrbNcNOpXzNn9ShA20gouVL2E6JFXGNN3uDAL6acDTsaYopoAwSLf8MhVE75PtH UBF1QwkYSf8xx6JdV7ASnMJPhFGFjeZpcmcwG0MaVnqQ7SfTuBBa6piIi33zvfGpTHTZrK 8nc/hg+HYaJttQt9S5g2+wZa18tIvMN3qTfyOGER4QhbNKA74Z1NdHbceRhmoQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dG9s827bsz1BPs for ; Tue, 25 Nov 2025 18:17:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id d8b8 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 25 Nov 2025 18:17:32 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Jose Luis Duran From: Warner Losh Subject: git: fd606b629f91 - main - libefivar: Add a checking step List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fd606b629f91560d4369ba8beda0a5ce763ee065 Auto-Submitted: auto-generated Date: Tue, 25 Nov 2025 18:17:32 +0000 Message-Id: <6925f2bc.d8b8.7643d317@gitrepo.freebsd.org> The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=fd606b629f91560d4369ba8beda0a5ce763ee065 commit fd606b629f91560d4369ba8beda0a5ce763ee065 Author: Jose Luis Duran AuthorDate: 2025-11-13 16:45:16 +0000 Commit: Warner Losh CommitDate: 2025-11-25 18:17:24 +0000 libefivar: Add a checking step Add a checking step in DevicePathUtilities.c to verify DevicePath. https://bugzilla.tianocore.org/show_bug.cgi?id=1372 v2: Remove ASSERT() and the redundant checking step. Update related description. Note that the link above no longer exists. The commit message was kept verbatim. An archived version of the bug report can be found at: https://web.archive.org/web/20240714192353/bugzilla.tianocore.org/show_bug.cgi?id=1372 Obtained from: https://github.com/tianocore/edk2/commit/fd02394228ee1dc2378cccfde6098c461f96dd42 Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1894 --- lib/libefivar/uefi-dputil.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/lib/libefivar/uefi-dputil.c b/lib/libefivar/uefi-dputil.c index 129b805ab650..89e049884558 100644 --- a/lib/libefivar/uefi-dputil.c +++ b/lib/libefivar/uefi-dputil.c @@ -37,7 +37,7 @@ /* * Taken from MdePkg/Library/UefiDevicePathLib/DevicePathUtilities.c - * hash 9095d37b8fe5bfc3d02adad6ba7fd7359ebc0107 2018-Jun-28 + * hash fd02394228ee1dc2378cccfde6098c461f96dd42 2019-Jan-31 */ /** @file @@ -77,12 +77,13 @@ static CONST EFI_DEVICE_PATH_PROTOCOL mUefiDevicePathLibEndDevicePath = { /** Determine whether a given device path is valid. - If DevicePath is NULL, then ASSERT(). @param DevicePath A pointer to a device path data structure. @param MaxSize The maximum size of the device path data structure. @retval TRUE DevicePath is valid. + @retval FALSE DevicePath is NULL. + @retval FALSE Maxsize is less than sizeof(EFI_DEVICE_PATH_PROTOCOL). @retval FALSE The length of any node Node in the DevicePath is less than sizeof (EFI_DEVICE_PATH_PROTOCOL). @retval FALSE If MaxSize is not zero, the size of the DevicePath @@ -101,19 +102,17 @@ IsDevicePathValid ( UINTN Size; UINTN NodeLength; - ASSERT (DevicePath != NULL); - - if (MaxSize == 0) { - MaxSize = MAX_UINTN; - } - // - // Validate the input size big enough to touch the first node. + //Validate the input whether exists and its size big enough to touch the first node // - if (MaxSize < sizeof (EFI_DEVICE_PATH_PROTOCOL)) { + if (DevicePath == NULL || (MaxSize > 0 && MaxSize < END_DEVICE_PATH_LENGTH)) { return FALSE; } + if (MaxSize == 0) { + MaxSize = MAX_UINTN; + } + for (Count = 0, Size = 0; !IsDevicePathEnd (DevicePath); DevicePath = NextDevicePathNode (DevicePath)) { NodeLength = DevicePathNodeLength (DevicePath); if (NodeLength < sizeof (EFI_DEVICE_PATH_PROTOCOL)) { From nobody Tue Nov 25 18:17:33 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dG9s94x93z6HYv9 for ; Tue, 25 Nov 2025 18:17:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dG9s93MZ0z40sX for ; Tue, 25 Nov 2025 18:17:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764094653; 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=gBb5wDEqxsfqivD6Try4GN3HSF9U06v5B5YslLZ0r4Q=; b=oohNhcnBTCE62fjpVE36/NcwH7z4YV5aDkrI0GPuND4AjE+AHjs9vb0vgbN/crxwLCgWa5 L3cDc6+cw6Igp0LMT1FTgCD0TmdssrNRtDQJTdbMGpkQ9SNOZSyAPX+IkwUY/izSSASKNZ YCZtf2ssXNO/Z3ryoX8bF53u96B9VHN911SneSGkm1Q7YQ4WFt6avPthFi0wVmLI158q8K 4KlYWds8/XHS0jCwHbdtfs3UmKXEZqZcV+TkMkhJCCUg3rfsBwulgKpCLD3+ee2d3D0lYA Y5vrX1mC5jwZ9KTjMtC4jZTg/mhHO/U9vcbWmhkIdPJL8JpMTT7SlfBwsVttEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764094653; 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=gBb5wDEqxsfqivD6Try4GN3HSF9U06v5B5YslLZ0r4Q=; b=Dulr5dfosuq7IGtTDj9Knuw+wXz8TMw1dvxK0NWyGydc1iGrbwuI+ZDrYxIafHlNVz7uuU 9361oZUdmeAsXhxcYe/EviRDmzd8AhenR1vklJwOD6/Ku5UZmERIdxw9e2STOoFO+UkxTL 1gew+z1Xp06IrzVl709uq03lUuCG9L8nhVK5i/dELA/xvrbQfZ6WEOE7ciBAz3a22aoNS+ cQ+PHpXOhITnhLkrAslDZ4Y2Vdcp817RniL4ZZd3Bzb4j0N+psmbU8Cu9XHPnfBgufpdv7 nRI7deeYaQ10VksKa2eN15kR+80rNHLO+As0Ea5vGtVoZmTZemble4Qakcu/5A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764094653; a=rsa-sha256; cv=none; b=MDvpIAaVs1DGoJhmTEvcMJ4xsqTOZGUcodd6Ga+H0A+3+r8mgykRk5u/DU3bD3hB+JJ6J3 loEC28eF8vm7JyOyOWEZK+FClv9iZ5m+j8lPuYv2uOEI/dsUEsFlBTs82h/7vjyZAlxrMy XuxuG/KZdy00lCtyPCsxb7LZiN7tAsJ1LqjGZuGspSmixYiNXHGCShaYMmiuaRfbE0YsA/ DVdAPJQwMWFij3O80oG06zB5aquLZgyCuxB6OOadlXb51dtvlLCxXw6kaGJIK6BDPatoA4 Nao1Q7ltIpVOCLxaIgYLk/h2U7MvU0lsP5ql48WxVvg2tr2uoTZ+V3TWzVzH/w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dG9s92pM5z1BPt for ; Tue, 25 Nov 2025 18:17:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id e825 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 25 Nov 2025 18:17:33 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Jose Luis Duran From: Warner Losh Subject: git: 5c2ae0a209f6 - main - libefivar: Add sanity check for FilePath device path List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5c2ae0a209f6964ebe2d3a4cc24987e3bd7f597d Auto-Submitted: auto-generated Date: Tue, 25 Nov 2025 18:17:33 +0000 Message-Id: <6925f2bd.e825.77167f91@gitrepo.freebsd.org> The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=5c2ae0a209f6964ebe2d3a4cc24987e3bd7f597d commit 5c2ae0a209f6964ebe2d3a4cc24987e3bd7f597d Author: Jose Luis Duran AuthorDate: 2025-11-13 16:49:05 +0000 Commit: Warner Losh CommitDate: 2025-11-25 18:17:24 +0000 libefivar: Add sanity check for FilePath device path REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1497 Current implementation of IsDevicePathValid() is not enough for type of MEDIA_FILEPATH_DP, which has NULL-terminated string in the device path. This patch add a simple NULL character check at Length position. Note that the link above no longer exists. The commit message was kept verbatim. An archived version of the bug report can be found at: https://web.archive.org/web/20240714191428/https://bugzilla.tianocore.org/show_bug.cgi?id=1497 Add the const keyword to avoid errors/warnings about dropping a const qualifier. Obtained from: https://github.com/tianocore/edk2/commit/2f7a96d6ec13b292d6f31295f3195913921173e1 Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1894 --- lib/libefivar/uefi-dputil.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/lib/libefivar/uefi-dputil.c b/lib/libefivar/uefi-dputil.c index 89e049884558..74609b47a448 100644 --- a/lib/libefivar/uefi-dputil.c +++ b/lib/libefivar/uefi-dputil.c @@ -37,7 +37,7 @@ /* * Taken from MdePkg/Library/UefiDevicePathLib/DevicePathUtilities.c - * hash fd02394228ee1dc2378cccfde6098c461f96dd42 2019-Jan-31 + * hash 2f7a96d6ec13b292d6f31295f3195913921173e1 2019-Feb-21 */ /** @file @@ -137,6 +137,15 @@ IsDevicePathValid ( return FALSE; } } + + // + // FilePath must be a NULL-terminated string. + // + if (DevicePathType (DevicePath) == MEDIA_DEVICE_PATH && + DevicePathSubType (DevicePath) == MEDIA_FILEPATH_DP && + *(const CHAR16 *)((const UINT8 *) DevicePath + NodeLength - 2) != 0) { + return FALSE; + } } // From nobody Tue Nov 25 18:17:34 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dG9sB6NXHz6HZ89 for ; Tue, 25 Nov 2025 18:17:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dG9sB3l1xz40yc for ; Tue, 25 Nov 2025 18:17:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764094654; 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=n739iKvJyqPKQqcgGyFLlxKc7LinrMtrkpRPlyQmQLA=; b=Smzz/nielvvGv3seNAVCDK5PCmTp0y8YFmXaz8GcdYOgOGvPzSF5f0+c7nSSrxxUdTwtpO 0tskXly66eeSwxtBLBLx3XgS8mz0OMn31zE0E7qiWobTC6KSOtyYM4pbrF8+l6+bN2ppNl qWS+PGnczzmefWhEFU5ht5ivReC5UYOwUkEMq5WfY0tRxwbhUbzR7UDjju/KpGw/ipYPRF JwaRs3TM9H0vEqKjwXpJtHxMqFRZx3xsICMieB2gz8w3KvMiRrEglLB7nDhIEkRQX3zrJC UI6xj0kot1470936Rn4wv7pi3jXdqFmnayJA076IQ3q4HR8pWMoSjeE6fUDUXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764094654; 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=n739iKvJyqPKQqcgGyFLlxKc7LinrMtrkpRPlyQmQLA=; b=E58f8CJfiElBvJZwLLJzDTH5itaCHsoN9qWPxqechOnWfKsXtza3UfmSwh1Bw4i/JZc0Gd 7tgKLLlq8MRGx/yhz/HcvGy23hJf/v3brL3b9sRtPQ2LmKg7uOxKBx954hitliV+MyjK5R 1ZhddvaD53HSf8/J67Zlo6/9ShgdyesDlEc3DQKJkKMzjEYuYnDF21WlMuj09UOJyjHl0Q Kimw+PKByG6FCyvA/+77Cy+O4WsFI2AeTuBvylZOz3a+mBjo+kAs8f1mQTCDDVnIJFQZfV eZKAeMi9TSiZ05QDgAAhUpJBocf8/BWnPKDYkf7JCdMi8glICzRljym/DwP0Kg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764094654; a=rsa-sha256; cv=none; b=TcqVNErcLwVITDT4zpc4xnNMpA4o0hUKvE5bXdmzG2VruGLLa8OuB2pJgCDqn0zoTtF18v kv4sFLJcEgCUroKE48hk55Vvc8B6VkwNQ441SK26TwJ/LbS7q14NnCcjEm2XI/Sn47ViYe ZE3nC5liDR5SL8DOG6lzBZQb6pQtLRXdzKPBV1gSn53jhYDBkrsK1WIgPlE4ohu8mijGMR +/iwCxhGo6vhE59A4TnHpIMHjXZXcYkQNHd+oPII9IUNY1udkbc0UuS404YkYpt9v7DOu/ XNdJAlzvVfNEifBkG/7p5lU8aEgEJwwnk0XKjUG3Bh2iJBcAl1Qyqq60SbVW4A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dG9sB3D31z19xG for ; Tue, 25 Nov 2025 18:17:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id f406 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 25 Nov 2025 18:17:34 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Jose Luis Duran From: Warner Losh Subject: git: 136ff605bfb1 - main - libefivar: Replace BSD License with BSD+Patent License List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 136ff605bfb1311ecb836e6f3a41f22476aee618 Auto-Submitted: auto-generated Date: Tue, 25 Nov 2025 18:17:34 +0000 Message-Id: <6925f2be.f406.17e69fbd@gitrepo.freebsd.org> The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=136ff605bfb1311ecb836e6f3a41f22476aee618 commit 136ff605bfb1311ecb836e6f3a41f22476aee618 Author: Jose Luis Duran AuthorDate: 2025-11-13 16:52:51 +0000 Commit: Warner Losh CommitDate: 2025-11-25 18:17:25 +0000 libefivar: Replace BSD License with BSD+Patent License https://bugzilla.tianocore.org/show_bug.cgi?id=1373 Replace BSD 2-Clause License with BSD+Patent License. This change is based on the following emails: https://lists.01.org/pipermail/edk2-devel/2019-February/036260.html https://lists.01.org/pipermail/edk2-devel/2018-October/030385.html RFCs with detailed process for the license change: V3: https://lists.01.org/pipermail/edk2-devel/2019-March/038116.html V2: https://lists.01.org/pipermail/edk2-devel/2019-March/037669.html V1: https://lists.01.org/pipermail/edk2-devel/2019-March/037500.html Note that the link above no longer exists. The commit message was kept verbatim. An archive of the bug report can be found at: https://web.archive.org/web/20240714192319/https://bugzilla.tianocore.org/show_bug.cgi?id=1373 Obtained from: https://github.com/tianocore/edk2/commit/9344f0921518309295da89c221d10cbead8531aa Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1894 --- lib/libefivar/uefi-dputil.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/lib/libefivar/uefi-dputil.c b/lib/libefivar/uefi-dputil.c index 74609b47a448..3a9cf7f374b2 100644 --- a/lib/libefivar/uefi-dputil.c +++ b/lib/libefivar/uefi-dputil.c @@ -37,7 +37,7 @@ /* * Taken from MdePkg/Library/UefiDevicePathLib/DevicePathUtilities.c - * hash 2f7a96d6ec13b292d6f31295f3195913921173e1 2019-Feb-21 + * hash 9344f0921518309295da89c221d10cbead8531aa 2019-Apr-09 */ /** @file @@ -51,13 +51,7 @@ on a Handle. Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
- This program and the accompanying materials - are licensed and made available under the terms and conditions of the BSD License - which accompanies this distribution. The full text of the license may be found at - http://opensource.org/licenses/bsd-license.php. - - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + SPDX-License-Identifier: BSD-2-Clause-Patent **/ From nobody Tue Nov 25 18:17:35 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dG9sC6c3Vz6HZBg for ; Tue, 25 Nov 2025 18:17:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dG9sC4GRvz418n for ; Tue, 25 Nov 2025 18:17:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764094655; 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=XV+fjX2P3ZgUMwD91+2c5x2M0LomRvyg7UjtfD3SyAU=; b=EFNK2eH8erreseNNbdwm+bfpLnvE0rhhCHvsU5hdoXt7wnikULWXDbLJWY6NKWjovzlCcx P4/eOtN7V+pyjw4h1bJexFk/ih5fGPBJvohzYgM1NrfQtybNOnQmhmRYf8j2sHYhFhk/85 8M69BZ7tMfwBtfR7RfpIB+QEugN2Xmxb+vIgbwsSv1uNMyvmmcTU1GQ9IjNXvqstQxROWN iJONJpYA9Hy2W6pcRpHGkUqmcCvMQ849XKXRA4q+rv6HvuS3p2vCZ4xYQSHyBIgJ43lip9 V1gwIQzK3HMQehAfZmwVgjY/pGPONfdesIFBkSUaSHiPPlykfKxwWRnxr08hPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764094655; 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=XV+fjX2P3ZgUMwD91+2c5x2M0LomRvyg7UjtfD3SyAU=; b=RYvWTRdEioJb+X6dYGrtye6SjrJ1n+xHT19VH1ALuSbJ02W2ynw1Revf4mhyRyQRaOjIWp qQ2Yfrn87VYdNDFE024sp/6t1NWPM1iQJxVp9dUGvdVti18WxnXQ/rc8VOH1D/2AJ2NlSx +pWNFbBZnb80Fo9Zkx47S16ajlDP6h/u3zoA75aPZt4tVykaxR0uUZvznhngvQWIR3bTZQ YHbzadsvlYnHxzpHNfJLIP+1WOaqMmqkOMRG138rvhy6z1/Lv5fLorNlISu26XREruG5xE mHWezVh+Kk0r6pqM78+SJ3fcX3wpukRPB7+87sNn1icm28ZCERcUtP3AKXInJw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764094655; a=rsa-sha256; cv=none; b=Z79r11B/J8MIljKEoBwYa1AvrH8OdAjlH94KURIDOVCjymXmPg2eTmVD6FSzr5TusgRU+P kZSSKO85w9LPpb7nsDR7kBSSDOEWoqi9mG4WUJ5MgLmfEStXLtvf4soN98fvMnMWsJvACI riPRxkXyLpF1yYbcwVsvxCzgUNRxADM77zkdtcFKGfRbLrsH9PkjdL3DZpz1CMKOZURtCz pC18C17oTZKWyuboEj7FJzwwqGqTAmJgEq61xIFzSpHaAoqxyTNQXniQQA7nnEjkoP1ASD V0B/YeYUERWNOfc5OtaSDQNqKjsSpJyYfatm0ZujpSi6vk9G4WD9aeQT/gkmwA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dG9sC3pyVz19PR for ; Tue, 25 Nov 2025 18:17:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id df54 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 25 Nov 2025 18:17:35 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Jose Luis Duran From: Warner Losh Subject: git: 6fa0057f8953 - main - libefivar: Support UefiDevicePathLib under StandaloneMm List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6fa0057f8953a7077362901128be14171ed705b8 Auto-Submitted: auto-generated Date: Tue, 25 Nov 2025 18:17:35 +0000 Message-Id: <6925f2bf.df54.29fe16d5@gitrepo.freebsd.org> The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=6fa0057f8953a7077362901128be14171ed705b8 commit 6fa0057f8953a7077362901128be14171ed705b8 Author: Jose Luis Duran AuthorDate: 2025-11-13 18:51:39 +0000 Commit: Warner Losh CommitDate: 2025-11-25 18:17:25 +0000 libefivar: Support UefiDevicePathLib under StandaloneMm This change added an instance of UefiDevicePathLib for StandaloneMm. It abstracts DevicePathFromHandle function into different files for Standalone MM and other instances to avoid linking gBS into MM_STANDALONE drivers. No functional change intended, as this function and its invocation are ifdefd out. Obtained from: https://github.com/tianocore/edk2/commit/14a746bb6a92d59669c67a970479558734cf2383 Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1894 --- lib/libefivar/uefi-dputil.c | 33 --------------------------------- 1 file changed, 33 deletions(-) diff --git a/lib/libefivar/uefi-dputil.c b/lib/libefivar/uefi-dputil.c index 3a9cf7f374b2..c557d7426fc6 100644 --- a/lib/libefivar/uefi-dputil.c +++ b/lib/libefivar/uefi-dputil.c @@ -856,39 +856,6 @@ UefiDevicePathLibIsDevicePathMultiInstance ( } -/** - Retrieves the device path protocol from a handle. - - This function returns the device path protocol from the handle specified by Handle. - If Handle is NULL or Handle does not contain a device path protocol, then NULL - is returned. - - @param Handle The handle from which to retrieve the device - path protocol. - - @return The device path protocol from the handle specified by Handle. - -**/ -EFI_DEVICE_PATH_PROTOCOL * -EFIAPI -DevicePathFromHandle ( - IN EFI_HANDLE Handle - ) -{ - EFI_DEVICE_PATH_PROTOCOL *DevicePath; - EFI_STATUS Status; - - Status = gBS->HandleProtocol ( - Handle, - &gEfiDevicePathProtocolGuid, - (VOID *) &DevicePath - ); - if (EFI_ERROR (Status)) { - DevicePath = NULL; - } - return DevicePath; -} - /** Allocates a device path for a file and appends it to an existing device path. From nobody Tue Nov 25 18:17:37 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dG9sG0cS7z6HZ10 for ; Tue, 25 Nov 2025 18:17:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dG9sF5ZnNz412R for ; Tue, 25 Nov 2025 18:17:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764094657; 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=IyQcE99OrcXWIXM//LbtTYa+ONakH9scKwuHJQC8jMo=; b=O51jqiCOoYmwD9Zf675nAjC0AusHVgSA3HEPQenXaIdyVOTAJULcOu0VO+SSMkUHHGu3Xg NPgJZxi5drMz69WEW22O4tPFWyEe7z72ex3YWy95EfkK3+PZlj6ai99rbTHXcBDyqPOYKB ll1qbjHpWLez1YS7CQI1J04Pr4Feg+dubAGjQjeZDIKGjPOw46jFRVqtg+yj6VtMYCDrj6 +Xz2wMyU+E8wpbJI0HrEUx+vhM0FZEsMSC16D7+MYkvuM5q314idoDeDtaSP9qCyeoXks8 ZsgMp0N2bhfAyhuarWpEaOVaWWNHUINEX0nx7j/jU+v8zNYdn1m6i/PzUfwKZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764094657; 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=IyQcE99OrcXWIXM//LbtTYa+ONakH9scKwuHJQC8jMo=; b=iB9elqQVfcKgvp8HgZJV9QqSJqCopkJibLSoZIqaSrPkKNPa33qr32RT5MKHn88tISUjGB fX+F6rz0Al2VTHPYZj348xtkb3XMqTjlp3iamr9z9gsDDNC62xGZeuVmin3Q4JfPjunFi2 edFrqW53yfPu4zFgtiOOma6se622p/RPosGVJAF1s6oIY3J2uXYEsNpK80tTLzWad8zZe8 aLaJOEflshImIQLrsfA8cTJFVTnYvAq/X9K5Y5coQEO2193KWb4+QjSWO90oEPHzz57ZOt 6P7w2+2OELeTjm+tUUOr0k3IEla8wZzrMf9yCdCBvpsmB7jXIbNnkp3f8I7QoA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764094657; a=rsa-sha256; cv=none; b=xjnFdla0VI00QNH+LVB8mR1EIicpH6HajYyh7SL8odXg6GMWMwhbbpa3uJtJZ4/WVEc4OS +AFF4wmy0IvAXV5oi+F7J2VLkBKL4Uc8sDrPzVtqLH91AktE6rAPo9u767y43fze3l3E2e /NQYThOOM4slhmt/6WVt9U+ACaoZoaDrlD7WWiLGKwwxqiaq8TFqV1kSla2mddpbjfYhlo UWPsNfTs1SvsNGlhrpPtqmw0oGxf+M9KTcDKTDliIb6sG7Rwg1IsexcMpwVYm67ypzHIm2 VIAFeDI6C6jESXAVzg6C1ic/Y7XATGGDXvq9qK0sQ7aXL9o9pqmlJd/vUpzl7Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dG9sF56lWz1B08 for ; Tue, 25 Nov 2025 18:17:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id e60f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 25 Nov 2025 18:17:37 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Jose Luis Duran From: Warner Losh Subject: git: 8494a3de2c50 - main - libefivar: Apply uncrustify changes List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8494a3de2c50e9d066b9e0b043306a49b932e025 Auto-Submitted: auto-generated Date: Tue, 25 Nov 2025 18:17:37 +0000 Message-Id: <6925f2c1.e60f.3af9c023@gitrepo.freebsd.org> The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=8494a3de2c50e9d066b9e0b043306a49b932e025 commit 8494a3de2c50e9d066b9e0b043306a49b932e025 Author: Jose Luis Duran AuthorDate: 2025-11-13 17:16:55 +0000 Commit: Warner Losh CommitDate: 2025-11-25 18:17:25 +0000 libefivar: Apply uncrustify changes REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3737 Apply uncrustify changes to .c/.h files in the MdePkg package Note that the link above no longer exists. The commit message was kept verbatim. An original copy of the bug report can be found at: https://web.archive.org/web/20241008121707/https://bugzilla.tianocore.org/show_bug.cgi?id=3737 Obtained from: https://github.com/tianocore/edk2/commit/2f88bd3a1296c522317f1c21377876de63de5be7 Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1894 --- lib/libefivar/uefi-dputil.c | 102 ++++++++++++++++++++++---------------------- 1 file changed, 52 insertions(+), 50 deletions(-) diff --git a/lib/libefivar/uefi-dputil.c b/lib/libefivar/uefi-dputil.c index 93ff4d9ac8ba..da87bffb7bd5 100644 --- a/lib/libefivar/uefi-dputil.c +++ b/lib/libefivar/uefi-dputil.c @@ -37,7 +37,7 @@ /* * Taken from MdePkg/Library/UefiDevicePathLib/DevicePathUtilities.c - * hash d0e2f8232a26453fc0191629ed44ff2a46ea073e 2021-Dec-07 + * hash 2f88bd3a1296c522317f1c21377876de63de5be7 2021-Dec-07 */ /** @file @@ -88,18 +88,18 @@ static CONST EFI_DEVICE_PATH_PROTOCOL mUefiDevicePathLibEndDevicePath = { BOOLEAN EFIAPI IsDevicePathValid ( - IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath, - IN UINTN MaxSize + IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath, + IN UINTN MaxSize ) { - UINTN Count; - UINTN Size; - UINTN NodeLength; + UINTN Count; + UINTN Size; + UINTN NodeLength; // - //Validate the input whether exists and its size big enough to touch the first node + // Validate the input whether exists and its size big enough to touch the first node // - if (DevicePath == NULL || (MaxSize > 0 && MaxSize < END_DEVICE_PATH_LENGTH)) { + if ((DevicePath == NULL) || ((MaxSize > 0) && (MaxSize < END_DEVICE_PATH_LENGTH))) { return FALSE; } @@ -116,6 +116,7 @@ IsDevicePathValid ( if (NodeLength > MAX_UINTN - Size) { return FALSE; } + Size += NodeLength; // @@ -135,9 +136,10 @@ IsDevicePathValid ( // // FilePath must be a NULL-terminated string. // - if (DevicePathType (DevicePath) == MEDIA_DEVICE_PATH && - DevicePathSubType (DevicePath) == MEDIA_FILEPATH_DP && - *(const CHAR16 *)((const UINT8 *) DevicePath + NodeLength - 2) != 0) { + if ((DevicePathType (DevicePath) == MEDIA_DEVICE_PATH) && + (DevicePathSubType (DevicePath) == MEDIA_FILEPATH_DP) && + (*(const CHAR16 *)((const UINT8 *) DevicePath + NodeLength - 2) != 0)) + { return FALSE; } } @@ -145,7 +147,7 @@ IsDevicePathValid ( // // Only return TRUE when the End Device Path node is valid. // - return (BOOLEAN) (DevicePathNodeLength (DevicePath) == END_DEVICE_PATH_LENGTH); + return (BOOLEAN)(DevicePathNodeLength (DevicePath) == END_DEVICE_PATH_LENGTH); } /** @@ -240,7 +242,7 @@ NextDevicePathNode ( ) { ASSERT (Node != NULL); - return ((EFI_DEVICE_PATH_PROTOCOL *)(__DECONST(UINT8 *, Node) + DevicePathNodeLength(Node))); + return (EFI_DEVICE_PATH_PROTOCOL *)(__DECONST(UINT8 *, Node) + DevicePathNodeLength (Node)); } /** @@ -270,7 +272,7 @@ IsDevicePathEndType ( ) { ASSERT (Node != NULL); - return (BOOLEAN) (DevicePathType (Node) == END_DEVICE_PATH_TYPE); + return (BOOLEAN)(DevicePathType (Node) == END_DEVICE_PATH_TYPE); } /** @@ -297,7 +299,7 @@ IsDevicePathEnd ( ) { ASSERT (Node != NULL); - return (BOOLEAN) (IsDevicePathEndType (Node) && DevicePathSubType(Node) == END_ENTIRE_DEVICE_PATH_SUBTYPE); + return (BOOLEAN)(IsDevicePathEndType (Node) && DevicePathSubType (Node) == END_ENTIRE_DEVICE_PATH_SUBTYPE); } #ifndef __FreeBSD__ @@ -325,7 +327,7 @@ IsDevicePathEndInstance ( ) { ASSERT (Node != NULL); - return (BOOLEAN) (IsDevicePathEndType (Node) && DevicePathSubType(Node) == END_INSTANCE_DEVICE_PATH_SUBTYPE); + return (BOOLEAN)(IsDevicePathEndType (Node) && DevicePathSubType (Node) == END_INSTANCE_DEVICE_PATH_SUBTYPE); } #endif @@ -427,7 +429,7 @@ GetDevicePathSize ( // // Compute the size and add back in the size of the end device path structure // - return ((UINTN) DevicePath - (UINTN) Start) + DevicePathNodeLength (DevicePath); + return ((UINTN)DevicePath - (UINTN)Start) + DevicePathNodeLength (DevicePath); } /** @@ -452,7 +454,7 @@ DuplicateDevicePath ( IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath ) { - UINTN Size; + UINTN Size; // // Compute the size @@ -525,9 +527,9 @@ AppendDevicePath ( // Allocate space for the combined device path. It only has one end node of // length EFI_DEVICE_PATH_PROTOCOL. // - Size1 = GetDevicePathSize (FirstDevicePath); - Size2 = GetDevicePathSize (SecondDevicePath); - Size = Size1 + Size2 - END_DEVICE_PATH_LENGTH; + Size1 = GetDevicePathSize (FirstDevicePath); + Size2 = GetDevicePathSize (SecondDevicePath); + Size = Size1 + Size2 - END_DEVICE_PATH_LENGTH; NewDevicePath = AllocatePool (Size); @@ -536,8 +538,8 @@ AppendDevicePath ( // // Over write FirstDevicePath EndNode and do the copy // - DevicePath2 = (EFI_DEVICE_PATH_PROTOCOL *) ((CHAR8 *) NewDevicePath + - (Size1 - END_DEVICE_PATH_LENGTH)); + DevicePath2 = (EFI_DEVICE_PATH_PROTOCOL *)((CHAR8 *)NewDevicePath + + (Size1 - END_DEVICE_PATH_LENGTH)); CopyMem (DevicePath2, SecondDevicePath, Size2); } @@ -587,6 +589,7 @@ AppendDevicePathNode ( if (DevicePathNode == NULL) { return DuplicateDevicePath ((DevicePath != NULL) ? DevicePath : &mUefiDevicePathLibEndDevicePath); } + // // Build a Node that has a terminator on it // @@ -596,6 +599,7 @@ AppendDevicePathNode ( if (TempDevicePath == NULL) { return NULL; } + TempDevicePath = CopyMem (TempDevicePath, DevicePathNode, NodeLength); // // Add and end device path node to convert Node to device path @@ -660,20 +664,19 @@ UefiDevicePathLibAppendDevicePathInstance ( return NULL; } - SrcSize = GetDevicePathSize (DevicePath); - InstanceSize = GetDevicePathSize (DevicePathInstance); + SrcSize = GetDevicePathSize (DevicePath); + InstanceSize = GetDevicePathSize (DevicePathInstance); NewDevicePath = AllocatePool (SrcSize + InstanceSize); if (NewDevicePath != NULL) { - - TempDevicePath = CopyMem (NewDevicePath, DevicePath, SrcSize);; + TempDevicePath = CopyMem (NewDevicePath, DevicePath, SrcSize); while (!IsDevicePathEnd (TempDevicePath)) { TempDevicePath = NextDevicePathNode (TempDevicePath); } - TempDevicePath->SubType = END_INSTANCE_DEVICE_PATH_SUBTYPE; - TempDevicePath = NextDevicePathNode (TempDevicePath); + TempDevicePath->SubType = END_INSTANCE_DEVICE_PATH_SUBTYPE; + TempDevicePath = NextDevicePathNode (TempDevicePath); CopyMem (TempDevicePath, DevicePathInstance, InstanceSize); } @@ -711,8 +714,8 @@ UefiDevicePathLibAppendDevicePathInstance ( EFI_DEVICE_PATH_PROTOCOL * EFIAPI UefiDevicePathLibGetNextDevicePathInstance ( - IN OUT EFI_DEVICE_PATH_PROTOCOL **DevicePath, - OUT UINTN *Size + IN OUT EFI_DEVICE_PATH_PROTOCOL **DevicePath, + OUT UINTN *Size ) { EFI_DEVICE_PATH_PROTOCOL *DevPath; @@ -721,7 +724,7 @@ UefiDevicePathLibGetNextDevicePathInstance ( ASSERT (Size != NULL); - if (DevicePath == NULL || *DevicePath == NULL) { + if ((DevicePath == NULL) || (*DevicePath == NULL)) { *Size = 0; return NULL; } @@ -741,15 +744,15 @@ UefiDevicePathLibGetNextDevicePathInstance ( // // Compute the size of the device path instance // - *Size = ((UINTN) DevPath - (UINTN) (*DevicePath)) + sizeof (EFI_DEVICE_PATH_PROTOCOL); + *Size = ((UINTN)DevPath - (UINTN)(*DevicePath)) + sizeof (EFI_DEVICE_PATH_PROTOCOL); // // Make a copy and return the device path instance // - Temp = DevPath->SubType; - DevPath->SubType = END_ENTIRE_DEVICE_PATH_SUBTYPE; - ReturnValue = DuplicateDevicePath (*DevicePath); - DevPath->SubType = Temp; + Temp = DevPath->SubType; + DevPath->SubType = END_ENTIRE_DEVICE_PATH_SUBTYPE; + ReturnValue = DuplicateDevicePath (*DevicePath); + DevPath->SubType = Temp; // // If DevPath is the end of an entire device path, then another instance @@ -787,12 +790,12 @@ UefiDevicePathLibGetNextDevicePathInstance ( EFI_DEVICE_PATH_PROTOCOL * EFIAPI CreateDeviceNode ( - IN UINT8 NodeType, - IN UINT8 NodeSubType, - IN UINT16 NodeLength + IN UINT8 NodeType, + IN UINT8 NodeSubType, + IN UINT16 NodeLength ) { - EFI_DEVICE_PATH_PROTOCOL *DevicePath; + EFI_DEVICE_PATH_PROTOCOL *DevicePath; if (NodeLength < sizeof (EFI_DEVICE_PATH_PROTOCOL)) { // @@ -803,9 +806,9 @@ CreateDeviceNode ( DevicePath = AllocateZeroPool (NodeLength); if (DevicePath != NULL) { - DevicePath->Type = NodeType; - DevicePath->SubType = NodeSubType; - SetDevicePathNodeLength (DevicePath, NodeLength); + DevicePath->Type = NodeType; + DevicePath->SubType = NodeSubType; + SetDevicePathNodeLength (DevicePath, NodeLength); } return DevicePath; @@ -833,7 +836,7 @@ UefiDevicePathLibIsDevicePathMultiInstance ( IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath ) { - CONST EFI_DEVICE_PATH_PROTOCOL *Node; + CONST EFI_DEVICE_PATH_PROTOCOL *Node; if (DevicePath == NULL) { return FALSE; @@ -855,7 +858,6 @@ UefiDevicePathLibIsDevicePathMultiInstance ( return FALSE; } - /** Allocates a device path for a file and appends it to an existing device path. @@ -880,8 +882,8 @@ UefiDevicePathLibIsDevicePathMultiInstance ( EFI_DEVICE_PATH_PROTOCOL * EFIAPI FileDevicePath ( - IN EFI_HANDLE Device OPTIONAL, - IN CONST CHAR16 *FileName + IN EFI_HANDLE Device OPTIONAL, + IN CONST CHAR16 *FileName ) { UINTN Size; @@ -891,10 +893,10 @@ FileDevicePath ( DevicePath = NULL; - Size = StrSize (FileName); + Size = StrSize (FileName); FileDevicePath = AllocatePool (Size + SIZE_OF_FILEPATH_DEVICE_PATH + END_DEVICE_PATH_LENGTH); if (FileDevicePath != NULL) { - FilePath = (FILEPATH_DEVICE_PATH *) FileDevicePath; + FilePath = (FILEPATH_DEVICE_PATH *)FileDevicePath; FilePath->Header.Type = MEDIA_DEVICE_PATH; FilePath->Header.SubType = MEDIA_FILEPATH_DP; CopyMem (&FilePath->PathName, FileName, Size); From nobody Tue Nov 25 18:17:36 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dG9sF1bVLz6HZDq for ; Tue, 25 Nov 2025 18:17:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dG9sD5TBYz40t6 for ; Tue, 25 Nov 2025 18:17:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764094656; 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=oPWvR5tOVH7Gzm6QEPY88xJSSPGv3ieM4NyqF+HP9hY=; b=TZ2HQu+PpfAzMYMpSPq+t9n0Jb02vcZaTiMMDq13MZn1fx6o82tMaz9rWGhVMJN42GhQDK O634juuQwQ1WyktrI3GS0RDPShoPw85fO/qjUKO8iaklZYDah5L01DYI3Dxy87quCg811Z tVpB+hs6cgB+mGUzTUQQL/rY1W72rg7lF6nhJ2ob/X028VE363zHUdqj4G6ephlcn5sR6/ Y4DxDxO1gXt8t9s8+1fF+O+eykvTGcrQNPN61phqh4iB7fz1sbmid9FUr3wEV4OZDV5FTY gB2A4C/yccfe/2yUehli7bNtXhyLaf6Bu2R2hUaVWj5tRrOcxW/IC3XlEbx2QA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764094656; 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=oPWvR5tOVH7Gzm6QEPY88xJSSPGv3ieM4NyqF+HP9hY=; b=qGR6QpssHYZErOKjvFs/4RIox38RNOVws15wESejRNdR6c3fSCTq7I1dgErw+S3Pt8pBB0 Cy5l+2NI6tBjp4zuO2jqdC/2p297S2QWPZcMdW/obwZJAHqAtmZ+OA2GEQXCUK+TnGiEY+ c7G9zaBMPu7/Z32FZwBgWwaqN+CnSRoHyQ7KufT57uYUoT2vQeJxqSeF/Qp8YE4HtRtqQF 4U1uX2asRgYqkIy8RBi/qvH+r1cgwjzEdbm7sdVcNLiFs8/n8WArYDhPlT0um3FeXD063T uG9ba+I7ZiL7QJcb4p5EJJiuXuRXrgZ5928GDZ7+moafrQ2KaQ+XuofxIAtdqg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764094656; a=rsa-sha256; cv=none; b=C50frkz6uFPN3Sv+rtwbTA2szflfmqSc2KlR8HYZk/qC/6r7X6L3Zs8PsdcfY2xyfkEr/X eBjshla2uvlNA+6ofNqmND9d0TqGaJ8vdtrWFKYtYV0Xw41CNTV4CNQC8EYU/U22mfGFWg 3XAXSWnyoRbrMFs2mxloAZPxC2EIReCDviPrBWdhHFvSS3KJ09wnS4o9o5xCIs9iKq5WPX Hc8vhP7xIHBRvrqTaKAF6CQmABIt7w1hxtv6yitt9F5jYjlBMJ9EfDu4Scn4B3eMW7rrO9 kCL3sai2SL7BZWCZiLKeNYAhCalSDfJdK2ymHm4Ts0r/cD04DNZpAeJuWJ51NA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dG9sD4VLFz19PS for ; Tue, 25 Nov 2025 18:17:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id c871 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 25 Nov 2025 18:17:36 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Jose Luis Duran From: Warner Losh Subject: git: ca6fef2d4bf1 - main - libefivar: Change OPTIONAL keyword usage style List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ca6fef2d4bf12a83f96a77153beb16999c8c62d0 Auto-Submitted: auto-generated Date: Tue, 25 Nov 2025 18:17:36 +0000 Message-Id: <6925f2c0.c871.54f21f88@gitrepo.freebsd.org> The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=ca6fef2d4bf12a83f96a77153beb16999c8c62d0 commit ca6fef2d4bf12a83f96a77153beb16999c8c62d0 Author: Jose Luis Duran AuthorDate: 2025-11-13 17:02:01 +0000 Commit: Warner Losh CommitDate: 2025-11-25 18:17:25 +0000 libefivar: Change OPTIONAL keyword usage style REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3760 Update all use of ', OPTIONAL' to ' OPTIONAL,' for function params. Note that the link above no longer exists. The commit message was kept verbatim. An archive of the bug report can be found at: https://web.archive.org/web/20240714185609/https://bugzilla.tianocore.org/show_bug.cgi?id=3760 Obtained from: https://github.com/tianocore/edk2/commit/d0e2f8232a26453fc0191629ed44ff2a46ea073e Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1894 --- lib/libefivar/uefi-dputil.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/libefivar/uefi-dputil.c b/lib/libefivar/uefi-dputil.c index c557d7426fc6..93ff4d9ac8ba 100644 --- a/lib/libefivar/uefi-dputil.c +++ b/lib/libefivar/uefi-dputil.c @@ -37,7 +37,7 @@ /* * Taken from MdePkg/Library/UefiDevicePathLib/DevicePathUtilities.c - * hash 9344f0921518309295da89c221d10cbead8531aa 2019-Apr-09 + * hash d0e2f8232a26453fc0191629ed44ff2a46ea073e 2021-Dec-07 */ /** @file @@ -496,7 +496,7 @@ DuplicateDevicePath ( EFI_DEVICE_PATH_PROTOCOL * EFIAPI AppendDevicePath ( - IN CONST EFI_DEVICE_PATH_PROTOCOL *FirstDevicePath, OPTIONAL + IN CONST EFI_DEVICE_PATH_PROTOCOL *FirstDevicePath OPTIONAL, IN CONST EFI_DEVICE_PATH_PROTOCOL *SecondDevicePath OPTIONAL ) { @@ -575,7 +575,7 @@ AppendDevicePath ( EFI_DEVICE_PATH_PROTOCOL * EFIAPI AppendDevicePathNode ( - IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath, OPTIONAL + IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath OPTIONAL, IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePathNode OPTIONAL ) { @@ -639,7 +639,7 @@ AppendDevicePathNode ( EFI_DEVICE_PATH_PROTOCOL * EFIAPI UefiDevicePathLibAppendDevicePathInstance ( - IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath, OPTIONAL + IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath OPTIONAL, IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePathInstance OPTIONAL ) { @@ -880,7 +880,7 @@ UefiDevicePathLibIsDevicePathMultiInstance ( EFI_DEVICE_PATH_PROTOCOL * EFIAPI FileDevicePath ( - IN EFI_HANDLE Device, OPTIONAL + IN EFI_HANDLE Device OPTIONAL, IN CONST CHAR16 *FileName ) { From nobody Tue Nov 25 18:17:38 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dG9sH1ZN7z6HZPY for ; Tue, 25 Nov 2025 18:17:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dG9sG6BX9z41D2 for ; Tue, 25 Nov 2025 18:17:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764094658; 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=vVOoEVLyyslnOqVNiAIRrBORlN/GqlxcxJgWj3BoVrQ=; b=dQYmZDiXCfgtbHm/f5swCl12W9rGv1tPNnt9v0OUi92jiXAHteZEyQNXE9dpRxefDB52q7 dGK1T1sFCjkz/qjUWCgX4hTtUOYBylF0rqn4ErNu3cP9CJYRYeASrzn3z1zmy4ShwJMl8D oo1M7I6STiUvUyEwrNWihEzAbcbRg8glIFWMAddF5qOsF9qjBP/Ad5Es+Ln9hbkJrqbvhs EqEaiNT8EE2UnUiS8DGyM7IYIK4GxjG02bu+SywXfbDJ9kzeZ66ZDLiVZKKpbIh/g7t4RS 4RWctJS96swiMxymc443Fl0mAVtfFdcxyevX/gYiW2VhEm/cO3nC3QFbXQrxiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764094658; 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=vVOoEVLyyslnOqVNiAIRrBORlN/GqlxcxJgWj3BoVrQ=; b=Q6RzgBxANuGnOtpY9R4VHMzOazxprTQIRKXI53GS9Nb5ds2QSgiN6DFHf0RgnBblFu/EbR RQS2DUe28BAs7gLN0KWaj3y+Wm8aoazk3zzWJ4bTrxxiU0dxGdf63yJ1gor2sHAFF3HVkK QpCqQeFZQfO+dG6QhB88BY0P185XOGH5Wr/3uahjinOGVdxCMhlPv7NI80OvrgSknzI+7l mZteeGz/1j/UpMXsfUk3z4cHGJ5X7RHPLsOvxSFTwC0JQByz8Ws6lphDioMAloO3sdK5dk iADCJYv9NwfoCm3jncfpZ3RO7u+7c6oKCA4ftA3K0nWWOJRQYO/CTeIdS4dakw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764094658; a=rsa-sha256; cv=none; b=jherK18AvMaaYQmQR7n2r/suq8SXHzoS+4sgvkFnF0Emq/WhDhlOu6EqJciZVUnw/6JFvM y7JmrTjpBQ0B+iyy0no8xIGgUtJJynLSIdogYRF8A/n6FOObPnSHe6YEbrOYq1TSZ0daxn mdVPYAIxzgP4tBkOuqtBSkj1/9PQqTcJVsBnw3PfiiLCqjrH2pjp6m4lw54m3Pzwg/Jw/a neXmVhwFuWtu4DiQ/gLXUxiI/NmVF26buKrKYTQ9NQAK+K49SuT4mgrRAUe2Rwd1B5hZyO F8ofm5rjr5PY1udlOikEMKQXDzFQZ+QpGDhq7GmcYSvA9t8JVrJt/TCh1F8S2w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dG9sG5c7cz19kf for ; Tue, 25 Nov 2025 18:17:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id e614 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 25 Nov 2025 18:17:38 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: ykla From: Warner Losh Subject: git: a4e3e724df8a - main - NOTES: Remove duplicate options KCSAN entries List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a4e3e724df8ad4f5a2d74b03636af55ca401b96e Auto-Submitted: auto-generated Date: Tue, 25 Nov 2025 18:17:38 +0000 Message-Id: <6925f2c2.e614.78d6b88d@gitrepo.freebsd.org> The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=a4e3e724df8ad4f5a2d74b03636af55ca401b96e commit a4e3e724df8ad4f5a2d74b03636af55ca401b96e Author: ykla AuthorDate: 2025-11-25 10:00:16 +0000 Commit: Warner Losh CommitDate: 2025-11-25 18:17:25 +0000 NOTES: Remove duplicate options KCSAN entries Signed-off-by: ykla yklaxds@gmail.com Sponsored by: Chinese FreeBSD Community Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1900 --- sys/amd64/conf/NOTES | 1 - 1 file changed, 1 deletion(-) diff --git a/sys/amd64/conf/NOTES b/sys/amd64/conf/NOTES index e0a9e1b77d93..d48fd10c0e62 100644 --- a/sys/amd64/conf/NOTES +++ b/sys/amd64/conf/NOTES @@ -172,5 +172,4 @@ options PV_STATS #options KUBSAN # Kernel Undefined Behavior Sanitizer #options KCSAN # Kernel Concurrency Sanitizer #options KASAN # Kernel Address Sanitizer -#options KCSAN # Kernel Concurrency Sanitizer #options KMSAN # Kernel Memory Sanitizer From nobody Tue Nov 25 18:17:39 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dG9sJ5mrZz6HZHG for ; Tue, 25 Nov 2025 18:17:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dG9sH6pd4z41DG for ; Tue, 25 Nov 2025 18:17:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764094660; 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=Dvmk4fxzZzSxaPOs654mxLid47geLOr7s8A/YikXfwM=; b=C5g1WeIpCQiIqUb+5WY7S/TecVb88KOZi8Fl0qF2BfjivDCYBQASE5RV7h36BDU21y2Mnk qWLPQf8DsxkT91yBJMNdmsLckc8iyEE2N78UubDg1Fr6qvet7Mr52suPgdsc4tfTnqUcig ElAdsZN+sLGUSUFAPrK8k46+s91miaz0BOz9I0ZntQEGyoed0bnXJ/sD7DhBL2lvMl5ON7 iZLxjKgS0kHH2XwStfOnLmN2r1MNA5krD9KjgCcuODAv30fPbf2jg5XZkfPWQx7IxxPMgZ h2ruB0CSXu0CSF5o+eDfNaQqw1nZsylwAEj0ROeKRNxC6ax2kUqSIbMU7U5TNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764094660; 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=Dvmk4fxzZzSxaPOs654mxLid47geLOr7s8A/YikXfwM=; b=WFXqK5AlqLuxBFYBcgC3AdDul15WMxQpMRKlFAELkr7enaqJ2AJTrHrSRn3m1xZ4BsChUu nLAEAYKHmAv2fZqhu+QZoyb4Ju90jZtDsc9gxCzd+6luNblDrGiA9g5g0a9JK4LbDwIOmk Gtkz5N7EKnUj3gQ7YlwtMyt7UJOBStJkdCSfWO9o4omhv6kR5PjUALlSuIFpvNbnfja2rr Dfq7qh8MSi8xW63zOx0nCCtmMTyAQ9x/B/zFmceO0atuZ829w70Uajv4PC/Bd+xrapU79L Qlq3K41E5n9HUWzzTvXSVBOHh1wa69U+lKWu8WVdFDZVVRNvBKMq26VXihCN6A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764094660; a=rsa-sha256; cv=none; b=eQ0IegGnzlqUL9trFi+rhfsgb9OrduKZsgb6/UwTgaBqbvCdaCz1V9LlvcPE8jvKYddvMX h4XYbPAT97y97fDSlEE64CGInhcSn4TFqGGfXuYQ5BTgoHRIMpaEmQ/5ewptJNi6Bm0E+2 hkxYhavNlQsWhK7KEn4NdvkyImKGq/J+/fMd4QJqjysNqeiDrCcwk+2qAySYORNP4fsbts o8sKYkM23tnDIQeSVjVt3Y0cclum/Sj38EhxC6ZjUp0xzON4/fi4MIzRnX6/eO0KYHIskk dLxmpf30VCeu2S93k0LKYu6NCxh5f3j80KZHS8qm2Ktdcib3rkFqa+Gb0o4wfw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dG9sH6M1Wz1B9p for ; Tue, 25 Nov 2025 18:17:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id e6b5 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 25 Nov 2025 18:17:39 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: ykla From: Warner Losh Subject: git: f7725c3c27e6 - main - NOTES: Fix a typo in a comments List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f7725c3c27e685478398833fbe32504c38438d69 Auto-Submitted: auto-generated Date: Tue, 25 Nov 2025 18:17:39 +0000 Message-Id: <6925f2c3.e6b5.47980eb@gitrepo.freebsd.org> The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=f7725c3c27e685478398833fbe32504c38438d69 commit f7725c3c27e685478398833fbe32504c38438d69 Author: ykla AuthorDate: 2025-11-25 08:12:17 +0000 Commit: Warner Losh CommitDate: 2025-11-25 18:17:26 +0000 NOTES: Fix a typo in a comments Signed-off-by: ykla yklaxds@gmail.com Sponsored by: Chinese FreeBSD Community Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1899 --- sys/conf/NOTES | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/conf/NOTES b/sys/conf/NOTES index 3d5f7dd8a71b..8a11f8ec86b1 100644 --- a/sys/conf/NOTES +++ b/sys/conf/NOTES @@ -1727,7 +1727,7 @@ device ata # Legacy ATA/SATA controllers # PCI ATA chipsets #device ataacard # ACARD #device ataacerlabs # Acer Labs Inc. (ALI) -#device ataamd # American Micro Devices (AMD) +#device ataamd # Advanced Micro Devices (AMD) #device ataati # ATI #device atacenatek # Cenatek #device atacypress # Cypress From nobody Tue Nov 25 18:17:40 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dG9sK3Tc8z6HZKK for ; Tue, 25 Nov 2025 18:17:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dG9sK0WLrz40xD for ; Tue, 25 Nov 2025 18:17:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764094661; 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=UR/nlYgkAULVwtxBU4X5Ybs6Fmz8VJTO4BN2yIvjh4M=; b=qbaY+weqyr+A6oHn2WPKVgjs0Dv1p8kRx8w+py13OLJYZFfUre+ZVOmI8zMmD8uXgf5YYL GUTV/qEUGwbnRTSmZn2qw5gcUjdq7CpI49l9DJKVUaIrfQyXm6X55B+ANdg3LwAxgjpwMV 2YkpNvOL1T3LGQXgKkjXjwJvmc7yOvWH+vxLNS925oieOb8LREFMPNwPgaajUq6Ir/Mhbk pQ8jtSwDBlIjpKxDwFMfQe0AeXdjJAlJG6v5hFS3FzPmDpJ0CArKQ9C4sxY17DXFO0tu6q 5n2vhKQCVkzGc56yWb1oPWeCR/bJoza6B6n+bUa8vGPAqc/hp1ee2ZTUWzvpSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764094661; 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=UR/nlYgkAULVwtxBU4X5Ybs6Fmz8VJTO4BN2yIvjh4M=; b=KS28RgOg84Z0R0tHry1VjJXMlI+6uoIuBlqRZ6Bd3sEgtQbfx/gYI55a52mRVB396XnWJl P6qSjpoVUfeLRXAtFjkF2DWAYY7L841sPPROfti74tTUFCvl4EmvnEzJMLPyh3I4/zoK4H idsHTEe28GTNi7DFE2GRJZpqqk7GtqNz8ZWLSJnK0cw7bnHLpYQqvQ88RMgkYtMCDpfNuR flzdyBub8U+pn5cYY3qEETIcxtkjrfUUHsBtzDSbksXniJuDI1YsuMo1eUiymwzfRxmw9f t+yJO8+kY6zExBpaUOjpt0Lcxw9KOnyHhHDYHe4bdf9UZ68h7iFzxTZqqfreeA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764094661; a=rsa-sha256; cv=none; b=TfXwZey/k9a2z2ZR0q6Ddowz49q1ve8WKKldmCQKTuDAcm7CNKTK+phJtwHVvPjfvV1Z9q Xp3IPSScBzTCNqHU6KK82mFdHBTEcwjfHmfaeLp6Ylrl6nY+GgpA3oKQW8GSs86BjrZPGr fj2qFnef1xhvFoNMaf0ZQqj0aUIKQ93LSQnivzHllwQpWzGB4i9euqWwEsxk7gdustafLK t/8NYO8G+Mz+jXayi9gQtYnEZc8/NfrPvMTLCB3QbR+17GtzQV2bPt5/EuHzbIzWbYqLye fEz86DvuXomNqHMwNUd/mu8RHwbNsJQj/06tBN5AVMQe8SIzCBEEhAHpCsj0Sw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dG9sJ6xXjz19kg for ; Tue, 25 Nov 2025 18:17:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id e4ef by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 25 Nov 2025 18:17:40 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Matt Jacobson From: Warner Losh Subject: git: 4c8bf76893a8 - main - fdread: Fix logic bug when reading by sector List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4c8bf76893a8b39eda15f91d1515c6bf6a02a9a6 Auto-Submitted: auto-generated Date: Tue, 25 Nov 2025 18:17:40 +0000 Message-Id: <6925f2c4.e4ef.50f3b32a@gitrepo.freebsd.org> The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=4c8bf76893a8b39eda15f91d1515c6bf6a02a9a6 commit 4c8bf76893a8b39eda15f91d1515c6bf6a02a9a6 Author: Matt Jacobson AuthorDate: 2025-11-25 01:30:10 +0000 Commit: Warner Losh CommitDate: 2025-11-25 18:17:26 +0000 fdread: Fix logic bug when reading by sector When reading by sector (because reading a whole track failed), we can accidentally fall into the "should not happen" path, which both (a) emits a spurious error message and (b) fouls up our position accounting going forward. Ensure we do not inappropriately fall into that path. Avoid obscuring the "short after" message in cases where it happens. Signed-off-by: Matt Jacobson Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1897 --- usr.sbin/fdread/fdread.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/usr.sbin/fdread/fdread.c b/usr.sbin/fdread/fdread.c index ee8548699783..02dbaf98da8c 100644 --- a/usr.sbin/fdread/fdread.c +++ b/usr.sbin/fdread/fdread.c @@ -275,12 +275,13 @@ doread(int fd, FILE *of, const char *_devname) errx(EX_OSERR, "unexpected read() result: %d", rv); } + continue; } if ((unsigned)rv < tracksize) { /* should not happen */ nbytes += rv; if (!quiet) - fprintf(stderr, "\nshort after %5d KB\r", + fprintf(stderr, "\nshort after %5d KB\n", nbytes / 1024); fwrite(trackbuf, sizeof(unsigned char), rv, of); fflush(of); From nobody Tue Nov 25 18:17:42 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dG9sL3YG3z6HZ1F for ; Tue, 25 Nov 2025 18:17:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dG9sL0yVWz415B for ; Tue, 25 Nov 2025 18:17:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764094662; 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=lr3Fht7B3p3aZqkIN8GiCbIKLHDgxPG+DtoP2S0TQQM=; b=gYelQUZ43cqeIqVUqZEEA1WY9cVrSZXD6Ds6MCXF29y7fbLeHJd1gVbHf1PbsdMGdHvPei +aoHuQDQ/BbET4DQ5O6eEN5sxeqsGk6GbpQtCPgrdixS51STFRutFZTzLPJngIB+/73iR/ S9ao4Inc6XABpFFbKco0JX/13ABDsa6MBFKKVhmcGw7DKRUnISoQuHe13Em+EBeQ5D0a7D z92cx6oNAgROxG/bTyeaIVkJ49DDAvur162dzW8IV51ZvKdyT3cdPh3q+oC5JaUscMNyZ6 Kus3d2cfeG7mnOXm46bilhvAxKWzF9OzgAkPEn1rsRVE9Ammy86KHCGzoO3ulg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764094662; 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=lr3Fht7B3p3aZqkIN8GiCbIKLHDgxPG+DtoP2S0TQQM=; b=b+gE15Q6fa7xim/3ZMPsek1Hap5DdAJ7TtPrRYmhYlMYDgJ3ZvNhwP+Ko3DX2c7MxOyJAZ 4tj0hGhL1DL8a9fSphLKrCQ6XoMdUJLpLaAu4sKQdM3oQm/wmbLM9wyxKkDwtBzTSGNXZ/ zIo9O/AMbIJkg7nVISRnyEK0IPfDoaaoqA062pYk1w8HxE3Ngfy87JpVIE+h1SitAK5Sxc tV07JtX5ywP/wrY1++LLoeANLGRMBsMIV0mkbJ5qI5b7OxWIiUfqug6SiaIT+/HtR9pH7S zOG6sTauMsLteQ6cN5makvGWIwvwojaQeFil0f0fUvh7116e9hwX0zzXlRVtXw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764094662; a=rsa-sha256; cv=none; b=W6vrNyzir8IQvDvgsSzZAL02L0oKIFLAhtR14lOpcpOrIaoymFKuAQa7aVLjGhFi5sOI/F 3Jyr9XrQrPPNHtv1lJTIIzFBVXqmtHbtK+9dXjjwIdtLmDsrEM8+IdDscBZFa+zOBahQA7 B3OaceP/W+AHlGH2n/8MRPdsKkwsBHVq7YpEBojwOGWAVn0xyzONrEQyKk9wSgBMzWedmp lIMpk31QxbzIVxrep0IRufWWO3Fm/wS1fr8RpNhZSTLro/a9+ySy5xE3Je/vEdH1fo9HUe kb3gWdQ4OD8vrvWBGh5cUMcCzD2pELrcNuCCBwxUXl9wXd4tPCvtKCN4oU6Omg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dG9sL0XC3z1BPx for ; Tue, 25 Nov 2025 18:17:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id d8bd by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 25 Nov 2025 18:17:42 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Ricardo Branco From: Warner Losh Subject: git: 51f278e685a0 - main - lseek.2: SEEK_HOLE, SEEK_DATA & ENXIO conform to POSIX 2024 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 51f278e685a0aa57930fabbcc7ab0d03fda0ee49 Auto-Submitted: auto-generated Date: Tue, 25 Nov 2025 18:17:42 +0000 Message-Id: <6925f2c6.d8bd.53aed1fb@gitrepo.freebsd.org> The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=51f278e685a0aa57930fabbcc7ab0d03fda0ee49 commit 51f278e685a0aa57930fabbcc7ab0d03fda0ee49 Author: Ricardo Branco AuthorDate: 2025-11-18 23:00:38 +0000 Commit: Warner Losh CommitDate: 2025-11-25 18:17:26 +0000 lseek.2: SEEK_HOLE, SEEK_DATA & ENXIO conform to POSIX 2024 Signed-off-by: Ricardo Branco Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1891 --- lib/libsys/lseek.2 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/libsys/lseek.2 b/lib/libsys/lseek.2 index 6df543d8ce72..7fabe8fc3b4d 100644 --- a/lib/libsys/lseek.2 +++ b/lib/libsys/lseek.2 @@ -209,7 +209,8 @@ and .Dv SEEK_DATA directives, along with the .Er ENXIO -error, are extensions to that specification. +error, are expected to conform to +.St -p1003.1-2024 . .Sh HISTORY The .Fn lseek From nobody Tue Nov 25 18:17:43 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dG9sM37FYz6HZHP for ; Tue, 25 Nov 2025 18:17:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dG9sM20tsz415J for ; Tue, 25 Nov 2025 18:17:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764094663; 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=pvmVnga/Xs9sHCf4VbAtCPcbJ8sUWiYbdCfII5PiNJ8=; b=q34DuZK9/ANRqOXr714lIymUhlECBk2365b6XZOP1nYPNKh0gpAmbznPh0X1+ctgA1mFoJ 1NIGy1p1xPfCzXQrz4E0vWnyAFxWOVKrC31gWTya95YhwclhFubQBCTLftouZPrG1Af2R7 GJF6bjQtQ3at3RE9XnC/hGt6ScxgZqePjqIwN6W/qL75/QxK6xyhwrdD3+jbfJ2YyCRP5G PFFsx/Hb0XQZYCPeEHwbcNWIXcxFRBT5G3eec6qp0CYNZrZYS7hT6lxLhYfxtRU7P7DI+k 6lp3yO/xTyMUzO99vfHe80x5qD+ussMTcSRDgaZW8BJRXtH4UC6S/R8kDh9ZaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764094663; 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=pvmVnga/Xs9sHCf4VbAtCPcbJ8sUWiYbdCfII5PiNJ8=; b=NC4gFFyLmaNiKqzdhx+cD4qc8dCrdkEA6bx8vgW+WVqpdPkl4P9WMKUK9KDTPOvveLTwBL mERS0HAYCH0uRRUlkdGOSTpqLTpZQ16DZ8apWy6TLvp6XQBhfxJrCPh1AAXz7HsS5bHq7d hgbBWYr+Iuq4BNUh+gLwZ/Poy0veEyvP+IL3rs5iKhodE+B8nhM6h+yt0nPpCdbkBoqsf1 E42grWsgy8BI8R9t5imzSNmARnEb8kUQUy5emmqJtjeirdnqFnPYO8ACBI/hEXkf24NYbI w75L/GsJ3MMdzN8xvIWWyYpkS5uz5iU7X1WX5XNwLV82ejORLHhRaVfAyqOV3g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764094663; a=rsa-sha256; cv=none; b=NMrq4pGasxlTyI0vsGkvhJ+gQ4ts6VgtIrVYqNVM0oz3ntnkcb3+wTgmEpc0f0OEfmyxs/ EIA8D1i0WtTihN/jInpCABCPoAnlrh00CGZsp/7Qx/yP8zx/R6mPTAGIUtcpAp1JWxRL1v y/sEPyoBszfx2hafKpcESUQZNPPILGNvPQNgWmIU3bbY6AOm91LcfL+P3s+mAiCHLv79qO 7WBvPDaad2AbhyvQJ1V9OTVIXPbiDeyWi4bZfZcZ/nmyIl1SxFj0I9sjTbPJYbH3XrzaV+ EF8254fDdmsf7Kz7nW/brh9ksjiaeAe8UV5deqiq3iGTBbGHp6i+4X48HRsEvA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dG9sM1JK7z19kj for ; Tue, 25 Nov 2025 18:17:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id c7c9 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 25 Nov 2025 18:17:43 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Minsoo Choo From: Warner Losh Subject: git: bf4c7487f25d - main - jemalloc: import jemalloc 5.3.0 man page List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bf4c7487f25d3891425a9ba54516b740a948876b Auto-Submitted: auto-generated Date: Tue, 25 Nov 2025 18:17:43 +0000 Message-Id: <6925f2c7.c7c9.359c664e@gitrepo.freebsd.org> The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=bf4c7487f25d3891425a9ba54516b740a948876b commit bf4c7487f25d3891425a9ba54516b740a948876b Author: Minsoo Choo AuthorDate: 2025-11-17 18:45:19 +0000 Commit: Warner Losh CommitDate: 2025-11-25 18:17:26 +0000 jemalloc: import jemalloc 5.3.0 man page Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1890 --- lib/libc/stdlib/malloc/jemalloc/jemalloc.3 | 232 ++++++++++++++++++++++------- 1 file changed, 180 insertions(+), 52 deletions(-) diff --git a/lib/libc/stdlib/malloc/jemalloc/jemalloc.3 b/lib/libc/stdlib/malloc/jemalloc/jemalloc.3 index a4ea3e1f54a9..6d905c815ef4 100644 --- a/lib/libc/stdlib/malloc/jemalloc/jemalloc.3 +++ b/lib/libc/stdlib/malloc/jemalloc/jemalloc.3 @@ -1,13 +1,13 @@ '\" t .\" Title: JEMALLOC .\" Author: Jason Evans -.\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 11/10/2019 +.\" Generator: DocBook XSL Stylesheets vsnapshot +.\" Date: 05/06/2022 .\" Manual: User Manual -.\" Source: jemalloc 5.2.1-0-gea6b3e973b477b8061e0076bb257dbd7f3faa756 +.\" Source: jemalloc 5.3.0-0-g54eaed1d8b56b1aa528be3bdd1877e59c56fa90c .\" Language: English .\" -.TH "JEMALLOC" "3" "11/10/2019" "jemalloc 5.2.1-0-gea6b3e973b47" "User Manual" +.TH "JEMALLOC" "3" "05/06/2022" "jemalloc 5.3.0-0-g54eaed1d8b56" "User Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -31,26 +31,13 @@ jemalloc \- general purpose memory allocation functions .SH "LIBRARY" .PP -This manual describes jemalloc 5\&.2\&.1\-0\-gea6b3e973b477b8061e0076bb257dbd7f3faa756\&. More information can be found at the +This manual describes jemalloc 5\&.3\&.0\-0\-g54eaed1d8b56b1aa528be3bdd1877e59c56fa90c\&. More information can be found at the \m[blue]\fBjemalloc website\fR\m[]\&\s-2\u[1]\d\s+2\&. -.PP -The following configuration options are enabled in libc\*(Aqs built\-in jemalloc: -\fB\-\-enable\-fill\fR, -\fB\-\-enable\-lazy\-lock\fR, -\fB\-\-enable\-stats\fR, -\fB\-\-enable\-utrace\fR, -\fB\-\-enable\-xmalloc\fR, and -\fB\-\-with\-malloc\-conf=abort_conf:false\fR\&. Additionally, -\fB\-\-enable\-debug\fR -is enabled in development versions of FreeBSD (controlled by the -\fBMK_MALLOC_PRODUCTION\fR -make variable)\&. .SH "SYNOPSIS" .sp .ft B .nf -#include -#include +#include .fi .ft .SS "Standard API" @@ -603,7 +590,7 @@ T} :T{ 8 KiB T}:T{ -[40 KiB, 48 KiB, 54 KiB, 64 KiB] +[40 KiB, 48 KiB, 56 KiB, 64 KiB] T} :T{ 16 KiB @@ -848,6 +835,11 @@ in these cases\&. This option is disabled by default unless is specified during configuration, in which case it is enabled by default\&. .RE .PP +opt\&.cache_oblivious (\fBbool\fR) r\- +.RS 4 +Enable / Disable cache\-oblivious large allocation alignment, for large requests with no alignment constraints\&. If this feature is disabled, all large allocations are page\-aligned as an implementation artifact, which can severely harm CPU cache utilization\&. However, the cache\-oblivious layout comes at the cost of one extra page per large allocation, which in the most extreme case increases physical memory usage for the 16 KiB size class to 20 KiB\&. This option is enabled by default\&. +.RE +.PP opt\&.metadata_thp (\fBconst char *\fR) r\- .RS 4 Controls whether to allow jemalloc to use transparent huge page (THP) for internal metadata (see @@ -859,6 +851,11 @@ uses no THP initially, but may begin to do so when metadata usage reaches certai \(lqdisabled\(rq\&. .RE .PP +opt\&.trust_madvise (\fBbool\fR) r\- +.RS 4 +If true, do not perform runtime check for MADV_DONTNEED, to check that it actually zeros pages\&. The default is disabled on Linux and enabled elsewhere\&. +.RE +.PP opt\&.retain (\fBbool\fR) r\- .RS 4 If true, retain unused virtual memory for later reuse rather than discarding it by calling @@ -990,6 +987,28 @@ is enabled\&. The default is \(lq\(rq\&. .RE .PP +opt\&.stats_interval (\fBint64_t\fR) r\- +.RS 4 +Average interval between statistics outputs, as measured in bytes of allocation activity\&. The actual interval may be sporadic because decentralized event counters are used to avoid synchronization bottlenecks\&. The output may be triggered on any thread, which then calls +malloc_stats_print()\&. +opt\&.stats_interval_opts +can be combined to specify output options\&. By default, interval\-triggered stats output is disabled (encoded as \-1)\&. +.RE +.PP +opt\&.stats_interval_opts (\fBconst char *\fR) r\- +.RS 4 +Options (the +\fIopts\fR +string) to pass to the +malloc_stats_print() +for interval based statistics printing (enabled through +opt\&.stats_interval)\&. See available options in +malloc_stats_print()\&. Has no effect unless +opt\&.stats_interval +is enabled\&. The default is +\(lq\(rq\&. +.RE +.PP opt\&.junk (\fBconst char *\fR) r\- [\fB\-\-enable\-fill\fR] .RS 4 Junk filling\&. If set to @@ -1046,13 +1065,13 @@ This option is disabled by default\&. opt\&.tcache (\fBbool\fR) r\- .RS 4 Thread\-specific caching (tcache) enabled/disabled\&. When there are multiple threads, each thread uses a tcache for objects up to a certain size\&. Thread\-specific caching allows many allocations to be satisfied without performing any thread synchronization, at the cost of increased memory use\&. See the -opt\&.lg_tcache_max +opt\&.tcache_max option for related tuning information\&. This option is enabled by default\&. .RE .PP -opt\&.lg_tcache_max (\fBsize_t\fR) r\- +opt\&.tcache_max (\fBsize_t\fR) r\- .RS 4 -Maximum size class (log base 2) to cache in the thread\-specific cache (tcache)\&. At a minimum, all small size classes are cached, and at a maximum all large size classes are cached\&. The default maximum is 32 KiB (2^15)\&. +Maximum size class to cache in the thread\-specific cache (tcache)\&. At a minimum, the first size class is cached; and at a maximum, size classes up to 8 MiB can be cached\&. The default maximum is 32 KiB (2^15)\&. As a convenience, this may also be set by specifying lg_tcache_max, which will be taken to be the base\-2 logarithm of the setting of tcache_max\&. .RE .PP opt\&.thp (\fBconst char *\fR) r\- @@ -1091,7 +1110,8 @@ for heap profile format documentation\&. opt\&.prof_prefix (\fBconst char *\fR) r\- [\fB\-\-enable\-prof\fR] .RS 4 Filename prefix for profile dumps\&. If the prefix is set to the empty string, no automatic dumps will occur; this is primarily useful for disabling the automatic final heap dump (which also disables leak reporting, if enabled)\&. The default prefix is -jeprof\&. +jeprof\&. This prefix value can be overridden by +prof\&.prefix\&. .RE .PP opt\&.prof_active (\fBbool\fR) r\- [\fB\-\-enable\-prof\fR] @@ -1129,7 +1149,9 @@ Average interval (log base 2) between memory profile dumps, as measured in bytes is controlled by the opt\&.prof_prefix -option\&. By default, interval\-triggered profile dumping is disabled (encoded as \-1)\&. +and +prof\&.prefix +options\&. By default, interval\-triggered profile dumping is disabled (encoded as \-1)\&. .RE .PP opt\&.prof_gdump (\fBbool\fR) r\- [\fB\-\-enable\-prof\fR] @@ -1147,7 +1169,9 @@ function to dump final memory usage to a file named according to the pattern is controlled by the opt\&.prof_prefix -option\&. Note that +and +prof\&.prefix +options\&. Note that atexit() may allocate memory during application initialization and then deadlock internally when jemalloc in turn calls atexit(), so this option is not universally usable (though the application can register its own @@ -1161,7 +1185,46 @@ Leak reporting enabled/disabled\&. If enabled, use an \fBatexit\fR(3) function to report memory leaks detected by allocation sampling\&. See the opt\&.prof -option for information on analyzing heap profile output\&. This option is disabled by default\&. +option for information on analyzing heap profile output\&. Works only when combined with +opt\&.prof_final, otherwise does nothing\&. This option is disabled by default\&. +.RE +.PP +opt\&.prof_leak_error (\fBbool\fR) r\- [\fB\-\-enable\-prof\fR] +.RS 4 +Similar to +opt\&.prof_leak, but makes the process exit with error code 1 if a memory leak is detected\&. This option supersedes +opt\&.prof_leak, meaning that if both are specified, this option takes precedence\&. When enabled, also enables +opt\&.prof_leak\&. Works only when combined with +opt\&.prof_final, otherwise does nothing\&. This option is disabled by default\&. +.RE +.PP +opt\&.zero_realloc (\fBconst char *\fR) r\- +.RS 4 +Determines the behavior of +realloc() +when passed a value of zero for the new size\&. +\(lqalloc\(rq +treats this as an allocation of size zero (and returns a non\-null result except in case of resource exhaustion)\&. +\(lqfree\(rq +treats this as a deallocation of the pointer, and returns +\fBNULL\fR +without setting +\fIerrno\fR\&. +\(lqabort\(rq +aborts the process if zero is passed\&. The default is +\(lqfree\(rq +on Linux and Windows, and +\(lqalloc\(rq +elsewhere\&. +.sp +There is considerable divergence of behaviors across implementations in handling this case\&. Many have the behavior of +\(lqfree\(rq\&. This can introduce security vulnerabilities, since a +\fBNULL\fR +return value indicates failure, and the continued validity of the passed\-in pointer (per POSIX and C11)\&. +\(lqalloc\(rq +is safe, but can cause leaks in programs that expect the common behavior\&. Programs intended to be portable and leak\-free cannot assume either behavior, and must therefore never call realloc with a size of 0\&. The +\(lqabort\(rq +option enables these testing this behavior\&. .RE .PP thread\&.arena (\fBunsigned\fR) rw @@ -1182,7 +1245,7 @@ Get a pointer to the the value that is returned by the thread\&.allocated mallctl\&. This is useful for avoiding the overhead of repeated mallctl*() -calls\&. +calls\&. Note that the underlying counter should not be modified by the application\&. .RE .PP thread\&.deallocated (\fBuint64_t\fR) r\- [\fB\-\-enable\-stats\fR] @@ -1196,7 +1259,23 @@ Get a pointer to the the value that is returned by the thread\&.deallocated mallctl\&. This is useful for avoiding the overhead of repeated mallctl*() -calls\&. +calls\&. Note that the underlying counter should not be modified by the application\&. +.RE +.PP +thread\&.peak\&.read (\fBuint64_t\fR) r\- [\fB\-\-enable\-stats\fR] +.RS 4 +Get an approximation of the maximum value of the difference between the number of bytes allocated and the number of bytes deallocated by the calling thread since the last call to +thread\&.peak\&.reset, or since the thread\*(Aqs creation if it has not called +thread\&.peak\&.reset\&. No guarantees are made about the quality of the approximation, but jemalloc currently endeavors to maintain accuracy to within one hundred kilobytes\&. +.RE +.PP +thread\&.peak\&.reset (\fBvoid\fR) \-\- [\fB\-\-enable\-stats\fR] +.RS 4 +Resets the counter for net bytes allocated in the calling thread to zero\&. This affects subsequent calls to +thread\&.peak\&.read, but not the values returned by +thread\&.allocated +or +thread\&.deallocated\&. .RE .PP thread\&.tcache\&.enabled (\fBbool\fR) rw @@ -1224,11 +1303,27 @@ Control whether sampling is currently active for the calling thread\&. This is a prof\&.active; both must be active for the calling thread to sample\&. This flag is enabled by default\&. .RE .PP +thread\&.idle (\fBvoid\fR) \-\- +.RS 4 +Hints to jemalloc that the calling thread will be idle for some nontrivial period of time (say, on the order of seconds), and that doing some cleanup operations may be beneficial\&. There are no guarantees as to what specific operations will be performed; currently this flushes the caller\*(Aqs tcache and may (according to some heuristic) purge its associated arena\&. +.sp +This is not intended to be a general\-purpose background activity mechanism, and threads should not wake up multiple times solely to call it\&. Rather, a thread waiting for a task should do a timed wait first, call +thread\&.idle +if no task appears in the timeout interval, and then do an untimed wait\&. For such a background activity mechanism, see +background_thread\&. +.RE +.PP tcache\&.create (\fBunsigned\fR) r\- .RS 4 Create an explicit thread\-specific cache (tcache) and return an identifier that can be passed to the \fBMALLOCX_TCACHE(\fR\fB\fItc\fR\fR\fB)\fR macro to explicitly use the specified cache rather than the automatically managed one that is used by default\&. Each explicit cache can be used by only one thread at a time; the application must assure that this constraint holds\&. +.sp +If the amount of space supplied for storing the thread\-specific cache identifier does not equal +sizeof(\fBunsigned\fR), no thread\-specific cache will be created, no data will be written to the space pointed by +\fIoldp\fR, and +\fI*oldlenp\fR +will be set to 0\&. .RE .PP tcache\&.flush (\fBunsigned\fR) \-w @@ -1634,6 +1729,12 @@ Maximum size supported by this large size class\&. arenas\&.create (\fBunsigned\fR, \fBextent_hooks_t *\fR) rw .RS 4 Explicitly create a new arena outside the range of automatically managed arenas, with optionally specified extent hooks, and return the new arena index\&. +.sp +If the amount of space supplied for storing the arena index does not equal +sizeof(\fBunsigned\fR), no arena will be created, no data will be written to the space pointed by +\fIoldp\fR, and +\fI*oldlenp\fR +will be set to 0\&. .RE .PP arenas\&.lookup (\fBunsigned\fR, \fBvoid*\fR) rw @@ -1666,7 +1767,16 @@ Dump a memory profile to the specified file, or if NULL is specified, to a file is controlled by the opt\&.prof_prefix -option\&. +and +prof\&.prefix +options\&. +.RE +.PP +prof\&.prefix (\fBconst char *\fR) \-w [\fB\-\-enable\-prof\fR] +.RS 4 +Set the filename prefix for profile dumps\&. See +opt\&.prof_prefix +for the default setting\&. This can be useful to differentiate profile dumps such as from forked processes\&. .RE .PP prof\&.gdump (\fBbool\fR) rw [\fB\-\-enable\-prof\fR] @@ -1676,7 +1786,9 @@ When enabled, trigger a memory profile dump every time the total virtual memory is controlled by the opt\&.prof_prefix -option\&. +and +prof\&.prefix +options\&. .RE .PP prof\&.reset (\fBsize_t\fR) \-w [\fB\-\-enable\-prof\fR] @@ -1752,6 +1864,18 @@ for details)\&. Retained memory is excluded from mapped memory statistics, e\&.g stats\&.mapped\&. .RE .PP +stats\&.zero_reallocs (\fBsize_t\fR) r\- [\fB\-\-enable\-stats\fR] +.RS 4 +Number of times that the +realloc() +was called with a non\-\fBNULL\fR +pointer argument and a +\fB0\fR +size argument\&. This is a fundamentally unsafe pattern in portable programs; see +opt\&.zero_realloc +for details\&. +.RE +.PP stats\&.background_thread\&.num_threads (\fBsize_t\fR) r\- [\fB\-\-enable\-stats\fR] .RS 4 Number of @@ -1825,6 +1949,26 @@ is one of the counters in mutex profiling counters\&. .RE .PP +stats\&.mutexes\&.prof_thds_data\&.{counter} (\fBcounter specific type\fR) r\- [\fB\-\-enable\-stats\fR] +.RS 4 +Statistics on +\fIprof\fR +threads data mutex (global scope; profiling related)\&. +{counter} +is one of the counters in +mutex profiling counters\&. +.RE +.PP +stats\&.mutexes\&.prof_dump\&.{counter} (\fBcounter specific type\fR) r\- [\fB\-\-enable\-stats\fR] +.RS 4 +Statistics on +\fIprof\fR +dumping mutex (global scope; profiling related)\&. +{counter} +is one of the counters in +mutex profiling counters\&. +.RE +.PP stats\&.mutexes\&.reset (\fBvoid\fR) \-\- [\fB\-\-enable\-stats\fR] .RS 4 Reset all mutex profile statistics, including global mutexes, arena mutexes and bin mutexes\&. @@ -2242,7 +2386,7 @@ heap_v2/524288 [\&.\&.\&.] @ 0x5f86da8 0x5f5a1dc [\&.\&.\&.] 0x29e4d4e 0xa200316 0xabb2988 [\&.\&.\&.] t*: 13: 6688 [0: 0] - t3: 12: 6496 [0: ] + t3: 12: 6496 [0: 0] t99: 1: 192 [0: 0] [\&.\&.\&.] @@ -2264,9 +2408,9 @@ to indicate descriptions of the corresponding fields\&. / : : [: ] [\&.\&.\&.] - : : [: ] + : : [: ] [\&.\&.\&.] - : : [: ] + : : [: ] [\&.\&.\&.] @ [\&.\&.\&.] [\&.\&.\&.] : : [: ] @@ -2432,7 +2576,8 @@ is not \fInewlen\fR is too large or too small\&. Alternatively, \fI*oldlenp\fR -is too large or too small; in this case as much data as possible are read despite the error\&. +is too large or too small; when it happens, except for a very few cases explicitly documented otherwise, as much data as possible are read despite the error, with the amount of data read being recorded in +\fI*oldlenp\fR\&. .RE .PP ENOENT @@ -2520,23 +2665,6 @@ functions conform to ISO/IEC 9899:1990 (\(lqISO C90\(rq)\&. The posix_memalign() function conforms to IEEE Std 1003\&.1\-2001 (\(lqPOSIX\&.1\(rq)\&. -.SH "HISTORY" -.PP -The -malloc_usable_size() -and -posix_memalign() -functions first appeared in FreeBSD 7\&.0\&. -.PP -The -aligned_alloc(), -malloc_stats_print(), and -mallctl*() -functions first appeared in FreeBSD 10\&.0\&. -.PP -The -*allocx() -functions first appeared in FreeBSD 11\&.0\&. .SH "AUTHOR" .PP \fBJason Evans\fR From nobody Tue Nov 25 18:17:44 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dG9sN4fyBz6HZQ0 for ; Tue, 25 Nov 2025 18:17:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dG9sN2SHpz4183 for ; Tue, 25 Nov 2025 18:17:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764094664; 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=ZmJK7jQZtzrbG/3JinvRRAoBdS5pG6kmg9NjfwiA17Y=; b=IRlNVnerPxtnDhchKXSwZdCOHiXHCxzDvNo4RX4O3rCXR3a/IVfcKe0/WZo7ppC2T+MfAx O8odLUk1iZwTMI8kMLSNGj5DpKBc4h85+IJIi32G88YzREto/oKBicJ6A3lg7uSbBelbeV Xo9F8GDs4HcCxLuaZdwOlxALiq8Zo+SDIRMfmlxbNc05Ea+qQ6mnxH82kvrcHrMpHp4/Yz 1QYz5D66AjoRA7d1d7vWexMJQyQb+5ta1O66sRxoCsUkhq6d0mhTHaTq/+sjRq177CAVNk NfaBr6t/C9oAwtdAavIi9gk2/slFqN3SccZxEEMVz0UMJY2cpM8Ao+QQeexSDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764094664; 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=ZmJK7jQZtzrbG/3JinvRRAoBdS5pG6kmg9NjfwiA17Y=; b=M65fjOULDC/STHbMGRg31MwJzwu2B9urFubiWSFHUwtp73wKXUh+CsQZd8eLfiZ1gkdchH ldLi/alE3u8Abk9FMqP0ePpyVRSpIzv1Zr//OhWb6XG/+LExJOiqSMxnoFH+MU6eDYysFG Fs3L0evKifGdv9GwNejicq5UDvnzl1iFrmMFzQqfBh1d9WO3mk8QoUvfLYGKKqpfvv3SF6 fZxxPzrjrxvanSR4N0D2gZ5xS2j1LaK7Y0XqQOeS5jkWiuwdTg6pSMqMMe1UNasX0BrpDO GdpPNVxZEByeh6bsu2Guc/bk7ehJ97A7+F4j/7DoebNznVirF9+FJhlnrECc1w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764094664; a=rsa-sha256; cv=none; b=SlmzTbjqX/5EHkGgkwXayTo12opL+CAAqZCjnk/V7UbvGzqT12YSIs4w3WzMWj5Bbhh9xl Dmrtl/Bb2/wjLdM1OHJHxMWL+BXmLN9qNCZSaUlZtzZXTEVMEBt5YJEqAhGsu3uGY1xed/ lHWIHFYROA768ALAQLaComwLj7SFpXNXpmhAZy9bqtcKLFOV7bLO2LtR1UWC092f0GKz7F 0Z4I44AdtUFWV1o3Ecagisle3dzY9zodzCWAC1dGV/ebZvcVmv94qghbVBEKEQ8XoeNJQG zFgo2NhTQ/82NZWR8qx2eIndsGeVHnSX4G2F6xTckWO6phcFzL7o4TEi1a7J4A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dG9sN1xDdz1B0C for ; Tue, 25 Nov 2025 18:17:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id ebaf by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 25 Nov 2025 18:17:44 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Minsoo Choo From: Warner Losh Subject: git: 80ec82aba9ae - main - jemalloc: apply freebsd changes to jemalloc 5.3.0 man page List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 80ec82aba9ae7286cac1a4f8000262cf2cf34d0c Auto-Submitted: auto-generated Date: Tue, 25 Nov 2025 18:17:44 +0000 Message-Id: <6925f2c8.ebaf.2d54e353@gitrepo.freebsd.org> The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=80ec82aba9ae7286cac1a4f8000262cf2cf34d0c commit 80ec82aba9ae7286cac1a4f8000262cf2cf34d0c Author: Minsoo Choo AuthorDate: 2025-11-17 18:48:15 +0000 Commit: Warner Losh CommitDate: 2025-11-25 18:17:26 +0000 jemalloc: apply freebsd changes to jemalloc 5.3.0 man page Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1890 --- lib/libc/stdlib/malloc/jemalloc/jemalloc.3 | 32 +++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/lib/libc/stdlib/malloc/jemalloc/jemalloc.3 b/lib/libc/stdlib/malloc/jemalloc/jemalloc.3 index 6d905c815ef4..1c99352a6ae2 100644 --- a/lib/libc/stdlib/malloc/jemalloc/jemalloc.3 +++ b/lib/libc/stdlib/malloc/jemalloc/jemalloc.3 @@ -33,11 +33,24 @@ jemalloc \- general purpose memory allocation functions .PP This manual describes jemalloc 5\&.3\&.0\-0\-g54eaed1d8b56b1aa528be3bdd1877e59c56fa90c\&. More information can be found at the \m[blue]\fBjemalloc website\fR\m[]\&\s-2\u[1]\d\s+2\&. +.PP +The following configuration options are enabled in libc\*(Aqs built\-in jemalloc: +\fB\-\-enable\-fill\fR, +\fB\-\-enable\-lazy\-lock\fR, +\fB\-\-enable\-stats\fR, +\fB\-\-enable\-utrace\fR, +\fB\-\-enable\-xmalloc\fR, and +\fB\-\-with\-malloc\-conf=abort_conf:false\fR\&. Additionally, +\fB\-\-enable\-debug\fR +is enabled in development versions of FreeBSD (controlled by the +\fBMK_MALLOC_PRODUCTION\fR +make variable)\&. .SH "SYNOPSIS" .sp .ft B .nf -#include +#include +#include .fi .ft .SS "Standard API" @@ -2665,6 +2678,23 @@ functions conform to ISO/IEC 9899:1990 (\(lqISO C90\(rq)\&. The posix_memalign() function conforms to IEEE Std 1003\&.1\-2001 (\(lqPOSIX\&.1\(rq)\&. +.SH "HISTORY" +.PP +The +malloc_usable_size() +and +posix_memalign() +functions first appeared in FreeBSD 7\&.0\&. +.PP +The +aligned_alloc(), +malloc_stats_print(), and +mallctl*() +functions first appeared in FreeBSD 10\&.0\&. +.PP +The +*allocx() +functions first appeared in FreeBSD 11\&.0\&. .SH "AUTHOR" .PP \fBJason Evans\fR From nobody Tue Nov 25 18:26:33 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dGB3Y4CPbz6HZjy for ; Tue, 25 Nov 2025 18:26:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dGB3Y3VbXz47pn for ; Tue, 25 Nov 2025 18:26:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764095193; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1+sp4DGFCyd17eVZrJX5jVirbRZKqs4RDKQCh5krPQs=; b=JxlwEzabDW5iYhzsyetGtqajIT2OlcA6i3o9mUZis8eeFlF/LqFs2J8t649Uwdxwby8UUi Gm4o38DdtvIUoBG0iF3DKLem3UQ37Foti8vCKKk+BiFfDGF/vdYOxGsmqE5vfqajhlR4IF COLOCNE8vzn5hy9oA2tGM15P3kouomDGTg9F+IwpE7UWLkOeAYQ8NlvHuxlSbCniEIAGb2 r8UAUM0nL8Hillx/l5HH452kdoHqwr1Pw9MkcBCH/uIyIwJ6OVWtNr4H9v4oRqr4M4cUi5 xZnwSxu2OYl3kmsFR359OZrm1ceXNBqZTsX799MmJZNmvlPHt4cYYE+WwVjcPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764095193; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1+sp4DGFCyd17eVZrJX5jVirbRZKqs4RDKQCh5krPQs=; b=oP2M01tf/9mZEaRbRjLY/HF56lQwoA2HPWrsh7b0GwYXbHT8ETN9tE2d3mdJmrFYiC8Xrh K2b7QnsmBaYHE+AnA1lGbeFBu0nkf4sV1s4l42E/WE07zHeKkhHRkvCnxBzQMcmAVZLLky IPw0jVAdZFvpwPbMu1mpgLx/kUZNvzEIvj/5clRTEaYVFa3Kge1Ih3/9+091JLfY/Bum7Y e1eM+s+pM++vpSUtQ5txoD+B2NvBegpA+y+mDICbVeBq+PJNgbCn9JRE8RdlkW9PBpFRzU KFGVE66rS2I6kwncp5lBJs4ELx4dXqCSRXXPQzjcqqlU0WMm2RANtf4OC4/8Pw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764095193; a=rsa-sha256; cv=none; b=uXkfEuNFaFK3rdcr4EvU81VOivlCuIkdMxEBBoJ29xZxUWiYgN5vbkeiset14A32NSz0hw Jfdytj6kFOKgHtyKm051t08rCiUZzvK9He0U2+nMFteaza4U4yANDZ7ccWXngIeoMqpowi pORTrb2vPUJjRu5lZto3nZjTTTVn8x8RFpWRjy/hKv70o+nwcf33HVyYHDY4r4GDgwcW6b ON1rNWrLEXXKnpBAhgzAdQkgGDFGP3xEpi/L/2kj2x2TGJo0pUBOiG4kI8NEowSxQV7SWP R3S56JkKVhgEZGcMm33aJPf0kS1QdW1fFVFsdHxOKtjlfydq/vbZtDjotthL4Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dGB3Y1TGSz1BfT for ; Tue, 25 Nov 2025 18:26:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id f3ac by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 25 Nov 2025 18:26:33 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Marko Zec Subject: git: b1b0fb3dcf00 - main - fib_algo: add FIB_ALGO to GENERIC kernel config on riscv List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zec X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b1b0fb3dcf00dd999fa2635ab0124d01e74ae551 Auto-Submitted: auto-generated Date: Tue, 25 Nov 2025 18:26:33 +0000 Message-Id: <6925f4d9.f3ac.7672358d@gitrepo.freebsd.org> The branch main has been updated by zec: URL: https://cgit.FreeBSD.org/src/commit/?id=b1b0fb3dcf00dd999fa2635ab0124d01e74ae551 commit b1b0fb3dcf00dd999fa2635ab0124d01e74ae551 Author: Marko Zec AuthorDate: 2025-11-25 18:18:37 +0000 Commit: Marko Zec CommitDate: 2025-11-25 18:26:14 +0000 fib_algo: add FIB_ALGO to GENERIC kernel config on riscv FIB_ALGO modular FIB lookups have been enabled by default on amd64 and arm64 since 2021, so enable it on riscv as well. Reviewed by: melifaro MFC after: 1 month --- sys/riscv/conf/GENERIC | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/riscv/conf/GENERIC b/sys/riscv/conf/GENERIC index 36e3fcd41970..b645cd3499cb 100644 --- a/sys/riscv/conf/GENERIC +++ b/sys/riscv/conf/GENERIC @@ -31,6 +31,7 @@ options INET6 # IPv6 communications protocols options TCP_HHOOK # hhook(9) framework for TCP options IPSEC_SUPPORT # Allow kldload of ipsec and tcpmd5 options ROUTE_MPATH # Multipath routing support +options FIB_ALGO # Modular fib lookups options TCP_OFFLOAD # TCP offload options TCP_BLACKBOX # Enhanced TCP event logging options TCP_RFC7413 # TCP Fast Open From nobody Tue Nov 25 18:33:39 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dGBCq1FvDz6HbQT; Tue, 25 Nov 2025 18:33:43 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from omta004.cacentral1.a.cloudfilter.net (omta002.cacentral1.a.cloudfilter.net [3.97.99.33]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dGBCp4FDCz49hP; Tue, 25 Nov 2025 18:33:42 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Authentication-Results: mx1.freebsd.org; none Received: from shw-obgw-4001b.ext.cloudfilter.net ([10.228.9.171]) by cmsmtp with ESMTPS id NpQJvIXWkPzKyNxrBvVqFG; Tue, 25 Nov 2025 18:33:41 +0000 Received: from spqr.komquats.com ([70.66.136.217]) by cmsmtp with ESMTPSA id NxrAv5o9Q1cakNxrBvfgKk; Tue, 25 Nov 2025 18:33:41 +0000 X-Auth-User: cschuber X-Authority-Analysis: v=2.4 cv=faOgCkQF c=1 sm=1 tr=0 ts=6925f685 a=h7br+8Ma+Xn9xscxy5znUg==:117 a=h7br+8Ma+Xn9xscxy5znUg==:17 a=kj9zAlcOel0A:10 a=6UeiqGixMTsA:10 a=6I5d2MoRAAAA:8 a=EkcXrb_YAAAA:8 a=9bHR7MVLAAAA:8 a=YxBL1-UpAAAA:8 a=_6sNqhW9wXsMo5aZENcA:9 a=CjuIK1q_8ugA:10 a=LK5xJRSDVpKd5WXXoEvA:22 a=I7KxNEAtLM9g1UmuDjRu:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy.cwsent.com [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTP id 11CE514A; Tue, 25 Nov 2025 10:33:40 -0800 (PST) Received: by slippy.cwsent.com (Postfix, from userid 1000) id CD2AA283; Tue, 25 Nov 2025 10:33:39 -0800 (PST) X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.8+dev Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Ed Maste cc: "Bjoern A. Zeeb" , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: fad4c92b78a1 - main - Revert "kernel linker: Disable local sym resolution by default" In-reply-to: References: <6925e3f4.8ba9.54553559@gitrepo.freebsd.org> <32r4p844-8so-n29s-rq37-9r9p4q40o36@mnoonqbm.arg> Comments: In-reply-to Ed Maste message dated "Tue, 25 Nov 2025 13:05:16 -0500." List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 25 Nov 2025 10:33:39 -0800 Message-Id: <20251125183339.CD2AA283@slippy.cwsent.com> X-CMAE-Envelope: MS4xfPSpXXZ0T63wbzLgWYomyvXmufO+YmQvxZ68HiyZrMwA9l79Wi1Uo0O/Ju5AXso8uVXv2V72TRaZ0QIdnT9iL9ABCZIw/Ya8ciEkk0CjofMT023Ky9TF 5bZJunZI/ZleiJDVAjQpOUqp/wCx6WiremQxlnhpWn1Zm236CqFqqTEe5CYUgEGmeDh+dLKzssu44awDlVvAZ6dXBIoeCfKCz0GEBA3uXtrZZJJ4IZtJh7U8 PsXUtfXQTjZp793Miax+C7JIrewuVANTREDqaipH80WObMAfnW54DwIGBd4zBvfNhNr6Wh9IfJCEnP4f5n7d/i5C8wmC2kTEmvYbW1qdNroLslTO44S0xdRm UVMn1MHP06XQqMNm/jKRIvbgIc5zgQ== X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4dGBCp4FDCz49hP In message , Ed Maste writes: > On Tue, 25 Nov 2025 at 12:39, Bjoern A. Zeeb > wrote: > > > > On Tue, 25 Nov 2025, Ed Maste wrote: > > > > > The branch main has been updated by emaste: > > > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=fad4c92b78a123f87195173ac118 > 655fa8e325cd > > > > > > commit fad4c92b78a123f87195173ac118655fa8e325cd > > > Author: Ed Maste > > > AuthorDate: 2025-11-25 17:12:36 +0000 > > > Commit: Ed Maste > > > CommitDate: 2025-11-25 17:14:10 +0000 > > > > > > Revert "kernel linker: Disable local sym resolution by default" > > > > > > I've received a report of a failure from resolving kern_kmq_open. > > > Revert for now as we are currently in stabweek. > > > > > > This reverts commit 9562994a7aacee2baae6ddee1a7b558b48ae39ef. > > > > > > Reported by: mav > > > > Would it not have been easier to fix the cause (to stabilize this for good) > ? > > > > I assume it's sys/modules/mqueue/Makefile ? > > That's one issue, cy@ reported a different one that I don't yet > understand. I intend to recommit this next week - I just reverted it > for now because we're in stabweek. I understand it now. My default kernel includes nodevice agp because it's not needed for my servers in my basement. I use the same kernel on the laptops which assumes that X will load drm which in turn loads agp. The i195kms module includes MODULE_DEPEND(i915kms, agp, 1, 1, 1). It doesn't see the external reference in the loaded agp.ko module. -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org e**(i*pi)+1=0 From nobody Tue Nov 25 19:20:48 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dGCGF65vqz6HfT8 for ; Tue, 25 Nov 2025 19:20:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dGCGF5QyMz3GWM for ; Tue, 25 Nov 2025 19:20:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764098453; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/9qbisdq1cBdwWAhrDwVa56tw54IFCkojp6bGhnEzyA=; b=XuC+Xt/bdLXrrw/q/0o2VHNB5YQkTop1RwEbJOH0rAQKTsQW5eeUNLvQ9SvtEYoHW9Vhla Nf10lKemlb1ONhMuFfqvR4ya23QFgiXYuBPZ17vjbohY8qoe4oMowm+B+rK7D1/8PIZlOd jA+EB3pSULSx5ANmlw7afgTExGbsiYcRn5lnhNlxAO/iPNwRzunJSBZhf3yiZZMvXT1oeo Abf021OmSDwsp5IAEBpmOJ7EnAjw8vHLno8Rc1a6GONNWFJ6lfPhkzwoxzZOahAsBy2BcB +OvQpOC1iUFNrr36OrbM2nPSH6hKUZpNNHt4LzU8d+adVnIwtVOx/ObLTq6dXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764098453; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/9qbisdq1cBdwWAhrDwVa56tw54IFCkojp6bGhnEzyA=; b=USgn7pTbsI258g2U5KQzxlLgZ3OH4OB5kOjAXkk261RofuPPh8xQha273wwJSbFhADNDZO VkJYLVmSKflFHKIu6fwL3LO43FqoUTeoFYSuvmJaYzLzTH0bN9Yokr7aUKeYU9kEJ4XVPs 5h/mXVKj/nb0lFlGGyJWwSxveZbzMgUbT0LpkNtn9McAyJ8vumGLi4EhLMC0d8nwEr0Roj dChzA8Zqo8fEoAbhl3TDlBadYHP/vTqHV5jtZRwCTA92S0jIqfX+pRj2Lu7p2ffSlVsVJ0 nUnl9kX+ej0MjMoJyfJqJQ1wuRUbs15ZfxP55jTAxcnY6JQnJGAYcT/EVG4eJw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764098453; a=rsa-sha256; cv=none; b=h4j3RsExFvm6hDIR3yNWjNOk0k79Hkqaxu1H93ZwPnMuSELbBPqMSsaWk+r2XuNgsJALvf UrobAPUGnCBYiNkHeAg5gxmlp8Plqi53oDluYn5XAjy8u6Np3CJopv/3Ikuk8wxDGgbuGk Nsz3FwJBFM41ItQ1SvSMTvYsJkpDggdPpyhoQKZ2Rn+G+EtNbkfCiF8+iDVvwku0F0pFvK lXOng5JA9yk0G5ZryvhYjLFnufI8uIGrEnIKPq9+m1WlHPqMpwwthm8PL/Apanl1nq1S7k ypMgbgnPlkN/Hvp4YBJ+C1c6hdfddbDKTm+WNmg0VK5S3qbjqsN7AEmX+9RgLA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dGCGF50qBz1Ckk for ; Tue, 25 Nov 2025 19:20:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2699b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 25 Nov 2025 19:20:48 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Navdeep Parhar Subject: git: 136a80ad3dab - main - if.h: Fix a couple of typos in comments List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 136a80ad3dab36911bb6408dcd69269b7e0747c7 Auto-Submitted: auto-generated Date: Tue, 25 Nov 2025 19:20:48 +0000 Message-Id: <69260190.2699b.aec479f@gitrepo.freebsd.org> The branch main has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=136a80ad3dab36911bb6408dcd69269b7e0747c7 commit 136a80ad3dab36911bb6408dcd69269b7e0747c7 Author: Navdeep Parhar AuthorDate: 2025-11-25 18:34:46 +0000 Commit: Navdeep Parhar CommitDate: 2025-11-25 18:35:44 +0000 if.h: Fix a couple of typos in comments No functional change. --- sys/net/if.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/net/if.h b/sys/net/if.h index d54190f6ccf8..0bbd9906f5cf 100644 --- a/sys/net/if.h +++ b/sys/net/if.h @@ -253,8 +253,8 @@ struct if_data { #define IFCAP_B_VXLAN_HWCSUM 29 /* can do IFCAN_HWCSUM on VXLANs */ #define IFCAP_B_VXLAN_HWTSO 30 /* can do IFCAP_TSO on VXLANs */ #define IFCAP_B_TXTLS_RTLMT 31 /* can do TLS with rate limiting */ -#define IFCAP_B_RXTLS4 32 /* can to TLS receive for TCP */ -#define IFCAP_B_RXTLS6 33 /* can to TLS receive for TCP6 */ +#define IFCAP_B_RXTLS4 32 /* can do TLS receive for TCP */ +#define IFCAP_B_RXTLS6 33 /* can do TLS receive for TCP6 */ #define IFCAP_B_IPSEC_OFFLOAD 34 /* inline IPSEC offload */ #define __IFCAP_B_SIZE 35 From nobody Tue Nov 25 20:14:31 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dGDS81cB2z6Hk9N for ; Tue, 25 Nov 2025 20:14:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dGDS76YMCz3NTp for ; Tue, 25 Nov 2025 20:14:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764101671; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7zdgY0XDp8yNMMOOzJbB4loQwG6zSApWod0EfMkK7pI=; b=d3m2LYxmW0xCjthn//Ofy0zj0vtG/e1paHr94UWYR+cymIiptcCMdXibJ/1O8dsdYYOiLS 6zuBJtJeXgjlXsXP5+hn6RLzSANrDH29cRg7/gMIPljZoVU9hPRlMLyFvX/2ga4L3+5Cwo hQuOnbSle8RBTwLF6hlNswx+mFh4N6P7Ax5uO2N2/YHX+5ilQCHMMdPPrM9EQTFjKCDLV1 Fc5d8o4pfO0TTrV0mZTiWFP+rFk1lVLvS6a1zN/9b2bT6cDjTsslMCvcz2V0yEAVCBYhhW tKmeWxFFREdzLZ1b5nCbuwkmB33L4fIPurhA9ME4YkziN0w5Z1yLeqgYGYjSWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764101671; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7zdgY0XDp8yNMMOOzJbB4loQwG6zSApWod0EfMkK7pI=; b=Rmo0wZb67GItWScGJ3DMW6lkNoVwx3V0iHvfLsGY+ySjrTZnL8A0H8wI/xlUQWi9zRotQ+ 17bthLXw4wUaDkpv7c3iKqOOSAaxk3nNyDyCCjGvochYgVktiSPk6oXo6bUzeXsYXF8i9K cDkus0tOcduDe6uLMHXJHhtFqBewnpXZ45jHYbLFmeyDPF01EAzkhVOl5BN97JN+tISe/Q 81j/Ejf5CTuYX7BeUQ+MNNnoDybgKNp8casdIM912OYUhp/6m0nSpMNkAVR8T8Sj3OgPje G5qBJ4uYnFu/cl9OCgdphkIdF3I6H9ESWOpOAWn1vL48BdoXFuNfteRor50qcA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764101671; a=rsa-sha256; cv=none; b=Z8UvyqrmUO6z7uw1Uwq774p1vMD80Au+3PA2dqZ5hRWytJal5QcV3hAU3X4MouspNeh7EM 6JaULDPnSJvKJKi8Sxd5n2fTepb0ThOmF1RXFdnyaZZZNcZXu8XlwgsnBRyqA1nNzNGSax hxwzd+Nw9S22zZyjhbYytU5AUJ0KAGjy5TMpbVdXGKrGRLBgS0gi11L2nsCw1qpq4TOpTi jZ1bayKiZ0qkQ3j5padNTP4P/1CfHibdZyCRnisWFafOL8jEQIdvK8PazOVwAfYSkjKdoo Z8GiENtE+SK+vZU0kGTEr6OfE8cqXqoMBmspl+LtBuqNAJFsE31U/VIvIaewNA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dGDS75SH4z1K6 for ; Tue, 25 Nov 2025 20:14:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2ca39 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 25 Nov 2025 20:14:31 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: a87c1e2dd8fc - main - agp: Export intel_gtt_read_pte, required by i915kms List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a87c1e2dd8fc997d6ee603c252c543afe8a4d2a4 Auto-Submitted: auto-generated Date: Tue, 25 Nov 2025 20:14:31 +0000 Message-Id: <69260e27.2ca39.439dcd4f@gitrepo.freebsd.org> The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=a87c1e2dd8fc997d6ee603c252c543afe8a4d2a4 commit a87c1e2dd8fc997d6ee603c252c543afe8a4d2a4 Author: Ed Maste AuthorDate: 2025-11-25 18:40:35 +0000 Commit: Ed Maste CommitDate: 2025-11-25 20:14:19 +0000 agp: Export intel_gtt_read_pte, required by i915kms This isn't used by modern cards, but is needed for i915kms to load on a system that has agp as a module not compiled into the kernel. PR: 291214 Reviewed by: cy Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D53906 --- sys/modules/agp/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/modules/agp/Makefile b/sys/modules/agp/Makefile index d27a78b7e437..f24f05f28407 100644 --- a/sys/modules/agp/Makefile +++ b/sys/modules/agp/Makefile @@ -36,6 +36,7 @@ EXPORT_SYMS+= intel_gtt_clear_range \ intel_gtt_install_pte \ intel_gtt_get \ intel_gtt_chipset_flush \ + intel_gtt_read_pte \ intel_gtt_unmap_memory \ intel_gtt_map_memory \ intel_gtt_insert_sg_entries \ From nobody Tue Nov 25 20:30:12 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dGDpV3pmjz6HlPL; Tue, 25 Nov 2025 20:30:26 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) 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 "E8" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dGDpV1Rtkz3QB6; Tue, 25 Nov 2025 20:30:26 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Authentication-Results: mx1.freebsd.org; none 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 7D90CA64805; Tue, 25 Nov 2025 20:30:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=zabbadoz.net; s=20240622; t=1764102601; bh=ku0U1/vxdTfiKjJD4lawZbOAjA3Y6MU3JQHHB7Ht97M=; h=Date:From:To:cc:Subject:In-Reply-To:References; b=n9yom+s6aD2FafrbfLmKf0UGHUJSE8Pw69wANrtlcmEClPOq3CyqlZz7hE8MqfGp+ bmQM36Xad9CItl81eQePZpmnqfpd9SwBUUPlsU+cVdVG5wz5M+rtP1+74TZ71+Qh+Z j//Am4KRxGqTb1p20LaZ1Rq0clC5oVcvg2U5mnAvs7ucWI1yiafVFk2ETtDTJGBOMh qQW1jkdvfcidno/iFDNm9aN7UWiz8ub/f/mSexMnqfoaHy1dhzGxG84rEDGmsFhV5x fwJ/+efoHQPe8HK8t6/xd1M1/zd16+iF6wOyI4Nl0h8h/iYo9RWBtwNfYuKYB522Wa vh5CluE43QhMRoir+V11BhywccPwq15KujpZ+ICs12quFkGcRZ0bLIaYVrt2sQkgTA LVIw2zhVvX7aZ3urPrS+lugLeq1qoNc+03QHy0E/Phkym+1Qtn6YEbG08xqbh9MUQG sYSdo7fN9COQgv/lcs1Nx0frfut6Ul9eMkKC/L2UDkGwGM7yiQEbCIrKVHXXj/TjmA v/eDa8Zm9OgqBeM7DIGbLh2SSGg+KK7oJRzycrEblEfC5YTor0uXVtcvq6Vk7Rszci 2VZcRrsyZ0wRaJ9Gw9yQIpzI8WI4dHzZ/KjPlk1DW2+CAAJvNR6LSslGMGohJl2gAz BTh8elRFk1/38ApTFZmjxA+k= 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 6AFFE2D029E6; Tue, 25 Nov 2025 20:30:14 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:4902:0:7404:2:1025]) by content-filter.t4-02.sbone.de (content-filter.t4-02.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:2742]) (amavisd-new, port 10024) with ESMTP id wvy9qtNh0h0M; Tue, 25 Nov 2025 20:30:13 +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 371132D029D8; Tue, 25 Nov 2025 20:30:13 +0000 (UTC) Date: Tue, 25 Nov 2025 20:30:12 +0000 (UTC) From: "Bjoern A. Zeeb" To: Ed Maste cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: fad4c92b78a1 - main - Revert "kernel linker: Disable local sym resolution by default" In-Reply-To: Message-ID: References: <6925e3f4.8ba9.54553559@gitrepo.freebsd.org> <32r4p844-8so-n29s-rq37-9r9p4q40o36@mnoonqbm.arg> X-OpenPGP-Key-Id: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:3320, ipnet:2003::/19, country:DE] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4dGDpV1Rtkz3QB6 On Tue, 25 Nov 2025, Ed Maste wrote: >> Would it not have been easier to fix the cause (to stabilize this for good)? >> >> I assume it's sys/modules/mqueue/Makefile ? > > That's one issue, cy@ reported a different one that I don't yet > understand. I intend to recommit this next week - I just reverted it > for now because we're in stabweek. I think it's really time to get anything non-essential out of GENERIC and have it only as a module. We'll quickly catch more. Also GENERIC gets smaller, which is a nice side-effect :) /bz -- Bjoern A. Zeeb r15:7 From nobody Tue Nov 25 21:05:16 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dGFZj1YMXz6HnQQ for ; Tue, 25 Nov 2025 21:05:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dGFZj0vTSz3SW2 for ; Tue, 25 Nov 2025 21:05:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764104717; 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=eLNqM4qo+thwu9OXwYqac8SRLmqpOCk1l9anVd/goe0=; b=fLPLtX2f0dfDjbWCfEtyvhLohG0fvs/hwtwGjBybzLqeimKKRLmZp0p+deiJJI3//cKTt+ 0RqwJGThAnh86K0U1kpN0umLqO0ar+dHWnIwlONWq+l3H2ZQmsO90GBNdr6bxOHZOGEObC tqRkXRUjYITYweFr3p6kfMDQ6ivv2KoXHBrywrFTWzAQdJNcOMbjvZy8Nnfxlj2mk8yQDg 3hy/g/viCSlDxyLkmCNZcAIK6bQQtE/pcNNNtW7iC9RMIw0taU8IuWoE9rviOJExOk8l5m 0ZnLfRKHbDuph9WACs0gqcNDsE+pVc6gKOSVUBoD3GYGA/TpsOCzGeRqIaFt0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764104717; 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=eLNqM4qo+thwu9OXwYqac8SRLmqpOCk1l9anVd/goe0=; b=LQm3P+YDAVf/molj+B2FqmSJL2xjf45l6aRuNU7kyr17UrsgFzEyCkfL2OcaD60aum/APQ WtQEEANj+YVMxoXUPn2Th676arIYBdwiv8UokSpO+07RDL2nh35ImxBkNsE/dP+9unHNsq 4l2EfvkuBkF9hG/7PLiCyqouiulStiQIacfLaiFWK8OuOUAO8BYPEa+m9pqzMZqdZZjC2J xlnLM+ntxj7lSs7KWwJPUlXbPlT+nxOdt53L0wZZwOWQkw5XAVaJSn/wVOgNtHszGl1c7R J4CSbV4K/xg120VlXTsWKoLPcRkleg0sVfzAFIR1oak5APm6qCumIpX51fuf3Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764104717; a=rsa-sha256; cv=none; b=ieKqfrVF3rswRMv42Nsw6SJBmBpNggXyzNBdvNFhO3zmS1+JIJcfh47SRCngT0gWQ2QrGg Coy8aAkVEtBVBRx3e58zRSOBAYOQWZXlV0UsMTv8t0xnrhFGJcQAaVDYpuBOQOc3930JLZ wenuJih9FGKpF7CdMjZfHPWR+sEw7Q0tytv/ncqiE5a7XPITxLy/IdtZuM0Sn4Ul3JOOLg hU6Kbs/8r4TgvRznNBIuv7E3l99tBx1m61plw2u9hqtlVGjZ7QWN3eAyqTM412J9RjGAqR XFKlDChI/TwOF/e6KzCO0Ux9nmhMNOjF24cwbQFaK1ki1owVtdvUxxX8ArJrNg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dGFZh6wM8z2Y5 for ; Tue, 25 Nov 2025 21:05:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2edf5 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 25 Nov 2025 21:05:16 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Minsoo Choo From: Alexander Ziaee Subject: git: 6162f863ce86 - stable/15 - jemalloc: import jemalloc 5.3.0 man page List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ziaee X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 6162f863ce86df854305416b058ff6b17bd0261c Auto-Submitted: auto-generated Date: Tue, 25 Nov 2025 21:05:16 +0000 Message-Id: <69261a0c.2edf5.15bb0322@gitrepo.freebsd.org> The branch stable/15 has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=6162f863ce86df854305416b058ff6b17bd0261c commit 6162f863ce86df854305416b058ff6b17bd0261c Author: Minsoo Choo AuthorDate: 2025-11-17 18:45:19 +0000 Commit: Alexander Ziaee CommitDate: 2025-11-25 21:05:11 +0000 jemalloc: import jemalloc 5.3.0 man page Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1890 (cherry picked from commit bf4c7487f25d3891425a9ba54516b740a948876b) --- lib/libc/stdlib/malloc/jemalloc/jemalloc.3 | 232 ++++++++++++++++++++++------- 1 file changed, 180 insertions(+), 52 deletions(-) diff --git a/lib/libc/stdlib/malloc/jemalloc/jemalloc.3 b/lib/libc/stdlib/malloc/jemalloc/jemalloc.3 index a4ea3e1f54a9..6d905c815ef4 100644 --- a/lib/libc/stdlib/malloc/jemalloc/jemalloc.3 +++ b/lib/libc/stdlib/malloc/jemalloc/jemalloc.3 @@ -1,13 +1,13 @@ '\" t .\" Title: JEMALLOC .\" Author: Jason Evans -.\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 11/10/2019 +.\" Generator: DocBook XSL Stylesheets vsnapshot +.\" Date: 05/06/2022 .\" Manual: User Manual -.\" Source: jemalloc 5.2.1-0-gea6b3e973b477b8061e0076bb257dbd7f3faa756 +.\" Source: jemalloc 5.3.0-0-g54eaed1d8b56b1aa528be3bdd1877e59c56fa90c .\" Language: English .\" -.TH "JEMALLOC" "3" "11/10/2019" "jemalloc 5.2.1-0-gea6b3e973b47" "User Manual" +.TH "JEMALLOC" "3" "05/06/2022" "jemalloc 5.3.0-0-g54eaed1d8b56" "User Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -31,26 +31,13 @@ jemalloc \- general purpose memory allocation functions .SH "LIBRARY" .PP -This manual describes jemalloc 5\&.2\&.1\-0\-gea6b3e973b477b8061e0076bb257dbd7f3faa756\&. More information can be found at the +This manual describes jemalloc 5\&.3\&.0\-0\-g54eaed1d8b56b1aa528be3bdd1877e59c56fa90c\&. More information can be found at the \m[blue]\fBjemalloc website\fR\m[]\&\s-2\u[1]\d\s+2\&. -.PP -The following configuration options are enabled in libc\*(Aqs built\-in jemalloc: -\fB\-\-enable\-fill\fR, -\fB\-\-enable\-lazy\-lock\fR, -\fB\-\-enable\-stats\fR, -\fB\-\-enable\-utrace\fR, -\fB\-\-enable\-xmalloc\fR, and -\fB\-\-with\-malloc\-conf=abort_conf:false\fR\&. Additionally, -\fB\-\-enable\-debug\fR -is enabled in development versions of FreeBSD (controlled by the -\fBMK_MALLOC_PRODUCTION\fR -make variable)\&. .SH "SYNOPSIS" .sp .ft B .nf -#include -#include +#include .fi .ft .SS "Standard API" @@ -603,7 +590,7 @@ T} :T{ 8 KiB T}:T{ -[40 KiB, 48 KiB, 54 KiB, 64 KiB] +[40 KiB, 48 KiB, 56 KiB, 64 KiB] T} :T{ 16 KiB @@ -848,6 +835,11 @@ in these cases\&. This option is disabled by default unless is specified during configuration, in which case it is enabled by default\&. .RE .PP +opt\&.cache_oblivious (\fBbool\fR) r\- +.RS 4 +Enable / Disable cache\-oblivious large allocation alignment, for large requests with no alignment constraints\&. If this feature is disabled, all large allocations are page\-aligned as an implementation artifact, which can severely harm CPU cache utilization\&. However, the cache\-oblivious layout comes at the cost of one extra page per large allocation, which in the most extreme case increases physical memory usage for the 16 KiB size class to 20 KiB\&. This option is enabled by default\&. +.RE +.PP opt\&.metadata_thp (\fBconst char *\fR) r\- .RS 4 Controls whether to allow jemalloc to use transparent huge page (THP) for internal metadata (see @@ -859,6 +851,11 @@ uses no THP initially, but may begin to do so when metadata usage reaches certai \(lqdisabled\(rq\&. .RE .PP +opt\&.trust_madvise (\fBbool\fR) r\- +.RS 4 +If true, do not perform runtime check for MADV_DONTNEED, to check that it actually zeros pages\&. The default is disabled on Linux and enabled elsewhere\&. +.RE +.PP opt\&.retain (\fBbool\fR) r\- .RS 4 If true, retain unused virtual memory for later reuse rather than discarding it by calling @@ -990,6 +987,28 @@ is enabled\&. The default is \(lq\(rq\&. .RE .PP +opt\&.stats_interval (\fBint64_t\fR) r\- +.RS 4 +Average interval between statistics outputs, as measured in bytes of allocation activity\&. The actual interval may be sporadic because decentralized event counters are used to avoid synchronization bottlenecks\&. The output may be triggered on any thread, which then calls +malloc_stats_print()\&. +opt\&.stats_interval_opts +can be combined to specify output options\&. By default, interval\-triggered stats output is disabled (encoded as \-1)\&. +.RE +.PP +opt\&.stats_interval_opts (\fBconst char *\fR) r\- +.RS 4 +Options (the +\fIopts\fR +string) to pass to the +malloc_stats_print() +for interval based statistics printing (enabled through +opt\&.stats_interval)\&. See available options in +malloc_stats_print()\&. Has no effect unless +opt\&.stats_interval +is enabled\&. The default is +\(lq\(rq\&. +.RE +.PP opt\&.junk (\fBconst char *\fR) r\- [\fB\-\-enable\-fill\fR] .RS 4 Junk filling\&. If set to @@ -1046,13 +1065,13 @@ This option is disabled by default\&. opt\&.tcache (\fBbool\fR) r\- .RS 4 Thread\-specific caching (tcache) enabled/disabled\&. When there are multiple threads, each thread uses a tcache for objects up to a certain size\&. Thread\-specific caching allows many allocations to be satisfied without performing any thread synchronization, at the cost of increased memory use\&. See the -opt\&.lg_tcache_max +opt\&.tcache_max option for related tuning information\&. This option is enabled by default\&. .RE .PP -opt\&.lg_tcache_max (\fBsize_t\fR) r\- +opt\&.tcache_max (\fBsize_t\fR) r\- .RS 4 -Maximum size class (log base 2) to cache in the thread\-specific cache (tcache)\&. At a minimum, all small size classes are cached, and at a maximum all large size classes are cached\&. The default maximum is 32 KiB (2^15)\&. +Maximum size class to cache in the thread\-specific cache (tcache)\&. At a minimum, the first size class is cached; and at a maximum, size classes up to 8 MiB can be cached\&. The default maximum is 32 KiB (2^15)\&. As a convenience, this may also be set by specifying lg_tcache_max, which will be taken to be the base\-2 logarithm of the setting of tcache_max\&. .RE .PP opt\&.thp (\fBconst char *\fR) r\- @@ -1091,7 +1110,8 @@ for heap profile format documentation\&. opt\&.prof_prefix (\fBconst char *\fR) r\- [\fB\-\-enable\-prof\fR] .RS 4 Filename prefix for profile dumps\&. If the prefix is set to the empty string, no automatic dumps will occur; this is primarily useful for disabling the automatic final heap dump (which also disables leak reporting, if enabled)\&. The default prefix is -jeprof\&. +jeprof\&. This prefix value can be overridden by +prof\&.prefix\&. .RE .PP opt\&.prof_active (\fBbool\fR) r\- [\fB\-\-enable\-prof\fR] @@ -1129,7 +1149,9 @@ Average interval (log base 2) between memory profile dumps, as measured in bytes is controlled by the opt\&.prof_prefix -option\&. By default, interval\-triggered profile dumping is disabled (encoded as \-1)\&. +and +prof\&.prefix +options\&. By default, interval\-triggered profile dumping is disabled (encoded as \-1)\&. .RE .PP opt\&.prof_gdump (\fBbool\fR) r\- [\fB\-\-enable\-prof\fR] @@ -1147,7 +1169,9 @@ function to dump final memory usage to a file named according to the pattern is controlled by the opt\&.prof_prefix -option\&. Note that +and +prof\&.prefix +options\&. Note that atexit() may allocate memory during application initialization and then deadlock internally when jemalloc in turn calls atexit(), so this option is not universally usable (though the application can register its own @@ -1161,7 +1185,46 @@ Leak reporting enabled/disabled\&. If enabled, use an \fBatexit\fR(3) function to report memory leaks detected by allocation sampling\&. See the opt\&.prof -option for information on analyzing heap profile output\&. This option is disabled by default\&. +option for information on analyzing heap profile output\&. Works only when combined with +opt\&.prof_final, otherwise does nothing\&. This option is disabled by default\&. +.RE +.PP +opt\&.prof_leak_error (\fBbool\fR) r\- [\fB\-\-enable\-prof\fR] +.RS 4 +Similar to +opt\&.prof_leak, but makes the process exit with error code 1 if a memory leak is detected\&. This option supersedes +opt\&.prof_leak, meaning that if both are specified, this option takes precedence\&. When enabled, also enables +opt\&.prof_leak\&. Works only when combined with +opt\&.prof_final, otherwise does nothing\&. This option is disabled by default\&. +.RE +.PP +opt\&.zero_realloc (\fBconst char *\fR) r\- +.RS 4 +Determines the behavior of +realloc() +when passed a value of zero for the new size\&. +\(lqalloc\(rq +treats this as an allocation of size zero (and returns a non\-null result except in case of resource exhaustion)\&. +\(lqfree\(rq +treats this as a deallocation of the pointer, and returns +\fBNULL\fR +without setting +\fIerrno\fR\&. +\(lqabort\(rq +aborts the process if zero is passed\&. The default is +\(lqfree\(rq +on Linux and Windows, and +\(lqalloc\(rq +elsewhere\&. +.sp +There is considerable divergence of behaviors across implementations in handling this case\&. Many have the behavior of +\(lqfree\(rq\&. This can introduce security vulnerabilities, since a +\fBNULL\fR +return value indicates failure, and the continued validity of the passed\-in pointer (per POSIX and C11)\&. +\(lqalloc\(rq +is safe, but can cause leaks in programs that expect the common behavior\&. Programs intended to be portable and leak\-free cannot assume either behavior, and must therefore never call realloc with a size of 0\&. The +\(lqabort\(rq +option enables these testing this behavior\&. .RE .PP thread\&.arena (\fBunsigned\fR) rw @@ -1182,7 +1245,7 @@ Get a pointer to the the value that is returned by the thread\&.allocated mallctl\&. This is useful for avoiding the overhead of repeated mallctl*() -calls\&. +calls\&. Note that the underlying counter should not be modified by the application\&. .RE .PP thread\&.deallocated (\fBuint64_t\fR) r\- [\fB\-\-enable\-stats\fR] @@ -1196,7 +1259,23 @@ Get a pointer to the the value that is returned by the thread\&.deallocated mallctl\&. This is useful for avoiding the overhead of repeated mallctl*() -calls\&. +calls\&. Note that the underlying counter should not be modified by the application\&. +.RE +.PP +thread\&.peak\&.read (\fBuint64_t\fR) r\- [\fB\-\-enable\-stats\fR] +.RS 4 +Get an approximation of the maximum value of the difference between the number of bytes allocated and the number of bytes deallocated by the calling thread since the last call to +thread\&.peak\&.reset, or since the thread\*(Aqs creation if it has not called +thread\&.peak\&.reset\&. No guarantees are made about the quality of the approximation, but jemalloc currently endeavors to maintain accuracy to within one hundred kilobytes\&. +.RE +.PP +thread\&.peak\&.reset (\fBvoid\fR) \-\- [\fB\-\-enable\-stats\fR] +.RS 4 +Resets the counter for net bytes allocated in the calling thread to zero\&. This affects subsequent calls to +thread\&.peak\&.read, but not the values returned by +thread\&.allocated +or +thread\&.deallocated\&. .RE .PP thread\&.tcache\&.enabled (\fBbool\fR) rw @@ -1224,11 +1303,27 @@ Control whether sampling is currently active for the calling thread\&. This is a prof\&.active; both must be active for the calling thread to sample\&. This flag is enabled by default\&. .RE .PP +thread\&.idle (\fBvoid\fR) \-\- +.RS 4 +Hints to jemalloc that the calling thread will be idle for some nontrivial period of time (say, on the order of seconds), and that doing some cleanup operations may be beneficial\&. There are no guarantees as to what specific operations will be performed; currently this flushes the caller\*(Aqs tcache and may (according to some heuristic) purge its associated arena\&. +.sp +This is not intended to be a general\-purpose background activity mechanism, and threads should not wake up multiple times solely to call it\&. Rather, a thread waiting for a task should do a timed wait first, call +thread\&.idle +if no task appears in the timeout interval, and then do an untimed wait\&. For such a background activity mechanism, see +background_thread\&. +.RE +.PP tcache\&.create (\fBunsigned\fR) r\- .RS 4 Create an explicit thread\-specific cache (tcache) and return an identifier that can be passed to the \fBMALLOCX_TCACHE(\fR\fB\fItc\fR\fR\fB)\fR macro to explicitly use the specified cache rather than the automatically managed one that is used by default\&. Each explicit cache can be used by only one thread at a time; the application must assure that this constraint holds\&. +.sp +If the amount of space supplied for storing the thread\-specific cache identifier does not equal +sizeof(\fBunsigned\fR), no thread\-specific cache will be created, no data will be written to the space pointed by +\fIoldp\fR, and +\fI*oldlenp\fR +will be set to 0\&. .RE .PP tcache\&.flush (\fBunsigned\fR) \-w @@ -1634,6 +1729,12 @@ Maximum size supported by this large size class\&. arenas\&.create (\fBunsigned\fR, \fBextent_hooks_t *\fR) rw .RS 4 Explicitly create a new arena outside the range of automatically managed arenas, with optionally specified extent hooks, and return the new arena index\&. +.sp +If the amount of space supplied for storing the arena index does not equal +sizeof(\fBunsigned\fR), no arena will be created, no data will be written to the space pointed by +\fIoldp\fR, and +\fI*oldlenp\fR +will be set to 0\&. .RE .PP arenas\&.lookup (\fBunsigned\fR, \fBvoid*\fR) rw @@ -1666,7 +1767,16 @@ Dump a memory profile to the specified file, or if NULL is specified, to a file is controlled by the opt\&.prof_prefix -option\&. +and +prof\&.prefix +options\&. +.RE +.PP +prof\&.prefix (\fBconst char *\fR) \-w [\fB\-\-enable\-prof\fR] +.RS 4 +Set the filename prefix for profile dumps\&. See +opt\&.prof_prefix +for the default setting\&. This can be useful to differentiate profile dumps such as from forked processes\&. .RE .PP prof\&.gdump (\fBbool\fR) rw [\fB\-\-enable\-prof\fR] @@ -1676,7 +1786,9 @@ When enabled, trigger a memory profile dump every time the total virtual memory is controlled by the opt\&.prof_prefix -option\&. +and +prof\&.prefix +options\&. .RE .PP prof\&.reset (\fBsize_t\fR) \-w [\fB\-\-enable\-prof\fR] @@ -1752,6 +1864,18 @@ for details)\&. Retained memory is excluded from mapped memory statistics, e\&.g stats\&.mapped\&. .RE .PP +stats\&.zero_reallocs (\fBsize_t\fR) r\- [\fB\-\-enable\-stats\fR] +.RS 4 +Number of times that the +realloc() +was called with a non\-\fBNULL\fR +pointer argument and a +\fB0\fR +size argument\&. This is a fundamentally unsafe pattern in portable programs; see +opt\&.zero_realloc +for details\&. +.RE +.PP stats\&.background_thread\&.num_threads (\fBsize_t\fR) r\- [\fB\-\-enable\-stats\fR] .RS 4 Number of @@ -1825,6 +1949,26 @@ is one of the counters in mutex profiling counters\&. .RE .PP +stats\&.mutexes\&.prof_thds_data\&.{counter} (\fBcounter specific type\fR) r\- [\fB\-\-enable\-stats\fR] +.RS 4 +Statistics on +\fIprof\fR +threads data mutex (global scope; profiling related)\&. +{counter} +is one of the counters in +mutex profiling counters\&. +.RE +.PP +stats\&.mutexes\&.prof_dump\&.{counter} (\fBcounter specific type\fR) r\- [\fB\-\-enable\-stats\fR] +.RS 4 +Statistics on +\fIprof\fR +dumping mutex (global scope; profiling related)\&. +{counter} +is one of the counters in +mutex profiling counters\&. +.RE +.PP stats\&.mutexes\&.reset (\fBvoid\fR) \-\- [\fB\-\-enable\-stats\fR] .RS 4 Reset all mutex profile statistics, including global mutexes, arena mutexes and bin mutexes\&. @@ -2242,7 +2386,7 @@ heap_v2/524288 [\&.\&.\&.] @ 0x5f86da8 0x5f5a1dc [\&.\&.\&.] 0x29e4d4e 0xa200316 0xabb2988 [\&.\&.\&.] t*: 13: 6688 [0: 0] - t3: 12: 6496 [0: ] + t3: 12: 6496 [0: 0] t99: 1: 192 [0: 0] [\&.\&.\&.] @@ -2264,9 +2408,9 @@ to indicate descriptions of the corresponding fields\&. / : : [: ] [\&.\&.\&.] - : : [: ] + : : [: ] [\&.\&.\&.] - : : [: ] + : : [: ] [\&.\&.\&.] @ [\&.\&.\&.] [\&.\&.\&.] : : [: ] @@ -2432,7 +2576,8 @@ is not \fInewlen\fR is too large or too small\&. Alternatively, \fI*oldlenp\fR -is too large or too small; in this case as much data as possible are read despite the error\&. +is too large or too small; when it happens, except for a very few cases explicitly documented otherwise, as much data as possible are read despite the error, with the amount of data read being recorded in +\fI*oldlenp\fR\&. .RE .PP ENOENT @@ -2520,23 +2665,6 @@ functions conform to ISO/IEC 9899:1990 (\(lqISO C90\(rq)\&. The posix_memalign() function conforms to IEEE Std 1003\&.1\-2001 (\(lqPOSIX\&.1\(rq)\&. -.SH "HISTORY" -.PP -The -malloc_usable_size() -and -posix_memalign() -functions first appeared in FreeBSD 7\&.0\&. -.PP -The -aligned_alloc(), -malloc_stats_print(), and -mallctl*() -functions first appeared in FreeBSD 10\&.0\&. -.PP -The -*allocx() -functions first appeared in FreeBSD 11\&.0\&. .SH "AUTHOR" .PP \fBJason Evans\fR From nobody Tue Nov 25 21:05:18 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dGFZk59Zcz6HnW9 for ; Tue, 25 Nov 2025 21:05:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dGFZk3KKLz3SSv for ; Tue, 25 Nov 2025 21:05:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764104718; 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=Xdx0ZBPxWR0kjMyiBpqfGnthfuY24dUzlLGewDnLOlY=; b=LDOlZJnT04p5ho7cAelOGIwevfFdj+wFAc+ZHK8/iKfKBqdoz271mBtsGkN0/w+gBcKZ4K pKWS1jCLFk+HDO4bmG78QRgFj46b9rfHKN1gV0sgcJzGEuwlzfAWnR+Yah/6YTwptkP5Y1 NFqdMfgzO3iSd2nKQnskiTzLECg6UFXc90dufCsM1jXwqTd50LGFjCCLFBb1SdxFQpFk28 kVJpXCt2CPdOepp9s5SZgbREW83h60zzbxziEynrM5IyCXOpnP06475MGUy5gKF+8Kk1ID RA9cgce9mYlE9oyGkBstZAQPd2aqoZVsfuyOmpSSDi+ii43bhBxqGgxv9Mu79A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764104718; 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=Xdx0ZBPxWR0kjMyiBpqfGnthfuY24dUzlLGewDnLOlY=; b=va1Z42duTpvwcZSsNnquMcn72NzG5guGN1djVYl/lfv8eUKGh9sfIo+FtIVGtPDrV3h1BK s+v15bD29LTmeYEfvDCwdLPNGXWNOpOMydKv3bwdsMl6hUsc7a5Slu09+GVswACHHNfqvu dmiN0Fo6tnGM18xvSyhz+1FyKvZm0jUYbJ4swRPte1lNrLfvPyjMlwu7a3GbjxRoxayK3C ZTef6s/xVYyStyuWrBbnDs8tOFFR5f3QlbWOYIoGmmTH+FtvC6xVpsuFzqaylZwgZdXVq+ pwB6muaT3PcPaBFR/HtX/Q8eN/fTpRMc5OTd6gEgJfqlbBDgjm2EsYV18w6kow== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764104718; a=rsa-sha256; cv=none; b=qv4fM1TvC+a9PlHrbb1pfHzL8oarZBsMQr6f5KBGT4jd2SgkrWthamgyMlSxDpSkdlONH6 YCtMxd0ge6dh5RDbZRMzmoP4g/Aq4Up4kmV/WArE9KBNwqPwpRGCQeJ0nfoCgoubsEAc86 HBmZpp29Kb0L3LHNQ7J9azKBz18v+RrG8Gc2BgtbKS8+TSL/IPwihWLxkyXIyILkE2alDt RRAkAZ9LZXPvG+NQYrVsFRq47Fs8lfhYOcs4qQO/ShbUAhHvA267bRlkGFtxR7cpXzYctq QxDwCnHSAx7gYOsDQAdWp49I4wDPdbaikRwi3n19RRiRCLIjJ36xgu+bJRlHcg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dGFZk0xLzz2bQ for ; Tue, 25 Nov 2025 21:05:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2f6ea by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 25 Nov 2025 21:05:18 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Minsoo Choo From: Alexander Ziaee Subject: git: cbe0ccde6657 - stable/15 - jemalloc: apply freebsd changes to jemalloc 5.3.0 man page List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ziaee X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: cbe0ccde6657be75c820efa37443d5e3c09b9993 Auto-Submitted: auto-generated Date: Tue, 25 Nov 2025 21:05:18 +0000 Message-Id: <69261a0e.2f6ea.2b8e9168@gitrepo.freebsd.org> The branch stable/15 has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=cbe0ccde6657be75c820efa37443d5e3c09b9993 commit cbe0ccde6657be75c820efa37443d5e3c09b9993 Author: Minsoo Choo AuthorDate: 2025-11-17 18:48:15 +0000 Commit: Alexander Ziaee CommitDate: 2025-11-25 21:05:11 +0000 jemalloc: apply freebsd changes to jemalloc 5.3.0 man page Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1890 (cherry picked from commit 80ec82aba9ae7286cac1a4f8000262cf2cf34d0c) --- lib/libc/stdlib/malloc/jemalloc/jemalloc.3 | 32 +++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/lib/libc/stdlib/malloc/jemalloc/jemalloc.3 b/lib/libc/stdlib/malloc/jemalloc/jemalloc.3 index 6d905c815ef4..1c99352a6ae2 100644 --- a/lib/libc/stdlib/malloc/jemalloc/jemalloc.3 +++ b/lib/libc/stdlib/malloc/jemalloc/jemalloc.3 @@ -33,11 +33,24 @@ jemalloc \- general purpose memory allocation functions .PP This manual describes jemalloc 5\&.3\&.0\-0\-g54eaed1d8b56b1aa528be3bdd1877e59c56fa90c\&. More information can be found at the \m[blue]\fBjemalloc website\fR\m[]\&\s-2\u[1]\d\s+2\&. +.PP +The following configuration options are enabled in libc\*(Aqs built\-in jemalloc: +\fB\-\-enable\-fill\fR, +\fB\-\-enable\-lazy\-lock\fR, +\fB\-\-enable\-stats\fR, +\fB\-\-enable\-utrace\fR, +\fB\-\-enable\-xmalloc\fR, and +\fB\-\-with\-malloc\-conf=abort_conf:false\fR\&. Additionally, +\fB\-\-enable\-debug\fR +is enabled in development versions of FreeBSD (controlled by the +\fBMK_MALLOC_PRODUCTION\fR +make variable)\&. .SH "SYNOPSIS" .sp .ft B .nf -#include +#include +#include .fi .ft .SS "Standard API" @@ -2665,6 +2678,23 @@ functions conform to ISO/IEC 9899:1990 (\(lqISO C90\(rq)\&. The posix_memalign() function conforms to IEEE Std 1003\&.1\-2001 (\(lqPOSIX\&.1\(rq)\&. +.SH "HISTORY" +.PP +The +malloc_usable_size() +and +posix_memalign() +functions first appeared in FreeBSD 7\&.0\&. +.PP +The +aligned_alloc(), +malloc_stats_print(), and +mallctl*() +functions first appeared in FreeBSD 10\&.0\&. +.PP +The +*allocx() +functions first appeared in FreeBSD 11\&.0\&. .SH "AUTHOR" .PP \fBJason Evans\fR From nobody Tue Nov 25 21:17:26 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dGFrk5d8Hz6HpTB for ; Tue, 25 Nov 2025 21:17:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dGFrk52lFz3TdS for ; Tue, 25 Nov 2025 21:17:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764105446; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=i3WDvaR91c4q1N0XCBEVMRV9zn72kbtz2DVWBVDNs7c=; b=xUOof2dfzJ1YV/8CbvlMX3qzjaHl9BvpA+DgUoxd08HGh351SIlxaps4mH6F/SgaB5Ze5s 0ZKA5k4deShg7h2NR834NXx5XuNudh694qSttHAkQ3njLMmKjXQibvVyfpa18cwjq2xBV7 61//lDRt9jju5dOmPrseuKGHijpNno2Xm/BcMACl6M3AtHvUsNIT8Fz98jVLsPn+KDTpkx 6yH3wkvkAjTi2NmD5XaB0IeQnuwUcDebWTS2maXm0uPYs2lsSGpi5ckpQweO/LESm2DVzw EPKZ7ma/RkCdn8lJ2t88FM/37ByQgBdnU+IY9+WURSq1OA8XXjqNG03ll6+tug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764105446; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=i3WDvaR91c4q1N0XCBEVMRV9zn72kbtz2DVWBVDNs7c=; b=Rtt34NIgl1gJxwb7sZLMRXYHnI+FWsWyyJ8Z2w9YkBog1zp7f5GImC+RFXA6/YEyV18XjW 5wqGuuATmHvEsofWVhumZO+Qm+Xzud0ec01TwWucXJrEh8WCgTUMyOu4We87/fcGel4Iyj LuXT4AQwg8lzm/BRhucbCwN41+oMHEud6XZoCvZIJfODjDt2aX2ibuOUqXwiULs3K0eatK iaAOqFFbIkwlGnbKt63FKJshoEMeFZ8dZcLFt1NfsyFz7phoggwGldfjM/tKch8RKWzWOV SqHTsM0Q5tAGJDTDkNcKuqucNrOpdZQQqJw1KZTe/sNftA4F3LHOkU/QmD9GvA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764105446; a=rsa-sha256; cv=none; b=GoGtBy2Wc+eTOn9CfFM+JBUl1i1/GOE8p00Yd9HugF7iiFs4spdm4iCPT0pKBbaWAAENnf zPiac2wj/IVf2G9GfNnv7kGdE5Mc/jwhXGXOJ8Vzqk9GL2TsAV/4nG2rbmYgEEGd2krNzZ IKeMd1aSKCkvho/MAF7+ZAv/2L2j/++zu848fiPLvuKGa9wQkkFMbHFrcX35AMs036dYRA NjXv7KxMoYHwslrZgz1LVNexgTlO10LYqZWeRKGd9p5xwVxGXcTfnEFGMZyd12mroLRuNf a4NhcHiqygTfIPQq3qAuk4eYgBA6UNd2cdyPjzn06TmtZseA3QkMmLuuodS5jQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dGFrk43YDz33w for ; Tue, 25 Nov 2025 21:17:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 31d1c by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 25 Nov 2025 21:17:26 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Navdeep Parhar Subject: git: 98f6f6e4f4bb - main - cxgbe(4): Enable IFCAP_NV and implement SIOCGIFCAPNV/SIOCSIFCAPNV List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 98f6f6e4f4bb7b19e12de89fc8cc034915f7a759 Auto-Submitted: auto-generated Date: Tue, 25 Nov 2025 21:17:26 +0000 Message-Id: <69261ce6.31d1c.79c43e11@gitrepo.freebsd.org> The branch main has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=98f6f6e4f4bb7b19e12de89fc8cc034915f7a759 commit 98f6f6e4f4bb7b19e12de89fc8cc034915f7a759 Author: Navdeep Parhar AuthorDate: 2025-11-25 19:04:30 +0000 Commit: Navdeep Parhar CommitDate: 2025-11-25 21:08:03 +0000 cxgbe(4): Enable IFCAP_NV and implement SIOCGIFCAPNV/SIOCSIFCAPNV MFC after: 1 week Sponsored by: Chelsio Communications --- sys/dev/cxgbe/t4_main.c | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/sys/dev/cxgbe/t4_main.c b/sys/dev/cxgbe/t4_main.c index 946eb84457a3..5e02b47da8d9 100644 --- a/sys/dev/cxgbe/t4_main.c +++ b/sys/dev/cxgbe/t4_main.c @@ -2817,7 +2817,7 @@ cxgbe_probe(device_t dev) #define T4_CAP (IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_MTU | IFCAP_HWCSUM | \ IFCAP_VLAN_HWCSUM | IFCAP_TSO | IFCAP_JUMBO_MTU | IFCAP_LRO | \ IFCAP_VLAN_HWTSO | IFCAP_LINKSTATE | IFCAP_HWCSUM_IPV6 | IFCAP_HWSTATS | \ - IFCAP_HWRXTSTMP | IFCAP_MEXTPG) + IFCAP_HWRXTSTMP | IFCAP_MEXTPG | IFCAP_NV) #define T4_CAP_ENABLE (T4_CAP) static void @@ -3065,7 +3065,7 @@ cxgbe_ioctl(if_t ifp, unsigned long cmd, caddr_t data) struct port_info *pi = vi->pi; struct adapter *sc = pi->adapter; struct ifreq *ifr = (struct ifreq *)data; - uint32_t mask; + uint32_t mask, mask2; switch (cmd) { case SIOCSIFMTU: @@ -3124,12 +3124,24 @@ cxgbe_ioctl(if_t ifp, unsigned long cmd, caddr_t data) end_synchronized_op(sc, 0); break; + case SIOCGIFCAPNV: + break; + case SIOCSIFCAPNV: case SIOCSIFCAP: rc = begin_synchronized_op(sc, vi, SLEEP_OK | INTR_OK, "t4cap"); if (rc) return (rc); - mask = ifr->ifr_reqcap ^ if_getcapenable(ifp); + if (cmd == SIOCSIFCAPNV) { + const struct siocsifcapnv_driver_data *ifr_nv = + (struct siocsifcapnv_driver_data *)data; + + mask = ifr_nv->reqcap ^ if_getcapenable(ifp); + mask2 = ifr_nv->reqcap2 ^ if_getcapenable2(ifp); + } else { + mask = ifr->ifr_reqcap ^ if_getcapenable(ifp); + mask2 = 0; + } if (mask & IFCAP_TXCSUM) { if_togglecapenable(ifp, IFCAP_TXCSUM); if_togglehwassist(ifp, CSUM_TCP | CSUM_UDP | CSUM_IP); @@ -3264,6 +3276,9 @@ cxgbe_ioctl(if_t ifp, unsigned long cmd, caddr_t data) CSUM_INNER_IP_TSO); } + MPASS(mask2 == 0); + (void)mask2; + #ifdef VLAN_CAPABILITIES VLAN_CAPABILITIES(ifp); #endif From nobody Tue Nov 25 22:58:36 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dGJ5S74XYz6Hwhq for ; Tue, 25 Nov 2025 22:58:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dGJ5S6V0Xz3fPS for ; Tue, 25 Nov 2025 22:58:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764111516; 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=YEYece9pmpE0pErU6vq5OSEf5Uo9xvuhQO6oi9TZuxw=; b=kIjnKDzT4roMxQfgcUF08H7lLmfEjiTwaang7FHcZUKoJy52MrpoxWkiWVOhxxL9MnPW+J PUPMsxksvFGP4qfp8EYyF8Cvmm4C7fkPEdnVLosc2VMiuKkRiV2x3yU3fFJiBptlCfMDxn bWNp+OHsyxfy0pQOeGDXW6pyKHa2eMfa7/ozG99zqWH6tPdIdUL/tTkdjvEipw6r0tv02R 9SERbkg5duIW6VNUUJQdJHWlhX3X1hMcW6V798qF/4T28Uzr4g2uwR0NtcTrh6Mn+taYTk edYTRPCvj9cSJ5UQOvR8CNdT4aGdB5dpYw5p+5F9NQebrtV6j5VGbqXLH+I/Ww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764111516; 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=YEYece9pmpE0pErU6vq5OSEf5Uo9xvuhQO6oi9TZuxw=; b=JbxagahCPOUlBGK0osmYhAfYq40lUpkpcPc7CBKAKqDAyuwgJYIAN9XbV5P09mDV8+Gf2v etwyfWMn5J7jRhhtDs0xKCnyG3aRNYoMEnuUYyBH8N8fU5D/qwCD11l1nFwVaiziUUewzi qw53gqg1sU7DqW1BMmlwK+0PfcgT88BnAKv1wVmi451vju26wBjorwUWd+/I1s8za1qR/5 mWUtlxKiLNGdY7SIdR+4DRoOjbCoXWMqln5ByIZhQ+eqaMYWAK6wvV9dVoIjxu8SJ9VsSi mE6vGklVptlFdhlhbnBE1RDqq3kQqrqzfkXe/8AbzWhoGIMzvZTUwvaCvhi1VA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764111516; a=rsa-sha256; cv=none; b=pBFraU3ePBS1oJJx23yJ8GbDBdTJm4lqecoZdLphyQUsjuVhl1rPVybdZjCurX/XAkdji7 0V/xKCT0IwxBrHDujymKhPinTF9X5YAflHhZ4xZvBYmPu0rHpHPnn1yFqmUPamgwFebwtM g9S1flEf75LN8orfBFo0pB1bn4qOQNBeTzY399LRObXAAfzkp8mKn6ypMyV4wRDVNXm0Eu r79SwbwXhqA3AoYWupHROvtAMSTczi7uDSLpc8AUUUhfF3r7ONl2IiZBfGEmm/anowWfdd tYspcKROXwgzZgcbhIB703Lg831BiUvAIsXpfwpZYoIPCq9lY+pz3wWUc+pJnw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dGJ5S61zGz5Vb for ; Tue, 25 Nov 2025 22:58:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3b599 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 25 Nov 2025 22:58:36 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Chuck Silvers From: Warner Losh Subject: git: 2b4dbad2db57 - main - nda: fix setting of unmappedio flag List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2b4dbad2db5766294ee97bb96228ec6826a9e7c3 Auto-Submitted: auto-generated Date: Tue, 25 Nov 2025 22:58:36 +0000 Message-Id: <6926349c.3b599.381eedc5@gitrepo.freebsd.org> The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=2b4dbad2db5766294ee97bb96228ec6826a9e7c3 commit 2b4dbad2db5766294ee97bb96228ec6826a9e7c3 Author: Chuck Silvers AuthorDate: 2025-11-25 22:30:19 +0000 Commit: Warner Losh CommitDate: 2025-11-25 22:46:52 +0000 nda: fix setting of unmappedio flag The upstream refactoring of ndaregister() to split out ndasetgeom() accidentally used an uninitialed variable to decide whether or not to set DISKFLAG_UNMAPPED_BIO. Fix this by moving that portion of ndasetgeom() back up to ndaregister(). The check for PIM_UNMAPPED is not really needed because nvme devices always have that set, so it cannot change in the other path that ndasetgeom() is now called. Reviewed by: imp Fixes: dffd882d12d2a71aca464f48209ec9ae6f393b15 Sponsored by: Netflix MFC After: 1 minute --- sys/cam/nvme/nvme_da.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/sys/cam/nvme/nvme_da.c b/sys/cam/nvme/nvme_da.c index 506fce3d99d3..833738cfcb98 100644 --- a/sys/cam/nvme/nvme_da.c +++ b/sys/cam/nvme/nvme_da.c @@ -648,7 +648,6 @@ static void ndasetgeom(struct nda_softc *softc, struct cam_periph *periph) { struct disk *disk = softc->disk; - struct ccb_pathinq cpi; const struct nvme_namespace_data *nsd; const struct nvme_controller_data *cd; uint8_t flbas_fmt, lbads, vwc_present; @@ -667,10 +666,6 @@ ndasetgeom(struct nda_softc *softc, struct cam_periph *periph) vwc_present = NVMEV(NVME_CTRLR_DATA_VWC_PRESENT, cd->vwc); if (vwc_present) disk->d_flags |= DISKFLAG_CANFLUSHCACHE; - if ((cpi.hba_misc & PIM_UNMAPPED) != 0) { - disk->d_flags |= DISKFLAG_UNMAPPED_BIO; - softc->unmappedio = 1; - } } static void @@ -944,6 +939,10 @@ ndaregister(struct cam_periph *periph, void *arg) maxio = maxphys; /* for safety */ disk->d_maxsize = maxio; ndasetgeom(softc, periph); + if ((cpi.hba_misc & PIM_UNMAPPED) != 0) { + disk->d_flags |= DISKFLAG_UNMAPPED_BIO; + softc->unmappedio = 1; + } /* * d_ident and d_descr are both far bigger than the length of either From nobody Tue Nov 25 22:59:08 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dGJ64721Hz6Hwr7 for ; Tue, 25 Nov 2025 22:59:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dGJ646Skhz3fq9 for ; Tue, 25 Nov 2025 22:59:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764111548; 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=6tiTiF8ZRjO8upKhR+6txQf06UE38xxV/8u+oPVFzxo=; b=S0nF9WJejUPk9hrWChBHtqiGhwp91ojZawl5crvUZMAWn964j33Uas87reyVzeENc8+ZYi gmHZqsPumdpT7lLX1OgCvl2eaoeUZDMy8hnNx8cNFfkOSXhKQQco/RNSBDfW46eI0WvRco nAhUk7m8BtNZgtkm7A5CxfdWYcgqJEfFko58KdKLFLID21oDFu3eCWSxdneXvQtb9X771y EPmByl3gRwyimFvutwgpePjFxrg+NszavUeYbtT7v51D5uNktPmOjTanCKbDQMK/kjsPgo Pm3ktp/4cmH5MY9BmSLJTvTl+qj+Jsa4oaIPnr2GmifMbexcI/hKdZINWj/WFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764111548; 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=6tiTiF8ZRjO8upKhR+6txQf06UE38xxV/8u+oPVFzxo=; b=vbElJ8RbwIIQSaMg3kkCXy9SOssTroq+6ctKVeYbAkvr7P+uCYdEWa3OGNnT612HalzO/N uHKgDnQRLzNHNS5TgsIZwOwCfOV9X/io9e/tXrBFtkKqcdy5L580A3r98ZL5NdmZqXY3jt H0XbqyR+F0ttClwnxSAGsUoahwB+6CBz8MlZQbJjKeM20mnM2jBGRDaPRDy4ibwkcdF20h oMyOkjDmLu5t0f6G1sePUf6IrL1voG+MKgkuizbCfj6woMmINEd9FreuH+zUq1I7VhS3uj nrjetTqXyHChpBBcma+Dwra5N66Pcr2vE60k8pt7W/h/gP9LP0dmzUl+ExnyKg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764111548; a=rsa-sha256; cv=none; b=rFpaWHJeO7OiHWQHUG0lLosQsBK754Buy5zwh3uP6NP46BYZxQBgUvNW/9ySg+Y6G3YaWh QK8Ca6b6LeT9iMwyv6AvfAACrG5d4jN+0Rd5d1Ef5WcG9Q9HxV+qSQcb9/wc27XVG5LBmQ UOz2D84PG8S73cz64cYNCxk1UYfeYF31iIJ49wsPam7BN5mtSAax9L5arp6EGMxJNicSMU z0bUnavatCOeAWRw7kSAi4/4hAQ+RiIHBZnQPPQNITa6E2jBz9vd6EKcjBb4rGJaxwKOQg E1yfNnp5o34CF+tSW2L0SGBmQ/LISBeNuEX9JB/p8/LOONERTlVPrt1zlHJ6kA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dGJ645vKNz5ST for ; Tue, 25 Nov 2025 22:59:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3acc9 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 25 Nov 2025 22:59:08 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Minsoo Choo From: Colin Percival Subject: git: cda51d06f946 - releng/15.0 - jemalloc: import jemalloc 5.3.0 man page List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.0 X-Git-Reftype: branch X-Git-Commit: cda51d06f946ceb4450e100058753812b932d802 Auto-Submitted: auto-generated Date: Tue, 25 Nov 2025 22:59:08 +0000 Message-Id: <692634bc.3acc9.69638760@gitrepo.freebsd.org> The branch releng/15.0 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=cda51d06f946ceb4450e100058753812b932d802 commit cda51d06f946ceb4450e100058753812b932d802 Author: Minsoo Choo AuthorDate: 2025-11-17 18:45:19 +0000 Commit: Colin Percival CommitDate: 2025-11-25 22:58:55 +0000 jemalloc: import jemalloc 5.3.0 man page Approved by: re (cperciva) Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1890 (cherry picked from commit bf4c7487f25d3891425a9ba54516b740a948876b) (cherry picked from commit 6162f863ce86df854305416b058ff6b17bd0261c) --- lib/libc/stdlib/malloc/jemalloc/jemalloc.3 | 232 ++++++++++++++++++++++------- 1 file changed, 180 insertions(+), 52 deletions(-) diff --git a/lib/libc/stdlib/malloc/jemalloc/jemalloc.3 b/lib/libc/stdlib/malloc/jemalloc/jemalloc.3 index a4ea3e1f54a9..6d905c815ef4 100644 --- a/lib/libc/stdlib/malloc/jemalloc/jemalloc.3 +++ b/lib/libc/stdlib/malloc/jemalloc/jemalloc.3 @@ -1,13 +1,13 @@ '\" t .\" Title: JEMALLOC .\" Author: Jason Evans -.\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 11/10/2019 +.\" Generator: DocBook XSL Stylesheets vsnapshot +.\" Date: 05/06/2022 .\" Manual: User Manual -.\" Source: jemalloc 5.2.1-0-gea6b3e973b477b8061e0076bb257dbd7f3faa756 +.\" Source: jemalloc 5.3.0-0-g54eaed1d8b56b1aa528be3bdd1877e59c56fa90c .\" Language: English .\" -.TH "JEMALLOC" "3" "11/10/2019" "jemalloc 5.2.1-0-gea6b3e973b47" "User Manual" +.TH "JEMALLOC" "3" "05/06/2022" "jemalloc 5.3.0-0-g54eaed1d8b56" "User Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -31,26 +31,13 @@ jemalloc \- general purpose memory allocation functions .SH "LIBRARY" .PP -This manual describes jemalloc 5\&.2\&.1\-0\-gea6b3e973b477b8061e0076bb257dbd7f3faa756\&. More information can be found at the +This manual describes jemalloc 5\&.3\&.0\-0\-g54eaed1d8b56b1aa528be3bdd1877e59c56fa90c\&. More information can be found at the \m[blue]\fBjemalloc website\fR\m[]\&\s-2\u[1]\d\s+2\&. -.PP -The following configuration options are enabled in libc\*(Aqs built\-in jemalloc: -\fB\-\-enable\-fill\fR, -\fB\-\-enable\-lazy\-lock\fR, -\fB\-\-enable\-stats\fR, -\fB\-\-enable\-utrace\fR, -\fB\-\-enable\-xmalloc\fR, and -\fB\-\-with\-malloc\-conf=abort_conf:false\fR\&. Additionally, -\fB\-\-enable\-debug\fR -is enabled in development versions of FreeBSD (controlled by the -\fBMK_MALLOC_PRODUCTION\fR -make variable)\&. .SH "SYNOPSIS" .sp .ft B .nf -#include -#include +#include .fi .ft .SS "Standard API" @@ -603,7 +590,7 @@ T} :T{ 8 KiB T}:T{ -[40 KiB, 48 KiB, 54 KiB, 64 KiB] +[40 KiB, 48 KiB, 56 KiB, 64 KiB] T} :T{ 16 KiB @@ -848,6 +835,11 @@ in these cases\&. This option is disabled by default unless is specified during configuration, in which case it is enabled by default\&. .RE .PP +opt\&.cache_oblivious (\fBbool\fR) r\- +.RS 4 +Enable / Disable cache\-oblivious large allocation alignment, for large requests with no alignment constraints\&. If this feature is disabled, all large allocations are page\-aligned as an implementation artifact, which can severely harm CPU cache utilization\&. However, the cache\-oblivious layout comes at the cost of one extra page per large allocation, which in the most extreme case increases physical memory usage for the 16 KiB size class to 20 KiB\&. This option is enabled by default\&. +.RE +.PP opt\&.metadata_thp (\fBconst char *\fR) r\- .RS 4 Controls whether to allow jemalloc to use transparent huge page (THP) for internal metadata (see @@ -859,6 +851,11 @@ uses no THP initially, but may begin to do so when metadata usage reaches certai \(lqdisabled\(rq\&. .RE .PP +opt\&.trust_madvise (\fBbool\fR) r\- +.RS 4 +If true, do not perform runtime check for MADV_DONTNEED, to check that it actually zeros pages\&. The default is disabled on Linux and enabled elsewhere\&. +.RE +.PP opt\&.retain (\fBbool\fR) r\- .RS 4 If true, retain unused virtual memory for later reuse rather than discarding it by calling @@ -990,6 +987,28 @@ is enabled\&. The default is \(lq\(rq\&. .RE .PP +opt\&.stats_interval (\fBint64_t\fR) r\- +.RS 4 +Average interval between statistics outputs, as measured in bytes of allocation activity\&. The actual interval may be sporadic because decentralized event counters are used to avoid synchronization bottlenecks\&. The output may be triggered on any thread, which then calls +malloc_stats_print()\&. +opt\&.stats_interval_opts +can be combined to specify output options\&. By default, interval\-triggered stats output is disabled (encoded as \-1)\&. +.RE +.PP +opt\&.stats_interval_opts (\fBconst char *\fR) r\- +.RS 4 +Options (the +\fIopts\fR +string) to pass to the +malloc_stats_print() +for interval based statistics printing (enabled through +opt\&.stats_interval)\&. See available options in +malloc_stats_print()\&. Has no effect unless +opt\&.stats_interval +is enabled\&. The default is +\(lq\(rq\&. +.RE +.PP opt\&.junk (\fBconst char *\fR) r\- [\fB\-\-enable\-fill\fR] .RS 4 Junk filling\&. If set to @@ -1046,13 +1065,13 @@ This option is disabled by default\&. opt\&.tcache (\fBbool\fR) r\- .RS 4 Thread\-specific caching (tcache) enabled/disabled\&. When there are multiple threads, each thread uses a tcache for objects up to a certain size\&. Thread\-specific caching allows many allocations to be satisfied without performing any thread synchronization, at the cost of increased memory use\&. See the -opt\&.lg_tcache_max +opt\&.tcache_max option for related tuning information\&. This option is enabled by default\&. .RE .PP -opt\&.lg_tcache_max (\fBsize_t\fR) r\- +opt\&.tcache_max (\fBsize_t\fR) r\- .RS 4 -Maximum size class (log base 2) to cache in the thread\-specific cache (tcache)\&. At a minimum, all small size classes are cached, and at a maximum all large size classes are cached\&. The default maximum is 32 KiB (2^15)\&. +Maximum size class to cache in the thread\-specific cache (tcache)\&. At a minimum, the first size class is cached; and at a maximum, size classes up to 8 MiB can be cached\&. The default maximum is 32 KiB (2^15)\&. As a convenience, this may also be set by specifying lg_tcache_max, which will be taken to be the base\-2 logarithm of the setting of tcache_max\&. .RE .PP opt\&.thp (\fBconst char *\fR) r\- @@ -1091,7 +1110,8 @@ for heap profile format documentation\&. opt\&.prof_prefix (\fBconst char *\fR) r\- [\fB\-\-enable\-prof\fR] .RS 4 Filename prefix for profile dumps\&. If the prefix is set to the empty string, no automatic dumps will occur; this is primarily useful for disabling the automatic final heap dump (which also disables leak reporting, if enabled)\&. The default prefix is -jeprof\&. +jeprof\&. This prefix value can be overridden by +prof\&.prefix\&. .RE .PP opt\&.prof_active (\fBbool\fR) r\- [\fB\-\-enable\-prof\fR] @@ -1129,7 +1149,9 @@ Average interval (log base 2) between memory profile dumps, as measured in bytes is controlled by the opt\&.prof_prefix -option\&. By default, interval\-triggered profile dumping is disabled (encoded as \-1)\&. +and +prof\&.prefix +options\&. By default, interval\-triggered profile dumping is disabled (encoded as \-1)\&. .RE .PP opt\&.prof_gdump (\fBbool\fR) r\- [\fB\-\-enable\-prof\fR] @@ -1147,7 +1169,9 @@ function to dump final memory usage to a file named according to the pattern is controlled by the opt\&.prof_prefix -option\&. Note that +and +prof\&.prefix +options\&. Note that atexit() may allocate memory during application initialization and then deadlock internally when jemalloc in turn calls atexit(), so this option is not universally usable (though the application can register its own @@ -1161,7 +1185,46 @@ Leak reporting enabled/disabled\&. If enabled, use an \fBatexit\fR(3) function to report memory leaks detected by allocation sampling\&. See the opt\&.prof -option for information on analyzing heap profile output\&. This option is disabled by default\&. +option for information on analyzing heap profile output\&. Works only when combined with +opt\&.prof_final, otherwise does nothing\&. This option is disabled by default\&. +.RE +.PP +opt\&.prof_leak_error (\fBbool\fR) r\- [\fB\-\-enable\-prof\fR] +.RS 4 +Similar to +opt\&.prof_leak, but makes the process exit with error code 1 if a memory leak is detected\&. This option supersedes +opt\&.prof_leak, meaning that if both are specified, this option takes precedence\&. When enabled, also enables +opt\&.prof_leak\&. Works only when combined with +opt\&.prof_final, otherwise does nothing\&. This option is disabled by default\&. +.RE +.PP +opt\&.zero_realloc (\fBconst char *\fR) r\- +.RS 4 +Determines the behavior of +realloc() +when passed a value of zero for the new size\&. +\(lqalloc\(rq +treats this as an allocation of size zero (and returns a non\-null result except in case of resource exhaustion)\&. +\(lqfree\(rq +treats this as a deallocation of the pointer, and returns +\fBNULL\fR +without setting +\fIerrno\fR\&. +\(lqabort\(rq +aborts the process if zero is passed\&. The default is +\(lqfree\(rq +on Linux and Windows, and +\(lqalloc\(rq +elsewhere\&. +.sp +There is considerable divergence of behaviors across implementations in handling this case\&. Many have the behavior of +\(lqfree\(rq\&. This can introduce security vulnerabilities, since a +\fBNULL\fR +return value indicates failure, and the continued validity of the passed\-in pointer (per POSIX and C11)\&. +\(lqalloc\(rq +is safe, but can cause leaks in programs that expect the common behavior\&. Programs intended to be portable and leak\-free cannot assume either behavior, and must therefore never call realloc with a size of 0\&. The +\(lqabort\(rq +option enables these testing this behavior\&. .RE .PP thread\&.arena (\fBunsigned\fR) rw @@ -1182,7 +1245,7 @@ Get a pointer to the the value that is returned by the thread\&.allocated mallctl\&. This is useful for avoiding the overhead of repeated mallctl*() -calls\&. +calls\&. Note that the underlying counter should not be modified by the application\&. .RE .PP thread\&.deallocated (\fBuint64_t\fR) r\- [\fB\-\-enable\-stats\fR] @@ -1196,7 +1259,23 @@ Get a pointer to the the value that is returned by the thread\&.deallocated mallctl\&. This is useful for avoiding the overhead of repeated mallctl*() -calls\&. +calls\&. Note that the underlying counter should not be modified by the application\&. +.RE +.PP +thread\&.peak\&.read (\fBuint64_t\fR) r\- [\fB\-\-enable\-stats\fR] +.RS 4 +Get an approximation of the maximum value of the difference between the number of bytes allocated and the number of bytes deallocated by the calling thread since the last call to +thread\&.peak\&.reset, or since the thread\*(Aqs creation if it has not called +thread\&.peak\&.reset\&. No guarantees are made about the quality of the approximation, but jemalloc currently endeavors to maintain accuracy to within one hundred kilobytes\&. +.RE +.PP +thread\&.peak\&.reset (\fBvoid\fR) \-\- [\fB\-\-enable\-stats\fR] +.RS 4 +Resets the counter for net bytes allocated in the calling thread to zero\&. This affects subsequent calls to +thread\&.peak\&.read, but not the values returned by +thread\&.allocated +or +thread\&.deallocated\&. .RE .PP thread\&.tcache\&.enabled (\fBbool\fR) rw @@ -1224,11 +1303,27 @@ Control whether sampling is currently active for the calling thread\&. This is a prof\&.active; both must be active for the calling thread to sample\&. This flag is enabled by default\&. .RE .PP +thread\&.idle (\fBvoid\fR) \-\- +.RS 4 +Hints to jemalloc that the calling thread will be idle for some nontrivial period of time (say, on the order of seconds), and that doing some cleanup operations may be beneficial\&. There are no guarantees as to what specific operations will be performed; currently this flushes the caller\*(Aqs tcache and may (according to some heuristic) purge its associated arena\&. +.sp +This is not intended to be a general\-purpose background activity mechanism, and threads should not wake up multiple times solely to call it\&. Rather, a thread waiting for a task should do a timed wait first, call +thread\&.idle +if no task appears in the timeout interval, and then do an untimed wait\&. For such a background activity mechanism, see +background_thread\&. +.RE +.PP tcache\&.create (\fBunsigned\fR) r\- .RS 4 Create an explicit thread\-specific cache (tcache) and return an identifier that can be passed to the \fBMALLOCX_TCACHE(\fR\fB\fItc\fR\fR\fB)\fR macro to explicitly use the specified cache rather than the automatically managed one that is used by default\&. Each explicit cache can be used by only one thread at a time; the application must assure that this constraint holds\&. +.sp +If the amount of space supplied for storing the thread\-specific cache identifier does not equal +sizeof(\fBunsigned\fR), no thread\-specific cache will be created, no data will be written to the space pointed by +\fIoldp\fR, and +\fI*oldlenp\fR +will be set to 0\&. .RE .PP tcache\&.flush (\fBunsigned\fR) \-w @@ -1634,6 +1729,12 @@ Maximum size supported by this large size class\&. arenas\&.create (\fBunsigned\fR, \fBextent_hooks_t *\fR) rw .RS 4 Explicitly create a new arena outside the range of automatically managed arenas, with optionally specified extent hooks, and return the new arena index\&. +.sp +If the amount of space supplied for storing the arena index does not equal +sizeof(\fBunsigned\fR), no arena will be created, no data will be written to the space pointed by +\fIoldp\fR, and +\fI*oldlenp\fR +will be set to 0\&. .RE .PP arenas\&.lookup (\fBunsigned\fR, \fBvoid*\fR) rw @@ -1666,7 +1767,16 @@ Dump a memory profile to the specified file, or if NULL is specified, to a file is controlled by the opt\&.prof_prefix -option\&. +and +prof\&.prefix +options\&. +.RE +.PP +prof\&.prefix (\fBconst char *\fR) \-w [\fB\-\-enable\-prof\fR] +.RS 4 +Set the filename prefix for profile dumps\&. See +opt\&.prof_prefix +for the default setting\&. This can be useful to differentiate profile dumps such as from forked processes\&. .RE .PP prof\&.gdump (\fBbool\fR) rw [\fB\-\-enable\-prof\fR] @@ -1676,7 +1786,9 @@ When enabled, trigger a memory profile dump every time the total virtual memory is controlled by the opt\&.prof_prefix -option\&. +and +prof\&.prefix +options\&. .RE .PP prof\&.reset (\fBsize_t\fR) \-w [\fB\-\-enable\-prof\fR] @@ -1752,6 +1864,18 @@ for details)\&. Retained memory is excluded from mapped memory statistics, e\&.g stats\&.mapped\&. .RE .PP +stats\&.zero_reallocs (\fBsize_t\fR) r\- [\fB\-\-enable\-stats\fR] +.RS 4 +Number of times that the +realloc() +was called with a non\-\fBNULL\fR +pointer argument and a +\fB0\fR +size argument\&. This is a fundamentally unsafe pattern in portable programs; see +opt\&.zero_realloc +for details\&. +.RE +.PP stats\&.background_thread\&.num_threads (\fBsize_t\fR) r\- [\fB\-\-enable\-stats\fR] .RS 4 Number of @@ -1825,6 +1949,26 @@ is one of the counters in mutex profiling counters\&. .RE .PP +stats\&.mutexes\&.prof_thds_data\&.{counter} (\fBcounter specific type\fR) r\- [\fB\-\-enable\-stats\fR] +.RS 4 +Statistics on +\fIprof\fR +threads data mutex (global scope; profiling related)\&. +{counter} +is one of the counters in +mutex profiling counters\&. +.RE +.PP +stats\&.mutexes\&.prof_dump\&.{counter} (\fBcounter specific type\fR) r\- [\fB\-\-enable\-stats\fR] +.RS 4 +Statistics on +\fIprof\fR +dumping mutex (global scope; profiling related)\&. +{counter} +is one of the counters in +mutex profiling counters\&. +.RE +.PP stats\&.mutexes\&.reset (\fBvoid\fR) \-\- [\fB\-\-enable\-stats\fR] .RS 4 Reset all mutex profile statistics, including global mutexes, arena mutexes and bin mutexes\&. @@ -2242,7 +2386,7 @@ heap_v2/524288 [\&.\&.\&.] @ 0x5f86da8 0x5f5a1dc [\&.\&.\&.] 0x29e4d4e 0xa200316 0xabb2988 [\&.\&.\&.] t*: 13: 6688 [0: 0] - t3: 12: 6496 [0: ] + t3: 12: 6496 [0: 0] t99: 1: 192 [0: 0] [\&.\&.\&.] @@ -2264,9 +2408,9 @@ to indicate descriptions of the corresponding fields\&. / : : [: ] [\&.\&.\&.] - : : [: ] + : : [: ] [\&.\&.\&.] - : : [: ] + : : [: ] [\&.\&.\&.] @ [\&.\&.\&.] [\&.\&.\&.] : : [: ] @@ -2432,7 +2576,8 @@ is not \fInewlen\fR is too large or too small\&. Alternatively, \fI*oldlenp\fR -is too large or too small; in this case as much data as possible are read despite the error\&. +is too large or too small; when it happens, except for a very few cases explicitly documented otherwise, as much data as possible are read despite the error, with the amount of data read being recorded in +\fI*oldlenp\fR\&. .RE .PP ENOENT @@ -2520,23 +2665,6 @@ functions conform to ISO/IEC 9899:1990 (\(lqISO C90\(rq)\&. The posix_memalign() function conforms to IEEE Std 1003\&.1\-2001 (\(lqPOSIX\&.1\(rq)\&. -.SH "HISTORY" -.PP -The -malloc_usable_size() -and -posix_memalign() -functions first appeared in FreeBSD 7\&.0\&. -.PP -The -aligned_alloc(), -malloc_stats_print(), and -mallctl*() -functions first appeared in FreeBSD 10\&.0\&. -.PP -The -*allocx() -functions first appeared in FreeBSD 11\&.0\&. .SH "AUTHOR" .PP \fBJason Evans\fR From nobody Tue Nov 25 22:59:09 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dGJ661SJ2z6Hx7F for ; Tue, 25 Nov 2025 22:59:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dGJ6603Drz3flg for ; Tue, 25 Nov 2025 22: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=1764111550; 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=3UMpMJojg2Esd7AypqqOhdo8E2DjCI1UwYtXICX0u/g=; b=VIYf18oc54l2QmNvIu/PA1ijshK/zjAGF7IKtsxrxWzmRKWYsGoyv6pPMqlHBR/zT7OwU5 J8L25sGDw1+DN/tpgh3xfxV8TaROnAegTk7WM1boIE2ToBkso66TSCJSOeX3lMUVDta7fS Lk+qAiTLWJI7A2a6njXFy2Rq2/MWur9UjxQvSYW8YEJOY9/OixbBtpyyPTayrx7w4F4Ld3 SCdwGYezeLPhHl2mUKsQHx2n/k8AzSefwVwie/jUAOMiBAQq+bPxU83EK4dEfwLJSREroI yXvMpFWU29S+O3hTPfVpXIdH21wj7zoN/cHz//jYNJpPmOrPSSrWkOHQfbOFjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764111550; 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=3UMpMJojg2Esd7AypqqOhdo8E2DjCI1UwYtXICX0u/g=; b=IJuV0wlUAKlJdXjkAh3YcMGpMwYPq54sLdsSp/0n/5x+huvQaohjV/z2vpViLEFCwnYfzm 3EIp6U8zlF38y6lYL4gojN2wYPvv1JznlvG63kuots0UndWT6HKAN2Qi5muE+rYv/6Lu0O o6ztNhf3G1UIPKcNVC49pB5RrfoTcD9Evauh3SzvzUlk4wCh3WuI6GOsIul2+by64a8CtR 8tWVl0HFWSxI/PYgvWzMSbu6gvMVjQKY+9a6gmyW18HkNICGqDGBVfj2fELNP5zgJ8eeUD /bnO5RdDyokxNN8mO6DyM7JZ7gNfQ/Sum4t3wTwlAzFQ0Kvx2tim1YFSdd8Mrg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764111550; a=rsa-sha256; cv=none; b=Pdr1ks5RJqKsTq/zTZFKd7Id59Xie45ODS9s5IBW/Wmhh6NoQkeBCK0u3MfUy+KtxCcgyw rM2jdHZ43STj0c4ljb9NVnGWcB/H+iaedZlPCw0Ghyb0yerILouV0lJN0nnygcI9OA644w O8mDvYXJt/BbpqOjZOgkQE0scT/5bFqPNpPBzg6+NQfPeKj9D4swkQoYSFJDSbun2UI2ER Sdmu9fg2xqSRvqoDv9jMgiBhtKIAknemwH+VubrU9w4BWfKeZS9MtlS9tu83SGmMCVczBQ 7A4bmwhMKNCFekEPre0ilqRR+miVoEC9PCo7n7Ppxe+hfNzqQAH8Qk8dTEFBUA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dGJ656jzNz5QQ for ; Tue, 25 Nov 2025 22:59:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 39af2 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 25 Nov 2025 22:59:09 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Minsoo Choo From: Colin Percival Subject: git: 020e15a9012d - releng/15.0 - jemalloc: apply freebsd changes to jemalloc 5.3.0 man page List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.0 X-Git-Reftype: branch X-Git-Commit: 020e15a9012dd87b90b902305c5ee2a83be3f4f9 Auto-Submitted: auto-generated Date: Tue, 25 Nov 2025 22:59:09 +0000 Message-Id: <692634bd.39af2.be12f4f@gitrepo.freebsd.org> The branch releng/15.0 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=020e15a9012dd87b90b902305c5ee2a83be3f4f9 commit 020e15a9012dd87b90b902305c5ee2a83be3f4f9 Author: Minsoo Choo AuthorDate: 2025-11-17 18:48:15 +0000 Commit: Colin Percival CommitDate: 2025-11-25 22:58:58 +0000 jemalloc: apply freebsd changes to jemalloc 5.3.0 man page Approved by: re (cperciva) Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1890 (cherry picked from commit 80ec82aba9ae7286cac1a4f8000262cf2cf34d0c) (cherry picked from commit cbe0ccde6657be75c820efa37443d5e3c09b9993) --- lib/libc/stdlib/malloc/jemalloc/jemalloc.3 | 32 +++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/lib/libc/stdlib/malloc/jemalloc/jemalloc.3 b/lib/libc/stdlib/malloc/jemalloc/jemalloc.3 index 6d905c815ef4..1c99352a6ae2 100644 --- a/lib/libc/stdlib/malloc/jemalloc/jemalloc.3 +++ b/lib/libc/stdlib/malloc/jemalloc/jemalloc.3 @@ -33,11 +33,24 @@ jemalloc \- general purpose memory allocation functions .PP This manual describes jemalloc 5\&.3\&.0\-0\-g54eaed1d8b56b1aa528be3bdd1877e59c56fa90c\&. More information can be found at the \m[blue]\fBjemalloc website\fR\m[]\&\s-2\u[1]\d\s+2\&. +.PP +The following configuration options are enabled in libc\*(Aqs built\-in jemalloc: +\fB\-\-enable\-fill\fR, +\fB\-\-enable\-lazy\-lock\fR, +\fB\-\-enable\-stats\fR, +\fB\-\-enable\-utrace\fR, +\fB\-\-enable\-xmalloc\fR, and +\fB\-\-with\-malloc\-conf=abort_conf:false\fR\&. Additionally, +\fB\-\-enable\-debug\fR +is enabled in development versions of FreeBSD (controlled by the +\fBMK_MALLOC_PRODUCTION\fR +make variable)\&. .SH "SYNOPSIS" .sp .ft B .nf -#include +#include +#include .fi .ft .SS "Standard API" @@ -2665,6 +2678,23 @@ functions conform to ISO/IEC 9899:1990 (\(lqISO C90\(rq)\&. The posix_memalign() function conforms to IEEE Std 1003\&.1\-2001 (\(lqPOSIX\&.1\(rq)\&. +.SH "HISTORY" +.PP +The +malloc_usable_size() +and +posix_memalign() +functions first appeared in FreeBSD 7\&.0\&. +.PP +The +aligned_alloc(), +malloc_stats_print(), and +mallctl*() +functions first appeared in FreeBSD 10\&.0\&. +.PP +The +*allocx() +functions first appeared in FreeBSD 11\&.0\&. .SH "AUTHOR" .PP \fBJason Evans\fR From nobody Tue Nov 25 23:00:04 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dGJ7911wvz6HxCs for ; Tue, 25 Nov 2025 23:00:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dGJ784hTfz3h33 for ; Tue, 25 Nov 2025 23:00:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764111604; 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=/U7SfyC/KQDu7Woi7/ZGuLig5LnMSYRasKLNtiwjEZs=; b=jXda3PFVtUhvmvruzQDIvowhm8NJtCpAMU+NfNSq/XpfSSOr5Iz+GrlGwLVjWYbdLP3MjM 256gZrE5a5kfmSQGyUItpb+oJHByoqZp2yv0VMBTZjBgaWNECFcbykVqaQs3SBbL3MwX1+ Acm3xZCC8tDwcFNyVGjRtq5qWgzNeTXbd1MfhpdALyeh4g8L+yybPOqaeFMKScKTDO16Vf k4R2mQPF8LJKBJ7RlTco2/egtNCLHNAmovDeWkBJM6SScVzkw2QKzS1bAxNO6Zg1i+dKJb yEgJAD1sje+L7yU22YxY1odqPvPSQ3PGFDq4qvtwLbhzBeYjq1/QIrCKPDnxbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764111604; 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=/U7SfyC/KQDu7Woi7/ZGuLig5LnMSYRasKLNtiwjEZs=; b=h3n2Nr57T2rLXeBCZkhf0fDwkKR3GjL6/7X4fPUlhbQ7uSNzQqeV4uTb8aM4Kd8ownlek0 zXV0XqBNnv4KeJuZQX+/ZkOPQlIZdpXU9fXNUtMNvxbHxFmSek5pqgOJyFDnI+m3r5Q9Od Qo8wTgvntCp63J3QWG9m953Qg2a4ojmGpz7M7+rHyCiaM3C2iTJRJkCqw7vbtiBZIRDeuR n0u5LS7RzFy8rE7+MYZgbFSPFpdv9/yGcYI/l+aRJtlmthI98LhurxTwSVxzJCK/OJyUX5 JqpfSJfCa7PlX1W5m0Jn/xwNy2ErhPMGisc7sbTKqOJnYxQ3+HubAj1D+B86Cg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764111604; a=rsa-sha256; cv=none; b=kwj8CfZK+2Kpp4P0jZwEOBjZnFozmluRFf3GGj1S1xkglHdJIW2K9QIYyb2s/zQ76quQR3 mAjJjxII9wzOOVFciMbVhpMCJKIC0pHdU+MREz1SdGX0XZgG+7Ws2RU1nMKKnKJ/9VvJNF /ICTcnmtkMO/GHC6U5KgJwV50Ts8Y3HFHCqJfCgI/3vbv9vQagcHcgw0eqpOovVInyx1Gh mmOyoCTxq+RUnMXhsC1Q1OrTEiGXUT5bVCpRdi/zSurclRH0m+L3o8eem7pIcI7PkPZIN9 cHBdi5cp2eTc0A128c4MH/yRw/mXj4ZviwB8PWUW9iPrEyKrDPQPwFtbfRoy9Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dGJ784DZZz4rC for ; Tue, 25 Nov 2025 23:00:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3c35f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 25 Nov 2025 23:00:04 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Chuck Silvers From: Warner Losh Subject: git: e271f9327f46 - stable/15 - nda: fix setting of unmappedio flag List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: e271f9327f46250c9043c29c86e943d53080bf2a Auto-Submitted: auto-generated Date: Tue, 25 Nov 2025 23:00:04 +0000 Message-Id: <692634f4.3c35f.1ea5bd89@gitrepo.freebsd.org> The branch stable/15 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=e271f9327f46250c9043c29c86e943d53080bf2a commit e271f9327f46250c9043c29c86e943d53080bf2a Author: Chuck Silvers AuthorDate: 2025-11-25 22:30:19 +0000 Commit: Warner Losh CommitDate: 2025-11-25 22:59:13 +0000 nda: fix setting of unmappedio flag The upstream refactoring of ndaregister() to split out ndasetgeom() accidentally used an uninitialed variable to decide whether or not to set DISKFLAG_UNMAPPED_BIO. Fix this by moving that portion of ndasetgeom() back up to ndaregister(). The check for PIM_UNMAPPED is not really needed because nvme devices always have that set, so it cannot change in the other path that ndasetgeom() is now called. Reviewed by: imp Fixes: dffd882d12d2a71aca464f48209ec9ae6f393b15 Sponsored by: Netflix MFC After: 1 minute (cherry picked from commit 2b4dbad2db5766294ee97bb96228ec6826a9e7c3) --- sys/cam/nvme/nvme_da.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/sys/cam/nvme/nvme_da.c b/sys/cam/nvme/nvme_da.c index 2eb43809f4b1..d409961cea65 100644 --- a/sys/cam/nvme/nvme_da.c +++ b/sys/cam/nvme/nvme_da.c @@ -647,7 +647,6 @@ static void ndasetgeom(struct nda_softc *softc, struct cam_periph *periph) { struct disk *disk = softc->disk; - struct ccb_pathinq cpi; const struct nvme_namespace_data *nsd; const struct nvme_controller_data *cd; uint8_t flbas_fmt, lbads, vwc_present; @@ -666,10 +665,6 @@ ndasetgeom(struct nda_softc *softc, struct cam_periph *periph) vwc_present = NVMEV(NVME_CTRLR_DATA_VWC_PRESENT, cd->vwc); if (vwc_present) disk->d_flags |= DISKFLAG_CANFLUSHCACHE; - if ((cpi.hba_misc & PIM_UNMAPPED) != 0) { - disk->d_flags |= DISKFLAG_UNMAPPED_BIO; - softc->unmappedio = 1; - } } static void @@ -943,6 +938,10 @@ ndaregister(struct cam_periph *periph, void *arg) maxio = maxphys; /* for safety */ disk->d_maxsize = maxio; ndasetgeom(softc, periph); + if ((cpi.hba_misc & PIM_UNMAPPED) != 0) { + disk->d_flags |= DISKFLAG_UNMAPPED_BIO; + softc->unmappedio = 1; + } /* * d_ident and d_descr are both far bigger than the length of either From nobody Tue Nov 25 23:43:58 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dGK5v60Pkz6J0rR for ; Tue, 25 Nov 2025 23:44:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dGK5v5VZmz3nfM for ; Tue, 25 Nov 2025 23:44:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764114243; 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=n293kHSytU07VRjuPquCr37Y5a8WxlvAIOMueIDVPoc=; b=HVzoV9csCTOiGSNFw/qnVUpZ+PdXMz7kmqzY0UygEbjc2y1+YUoLfpSPR4YvJHZVIkvtGl eckp925Ws6Kxm81J6q9eE0Fb1931hkKjhnXfoYkRtU2VkQ3v20uzc7QIjrgc8N3QWw0JV7 7UEhqSaAPe9BbjVpTJ/J6O4kHk/dBFdj5r9EZmSlSgG9M+FvnWTItNH395H188y/qmm72W X6F/ijmFr2Zyi6vYVgK9INMOAAoW0KM+wq59nwYB5A+29JUPoYq/WF0CnYm3eaUVaJcEtP ApKVF2yS17oTSnZsxebhQm623IDNMlYVAFFXcmFDRKBX8YMeePogvMf+An7BWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764114243; 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=n293kHSytU07VRjuPquCr37Y5a8WxlvAIOMueIDVPoc=; b=s6uVbsFY+1twnKRBuNzM4J0T6xmRoIIzRtf6Tere0TXvXz4xxRriA90c4LVdwiaJTOOwSc UAX5bN3vGdVFTSFOwrun754Jx7MFFNmE4/R0aryc0YXxEZDMMwGKbOykVl0HyQmyofBH/F vyFlFu9gq1rbA90Fkq1hl9z8ErVKw0aaC8xrQwf+73v3LkiwzStwll2nQH+tx1ROlfbz4x wPYk3j/g6ycjghXJmlJ9VMphIGYfFPOTCsyJDe3S+ZnNdnKw6lfIzyU1HaWQtA+FBwfHmT e7/TXanQvH3FILs9/ZGT5qlsK8zMQBj5eqx6grvUoNdADxTbbIJa5dWG6VYwyw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764114243; a=rsa-sha256; cv=none; b=qZxMg99ANAHT97FAn7BbASjHgEdFbhP0NZPB2fkye66rkt4EojY09mdHgWaerzvrKBvY9G F9s+7U7kj2B2LdjmG6mWhmyDfr1Eka5hk+nG9It5d8VTjXAKqgpWZBNKA48Egsydd4zjUa vhXntGP+oVK8Lw6s/oB404PLFk1H/6mXgJ1eh/yMgNGEBVfQj+1f6K89akrZKLrGOc6gOf BVVZh4EhpR4feW16f+8s+Al4kzBGrQ99hnGP0wd+RNG8gcAy2gPwQEfAhE7+vu0LgqnZSz 2E4xDo8SYdiYkEt1hyLb7isdwPMv1zg2mE5WER3iXTcECNxE3MGIWAfSFK4KJQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dGK5v5657z6Z7 for ; Tue, 25 Nov 2025 23:44:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3f258 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 25 Nov 2025 23:43:58 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Chuck Silvers From: Colin Percival Subject: git: 4f2d5bcdbf9b - releng/15.0 - nda: fix setting of unmappedio flag List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.0 X-Git-Reftype: branch X-Git-Commit: 4f2d5bcdbf9bb9ecdee48d47c1c33a461f3f54e4 Auto-Submitted: auto-generated Date: Tue, 25 Nov 2025 23:43:58 +0000 Message-Id: <69263f3e.3f258.6afefa46@gitrepo.freebsd.org> The branch releng/15.0 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=4f2d5bcdbf9bb9ecdee48d47c1c33a461f3f54e4 commit 4f2d5bcdbf9bb9ecdee48d47c1c33a461f3f54e4 Author: Chuck Silvers AuthorDate: 2025-11-25 22:30:19 +0000 Commit: Colin Percival CommitDate: 2025-11-25 23:41:38 +0000 nda: fix setting of unmappedio flag The upstream refactoring of ndaregister() to split out ndasetgeom() accidentally used an uninitialed variable to decide whether or not to set DISKFLAG_UNMAPPED_BIO. Fix this by moving that portion of ndasetgeom() back up to ndaregister(). The check for PIM_UNMAPPED is not really needed because nvme devices always have that set, so it cannot change in the other path that ndasetgeom() is now called. Approved by: re (cperciva) Reviewed by: cperciva, gallatin, imp Fixes: dffd882d12d2a71aca464f48209ec9ae6f393b15 Sponsored by: Netflix MFC After: 1 minute (cherry picked from commit 2b4dbad2db5766294ee97bb96228ec6826a9e7c3) (cherry picked from commit e271f9327f46250c9043c29c86e943d53080bf2a) --- sys/cam/nvme/nvme_da.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/sys/cam/nvme/nvme_da.c b/sys/cam/nvme/nvme_da.c index 2eb43809f4b1..d409961cea65 100644 --- a/sys/cam/nvme/nvme_da.c +++ b/sys/cam/nvme/nvme_da.c @@ -647,7 +647,6 @@ static void ndasetgeom(struct nda_softc *softc, struct cam_periph *periph) { struct disk *disk = softc->disk; - struct ccb_pathinq cpi; const struct nvme_namespace_data *nsd; const struct nvme_controller_data *cd; uint8_t flbas_fmt, lbads, vwc_present; @@ -666,10 +665,6 @@ ndasetgeom(struct nda_softc *softc, struct cam_periph *periph) vwc_present = NVMEV(NVME_CTRLR_DATA_VWC_PRESENT, cd->vwc); if (vwc_present) disk->d_flags |= DISKFLAG_CANFLUSHCACHE; - if ((cpi.hba_misc & PIM_UNMAPPED) != 0) { - disk->d_flags |= DISKFLAG_UNMAPPED_BIO; - softc->unmappedio = 1; - } } static void @@ -943,6 +938,10 @@ ndaregister(struct cam_periph *periph, void *arg) maxio = maxphys; /* for safety */ disk->d_maxsize = maxio; ndasetgeom(softc, periph); + if ((cpi.hba_misc & PIM_UNMAPPED) != 0) { + disk->d_flags |= DISKFLAG_UNMAPPED_BIO; + softc->unmappedio = 1; + } /* * d_ident and d_descr are both far bigger than the length of either From nobody Wed Nov 26 00:23:59 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dGL0K5Bj3z6J3Sc for ; Wed, 26 Nov 2025 00:24:17 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-pl1-x62c.google.com (mail-pl1-x62c.google.com [IPv6:2607:f8b0:4864:20::62c]) (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 4dGL0K1dQNz3sFs for ; Wed, 26 Nov 2025 00:24:17 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-pl1-x62c.google.com with SMTP id d9443c01a7336-297ef378069so55913285ad.3 for ; Tue, 25 Nov 2025 16:24:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1764116651; x=1764721451; darn=freebsd.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=TW2v/+aHETGrOjmHlCsB4PN240tf0O4+N3RDX5tEXAg=; b=2E6aT2d8AS9FEhd4PKvWBNqHNfH8CYtBza7tAG7fH92CG2vazt03Ecmq7GbLYRjwUI Xqxh8M21RE7M3iiFyBkii4gQ/FQ1axJt3Fr7VsRCWVcf51Z40aEyjGT/Sn7rZeJy1CPC TqrKMPh7ZTkov7NR/CuNQc7zwIJsTNpkASGdA7SRt1+aEiAV5aunUpHToW9rlTZz8NJK ZdVdUqzq0X3DG93qn0ECFKsgBOhGudJZQZwJBZYcixPFb5SNI6itjhvcEie3RxHXgKG1 ARPl97SVvHYYQxKiRLNy+lgV1spFNZM65z38uvddBCVYAEOEhdLMgR71Y2x70iINUu4L D8uA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764116651; x=1764721451; 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=TW2v/+aHETGrOjmHlCsB4PN240tf0O4+N3RDX5tEXAg=; b=owNGPlta2UQxJxzM/BQsdPQ04lQA51XqLUHm1NNP3C78BumHRggmFFPvils7yC70ZW LVI/t+hCltLABxhRIDiYKBh/GTxBu6YW+qYvP4sjsOSG/pw0nNzmfopir6bk3N+SPPCF PTv2XMXkcSoqkX9eP4QKdrYrstpWUChAl8PNL3jQRmOuF3rsZMjPyvISNJQ+UTkj05yA xOFG1w92zcGHjMYsxfzvt30P4G+Wt7UVAuycPX8LpNPir3Js0OSxYzjZHKsTDA94F1Ma EZ09kbnTeypW0y/l4/k7AzME1/oDYsZU4L/qU49on8vYdzSIynTJRvD06X4qKCu/XZDR 3b5w== X-Forwarded-Encrypted: i=1; AJvYcCUyQgWKLU4IuUh38AFtb0Ar7NYJPo/oMAOdAq0B+hcYqU5j8LwWTyzrvwuU6pozIovPSfWx+2rK9UHBBZruq7QMD9qZ@freebsd.org X-Gm-Message-State: AOJu0Yzr9zFhbfB10ikDfIAGtRzUbGb/AR7nWQwa9yqc1mlDi966oCfI IRTkQ1GSOS/41QtFOXiOrgQtwJAcAWg638x7hDZ5PH6WhX7tls+Ztq/Rk+LVWVaX/7X1cCKKr08 nIbae78ryvIDOGMw2nhbU1WFc4qFzI/oAZjxK3IEl4w== X-Gm-Gg: ASbGnctq/E8qj1jC2kPL6GjypiDM2xEKaQQSIgY8wVXAvX9V5dvqRjRxJ+tACw2ncqN mGes/px2cWZbkT1pqaoLBAuQT07s4FO0WxH6CgRCYyk9nWDJFklYlb6xZ50NTk/7IRjqmEJWv4K VeHnRkoZr4xe/1s0nVvkerSB3jM35sYiSet6JxiPpbeOFtwryEmOJFvq+xHKEJgzPlYFCvW9wkP KxAlnFF8HXHixlSDBPY+RMYO25jS7JAx2TR7NAjHI++JVfBHgkyp23w1MrsyRSoqo1puww= X-Google-Smtp-Source: AGHT+IHPezRO5ZlVqxXvXnjMQuVqI7OGJNc2VmqqdQBxmDWp4DT06IlVv9ReoFC9zaCjAddKqUVtaVvXPr48vMd+LQo= X-Received: by 2002:a17:902:cf4b:b0:298:3a2f:2333 with SMTP id d9443c01a7336-29bab160a66mr55121005ad.31.1764116650841; Tue, 25 Nov 2025 16:24:10 -0800 (PST) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 References: <6925e3f4.8ba9.54553559@gitrepo.freebsd.org> <32r4p844-8so-n29s-rq37-9r9p4q40o36@mnoonqbm.arg> In-Reply-To: From: Warner Losh Date: Tue, 25 Nov 2025 17:23:59 -0700 X-Gm-Features: AWmQ_bklD5Qrh99Wvvw54GYUIIVNdmT849Mu_BLXmpzwYMnGtbya8JYiU5W0KXk Message-ID: Subject: Re: git: fad4c92b78a1 - main - Revert "kernel linker: Disable local sym resolution by default" To: "Bjoern A. Zeeb" Cc: Ed Maste , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="00000000000050e3f40644746a20" X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4dGL0K1dQNz3sFs --00000000000050e3f40644746a20 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Nov 25, 2025 at 1:30=E2=80=AFPM Bjoern A. Zeeb < bzeeb-lists@lists.zabbadoz.net> wrote: > On Tue, 25 Nov 2025, Ed Maste wrote: > > >> Would it not have been easier to fix the cause (to stabilize this for > good)? > >> > >> I assume it's sys/modules/mqueue/Makefile ? > > > > That's one issue, cy@ reported a different one that I don't yet > > understand. I intend to recommit this next week - I just reverted it > > for now because we're in stabweek. > > I think it's really time to get anything non-essential out of GENERIC and > have > it only as a module. We'll quickly catch more. Also GENERIC gets smalle= r, > which is a nice side-effect :) > Yes. I'd like to get that done for 16. Move to something much closer to MINIMAL than we have today... Warner --00000000000050e3f40644746a20 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Tue, Nov 25,= 2025 at 1:30=E2=80=AFPM Bjoern A. Zeeb <bzeeb-lists@lists.zabbadoz.net> wrote:
<= blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-l= eft:1px solid rgb(204,204,204);padding-left:1ex">On Tue, 25 Nov 2025, Ed Ma= ste wrote:

>> Would it not have been easier to fix the cause (to stabilize this = for good)?
>>
>> I assume it's sys/modules/mqueue/Makefile ?
>
> That's one issue, cy@ reported a different one that I don't ye= t
> understand. I intend to recommit this next week - I just reverted it > for now because we're in stabweek.

I think it's really time to get anything non-essential out of GENERIC a= nd have
it only as a module.=C2=A0 We'll quickly catch more.=C2=A0 Also GENERIC= gets smaller,
which is a nice side-effect :)

Yes. I&#= 39;d like to get that done for 16. Move to something much closer to MINIMAL= than we have today...

Warner=C2=A0
--00000000000050e3f40644746a20-- From nobody Wed Nov 26 02:51:22 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dGPG21yNQz6JF0y for ; Wed, 26 Nov 2025 02:51:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dGPG20hQNz3DRZ for ; Wed, 26 Nov 2025 02:51:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764125482; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ThZcXPBzAnbntA53nCk46w2bVxBFa+5aZtxp9VGh8f0=; b=ERX55uWXkjfhcupIhj13S2xhBn2/ksyOWk6JiGWWMgTUOYuEogUqP+hFa3eB/JsLHQPpye NCHw0NsxkGZUYD0LP1T9ArSyxgiZFb5vAWBIiZ5eiIK/z1E3511rai9EWBAcM9obAwNM3I qYH6XA+XUIg7O0c5JPAwdHSTW7bRdmcePp//kkwVWoD5PHwSJVkFYgKvGTXKyi81J8jyvm NuXx7cTWLeqp+0ylZPR3NYCJvnloO+ZrbvNxGZdqqDhFMCZQkkdGU43fXX7BUOwvCNL1uY zOgOw2/il7vvR+KNDvrTSY8BAYNsJhuNbDl32af3QgL9PD0WX8RY03eqebfEGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764125482; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ThZcXPBzAnbntA53nCk46w2bVxBFa+5aZtxp9VGh8f0=; b=Ln5wMZGfHfLSyn7dWfK8nWGbQPEOa+4xB4amlJNk3sz/z+5sxb4ZUG8CBZKBmB3AwRsKHY xGI1xVoKKvoa/ZVPmnqvTJtp8BGAFwaAjNTJ344GHiW7uR/fVPfK287jDZr4z8JRoeKVeS RI+KGf+7QPpCz1NATbcJS6xsVmNYi556Bg7rOgPt07RHQxuvg0sXQjjcvuWo5r5TWOsURD B2/qmi5vKGBjskdL3mACY7u3hwufAo1+l84Zffpqur4Snw3QT7eAQM9wqvm1caMFBwT1wt KiwGzYhZCQjna6gCuxOQVS+UTRXAk3J79shMH5AFgagz2bqDUTEFRYlSFs1V5A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764125482; a=rsa-sha256; cv=none; b=JFxktTW+mjGx5mvnpz/M3I0JvILF9rMuMVTqBy0v7IAosxFK3k3pef20KeKogrRUoWcaTh G7M9tCl70A58COHPQdK7q57N5e7SZAs+a/11FwNW+dYkjYWrEQVD35lmFE/uhs9sOdjTof kO0IITtl4JMbaXfNpsqV9iSY29++SDxI9bT7wAxy6944zEXsWAFzslXmN8ZUUyitEuoBr2 73VOLnhXwDCsV9LJiQhmFEssygQZfQO0ccy5f0BCR07XbcLXBjQsCSVGZjL+QgL9/MN6za z7q5WvjjY4LtIstLNLKcbHaOZaPP0iQnpMu5I9/2RxOalp0z2jO9N0Dq9+lJYg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dGPG20ByTzCr7 for ; Wed, 26 Nov 2025 02:51:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2bee4 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 26 Nov 2025 02:51:22 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jose Luis Duran Subject: git: 91e7f19ec405 - main - strfmon: Fix typo s/poistion/position/ List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 91e7f19ec4056587a85c1461a4f34a6d5d4b7b52 Auto-Submitted: auto-generated Date: Wed, 26 Nov 2025 02:51:22 +0000 Message-Id: <69266b2a.2bee4.5c5f6a36@gitrepo.freebsd.org> The branch main has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=91e7f19ec4056587a85c1461a4f34a6d5d4b7b52 commit 91e7f19ec4056587a85c1461a4f34a6d5d4b7b52 Author: Jose Luis Duran AuthorDate: 2025-11-23 16:58:55 +0000 Commit: Jose Luis Duran CommitDate: 2025-11-26 02:50:49 +0000 strfmon: Fix typo s/poistion/position/ MFC after: 1 week --- lib/libc/stdlib/strfmon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libc/stdlib/strfmon.c b/lib/libc/stdlib/strfmon.c index 68a36a6d5567..230d194233f5 100644 --- a/lib/libc/stdlib/strfmon.c +++ b/lib/libc/stdlib/strfmon.c @@ -106,7 +106,7 @@ vstrfmon_l(char *__restrict s, size_t maxsize, locale_t loc, const char *__restrict format, va_list ap) { char *dst; /* output destination pointer */ - const char *fmt; /* current format poistion pointer */ + const char *fmt; /* current format position pointer */ struct lconv *lc; /* pointer to lconv structure */ char *asciivalue; /* formatted double pointer */ From nobody Wed Nov 26 05:15:17 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dGSSB6MXfz6HRcb for ; Wed, 26 Nov 2025 05:15:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dGSS55rpmz3SnM for ; Wed, 26 Nov 2025 05:15:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764134117; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Qx+jjEKmwNmu8Aty2VIWKnPyAOZM1ucDRA2BFPhvdBA=; b=S04TnDU1SA7FhrpbfGfAk/XJyiJcbywPIjGFxQtZT0vzWewDDJZxHOM7twp7z3PISDrpFn davZOf1OfX8Lt+C1tmCs7rhFkYL4s4QnIJmhN5swpsB3YiSzV/2JwbIUr3JArYZFipLGv4 yQEH8rLcaBhvS/yNnV5kxRwGBJDeO/fGv7/1B7Y7L4KRQni0qxUYSK+1IfY9e9tQ6AXSs0 /0WYP5pECU0GtvCbSidCTsSofnvJKp8T475JZoEZ2Hv4efv1YGVUYfgeUa/lpp72aBWrH4 DRjujZ6P8dy08zdf29e1CnnDplM3+zzr8JsbHddvN32MtyjgbAMXa5hSA1Yedw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764134117; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Qx+jjEKmwNmu8Aty2VIWKnPyAOZM1ucDRA2BFPhvdBA=; b=hFFdZS6nEmC/4jZe4tbhmqiB8U6r3Sv4y6lMkdykLb7ei3su0GMKXVxdYklje3zpst31Oj Gn4DPk6ExnAvNv9EBKDRaLj7eyzwYAfXmEW3yM4qhBjRv2eN1T8481MQ8VngIGf3Ga8dFS fAKZ1M8v0/DlXp7ap5G9wwAY7269mI7MhqESK2jMvGuMbIll1rRVYk84oBslcX0Dy2S35e 5Wt76JIm6y/DArVBzZ2VbRLb4fz7CGF44PUYK+GDexoNzXUH4swM4THRuLblNCZD8YS9aF 380UkDATPk+wqFr1BSZx42wSgnIU6nSi7H3X4MA1LDvbHCXkUBxnfplCKle1PA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764134117; a=rsa-sha256; cv=none; b=V5tLnWdJZuZyALLC4foAfUsSTVN6XznnmAOXWewT5w4BR0qbbhqHuUllzFLHbfFtIZ66Yj 69VPOK+y2GK/UaWUBCbaiamYWiHHrVg7URMVgku6Vz4nu/JcmB9l+V7tDypgpOkBfkUZSY ZApI4j/DsJew+zD7P16f7/j59BkKVFewhZEN46smBk3HZvIOeAfL4RNFsVLjsKzqcQYjmz WntTA75N/P6tCYBAvXATVj55Xi5DD3imAPxZuBT65RAfHKOdPaSlR4zoF44c2b3BWrdzm7 S2aAjt1f82dGIi8cJXrYe+7PfCtYoH38W0UtNIWWw5Vkmj4hlEHUY7xd5BY82g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dGSS54t48zZJ4 for ; Wed, 26 Nov 2025 05:15:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 92d8 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 26 Nov 2025 05:15:17 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 718acd74657f - main - nvme: Use 'unsigned int' in preference to bare unsigned List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 718acd74657fdf21cfd03c721bb7484d3789aaa0 Auto-Submitted: auto-generated Date: Wed, 26 Nov 2025 05:15:17 +0000 Message-Id: <69268ce5.92d8.140f7aec@gitrepo.freebsd.org> The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=718acd74657fdf21cfd03c721bb7484d3789aaa0 commit 718acd74657fdf21cfd03c721bb7484d3789aaa0 Author: Warner Losh AuthorDate: 2025-11-26 05:14:20 +0000 Commit: Warner Losh CommitDate: 2025-11-26 05:14:20 +0000 nvme: Use 'unsigned int' in preference to bare unsigned It's our preferred style. No functional change. Noticed by: avg Sponsored by: Netflix --- sys/dev/nvme/nvme.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/nvme/nvme.h b/sys/dev/nvme/nvme.h index ddbc149802f4..61e4aa8cb94b 100644 --- a/sys/dev/nvme/nvme.h +++ b/sys/dev/nvme/nvme.h @@ -2190,7 +2190,7 @@ void nvme_namespace_data_swapbytes(struct nvme_namespace_data *s __unused) s->anagrpid = le32toh(s->anagrpid); s->nvmsetid = le16toh(s->nvmsetid); s->endgid = le16toh(s->endgid); - for (unsigned i = 0; i < nitems(s->lbaf); i++) + for (unsigned int i = 0; i < nitems(s->lbaf); i++) s->lbaf[i] = le32toh(s->lbaf[i]); #endif } From nobody Wed Nov 26 06:07:16 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dGTc4675qz6HVxT for ; Wed, 26 Nov 2025 06:07:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dGTc43wHGz3XNS for ; Wed, 26 Nov 2025 06:07:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764137236; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hvHzl/E3L1RJhh6xagbbrsdbUD+15pF1wISguly7Wr8=; b=QdZm0ueFREqNLoWk+ZwLKiAbG7Dy/ejRHUGtG0zLqJd9DXFuKhcqPPkDeL4VQ2JmXzonPn qPIOS1w+9c2pK90UY5urpk3p/MVI/OYOVoGejU1gTSDvT1nLaMOMgiG40UJWgPxo8048vb gTlcegKL6TSJtkENzaDMS0V6JbvwpK9Vcrt1sApk0HGZQ2oqkHcuM8zlE2jZ1xt0K5KgVi zYP46+0bsqkZXQg2CM3+d4WYKlw3R970yjbRiuwH008Om5JqRWrEbKiZXWsE3ZX2jrT1ZC c9s0mlAnLNBcEZEapUr02415HSqI6IQr4sODAoxuk75jlixPktxJaIPi/0LA+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764137236; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hvHzl/E3L1RJhh6xagbbrsdbUD+15pF1wISguly7Wr8=; b=Cjx79OJ1XUrTGh1MmyEyiS18puDggahAFPY/Q0o3m6fh9XjJJkMz+kaJHx7eiy4ibTBlBg V2lLyrZ5PWDRZSW6Ps+o/WZfX1l5hBuvRej+RyvCmWDO0x3iy7ZpYU+WI/I5AoLGjHto2n AMKfZbNKiT5yc/Z2zVOsZrPY+Acl94gKl+nLeE0uygP9Oh0tT1iLkFdWqCMEeoqC5CZufm iejNEy8a5uzcw8HIqCC3ZebKFKKEm7dnNMHj4jn5ChxIhSDIwJqv6Cq6KLFDxkRYJ1Tgq4 fkx70RKJfywi2s5NXo47wTd1qvIsKcpUZjyNfn0FRd+ZARMc0Jt3PGW5qDaavw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764137236; a=rsa-sha256; cv=none; b=wA6Txx28mMxSjocWpuA7rF3M/eW9Evz9P5ghoM+ogLGiXjBuLo4oFbZXEsMgK/6kArL3t2 ul25qeOdRcni67foo+PxYK0r5yXrqxSpPeHsqWeZyOIojCuNRrek8EO+0/4HjsVJ/C/23C 4kCkAaZSxwcjt2Wi1lMhorWBpPzse8Qbyj8Q0JhHGDILMUxn1MKd+Dq45NetJ0qQlIK36P rQwaBYg0S4brTTb4pqZcMD5XHnKCSyqffjkc4bs1ULBfu5yQd6Z4XoVVxEqzJHI57Toal4 3tut1ExkrNKQr8MXE5R3lArtFnOvZcgHyXEcIx2a4SZqY6wG3YOIUfgIWM0juw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dGTc42gzpzb6s for ; Wed, 26 Nov 2025 06:07:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id f2d9 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 26 Nov 2025 06:07:16 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: a48358d78e87 - stable/15 - Reapply "Merge commit e24f90190c77 from llvm git (by Brad Smith):" List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: a48358d78e87380c8498739bc4c82061e6c39a47 Auto-Submitted: auto-generated Date: Wed, 26 Nov 2025 06:07:16 +0000 Message-Id: <69269914.f2d9.5df9b8c1@gitrepo.freebsd.org> The branch stable/15 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=a48358d78e87380c8498739bc4c82061e6c39a47 commit a48358d78e87380c8498739bc4c82061e6c39a47 Author: Dimitry Andric AuthorDate: 2025-11-23 15:52:46 +0000 Commit: Dimitry Andric CommitDate: 2025-11-26 06:05:48 +0000 Reapply "Merge commit e24f90190c77 from llvm git (by Brad Smith):" [Driver] Enable outline atomics for FreeBSD/aarch64 (#156089) The compiler_rt helper functions have been built since 12.4, 13.1, 14 and anything newer. This reverts commit bd27bd1f51d049538cc7a0053be9d99110a53ae1. Only some people (including the release manager, unfortunately) ran into build issues with the previous iteration of this commit, because they were bootstrapping the compiler, either via the WITHOUT_SYSTEM_COMPILER src.conf(5) setting, or because the build system determined that their base system compiler was out of date. The bootstrapped compiler would then enable outline atomics and compile libgcc_s with these, but because libgcc_s is linked with -nodefaultlibs, it could not find the helper routines in libcompiler_rt.a. In contrast, people who did not bootstrap the compiler never saw any issues, because libgcc_s was built using their 'old' base system compiler, and so libgcc_s would not contain any calls to those helper routines. Fix this by ensuring that libgcc_s is linked against libcompiler_rt.a explicitly, similar to some other binaries and libraries that are built with -nodefaultlibs. Also, bump FREEBSD_CC_VERSION to ensure that everybody gets the updated compiler with outline atomics enabled. (This should have been done in the first iteration of this commit, because the error would have shown up right away then.) MFC after: 3 days (cherry picked from commit 3289bace53f31545976fec310b41fa784de75e64) --- contrib/llvm-project/clang/lib/Driver/ToolChains/FreeBSD.h | 5 +++++ lib/clang/freebsd_cc_version.h | 2 +- lib/libgcc_s/Makefile | 2 ++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/contrib/llvm-project/clang/lib/Driver/ToolChains/FreeBSD.h b/contrib/llvm-project/clang/lib/Driver/ToolChains/FreeBSD.h index 7ab63905ed4f..7d090ba682b3 100644 --- a/contrib/llvm-project/clang/lib/Driver/ToolChains/FreeBSD.h +++ b/contrib/llvm-project/clang/lib/Driver/ToolChains/FreeBSD.h @@ -78,6 +78,11 @@ public: void AddHIPIncludeArgs(const llvm::opt::ArgList &DriverArgs, llvm::opt::ArgStringList &CC1Args) const override; + bool IsAArch64OutlineAtomicsDefault( + const llvm::opt::ArgList &Args) const override { + return true; + } + UnwindTableLevel getDefaultUnwindTableLevel(const llvm::opt::ArgList &Args) const override; bool isPIEDefault(const llvm::opt::ArgList &Args) const override; diff --git a/lib/clang/freebsd_cc_version.h b/lib/clang/freebsd_cc_version.h index 277744ae8624..e272ca160b84 100644 --- a/lib/clang/freebsd_cc_version.h +++ b/lib/clang/freebsd_cc_version.h @@ -1 +1 @@ -#define FREEBSD_CC_VERSION 1500000 +#define FREEBSD_CC_VERSION 1500001 diff --git a/lib/libgcc_s/Makefile b/lib/libgcc_s/Makefile index 992fc930ee9f..7e3911043843 100644 --- a/lib/libgcc_s/Makefile +++ b/lib/libgcc_s/Makefile @@ -11,7 +11,9 @@ MK_SSP= no WARNS?= 2 LDFLAGS+= -nodefaultlibs +LDFLAGS+= -Wl,-Bsymbolic LIBADD+= c +LIBADD+= compiler_rt VERSION_DEF= ${.CURDIR}/Versions.def SYMBOL_MAPS= ${.CURDIR}/Symbol.map From nobody Wed Nov 26 06:07:41 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dGTcZ1DZrz6HVxh for ; Wed, 26 Nov 2025 06:07:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dGTcZ0XwMz3XSp for ; Wed, 26 Nov 2025 06:07:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764137262; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=btQFN4Ioywax9fc7w2hPwXX57rbqwhBnQOKHg62KXi4=; b=PjmMeus795oLx34/AOJ8giZmuzyws+Ihu+WxujQyCA14ccO9Hby0qBDRyZv3iu661YidyQ +7NJY5KIHXvZRu/z4FVDfT243cAWl0W7M4YjcvTqNuQATjnFffgH4Bd4SAAgSBkvpVcbf3 5kWgldA3C2T6QrcsfiML71uaPerfrac7RoFwV9atB0tFb3Iw31TyhuVrW/a6rT9iHJct8E mxncqXlsWowAO7G1zoARk1XxQwpOmBmZ0pOKIwyNWiDBudzuMdhldqGSqEarPp4C113Tup +tmc0l7Alvh3SnUFLttRPMfS/b6UCoCoAI5t8agtWCuaLe+bE5hnelvic96bKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764137262; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=btQFN4Ioywax9fc7w2hPwXX57rbqwhBnQOKHg62KXi4=; b=bhdU3o5CMON7oUwJ2cE6Of4wv391Z2G15aC9DnCCgFhqTL3Ml6taF/6n5A10OEoxiPdD/5 ioWosu6bw9jEn4yJEL+GpuKoWcPDleWvtWUTfq62oGxJ3k0gEBwfJjmoMdqaXZHKzoK/qE dqvFzUcoRWc9TErmwDw6YmdN5q4owbfi2dCO/IXpTI/D92DHVUwmBFH/a+Ufbew9bwK0fM lXB12n8lWyfrJfhr8WdY9zbBAqvtLIF3Rjl/JqeEW2tDvwUsrN8lc9i6AIKPEkyh+1AIl+ ch3uAEdPQejA0zhxbFbnHhGACeLjJUCJF9zhVLZ7NqTH+lUCRmEShYzSHjYQxw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764137262; a=rsa-sha256; cv=none; b=ytNubvJAxcAWQu0/4WQW6H6O87y/gftN+mVUGvFOWm4gLSPqxFs/yBWONMPH7iE0QWYVrs z9/Ezisc3l3d2fVGIWalcF5UZVhwl2VL6pgBFDLH7Y98a9WtC+L1//x6sl7wWXTyHq3Dtj gQRKCS/91JKrJM8rF1GiJkqvCEzFMuTSSsJP5l4u+tmuT6+dvkVAWGlYRFPYagwcH7oc/F sjLmWMIkuD3kCQlnZGwkXvSoOLqUo6JdYnBjrXbWc0PIeMiYhx5S4q7OEwNQWObOEvrpO4 hmug/D+VSlRZZi0qRI/Ffm2eE4Qy/E5q2VoRfxXqQtPPoffJQjGKtyo+BhpMww== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dGTcY6rfczb6t for ; Wed, 26 Nov 2025 06:07:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id f4f5 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 26 Nov 2025 06:07:41 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: e4e5e7da092e - stable/14 - Reapply "Merge commit e24f90190c77 from llvm git (by Brad Smith):" List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: e4e5e7da092eef1f0e1af70dd596a4ab9b75cb7a Auto-Submitted: auto-generated Date: Wed, 26 Nov 2025 06:07:41 +0000 Message-Id: <6926992d.f4f5.5872eeb7@gitrepo.freebsd.org> The branch stable/14 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=e4e5e7da092eef1f0e1af70dd596a4ab9b75cb7a commit e4e5e7da092eef1f0e1af70dd596a4ab9b75cb7a Author: Dimitry Andric AuthorDate: 2025-11-23 15:52:46 +0000 Commit: Dimitry Andric CommitDate: 2025-11-26 06:06:19 +0000 Reapply "Merge commit e24f90190c77 from llvm git (by Brad Smith):" [Driver] Enable outline atomics for FreeBSD/aarch64 (#156089) The compiler_rt helper functions have been built since 12.4, 13.1, 14 and anything newer. This reverts commit bd27bd1f51d049538cc7a0053be9d99110a53ae1. Only some people (including the release manager, unfortunately) ran into build issues with the previous iteration of this commit, because they were bootstrapping the compiler, either via the WITHOUT_SYSTEM_COMPILER src.conf(5) setting, or because the build system determined that their base system compiler was out of date. The bootstrapped compiler would then enable outline atomics and compile libgcc_s with these, but because libgcc_s is linked with -nodefaultlibs, it could not find the helper routines in libcompiler_rt.a. In contrast, people who did not bootstrap the compiler never saw any issues, because libgcc_s was built using their 'old' base system compiler, and so libgcc_s would not contain any calls to those helper routines. Fix this by ensuring that libgcc_s is linked against libcompiler_rt.a explicitly, similar to some other binaries and libraries that are built with -nodefaultlibs. Also, bump FREEBSD_CC_VERSION to ensure that everybody gets the updated compiler with outline atomics enabled. (This should have been done in the first iteration of this commit, because the error would have shown up right away then.) MFC after: 3 days (cherry picked from commit 3289bace53f31545976fec310b41fa784de75e64) --- contrib/llvm-project/clang/lib/Driver/ToolChains/FreeBSD.h | 5 +++++ lib/clang/freebsd_cc_version.h | 2 +- lib/libgcc_s/Makefile | 2 ++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/contrib/llvm-project/clang/lib/Driver/ToolChains/FreeBSD.h b/contrib/llvm-project/clang/lib/Driver/ToolChains/FreeBSD.h index 7ab63905ed4f..7d090ba682b3 100644 --- a/contrib/llvm-project/clang/lib/Driver/ToolChains/FreeBSD.h +++ b/contrib/llvm-project/clang/lib/Driver/ToolChains/FreeBSD.h @@ -78,6 +78,11 @@ public: void AddHIPIncludeArgs(const llvm::opt::ArgList &DriverArgs, llvm::opt::ArgStringList &CC1Args) const override; + bool IsAArch64OutlineAtomicsDefault( + const llvm::opt::ArgList &Args) const override { + return true; + } + UnwindTableLevel getDefaultUnwindTableLevel(const llvm::opt::ArgList &Args) const override; bool isPIEDefault(const llvm::opt::ArgList &Args) const override; diff --git a/lib/clang/freebsd_cc_version.h b/lib/clang/freebsd_cc_version.h index e9737b10d337..a01612cc323f 100644 --- a/lib/clang/freebsd_cc_version.h +++ b/lib/clang/freebsd_cc_version.h @@ -1 +1 @@ -#define FREEBSD_CC_VERSION 1400006 +#define FREEBSD_CC_VERSION 1400007 diff --git a/lib/libgcc_s/Makefile b/lib/libgcc_s/Makefile index fdf5a67d8045..d0b9a799af1f 100644 --- a/lib/libgcc_s/Makefile +++ b/lib/libgcc_s/Makefile @@ -12,7 +12,9 @@ MK_SSP= no WARNS?= 2 LDFLAGS+= -nodefaultlibs +LDFLAGS+= -Wl,-Bsymbolic LIBADD+= c +LIBADD+= compiler_rt VERSION_DEF= ${.CURDIR}/Versions.def SYMBOL_MAPS= ${.CURDIR}/Symbol.map From nobody Wed Nov 26 06:08:09 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dGTd51WMgz6HW9p for ; Wed, 26 Nov 2025 06:08:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dGTd50shFz3Xqd for ; Wed, 26 Nov 2025 06:08:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764137289; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=htCEq8PIfRsoxJHxCsHXFPiOM9nd7f80EnucGstShOk=; b=iNpufKFWIp8zlYENTEXLcHZnQ90Li7VD8yuAMQsHAkaLNXeO/Zo8/iQYbNJE1CigZvnKNk S6obrXzRcZvKHsUaSGqowQA5zPa0uTlYdckFMTarnLVP58NGIC77rxfWPSQx+JsOHbgnrE itGBl3zC8ECqMxKki1DhUW1zy8pIQsbeDBTaCqzHjjjUAJMIxguaek4z+/zhtg6YfMPUaf TeDBco8mQHqBYOltOSI29+rZR+xVyvOYVQkCn5nGijKUprf9LmiBmfDq8DxbMUUNJpLdrJ bng1PnxhWUbyxdzo0tmsoSz8enNPSGdqbjWz8yd5b1kVjmGHVbaVR0KKi+tTNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764137289; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=htCEq8PIfRsoxJHxCsHXFPiOM9nd7f80EnucGstShOk=; b=ekZJqJkxbomruYgCOXM6TdRxhjHsqzhU6bZLAEhAxMeF6zsFkvBmd7M+IZDWLMvlghUgLd tGQU+6d2iEWwYS8MLn6jddO7tjZllhZVll/002gmAbbqpj7nVJb9xjlGv7LPQoUoz/M5se bzbLdzaOYJZlD7IUtnpT5ae/Blj8Y+whGUWglUXk1O5dnovjH2YP6QfVEw/MGOTfmpsnZx U+p5fxUEA9Cw21SPoqsAEfRo1Zf+hqJGQskJT/zGdDMDnfAgcmuEGecNvTXmDoAlsq6Ms5 apNRamGDyF66h8JZBUMqtr67VUEZQiwX/t/vaoqmXj7HVsxrK56L6k1tCzl6fw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764137289; a=rsa-sha256; cv=none; b=CTC7qPZ30tWCU/AUgh9tBWFovMv/C1yiNU7LHLMNjPEishiNiFVBAfSiQ6JirhZmWXe4Pj 3BHSreSkxCIioxshk7a0ubXzx7bs5wJuZNkNFXLhV2eb/BQxnPcSXEH11afSdM8mK3PfR9 wejuXc93hjCyL8iTFpoYx9IHVfRp06ZIQTFhFAnwxWsjCUJH42FCcS7ox9N84fFI/EFbIp ZPwz15ycqdnYpfl6WDOsHbPyP7s93zant9DCaEutl0HPfP/6wuwX8am0P6pFlv4q42JcIw Hdy2YqlOt1idfb2Ias/f1jOJ0hfr4yUaL1OmmF59nh5fKj4MTbA0GRWC2uP12g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dGTd505skzbGR for ; Wed, 26 Nov 2025 06:08:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id f4f9 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 26 Nov 2025 06:08:09 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: e0c79f13d755 - stable/13 - Reapply "Merge commit e24f90190c77 from llvm git (by Brad Smith):" List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: e0c79f13d755c480ff6c3ca1f5c78ed1c04db400 Auto-Submitted: auto-generated Date: Wed, 26 Nov 2025 06:08:09 +0000 Message-Id: <69269949.f4f9.7140792c@gitrepo.freebsd.org> The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=e0c79f13d755c480ff6c3ca1f5c78ed1c04db400 commit e0c79f13d755c480ff6c3ca1f5c78ed1c04db400 Author: Dimitry Andric AuthorDate: 2025-11-23 15:52:46 +0000 Commit: Dimitry Andric CommitDate: 2025-11-26 06:06:40 +0000 Reapply "Merge commit e24f90190c77 from llvm git (by Brad Smith):" [Driver] Enable outline atomics for FreeBSD/aarch64 (#156089) The compiler_rt helper functions have been built since 12.4, 13.1, 14 and anything newer. This reverts commit bd27bd1f51d049538cc7a0053be9d99110a53ae1. Only some people (including the release manager, unfortunately) ran into build issues with the previous iteration of this commit, because they were bootstrapping the compiler, either via the WITHOUT_SYSTEM_COMPILER src.conf(5) setting, or because the build system determined that their base system compiler was out of date. The bootstrapped compiler would then enable outline atomics and compile libgcc_s with these, but because libgcc_s is linked with -nodefaultlibs, it could not find the helper routines in libcompiler_rt.a. In contrast, people who did not bootstrap the compiler never saw any issues, because libgcc_s was built using their 'old' base system compiler, and so libgcc_s would not contain any calls to those helper routines. Fix this by ensuring that libgcc_s is linked against libcompiler_rt.a explicitly, similar to some other binaries and libraries that are built with -nodefaultlibs. Also, bump FREEBSD_CC_VERSION to ensure that everybody gets the updated compiler with outline atomics enabled. (This should have been done in the first iteration of this commit, because the error would have shown up right away then.) MFC after: 3 days (cherry picked from commit 3289bace53f31545976fec310b41fa784de75e64) --- contrib/llvm-project/clang/lib/Driver/ToolChains/FreeBSD.h | 5 +++++ lib/clang/freebsd_cc_version.h | 2 +- lib/libgcc_s/Makefile | 2 ++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/contrib/llvm-project/clang/lib/Driver/ToolChains/FreeBSD.h b/contrib/llvm-project/clang/lib/Driver/ToolChains/FreeBSD.h index 7ab63905ed4f..7d090ba682b3 100644 --- a/contrib/llvm-project/clang/lib/Driver/ToolChains/FreeBSD.h +++ b/contrib/llvm-project/clang/lib/Driver/ToolChains/FreeBSD.h @@ -78,6 +78,11 @@ public: void AddHIPIncludeArgs(const llvm::opt::ArgList &DriverArgs, llvm::opt::ArgStringList &CC1Args) const override; + bool IsAArch64OutlineAtomicsDefault( + const llvm::opt::ArgList &Args) const override { + return true; + } + UnwindTableLevel getDefaultUnwindTableLevel(const llvm::opt::ArgList &Args) const override; bool isPIEDefault(const llvm::opt::ArgList &Args) const override; diff --git a/lib/clang/freebsd_cc_version.h b/lib/clang/freebsd_cc_version.h index 758b8295d012..33f11e855524 100644 --- a/lib/clang/freebsd_cc_version.h +++ b/lib/clang/freebsd_cc_version.h @@ -1 +1 @@ -#define FREEBSD_CC_VERSION 1300013 +#define FREEBSD_CC_VERSION 1300014 diff --git a/lib/libgcc_s/Makefile b/lib/libgcc_s/Makefile index 62c69cec4901..ecd9c4511247 100644 --- a/lib/libgcc_s/Makefile +++ b/lib/libgcc_s/Makefile @@ -9,7 +9,9 @@ MK_SSP= no WARNS?= 2 LDFLAGS+= -nodefaultlibs +LDFLAGS+= -Wl,-Bsymbolic LIBADD+= c +LIBADD+= compiler_rt VERSION_DEF= ${.CURDIR}/Versions.def SYMBOL_MAPS= ${.CURDIR}/Symbol.map From nobody Wed Nov 26 10:53:02 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dGbxp1Nw1z6Hs9n for ; Wed, 26 Nov 2025 10:53:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dGbxp0p3Pz42LH for ; Wed, 26 Nov 2025 10:53:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764154382; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Zmfngz2JOAe/uOj1QhjQfK63zSwjHn1P5NFAqDRTUUw=; b=e8g9ptr0xk+Z8wf1/iSZ23xw9rBem0ReQEe9BeKldqJxSYGJIAO520gFzuecsdKiUjcIrn ++CC7Hg5Yr+kp/EJmuFzXB3uINU3FhabTtWf8EBkwlRkDhu/qKB8Dt1nQYYi4AsW12o0sJ zVQLKDUbXjmmRd66ilRpPaj3mwFt57f6FkKvpsxodrA9JpZdSTm7cOVNiBh4ISm1iB7vyQ wl2pc4/0vQTR3M69njQqoo0TM79tjESTRz/Nk9QSp07CBWbRlxqmaoFozJzp5jMFJX7pPb 6o+dxlZzTihaLFu0qVrByuIBtNetkYnC8P+Du723fvjdAjkr/UC9OX3wDNAJsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764154382; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Zmfngz2JOAe/uOj1QhjQfK63zSwjHn1P5NFAqDRTUUw=; b=l9PhUdJONPPHWEKJDm9xwQssYMCypu62sEqmnmCov3D56nJDgW01WxsCxI6jCUaljiw5SO I9g/Nk7t7HlJHAQ9o/b9Aug/3PVWblwXuNVXcjpOFp9g3mTpC1IueO4KxqfMvz2JkP1G+g pYIE5SX16aV8b0BA0m4F4wBpLw2ep4cKBb106eHOUN4iSmS5D7u56uJSVcjsiNGVE5fJjR 3AQoBatNc0DiRYXo6eiTatko6ogIuH36P8nUuMk/gDdj3QfS0w2MUWFA479eBc0quLJGE6 bxXLCVUSXbWA34vzD3Cg5opl+bf01XUFYs569F74cu68NdwhdV5Mznvze6mhaA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764154382; a=rsa-sha256; cv=none; b=Oy9uxKHvSV1KeIu/KONq6+fTGZd20aDPQOeyCiI5RXgL92ysMZVL8GoPn5VoCNHfG8EgX9 NamDGRAH7Gg2jxuMnRC++wdWow3kREJN6rCRG4F4SOoKW2ghWDEIjulAT4qNhJpcZP5ih1 pbKj1DLk75IdIwi6TUyFbFZ/lifGoY+FschmYX+VYB19eC16uLO4AGg8uu+noxfBFmdYbC XECdFiAa3z12S0gVv9evUnzSXWaeHZ5GMYA1xDC/nWolBHKzEpaWFdKUuda8EoG54x8m/W Yz+qvo34K/gukmJYXMZ7yX8dYVNEMh96dylKwN0KKTF7SO5Bkslwl6swpch4hw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dGbxp0P0Bzklt for ; Wed, 26 Nov 2025 10:53:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3c028 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 26 Nov 2025 10:53:02 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 23af364630b1 - main - tests: detect built-in modules List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 23af364630b133b09821757d33f253702606d4cf Auto-Submitted: auto-generated Date: Wed, 26 Nov 2025 10:53:02 +0000 Message-Id: <6926dc0e.3c028.150d5d85@gitrepo.freebsd.org> The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=23af364630b133b09821757d33f253702606d4cf commit 23af364630b133b09821757d33f253702606d4cf Author: Kristof Provost AuthorDate: 2025-11-26 10:27:47 +0000 Commit: Kristof Provost CommitDate: 2025-11-26 10:27:47 +0000 tests: detect built-in modules When checking vnet test prerequisites we check if if_epair and if_bridge are available, but we only checked for loadable modules. It's possible for these to be built into the kernel instead. Sponsored by: Rubicon Communications, LLC ("Netgate") --- tests/sys/common/vnet.subr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/sys/common/vnet.subr b/tests/sys/common/vnet.subr index 0a32e6caf813..245dbaea517a 100644 --- a/tests/sys/common/vnet.subr +++ b/tests/sys/common/vnet.subr @@ -15,7 +15,7 @@ _vnet_check_req() { type=$1 - if kldstat -q -n if_${type}.ko; then + if kldstat -q -m if_${type}; then return fi From nobody Wed Nov 26 12:06:21 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dGdZg5jbsz6HxX0; Wed, 26 Nov 2025 12:06:35 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4dGdZf71yHz47mm; Wed, 26 Nov 2025 12:06:34 +0000 (UTC) (envelope-from kostikbel@gmail.com) 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 5AQC6LIS061729; Wed, 26 Nov 2025 14:06:24 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 5AQC6LIS061729 Received: (from kostik@localhost) by tom.home (8.18.1/8.18.1/Submit) id 5AQC6Lv5061728; Wed, 26 Nov 2025 14:06:21 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 26 Nov 2025 14:06:21 +0200 From: Konstantin Belousov To: Warner Losh Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 301b8a806f79 - main - nvme: Minor style(9) fixes Message-ID: References: <6925d6af.3b42c.336a0065@gitrepo.freebsd.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6925d6af.3b42c.336a0065@gitrepo.freebsd.org> X-Spamd-Bar: ---- 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-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4dGdZf71yHz47mm On Tue, Nov 25, 2025 at 04:17:51PM +0000, Warner Losh wrote: > The branch main has been updated by imp: > > URL: https://cgit.FreeBSD.org/src/commit/?id=301b8a806f79292ee3324ca938a4d938df1911e8 > > commit 301b8a806f79292ee3324ca938a4d938df1911e8 > Author: Warner Losh > AuthorDate: 2025-11-25 16:10:23 +0000 > Commit: Warner Losh > CommitDate: 2025-11-25 16:12:51 +0000 > > nvme: Minor style(9) fixes > > needs to be first after . And we don't need > both sys/param.h and sys/types.h. We do not both sys/param.h and sys/systm.h as well, since sys/systm.h includes sys/param.h. From nobody Wed Nov 26 13:06:45 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dGfwX1nlKz6J2c3; Wed, 26 Nov 2025 13:07:08 +0000 (UTC) (envelope-from gallatin@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dGfwW6vd9z4JKF; Wed, 26 Nov 2025 13:07:07 +0000 (UTC) (envelope-from gallatin@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764162428; 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=4zLnPAY8xTI0S5t+DjZ6K36XG/HVxh0vDGBvArjZR9o=; b=Q5dLAEFMyzbQY82L7m069p67kzhXfThAKiF9rDQlzHGY/HFUVQAcSi2nBguOFtzbDttbDF tvre2fedYJBSpK5GVhRZSZ48VxTjY9hEQI+m62MoWBuQeOOdPDfj5fkJ6PWA/PiQBU5WB6 b9odUHWHSSkSmQ6ZDetIxvfwJWcSbXelwz1Xp4z65cPQmKa69z6Ck1wRzE6Mzi9joTEXgo 4zuyWU5diK64BEfiKZKFHiEolf7sTIgM9x8lfr3/2dpsG24VzdbGsVPrQkl0TnKAwexxVe wAOZjRoH4CI+4oH3O7ucO172u2msmxM5MF9cXPOMzyublbUV0kLsCzCx8gFiNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764162428; 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=4zLnPAY8xTI0S5t+DjZ6K36XG/HVxh0vDGBvArjZR9o=; b=omGKZITkRqyPP+lXqjEcw+8d/TxpCCyVTvPmwFmLL43HmRuXLl1i9+MQF9N8rA/Zqzz2zC 2Rye0eWlHp98IouI+Wx7PFYfsP/yGcCM45qSAHa9wb0Ot1avly43cTlHyqGGBnySBN+5SL 4tPrNck7V+locD4M/t67h/8ja2APHRYx/qRCNLJYUdtMIfk5rCK3n0R3VkO6FOsf+dTC6i DhDEX2WQGRV4nWvErdbqmX4fvhFiUBL5oA6gBfdTja8rXw86jTSmETKy+2yW0ScH7IoErI 7/ZXLzkN5kdso3nkc3JU3DDdIj9xTJNHl0Bd6dnb6bTqA4tJ5b/zUVKhHmGZbg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764162428; a=rsa-sha256; cv=none; b=SydkKXKJ4tmunEgD4RnjGrDHF4rGAgiLMehT8lPBumPjwi5vQ54dtYXdL/WmYH2vZ5fMUZ CdyOSXW/9uMKMfiAy6CqaVch9Q07SBtsNlNy/IEy4DDqmDqO4uoBk/j8+VD0nSnfz5mVq2 yeXMY0ilItrBS4w9yJ5XmrNYCKbsFotlD9/zjcp/7df+Y8mm4tU5VDE9rNGfKS8dWsnGOC G2yfBfdKw63O+KShcEHQKQFI9BPCMwrQt1A07VLczbTxxza/8N/RV9JSmSUjYaMvR1Jbf1 bvpTpdxlhnPC5VH4qkU2MrHDpna8rCAq/du4cA2qmZL09C96MgWvZbet2O5u7Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from fauth-a2-smtp.messagingengine.com (fauth-a2-smtp.messagingengine.com [103.168.172.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: gallatin) by smtp.freebsd.org (Postfix) with ESMTPSA id 4dGfwW5m7cztHB; Wed, 26 Nov 2025 13:07:07 +0000 (UTC) (envelope-from gallatin@freebsd.org) Received: from phl-compute-05.internal (phl-compute-05.internal [10.202.2.45]) by mailfauth.phl.internal (Postfix) with ESMTP id BFC84F4006A; Wed, 26 Nov 2025 08:07:05 -0500 (EST) Received: from phl-imap-09 ([10.202.2.99]) by phl-compute-05.internal (MEProxy); Wed, 26 Nov 2025 08:07:05 -0500 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdeggddvgeeggeefucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhepofggfffhvffkjghfufgtsegrtderreertddtnecuhfhrohhmpedfffhrvgifucfi rghllhgrthhinhdfuceoghgrlhhlrghtihhnsehfrhgvvggsshgurdhorhhgqeenucggtf frrghtthgvrhhnpeekiedtheevhfejhfdukefgudegtdevjeelgfehtddvvefhgfeugffg feevffevgeenucffohhmrghinhepfhhrvggvsghsugdrohhrghenucevlhhushhtvghruf hiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehgrghllhgrthhinhdomhgvshhm thhprghuthhhphgvrhhsohhnrghlihhthidqudeffeehledvvdduiedqvdelhedtgeduke egqdhgrghllhgrthhinheppehfrhgvvggsshgurdhorhhgsehfrghsthhmrghilhdrtgho mhdpnhgspghrtghpthhtohepgedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepug gvvhdqtghomhhmihhtshdqshhrtgdqrghllhesfhhrvggvsghsugdrohhrghdprhgtphht thhopeguvghvqdgtohhmmhhithhsqdhsrhgtqdhmrghinhesfhhrvggvsghsugdrohhrgh dprhgtphhtthhopehnphesfhhrvggvsghsugdrohhrghdprhgtphhtthhopehsrhgtqdgt ohhmmhhithhtvghrshesfhhrvggvsghsugdrohhrgh X-ME-Proxy: Feedback-ID: i41414658:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id 846F23020054; Wed, 26 Nov 2025 08:07:05 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 X-ThreadId: A806yzzdulAF Date: Wed, 26 Nov 2025 08:06:45 -0500 From: "Drew Gallatin" To: "Navdeep Parhar" , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Message-Id: In-Reply-To: <69261ce6.31d1c.79c43e11@gitrepo.freebsd.org> References: <69261ce6.31d1c.79c43e11@gitrepo.freebsd.org> Subject: Re: git: 98f6f6e4f4bb - main - cxgbe(4): Enable IFCAP_NV and implement SIOCGIFCAPNV/SIOCSIFCAPNV Content-Type: multipart/alternative; boundary=2ce58595791f4fdea9e6f8b5932d2002 --2ce58595791f4fdea9e6f8b5932d2002 Content-Type: text/plain Content-Transfer-Encoding: 7bit I really wish we would have just expanded if capa to 64 bits. Having 2 sets of bits for caps is incredibly awkward and error prone. I'm reminded of that every time a driver is converted.. Drew On Tue, Nov 25, 2025, at 4:17 PM, Navdeep Parhar wrote: > The branch main has been updated by np: > > URL: https://cgit.FreeBSD.org/src/commit/?id=98f6f6e4f4bb7b19e12de89fc8cc034915f7a759 > > commit 98f6f6e4f4bb7b19e12de89fc8cc034915f7a759 > Author: Navdeep Parhar > AuthorDate: 2025-11-25 19:04:30 +0000 > Commit: Navdeep Parhar > CommitDate: 2025-11-25 21:08:03 +0000 > > cxgbe(4): Enable IFCAP_NV and implement SIOCGIFCAPNV/SIOCSIFCAPNV > > MFC after: 1 week > Sponsored by: Chelsio Communications > --- > sys/dev/cxgbe/t4_main.c | 21 ++++++++++++++++++--- > 1 file changed, 18 insertions(+), 3 deletions(-) > > diff --git a/sys/dev/cxgbe/t4_main.c b/sys/dev/cxgbe/t4_main.c > index 946eb84457a3..5e02b47da8d9 100644 > --- a/sys/dev/cxgbe/t4_main.c > +++ b/sys/dev/cxgbe/t4_main.c > @@ -2817,7 +2817,7 @@ cxgbe_probe(device_t dev) > #define T4_CAP (IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_MTU | IFCAP_HWCSUM | \ > IFCAP_VLAN_HWCSUM | IFCAP_TSO | IFCAP_JUMBO_MTU | IFCAP_LRO | \ > IFCAP_VLAN_HWTSO | IFCAP_LINKSTATE | IFCAP_HWCSUM_IPV6 | IFCAP_HWSTATS | \ > - IFCAP_HWRXTSTMP | IFCAP_MEXTPG) > + IFCAP_HWRXTSTMP | IFCAP_MEXTPG | IFCAP_NV) > #define T4_CAP_ENABLE (T4_CAP) > > static void > @@ -3065,7 +3065,7 @@ cxgbe_ioctl(if_t ifp, unsigned long cmd, caddr_t data) > struct port_info *pi = vi->pi; > struct adapter *sc = pi->adapter; > struct ifreq *ifr = (struct ifreq *)data; > - uint32_t mask; > + uint32_t mask, mask2; > > switch (cmd) { > case SIOCSIFMTU: > @@ -3124,12 +3124,24 @@ cxgbe_ioctl(if_t ifp, unsigned long cmd, caddr_t data) > end_synchronized_op(sc, 0); > break; > > + case SIOCGIFCAPNV: > + break; > + case SIOCSIFCAPNV: > case SIOCSIFCAP: > rc = begin_synchronized_op(sc, vi, SLEEP_OK | INTR_OK, "t4cap"); > if (rc) > return (rc); > > - mask = ifr->ifr_reqcap ^ if_getcapenable(ifp); > + if (cmd == SIOCSIFCAPNV) { > + const struct siocsifcapnv_driver_data *ifr_nv = > + (struct siocsifcapnv_driver_data *)data; > + > + mask = ifr_nv->reqcap ^ if_getcapenable(ifp); > + mask2 = ifr_nv->reqcap2 ^ if_getcapenable2(ifp); > + } else { > + mask = ifr->ifr_reqcap ^ if_getcapenable(ifp); > + mask2 = 0; > + } > if (mask & IFCAP_TXCSUM) { > if_togglecapenable(ifp, IFCAP_TXCSUM); > if_togglehwassist(ifp, CSUM_TCP | CSUM_UDP | CSUM_IP); > @@ -3264,6 +3276,9 @@ cxgbe_ioctl(if_t ifp, unsigned long cmd, caddr_t data) > CSUM_INNER_IP_TSO); > } > > + MPASS(mask2 == 0); > + (void)mask2; > + > #ifdef VLAN_CAPABILITIES > VLAN_CAPABILITIES(ifp); > #endif > > --2ce58595791f4fdea9e6f8b5932d2002 Content-Type: text/html Content-Transfer-Encoding: quoted-printable
I really wis= h we would have just expanded if capa to 64 bits.  Having 2 sets of= bits for caps is incredibly awkward and error prone.  I'm reminded= of that every time a driver is converted.. 

Drew

On Tue, Nov 25, 2025, at 4:17 PM, Navde= ep Parhar wrote:
The branch main has been updated by np:


comm= it 98f6f6e4f4bb7b19e12de89fc8cc034915f7a759
Author:  = ;   Navdeep Parhar <np@Fr= eeBSD.org>
AuthorDate: 2025-11-25 19:04:30 +0000
<= div>Commit:     Navdeep Parhar <np@FreeBSD.org>
CommitDate: 2025-11-25= 21:08:03 +0000

    cxgbe(4): En= able IFCAP_NV and implement SIOCGIFCAPNV/SIOCSIFCAPNV
 &n= bsp;  
    MFC after:  &nbs= p;   1 week
    Sponsored by: &n= bsp; Chelsio Communications
---
sys/dev/cxgbe/t4_mai= n.c | 21 ++++++++++++++++++---
1 file changed, 18 insertions(+= ), 3 deletions(-)

diff --git a/sys/dev/cxgbe/t4= _main.c b/sys/dev/cxgbe/t4_main.c
index 946eb84457a3..5e02b47d= a8d9 100644
--- a/sys/dev/cxgbe/t4_main.c
+++ b/sys/= dev/cxgbe/t4_main.c
@@ -2817,7 +2817,7 @@ cxgbe_probe(device_t= dev)
#define T4_CAP (IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_MTU | = IFCAP_HWCSUM | \
     IFCAP_VLAN_HWCSUM | = IFCAP_TSO | IFCAP_JUMBO_MTU | IFCAP_LRO | \
   =   IFCAP_VLAN_HWTSO | IFCAP_LINKSTATE | IFCAP_HWCSUM_IPV6 | IFCAP_HW= STATS | \
-    IFCAP_HWRXTSTMP | IFCAP_MEXTPG)<= /div>
+    IFCAP_HWRXTSTMP | IFCAP_MEXTPG | IFCAP_NV)=
#define T4_CAP_ENABLE (T4_CAP)
 
sta= tic void
@@ -3065,7 +3065,7 @@ cxgbe_ioctl(if_t ifp, unsigned = long cmd, caddr_t data)
struct port_info *pi =3D vi->pi;
struct adapter *sc =3D pi->adapter;
struct ifreq *i= fr =3D (struct ifreq *)data;
- uint32_t mask;
+ uint= 32_t mask, mask2;
 
switch (cmd) {
ca= se SIOCSIFMTU:
@@ -3124,12 +3124,24 @@ cxgbe_ioctl(if_t ifp, u= nsigned long cmd, caddr_t data)
end_synchronized_op(sc, 0);
break;
 
+ case SIOCGIFCAPNV:
+ break;
+ case SIOCSIFCAPNV:
case SIOCSIFCAP:
rc =3D begin_synchronized_op(sc, vi, SLEEP_OK | INTR_OK, "t4cap")= ;
if (rc)
return (rc);
 
- = mask =3D ifr->ifr_reqcap ^ if_getcapenable(ifp);
+ if (cm= d =3D=3D SIOCSIFCAPNV) {
+ const struct siocsifcapnv_driver_= data *ifr_nv =3D
+     (struct siocsifcapnv_d= river_data *)data;
+
+ mask =3D ifr_nv->reqcap = ^ if_getcapenable(ifp);
+ mask2 =3D ifr_nv->reqcap2 ^ if_= getcapenable2(ifp);
+ } else {
+ mask =3D ifr->= ;ifr_reqcap ^ if_getcapenable(ifp);
+ mask2 =3D 0;
+ }
if (mask & IFCAP_TXCSUM) {
if_togglecapena= ble(ifp, IFCAP_TXCSUM);
if_togglehwassist(ifp, CSUM_TCP | CSUM= _UDP | CSUM_IP);
@@ -3264,6 +3276,9 @@ cxgbe_ioctl(if_t ifp, u= nsigned long cmd, caddr_t data)
    CSUM_INNER_= IP_TSO);
}
 
+ MPASS(mask2 =3D=3D 0)= ;
+ (void)mask2;
+
#ifdef VLAN_CAPABILITI= ES
VLAN_CAPABILITIES(ifp);
#endif



--2ce58595791f4fdea9e6f8b5932d2002-- From nobody Wed Nov 26 14:13:21 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dGhNy0tdwz6J6sc for ; Wed, 26 Nov 2025 14:13:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dGhNy0C2Bz3DCS for ; Wed, 26 Nov 2025 14:13:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764166402; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2H1vtOD0vjE+b1FL7Bkw1Ey0zPxeIVjFrvylhve2O/g=; b=CCqRQYzivKEH9ACYHAO62uIgx10TvSkgIFOFKZl1s26bCY3KC1wxa+nSqY4V6ujJRKvMwJ w+AxHsLHfFAQuGW5XsgzrRD8BLvrhYT1/+cZkPyu8u1o7+y7G0oQ9ZZmMTfQKcMCYFAreX 9WWumHefMhA4XsPGy6PQBSucsFy7WhqbwoGcNBWHU39UgUCY9UGeoFqnt13TakV/arKDJ1 N49gUCryOvvYXBFh1yvmlLD2bsf9f/ozCiQyE9xrX2JSY+iuCzBzbdDfAQVcIUY5A74z74 k3eIHjTf53x98biAx5YtBCfEqj4KFQ1/X33noVAXWdyLgbhsozXwLuZwEbvEdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764166402; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2H1vtOD0vjE+b1FL7Bkw1Ey0zPxeIVjFrvylhve2O/g=; b=xv5j3c8lRpASBkSyrky/HjRrAN027DEru5MW56k9/85KmHY3sL3JXFoKgtTMjIEQStLRyx 6+XuxV0hhbt82Ue7uZyW4SwRwqeCk/yR/C317iUlCH/xF6wmzgoZlIcFy6MWr5j538Q9nv +7Qp6Kxdn3H//MuIIZQZLTxE99WA6bQLZaiQ2Cbo09cgPUeNiyP4As8Ul6S9m5NiiLtnDL pSl9Ijx/QkBX2+Kj4MqfZbf1IwiOTqnQ97ix7KF20sH0iO2k7lO5QHpFDzYf8iF8E/ihB9 Rx0Ywv4pUIECb+3v5Lv5CjeSiis30dE1R4hPvssKA12LRmU5uGr/DAOEJJ8tkg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764166402; a=rsa-sha256; cv=none; b=gHsTpmAFLbksZ+svPHaFCf0gtAapd3JaVwjn7YRAia+/3HbwsJ8fqnb8Nj/vneeKppEE47 4/sPmOkauTVx83PWuhsW71L7ibHonPc9gSGeb7UpKxWmTxIEMo53TFEDEsTk4TTPHTGY2F BdLd4pjnLBgaumuRm4kveh7QoFRPLczS+cUyVEuFhy7JT3MjaqgvKKiuxm2XejzUeBdssw xKvzIF0W+pMhN9WtkC+XMbs1z4OYJt7t1+HdPXpn2Ch6Eh0ZOQxCVhB7wwqr9O5JZtaVan J3wUAHQVbB2L0kmuPJgzbrujok7hr861Bjt2d+wABHZrKU0LTLiAvDmMNwJomQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dGhNx6fbHzq9k for ; Wed, 26 Nov 2025 14:13:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 298db by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 26 Nov 2025 14:13:21 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: e00a781c216c - main - mqueue: Export kern_kmq_* symbols from kernel module List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e00a781c216cb12603a0a71c9ca293dde3e06250 Auto-Submitted: auto-generated Date: Wed, 26 Nov 2025 14:13:21 +0000 Message-Id: <69270b01.298db.50a29318@gitrepo.freebsd.org> The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=e00a781c216cb12603a0a71c9ca293dde3e06250 commit e00a781c216cb12603a0a71c9ca293dde3e06250 Author: Ed Maste AuthorDate: 2025-11-25 19:06:25 +0000 Commit: Ed Maste CommitDate: 2025-11-26 14:13:09 +0000 mqueue: Export kern_kmq_* symbols from kernel module linux.ko supports POSIX message queues using these symbols, so they need to be exported rather than relying on the kernel linker's misfeature of linking against debug or local symbols (which will soon be disabled by default). Reported by: mav Reviewed by: zlei Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D53907 --- sys/modules/mqueue/Makefile | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sys/modules/mqueue/Makefile b/sys/modules/mqueue/Makefile index dbc804ba30fb..55040a2282cb 100644 --- a/sys/modules/mqueue/Makefile +++ b/sys/modules/mqueue/Makefile @@ -5,4 +5,11 @@ SRCS= uipc_mqueue.c \ vnode_if.h \ opt_posix.h opt_capsicum.h +EXPORT_SYMS= \ + kern_kmq_notify \ + kern_kmq_open \ + kern_kmq_setattr \ + kern_kmq_timedreceive \ + kern_kmq_timedsend + .include From nobody Wed Nov 26 14:45:51 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dGj6n1Y79z6J98G for ; Wed, 26 Nov 2025 14:46:09 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-pj1-x102e.google.com (mail-pj1-x102e.google.com [IPv6:2607:f8b0:4864:20::102e]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dGj6m5wnFz3K9s for ; Wed, 26 Nov 2025 14:46:08 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-pj1-x102e.google.com with SMTP id 98e67ed59e1d1-3436cbb723fso5583126a91.2 for ; Wed, 26 Nov 2025 06:46:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1764168363; x=1764773163; darn=freebsd.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=AzRjO5BGfW/rintfbXZndjaE6J3+AtVLsujNjNjzRrQ=; b=xz0XqWZ4jUjulawk/inksGVAMnWR4rGOBieCr4kKH13nqluu2V3uDCiBnZq2UGG0WT 284Ii67OmQ20bMOwYOHufAKBIKvNH/GZxDjNxadNqb7g9ITsN5xRIWyw6lkGTw/6ireP guaS6zYQoHLfc034lg8RAOOFNSHwXkhCUrsTw04BmvW1/Gx0XvrBeWAbHiPP/BxrtGvi aPPRIEHCQsymvT+DSHk777qyW1/M+IpNKwn+n7l95iVs2tHSbgliEhVUmtSVv/jsVSMS 2rxC33xzME2V+EOuOVW7DBVAX0sC1+K7efWu0L0TgFpmJZFJfrqCyiBcSX2rQucsJcdQ PRPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764168363; x=1764773163; 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=AzRjO5BGfW/rintfbXZndjaE6J3+AtVLsujNjNjzRrQ=; b=jmwC34F1HS0LKSt2oou+kB/5YUXQbY19T6aCGl8+o7fH++MbjZ8dt4e9FGw7j34OX7 xlzR8FdcA1oInk/e1tRZFgF58p+4Pw05tKNeg6+Q3yIhb+D/QWCwM5D80aSpTyVmARoJ 7PIQaIdsk0nmedZ37ItD6p8NuKtOXGHnR4owAWeaHP9hz9pUNYxbmPBWY0XcIpfPdW18 hxOdMpQRNPrkRnmDMUv1tBjuvfUXhz9zay9TpAy2m7naAnOq/HwmrAaDXJ1mTJt7ITEU 6xfeSL4w/Gjaf4D2eABfHqAcCP0CZ2OBSRwy0sua/7KgplP+YTmWitM56ZkwmPqYYWPS 4zzA== X-Forwarded-Encrypted: i=1; AJvYcCVTmWbgUX+FyhXFf+BT8i4dFLI0+SkaB91ltJ/6+IpOMTnagpGYUqkDbqYK5o60fnxPeIlVM9Cy2ZLRAzvrRL6cZbBk@freebsd.org X-Gm-Message-State: AOJu0YzS5rbIg9ud7/kur0qUeRQPQpuALVW6HfS92viNagH7k4/5ilVK wAGcB0ubRBhwgBDiDB9TzOdZj5r+tFL0pO35mcSmdEqb43VnOmqzkw+zbHkjYvYPWxTTeJcVcwO I+WUuxvhMPydotViYz3HbOi2jw7aeEB+Duyct8VYRVw== X-Gm-Gg: ASbGncvvxhonUE3cL8zd34TQnhHz68NwXAlMjxMtpWQ+nv5eegvbIRsT0HbsyYPkMzV eBBxX50KN6JozLBWIcJOG8tf2XNuuISsgGYNk6pSychUxgQO4byE6Nr3DRjWRoROzRC6Aw7Xxww 1colYudryUlJzn/P8541tI7O4MsmJax6ab8bA76ANM3DF+w5C3keAGXk8uvNZeoap/FR5Jx67Cz QNeMufn6mCuE0cCfHQacXmPcvsOLHck4IBLv7IUG0mp+klMBwbjoPbdaXNAoJ5GM9rE4G0= X-Google-Smtp-Source: AGHT+IEPDQvdK8EfzHqiyE3JbR7QlYguD+eGXYLCIlONnXv2gLAFeIO+aTdwG+tCzpFzmuX8xS/tmnqJS++4OK3bJ6k= X-Received: by 2002:a17:90b:4c45:b0:341:3ea2:b625 with SMTP id 98e67ed59e1d1-3475ebfa712mr7225881a91.12.1764168362562; Wed, 26 Nov 2025 06:46:02 -0800 (PST) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 References: <6925d6af.3b42c.336a0065@gitrepo.freebsd.org> In-Reply-To: From: Warner Losh Date: Wed, 26 Nov 2025 07:45:51 -0700 X-Gm-Features: AWmQ_bktBBg2t8ywe5zhjzVVWMqwQ3d8gEH854O7zn6LSD0gSVyS4dvNWFTURn8 Message-ID: Subject: Re: git: 301b8a806f79 - main - nvme: Minor style(9) fixes To: Konstantin Belousov Cc: Warner Losh , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="000000000000932612064480742d" X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4dGj6m5wnFz3K9s --000000000000932612064480742d Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Nov 26, 2025 at 5:06=E2=80=AFAM Konstantin Belousov wrote: > On Tue, Nov 25, 2025 at 04:17:51PM +0000, Warner Losh wrote: > > The branch main has been updated by imp: > > > > URL: > https://cgit.FreeBSD.org/src/commit/?id=3D301b8a806f79292ee3324ca938a4d93= 8df1911e8 > > > > commit 301b8a806f79292ee3324ca938a4d938df1911e8 > > Author: Warner Losh > > AuthorDate: 2025-11-25 16:10:23 +0000 > > Commit: Warner Losh > > CommitDate: 2025-11-25 16:12:51 +0000 > > > > nvme: Minor style(9) fixes > > > > needs to be first after . And we don't > need > > both sys/param.h and sys/types.h. > > We do not both sys/param.h and sys/systm.h as well, since sys/systm.h > includes sys/param.h. > Style(9): Kernel include files (sys/*.h) come first. If either or is needed, include it before other include files. ( includes ; do not include both.) Next, include , if needed. The remaining kernel headers should be sorted alphabetically. Should I update it to say just include systm.h over param.h over types.h? Or is there some other rule to follow that we should document? A quick survey suggests this is often the case, but a large minority of the time both or even all three are included. However, in this case, I needed to keep it separate because nvme.h is included by userland and I thought systm.h was kernel only (without checking)... but systm.h does seem to have all the proper guards to make that ok... Warner --000000000000932612064480742d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Wed, Nov 26,= 2025 at 5:06=E2=80=AFAM Konstantin Belousov <kostikbel@gmail.com> wrote:
On Tue, Nov 25, 2025 at 04:17:51PM +0000, = Warner Losh wrote:
> The branch main has been updated by imp:
>
> URL: https://= cgit.FreeBSD.org/src/commit/?id=3D301b8a806f79292ee3324ca938a4d938df1911e8<= /a>
>
> commit 301b8a806f79292ee3324ca938a4d938df1911e8
> Author:=C2=A0 =C2=A0 =C2=A0Warner Losh <imp@FreeBSD.org>
> AuthorDate: 2025-11-25 16:10:23 +0000
> Commit:=C2=A0 =C2=A0 =C2=A0Warner Losh <imp@FreeBSD.org>
> CommitDate: 2025-11-25 16:12:51 +0000
>
>=C2=A0 =C2=A0 =C2=A0nvme: Minor style(9) fixes
>=C2=A0 =C2=A0 =C2=A0
>=C2=A0 =C2=A0 =C2=A0<sys/systm.h> needs to be first after <sys= /param.h>. And we don't need
>=C2=A0 =C2=A0 =C2=A0both sys/param.h and sys/types.h.

We do not both sys/param.h and sys/systm.h as well, since sys/systm.h
includes sys/param.h.

=C2=A0 =C2=A0 =C2=A0Kernel includ= e files (sys/*.h) come first.=C2=A0 If either <sys/types.h> or
=C2= =A0 =C2=A0 =C2=A0<sys/param.h> is needed, include it before other inc= lude files.
=C2=A0 =C2=A0 =C2=A0(<sys/param.h> includes <sys/ty= pes.h>; do not include both.) Next,
=C2=A0 =C2=A0 =C2=A0include <s= ys/systm.h>, if needed.=C2=A0 The remaining kernel headers should be
= =C2=A0 =C2=A0 =C2=A0sorted alphabetically.

Should I = update it to say just include systm.h over param.h over types.h? Or is ther= e some other rule to follow that we should document? A quick survey suggest= s this is often the case, but a large minority of the time both or even all= three are included.

However, in this case, I need= ed to keep it separate because nvme.h is included by userland and I thought= systm.h was kernel only (without checking)... but systm.h does seem to hav= e all the proper guards to make that ok...

Warner= =C2=A0
--000000000000932612064480742d-- From nobody Wed Nov 26 15:01:00 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dGjSG53zmz6J9lb; Wed, 26 Nov 2025 15:01:18 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4dGjSG1MDFz3LGY; Wed, 26 Nov 2025 15:01:18 +0000 (UTC) (envelope-from kostikbel@gmail.com) 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 5AQF10Jb069647; Wed, 26 Nov 2025 17:01:03 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 5AQF10Jb069647 Received: (from kostik@localhost) by tom.home (8.18.1/8.18.1/Submit) id 5AQF1051069646; Wed, 26 Nov 2025 17:01:00 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 26 Nov 2025 17:01:00 +0200 From: Konstantin Belousov To: Warner Losh Cc: Warner Losh , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 301b8a806f79 - main - nvme: Minor style(9) fixes Message-ID: References: <6925d6af.3b42c.336a0065@gitrepo.freebsd.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spamd-Bar: ---- 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-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4dGjSG1MDFz3LGY On Wed, Nov 26, 2025 at 07:45:51AM -0700, Warner Losh wrote: > On Wed, Nov 26, 2025 at 5:06 AM Konstantin Belousov > wrote: > > > On Tue, Nov 25, 2025 at 04:17:51PM +0000, Warner Losh wrote: > > > The branch main has been updated by imp: > > > > > > URL: > > https://cgit.FreeBSD.org/src/commit/?id=301b8a806f79292ee3324ca938a4d938df1911e8 > > > > > > commit 301b8a806f79292ee3324ca938a4d938df1911e8 > > > Author: Warner Losh > > > AuthorDate: 2025-11-25 16:10:23 +0000 > > > Commit: Warner Losh > > > CommitDate: 2025-11-25 16:12:51 +0000 > > > > > > nvme: Minor style(9) fixes > > > > > > needs to be first after . And we don't > > need > > > both sys/param.h and sys/types.h. > > > > We do not both sys/param.h and sys/systm.h as well, since sys/systm.h > > includes sys/param.h. > > > > Style(9): > Kernel include files (sys/*.h) come first. If either or > is needed, include it before other include files. > ( includes ; do not include both.) Next, > include , if needed. The remaining kernel headers should > be > sorted alphabetically. > > Should I update it to say just include systm.h over param.h over types.h? > Or is there some other rule to follow that we should document? A quick > survey suggests this is often the case, but a large minority of the time > both or even all three are included. I do not see why sys/systm.h alone is not enough. I.e., if sys/systm.h is included (first), then sys/param.h, sys/types.h, sys/queue.h and several others are not needed. This is really not matter of style, but a reasonable use of includes. We cannot remove any of these nested includes from sys/systm.h practically, so consumers can rely on it. > > However, in this case, I needed to keep it separate because nvme.h is > included by userland and I thought systm.h was kernel only (without > checking)... but systm.h does seem to have all the proper guards to make > that ok... Yes, I saw the #ifdef _KERNEL complications, but they are not. From nobody Wed Nov 26 15:18:39 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dGjrH4Yngz6JBwn for ; Wed, 26 Nov 2025 15:18:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dGjrH1HMJz3MyV for ; Wed, 26 Nov 2025 15:18:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764170319; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GlmLtn3F0w40A6I6TfJLBriUv2/JBvW61Fm+4/Spet8=; b=nOg8beC1jXTn9jFlklv8KS+avi9DwEgxDMePxf4rL+CQjhWLEUS3pHuc8nd58MVtzwxwUS 6SOFErcjhKm3JrmYw8VRcn4Ak2bujgF2qg+AglgOU8QVDLkbZE8F5CPhM280EDiZKV8WNY 5z1vFa1JhhpLEtoLsVpr+7FIooh6UJf260rAynXZrIr2yXhABpN7FiHoi7Rr5py3tNbdC5 p+W0Ph1NFB6QEHX5OiIvXfWR7xKzDQhSqrWi3koDipfzE/ypBMTODNzZ4qkhUOidVca1Qf Iad1kV9nRQgPVkGkk1EcEfFZ0Hzn0K0nyO/cit/I05trYAW0mb0IDLsl1udAcg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764170319; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GlmLtn3F0w40A6I6TfJLBriUv2/JBvW61Fm+4/Spet8=; b=EmM/eKtWnspUvDjrpT7rq9y9oX/Y0oK0naTqPHPS3y+to0W+Z3CjpqBCHKJ6jLfTOwA3ky 9ZEYfWQJq5BaRAl6gQKUihAuQ9u8rTvq0QB3a6urg56zJqha3rS9TTDHCSRHdg27c/Fb2R hpEvcWhYsQdTMt2TsnQnEIaC3S2H/ttiXmgy5QTIoubk5P5hxG1qqIdj4QALlBlMhKGyv2 prXbOvRfB7stMRgVSAgUsmkutxm1Sty9qeL3taykoGtdu5y6DyCsl2LXlzHzrVQPuM5G4H rmgegnq89UXP5U/aaJOE8zWCCNoMzQG7RUE3x5pFJQdtgbN8K+g0bjB1IxeWfw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764170319; a=rsa-sha256; cv=none; b=sKiH167QwxE5EDtXA5Mv0O7nMxEsnYaqTr93fCoGWKqWqHXsezqHlf/PtYGyENRcH++JiU P2XfboMrlsBgKr6UOU+wXktz3lbUebW+OFSCVQhgM6rCWnYUsxFPxpEa2I2G+tKmzmee0Z QiuXdw5/JqC1ZMSY+eIhUnrsFavUibzbjcIqnlSQvFQ7fNNMx0/ef4YTE7LTYH0jvkPX3M 9csUj/0Kf3O2yu+AHxFAFUlvezaEPev3XQWnDJqm8zlrIiIHPxz/GjemdM+nO/Ftj0p7bi xm6AP0/YLSLxHrPas5v+PtkOhdXyouv8AwHUQcU3i+7IV2Tpn7tV89yg2mlAWg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dGjrH0ljczrrd for ; Wed, 26 Nov 2025 15:18:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 30087 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 26 Nov 2025 15:18:39 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Cy Schubert Subject: git: eda1756d0454 - main - ipfilter: Verify frentry on entry into kernel List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: eda1756d0454f9383940dc825cf571ff67e0c013 Auto-Submitted: auto-generated Date: Wed, 26 Nov 2025 15:18:39 +0000 Message-Id: <69271a4f.30087.75dc3092@gitrepo.freebsd.org> The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=eda1756d0454f9383940dc825cf571ff67e0c013 commit eda1756d0454f9383940dc825cf571ff67e0c013 Author: Cy Schubert AuthorDate: 2025-10-29 17:23:23 +0000 Commit: Cy Schubert CommitDate: 2025-11-26 15:16:46 +0000 ipfilter: Verify frentry on entry into kernel The frentry struct is built by ipf(8), specifically ipf_y.y when parsing the ipfilter configuration file (typically ipf.conf). frentry contains a variable length string field at the end of the struct. This data field, called fr_names, may contain various text strings such as NIC names, destination list (dstlist) names, and filter rule comments. The length field specifies the length of fr_names within the frentry structure and fr_size specifies the size of the frentry structure itself. The upper bound limit to the length of strings field is controlled by the fr_max_namelen sysctl/kenv or the max_namelen ipfilter tuneable. The initial concepts were discussed with emaste and jrm. Reported by: Ilja Van Sprundel Reviewed by: markj MFC after: 1 week Differential revision: https://reviews.freebsd.org/D53843 --- sbin/ipf/libipf/interror.c | 5 +++ sys/netpfil/ipfilter/netinet/fil.c | 61 +++++++++++++++++++++++++++++++-- sys/netpfil/ipfilter/netinet/ip_fil.h | 1 + sys/netpfil/ipfilter/netinet/mlfk_ipl.c | 1 + 4 files changed, 66 insertions(+), 2 deletions(-) diff --git a/sbin/ipf/libipf/interror.c b/sbin/ipf/libipf/interror.c index a8dc3be2d5d1..4d48825bb3ad 100644 --- a/sbin/ipf/libipf/interror.c +++ b/sbin/ipf/libipf/interror.c @@ -177,6 +177,11 @@ static ipf_error_entry_t ipf_errors[] = { { 149, "object size validation failed for kernel copyout" }, { 150, "error copying data out for kernel copyout" }, { 151, "version mismatch for kernel copyout" }, + { 152, "fr_names offset is wrapped negative" }, + { 153, "fr_names larger than fr_namelen" }, + { 154, "frentry larger than fr_size" }, + { 155, "frentry and fr_namelen mismatch fr_size" }, + { 156, "fr_namelen too large" }, /* -------------------------------------------------------------------------- */ { 10001, "could not find token for auth iterator" }, { 10002, "write permissions require to add/remove auth rule" }, diff --git a/sys/netpfil/ipfilter/netinet/fil.c b/sys/netpfil/ipfilter/netinet/fil.c index d487cdde20d8..0de5378322df 100644 --- a/sys/netpfil/ipfilter/netinet/fil.c +++ b/sys/netpfil/ipfilter/netinet/fil.c @@ -363,6 +363,10 @@ static ipftuneable_t ipf_main_tuneables[] = { "ip_timeout", 1, 0x7fffffff, stsizeof(ipf_main_softc_t, ipf_iptimeout), 0, NULL, ipf_settimeout }, + { { (void *)offsetof(ipf_main_softc_t, ipf_max_namelen) }, + "max_namelen", 0, 0x7fffffff, + stsizeof(ipf_main_softc_t, ipf_max_namelen), + 0, NULL, NULL }, #if defined(INSTANCES) && defined(_KERNEL) { { (void *)offsetof(ipf_main_softc_t, ipf_get_loopback) }, "intercept_loopback", 0, 1, @@ -4399,7 +4403,8 @@ int frrequest(ipf_main_softc_t *softc, int unit, ioctlcmd_t req, caddr_t data, int set, int makecopy) { - int error = 0, in, family, need_free = 0; + int error = 0, in, family, need_free = 0, interr, i; + int interr_tbl[3] = { 152, 156, 153}; enum { OP_ADD, /* add rule */ OP_REM, /* remove rule */ OP_ZERO /* zero statistics and counters */ } @@ -4408,7 +4413,9 @@ frrequest(ipf_main_softc_t *softc, int unit, ioctlcmd_t req, caddr_t data, void *ptr, *uptr; u_int *p, *pp; frgroup_t *fg; - char *group; + char *group, *name; + size_t v_fr_size, v_element_size; + int v_rem_namelen, v_fr_toend; ptr = NULL; fg = NULL; @@ -4423,6 +4430,17 @@ frrequest(ipf_main_softc_t *softc, int unit, ioctlcmd_t req, caddr_t data, IPFERROR(6); return (EINVAL); } + if (fp->fr_size < sizeof(frd)) { + return (EINVAL); + } + if (sizeof(frd) + fp->fr_namelen != fp->fr_size ) { + IPFERROR(155); + return (EINVAL); + } + if (fp->fr_namelen < 0 || fp->fr_namelen > softc->ipf_max_namelen) { + IPFERROR(156); + return (EINVAL); + } KMALLOCS(f, frentry_t *, fp->fr_size); if (f == NULL) { IPFERROR(131); @@ -4449,6 +4467,44 @@ frrequest(ipf_main_softc_t *softc, int unit, ioctlcmd_t req, caddr_t data, fp->fr_ptr = NULL; fp->fr_ref = 0; fp->fr_flags |= FR_COPIED; + + for (i = 0; i <= 3; i++) { + if ((interr = ipf_check_names_string(fp->fr_names, fp->fr_namelen, fp->fr_ifnames[i])) != 0) { + IPFERROR(interr_tbl[interr-1]); + error = EINVAL; + goto donenolock; + } + } + if ((interr = ipf_check_names_string(fp->fr_names, fp->fr_namelen, fp->fr_comment)) != 0) { + IPFERROR(interr_tbl[interr-1]); + error = EINVAL; + goto donenolock; + } + if ((interr = ipf_check_names_string(fp->fr_names, fp->fr_namelen, fp->fr_group)) != 0) { + IPFERROR(interr_tbl[interr-1]); + error = EINVAL; + goto donenolock; + } + if ((interr = ipf_check_names_string(fp->fr_names, fp->fr_namelen, fp->fr_grhead)) != 0) { + IPFERROR(interr_tbl[interr-1]); + error = EINVAL; + goto donenolock; + } + if ((interr = ipf_check_names_string(fp->fr_names, fp->fr_namelen, fp->fr_tif.fd_name)) != 0) { + IPFERROR(interr_tbl[interr-1]); + error = EINVAL; + goto donenolock; + } + if ((interr = ipf_check_names_string(fp->fr_names, fp->fr_namelen, fp->fr_rif.fd_name)) != 0) { + IPFERROR(interr_tbl[interr-1]); + error = EINVAL; + goto donenolock; + } + if ((interr = ipf_check_names_string(fp->fr_names, fp->fr_namelen, fp->fr_dif.fd_name)) != 0) { + IPFERROR(interr_tbl[interr-1]); + error = EINVAL; + goto donenolock; + } } else { fp = (frentry_t *)data; if ((fp->fr_type & FR_T_BUILTIN) == 0) { @@ -9040,6 +9096,7 @@ ipf_main_soft_create(void *arg) #endif softc->ipf_minttl = 4; softc->ipf_icmpminfragmtu = 68; + softc->ipf_max_namelen = 128; softc->ipf_flags = IPF_LOGGING; #ifdef LARGE_NAT diff --git a/sys/netpfil/ipfilter/netinet/ip_fil.h b/sys/netpfil/ipfilter/netinet/ip_fil.h index ad6128d9a8e2..7b070f0d6867 100644 --- a/sys/netpfil/ipfilter/netinet/ip_fil.h +++ b/sys/netpfil/ipfilter/netinet/ip_fil.h @@ -1529,6 +1529,7 @@ typedef struct ipf_main_softc_s { int ipf_pass; int ipf_minttl; int ipf_icmpminfragmtu; + int ipf_max_namelen; int ipf_interror; /* Should be in a struct that is per */ /* thread or process. Does not belong */ /* here but there's a lot more work */ diff --git a/sys/netpfil/ipfilter/netinet/mlfk_ipl.c b/sys/netpfil/ipfilter/netinet/mlfk_ipl.c index 1c3051fb6615..d558b2d24b2c 100644 --- a/sys/netpfil/ipfilter/netinet/mlfk_ipl.c +++ b/sys/netpfil/ipfilter/netinet/mlfk_ipl.c @@ -135,6 +135,7 @@ SYSCTL_IPF(_net_inet_ipf, OID_AUTO, fr_running, CTLFLAG_RD, SYSCTL_IPF(_net_inet_ipf, OID_AUTO, fr_chksrc, CTLFLAG_RW, &VNET_NAME(ipfmain.ipf_chksrc), 0, ""); SYSCTL_IPF(_net_inet_ipf, OID_AUTO, fr_minttl, CTLFLAG_RW, &VNET_NAME(ipfmain.ipf_minttl), 0, ""); SYSCTL_IPF(_net_inet_ipf, OID_AUTO, large_nat, CTLFLAG_RDTUN | CTLFLAG_NOFETCH, &VNET_NAME(ipfmain.ipf_large_nat), 0, "large_nat"); +SYSCTL_IPF(_net_inet_ipf, OID_AUTO, fr_max_namelen, CTLFLAG_RWTUN, &VNET_NAME(ipfmain.ipf_max_namelen), 0, "max_namelen"); #define CDEV_MAJOR 79 #include From nobody Wed Nov 26 15:18:40 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dGjrJ4nG4z6JC3f for ; Wed, 26 Nov 2025 15:18:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dGjrJ2H2Lz3Ml4 for ; Wed, 26 Nov 2025 15:18:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764170320; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hKLGr9WeGjkKsCsB7z2aKiKLzrOCaK7PLsoYVnkIieI=; b=XRXYQda+QCUpHyIOizJnoK/f/RUuInPoKUpqu9AFSgfeiFpT7HpTX8BAMYff0UD7jigUr7 f+D6R6EleAnzeNH1JNeNdhRDSb+o0eZwxhcAPjO3DFLVdbOA19hlntdhaMrBcmTwFU4k1X LTCHBgA2TX05TWy1R0GaFB14t7Uoc25uX+TihX6ws+Qk1s7Uw49LNztdNHh1PKR08dPCCz oPQXALalUcqDqrJOdjUgsqMOdSgeiZMm+xrXLywaH5Zc88mEACDmQGysyrYQal+AB6pWpL U2qqOiEjFe0hB5KJJdlyurI6acVQZCJY8L6jO1gRm5UYhX2MH+TcyoV+UsD4OA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764170320; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hKLGr9WeGjkKsCsB7z2aKiKLzrOCaK7PLsoYVnkIieI=; b=NsmH/Mdvary5UbHnZUjRHtS85xauHY93Diqemh+Do1TUgOHLBHflS401x9k5in/UJ1XhBn Noy/Ywbihwle92j6YXuUbncfbP9NbwKcFvrMFzrlyhJ3+0O0GjzWsAtzBj1La5/LfqqDY4 227P3KClCEOfb4+yCcbLtmU3t3s0370gsnPw5/5ndFOADTwXK+FZW7VdrzZd0yB1+iNreh qNnyeIZ91yQtXW9ij23kJ01NC6CeqR2TkGyKz+Z4D05AtoKbAtz23+EkCCShBQDWjqhEkx Np0wBMZOAJvQgFfl5u0JAt+4NaIpaGIflKZnzyLezwsML4N2YYZHb5Mt7EAPcA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764170320; a=rsa-sha256; cv=none; b=Dv5ie2W9+jRD5Y3lcFuAy5Jm37fimhWS1mlsjBwpo2S/McpP/J5IXTDcOi3w5OAdSPkXHG 5X3UoL/XLtupIq0ivN75akQnw+oa19J/pO724GdpmLAe9l+PlqlnIvk6s85WsRViF0uMyt dpb9yh1R3xfxVb0wS6uVNJmutx/bAfC2o1R343EtkIOllpSKCAlhzAO9i222cvjd/5kY8I yPCmvJGyOrUiAAdBOXKyhvL01X7KF/4DCJPY4dLkXj1iKYQdJ2ESNQvfLdaejZvB6/AzCp efmgUfQbgKuKiPlcVp/z+S1WSdndeWHSz1GH6CYJU0Rip3tU2JDZ6JdtorsZCA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dGjrJ1bZ6zrrf for ; Wed, 26 Nov 2025 15:18:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2d16b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 26 Nov 2025 15:18:40 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Cy Schubert Subject: git: 821774dfbdaa - main - ipfilter: Verify ipnat on entry into kernel List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 821774dfbdaa12ef072ff7eaea8f9966a7e63935 Auto-Submitted: auto-generated Date: Wed, 26 Nov 2025 15:18:40 +0000 Message-Id: <69271a50.2d16b.65aa5942@gitrepo.freebsd.org> The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=821774dfbdaa12ef072ff7eaea8f9966a7e63935 commit 821774dfbdaa12ef072ff7eaea8f9966a7e63935 Author: Cy Schubert AuthorDate: 2025-11-03 04:59:15 +0000 Commit: Cy Schubert CommitDate: 2025-11-26 15:16:47 +0000 ipfilter: Verify ipnat on entry into kernel The ipnat struct is built by ipnat(8), specifically ipnat_y.y when parsing the ipnat configuration file (typically ipnat.conf). ipnat contains a variable length string field at the end of the struct. This data field, called in_names, may contain various text strings such as NIC names. There is no upper bound limit to the length of strings as long as the in_namelen length field specifies the length of in_names within the ipnat structure and in_size specifies the size of the ipnat structure itself. Reported by: Ilja Van Sprundel Reviewed by: markj MFC after: 1 week Differential revision: https://reviews.freebsd.org/D53843 --- sbin/ipf/libipf/interror.c | 6 +++++ sys/netpfil/ipfilter/netinet/ip_nat.c | 42 ++++++++++++++++++++++++++++++++++- 2 files changed, 47 insertions(+), 1 deletion(-) diff --git a/sbin/ipf/libipf/interror.c b/sbin/ipf/libipf/interror.c index 4d48825bb3ad..6d5391f58ba2 100644 --- a/sbin/ipf/libipf/interror.c +++ b/sbin/ipf/libipf/interror.c @@ -363,6 +363,12 @@ log" }, { 60074, "unknown next address type (ipv6)" }, { 60075, "one object at a time must be copied" }, { 60076, "NAT ioctl denied in jail without VNET" }, + { 60077, "in_names offset is wrapped negative" }, + { 60078, "in_names larger than in_namelen" }, + { 60079, "ipnat larger than in_size" }, + { 60080, "ipnat and in_namelen mismatch in_size" }, + { 60081, "ip_names runs off the end of ipnat" }, + { 60082, "in_namelen too large" }, /* -------------------------------------------------------------------------- */ { 70001, "incorrect object size to get pool stats" }, { 70002, "could not malloc memory for new pool node" }, diff --git a/sys/netpfil/ipfilter/netinet/ip_nat.c b/sys/netpfil/ipfilter/netinet/ip_nat.c index 53c180cdfbca..44ab7e9283de 100644 --- a/sys/netpfil/ipfilter/netinet/ip_nat.c +++ b/sys/netpfil/ipfilter/netinet/ip_nat.c @@ -974,9 +974,13 @@ ipf_nat_ioctl(ipf_main_softc_t *softc, caddr_t data, ioctlcmd_t cmd, int mode, int uid, void *ctx) { ipf_nat_softc_t *softn = softc->ipf_nat_soft; - int error = 0, ret, arg, getlock; + int error = 0, ret, arg, getlock, interr, i; + int interr_tbl[3] = { 60077, 60081, 60078 }; ipnat_t *nat, *nt, *n; ipnat_t natd; + char *name; + size_t v_in_size, v_element_size; + int v_rem_namelen, v_in_toend; SPL_INT(s); #if !SOLARIS && defined(_KERNEL) @@ -1027,6 +1031,16 @@ ipf_nat_ioctl(ipf_main_softc_t *softc, caddr_t data, ioctlcmd_t cmd, error = EINVAL; goto done; } + if (sizeof(natd) + natd.in_namelen != natd.in_size) { + IPFERROR(60080); + error = EINVAL; + goto done; + } + if (natd.in_namelen < 0 || natd.in_namelen > softc->ipf_max_namelen) { + IPFERROR(60082); + error = EINVAL; + goto done; + } KMALLOCS(nt, ipnat_t *, natd.in_size); if (nt == NULL) { IPFERROR(60070); @@ -1041,6 +1055,32 @@ ipf_nat_ioctl(ipf_main_softc_t *softc, caddr_t data, ioctlcmd_t cmd, nat = nt; } + /* + * Validate the incoming ipnat_t. + */ + if ((interr = ipf_check_names_string(nat->in_names, nat->in_namelen, nat->in_ifnames[0])) != 0) { + IPFERROR(interr_tbl[interr-1]); + error = EINVAL; + goto done; + } + if (nat->in_ifnames[0] != nat->in_ifnames[1]) { + if ((interr = ipf_check_names_string(nat->in_names, nat->in_namelen, nat->in_ifnames[1])) != 0) { + IPFERROR(interr_tbl[interr-1]); + error = EINVAL; + goto done; + } + } + if ((interr = ipf_check_names_string(nat->in_names, nat->in_namelen, nat->in_plabel)) != 0) { + IPFERROR(interr_tbl[interr-1]); + error = EINVAL; + goto done; + } + if ((interr = ipf_check_names_string(nat->in_names, nat->in_namelen, nat->in_pconfig)) != 0) { + IPFERROR(interr_tbl[interr-1]); + error = EINVAL; + goto done; + } + /* * For add/delete, look to see if the NAT entry is * already present From nobody Wed Nov 26 15:18:37 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dGjrM25MNz6JBks for ; Wed, 26 Nov 2025 15:18:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dGjrM0VPhz3N01 for ; Wed, 26 Nov 2025 15:18:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764170323; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/TS1WK6iNcj7IkdEcCVN8Zv/9zRomS5tOt/Y8ftjArQ=; b=hDQV7htZol0T+mYiiXoPqjNdhNGnCcSrX9Q2Ljl2UiWqRQdbWKKfyKz9llK7ciYbgFRLC5 hhuyf5FVfBUhz9B8uyi0lluHiHympvKBDqXJbMgBLiPiWU0G4BTolj8allwNyh5os08kkL 11SnrXqcPhriu/HJlP7TETo74o25Wq9iTJXLVpKzQ23Oka5h+OlwFdYMK7vXauu0/9/PPY nDLLh8rnEwtmhxGc9noBEF9jyRa6jB/j+lWzdxiOEz/psTNEqXtKeOAtqoOVMjmg0OKskj nE745NV95gopj/eUyZcb+EsWozIlsXcYAy/CIUyX/jPC6w4Y3netOUMbisgnPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764170323; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/TS1WK6iNcj7IkdEcCVN8Zv/9zRomS5tOt/Y8ftjArQ=; b=uFyRmM+vrEAvBZ6GQmb9vuA9HQyGtvR0L93VxO2NX42Iej+fy5EjmE6hTffhPtQ91Wpgim wkR6X+PClNDRDYmUwa1Y/dLDDbifzKkPJ5/8Y2TQuYvhRah1pLno1Voih7MLS0dxjhrDkB aNfPN60XxtGpDZnQk+sTJe/bc9nn6kwmDjCfjBNPGPibtjDbn9d7+m2Dq2Wuj+bvqmG4sU d/waJVwResfl/uBsrtJxXMxD7ns7dwID/eCHFOA3eUl7NUREXt+jJSdrgPPIRwY2a7tS4m RKQxmEkhMr9ORzHrupusBtT2zszgYohrcP1ht5oRC9HeF+YJLDLs4eB5ylIMPA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764170323; a=rsa-sha256; cv=none; b=BPIA8i8k3ZCBbLGKyGlp8MAmlUoGCsRAk+6J0LNfbiI4Xnow34agZMKI3xx6L+9nGbwua5 ZZ1iKNgSgXopUrwGKH26LiT1WPzKB7jDqg10lgzNjqWm5TV+dylujinIecRZyDfNMRjwIV C81xqlI+G8AZqZSdQ54H1X7UyiZeQhP2cTjL8X++69og036YTrNQCPGq6klk8ObLZOUBRz a7fFN0B9YbQbdropExhPEaJE7t+7HsUrGXFXtHvbx0S0ajMh7sRQdB53udGHCSgiFw484D vaRI5xubH1vkuGO5K+6L3GV4/JTa06vsTB/ixcZqQ4T7cy3dKBhUG6KcWokNug== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dGjrM053CzsPn for ; Wed, 26 Nov 2025 15:18:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 30083 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 26 Nov 2025 15:18:37 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Cy Schubert Subject: git: 525c535d5aa8 - main - ipfilter: Add ipf_check_names_string() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 525c535d5aa87f686dcfee620619827f7c6090db Auto-Submitted: auto-generated Date: Wed, 26 Nov 2025 15:18:37 +0000 Message-Id: <69271a4d.30083.4fe9a386@gitrepo.freebsd.org> The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=525c535d5aa87f686dcfee620619827f7c6090db commit 525c535d5aa87f686dcfee620619827f7c6090db Author: Cy Schubert AuthorDate: 2025-11-18 19:23:06 +0000 Commit: Cy Schubert CommitDate: 2025-11-26 15:15:44 +0000 ipfilter: Add ipf_check_names_string() ipf_check_names_string will verify userland inputs in names strings (fr.fr_names, in.in_names) for correctness. Original concept of ipf_check_names_string() instead of macros by markj. Reviewed by: markj MFC after: 1 week Differential revision: https://reviews.freebsd.org/D53843 --- sys/netpfil/ipfilter/netinet/fil.c | 31 +++++++++++++++++++++++++++++++ sys/netpfil/ipfilter/netinet/ip_fil.h | 1 + 2 files changed, 32 insertions(+) diff --git a/sys/netpfil/ipfilter/netinet/fil.c b/sys/netpfil/ipfilter/netinet/fil.c index 2fcea433295f..d487cdde20d8 100644 --- a/sys/netpfil/ipfilter/netinet/fil.c +++ b/sys/netpfil/ipfilter/netinet/fil.c @@ -9951,3 +9951,34 @@ ipf_inet6_mask_del(int bits, i6addr_t *mask, ipf_v6_masktab_t *mtab) ASSERT(mtab->imt6_max >= 0); } #endif + +/* ------------------------------------------------------------------------ */ +/* Function: ipf_check_names_string */ +/* Returns: int - 0 == success */ +/* - 1 == negative offset */ +/* - 2 == offset exceds namelen */ +/* - 3 == string exceeds the names string */ +/* Parameters: names - pointer to names string */ +/* namelen - total length of names string */ +/* offset - offset into names string */ +/* */ +/* Validate the names string (fr_names for ipfilter, in_names for ipnat). */ +/* ------------------------------------------------------------------------ */ +int +ipf_check_names_string(char *names, int namelen, int offset) +{ + const char *name; + size_t len; + + if (offset == -1) + return (0); + if (offset < 0) + return (1); + if (offset > namelen) + return (2); + name = &names[offset]; + len = strnlen(name, namelen - offset); + if (len == namelen - offset) + return (3); + return (0); +} diff --git a/sys/netpfil/ipfilter/netinet/ip_fil.h b/sys/netpfil/ipfilter/netinet/ip_fil.h index aa3d1de422db..ad6128d9a8e2 100644 --- a/sys/netpfil/ipfilter/netinet/ip_fil.h +++ b/sys/netpfil/ipfilter/netinet/ip_fil.h @@ -1859,5 +1859,6 @@ extern int ipf_ht_node_del(host_track_t *, int, i6addr_t *); extern void ipf_rb_ht_flush(host_track_t *); extern void ipf_rb_ht_freenode(host_node_t *, void *); extern void ipf_rb_ht_init(host_track_t *); +extern int ipf_check_names_string(char *, int, int); #endif /* __IP_FIL_H__ */ From nobody Wed Nov 26 15:35:16 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dGkCS5tz3z6JDHl for ; Wed, 26 Nov 2025 15:35:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dGkCS2gSDz3QDM for ; Wed, 26 Nov 2025 15:35:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764171316; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=z3kdVt5bgzhfAQwTOn+xHHBHCkEhv5Hg19qPSEazz5k=; b=tw9CM21oW3DYJOQFWdMnjGUohmsoSwWj+akTs1iGfr+Eze4Czz0XGo/MluyLrK7GYGOejO i0qV+9kdl55UASLv9ihVmevZHBdnRLOMZzP9Mi38fKHsnFj2C0KiGC1coTmhKYs/ESjRX+ +3hsrc8deAAi74XGti4yhqWPw920IzL4GG69abcoUNceLHgSsyAzD/i/RQxHthFSa5KRyb i7dzuLmlyIx578dq4Vm5tXocYbEZZ3eO6CKtAJAMUZ3VVH53ZvGCSklybko60SnA1AmlKD dXG9FaxsS2NFyKEvjBl9Twxi1AmTMdVXHytPAriUdVWrfYvGfOuQRhfBH5ZkqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764171316; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=z3kdVt5bgzhfAQwTOn+xHHBHCkEhv5Hg19qPSEazz5k=; b=aMT3bTocizUa/GF/gW4VcUaSNol4t4Ba0/JIMnTqwAsa5J3zGnHMqvyhmJSkvemSy0O0up ZXGQoLwyzMOJ+V/2rzHjomdYUAWvYz7xYxtFNrThQ290pJrVB5H1T8cHYVfz+ao58Wx4mR QVQbQqE06937eJFxnRIZoGf+lpa/sSfkFXXzelji10gUR9Bgx+nNVYK21viEN0CsifPcGm YLqs4aiDwHG0PFjHo+s7iZWrvl+uiRgFl5yDRrKzk0zpIvVdcEDMIskIcdYltXNjCxoiCf 71YE16hj6R3LPIPafx2ilJ7xzdwouCUNTX5RpspqjxXrZfYPq6n3vT/YcLThQA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764171316; a=rsa-sha256; cv=none; b=MpyzsYNmOgBlv9oY6cVGa6S2t4nekPH3gyMQwmhu3bnT9AVwJpo9FhFG+0cMUSOIF1BHi7 Wb4qaFc/4k2N0a0PjfLf69xboLMJwQNDk4DHeiLhiiqhKANJqwyHKfSHR0a7gFpknOdHg6 36a/gxiLquVdgAfe6nWlrNjXFNNFuM3M0GNVzdGhxYWCfDSSUEsGEcIRVz2g7j4Wue9UGF dnl4oE2v2WvxEcBVeptg3fjT01w2H7vuGOYV8OpFPPaoIrDx2OZvRKLtd3TVrpZSkoCUsS vabWHeL8WGcJ7UQxnWhqzRLLcRQrBKycvUvlTEywsvgmIFAsmPDkzg8q2vgiuQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dGkCS1rxszslv for ; Wed, 26 Nov 2025 15:35:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 313ef by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 26 Nov 2025 15:35:16 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Jose Luis Duran Subject: git: 5f2dd3dfd72d - stable/15 - local-unbound: Read a tab separated resolv.conf List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 5f2dd3dfd72da7b49d1f9a7f889437480aa6f19e Auto-Submitted: auto-generated Date: Wed, 26 Nov 2025 15:35:16 +0000 Message-Id: <69271e34.313ef.24dc7042@gitrepo.freebsd.org> The branch stable/15 has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=5f2dd3dfd72da7b49d1f9a7f889437480aa6f19e commit 5f2dd3dfd72da7b49d1f9a7f889437480aa6f19e Author: Jose Luis Duran AuthorDate: 2025-11-19 01:09:58 +0000 Commit: Jose Luis Duran CommitDate: 2025-11-26 15:33:29 +0000 local-unbound: Read a tab separated resolv.conf Use [[:space:]] rather than a white space character to delimit the keys and the values in the resolv.conf file. PR: 236079 Reviewed by: des MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D53811 (cherry picked from commit 0628400590e025b7db1c0905e6ee488a24ef3f60) --- usr.sbin/unbound/setup/local-unbound-setup.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/usr.sbin/unbound/setup/local-unbound-setup.sh b/usr.sbin/unbound/setup/local-unbound-setup.sh index 25cfef48b6f0..ec3aeb673ecc 100755 --- a/usr.sbin/unbound/setup/local-unbound-setup.sh +++ b/usr.sbin/unbound/setup/local-unbound-setup.sh @@ -118,8 +118,8 @@ set_chrootdir() { get_nameservers() { while read line ; do local bareline=${line%%\#*} - local key=${bareline%% *} - local value=${bareline#* } + local key=${bareline%%[[:space:]]*} + local value=${bareline#*[[:space:]]} case ${key} in nameserver) case ${value} in @@ -145,8 +145,8 @@ gen_resolv_conf() { local edns0=no while read line ; do local bareline=${line%%\#*} - local key=${bareline%% *} - local value=${bareline#* } + local key=${bareline%%[[:space:]]*} + local value=${bareline#*[[:space:]]} case ${key} in nameserver) case ${value} in From nobody Wed Nov 26 15:35:32 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dGkCn0MZpz6JDT6 for ; Wed, 26 Nov 2025 15: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dGkCm6ZpBz3QtZ for ; Wed, 26 Nov 2025 15: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=1764171332; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Cv/f7bFR+SBaSlr6xJl16C3cLddrViDZO+2dibKFrio=; b=RW+3QsD/eHwaFzBIySUiRnI1jn6Nl9+mE2yjYk3LwuZKs8PSHoLCJgJFMo1HB/QJQjiwnM VZCG6D5es9jx4TgXF3seM+3IO0/QyklQ3Rvj6vULymvy1xnvKUuBbMmd0uTtgXgbe9s7uW nDcXDQ3O0jeoF8T5q+DJQODy9QSlqaoMyY94xFx1OT3mCUcoV41RlSuSYuPehyPuaq6qVe YFLjtkzVnQWrKkhFi4kPu2qmm2OET3gDnspgbCEp/lZ4pViAHE5FcLumkXVM6MNxJzCKLu zzSJzd0hZEkCHxXidW7/5dqkP97o/UIMbIDehTmVvO/JzKUKpeR+M7APboip/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764171332; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Cv/f7bFR+SBaSlr6xJl16C3cLddrViDZO+2dibKFrio=; b=DiGYE8k97NIrAKovOcXULZL4kv1crDRXneBhkDWFac37fV4jAStkIB7d5uiaCI91gZAvIG qRrknPBnF3EV+YENuHZ22+PF/ymM3UvGz8JQXACk1xGM0JbFZeJkXM3hFGjIBLqKSGfQDI fehIKv11wALqZseXyJQhEIyu2U3+PplviB9RWyrcTYQ1gQ00EvuQbFqtiSRGpQ53I5UmgM YiEWlJlvSnxtGdjFIt2UmOvN7INH4+jcJxUnzl383dNcj38YnjN9n4kov7rUH5tw6dzjwC qgToqN7WWxMVJeRSr2/dchL/xOEZILHMZqArA8YmDAlN5Lsh7EIyABpBLv+AMQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764171332; a=rsa-sha256; cv=none; b=NRcZK1FbSHj5/bCEgcsUrn9GEKYBUF0iFqEHx04CORQNVOyg3c3OvRSRsPu8KNK0pQ6ajy ZOr2DELBhSD0UQgaUEQTU6FerqLKyG8Mquum+pIkxOcwINqDZoYtZ5MXfrIm0cORAbhlH/ t4GJiArvSJw899PvE+qmMeJ1Uj28wD8o42Ff0LCSbbTKCk8CCqZulq2JsSMLv+Jtm32SKn R+Jb6avGzYUDweboHUOe9Zw5+jMcGLv/68AI5/OJGFjs4iLTHRWfvW0l8fwKMdEWo35U75 0r8Xyn7LALhxEwgHLWJg9rV2EVke2KNTDcI2VehVc383DLhNWhpzu0KwKPtdCQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dGkCm5yN0zt05 for ; Wed, 26 Nov 2025 15:35:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 313f3 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 26 Nov 2025 15:35:32 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Jose Luis Duran Subject: git: 5a2f81012ab5 - stable/14 - local-unbound: Read a tab separated resolv.conf List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 5a2f81012ab56436813a6c86fb578cc3a686f078 Auto-Submitted: auto-generated Date: Wed, 26 Nov 2025 15:35:32 +0000 Message-Id: <69271e44.313f3.642e1db8@gitrepo.freebsd.org> The branch stable/14 has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=5a2f81012ab56436813a6c86fb578cc3a686f078 commit 5a2f81012ab56436813a6c86fb578cc3a686f078 Author: Jose Luis Duran AuthorDate: 2025-11-19 01:09:58 +0000 Commit: Jose Luis Duran CommitDate: 2025-11-26 15:34:40 +0000 local-unbound: Read a tab separated resolv.conf Use [[:space:]] rather than a white space character to delimit the keys and the values in the resolv.conf file. PR: 236079 Reviewed by: des MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D53811 (cherry picked from commit 0628400590e025b7db1c0905e6ee488a24ef3f60) --- usr.sbin/unbound/setup/local-unbound-setup.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/usr.sbin/unbound/setup/local-unbound-setup.sh b/usr.sbin/unbound/setup/local-unbound-setup.sh index 90e255204135..c15ce96e1cfe 100755 --- a/usr.sbin/unbound/setup/local-unbound-setup.sh +++ b/usr.sbin/unbound/setup/local-unbound-setup.sh @@ -118,8 +118,8 @@ set_chrootdir() { get_nameservers() { while read line ; do local bareline=${line%%\#*} - local key=${bareline%% *} - local value=${bareline#* } + local key=${bareline%%[[:space:]]*} + local value=${bareline#*[[:space:]]} case ${key} in nameserver) case ${value} in @@ -145,8 +145,8 @@ gen_resolv_conf() { local edns0=no while read line ; do local bareline=${line%%\#*} - local key=${bareline%% *} - local value=${bareline#* } + local key=${bareline%%[[:space:]]*} + local value=${bareline#*[[:space:]]} case ${key} in nameserver) case ${value} in From nobody Wed Nov 26 15:35:50 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dGkD70YLKz6JDQl for ; Wed, 26 Nov 2025 15:35:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dGkD65Mrhz3RDp for ; Wed, 26 Nov 2025 15:35:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764171350; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ym1A1eEnWogAO+E6YVlcLyRa8rCvqbtBzbj9QsjLkOg=; b=pYlzdNuqm4jhkLRn980/1oSZmGegCQMIC8OJdRFYRuxTpzHX7uUTOtPY85SORNisH0z4G0 9s+eJzVHgKaiT0ysWYaMIwXwqG7xUP48A7ZHhi8cW0THbjWGAV8+yRxdLZowws52LSUkau /z7D4/6gS540jyvX2+KNU1223cXo/Px8RxN6SomtFCbSYqQao+t/oC36jErnUmKp9RkcQo HyJviYx8hpT6rs70dGplKpoL2OzK1iIr0+1ga92t+AclFnYIkR45b/XZhmX58di87T8skl xRlfPqbXQze9N9Uug+MwjvtQ5RH64Km0nI9U2+yRx17oQp1UHlwttqIoguz0Ug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764171350; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ym1A1eEnWogAO+E6YVlcLyRa8rCvqbtBzbj9QsjLkOg=; b=ZtnUX8bv2Zk+HAA49+XwMvC6LmliqpvkbNRRB0U5kAQOw09vYvfJyS/hgQSWNvxphFxUHe mLxkQnKcgaO8MrbNLyS+/Zpv8Jda0jE0uG25KSbUzR2a/gIXoDwcxO/wD1R2D3dSAY1wcu sK0YUN0ivuKSojzVyf42NvFHAT7V56l1h9oHJk/NALgmZRYSK2CXEOkkL9/Rxp5fHajFtN fzlBlIEsRGdvebWAHDOgT9qvG2sT+JRwNEkqFIdZ3XA6fFUlaQDTI/80vdIl7OV067f7vJ wxJph3KSrPVFPdDuSyY1CkGaIKLwI0jTqJP55//t4Pp0UuEe5yOckkrRoVO3SQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764171350; a=rsa-sha256; cv=none; b=vU7skDkn60kkhflK89bkllI4uB2NjDT6S3hUj1xDscS6caHXh/6eg7zqi8Yvr5jkHXqzGn vNMVRCRSHhN/7v3Qg7U8TuCLxD2dXRoDJgNwSTudw/fG7bl0saBfHF0yfdpU6ZuLulcCwP +0EduK0G6naP9mQeDXGWDAZJIyRJdbkhqGpM51u6kgNo2BJL9ZZgwr+KOUkgkY+5BisvOK E6wYQ+9JfovgIhtqHMWs5x4lQEeftZU+3i146+gd7remCjWjpvTCi460MRvNEDFh+U1GOL HVL3ZLO79sxMlKmdI6oUMLm4mWx7W82o64aGbVI5PXFiJuehNS3WuJoS8tFYwA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dGkD64z6szsm1 for ; Wed, 26 Nov 2025 15:35:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 30f4e by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 26 Nov 2025 15:35:50 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Jose Luis Duran Subject: git: 111b60a2fddc - stable/13 - local-unbound: Read a tab separated resolv.conf List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 111b60a2fddca6051c6e782c4a9a4da258ed4cdf Auto-Submitted: auto-generated Date: Wed, 26 Nov 2025 15:35:50 +0000 Message-Id: <69271e56.30f4e.1ccf8b3b@gitrepo.freebsd.org> The branch stable/13 has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=111b60a2fddca6051c6e782c4a9a4da258ed4cdf commit 111b60a2fddca6051c6e782c4a9a4da258ed4cdf Author: Jose Luis Duran AuthorDate: 2025-11-19 01:09:58 +0000 Commit: Jose Luis Duran CommitDate: 2025-11-26 15:34:23 +0000 local-unbound: Read a tab separated resolv.conf Use [[:space:]] rather than a white space character to delimit the keys and the values in the resolv.conf file. PR: 236079 Reviewed by: des MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D53811 (cherry picked from commit 0628400590e025b7db1c0905e6ee488a24ef3f60) --- usr.sbin/unbound/setup/local-unbound-setup.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/usr.sbin/unbound/setup/local-unbound-setup.sh b/usr.sbin/unbound/setup/local-unbound-setup.sh index 90e255204135..c15ce96e1cfe 100755 --- a/usr.sbin/unbound/setup/local-unbound-setup.sh +++ b/usr.sbin/unbound/setup/local-unbound-setup.sh @@ -118,8 +118,8 @@ set_chrootdir() { get_nameservers() { while read line ; do local bareline=${line%%\#*} - local key=${bareline%% *} - local value=${bareline#* } + local key=${bareline%%[[:space:]]*} + local value=${bareline#*[[:space:]]} case ${key} in nameserver) case ${value} in @@ -145,8 +145,8 @@ gen_resolv_conf() { local edns0=no while read line ; do local bareline=${line%%\#*} - local key=${bareline%% *} - local value=${bareline#* } + local key=${bareline%%[[:space:]]*} + local value=${bareline#*[[:space:]]} case ${key} in nameserver) case ${value} in From nobody Wed Nov 26 15:58:13 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dGkjy00ZBz6JFHh for ; Wed, 26 Nov 2025 15:58:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dGkjx6F3Cz3Vc0 for ; Wed, 26 Nov 2025 15:58:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764172693; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mzx+1YGtlMJb7Bf0fyOqvYonMcfVB8ifo27xVEWtWvQ=; b=NHY72HjQy9mr4XJXnM1mKK552lslLRs9rGDHIwV7tb+8A7s7daZ43OeZedMvRAKivSAdvq E0lr8XLpRQLOWY98AZ9qI134nuIeWePH9g+S9tZkdDEhkaDf8sNu//R8rofFuJnYQwiZMa V8agU5yKKqM3wCALr4nh5fjY8JUxtwrjSM7mi8DjePCrZmwuUv90HoRfPNJ4mLTXivxYP+ 7Vr9LW5HHvzcjrpWgzQ1AzCHha6AkkU7NBFreK6uxRUAouqqtGAm+LZSGRUKqP2g0Cz7Ym bnt2n4ubmGzitYwEcMBERyh7SJfRU8uYkocmIz7MhB4pyRQtxvifHcd6yN24CQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764172693; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mzx+1YGtlMJb7Bf0fyOqvYonMcfVB8ifo27xVEWtWvQ=; b=u2BoIIzgggg/gK6QgSIMhfkdQ25K+MPoMC9y3KVysjG6CqCg47VNQBXWFBcGhf5lCyI+vs iT4JiTn2ULfoz5/VJEYoPOKVvNjK0ZZcnpZPiMDbgNJ4Ut+K6S9cGpNwmZp8WPYmy0W45t ClrH01f2mk+HogRHsjaF9jGhFCRTTN3yHNwbPbuYDHGSH7qsN+tYLDNEthVCt2vpQgOVUf o+lLZeEm9tpJtQDO0o4Ubt2LN4XDZWP7i7VaKtaVruHTWW6mjV1ef2pmOOUvWJkxP1hxta +PIh0WDWgOpPZAB4X3jCerYIHDZKEdaHDfVGG6A/LhkBFA70n175SNF1EczAFQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764172693; a=rsa-sha256; cv=none; b=ickfQIID0PYq/fpSxpasUfySGbyPlxsvjDgJBIxAetkReaMFZb1CI+tfFeiW5fOVQRpdth DdpOUqDqDpTuVziSfPzt842tYxw2uUL7qJT4niLCXnHtUAf0iTggIt4k7PSzwZSaLocuVX oNXCL3hwb6hpwcn33PuyX7oSEJiT4kwpQlI/6DLntbOdoALrdfZBVyWL1iHWwxF/GJnTVX nCB3wjtnCz9pMMnJx1IDpqBOVh1QrSNGsbiNyg8DeK1vNlHnj81YRidTNoRpWuPFaS8g9X QhV7tQDczHM+oKidKzJvsGSCggV+w9NUInR9yUQXJxunajDGX6gmYxfkWxSgng== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dGkjx5YHlzsgj for ; Wed, 26 Nov 2025 15:58:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3426e by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 26 Nov 2025 15:58:13 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Tetlow Subject: git: 2a3a6a177114 - main - Mitigate YXDOMAIN and nodata non-referral answer poisoning. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gordon X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2a3a6a1771148a709c2d9694c1d66c41ce8dee79 Auto-Submitted: auto-generated Date: Wed, 26 Nov 2025 15:58:13 +0000 Message-Id: <69272395.3426e.56ff4912@gitrepo.freebsd.org> The branch main has been updated by gordon: URL: https://cgit.FreeBSD.org/src/commit/?id=2a3a6a1771148a709c2d9694c1d66c41ce8dee79 commit 2a3a6a1771148a709c2d9694c1d66c41ce8dee79 Author: Gordon Tetlow AuthorDate: 2025-11-21 21:24:58 +0000 Commit: Gordon Tetlow CommitDate: 2025-11-26 15:57:33 +0000 Mitigate YXDOMAIN and nodata non-referral answer poisoning. Add a fix to apply scrubbing of unsolicited NS RRSets (and their respective address records) for YXDOMAIN and nodata non-referral answers. This prevents a malicious actor from exploiting a possible cache poison attack. Obtained from: NLnet Labs Security: CVE-2025-11411 --- contrib/unbound/iterator/iter_scrub.c | 39 +++++++++++++++++++++++++++++++---- 1 file changed, 35 insertions(+), 4 deletions(-) diff --git a/contrib/unbound/iterator/iter_scrub.c b/contrib/unbound/iterator/iter_scrub.c index 553d3655f0e3..8507a3fb65ac 100644 --- a/contrib/unbound/iterator/iter_scrub.c +++ b/contrib/unbound/iterator/iter_scrub.c @@ -418,12 +418,13 @@ shorten_rrset(sldns_buffer* pkt, struct rrset_parse* rrset, int count) * @param qinfo: original query. * @param region: where to allocate synthesized CNAMEs. * @param env: module env with config options. + * @param zonename: name of server zone. * @return 0 on error. */ static int scrub_normalize(sldns_buffer* pkt, struct msg_parse* msg, struct query_info* qinfo, struct regional* region, - struct module_env* env) + struct module_env* env, uint8_t* zonename) { uint8_t* sname = qinfo->qname; size_t snamelen = qinfo->qname_len; @@ -431,7 +432,8 @@ scrub_normalize(sldns_buffer* pkt, struct msg_parse* msg, int cname_length = 0; /* number of CNAMEs, or DNAMEs */ if(FLAGS_GET_RCODE(msg->flags) != LDNS_RCODE_NOERROR && - FLAGS_GET_RCODE(msg->flags) != LDNS_RCODE_NXDOMAIN) + FLAGS_GET_RCODE(msg->flags) != LDNS_RCODE_NXDOMAIN && + FLAGS_GET_RCODE(msg->flags) != LDNS_RCODE_YXDOMAIN) return 1; /* For the ANSWER section, remove all "irrelevant" records and add @@ -470,6 +472,11 @@ scrub_normalize(sldns_buffer* pkt, struct msg_parse* msg, &aliaslen, pkt)) { verbose(VERB_ALGO, "synthesized CNAME " "too long"); + if(FLAGS_GET_RCODE(msg->flags) == LDNS_RCODE_YXDOMAIN) { + prev = rrset; + rrset = rrset->rrset_all_next; + continue; + } return 0; } cname_length++; @@ -650,6 +657,29 @@ scrub_normalize(sldns_buffer* pkt, struct msg_parse* msg, "RRset:", pkt, msg, prev, &rrset); continue; } + /* Also delete promiscuous NS for other RCODEs */ + if(FLAGS_GET_RCODE(msg->flags) != LDNS_RCODE_NOERROR + && env->cfg->iter_scrub_promiscuous) { + remove_rrset("normalize: removing promiscuous " + "RRset:", pkt, msg, prev, &rrset); + continue; + } + /* Also delete promiscuous NS for NOERROR with nodata + * for authoritative answers, not for delegations. + * NOERROR with an_rrsets!=0 already handled. + * Also NOERROR and soa_in_auth already handled. + * NOERROR with an_rrsets==0, and not a referral. + * referral is (NS not the zonename, noSOA). + */ + if(FLAGS_GET_RCODE(msg->flags) == LDNS_RCODE_NOERROR + && msg->an_rrsets == 0 + && !(dname_pkt_compare(pkt, rrset->dname, + zonename) != 0 && !soa_in_auth(msg)) + && env->cfg->iter_scrub_promiscuous) { + remove_rrset("normalize: removing promiscuous " + "RRset:", pkt, msg, prev, &rrset); + continue; + } if(nsset == NULL) { nsset = rrset; } else { @@ -1060,7 +1090,8 @@ scrub_message(sldns_buffer* pkt, struct msg_parse* msg, /* this is not required for basic operation but is a forgery * resistance (security) feature */ if((FLAGS_GET_RCODE(msg->flags) == LDNS_RCODE_NOERROR || - FLAGS_GET_RCODE(msg->flags) == LDNS_RCODE_NXDOMAIN) && + FLAGS_GET_RCODE(msg->flags) == LDNS_RCODE_NXDOMAIN || + FLAGS_GET_RCODE(msg->flags) == LDNS_RCODE_YXDOMAIN) && msg->qdcount == 0) return 0; @@ -1074,7 +1105,7 @@ scrub_message(sldns_buffer* pkt, struct msg_parse* msg, } /* normalize the response, this cleans up the additional. */ - if(!scrub_normalize(pkt, msg, qinfo, region, env)) + if(!scrub_normalize(pkt, msg, qinfo, region, env, zonename)) return 0; /* delete all out-of-zone information */ if(!scrub_sanitize(pkt, msg, qinfo, zonename, env, ie, qstate)) From nobody Wed Nov 26 16:00:04 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dGkm42qTtz6JFpP for ; Wed, 26 Nov 2025 16:00:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dGkm42CGGz3VnV for ; Wed, 26 Nov 2025 16:00:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764172804; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hp4Nyv2fvh4Ss1O0LkTiDpEpxkHd0eGFBna7hNZhc3o=; b=Z0jD1Yrk1SP33zNF+HgTPMZiCdlfoNq6KgqFntXbcw7Lf+nO7UXx/xKTGaiNLvFb/yZ3lK nwJuxKvIBLk08K7WclhaP/1JzCrglhL74p+I1XuQBY53O15VjEBu3ZTCfU+Vlm2kCj3bC4 0plIJk4EiVkKe0JO+jjXNlGnK9CkBlTxASfi7CH0fhE5HIWjwVVhQkP7Qi6uUeoe/Pw6ad 9/J1xXos76fFfsCNmijrC/gck8rruMzowvVPPIq1IbGBrAdfExFBUtufSRmcBQGkR9ZLK7 I+haKlbcj0A7c5TjAUbIk1Cdc+wr80WNjW09mcwJekm1V/YXbHVP6p/snAXziQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764172804; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hp4Nyv2fvh4Ss1O0LkTiDpEpxkHd0eGFBna7hNZhc3o=; b=cSnB3NVIWzrUcpdTwdevjZtNOXYFcKK2aC2Kh8ug0oWO9TH/nK4vtK5RYWUFXMkWaiAzdv UPNYs4x/g4v/rp9FDIQ2K6eaxeKHrLKNSbbM21DGrRSn9y2NBg56sXTU34LvP8gyLD2MLA NJ1RGPt+Ik8WOqmXjkosKEHnrfz53RovXH6otUqgZMxM6REGLNF46Mogce8JArCaC4HduF PIEBWbfFBvMt5PLRyniN0n7ud82oElkv3TXO49PGG/Af62K9JMK9RvIPbe/K0wCKQhjZGs 0QUiFTahdrd2+7sMhE70udpBl+l2eepjkyiAIkFqNjJJa3sYZ7tP7TqBKWSg/A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764172804; a=rsa-sha256; cv=none; b=ND3QOsGl2xPUXOyezAawLPWvxKGPHoybPvDXGc7YsZfK01Ujmbt/Oxu2MggmdddY9xyIXK nNCpm6OtO2nKmWbaSb++5QYy6q2v4C5J1hK6U9i464G9A4e/LNQQvTtVi3rMd6GmZtnUO6 Ri+ppyI+B/u3uAv5ma0kj01zYmzA5QvJ1wDYBaQ5hstaWCmmk6mVXCEEqglMxICUc23+hL G6zwiJ1SByYZwXG2uW6pwhyOlFfM1Q51GKXLfdHD7g4h8NgIMB6SSOzEB7MlDE8eOCa9qL Lv497LFnWS0Vnqi6Hfh/eufarkLdsQJj2bga5sQkBt96oFpx40iPOm25HVBCHg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dGkm415xkztH7 for ; Wed, 26 Nov 2025 16:00:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 33c49 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 26 Nov 2025 16:00:04 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Tetlow Subject: git: b01f35a4e19d - stable/15 - Mitigate YXDOMAIN and nodata non-referral answer poisoning. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gordon X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: b01f35a4e19d8e204daa37c378344772e339247b Auto-Submitted: auto-generated Date: Wed, 26 Nov 2025 16:00:04 +0000 Message-Id: <69272404.33c49.53104836@gitrepo.freebsd.org> The branch stable/15 has been updated by gordon: URL: https://cgit.FreeBSD.org/src/commit/?id=b01f35a4e19d8e204daa37c378344772e339247b commit b01f35a4e19d8e204daa37c378344772e339247b Author: Gordon Tetlow AuthorDate: 2025-11-21 21:24:58 +0000 Commit: Gordon Tetlow CommitDate: 2025-11-26 15:59:35 +0000 Mitigate YXDOMAIN and nodata non-referral answer poisoning. Add a fix to apply scrubbing of unsolicited NS RRSets (and their respective address records) for YXDOMAIN and nodata non-referral answers. This prevents a malicious actor from exploiting a possible cache poison attack. Obtained from: NLnet Labs Security: FreeBSD-SA-25:10.unbound Security: CVE-2025-11411 (cherry picked from commit 2a3a6a1771148a709c2d9694c1d66c41ce8dee79) --- contrib/unbound/iterator/iter_scrub.c | 39 +++++++++++++++++++++++++++++++---- 1 file changed, 35 insertions(+), 4 deletions(-) diff --git a/contrib/unbound/iterator/iter_scrub.c b/contrib/unbound/iterator/iter_scrub.c index 553d3655f0e3..8507a3fb65ac 100644 --- a/contrib/unbound/iterator/iter_scrub.c +++ b/contrib/unbound/iterator/iter_scrub.c @@ -418,12 +418,13 @@ shorten_rrset(sldns_buffer* pkt, struct rrset_parse* rrset, int count) * @param qinfo: original query. * @param region: where to allocate synthesized CNAMEs. * @param env: module env with config options. + * @param zonename: name of server zone. * @return 0 on error. */ static int scrub_normalize(sldns_buffer* pkt, struct msg_parse* msg, struct query_info* qinfo, struct regional* region, - struct module_env* env) + struct module_env* env, uint8_t* zonename) { uint8_t* sname = qinfo->qname; size_t snamelen = qinfo->qname_len; @@ -431,7 +432,8 @@ scrub_normalize(sldns_buffer* pkt, struct msg_parse* msg, int cname_length = 0; /* number of CNAMEs, or DNAMEs */ if(FLAGS_GET_RCODE(msg->flags) != LDNS_RCODE_NOERROR && - FLAGS_GET_RCODE(msg->flags) != LDNS_RCODE_NXDOMAIN) + FLAGS_GET_RCODE(msg->flags) != LDNS_RCODE_NXDOMAIN && + FLAGS_GET_RCODE(msg->flags) != LDNS_RCODE_YXDOMAIN) return 1; /* For the ANSWER section, remove all "irrelevant" records and add @@ -470,6 +472,11 @@ scrub_normalize(sldns_buffer* pkt, struct msg_parse* msg, &aliaslen, pkt)) { verbose(VERB_ALGO, "synthesized CNAME " "too long"); + if(FLAGS_GET_RCODE(msg->flags) == LDNS_RCODE_YXDOMAIN) { + prev = rrset; + rrset = rrset->rrset_all_next; + continue; + } return 0; } cname_length++; @@ -650,6 +657,29 @@ scrub_normalize(sldns_buffer* pkt, struct msg_parse* msg, "RRset:", pkt, msg, prev, &rrset); continue; } + /* Also delete promiscuous NS for other RCODEs */ + if(FLAGS_GET_RCODE(msg->flags) != LDNS_RCODE_NOERROR + && env->cfg->iter_scrub_promiscuous) { + remove_rrset("normalize: removing promiscuous " + "RRset:", pkt, msg, prev, &rrset); + continue; + } + /* Also delete promiscuous NS for NOERROR with nodata + * for authoritative answers, not for delegations. + * NOERROR with an_rrsets!=0 already handled. + * Also NOERROR and soa_in_auth already handled. + * NOERROR with an_rrsets==0, and not a referral. + * referral is (NS not the zonename, noSOA). + */ + if(FLAGS_GET_RCODE(msg->flags) == LDNS_RCODE_NOERROR + && msg->an_rrsets == 0 + && !(dname_pkt_compare(pkt, rrset->dname, + zonename) != 0 && !soa_in_auth(msg)) + && env->cfg->iter_scrub_promiscuous) { + remove_rrset("normalize: removing promiscuous " + "RRset:", pkt, msg, prev, &rrset); + continue; + } if(nsset == NULL) { nsset = rrset; } else { @@ -1060,7 +1090,8 @@ scrub_message(sldns_buffer* pkt, struct msg_parse* msg, /* this is not required for basic operation but is a forgery * resistance (security) feature */ if((FLAGS_GET_RCODE(msg->flags) == LDNS_RCODE_NOERROR || - FLAGS_GET_RCODE(msg->flags) == LDNS_RCODE_NXDOMAIN) && + FLAGS_GET_RCODE(msg->flags) == LDNS_RCODE_NXDOMAIN || + FLAGS_GET_RCODE(msg->flags) == LDNS_RCODE_YXDOMAIN) && msg->qdcount == 0) return 0; @@ -1074,7 +1105,7 @@ scrub_message(sldns_buffer* pkt, struct msg_parse* msg, } /* normalize the response, this cleans up the additional. */ - if(!scrub_normalize(pkt, msg, qinfo, region, env)) + if(!scrub_normalize(pkt, msg, qinfo, region, env, zonename)) return 0; /* delete all out-of-zone information */ if(!scrub_sanitize(pkt, msg, qinfo, zonename, env, ie, qstate)) From nobody Wed Nov 26 16:01:01 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dGknB08xBz6JFJh for ; Wed, 26 Nov 2025 16:01:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dGkn96MlNz3WBW for ; Wed, 26 Nov 2025 16:01:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764172861; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+TOpj84N8Bb1AXhXEZstvenVr4PbhLMRpkGaT48+sEo=; b=IdUbg1aHjxLkuPZriikDq+dhz63nuFTgnJX8qUck8LcjnIHVO870gmnWnBlzHLm1SPCetA BoBhYV+zEMou2ranEptQ1nFM7HhAzOyIgt6dkQWQzMFRJasQPmPiWdPowfZ+/t3xqcDqDn 0VFRzNnfw19H5tKTt2zVz685rIm2rT/iYOtN+c11S6IRFIrGc3vO10VuMSEOoKFtL1YROm KwhhGWknI3Fs9gHBt0yRkya1TEsMc12sRfqzAgm/q+B0xnTgOm4X1fX/4vlU+9VSdIRPya olLq9ib9UXy1Wj8Ww2giBksFc6rGr6xV3wypy3t+/3pInGnYDneLrvu37libzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764172861; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+TOpj84N8Bb1AXhXEZstvenVr4PbhLMRpkGaT48+sEo=; b=XOIRMnRFHbV0TOUMhhjWPVeHw4RQmk7PgHdow8TmQn4n/li1yg2kJGOprp1Dapy94HnDzd bq6NuJuykoZvfxhvHJMrPsC2L13brsJ3ZfKyW0IgI66VLhQM5DvE62TXdHg1m/UnReWLEB 4Jfyx0cRUvEQ0sEFL5H3oKbvwMmc5TYYGkxhNKYDFdRd2R6QDf+Yde74qaworO5/EzWXjx 8aCjn2QE8TSRJrxR9tdJdLibrVj2vSDxz6Mm+9rBCIic5RE20ZI/Nl4PJfLInVS4xuO5dk 2y7xYtGDcVIeZIfAzn0mSa7VNAQ+l2emuVDzlTFxhA2yRj+4HuDSQTXsgpwRoA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764172861; a=rsa-sha256; cv=none; b=Wy8tdObWzwC7kd2jJHKyPZ6VKPjJFS4TKiIbkgWpp7+4BBnD17svTCmDRj/DMSb1wnXeEE 5bH9bDkaA4q6bAA5+G4Ps9FNvEdIWmYcMuaUsjrhlZySdTZzaKi+20+oD8ihgFd1x0+xUY xVBjWOt1q0K8oqVPx+Zpax/wA7CIR/d6/SUv2kT36f/e0gmXshK/XITNoHNInVoU5+2esG Bw1KSjYeYwtL1u46kIvG/ZJ4wfg15Qt499URL8PIp0RhSi8iyeMlaGD/w1cgOeZoZpBOC1 PVjjs9+Kr/C29gs75M+7RObuv/qrXcjMMzqHL9UGXXpVNW8oiy9shxrFkaBz/Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dGkn95zGGzskb for ; Wed, 26 Nov 2025 16:01:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 33e2b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 26 Nov 2025 16:01:01 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Tetlow Subject: git: cd40a23fb249 - stable/14 - Mitigate YXDOMAIN and nodata non-referral answer poisoning. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gordon X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: cd40a23fb249bba461e38ca0c3d243a20a12eef4 Auto-Submitted: auto-generated Date: Wed, 26 Nov 2025 16:01:01 +0000 Message-Id: <6927243d.33e2b.2163aabb@gitrepo.freebsd.org> The branch stable/14 has been updated by gordon: URL: https://cgit.FreeBSD.org/src/commit/?id=cd40a23fb249bba461e38ca0c3d243a20a12eef4 commit cd40a23fb249bba461e38ca0c3d243a20a12eef4 Author: Gordon Tetlow AuthorDate: 2025-11-21 21:24:58 +0000 Commit: Gordon Tetlow CommitDate: 2025-11-26 16:00:45 +0000 Mitigate YXDOMAIN and nodata non-referral answer poisoning. Add a fix to apply scrubbing of unsolicited NS RRSets (and their respective address records) for YXDOMAIN and nodata non-referral answers. This prevents a malicious actor from exploiting a possible cache poison attack. Obtained from: NLnet Labs Security: FreeBSD-SA-25:10.unbound Security: CVE-2025-11411 (cherry picked from commit 2a3a6a1771148a709c2d9694c1d66c41ce8dee79) --- contrib/unbound/iterator/iter_scrub.c | 39 +++++++++++++++++++++++++++++++---- 1 file changed, 35 insertions(+), 4 deletions(-) diff --git a/contrib/unbound/iterator/iter_scrub.c b/contrib/unbound/iterator/iter_scrub.c index 553d3655f0e3..8507a3fb65ac 100644 --- a/contrib/unbound/iterator/iter_scrub.c +++ b/contrib/unbound/iterator/iter_scrub.c @@ -418,12 +418,13 @@ shorten_rrset(sldns_buffer* pkt, struct rrset_parse* rrset, int count) * @param qinfo: original query. * @param region: where to allocate synthesized CNAMEs. * @param env: module env with config options. + * @param zonename: name of server zone. * @return 0 on error. */ static int scrub_normalize(sldns_buffer* pkt, struct msg_parse* msg, struct query_info* qinfo, struct regional* region, - struct module_env* env) + struct module_env* env, uint8_t* zonename) { uint8_t* sname = qinfo->qname; size_t snamelen = qinfo->qname_len; @@ -431,7 +432,8 @@ scrub_normalize(sldns_buffer* pkt, struct msg_parse* msg, int cname_length = 0; /* number of CNAMEs, or DNAMEs */ if(FLAGS_GET_RCODE(msg->flags) != LDNS_RCODE_NOERROR && - FLAGS_GET_RCODE(msg->flags) != LDNS_RCODE_NXDOMAIN) + FLAGS_GET_RCODE(msg->flags) != LDNS_RCODE_NXDOMAIN && + FLAGS_GET_RCODE(msg->flags) != LDNS_RCODE_YXDOMAIN) return 1; /* For the ANSWER section, remove all "irrelevant" records and add @@ -470,6 +472,11 @@ scrub_normalize(sldns_buffer* pkt, struct msg_parse* msg, &aliaslen, pkt)) { verbose(VERB_ALGO, "synthesized CNAME " "too long"); + if(FLAGS_GET_RCODE(msg->flags) == LDNS_RCODE_YXDOMAIN) { + prev = rrset; + rrset = rrset->rrset_all_next; + continue; + } return 0; } cname_length++; @@ -650,6 +657,29 @@ scrub_normalize(sldns_buffer* pkt, struct msg_parse* msg, "RRset:", pkt, msg, prev, &rrset); continue; } + /* Also delete promiscuous NS for other RCODEs */ + if(FLAGS_GET_RCODE(msg->flags) != LDNS_RCODE_NOERROR + && env->cfg->iter_scrub_promiscuous) { + remove_rrset("normalize: removing promiscuous " + "RRset:", pkt, msg, prev, &rrset); + continue; + } + /* Also delete promiscuous NS for NOERROR with nodata + * for authoritative answers, not for delegations. + * NOERROR with an_rrsets!=0 already handled. + * Also NOERROR and soa_in_auth already handled. + * NOERROR with an_rrsets==0, and not a referral. + * referral is (NS not the zonename, noSOA). + */ + if(FLAGS_GET_RCODE(msg->flags) == LDNS_RCODE_NOERROR + && msg->an_rrsets == 0 + && !(dname_pkt_compare(pkt, rrset->dname, + zonename) != 0 && !soa_in_auth(msg)) + && env->cfg->iter_scrub_promiscuous) { + remove_rrset("normalize: removing promiscuous " + "RRset:", pkt, msg, prev, &rrset); + continue; + } if(nsset == NULL) { nsset = rrset; } else { @@ -1060,7 +1090,8 @@ scrub_message(sldns_buffer* pkt, struct msg_parse* msg, /* this is not required for basic operation but is a forgery * resistance (security) feature */ if((FLAGS_GET_RCODE(msg->flags) == LDNS_RCODE_NOERROR || - FLAGS_GET_RCODE(msg->flags) == LDNS_RCODE_NXDOMAIN) && + FLAGS_GET_RCODE(msg->flags) == LDNS_RCODE_NXDOMAIN || + FLAGS_GET_RCODE(msg->flags) == LDNS_RCODE_YXDOMAIN) && msg->qdcount == 0) return 0; @@ -1074,7 +1105,7 @@ scrub_message(sldns_buffer* pkt, struct msg_parse* msg, } /* normalize the response, this cleans up the additional. */ - if(!scrub_normalize(pkt, msg, qinfo, region, env)) + if(!scrub_normalize(pkt, msg, qinfo, region, env, zonename)) return 0; /* delete all out-of-zone information */ if(!scrub_sanitize(pkt, msg, qinfo, zonename, env, ie, qstate)) From nobody Wed Nov 26 16:02:40 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dGkq50xKLz6JG10 for ; Wed, 26 Nov 2025 16:02:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dGkq46vFBz3Wtf for ; Wed, 26 Nov 2025 16:02:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764172961; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cvHcrppqJhUIoI6lRqYROevFcoL77tSvcNTKN63bWL0=; b=XHSNYJqarkDgrZZemoQWWMnll9BFFaYFwVuJSr/Qd41wgn119/68Vv1ede7D4zEOufzCjQ FyFeE3sZkNywFrU4euWGPQOA0k5ZRcDLxYQrq+zZlh3AYcUuWLgOzMd0VC1QGUTRl3ya8I Be1SNuvbDziNSsfCmNQamvIou3taKbnfSbu6eFPttZ5A72pz8dlXG13PDaShMt/JG39l/K pTWLRTK8SOI+t2/f5CRuwWjOAk/yc9balQtkCDKqFyvIKOYDzEl7S6dDoXWk15TWoNlQ2r khJZYn/Usb8lbASKAR3BboqEHSh10vJDQNrPSuAIonmuK4+a283FZHnDkTOOwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764172961; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cvHcrppqJhUIoI6lRqYROevFcoL77tSvcNTKN63bWL0=; b=EHGrlpnW4KxMxiV9Vfiyuh8eGrG1/162+sooqocjaeibfJb6RAUcV+JoqIzt6DClDsbLVd gq+qHy1CXmaAXlzAxwoanpWjsH0hPfVVRzrJzUA0D54mJDPh06Q2NBEftHlaIB0Hd6CyYo TChqwEWlpxVOqdSWum11f+piLWX41N7vTE5FPGPKqbGnTTwSJAJZvM1/RXdWHj7fqr6dso 3/ox/YfH+NaqRf1u4otAy415HZEWqnUSe00Pa4/yFtXVmmCCT8i4Q1ciuShmqPNMvKnPJ5 uQCdbLekUF/uadRJUiAvURBPyNi0OOjRNrCRzuOlYW//lgnjILabP/nA5w280g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764172961; a=rsa-sha256; cv=none; b=gJn0DINfA3Xk+4qfsxBkqvn1sqCnv0fOP32g06BsgV/sQ2x3/wdQB8hJrr9YC4yqQoE6LP i+emTrpViTQtf5MgjyDmQRS2Dzufl9vUiK1wLCW2yj9iem2R2JrhAWY4Lg5+btoxXyvDpB vRlx5GnFXv+JGgGdWJ5F/XLcUYY17Rmjh3xL3DkZutx0FlG+cYg4GT0HIpd+Xx4NP//VIb C6qMLkXVRWYdbsx4Z3NEFAuwpsETCb4A94+DpJX6nu9DxM+LzOuNwAdu17q7XykDL4Fd8H QNakGHH6PWh9X1aCebiSFuFx+eSHXfcdoiE3sG3OXsnHxvH0ve2HJrJBNEh79w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dGkq46Tb2ztkV for ; Wed, 26 Nov 2025 16:02:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 350de by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 26 Nov 2025 16:02:40 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Tetlow Subject: git: 2aed524b2329 - stable/13 - Mitigate YXDOMAIN and nodata non-referral answer poisoning. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gordon X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 2aed524b2329fd4af929c7b6ef97fcdb02391177 Auto-Submitted: auto-generated Date: Wed, 26 Nov 2025 16:02:40 +0000 Message-Id: <692724a0.350de.5b6cb4d7@gitrepo.freebsd.org> The branch stable/13 has been updated by gordon: URL: https://cgit.FreeBSD.org/src/commit/?id=2aed524b2329fd4af929c7b6ef97fcdb02391177 commit 2aed524b2329fd4af929c7b6ef97fcdb02391177 Author: Gordon Tetlow AuthorDate: 2025-11-21 21:24:58 +0000 Commit: Gordon Tetlow CommitDate: 2025-11-26 16:02:20 +0000 Mitigate YXDOMAIN and nodata non-referral answer poisoning. Add a fix to apply scrubbing of unsolicited NS RRSets (and their respective address records) for YXDOMAIN and nodata non-referral answers. This prevents a malicious actor from exploiting a possible cache poison attack. Obtained from: NLnet Labs Security: FreeBSD-SA-25:10.unbound Security: CVE-2025-11411 (cherry picked from commit 2a3a6a1771148a709c2d9694c1d66c41ce8dee79) --- contrib/unbound/iterator/iter_scrub.c | 39 +++++++++++++++++++++++++++++++---- 1 file changed, 35 insertions(+), 4 deletions(-) diff --git a/contrib/unbound/iterator/iter_scrub.c b/contrib/unbound/iterator/iter_scrub.c index 553d3655f0e3..8507a3fb65ac 100644 --- a/contrib/unbound/iterator/iter_scrub.c +++ b/contrib/unbound/iterator/iter_scrub.c @@ -418,12 +418,13 @@ shorten_rrset(sldns_buffer* pkt, struct rrset_parse* rrset, int count) * @param qinfo: original query. * @param region: where to allocate synthesized CNAMEs. * @param env: module env with config options. + * @param zonename: name of server zone. * @return 0 on error. */ static int scrub_normalize(sldns_buffer* pkt, struct msg_parse* msg, struct query_info* qinfo, struct regional* region, - struct module_env* env) + struct module_env* env, uint8_t* zonename) { uint8_t* sname = qinfo->qname; size_t snamelen = qinfo->qname_len; @@ -431,7 +432,8 @@ scrub_normalize(sldns_buffer* pkt, struct msg_parse* msg, int cname_length = 0; /* number of CNAMEs, or DNAMEs */ if(FLAGS_GET_RCODE(msg->flags) != LDNS_RCODE_NOERROR && - FLAGS_GET_RCODE(msg->flags) != LDNS_RCODE_NXDOMAIN) + FLAGS_GET_RCODE(msg->flags) != LDNS_RCODE_NXDOMAIN && + FLAGS_GET_RCODE(msg->flags) != LDNS_RCODE_YXDOMAIN) return 1; /* For the ANSWER section, remove all "irrelevant" records and add @@ -470,6 +472,11 @@ scrub_normalize(sldns_buffer* pkt, struct msg_parse* msg, &aliaslen, pkt)) { verbose(VERB_ALGO, "synthesized CNAME " "too long"); + if(FLAGS_GET_RCODE(msg->flags) == LDNS_RCODE_YXDOMAIN) { + prev = rrset; + rrset = rrset->rrset_all_next; + continue; + } return 0; } cname_length++; @@ -650,6 +657,29 @@ scrub_normalize(sldns_buffer* pkt, struct msg_parse* msg, "RRset:", pkt, msg, prev, &rrset); continue; } + /* Also delete promiscuous NS for other RCODEs */ + if(FLAGS_GET_RCODE(msg->flags) != LDNS_RCODE_NOERROR + && env->cfg->iter_scrub_promiscuous) { + remove_rrset("normalize: removing promiscuous " + "RRset:", pkt, msg, prev, &rrset); + continue; + } + /* Also delete promiscuous NS for NOERROR with nodata + * for authoritative answers, not for delegations. + * NOERROR with an_rrsets!=0 already handled. + * Also NOERROR and soa_in_auth already handled. + * NOERROR with an_rrsets==0, and not a referral. + * referral is (NS not the zonename, noSOA). + */ + if(FLAGS_GET_RCODE(msg->flags) == LDNS_RCODE_NOERROR + && msg->an_rrsets == 0 + && !(dname_pkt_compare(pkt, rrset->dname, + zonename) != 0 && !soa_in_auth(msg)) + && env->cfg->iter_scrub_promiscuous) { + remove_rrset("normalize: removing promiscuous " + "RRset:", pkt, msg, prev, &rrset); + continue; + } if(nsset == NULL) { nsset = rrset; } else { @@ -1060,7 +1090,8 @@ scrub_message(sldns_buffer* pkt, struct msg_parse* msg, /* this is not required for basic operation but is a forgery * resistance (security) feature */ if((FLAGS_GET_RCODE(msg->flags) == LDNS_RCODE_NOERROR || - FLAGS_GET_RCODE(msg->flags) == LDNS_RCODE_NXDOMAIN) && + FLAGS_GET_RCODE(msg->flags) == LDNS_RCODE_NXDOMAIN || + FLAGS_GET_RCODE(msg->flags) == LDNS_RCODE_YXDOMAIN) && msg->qdcount == 0) return 0; @@ -1074,7 +1105,7 @@ scrub_message(sldns_buffer* pkt, struct msg_parse* msg, } /* normalize the response, this cleans up the additional. */ - if(!scrub_normalize(pkt, msg, qinfo, region, env)) + if(!scrub_normalize(pkt, msg, qinfo, region, env, zonename)) return 0; /* delete all out-of-zone information */ if(!scrub_sanitize(pkt, msg, qinfo, zonename, env, ie, qstate)) From nobody Wed Nov 26 16:13:20 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dGl3N428lz6JGmZ for ; Wed, 26 Nov 2025 16:13:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dGl3N3Qnnz3Z0f for ; Wed, 26 Nov 2025 16:13:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764173600; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZOu0S/IIRPGsCmCotxlOX+QZ4ZO5GKASGYU7bC0mcFA=; b=Si2VQ/qCs0UGLOjZuM0UGiICANtTkX+oat8Uu6wY1jO07YA00HgzIRLLwwdyHcIwRx07Pv BcKNW9wyAGSWQkVtHfshuOSjufZKAIijkTzuQsM0xMJajqxT0AaUbj0v7oNdhHurx2sHjX ZveKOYhl5QXK0S1lUOg9XLZzZMIIu9nLaK31zSHIRlHvIC3q+zfjKv80a0ifu6hHzOFahx Hhr77PFzW4I4HfecH+eNAbFjL1i7jOWq4sylQ1vDaQwnzbGZM5tDMueS8HI2w5eV1ypDjF hJjIQqvtnqXTtFC86+t2ekxvM6B6k1pXD69kTmhnvFS3usH6Zm2cWolrRI5k2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764173600; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZOu0S/IIRPGsCmCotxlOX+QZ4ZO5GKASGYU7bC0mcFA=; b=VyOcbhFAmNaQW2l9/+vPhAJwXSTHV7IVJaMaX3ojuJmt0wpiVoSGp8v+uUw1+u/kUxz0Fp 3rz7xTcaTMoLda8QvInPaukdhfuSxoy6AVpdtmG/l0BEYX69anlSR84YXirRmS/No+aNUe Yoj4bRsFhgO+U3hrHB/CvUfW3/5NS0eLcB3TlxK6LNGC0lvcR5Yd9oSTMPZV3u3jBQQJkk j/DqkqFb+9/HAZYvn2hu2rLe+ogKIKGvXfE4W5jbVg9uokmQ/5GNM96R1HS1nJIiiQp892 UG+g5oOENdvYa0N/s6klvjqiMRrBjzuJplv8/kncfbj9XQzxhNLq8end/9Ta4Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764173600; a=rsa-sha256; cv=none; b=v58S1aGkm5Y1AurpVRiU/6XkMDyFlv1flRxZShIZwmVEpC0ISyMtn8u2cwgmBWEHqt0V9s upMbYCYcDG6Qc7E4tD6JT8txmPcXk4wGqEGr5bqo2geS8ShECencPhRzla+40fl/BjaB/7 yX2hA41CcbmOLFBOSJuW2EgUzh7sWHY7vcRdR4ZBHCy9a0zp/pL6qmXxlWOU18qwc5O1fg P+urYluIxUkohwwhrKKi9p0WPGekEnh4H+WlpeFIPhjE3IR2cxnnNb2OwcZsFltt+KxA8H aaJZBD5Bv90ib+4+X43sWZYD+zazq/M4abgqli4P9TkTzPzqAxHsNUtRDaYCeA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dGl3N2whQztlD for ; Wed, 26 Nov 2025 16:13:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 35c0c by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 26 Nov 2025 16:13:20 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Tetlow Subject: git: dabd406d99a9 - releng/15.0 - Mitigate YXDOMAIN and nodata non-referral answer poisoning. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gordon X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.0 X-Git-Reftype: branch X-Git-Commit: dabd406d99a92ef88f3853e6093ba17d978a47ac Auto-Submitted: auto-generated Date: Wed, 26 Nov 2025 16:13:20 +0000 Message-Id: <69272720.35c0c.4936f62@gitrepo.freebsd.org> The branch releng/15.0 has been updated by gordon: URL: https://cgit.FreeBSD.org/src/commit/?id=dabd406d99a92ef88f3853e6093ba17d978a47ac commit dabd406d99a92ef88f3853e6093ba17d978a47ac Author: Gordon Tetlow AuthorDate: 2025-11-21 21:24:58 +0000 Commit: Gordon Tetlow CommitDate: 2025-11-26 16:04:39 +0000 Mitigate YXDOMAIN and nodata non-referral answer poisoning. Add a fix to apply scrubbing of unsolicited NS RRSets (and their respective address records) for YXDOMAIN and nodata non-referral answers. This prevents a malicious actor from exploiting a possible cache poison attack. Approved by: so Approved by: re (cperciva) Obtained from: NLnet Labs Security: FreeBSD-SA-25:10.unbound Security: CVE-2025-11411 --- contrib/unbound/iterator/iter_scrub.c | 39 +++++++++++++++++++++++++++++++---- 1 file changed, 35 insertions(+), 4 deletions(-) diff --git a/contrib/unbound/iterator/iter_scrub.c b/contrib/unbound/iterator/iter_scrub.c index 553d3655f0e3..8507a3fb65ac 100644 --- a/contrib/unbound/iterator/iter_scrub.c +++ b/contrib/unbound/iterator/iter_scrub.c @@ -418,12 +418,13 @@ shorten_rrset(sldns_buffer* pkt, struct rrset_parse* rrset, int count) * @param qinfo: original query. * @param region: where to allocate synthesized CNAMEs. * @param env: module env with config options. + * @param zonename: name of server zone. * @return 0 on error. */ static int scrub_normalize(sldns_buffer* pkt, struct msg_parse* msg, struct query_info* qinfo, struct regional* region, - struct module_env* env) + struct module_env* env, uint8_t* zonename) { uint8_t* sname = qinfo->qname; size_t snamelen = qinfo->qname_len; @@ -431,7 +432,8 @@ scrub_normalize(sldns_buffer* pkt, struct msg_parse* msg, int cname_length = 0; /* number of CNAMEs, or DNAMEs */ if(FLAGS_GET_RCODE(msg->flags) != LDNS_RCODE_NOERROR && - FLAGS_GET_RCODE(msg->flags) != LDNS_RCODE_NXDOMAIN) + FLAGS_GET_RCODE(msg->flags) != LDNS_RCODE_NXDOMAIN && + FLAGS_GET_RCODE(msg->flags) != LDNS_RCODE_YXDOMAIN) return 1; /* For the ANSWER section, remove all "irrelevant" records and add @@ -470,6 +472,11 @@ scrub_normalize(sldns_buffer* pkt, struct msg_parse* msg, &aliaslen, pkt)) { verbose(VERB_ALGO, "synthesized CNAME " "too long"); + if(FLAGS_GET_RCODE(msg->flags) == LDNS_RCODE_YXDOMAIN) { + prev = rrset; + rrset = rrset->rrset_all_next; + continue; + } return 0; } cname_length++; @@ -650,6 +657,29 @@ scrub_normalize(sldns_buffer* pkt, struct msg_parse* msg, "RRset:", pkt, msg, prev, &rrset); continue; } + /* Also delete promiscuous NS for other RCODEs */ + if(FLAGS_GET_RCODE(msg->flags) != LDNS_RCODE_NOERROR + && env->cfg->iter_scrub_promiscuous) { + remove_rrset("normalize: removing promiscuous " + "RRset:", pkt, msg, prev, &rrset); + continue; + } + /* Also delete promiscuous NS for NOERROR with nodata + * for authoritative answers, not for delegations. + * NOERROR with an_rrsets!=0 already handled. + * Also NOERROR and soa_in_auth already handled. + * NOERROR with an_rrsets==0, and not a referral. + * referral is (NS not the zonename, noSOA). + */ + if(FLAGS_GET_RCODE(msg->flags) == LDNS_RCODE_NOERROR + && msg->an_rrsets == 0 + && !(dname_pkt_compare(pkt, rrset->dname, + zonename) != 0 && !soa_in_auth(msg)) + && env->cfg->iter_scrub_promiscuous) { + remove_rrset("normalize: removing promiscuous " + "RRset:", pkt, msg, prev, &rrset); + continue; + } if(nsset == NULL) { nsset = rrset; } else { @@ -1060,7 +1090,8 @@ scrub_message(sldns_buffer* pkt, struct msg_parse* msg, /* this is not required for basic operation but is a forgery * resistance (security) feature */ if((FLAGS_GET_RCODE(msg->flags) == LDNS_RCODE_NOERROR || - FLAGS_GET_RCODE(msg->flags) == LDNS_RCODE_NXDOMAIN) && + FLAGS_GET_RCODE(msg->flags) == LDNS_RCODE_NXDOMAIN || + FLAGS_GET_RCODE(msg->flags) == LDNS_RCODE_YXDOMAIN) && msg->qdcount == 0) return 0; @@ -1074,7 +1105,7 @@ scrub_message(sldns_buffer* pkt, struct msg_parse* msg, } /* normalize the response, this cleans up the additional. */ - if(!scrub_normalize(pkt, msg, qinfo, region, env)) + if(!scrub_normalize(pkt, msg, qinfo, region, env, zonename)) return 0; /* delete all out-of-zone information */ if(!scrub_sanitize(pkt, msg, qinfo, zonename, env, ie, qstate)) From nobody Wed Nov 26 16:13:21 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dGl3P5dr7z6JGcs for ; Wed, 26 Nov 2025 16:13:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dGl3P44PPz3Yqy for ; Wed, 26 Nov 2025 16:13:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764173601; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fQrQJ5Ao3GJmbdGV7lOB2WFxLp4pbN6esw6rOT22Wac=; b=w9yi4iQuGVyDHqds6xHx80vcLPmlxuxLBVaCc581bwGwyO/naR9zNH7FUDEUI1qs5JkxnH DMNr6aEusKh8qtW8u4YOgLCKreQ2fwIVijYrpcGycX6DnaKaJcrv+3c3L1hXC7M485ckR3 TfgOknzK6Bc2RVMwFXIlaAGXWVfRb0iGNEYJe2fSsagirD7J1//q9e13FgTV9EWtnz5p4h HeoH+NlkFuzWWN4WLFeVoUqCOkrsxmEE1pU0R9MYAnnUSDfLTuR7jdP6HnwwvMCoWG9gBf BGnnJbaRTvX1djw+fZqBqg6vL2J7YJwJWdov9ttg77hqr650/B//39iqCrzdjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764173601; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fQrQJ5Ao3GJmbdGV7lOB2WFxLp4pbN6esw6rOT22Wac=; b=X/Pc3HcJoReiVZtcFR+LElJSfZc4XURMBzsGFZ8cw3ZBimn9+gmd0uJDbAwevlnhn2SPXg LV9Jp0UARKqdbrzyhRgQCoIRVeps5UQ/E9jRa7zSWZBuS7Mn+VNPMBoJ055DNNxIl5JrmD ZOr9oHgcGSiMifVdnNIBhJLqzVAQNK1ePL4WTgX2sgXxrROacOTAz0ead2embe3fAVW3kI tuzRdcM8mQ48FtMrnk83rE5HVZfmJUefas6Wx4njIhh5mC/kqEheRrNLQDjv+5OyXtN4a2 rMAt/M1X/h82bgA/VNV2qxxqw+qNvr6fbXl0kHxo5Aa1UiPYVcT1KixDAzy+jw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764173601; a=rsa-sha256; cv=none; b=rQKfCd4WuQE2uJLJMltMsLty6YzXu3hWmILj2hPFjJLYTMVT/tWFkLGOc759JWTTxIS0O9 tX+1jWWMSYC5e+k7WTQ0VH56TSqsoYpkI43cyqhblvo5g5UfTzDK6b5/ZsfSusHOphoLBt IcZPrfgOiPEZ1NQBhyJHm9r8QVRG4jfODrSZFNBusxnWVclWos65l57+5IeXdg/34kG0J+ aBP331mnai+ZnkO0gWsVr8SR5FEdpWO0nxHmSNfBzmglVE+kopVlKHEp+sIAf3Mtie0fLr zpzMvYR0mM+RnP0bjn5yTQoYxm/jUjgX5r54Qttgz6nkPvuTb0eyBlLwvRzkPw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dGl3P3g5YztnV for ; Wed, 26 Nov 2025 16:13:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 35c10 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 26 Nov 2025 16:13:21 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Tetlow Subject: git: c7ccd5b3f879 - releng/15.0 - Add UPDATING entry and bump version number. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gordon X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.0 X-Git-Reftype: branch X-Git-Commit: c7ccd5b3f879373100ba6ca09468e8a6a7836049 Auto-Submitted: auto-generated Date: Wed, 26 Nov 2025 16:13:21 +0000 Message-Id: <69272721.35c10.311c13ef@gitrepo.freebsd.org> The branch releng/15.0 has been updated by gordon: URL: https://cgit.FreeBSD.org/src/commit/?id=c7ccd5b3f879373100ba6ca09468e8a6a7836049 commit c7ccd5b3f879373100ba6ca09468e8a6a7836049 Author: Gordon Tetlow AuthorDate: 2025-11-22 08:46:59 +0000 Commit: Gordon Tetlow CommitDate: 2025-11-26 16:12:45 +0000 Add UPDATING entry and bump version number. Approved by: so Approved by: re (cperciva) --- UPDATING | 6 ++++++ sys/conf/newvers.sh | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/UPDATING b/UPDATING index e15cb2e1a17c..0db786a70646 100644 --- a/UPDATING +++ b/UPDATING @@ -12,6 +12,12 @@ Items affecting the ports and packages system can be found in /usr/ports/UPDATING. Please read that file before updating system packages and/or ports. +20251126: + 15.0-RC4-p1 SA-25:10.unbound + + Fix DNS cache poison through YXDOMAIN and nodata non-referral + answers. [SA-25:10.unbound] + 20251115: The FreeBSD-base repository is now defined in /etc/pkg/FreeBSD.conf, disabled by default. In -CURRENT and -STABLE this points at nightly diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh index 53749b31fb6e..9d9a75a22c25 100644 --- a/sys/conf/newvers.sh +++ b/sys/conf/newvers.sh @@ -51,7 +51,7 @@ TYPE="FreeBSD" REVISION="15.0" -BRANCH="RC4" +BRANCH="RC4-p1" if [ -n "${BRANCH_OVERRIDE}" ]; then BRANCH=${BRANCH_OVERRIDE} fi From nobody Wed Nov 26 16:13:31 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dGl3b67Nfz6JGmh for ; Wed, 26 Nov 2025 16:13:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dGl3b2ZSWz3ZHn for ; Wed, 26 Nov 2025 16:13:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764173611; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Mbwba5Cyy+767/8/YdukBquXeQMQUBRqox8vMFtDhuA=; b=eBK01cqM7PY+sLUtkUOezzGpVpLFQ7BMtFrua1x1tuMwyLoo5JCuNQTw+OxHOndXe8t3YJ lE0XZgm9HDgFnnUmf5WWMJOC3UY80fj9dhrpi6a9f23gcT5RUADZt07KaetPowYujLGCb6 1HMfSgl7FuroREvEWKe6Em24fSA6SK6dWA0nfwzILOqSS1AqTv6NJzwAvT0a4JOIpEPYQM frvXLdWIt9RQJiRCMmiWeeqMmIeMPBqD2Rl+cFGgixVBdi2WYyqdUa6HDzRb6WsAOpmSwL MFVByHQRBjhtlZPzdGSPd/KLDkJ+QyYuPA7/+j+U7JhwzuV1cMLFZ7PduHJ8Ng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764173611; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Mbwba5Cyy+767/8/YdukBquXeQMQUBRqox8vMFtDhuA=; b=o7ZXl/0/ej/cO5dR2UejHi+FdkMsRgPO52wkMz1zTKjZBQAS4Mo4NwKY2x4ePEbvPxhKAg cPLvMqnC6cCdoquO7PAjeSIAtAwRBY6c5tFi/lXp66tHlFxcSgJY0rOl6P5Fds8H+TfPUY zJtEk3pRiSBMOS0PJNNl6R5ehCaEpQChzQJnMT7Szjz4AO9XYnK3Tzzdsdp0QdrxBjw9IL Gl3tpfFiZiXcVQfuyqWUoEY+I1KrpjPFg9WGYuzmpt2/JnzTegBVrNp2p9Kv1VI9MtGcr9 LoHNvtZWC45xvI0cNhsDOokDaCfOXFmD31QvejD3RFUHYKRU3ct6xv65KN//sA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764173611; a=rsa-sha256; cv=none; b=GwLrKhGikVLdjQG/w2oBtqIRCZfnqRZWwnjfgtISG6JR+OZRd1rvQ4J3ciAPRD5CUnOK3d 93CD3viokQe5lymfHeTTcSuiONE8uPYLvCVikGhjqlgl46OaOdvm/RqjGEZzCWGDnemIGp M7fI5B8hm4dz1W68nNIQchuwj2DCNQlpQ5R26pQYobiqJmOubNrO1fARvXEEvyCSrCTDaq O3XIx6z3d28QDox7M5bgR4n8/03tDV1aBbGbCdv2pwv3vZ/6HWnaqLYJ1Ro3niWHu2jNmK KLKG9PJXwgyOsIiBIOPKk6GdCPqJC6aHxL9Suc8GmkFWdZerresI8IX4qqZXEg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dGl3b2B5HztyV for ; Wed, 26 Nov 2025 16:13:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 33df7 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 26 Nov 2025 16:13:31 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Tetlow Subject: git: 476b20984a6f - releng/14.3 - Add UPDATING entries and bump version. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gordon X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.3 X-Git-Reftype: branch X-Git-Commit: 476b20984a6fed7e966f7b790444e23700603b6b Auto-Submitted: auto-generated Date: Wed, 26 Nov 2025 16:13:31 +0000 Message-Id: <6927272b.33df7.64835120@gitrepo.freebsd.org> The branch releng/14.3 has been updated by gordon: URL: https://cgit.FreeBSD.org/src/commit/?id=476b20984a6fed7e966f7b790444e23700603b6b commit 476b20984a6fed7e966f7b790444e23700603b6b Author: Gordon Tetlow AuthorDate: 2025-11-26 16:12:27 +0000 Commit: Gordon Tetlow CommitDate: 2025-11-26 16:12:27 +0000 Add UPDATING entries and bump version. Approved by: so --- UPDATING | 5 +++++ sys/conf/newvers.sh | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/UPDATING b/UPDATING index 6af1b31f0b57..09b22327d84d 100644 --- a/UPDATING +++ b/UPDATING @@ -12,6 +12,11 @@ Items affecting the ports and packages system can be found in /usr/ports/UPDATING. Please read that file before updating system packages and/or ports. +20251126: + 14.3-RELEASE-p6 SA-25:10.unbound + + Fix cache poison in local-unbound service. [SA-25:10.unbound] + 20251022: 14.3-RELEASE-p5 SA-25:09.netinet diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh index 99c29d44db02..49a6dc75c455 100644 --- a/sys/conf/newvers.sh +++ b/sys/conf/newvers.sh @@ -53,7 +53,7 @@ TYPE="FreeBSD" REVISION="14.3" -BRANCH="RELEASE-p5" +BRANCH="RELEASE-p6" if [ -n "${BRANCH_OVERRIDE}" ]; then BRANCH=${BRANCH_OVERRIDE} fi From nobody Wed Nov 26 16:13:30 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dGl3Z5D9Lz6JGk8 for ; Wed, 26 Nov 2025 16:13:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dGl3Z1pJHz3ZKn for ; Wed, 26 Nov 2025 16:13:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764173610; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QEvs6T9S5SXnM6a0ppPZdhZbaZXMqvfPKkd3dZoqnFI=; b=jepT5r7IP/a28v+uitMr7tLeq4BZ7pqvrR+45GqDHbcyN79+9QaTyRuDmFiHekSCl3urbE qP/1PLbklF48ner28z61L36cWtBT1Jd93FCSo/1VFhmvpSVI2HPJd0wiSge/y2KTvqwLsp aJPnbIl1ZfiqIJQ1bK3jESHHHXDeDqA8pZU0s+jMrcXwLqhLBiraJy4DyighjpP09rffOO 8p4pD56UBQjafw2WueU94xlXzI90CRv7GfhIv5mj3llxJjM8tvrhZwAEVTIXWVWsvE+PV/ WrP9DIhvJS2KI6cIXjcvbcuEvapQU4LimRrPGU6e9EiV6r/Czj2UJL0+SCdFUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764173610; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QEvs6T9S5SXnM6a0ppPZdhZbaZXMqvfPKkd3dZoqnFI=; b=UnWaq6AXr+FlFOTZTsCHvG59nZ3dkMXE6fu5MdSXArc3gZMRNFRnIKHJlncbFSmOV0K9Kf wu4TJAEzQs9RoRE6bYFFpXtz2Zhlm+4JgefxBlfAuzoEbDS1mM2ukSTek3isKAL8buMhCW uzxXjsEag++mcYEF3lpDZ4c5LezwwJ2o5jxULel3ItvRGlhFWzn7jodvSEmqnjWqdtSj1N xdZIadT2fWLuisPMf8ox5Zwj1h0XU6vOioXVcTK2ewp8PcVOmgr1LdDsbaA4Ayhv6Cg6w7 BUI+sZ7MymZoKtHX4fEMpiwdGyObShBN66iLn+61blxePvHHy6fZJ00OwnjA/A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764173610; a=rsa-sha256; cv=none; b=PTRcJXkqrbYyl7qoK9HEuIViFHo5XuB3YB3AJRKwf5n49GRKMWYzYUQ/fJCRKtTUbYM9Fd sX372avkQ/EEZhimxJNugpwut56o6D9XZebsbQLye97PfF3NzjsDl1cpNbvqjUr9QNaPTc srs6QBDec8Mti4GRQBnzgY2eoKv1Bq4F1Q3C5K1U0xjvgX/t3i9jrzs1t4ON1u5cYckVaX 8plixffqJMZecVFP4pb/hFByVW8cK4OX3hL4n1p+DOQZZxJczrBEUZTwuRIAY/fYfMnzse bEkde8s+dKGq2LFazUneY9twYmZP0oDQWxJln3q917006vZwttmmgbzQYNOOTA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dGl3Z1PbHztT0 for ; Wed, 26 Nov 2025 16:13:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 363da by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 26 Nov 2025 16:13:30 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Tetlow Subject: git: 18c4eb2cc642 - releng/14.3 - Add a fix to scrub unsolicited NS RRSets to prevent cache poisoning. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gordon X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.3 X-Git-Reftype: branch X-Git-Commit: 18c4eb2cc6425d7397f68be0830455ec2ded926e Auto-Submitted: auto-generated Date: Wed, 26 Nov 2025 16:13:30 +0000 Message-Id: <6927272a.363da.568e2bfc@gitrepo.freebsd.org> The branch releng/14.3 has been updated by gordon: URL: https://cgit.FreeBSD.org/src/commit/?id=18c4eb2cc6425d7397f68be0830455ec2ded926e commit 18c4eb2cc6425d7397f68be0830455ec2ded926e Author: Gordon Tetlow AuthorDate: 2025-11-26 16:08:04 +0000 Commit: Gordon Tetlow CommitDate: 2025-11-26 16:08:04 +0000 Add a fix to scrub unsolicited NS RRSets to prevent cache poisoning. Approved by: so Obtained from: NLnet Labs Security: FreeBSD-SA-25:10.unbound Security: CVE-2025-11411 --- contrib/unbound/iterator/iter_scrub.c | 55 ++++++++++++++++++++++++++++++++--- 1 file changed, 51 insertions(+), 4 deletions(-) diff --git a/contrib/unbound/iterator/iter_scrub.c b/contrib/unbound/iterator/iter_scrub.c index 49a5f5da19c2..b02b4dc484bf 100644 --- a/contrib/unbound/iterator/iter_scrub.c +++ b/contrib/unbound/iterator/iter_scrub.c @@ -418,12 +418,13 @@ shorten_rrset(sldns_buffer* pkt, struct rrset_parse* rrset, int count) * @param qinfo: original query. * @param region: where to allocate synthesized CNAMEs. * @param env: module env with config options. + * @param zonename: name of server zone. * @return 0 on error. */ static int scrub_normalize(sldns_buffer* pkt, struct msg_parse* msg, struct query_info* qinfo, struct regional* region, - struct module_env* env) + struct module_env* env, uint8_t* zonename) { uint8_t* sname = qinfo->qname; size_t snamelen = qinfo->qname_len; @@ -431,7 +432,8 @@ scrub_normalize(sldns_buffer* pkt, struct msg_parse* msg, int cname_length = 0; /* number of CNAMEs, or DNAMEs */ if(FLAGS_GET_RCODE(msg->flags) != LDNS_RCODE_NOERROR && - FLAGS_GET_RCODE(msg->flags) != LDNS_RCODE_NXDOMAIN) + FLAGS_GET_RCODE(msg->flags) != LDNS_RCODE_NXDOMAIN && + FLAGS_GET_RCODE(msg->flags) != LDNS_RCODE_YXDOMAIN) return 1; /* For the ANSWER section, remove all "irrelevant" records and add @@ -470,6 +472,11 @@ scrub_normalize(sldns_buffer* pkt, struct msg_parse* msg, &aliaslen, pkt)) { verbose(VERB_ALGO, "synthesized CNAME " "too long"); + if(FLAGS_GET_RCODE(msg->flags) == LDNS_RCODE_YXDOMAIN) { + prev = rrset; + rrset = rrset->rrset_all_next; + continue; + } return 0; } cname_length++; @@ -634,6 +641,45 @@ scrub_normalize(sldns_buffer* pkt, struct msg_parse* msg, "RRset:", pkt, msg, prev, &rrset); continue; } + /* If the NS set is a promiscuous NS set, scrub that + * to remove potential for poisonous contents that + * affects other names in the same zone. Remove + * promiscuous NS sets in positive answers, that + * thus have records in the answer section. Nodata + * and nxdomain promiscuous NS sets have been removed + * already. Since the NS rrset is scrubbed, its + * address records are also not marked to be allowed + * and are removed later. */ + if(FLAGS_GET_RCODE(msg->flags) == LDNS_RCODE_NOERROR && + msg->an_rrsets != 0 && + 1 /* env->cfg->iter_scrub_promiscuous */) { + remove_rrset("normalize: removing promiscuous " + "RRset:", pkt, msg, prev, &rrset); + continue; + } + /* Also delete promiscuous NS for other RCODEs */ + if(FLAGS_GET_RCODE(msg->flags) != LDNS_RCODE_NOERROR + && 1 /* env->cfg->iter_scrub_promiscuous */) { + remove_rrset("normalize: removing promiscuous " + "RRset:", pkt, msg, prev, &rrset); + continue; + } + /* Also delete promiscuous NS for NOERROR with nodata + * for authoritative answers, not for delegations. + * NOERROR with an_rrsets!=0 already handled. + * Also NOERROR and soa_in_auth already handled. + * NOERROR with an_rrsets==0, and not a referral. + * referral is (NS not the zonename, noSOA). + */ + if(FLAGS_GET_RCODE(msg->flags) == LDNS_RCODE_NOERROR + && msg->an_rrsets == 0 + && !(dname_pkt_compare(pkt, rrset->dname, + zonename) != 0 && !soa_in_auth(msg)) + && 1 /* env->cfg->iter_scrub_promiscuous */) { + remove_rrset("normalize: removing promiscuous " + "RRset:", pkt, msg, prev, &rrset); + continue; + } if(nsset == NULL) { nsset = rrset; } else { @@ -1044,7 +1090,8 @@ scrub_message(sldns_buffer* pkt, struct msg_parse* msg, /* this is not required for basic operation but is a forgery * resistance (security) feature */ if((FLAGS_GET_RCODE(msg->flags) == LDNS_RCODE_NOERROR || - FLAGS_GET_RCODE(msg->flags) == LDNS_RCODE_NXDOMAIN) && + FLAGS_GET_RCODE(msg->flags) == LDNS_RCODE_NXDOMAIN || + FLAGS_GET_RCODE(msg->flags) == LDNS_RCODE_YXDOMAIN) && msg->qdcount == 0) return 0; @@ -1058,7 +1105,7 @@ scrub_message(sldns_buffer* pkt, struct msg_parse* msg, } /* normalize the response, this cleans up the additional. */ - if(!scrub_normalize(pkt, msg, qinfo, region, env)) + if(!scrub_normalize(pkt, msg, qinfo, region, env, zonename)) return 0; /* delete all out-of-zone information */ if(!scrub_sanitize(pkt, msg, qinfo, zonename, env, ie, qstate)) From nobody Wed Nov 26 16:13:41 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dGl3n2zPtz6JGqj for ; Wed, 26 Nov 2025 16:13:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dGl3n1Pdnz3ZcX for ; Wed, 26 Nov 2025 16:13:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764173621; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IpZFGiMm1aLZfhmE5QLDI1eNyq2sFvNmDESMDdhdycI=; b=JgW6ff7GBFpVZx05xu4BfqPFBKfiKnv0j2Bc2bCan4gG7XkA9yKbe+2iJYQBlHUVYkiihx pISMhVHR5mW83IAREy8hwQF8wdpIYmO2OovSo/+cg5nWMAZc80mxDb+eAIZqigxXG4e82U ID57OkyBsgdeAaeIbECWtgAO9yMzVdef91CNUF8AW0/qBHP+FXYsmwk9HYmdSrTc26G4tW ExOzgvy5fv5USbUihFdk89l8jZiQ+wbTI7JPOCQ5iE66aBor/TbvA11v96o7qp0MMUKV/8 MH966h4e7JZKUUw+WNQrhPM9ELE2VNtGIlQsmQPXUJ4PonB4U5/Y4+kZLnWXyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764173621; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IpZFGiMm1aLZfhmE5QLDI1eNyq2sFvNmDESMDdhdycI=; b=Exwl05iVYbFjDo4vVuidYbd1jX9yq9VOEcMiWz1KSdSMqgrlCPJwuG2+RCRDTs7egqcFqI XaV65giBUkaV8DMvry3zbDtNDZ3heHehtrjg3MxiJgZdA+zVWemvUi3G0PGm32nfpBZDNG LI9vpF00nO9jzYZ4DscLcsRvfrrxkGrYNlUhS+nZzrwu8Svc3s39ZkNAI9NNDrwTtRKVvd ct+RNZuD82Y9FFzHiBdn04kgPvPMzp08JIVDmCsisApWeLHZ77SQcsK2uHaMTV2kRWl52O wxA+5bOX6iUbtFr6RuzxN9UfEgQBBmR3lVe27AvIsJ/g8X6xzvyUFfgIOh8bWA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764173621; a=rsa-sha256; cv=none; b=XZ65uDKApkMzXVuB5L/vRJKgz9Hvqg9fevGEF22fTS4jFRPzkCPtHPET5Lc0RVmvdIJEy4 MHiU3ySc4Gd3ePiO3I3PxhxgoCR2WMs1JL9GBpAMhygEfY4d89QOwyPJILdgYP0wxdIUYx FlmBkYNTmrGAWBGgZ9a+CAfC5DbrLm0pk/t4mq/lGEUwgU4zIoD0vTy+RxvcfrellUUoJI dRoPK6UDOBtF1UbEbR2ixMCyahATzgdFmJfKttumocheULJj1BGzi+nm1EgK9L5TkO7hso MnbVKJvTpAXA4t3S3SpDntYud0H/jckGa2yd8ZSB2V/R4xIVC0yV1q/RFaYkAw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dGl3n0wF8ztbp for ; Wed, 26 Nov 2025 16:13:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 33d75 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 26 Nov 2025 16:13:41 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Tetlow Subject: git: 9b0808259a8a - releng/13.5 - Add a fix to scrub unsolicited NS RRSets to prevent cache poisoning. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gordon X-Git-Repository: src X-Git-Refname: refs/heads/releng/13.5 X-Git-Reftype: branch X-Git-Commit: 9b0808259a8a8dcd1236038378b8abe0617b0777 Auto-Submitted: auto-generated Date: Wed, 26 Nov 2025 16:13:41 +0000 Message-Id: <69272735.33d75.7ca3914c@gitrepo.freebsd.org> The branch releng/13.5 has been updated by gordon: URL: https://cgit.FreeBSD.org/src/commit/?id=9b0808259a8a8dcd1236038378b8abe0617b0777 commit 9b0808259a8a8dcd1236038378b8abe0617b0777 Author: Gordon Tetlow AuthorDate: 2025-11-26 16:09:36 +0000 Commit: Gordon Tetlow CommitDate: 2025-11-26 16:09:36 +0000 Add a fix to scrub unsolicited NS RRSets to prevent cache poisoning. Approved by: so Obtained from: NLnet Labs Security: FreeBSD-SA-25:10.unbound Security: CVE-2025-11411 --- contrib/unbound/iterator/iter_scrub.c | 55 ++++++++++++++++++++++++++++++++--- 1 file changed, 51 insertions(+), 4 deletions(-) diff --git a/contrib/unbound/iterator/iter_scrub.c b/contrib/unbound/iterator/iter_scrub.c index 49a5f5da19c2..b02b4dc484bf 100644 --- a/contrib/unbound/iterator/iter_scrub.c +++ b/contrib/unbound/iterator/iter_scrub.c @@ -418,12 +418,13 @@ shorten_rrset(sldns_buffer* pkt, struct rrset_parse* rrset, int count) * @param qinfo: original query. * @param region: where to allocate synthesized CNAMEs. * @param env: module env with config options. + * @param zonename: name of server zone. * @return 0 on error. */ static int scrub_normalize(sldns_buffer* pkt, struct msg_parse* msg, struct query_info* qinfo, struct regional* region, - struct module_env* env) + struct module_env* env, uint8_t* zonename) { uint8_t* sname = qinfo->qname; size_t snamelen = qinfo->qname_len; @@ -431,7 +432,8 @@ scrub_normalize(sldns_buffer* pkt, struct msg_parse* msg, int cname_length = 0; /* number of CNAMEs, or DNAMEs */ if(FLAGS_GET_RCODE(msg->flags) != LDNS_RCODE_NOERROR && - FLAGS_GET_RCODE(msg->flags) != LDNS_RCODE_NXDOMAIN) + FLAGS_GET_RCODE(msg->flags) != LDNS_RCODE_NXDOMAIN && + FLAGS_GET_RCODE(msg->flags) != LDNS_RCODE_YXDOMAIN) return 1; /* For the ANSWER section, remove all "irrelevant" records and add @@ -470,6 +472,11 @@ scrub_normalize(sldns_buffer* pkt, struct msg_parse* msg, &aliaslen, pkt)) { verbose(VERB_ALGO, "synthesized CNAME " "too long"); + if(FLAGS_GET_RCODE(msg->flags) == LDNS_RCODE_YXDOMAIN) { + prev = rrset; + rrset = rrset->rrset_all_next; + continue; + } return 0; } cname_length++; @@ -634,6 +641,45 @@ scrub_normalize(sldns_buffer* pkt, struct msg_parse* msg, "RRset:", pkt, msg, prev, &rrset); continue; } + /* If the NS set is a promiscuous NS set, scrub that + * to remove potential for poisonous contents that + * affects other names in the same zone. Remove + * promiscuous NS sets in positive answers, that + * thus have records in the answer section. Nodata + * and nxdomain promiscuous NS sets have been removed + * already. Since the NS rrset is scrubbed, its + * address records are also not marked to be allowed + * and are removed later. */ + if(FLAGS_GET_RCODE(msg->flags) == LDNS_RCODE_NOERROR && + msg->an_rrsets != 0 && + 1 /* env->cfg->iter_scrub_promiscuous */) { + remove_rrset("normalize: removing promiscuous " + "RRset:", pkt, msg, prev, &rrset); + continue; + } + /* Also delete promiscuous NS for other RCODEs */ + if(FLAGS_GET_RCODE(msg->flags) != LDNS_RCODE_NOERROR + && 1 /* env->cfg->iter_scrub_promiscuous */) { + remove_rrset("normalize: removing promiscuous " + "RRset:", pkt, msg, prev, &rrset); + continue; + } + /* Also delete promiscuous NS for NOERROR with nodata + * for authoritative answers, not for delegations. + * NOERROR with an_rrsets!=0 already handled. + * Also NOERROR and soa_in_auth already handled. + * NOERROR with an_rrsets==0, and not a referral. + * referral is (NS not the zonename, noSOA). + */ + if(FLAGS_GET_RCODE(msg->flags) == LDNS_RCODE_NOERROR + && msg->an_rrsets == 0 + && !(dname_pkt_compare(pkt, rrset->dname, + zonename) != 0 && !soa_in_auth(msg)) + && 1 /* env->cfg->iter_scrub_promiscuous */) { + remove_rrset("normalize: removing promiscuous " + "RRset:", pkt, msg, prev, &rrset); + continue; + } if(nsset == NULL) { nsset = rrset; } else { @@ -1044,7 +1090,8 @@ scrub_message(sldns_buffer* pkt, struct msg_parse* msg, /* this is not required for basic operation but is a forgery * resistance (security) feature */ if((FLAGS_GET_RCODE(msg->flags) == LDNS_RCODE_NOERROR || - FLAGS_GET_RCODE(msg->flags) == LDNS_RCODE_NXDOMAIN) && + FLAGS_GET_RCODE(msg->flags) == LDNS_RCODE_NXDOMAIN || + FLAGS_GET_RCODE(msg->flags) == LDNS_RCODE_YXDOMAIN) && msg->qdcount == 0) return 0; @@ -1058,7 +1105,7 @@ scrub_message(sldns_buffer* pkt, struct msg_parse* msg, } /* normalize the response, this cleans up the additional. */ - if(!scrub_normalize(pkt, msg, qinfo, region, env)) + if(!scrub_normalize(pkt, msg, qinfo, region, env, zonename)) return 0; /* delete all out-of-zone information */ if(!scrub_sanitize(pkt, msg, qinfo, zonename, env, ie, qstate)) From nobody Wed Nov 26 16:13:42 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dGl3p3r9Rz6JGVq for ; Wed, 26 Nov 2025 16:13:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dGl3p2SX9z3Zfk for ; Wed, 26 Nov 2025 16:13:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764173622; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=d6eVmxsK+pBZv3YLIa/tF/9TMIGn6dwI8ChcIZlEa/8=; b=ssCh1eECGn1OxmCIObJRSU3HYUNFoTk5tXwPZuK5HZu2kh9pBuPTHV6dQcGTExAOKqp/Ng iMo5L+U/GDB7BgBcYuf4Xjg4RHtLGPZe9+Cxtz/iTMY9BPdO8DbXrBYqsEVrPVSd+rKQ3F 2z6oisIsnizD/FuEOFkqnk7+DI6Mno1DUGomCdRvKxweqPC/oJ1HFPqV4hLSccfEGxufNQ IJEJ5uHoJU6QcX87jl+KQZTBrNnuLuLT4rQES2yEyqfwem3K/0dZzMi8m74kxvfTOliOUI GWsB8t6VVnrEdVPuLMQYJ5meBFuVYxai4Cb3pS6YogBEKzj9nu91/5bjRMKqYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764173622; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=d6eVmxsK+pBZv3YLIa/tF/9TMIGn6dwI8ChcIZlEa/8=; b=GNNcAL8GCctfhIwUOg7sLNq/5eerXF/bmfMYRNiLb29KLIfdCkvHfJ4ZMGab/zGZsxKbpx Ian++/XGXblxd6VK7GLPvCeahteHKHz26b9lproHRgkGOndOn3W3K3uBA+On6zESESBCY5 UttbVPXISujzvvPbPxXruzr8qFFOgMXdVtQUAf8Ia+LOtu6AmRmAXJt2Gi6YW6CseT6Ile qs0QoW85lT7Qsw+1/UoFSkH/ZFfnm8jE+bHyMQ/pYFaKN/EP10T75xAHu9oUL95VpX0b75 kzqI8qDqw+l8hTIyFMYqTmJEWsiFSJ2mj4mIfarWpBA4HNf1I2LyMMEePqmsCQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764173622; a=rsa-sha256; cv=none; b=QQy+01SVpUw9Lb/FJLGfaHjVTvYTuZ/B4BaG4w2F9JjurmhEMm7yN3eb1Ow+qzFKA7QSwV ayx7xSkV7G6UqHrBdEvfVUoVT6UENsf8RAmNgBFb2RioicONVtv2yyXf6QMOSJhhAwBl5f 3G13I0L3Q0301XvvWepbkSOsnEJVSnIFKW6bJ00nkl1nsGBahZD006c40e294EZt60EzBS sBEz91Ci15eT4g1OQmOUceRGFOSDXLL06JBK4ouX7pEavBXJ0JvOESDLzXch1v5KaE6Scv zqVylkA9Neyj6nAofUMkhEF2MTrF4ZGaAM48W2bFsK8mrPOODc/d8MolKfse8w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dGl3p1kwqztyX for ; Wed, 26 Nov 2025 16:13:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 34f6d by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 26 Nov 2025 16:13:42 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Tetlow Subject: git: 4fc17862cb50 - releng/13.5 - Add UPDATING entries and bump version. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gordon X-Git-Repository: src X-Git-Refname: refs/heads/releng/13.5 X-Git-Reftype: branch X-Git-Commit: 4fc17862cb506bfe121c293500177e8447120068 Auto-Submitted: auto-generated Date: Wed, 26 Nov 2025 16:13:42 +0000 Message-Id: <69272736.34f6d.66765d59@gitrepo.freebsd.org> The branch releng/13.5 has been updated by gordon: URL: https://cgit.FreeBSD.org/src/commit/?id=4fc17862cb506bfe121c293500177e8447120068 commit 4fc17862cb506bfe121c293500177e8447120068 Author: Gordon Tetlow AuthorDate: 2025-11-26 16:12:10 +0000 Commit: Gordon Tetlow CommitDate: 2025-11-26 16:12:10 +0000 Add UPDATING entries and bump version. Approved by: so --- UPDATING | 5 +++++ sys/conf/newvers.sh | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/UPDATING b/UPDATING index 55c65b3afd6b..270e20be199b 100644 --- a/UPDATING +++ b/UPDATING @@ -12,6 +12,11 @@ Items affecting the ports and packages system can be found in /usr/ports/UPDATING. Please read that file before updating system packages and/or ports. +20251126: + 13.5-RELEASE-p7 SA-25:10.unbound + + Fix cache poison in local-unbound service. [SA-25:10.unbound] + 20251022: 13.5-RELEASE-p6 SA-25:09.netinet diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh index add7f72dcaa9..a72f9f110df6 100644 --- a/sys/conf/newvers.sh +++ b/sys/conf/newvers.sh @@ -53,7 +53,7 @@ TYPE="FreeBSD" REVISION="13.5" -BRANCH="RELEASE-p6" +BRANCH="RELEASE-p7" if [ -n "${BRANCH_OVERRIDE}" ]; then BRANCH=${BRANCH_OVERRIDE} fi From nobody Wed Nov 26 16:39:21 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dGldQ29lgz6JJFW for ; Wed, 26 Nov 2025 16:39:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dGldQ1cqxz3gJD for ; Wed, 26 Nov 2025 16:39:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764175162; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9pkAp4n13MIUz0sruVokog29iMdQefgtWdZ9uRXpDBM=; b=fbXET1jR8HuWaw6pl/PbXj4y+zR1+pPC5xK+dgrQX3lbe7/CZt6E7qVC6LUJyw8VHS58RE nd2vO2y1jCFpN8y46qK2eDrY5/VAIWUpEcuF9pQJNI3M7up6Nd+5CM9CbDFYDqC0aHnot8 n0QsAj7rvCPUXEsA/jAz4VUzxEe1hw0ofO1mfOJYPX4vKMEAu8h8ZOJoTkueW2/GwBcjyA gRYSSCU+GUYgnmYGO/veifJHQk83osSh6T65ZEAstfuFnGm8BmnxO1zUbnTBfeKdjopzNy BGKuqCqL8dGQpk00ZBmUkTV0CyLhi0LnzPsO7J2iaQpFVMg3BfW9Gkrco+yyuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764175162; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9pkAp4n13MIUz0sruVokog29iMdQefgtWdZ9uRXpDBM=; b=seMgCkB2ErmI/Gm/8krQSwtw6Y5da2IIrF1I0/lZcpeugSxzesMh6rhRETnIsYCkYVITSz k3s48HyiaJLP5dB1MOQgCp5ejJdCDS6kiGElhbtVbyI1YY+ZIpmcE9DsVzDcdVe+qRF2yl Vrws1vsCXWVmlq08/YxCVaEeP4UONkCWEgO7e1gDV373hu77cUAQm/7n8RicDjBgfpOkrv i1NQdhGodoLFy6XfCuXwuCahVvA4YM3qvOQ0cdhabpKBgjnJEUBu1e+4iYIFVnNL0je8Yj vRG2mDiD1Scb/HE4pKAikOeuT5uQmAmPzRpngq+hu0JnRCwU1nAI1zL8vFVT2g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764175162; a=rsa-sha256; cv=none; b=JYweL7GsKbSlqYeRicDEqEChtKjkYBCHIS7UiVa0ToS+bWKEfRyZEb/uZSPH2Bv3WLPjB+ LUYsa6jyYFXRgi7iFbJvna28E1UFSvjVstXbyvinr05mRmk5LTozL28GXw11lQF0ysrZOx 4WSK5wVK5SZ4XeHpEQttDpL/64S+oyxt+LRuR29MPdHaPeTZLTuLY4TTpjdBPhw7AYcxD8 hT5H7bYP5M+68jr5vBeRtoH3oZpoZ91uGuxwFbgYFquHv9LR8u8fEefESAI+R74lMhcSmY 7EnvoZZ5KIIzCA+CAKycmI0lzqB2pgf/LVPjiD+8p+QZO4uyiSPRZQxT86Elkw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dGldP71mQzvT7 for ; Wed, 26 Nov 2025 16:39:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 37fb0 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 26 Nov 2025 16:39:21 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ruslan Bukin Subject: git: 974ecf68903d - main - xae(4), axidma(4): rewrite DMA operation. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: br X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 974ecf68903d3887324f534a3bca21f1ae501819 Auto-Submitted: auto-generated Date: Wed, 26 Nov 2025 16:39:21 +0000 Message-Id: <69272d39.37fb0.199f11e8@gitrepo.freebsd.org> The branch main has been updated by br: URL: https://cgit.FreeBSD.org/src/commit/?id=974ecf68903d3887324f534a3bca21f1ae501819 commit 974ecf68903d3887324f534a3bca21f1ae501819 Author: Ruslan Bukin AuthorDate: 2025-11-26 16:26:31 +0000 Commit: Ruslan Bukin CommitDate: 2025-11-26 16:38:07 +0000 xae(4), axidma(4): rewrite DMA operation. Due to performance constraints on a synthesized CHERI RISC-V core, remove usage of xdma(4) scatter-gather framework. Instead, provide a minimalistic interface between two drivers. This increases performance ~4-5 times. Tested using scp(1) and nc(1) on Codasip Prime. Sponsored by: CHERI Research Centre Differential Revision: https://reviews.freebsd.org/D53932 --- sys/conf/files.riscv | 3 +- sys/dev/xilinx/axidma.c | 528 ++---------------------- sys/dev/xilinx/axidma.h | 11 +- sys/dev/xilinx/axidma_if.m | 53 +++ sys/dev/xilinx/if_xae.c | 997 +++++++++++++++++++++++++++------------------ sys/dev/xilinx/if_xaevar.h | 51 ++- 6 files changed, 747 insertions(+), 896 deletions(-) diff --git a/sys/conf/files.riscv b/sys/conf/files.riscv index e77a15ce8dae..2a80064e88ba 100644 --- a/sys/conf/files.riscv +++ b/sys/conf/files.riscv @@ -23,7 +23,8 @@ dev/vmm/vmm_dev.c optional vmm dev/vmm/vmm_mem.c optional vmm dev/vmm/vmm_stat.c optional vmm dev/xilinx/axi_quad_spi.c optional xilinx_spi -dev/xilinx/axidma.c optional axidma xdma +dev/xilinx/axidma.c optional axidma +dev/xilinx/axidma_if.m optional axidma dev/xilinx/if_xae.c optional xae dev/xilinx/xlnx_pcib.c optional pci fdt xlnx_pcib kern/msi_if.m standard diff --git a/sys/dev/xilinx/axidma.c b/sys/dev/xilinx/axidma.c index 77a46c712980..29757a335dee 100644 --- a/sys/dev/xilinx/axidma.c +++ b/sys/dev/xilinx/axidma.c @@ -1,7 +1,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause * - * Copyright (c) 2019 Ruslan Bukin + * Copyright (c) 2019-2025 Ruslan Bukin * * This software was developed by SRI International and the University of * Cambridge Computer Laboratory (Department of Computer Science and @@ -30,13 +30,11 @@ * SUCH DAMAGE. */ -/* Xilinx AXI DMA controller driver. */ +/* + * Xilinx AXI Ethernet DMA controller driver. + */ -#include -#include "opt_platform.h" -#include #include -#include #include #include #include @@ -44,67 +42,32 @@ #include -#include -#include -#include - -#ifdef FDT -#include #include #include -#endif -#include #include -#include "xdma_if.h" +#include "axidma_if.h" -#define READ4(_sc, _reg) \ +#define AXIDMA_RD4(_sc, _reg) \ bus_space_read_4(_sc->bst, _sc->bsh, _reg) -#define WRITE4(_sc, _reg, _val) \ +#define AXIDMA_WR4(_sc, _reg, _val) \ bus_space_write_4(_sc->bst, _sc->bsh, _reg, _val) -#define READ8(_sc, _reg) \ +#define AXIDMA_RD8(_sc, _reg) \ bus_space_read_8(_sc->bst, _sc->bsh, _reg) -#define WRITE8(_sc, _reg, _val) \ +#define AXIDMA_WR8(_sc, _reg, _val) \ bus_space_write_8(_sc->bst, _sc->bsh, _reg, _val) -#define AXIDMA_DEBUG -#undef AXIDMA_DEBUG - -#ifdef AXIDMA_DEBUG -#define dprintf(fmt, ...) printf(fmt, ##__VA_ARGS__) -#else -#define dprintf(fmt, ...) -#endif - -extern struct bus_space memmap_bus; - -struct axidma_channel { - struct axidma_softc *sc; - xdma_channel_t *xchan; - bool used; - int idx_head; - int idx_tail; - - struct axidma_desc **descs; - vm_paddr_t *descs_phys; - uint32_t descs_num; +#define dprintf(fmt, ...) - vm_size_t mem_size; - vm_offset_t mem_paddr; - vm_offset_t mem_vaddr; - - uint32_t descs_used_count; -}; +#define AXIDMA_MAX_CHANNELS 2 struct axidma_softc { device_t dev; - struct resource *res[3]; + struct resource *res[1 + AXIDMA_MAX_CHANNELS]; bus_space_tag_t bst; bus_space_handle_t bsh; - void *ih[2]; - struct axidma_desc desc; - struct axidma_channel channels[AXIDMA_NCHANNELS]; + void *ih[AXIDMA_MAX_CHANNELS]; }; static struct resource_spec axidma_spec[] = { @@ -114,144 +77,19 @@ static struct resource_spec axidma_spec[] = { { -1, 0 } }; -#define HWTYPE_NONE 0 -#define HWTYPE_STD 1 - static struct ofw_compat_data compat_data[] = { - { "xlnx,eth-dma", HWTYPE_STD }, - { NULL, HWTYPE_NONE }, + { "xlnx,eth-dma", 1 }, + { NULL, 0 }, }; -static int axidma_probe(device_t dev); -static int axidma_attach(device_t dev); -static int axidma_detach(device_t dev); - -static inline uint32_t -axidma_next_desc(struct axidma_channel *chan, uint32_t curidx) -{ - - return ((curidx + 1) % chan->descs_num); -} - -static void -axidma_intr(struct axidma_softc *sc, - struct axidma_channel *chan) -{ - xdma_transfer_status_t status; - xdma_transfer_status_t st; - struct axidma_fdt_data *data; - xdma_controller_t *xdma; - struct axidma_desc *desc; - struct xdma_channel *xchan; - uint32_t tot_copied; - int pending; - int errors; - - xchan = chan->xchan; - xdma = xchan->xdma; - data = xdma->data; - - pending = READ4(sc, AXI_DMASR(data->id)); - WRITE4(sc, AXI_DMASR(data->id), pending); - - errors = (pending & (DMASR_DMAINTERR | DMASR_DMASLVERR - | DMASR_DMADECOREERR | DMASR_SGINTERR - | DMASR_SGSLVERR | DMASR_SGDECERR)); - - dprintf("%s: AXI_DMASR %x\n", __func__, - READ4(sc, AXI_DMASR(data->id))); - dprintf("%s: AXI_CURDESC %x\n", __func__, - READ4(sc, AXI_CURDESC(data->id))); - dprintf("%s: AXI_TAILDESC %x\n", __func__, - READ4(sc, AXI_TAILDESC(data->id))); - - tot_copied = 0; - - while (chan->idx_tail != chan->idx_head) { - desc = chan->descs[chan->idx_tail]; - cpu_dcache_wbinv_range((vm_offset_t)desc, - sizeof(struct axidma_desc)); - - if ((desc->status & BD_STATUS_CMPLT) == 0) - break; - - st.error = errors; - st.transferred = desc->status & BD_CONTROL_LEN_M; - tot_copied += st.transferred; - xchan_seg_done(xchan, &st); - - chan->idx_tail = axidma_next_desc(chan, chan->idx_tail); - atomic_subtract_int(&chan->descs_used_count, 1); - } - - /* Finish operation */ - status.error = errors; - status.transferred = tot_copied; - xdma_callback(chan->xchan, &status); -} - -static void -axidma_intr_rx(void *arg) -{ - struct axidma_softc *sc; - struct axidma_channel *chan; - - dprintf("%s\n", __func__); - - sc = arg; - chan = &sc->channels[AXIDMA_RX_CHAN]; - - axidma_intr(sc, chan); -} - -static void -axidma_intr_tx(void *arg) -{ - struct axidma_softc *sc; - struct axidma_channel *chan; - - dprintf("%s\n", __func__); - - sc = arg; - chan = &sc->channels[AXIDMA_TX_CHAN]; - - axidma_intr(sc, chan); -} - -static int -axidma_reset(struct axidma_softc *sc, int chan_id) -{ - int timeout; - - WRITE4(sc, AXI_DMACR(chan_id), DMACR_RESET); - - timeout = 100; - do { - if ((READ4(sc, AXI_DMACR(chan_id)) & DMACR_RESET) == 0) - break; - } while (timeout--); - - dprintf("timeout %d\n", timeout); - - if (timeout == 0) - return (-1); - - dprintf("%s: read control after reset: %x\n", - __func__, READ4(sc, AXI_DMACR(chan_id))); - - return (0); -} - static int axidma_probe(device_t dev) { - int hwtype; if (!ofw_bus_status_okay(dev)) return (ENXIO); - hwtype = ofw_bus_search_compatible(dev, compat_data)->ocd_data; - if (hwtype == HWTYPE_NONE) + if (!ofw_bus_search_compatible(dev, compat_data)->ocd_data) return (ENXIO); device_set_desc(dev, "Xilinx AXI DMA"); @@ -264,7 +102,6 @@ axidma_attach(device_t dev) { struct axidma_softc *sc; phandle_t xref, node; - int err; sc = device_get_softc(dev); sc->dev = dev; @@ -278,22 +115,6 @@ axidma_attach(device_t dev) sc->bst = rman_get_bustag(sc->res[0]); sc->bsh = rman_get_bushandle(sc->res[0]); - /* Setup interrupt handler */ - err = bus_setup_intr(dev, sc->res[1], INTR_TYPE_MISC | INTR_MPSAFE, - NULL, axidma_intr_tx, sc, &sc->ih[0]); - if (err) { - device_printf(dev, "Unable to alloc interrupt resource.\n"); - return (ENXIO); - } - - /* Setup interrupt handler */ - err = bus_setup_intr(dev, sc->res[2], INTR_TYPE_MISC | INTR_MPSAFE, - NULL, axidma_intr_rx, sc, &sc->ih[1]); - if (err) { - device_printf(dev, "Unable to alloc interrupt resource.\n"); - return (ENXIO); - } - node = ofw_bus_get_node(dev); xref = OF_xref_from_node(node); OF_device_register_xref(xref, dev); @@ -302,331 +123,72 @@ axidma_attach(device_t dev) } static int -axidma_detach(device_t dev) +axidma_reset(device_t dev, int chan_id) { struct axidma_softc *sc; + int timeout; sc = device_get_softc(dev); - bus_teardown_intr(dev, sc->res[1], sc->ih[0]); - bus_teardown_intr(dev, sc->res[2], sc->ih[1]); - bus_release_resources(dev, axidma_spec, sc->res); - - return (0); -} - -static int -axidma_desc_free(struct axidma_softc *sc, struct axidma_channel *chan) -{ - struct xdma_channel *xchan; - - xchan = chan->xchan; - - free(chan->descs, M_DEVBUF); - free(chan->descs_phys, M_DEVBUF); - - pmap_kremove_device(chan->mem_vaddr, chan->mem_size); - kva_free(chan->mem_vaddr, chan->mem_size); - vmem_free(xchan->vmem, chan->mem_paddr, chan->mem_size); - - return (0); -} - -static int -axidma_desc_alloc(struct axidma_softc *sc, struct xdma_channel *xchan, - uint32_t desc_size) -{ - struct axidma_channel *chan; - int nsegments; - int i; - - chan = (struct axidma_channel *)xchan->chan; - nsegments = chan->descs_num; - - chan->descs = malloc(nsegments * sizeof(struct axidma_desc *), - M_DEVBUF, M_NOWAIT | M_ZERO); - if (chan->descs == NULL) { - device_printf(sc->dev, - "%s: Can't allocate memory.\n", __func__); - return (-1); - } - - chan->descs_phys = malloc(nsegments * sizeof(bus_dma_segment_t), - M_DEVBUF, M_NOWAIT | M_ZERO); - chan->mem_size = desc_size * nsegments; - if (vmem_alloc(xchan->vmem, chan->mem_size, M_FIRSTFIT | M_NOWAIT, - &chan->mem_paddr)) { - device_printf(sc->dev, "Failed to allocate memory.\n"); - return (-1); - } - chan->mem_vaddr = kva_alloc(chan->mem_size); - pmap_kenter(chan->mem_vaddr, chan->mem_size, chan->mem_paddr, - VM_MEMATTR_DEFAULT); - - device_printf(sc->dev, "Allocated chunk %lx %lu\n", - chan->mem_paddr, chan->mem_size); - - for (i = 0; i < nsegments; i++) { - chan->descs[i] = (struct axidma_desc *) - ((uint64_t)chan->mem_vaddr + desc_size * i); - chan->descs_phys[i] = chan->mem_paddr + desc_size * i; - } + AXIDMA_WR4(sc, AXI_DMACR(chan_id), DMACR_RESET); - return (0); -} + timeout = 100; -static int -axidma_channel_alloc(device_t dev, struct xdma_channel *xchan) -{ - xdma_controller_t *xdma; - struct axidma_fdt_data *data; - struct axidma_channel *chan; - struct axidma_softc *sc; + do { + if ((AXIDMA_RD4(sc, AXI_DMACR(chan_id)) & DMACR_RESET) == 0) + break; + } while (timeout--); - sc = device_get_softc(dev); + dprintf("timeout %d\n", timeout); - if (xchan->caps & XCHAN_CAP_BUSDMA) { - device_printf(sc->dev, - "Error: busdma operation is not implemented."); + if (timeout == 0) return (-1); - } - xdma = xchan->xdma; - data = xdma->data; - - chan = &sc->channels[data->id]; - if (chan->used == false) { - if (axidma_reset(sc, data->id) != 0) - return (-1); - chan->xchan = xchan; - xchan->caps |= XCHAN_CAP_BOUNCE; - xchan->chan = (void *)chan; - chan->sc = sc; - chan->used = true; - chan->idx_head = 0; - chan->idx_tail = 0; - chan->descs_used_count = 0; - chan->descs_num = AXIDMA_DESCS_NUM; - - return (0); - } - - return (-1); -} - -static int -axidma_channel_free(device_t dev, struct xdma_channel *xchan) -{ - struct axidma_channel *chan; - struct axidma_softc *sc; - - sc = device_get_softc(dev); - - chan = (struct axidma_channel *)xchan->chan; - - axidma_desc_free(sc, chan); - - chan->used = false; - - return (0); -} - -static int -axidma_channel_capacity(device_t dev, xdma_channel_t *xchan, - uint32_t *capacity) -{ - struct axidma_channel *chan; - uint32_t c; - - chan = (struct axidma_channel *)xchan->chan; - - /* At least one descriptor must be left empty. */ - c = (chan->descs_num - chan->descs_used_count - 1); - - *capacity = c; + dprintf("%s: read control after reset: %x\n", + __func__, AXIDMA_RD4(sc, AXI_DMACR(chan_id))); return (0); } -static int -axidma_channel_submit_sg(device_t dev, struct xdma_channel *xchan, - struct xdma_sglist *sg, uint32_t sg_n) +static struct resource * +axidma_memres(device_t dev) { - xdma_controller_t *xdma; - struct axidma_fdt_data *data; - struct axidma_channel *chan; - struct axidma_desc *desc; struct axidma_softc *sc; - uint32_t src_addr; - uint32_t dst_addr; - uint32_t addr; - uint32_t len; - uint32_t tmp; - int i; - - dprintf("%s: sg_n %d\n", __func__, sg_n); sc = device_get_softc(dev); - chan = (struct axidma_channel *)xchan->chan; - xdma = xchan->xdma; - data = xdma->data; - - if (sg_n == 0) - return (0); - - tmp = 0; - - for (i = 0; i < sg_n; i++) { - src_addr = (uint32_t)sg[i].src_addr; - dst_addr = (uint32_t)sg[i].dst_addr; - len = (uint32_t)sg[i].len; - - dprintf("%s(%d): src %x dst %x len %d\n", __func__, - data->id, src_addr, dst_addr, len); - - desc = chan->descs[chan->idx_head]; - if (sg[i].direction == XDMA_MEM_TO_DEV) - desc->phys = src_addr; - else - desc->phys = dst_addr; - desc->status = 0; - desc->control = len; - if (sg[i].first == 1) - desc->control |= BD_CONTROL_TXSOF; - if (sg[i].last == 1) - desc->control |= BD_CONTROL_TXEOF; - - cpu_dcache_wbinv_range((vm_offset_t)desc, - sizeof(struct axidma_desc)); - - tmp = chan->idx_head; - - atomic_add_int(&chan->descs_used_count, 1); - chan->idx_head = axidma_next_desc(chan, chan->idx_head); - } - - dprintf("%s(%d): _curdesc %x\n", __func__, data->id, - READ8(sc, AXI_CURDESC(data->id))); - dprintf("%s(%d): _curdesc %x\n", __func__, data->id, - READ8(sc, AXI_CURDESC(data->id))); - dprintf("%s(%d): status %x\n", __func__, data->id, - READ4(sc, AXI_DMASR(data->id))); - - addr = chan->descs_phys[tmp]; - WRITE8(sc, AXI_TAILDESC(data->id), addr); - - return (0); + return (sc->res[0]); } static int -axidma_channel_prep_sg(device_t dev, struct xdma_channel *xchan) +axidma_setup_cb(device_t dev, int chan_id, void (*cb)(void *), void *arg) { - xdma_controller_t *xdma; - struct axidma_fdt_data *data; - struct axidma_channel *chan; - struct axidma_desc *desc; struct axidma_softc *sc; - uint32_t addr; - uint32_t reg; - int ret; - int i; + int error; sc = device_get_softc(dev); - chan = (struct axidma_channel *)xchan->chan; - xdma = xchan->xdma; - data = xdma->data; - - dprintf("%s(%d)\n", __func__, data->id); - - ret = axidma_desc_alloc(sc, xchan, sizeof(struct axidma_desc)); - if (ret != 0) { - device_printf(sc->dev, - "%s: Can't allocate descriptors.\n", __func__); - return (-1); - } - - for (i = 0; i < chan->descs_num; i++) { - desc = chan->descs[i]; - bzero(desc, sizeof(struct axidma_desc)); - - if (i == (chan->descs_num - 1)) - desc->next = chan->descs_phys[0]; - else - desc->next = chan->descs_phys[i + 1]; - desc->status = 0; - desc->control = 0; - - dprintf("%s(%d): desc %d vaddr %lx next paddr %x\n", __func__, - data->id, i, (uint64_t)desc, le32toh(desc->next)); - } - - addr = chan->descs_phys[0]; - WRITE8(sc, AXI_CURDESC(data->id), addr); - - reg = READ4(sc, AXI_DMACR(data->id)); - reg |= DMACR_IOC_IRQEN | DMACR_DLY_IRQEN | DMACR_ERR_IRQEN; - WRITE4(sc, AXI_DMACR(data->id), reg); - reg |= DMACR_RS; - WRITE4(sc, AXI_DMACR(data->id), reg); - - return (0); -} - -static int -axidma_channel_control(device_t dev, xdma_channel_t *xchan, int cmd) -{ - - switch (cmd) { - case XDMA_CMD_BEGIN: - case XDMA_CMD_TERMINATE: - case XDMA_CMD_PAUSE: - /* TODO: implement me */ - return (-1); - } - - return (0); -} + if (sc->ih[chan_id] != NULL) + return (EEXIST); -#ifdef FDT -static int -axidma_ofw_md_data(device_t dev, pcell_t *cells, int ncells, void **ptr) -{ - struct axidma_fdt_data *data; - - if (ncells != 1) - return (-1); - - data = malloc(sizeof(struct axidma_fdt_data), - M_DEVBUF, (M_WAITOK | M_ZERO)); - data->id = cells[0]; - - *ptr = data; + error = bus_setup_intr(dev, sc->res[chan_id + 1], + INTR_TYPE_MISC | INTR_MPSAFE, NULL, cb, arg, + &sc->ih[chan_id]); + if (error) + device_printf(dev, "Unable to alloc interrupt resource.\n"); - return (0); + return (error); } -#endif static device_method_t axidma_methods[] = { /* Device interface */ DEVMETHOD(device_probe, axidma_probe), DEVMETHOD(device_attach, axidma_attach), - DEVMETHOD(device_detach, axidma_detach), - - /* xDMA Interface */ - DEVMETHOD(xdma_channel_alloc, axidma_channel_alloc), - DEVMETHOD(xdma_channel_free, axidma_channel_free), - DEVMETHOD(xdma_channel_control, axidma_channel_control), - - /* xDMA SG Interface */ - DEVMETHOD(xdma_channel_capacity, axidma_channel_capacity), - DEVMETHOD(xdma_channel_prep_sg, axidma_channel_prep_sg), - DEVMETHOD(xdma_channel_submit_sg, axidma_channel_submit_sg), -#ifdef FDT - DEVMETHOD(xdma_ofw_md_data, axidma_ofw_md_data), -#endif + /* Axidma interface */ + DEVMETHOD(axidma_reset, axidma_reset), + DEVMETHOD(axidma_memres, axidma_memres), + DEVMETHOD(axidma_setup_cb, axidma_setup_cb), DEVMETHOD_END }; diff --git a/sys/dev/xilinx/axidma.h b/sys/dev/xilinx/axidma.h index a6834354fafc..f655d5d70ede 100644 --- a/sys/dev/xilinx/axidma.h +++ b/sys/dev/xilinx/axidma.h @@ -1,7 +1,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause * - * Copyright (c) 2019 Ruslan Bukin + * Copyright (c) 2019-2025 Ruslan Bukin * * This software was developed by SRI International and the University of * Cambridge Computer Laboratory (Department of Computer Science and @@ -58,11 +58,6 @@ #define AXI_TAILDESC_MSB(n) (0x14 + 0x30 * (n)) /* Tail Descriptor Pointer. Upper 32 bits of address. */ #define AXI_SG_CTL 0x2C /* Scatter/Gather User and Cache */ -#define AXIDMA_NCHANNELS 2 -#define AXIDMA_DESCS_NUM 512 -#define AXIDMA_TX_CHAN 0 -#define AXIDMA_RX_CHAN 1 - struct axidma_desc { uint32_t next; uint32_t reserved1; @@ -87,8 +82,4 @@ struct axidma_desc { uint32_t reserved[3]; }; -struct axidma_fdt_data { - int id; -}; - #endif /* !_DEV_XILINX_AXIDMA_H_ */ diff --git a/sys/dev/xilinx/axidma_if.m b/sys/dev/xilinx/axidma_if.m new file mode 100644 index 000000000000..ac6f4882c005 --- /dev/null +++ b/sys/dev/xilinx/axidma_if.m @@ -0,0 +1,53 @@ +#- +# Copyright (c) 2025 Ruslan Bukin +# +# This software was developed by SRI International and the University of +# Cambridge Computer Laboratory under DARPA/AFRL contract FA8750-10-C-0237 +# ("CTSRD"), as part of the DARPA CRASH research programme. +# +# 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 + +INTERFACE axidma; + +HEADER { + typedef void (*axidma_cb_t)(void *arg); +}; + +METHOD int reset { + device_t dev; + int chan_id; +}; + +METHOD struct resource * memres { + device_t dev; +}; + +METHOD int setup_cb { + device_t dev; + int chan_id; + axidma_cb_t cb; + void *arg; +}; diff --git a/sys/dev/xilinx/if_xae.c b/sys/dev/xilinx/if_xae.c index 97e7aa16dda4..7880f93c48ee 100644 --- a/sys/dev/xilinx/if_xae.c +++ b/sys/dev/xilinx/if_xae.c @@ -61,53 +61,38 @@ #include #include #include -#include -#include #include +#include +#include #include "miibus_if.h" +#include "axidma_if.h" -#define READ4(_sc, _reg) \ - bus_read_4((_sc)->res[0], _reg) -#define WRITE4(_sc, _reg, _val) \ - bus_write_4((_sc)->res[0], _reg, _val) +#define XAE_RD4(_sc, _reg) bus_read_4((_sc)->res[0], _reg) +#define XAE_RD8(_sc, _reg) bus_read_8((_sc)->res[0], _reg) +#define XAE_WR4(_sc, _reg, _val) bus_write_4((_sc)->res[0], _reg, _val) +#define XAE_WR8(_sc, _reg, _val) bus_write_8((_sc)->res[0], _reg, _val) -#define READ8(_sc, _reg) \ - bus_read_8((_sc)->res[0], _reg) -#define WRITE8(_sc, _reg, _val) \ - bus_write_8((_sc)->res[0], _reg, _val) +#define AXIDMA_RD4(_sc, _reg) bus_read_4((_sc)->dma_res, _reg) +#define AXIDMA_RD8(_sc, _reg) bus_read_8((_sc)->dma_res, _reg) +#define AXIDMA_WR4(_sc, _reg, _val) bus_write_4((_sc)->dma_res, _reg, _val) +#define AXIDMA_WR8(_sc, _reg, _val) bus_write_8((_sc)->dma_res, _reg, _val) #define XAE_LOCK(sc) mtx_lock(&(sc)->mtx) #define XAE_UNLOCK(sc) mtx_unlock(&(sc)->mtx) #define XAE_ASSERT_LOCKED(sc) mtx_assert(&(sc)->mtx, MA_OWNED) #define XAE_ASSERT_UNLOCKED(sc) mtx_assert(&(sc)->mtx, MA_NOTOWNED) -#define XAE_DEBUG -#undef XAE_DEBUG +#define dprintf(fmt, ...) -#ifdef XAE_DEBUG -#define dprintf(fmt, ...) printf(fmt, ##__VA_ARGS__) -#else -#define dprintf(fmt, ...) -#endif - -#define RX_QUEUE_SIZE 64 -#define TX_QUEUE_SIZE 64 -#define NUM_RX_MBUF 16 -#define BUFRING_SIZE 8192 #define MDIO_CLK_DIV_DEFAULT 29 -#define BUF_NPAGES 512 - -#define PHY1_RD(sc, _r) \ - xae_miibus_read_reg(sc->dev, 1, _r) -#define PHY1_WR(sc, _r, _v) \ - xae_miibus_write_reg(sc->dev, 1, _r, _v) -#define PHY_RD(sc, _r) \ - xae_miibus_read_reg(sc->dev, sc->phy_addr, _r) +#define PHY1_RD(sc, _r) xae_miibus_read_reg(sc->dev, 1, _r) +#define PHY1_WR(sc, _r, _v) xae_miibus_write_reg(sc->dev, 1, _r, _v) +#define PHY_RD(sc, _r) xae_miibus_read_reg(sc->dev, sc->phy_addr, _r) #define PHY_WR(sc, _r, _v) \ - xae_miibus_write_reg(sc->dev, sc->phy_addr, _r, _v) + xae_miibus_write_reg(sc->dev, sc->phy_addr, _r, _v) /* Use this macro to access regs > 0x1f */ #define WRITE_TI_EREG(sc, reg, data) { \ @@ -122,220 +107,384 @@ #define DP83867_SGMIICTL1 0xD3 /* not documented register */ #define SGMIICTL1_SGMII_6W (1 << 14) /* no idea what it is */ +#define AXI_DESC_RING_ALIGN 64 + +/* + * Driver data and defines. + */ + static struct resource_spec xae_spec[] = { { SYS_RES_MEMORY, 0, RF_ACTIVE }, { SYS_RES_IRQ, 0, RF_ACTIVE }, { -1, 0 } }; -static void xae_stop_locked(struct xae_softc *sc); -static void xae_setup_rxfilter(struct xae_softc *sc); +static inline uint32_t +next_rxidx(struct xae_softc *sc, uint32_t curidx) +{ + + return ((curidx == RX_DESC_COUNT - 1) ? 0 : curidx + 1); +} -static int -xae_rx_enqueue(struct xae_softc *sc, uint32_t n) +static inline uint32_t +next_txidx(struct xae_softc *sc, uint32_t curidx) { - struct mbuf *m; - int i; - for (i = 0; i < n; i++) { - m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); - if (m == NULL) { - device_printf(sc->dev, - "%s: Can't alloc rx mbuf\n", __func__); - return (-1); - } + return ((curidx == TX_DESC_COUNT - 1) ? 0 : curidx + 1); +} - m->m_pkthdr.len = m->m_len = m->m_ext.ext_size; - xdma_enqueue_mbuf(sc->xchan_rx, &m, 0, 4, 4, XDMA_DEV_TO_MEM); - } +static void +xae_get1paddr(void *arg, bus_dma_segment_t *segs, int nsegs, int error) +{ - return (0); + if (error != 0) + return; + *(bus_addr_t *)arg = segs[0].ds_addr; } -static int -xae_get_phyaddr(phandle_t node, int *phy_addr) +inline static uint32_t +xae_setup_txdesc(struct xae_softc *sc, int idx, bus_addr_t paddr, + uint32_t len) { - phandle_t phy_node; - pcell_t phy_handle, phy_reg; + struct axidma_desc *desc; + uint32_t nidx; + uint32_t flags; - if (OF_getencprop(node, "phy-handle", (void *)&phy_handle, - sizeof(phy_handle)) <= 0) - return (ENXIO); + nidx = next_txidx(sc, idx); - phy_node = OF_node_from_xref(phy_handle); + desc = &sc->txdesc_ring[idx]; - if (OF_getencprop(phy_node, "reg", (void *)&phy_reg, - sizeof(phy_reg)) <= 0) - return (ENXIO); + /* Addr/len 0 means we're clearing the descriptor after xmit done. */ + if (paddr == 0 || len == 0) { + flags = 0; + --sc->txcount; + } else { + flags = BD_CONTROL_TXSOF | BD_CONTROL_TXEOF; + ++sc->txcount; + } - *phy_addr = phy_reg; + desc->next = sc->txdesc_ring_paddr + sizeof(struct axidma_desc) * nidx; + desc->phys = paddr; + desc->status = 0; + desc->control = len | flags; - return (0); + return (nidx); } static int -xae_xdma_tx_intr(void *arg, xdma_transfer_status_t *status) +xae_setup_txbuf(struct xae_softc *sc, int idx, struct mbuf **mp) { - xdma_transfer_status_t st; - struct xae_softc *sc; - if_t ifp; + struct bus_dma_segment seg; struct mbuf *m; - int err; - - sc = arg; - - XAE_LOCK(sc); + int error; + int nsegs; - ifp = sc->ifp; + dprintf("%s\n", __func__); - for (;;) { - err = xdma_dequeue_mbuf(sc->xchan_tx, &m, &st); - if (err != 0) { - break; - } + if ((m = m_defrag(*mp, M_NOWAIT)) == NULL) + return (ENOMEM); - if (st.error != 0) { - if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); - } *** 1204 LINES SKIPPED *** From nobody Wed Nov 26 16:56:45 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dGm1V0HCcz6JKTt for ; Wed, 26 Nov 2025 16:56:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dGm1T6fLNz3k45 for ; Wed, 26 Nov 2025 16:56:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764176206; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5JhJKeT32p1xHMmsfXWbSD4l9RC83MVMtnQE1xde98o=; b=rcaLm3KIATCpEKsnO4usC1oDeypsQq/ziowuJJeND74c1Ip9SdKswyqQy761FS1J8Zl1Y4 ueHVa7dB3BGO3ljNV5mC3hN41iA02Ty+S0q7tqAIb1so6MhHCPDxXSjWhtxwGrgLwTmnCl NfrlIvTTIbbvDntTjc290XekJcdxfJyc7SYkMDiLq7pYvGkzvsBH5j0uXKe1avWww9MDvu Dl7Jnvsxv2I07NIDjT18pe50xPKOF6ldVPVX5lVCv8Nn633UngPusbyq0yAaTtCyn63+Uj 1SfAnBcbahTB+y9uqX8k0WdoMLnQ0ewZDC/boWrQsqESBarwGfXWJ5MZfx0IjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764176206; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5JhJKeT32p1xHMmsfXWbSD4l9RC83MVMtnQE1xde98o=; b=QkYgdZdA/rislJiH4EcgpT+MtS2/2nCLGrXm/Zk4nMIw8JM5MZUVeNNKrXhf2Y0+Xljd+t gGONNqWIHvmE6v8MgbYf9KEsxpoYzzzfke6FHWZHIndz4HVZJrSfCUbKHKE2Xnfik1wAWt kdT19z+1jsLSamQFlFLPChlxdPmBjy9YXD4N9f3f/fHe9GlZ7pIIQljGPz/oKkqgutVIbQ pEDvYp0M97ET9d8voeQsDSUgHZ9auKBrfRz17N9GOqw8QpekQidHuPlIuZy/qpQUe9NC2x gkPz2STqo/vK98M+KuFPHYYS7sf+5G6EYJrIqLw0n1ObJseP9XweG880y0rfEA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764176206; a=rsa-sha256; cv=none; b=OnN9u3EX4RSrU2ATylaKLXD8bHA8Xqptp6cyUYHB8S/SeFKC7OOpP6Jnb5NbxZIgk29M2d VXQ/9ga4fa+vbP7MoOFX54PuOaN90T/b2PoMcvTvT5T300BLaCGWdfkKYQoysGch+Zt+zK coLDcoejCUReWz4iizyHBFxV7h8twSPmdCR1lPHIQ1q6H2GIGlfTHPN7hATgKIVWtTRu9R rEj2HGb5JAGA3vMf7iHvEtlZc90HafzFIOk7WD+TxhEIwldrMB2AqWNj5TbiPphAq29CTD /UaATjwA0zsXfMfhJLla2SdXplW9AVGY/eGEjfgPDq6v8XOFjvgFeQLh5cfLCg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dGm1T69FlzvyH for ; Wed, 26 Nov 2025 16:56:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 9b88 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 26 Nov 2025 16:56:45 +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: 5af240c54bd2 - main - libc: Simplify __get_locale() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5af240c54bd2d9548536c904e841499e1651bcc8 Auto-Submitted: auto-generated Date: Wed, 26 Nov 2025 16:56:45 +0000 Message-Id: <6927314d.9b88.a55612e@gitrepo.freebsd.org> The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=5af240c54bd2d9548536c904e841499e1651bcc8 commit 5af240c54bd2d9548536c904e841499e1651bcc8 Author: Dag-Erling Smørgrav AuthorDate: 2025-11-26 16:54:52 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-11-26 16:56:42 +0000 libc: Simplify __get_locale() MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: fuz Differential Revision: https://reviews.freebsd.org/D53908 --- lib/libc/locale/xlocale_private.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/libc/locale/xlocale_private.h b/lib/libc/locale/xlocale_private.h index ef1a8687a376..4cb323d5fa4c 100644 --- a/lib/libc/locale/xlocale_private.h +++ b/lib/libc/locale/xlocale_private.h @@ -200,11 +200,9 @@ extern _Thread_local locale_t __thread_locale; */ static inline locale_t __get_locale(void) { - - if (!__has_thread_locale) { + if (!__has_thread_locale || __thread_locale == NULL) return (&__xlocale_global_locale); - } - return (__thread_locale ? __thread_locale : &__xlocale_global_locale); + return (__thread_locale); } /** From nobody Wed Nov 26 17:07:33 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dGmFy2YzJz6JKsS for ; Wed, 26 Nov 2025 17:07:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dGmFx5z5Dz3lbn for ; Wed, 26 Nov 2025 17:07:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764176853; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KMJ3SY5xQZDqPiQaZc/hCBAqnfXXpRe6lTi7n9DZm3Q=; b=HHdC18H7oyRRKhAuwQVV7hCn2RQA7Prkldw4GS35p1yFpEm8Gcb08kFqeSd5GXUQAwDFtB WYvqd/AGJ6+/ZRwrvshVfdIfCaQdjM4PQoeje6WqEsKKMm9RbWwkkGOqr5V3zJ63ufEUoX Czajk3C9nkLD6HUxNjBXks5iGPAI7F/txwf9K4ocpdLyG9OMPR01W9pI+u8KAp/cAGetdJ 1r19bpCIvW+ahjcKPp5oZvPPQBRKgo2pmJDkfwRKs15IJJlhwY+zSJcl6w3ntTsTYt+YhD Vz+u0+9s7A2GrvdZeX//i4O2E0dZ8DCqP2gytaYX1/0A1yzg6zhOTWpH6mH8yQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764176853; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KMJ3SY5xQZDqPiQaZc/hCBAqnfXXpRe6lTi7n9DZm3Q=; b=H5YEuwdIa/5k8hB5mgGmWgW/OhReJPHYtzV/qomCheZiE/WHzwyL/ewhXB7SHzOZuN8qf6 w7lV8fIeuXBJZ+O9yOqUtTZdsxc+ctXaK7c0/sNHe3Pya5JDh0privmUMcC3pQ5JHapKXU w1OF7ZXe6hateEs/yfPMKeiDuXkHtdcq3Szh4ZMcDv8xI4qzw2zJCxeG15EFHKYD3TaMwZ J+nNg99HFM54Q0lYvTb0wR/er8xBW08WWCqxRAegrG2r06XlwRoRZ9mjC27Qiv9Cum8S2Y E9Y1KfDb0u0iHmSv+yDG1wyU01egnWHyF53MVE9PifEXZc3SjKFFbslonaRbZg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764176853; a=rsa-sha256; cv=none; b=nLhB2aIchFcT6+9fH79SYNHRiVhqg+NWm8YDOiUaFlzqjsPttDRzhZVmi1kWyz25YgprDS k5wiOaJ8bRuJ/lqs/gfSNXlLng/zPSa4nsUbW5ZrrLVjDcQ9s211J75xIRHpbI+YSmiRku WnEzEwtyfEF3gm805ve9Mm86dydzrBrh5oCjk9e/eKMB5cbeFZNZLaFHJ3KYf+VXxM0Hvi H0H86Ix/pNMHcwKqC/FLlx+6LIwA9L/hmirZHZLYNMWeC2aiWcLkxTcT8exNZfroxNCpqu Zhtowp0imAaJiz/6f6uJjhrLo6ZPvPs/mgAB5WKDaLqdWUc1kTy5G7QMIpA06g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dGmFx3yhhzw5D for ; Wed, 26 Nov 2025 17:07:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 9bfc by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 26 Nov 2025 17:07:33 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Colin Percival Subject: git: d45816f369eb - main - bsdinstall: Ignore -p[0-9]+ in determining BRANCH List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d45816f369eb0099fd274fee23a3bf137ee794b1 Auto-Submitted: auto-generated Date: Wed, 26 Nov 2025 17:07:33 +0000 Message-Id: <692733d5.9bfc.1b23097d@gitrepo.freebsd.org> The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=d45816f369eb0099fd274fee23a3bf137ee794b1 commit d45816f369eb0099fd274fee23a3bf137ee794b1 Author: Colin Percival AuthorDate: 2025-11-26 03:33:22 +0000 Commit: Colin Percival CommitDate: 2025-11-26 17:07:24 +0000 bsdinstall: Ignore -p[0-9]+ in determining BRANCH The patch level is not part of the branch per se and should not be used in constructing the FreeBSD-base.conf file used by bsdinstall. MFC after: 1 day --- usr.sbin/bsdinstall/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/bsdinstall/Makefile b/usr.sbin/bsdinstall/Makefile index 9a6b25fc5c7a..a576f2d0794e 100644 --- a/usr.sbin/bsdinstall/Makefile +++ b/usr.sbin/bsdinstall/Makefile @@ -16,7 +16,7 @@ FILESDIR= ${SHAREDIR}/bsdinstall FILES= FreeBSD-base.conf _BRANCH!= ${MAKE} -C ${SRCTOP}/release -V BRANCH -BRANCH?= ${_BRANCH} +BRANCH?= ${_BRANCH:C/-p[0-9]+$//} _REVISION!= ${MAKE} -C ${SRCTOP}/release -V REVISION REVISION?= ${_REVISION} From nobody Wed Nov 26 19:21:59 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dGqF40SLzz6JVdV for ; Wed, 26 Nov 2025 19:22:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dGqF36J6Pz47cG for ; Wed, 26 Nov 2025 19:21:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764184919; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YzRv32SdH14Mvz5Oaall5VEjpzIB1Gi6MlXBKA7/d2s=; b=LuOdOJS7gGs3Sk7Lwg3IXNaMNWyCTCE8DXr+TEe4pzElW1NLhZcbD9zrsdx2cqiwqEF7xp Cgf32OqafGNS2TknmJ3lhUWJy4fymc92MTmvpEk7XwxUQ/AylIrOXE7yJC8oq/HvFebA33 jU1HmGVQdlpPcW50C6+h6EWln/4dg0l5SQ0Sttf1Sckv7lh5hmmzLAhMMarUaO9bwLdUtA /W3idtzPD3m+ParUiWkZHETTuPXg8KZGsjxVmfOQktmcBA2DZE2QymyE9dobA9y2qReB4y YqwitzTT+Gg8A9Rz09MAtblaWjcuNIRTNPgje1ihI2fGih55PRRRlOfLG7zhsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764184919; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YzRv32SdH14Mvz5Oaall5VEjpzIB1Gi6MlXBKA7/d2s=; b=qPJyDKWDnivTYi2TsMZ+0qx3dGRkGJo2YkNiUd6qJ/Wv9MmuU9M84PBviiGR93q5a7QZb4 FXB4xhcznd3b5LLSNe/tvqeMgWCs/s+mut70yiYprdAk6uTwMQ3XObIx4gzeTvq11hrINP 3RtR6YtGv8i2WKEiTXPkx1z9F7aI2XJv5DYNTZq1tmUiq+UxbsgBC7Kka35Tx1L5cCxjVv XhgHT3I73lJ2Gw/q0Ea7ZN/AxK+JWXL2It8cFPH67p3NE7YW+YeDYCK+ozDpCDECIEnNDl Ks4T4l8UqSvliyt3VcxHFetgz68x7DeaiFOan6TkQ5N0kCSQedM2rFgsopFz5g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764184919; a=rsa-sha256; cv=none; b=pfJECP6OedCJfMcAgtqiE+S2aK05yTipuKBcs0DUunijcDnWSixQ8nmSj8r5HDltaNLGfg BeLkHI4qBv5PM8Hkr4/rLzI/U6uqmA9O30emVN0DLWgCVun24jQK8XHYIztwsRRPZ+F2TQ 1liy4RW7EVEfsv+zjzv3rcMJrLalHLpTlGbeKxNMQFxgTDPAdUWkyl/bBWug1R5dgSESHX Iqt0WfarK2X2iEHbC8kDcvanUCcBcHc7PiTpkmjMFHRYhHlSi4jj9kxBWc698E/sNnU5Tq YlKzp41HqKo8yoMVXe0XgCvL0UdKBouNofLoEPTLkDG2OF8b/PKVuJVd0aUAZg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dGqF35j6Fz10ns for ; Wed, 26 Nov 2025 19:21:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 29b8d by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 26 Nov 2025 19:21:59 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Rick Macklem Subject: git: aa1cf240887d - main - nfs_nfsdstate.c: Add sanity checks for lock stateids List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: aa1cf240887ddcca66dfb969fdc5a8d545396037 Auto-Submitted: auto-generated Date: Wed, 26 Nov 2025 19:21:59 +0000 Message-Id: <69275357.29b8d.785be0b1@gitrepo.freebsd.org> The branch main has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=aa1cf240887ddcca66dfb969fdc5a8d545396037 commit aa1cf240887ddcca66dfb969fdc5a8d545396037 Author: Rick Macklem AuthorDate: 2025-11-26 19:20:27 +0000 Commit: Rick Macklem CommitDate: 2025-11-26 19:20:27 +0000 nfs_nfsdstate.c: Add sanity checks for lock stateids Bugzilla PR reported a crash caused by a synthetic client doing a Lock operation request with a delegation stateid. This patch fixes the problem by adding sanity checks for the type of stateid provided as an argument to the Lock and LockU operations. It has been tested with the FreeBSD, Linux and Solaris 11.4 clients. Hopefully, other NFSv4 clients will work ok as well. PR: 291080 Tested by: Robert Morris MFC after: 2 weeks --- sys/fs/nfsserver/nfs_nfsdstate.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/sys/fs/nfsserver/nfs_nfsdstate.c b/sys/fs/nfsserver/nfs_nfsdstate.c index 111b0f26d0b5..3fae2be5af46 100644 --- a/sys/fs/nfsserver/nfs_nfsdstate.c +++ b/sys/fs/nfsserver/nfs_nfsdstate.c @@ -1977,6 +1977,20 @@ tryagain: error = NFSERR_BADSTATEID; } + /* + * Sanity check the stateid for the Lock/LockU cases. + */ + if (error == 0 && (new_stp->ls_flags & NFSLCK_LOCK) != 0 && + (((new_stp->ls_flags & NFSLCK_OPENTOLOCK) != 0 && + (stp->ls_flags & NFSLCK_OPEN) == 0) || + ((new_stp->ls_flags & NFSLCK_OPENTOLOCK) == 0 && + (stp->ls_flags & NFSLCK_LOCK) == 0))) + error = NFSERR_BADSTATEID; + if (error == 0 && (new_stp->ls_flags & NFSLCK_UNLOCK) != 0 && + (stp->ls_flags & NFSLCK_LOCK) == 0) + error = NFSERR_BADSTATEID; + + /* Sanity check the delegation stateid. */ if (error == 0 && (stp->ls_flags & (NFSLCK_DELEGREAD | NFSLCK_DELEGWRITE)) && getlckret == 0 && stp->ls_lfp != lfp) From nobody Wed Nov 26 19:33:52 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dGqVm4zHbz6JX56 for ; Wed, 26 Nov 2025 19:33:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dGqVm3wG6z49ZV for ; Wed, 26 Nov 2025 19:33:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764185632; 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=a9aME2Bid3jnlumrIakJYs5xptHs+Ajcrq0WatiVLKo=; b=TjRXJfHKHJSI7yuEdOna6wy0QZnJkq6gzA61Wmi0LT55USNVykOPQMQ66wixwaWeEqasX9 kCneSPoCGJZH+3F/jFJdZypx1MuhVH19/NFP9RV+B04wiUSxe5CeNKd22JGuTQ1SFMYyng CyuXd14SqNMXIZfh+M8cPQF0lFov+/ii3Lc4JTEahHZkhYFz1Oll3elE6EU5m22MFXugWZ WbwPlrw2piWaUMc4b+dKzYT42ojyvK0ejz5a7B6O62OKfyGK6D4yV8Zjmq0FvUQ3xa7sq7 NCDh5Q2yr1jrjsbA5cyprw8HCP6wf5vSvFzgRBpD9NNq2CNswFoi27yr7ebK5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764185632; 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=a9aME2Bid3jnlumrIakJYs5xptHs+Ajcrq0WatiVLKo=; b=xEK1xZSKyKLbg4FL79oywMnsWpA3jvK5fDyzsweQ53zNps9XjJqWFMXOb/k59hk5/sGakH ZQYHkyGCD54kLooNUH/9jeGBMzSe4OMTFfx2mw/A/rwCoV/jU8UbN7qjGHATGTKy+Jy2Yu ImULuIhVLAS1P+SkgdJ8Ise54Fm3U74YLGUHpfSD4mUoN5cp72VysnKm8Qt5MvDttjEAvq svktnscuIecMROpkrP6wlxRYWPpHT4UpntLfkAQf6YBVQzSYpv3jTKWd+YJ21pngdXAXtZ C39G7my0zNFgNHBbhTeiVCvGYqfkCB00oaVj1Tq5nAI8/CAJiHiXjkcgqajG2A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764185632; a=rsa-sha256; cv=none; b=vWsTMhGqPohoERHX8uXF4RNi5TpAUqVpWzv453h4v+hSb1j25TEk6QqrPJ2WSnt/jYaZWn tJ+GrzqUla6cr5b0+hT9F2LzD6ZJFnDgEA1GOyNu1YOvulEDIyQegYMdoXLu5zCpao7tgS hwcto4rl14Sqx7N+aJw3Ftwm2qpGElnO/Wf5QMDRcoPqKFELHFnYMsH9UyAH5bSZwqtNwD 8l9c5evl/WFW9Z/S/y641CXDVbc6uI54l3I4zUKTlP8jgRtS51BJBhuNeWVRa/bChs5NIS dFxsbG9fiPElgUjtUzDnVrQsiaJKf2frl/SaKsUpG4I0MfUBfrB7N/T+6ZuIHg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dGqVm3T8Yz1162 for ; Wed, 26 Nov 2025 19:33:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2b794 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 26 Nov 2025 19:33:52 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Goran=?utf-8?Q? Meki=C4=87?= From: Christos Margiolis Subject: git: ebf1d98d6072 - main - sound examples: Fix buffer mapping/allocation List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ebf1d98d60725feccd726ef8e4fa518661f9eae0 Auto-Submitted: auto-generated Date: Wed, 26 Nov 2025 19:33:52 +0000 Message-Id: <69275620.2b794.778d748@gitrepo.freebsd.org> The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=ebf1d98d60725feccd726ef8e4fa518661f9eae0 commit ebf1d98d60725feccd726ef8e4fa518661f9eae0 Author: Goran Mekić AuthorDate: 2025-11-26 19:33:05 +0000 Commit: Christos Margiolis CommitDate: 2025-11-26 19:33:05 +0000 sound examples: Fix buffer mapping/allocation The buffer in struct config should be allocated or mmap'ed. The code without this patch allocates the buffer unconditionally, even for mmap configs. MFC after: 1 week Reviewed by: christos Differential Revision: https://reviews.freebsd.org/D53939 --- share/examples/sound/oss.h | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/share/examples/sound/oss.h b/share/examples/sound/oss.h index 437c6d69d454..e1ba4165810f 100644 --- a/share/examples/sound/oss.h +++ b/share/examples/sound/oss.h @@ -25,6 +25,7 @@ * SUCH DAMAGE. */ +#include #include #include @@ -84,7 +85,7 @@ static void oss_init(struct config *config) { unsigned long request = SNDCTL_DSP_GETOSPACE; - int tmp = 0; + int tmp = 0, prot = 0; if ((config->fd = open(config->device, config->mode)) < 0) err(1, "Error opening the device %s", config->device); @@ -194,7 +195,6 @@ oss_init(struct config *config) } config->sample_count = config->buffer_info.bytes / config->sample_size; config->chsamples = config->sample_count / config->audio_info.max_channels; - config->buf = malloc(config->buffer_info.bytes); printf("bytes: %d, fragments: %d, fragsize: %d, fragstotal: %d, " "samples: %d\n", @@ -202,21 +202,36 @@ oss_init(struct config *config) config->buffer_info.fragsize, config->buffer_info.fragstotal, config->sample_count); - /* Set the trigger */ + /* Set trigger direction and mmap protection */ switch (config->mode & O_ACCMODE) { case O_RDONLY: tmp = PCM_ENABLE_INPUT; + prot = PROT_READ; break; case O_WRONLY: tmp = PCM_ENABLE_OUTPUT; + prot = PROT_WRITE; break; case O_RDWR: tmp = PCM_ENABLE_INPUT | PCM_ENABLE_OUTPUT; + prot = PROT_READ | PROT_WRITE; break; default: errx(1, "Invalid mode %d", config->mode); break; } + + /* Map or allocate the buffer */ + if (config->mmap) { + config->buf = mmap(NULL, config->buffer_info.bytes, prot, MAP_SHARED, config->fd, 0); + if (config->buf == MAP_FAILED) + err(1, "Memory map failed"); + } else { + if ((config->buf = malloc(config->buffer_info.bytes)) == NULL) + err(1, "Allocating buffer failed"); + } + + /* Set the trigger */ if (ioctl(config->fd, SNDCTL_DSP_SETTRIGGER, &tmp) < 0) err(1, "Failed to set trigger"); } From nobody Wed Nov 26 20:24:36 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dGrdK2vnPz6HNgv for ; Wed, 26 Nov 2025 20:24:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dGrdK1Wxwz3Qb8 for ; Wed, 26 Nov 2025 20: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=1764188677; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3ywjBauwn0L2yqJXLNDX7uwBKk+0R96BGLgGDbdu4MU=; b=iLjGMgFVtGgvl4+fL1IflH9oMTWruxw07gvFIJpribKPjH7AbOhh2AVQaE/aXJyOaTnN5r c28fRyEdWU1jixXiJP2AFXwk3SvS5cQZPQ/qjDjnTqVR4cXRH73ikXqatKctaQUmWoocUG UV1hofg4pQkvZPg+BY0bqDYZQaS/ALUDFAGwuSnVnGs8sYL8jNgEbNgxBZtWbb/eEYf1zp u7/nwCrFybn40l/pjUfgnsgoI3zdyO0PFo9CN2zsHWaD4nCHcAWqkB6OVm25vLVuVV+6KE MecIWX89gYVWnDYW7xLy8c7hXFeToc4sd/hv2MD9hP81yAt8EbhAw2/O0FCKVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764188677; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3ywjBauwn0L2yqJXLNDX7uwBKk+0R96BGLgGDbdu4MU=; b=gRltOVbDH/Q7PP6srh43XKiUsTW3yQDzkb9MuyIDFXM+gx/sS6DuwlzQ4lCYGXN0RhcFWW LJyovuDCd+md5tWfUO3lAlVt9/PRb5tdjhF5ENbngV2u/GJ/g9irrpIvwuE0NbnE8YzsXr Qq2vPHPHfIus06oJOVgZZYJPLBqh2d31mX31F8OiiYMsHbzrUMnEpSGOCeqcuogGRLv4yG K4MWJr/fubbCLn/1eHuTDO1xbK1qCsST+Kvp/AB4OiGuzoojmD9+thQd6VLH0ZdL/7hqtH ompugPG2AO3LWrm9aPD3EIXFQcg0u1/gOKkEzfn81hjznSkamQL4Qb/RUquqKg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764188677; a=rsa-sha256; cv=none; b=a33pltrLFZ3F6M6PDIQMSVoa/rWkJh808Dcd5oLWO2cf9O0hWSiPE+7vFFQ10Er35MBSn7 8WQDCMsOsj9ZqFkxSvJe94oif/cAZey1mf07VEG1YEyIiCoCCVDBTTPtDmCTUnpM9i0ihU 2Qhz7fMRAb7m2cuDS2RbzYMitN3zPc4Ez5lDA2E/JGILHxEjSFbeG+oRS0l8+SAG1qttna 0m3bjJ7Uf7yTZJcpI2OBJCYhQM1c76ERPZ3qIw5Nbc20SGsBKOZ9nTjMzcb7NtbentHg1W sZnc77p8dqJ//LlnxGJqwubP6a8HWe+Ti+LJUNi8WtoOVv2akoVxO0by8ENZ4w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dGrdK0Hgtz1247 for ; Wed, 26 Nov 2025 20:24:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2eede by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 26 Nov 2025 20:24:36 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: 73dd00f2fd7d - main - mdo.1: Document group-related and fine-grained control functionalities List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 73dd00f2fd7de2a5d8dda8fa25ebcd7c8964ff52 Auto-Submitted: auto-generated Date: Wed, 26 Nov 2025 20:24:36 +0000 Message-Id: <69276204.2eede.3987479f@gitrepo.freebsd.org> The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=73dd00f2fd7de2a5d8dda8fa25ebcd7c8964ff52 commit 73dd00f2fd7de2a5d8dda8fa25ebcd7c8964ff52 Author: Olivier Certner AuthorDate: 2025-09-01 15:24:54 +0000 Commit: Olivier Certner CommitDate: 2025-11-26 20:23:37 +0000 mdo.1: Document group-related and fine-grained control functionalities This is a manual page update describing the functionality that was added to mdo(1) in commit 3ca1e69028ac ("mdo(1): Add support and shortcuts for fully specifying users and groups"). Please either refer to that commit or the new manual page's content for more information. While here: - Add to the introduction a description of process credentials and some specific vocabulary that is used throughout the page, as well as the relationship between mdo(1) and mac_do(4). - Update the HISTORY section. - Add AUTHORS and SECURITY CONSIDERATIONS sections. Reviewed by: ziaee MFC after: 1 minute Sponsored by: The FreeBSD Foundation Sponsored by: Google LLC (GSoC 2025) Co-authored-by: Kushagra Srivastava Differential Revision: https://reviews.freebsd.org/D53905 --- usr.bin/mdo/mdo.1 | 269 +++++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 245 insertions(+), 24 deletions(-) diff --git a/usr.bin/mdo/mdo.1 b/usr.bin/mdo/mdo.1 index c4586f628661..1de694c69e40 100644 --- a/usr.bin/mdo/mdo.1 +++ b/usr.bin/mdo/mdo.1 @@ -1,49 +1,270 @@ .\"- -.\" Copyright(c) 2024 Baptiste Daroussin -.\" .\" SPDX-License-Identifier: BSD-2-Clause .\" -.Dd May 26, 2025 +.\" Copyright (c) 2024 Baptiste Daroussin +.\" Copyright (c) 2025 Kushagra Srivastava +.\" Copyright (c) 2025 The FreeBSD Foundation +.\" +.\" Portions of this documentation were written by Olivier Certner +.\" at Kumacom SARL under sponsorship from the FreeBSD +.\" Foundation. +.\" +.Dd November 26, 2025 .Dt MDO 1 .Os .Sh NAME .Nm mdo -.Nd execute commands as another user +.Nd execute commands with specific credentials .Sh SYNOPSIS .Nm -.Op Fl u Ar username +.Op Fl u Ar user | Fl k .Op Fl i -.Op command Op args +.Op Fl g Ar group +.Op Fl G Ar group1,group2,... +.Op Fl s Ar groups_mod1,groups_mod2,... +.Op Fl h +.Op Fl -ruid Ar user +.Op Fl -svuid Ar user +.Op Fl -euid Ar user +.Op Fl -rgid Ar group +.Op Fl -svgid Ar group +.Op Fl -egid Ar group +.Op -- +.Op Ar command Op Ar args ... .Sh DESCRIPTION The .Nm -utility executes the specified +utility executes the passed .Ar command -as user -.Ar username . -.Pp -If no -.Ar username -is provided it defaults to the -.Va root -user. -If no +with the requested process credentials or, if no .Ar command -is specified, it will execute the shell specified as -.Va SHELL -environnement variable, falling back on -.Pa /bin/sh . +was specified, the program whose path is the value of the +.Ev SHELL +environment variable or +.Pa /bin/sh +if that variable is unset. +The calling user must either be the superuser +.Pq effective user ID of 0 +or the credentials transition from the caller's to the requested ones must be +authorized by a MAC module such as +.Xr mac_do 4 . +The target process credentials are applied atomically using +.Xr setcred 2 . .Pp +Process credentials comprise the real, effective and saved user IDs, the real, +effective and saved group IDs, hereby called the +.Dq primary +groups, and the supplementary groups as a set of group IDs. +Below, the +.Dq user +phrase implies that the real, effective and saved user IDs all have or are going +to be set to the same value. The +.Dq primary group +phrase is used similarly with respect to primary groups. +.Pp +The target process credentials have to be fully specified, either explicitly by +listing all attributes and their requested values, or indirectly by establishing +a baseline that provides a default value for each attribute, which can then be +amended by additional options. +.Pp +Possible baselines are either the full set of credentials established at login +for a specific named user, the current credentials, or the current credentials' +primary and supplementary groups which implies some user is specified +explicitly. +They are respectively established by using either option +.Fl u +with a named user argument, option +.Fl k , +or option .Fl i -option can be used to only call -.Fn setuid -and keep the group from the calling user. +in conjunction with +.Fl u +or no other options. +If no other option than +.Fl i +appears, a default of +.Fl u Cm root +is implied. +.Pp +The primary group can be set or amended with option +.Fl g , +whereas the supplementary groups can be either fully replaced with an explicit +list using option +.Fl G +or amended through set-like operations with option +.Fl s . +.Pp +Any of the individual real, effective and saved user and group IDs can be +overridden separately if desired through the options +.Fl -ruid , +.Fl -euid , +and +.Fl -svuid +for users, and +.Fl -rgid , +.Fl -egid , +and +.Fl -svgid +for groups respectively. +.Pp +The options are: +.Bl -tag -width indent +.It Fl -euid Ar user +Override the effective user. +As for +.Fl u , +.Ar user +may either be a name or a numerical ID. +.It Fl -egid Ar group +Override the effective group. +As for +.Fl g , +.Ar group +may either be a name or a numerical ID. +.It Fl G Ar group1,group2,... +Set or replace the full set of supplementary groups. +As for +.Fl g , +groups can be specified by name or numerical ID. +Groups must be separated by commas, and spaces around commas are not allowed. +.It Fl g Ar group +Set or amend the primary group. +.Ar group +may be the name of a group in the group database, else will be interpreted as +a numerical group ID. +.It Fl h +Display usage information and exit. +.It Fl i +Uses the current credentials' primary and supplementary groups as the baseline. +If no other option is present, the target user is assumed to be +.Dq root . +Otherwise, +.Fl u +or +.Fl k +must be specified. +.It Fl k +Use the current credentials as the baseline. +Incompatible with +.Fl u . +Implies +.Fl i . +.It Fl -ruid Ar user +Override the real user. +As for +.Fl u , +.Ar user +may either be a name or a numerical ID. +.It Fl -rgid Ar group +Override the real group. +As for +.Fl g , +.Ar group +may either be a name or a numerical ID. +.It Fl s Ar groups_mod1,groups_mod2,... +Incrementally modify the supplementary groups set. +The argument is a comma-separated list of directives: +.Bl -tag -width indent -compact +.It Cm @ +Reset the set to the empty set. +When present, must be the first directive. +.It Cm + Ns Ar group +Include a group. +.It Cm - Ns Ar group +Exclude a group. +.El +If +.Fl G +is also specified, +.Fl s +applies on the list installed by it. +In this case, the +.Cm @ +directive cannot be used +.Pq this limitation may be lifted in the future . +.It Fl -svuid Ar user +Override the saved user. +As for +.Fl u , +.Ar user +may either be a name or a numerical ID. +.It Fl -svgid Ar group +Override the saved group. +As for +.Fl g , +.Ar group +may either be a name or a numerical ID. +.It Fl u Ar user +Specify a target user. +If +.Ar user +is the name of some user in the user database, +this option establishes his full login credentials, as specified by the user and +group databases, as the baseline. +Else, +.Ar user +is interpreted as a numerical user ID, and that ID is used to set the target +user only. +.El +.Sh EXAMPLES +Run a command as another user: +.Bd -literal -offset indent +mdo -u alice id +.Ed +.Pp +Run with explicit primary and supplementary groups: +.Bd -literal -offset indent +mdo -u 1001 -g wheel -G staff,operator /bin/sh +.Ed +.Pp +Modify only supplementary groups for the current user: +.Bd -literal -offset indent +mdo -k -s +wheel,+operator /usr/bin/id +.Ed +.Pp +Emulate the effect of a set-user-ID bit on the process image file, assuming its +user ID is +.Dq root : +.Bd -literal -offset indent +mdo -k --euid root --svuid root id +.Ed .Sh SEE ALSO .Xr su 1 , +.Xr setcred 2 , .Xr mac_do 4 .Sh HISTORY The .Nm -command appeared in +command first appeared in .Fx 14.2 . +.Pp +Support for specifying or amending groups, group-only transitions and +fine-grained control of real, effective and saved variants of user and primary +group first appeared in +.Fx 15.0 . +.Sh AUTHORS +The +.Nm +program was originally created by +.An -nosplit +.An Baptiste Daroussin Aq Mt bapt@FreeBSD.org . +It was modified to use the +.Xr setcred 2 +system call by +.An Olivier Certner Aq Mt olce@FreeBSD.org , +who designed the group-related and fine-grained-control-of-target-credentials +functionalities and supervised +.An Kushagra Srivastava Aq Mt kushagra1403@gmail.com +to add them during Google Summer of Code 2025. +.Sh SECURITY CONSIDERATIONS +The +.Nm +program is geared to role-based scenarios. +Consequently, it does not ask for any password or request other form of +authentication before trying to establish new credentials, instead relying +solely on the requester's credentials for this purpose. +.Pp +Specific unprivileged uses may be enabled by using the +.Xr mac_do 4 +security policy. From nobody Wed Nov 26 20:31:58 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dGrnp1pxfz6HPW6 for ; Wed, 26 Nov 2025 20:31:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dGrnp1Gtxz3RYM for ; Wed, 26 Nov 2025 20: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=1764189118; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=akQekX37cypbo8O+I9ig0+4e5IGn3acotHh4jBTGRxY=; b=iwmS06M5lFoqmaMA+gsO8ZOQdQtUq5O94ptukNrLBA2jB31nH+GeNKuXPTxcz2VgJ8BR71 EAXYmYED0jNsvATrGgK+XH86Xz29XqedmD+uVfTPg8sUQG/vpjL331ui0T9y7fjkxxOFwj ZzpV2J6oSPOdaaKG9H3hkC2Qkc+x6tMGtPK8ca+GVpKKXY5/4TzrN3DZQPjYIOxjnMjgq3 fzCyUDR1704+ZbxYoeQ1GfvcXIoal15CQViHsBl0bs7/AxTwBdyNWiGFNbRJBVzXOPEGzG aK4joK9gKUdWp/zXyBSI+xgeipHz/fVOCEAZu3RWeme9x19DPdRgoM9N/gtP4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764189118; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=akQekX37cypbo8O+I9ig0+4e5IGn3acotHh4jBTGRxY=; b=J6tH98qHPOv/zJ8fHWhwaelvczeM12pp1uaCxSy3EEL6KRXWzVBs9FeIMxQct0VUk2rhkB OUyRGigS6oV1hun5UoDTSFF18wjh86qTjj11cceRE55+eJTs4Tx1lyf7/ekJqLqz0YSM9N QfvxBl05VPCPcy4pzIpxRjsVEKGeZOzjJGfUylpu9vvAz5ka+6GbqSXlOEEsPmaTKRyAnD 6VDyqrRpLOgX9jEyrXmTb8R0oVJ1RywHooPJoi0GeX9MOIwKnz0nTL9o/J5Df4/Xa+Cxzr 1yv8v0eekpOTzrb5VipSECBskuLlhdnyCDagxD4eyWVrIYk2jYH2aE3LmEjb9g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764189118; a=rsa-sha256; cv=none; b=wDSlpyxZ8J2RfM7LP1Ob8UTa17RdDq1TRDPzWHCIw5sptkeAvxvOg5OrFh1GbnNIDvdSbh zCNtb9PS07fFNsU50V57YhtEy28ahpl6qjTgL9dpCPsE6FL+MZIwLNCvF6vOkLCbkUoD4O xco9tX2stV8Wsz7nAqBFjsPYtEjt7sslaMldFOOG60YEqSSRLb1xyB9PnmWmlfTM3NLEYS /UeiLoagXYVrvyrwIt2U0NU57DQHQtRV0ZL5ecACAlLI/UVUPmvQfrny7I3K7u2cdOJh16 h/SkyEQOisjnJsDZBxW3q7Bz35jl/Zhtcxy1pbbfiFEgrsBvKhnorbMm1EnV3A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dGrnp0p7rz11y0 for ; Wed, 26 Nov 2025 20:31:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 30e89 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 26 Nov 2025 20:31:58 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Olivier Certner Subject: git: dc7503479273 - stable/15 - mdo.1: Document group-related and fine-grained control functionalities List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: dc75034792739a638edf3d7b756e7175e5a79bf7 Auto-Submitted: auto-generated Date: Wed, 26 Nov 2025 20:31:58 +0000 Message-Id: <692763be.30e89.730c648f@gitrepo.freebsd.org> The branch stable/15 has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=dc75034792739a638edf3d7b756e7175e5a79bf7 commit dc75034792739a638edf3d7b756e7175e5a79bf7 Author: Olivier Certner AuthorDate: 2025-09-01 15:24:54 +0000 Commit: Olivier Certner CommitDate: 2025-11-26 20:31:23 +0000 mdo.1: Document group-related and fine-grained control functionalities This is a manual page update describing the functionality that was added to mdo(1) in commit 3ca1e69028ac ("mdo(1): Add support and shortcuts for fully specifying users and groups"). Please either refer to that commit or the new manual page's content for more information. While here: - Add to the introduction a description of process credentials and some specific vocabulary that is used throughout the page, as well as the relationship between mdo(1) and mac_do(4). - Update the HISTORY section. - Add AUTHORS and SECURITY CONSIDERATIONS sections. Reviewed by: ziaee MFC after: 1 minute Sponsored by: The FreeBSD Foundation Sponsored by: Google LLC (GSoC 2025) Co-authored-by: Kushagra Srivastava Differential Revision: https://reviews.freebsd.org/D53905 (cherry picked from commit 73dd00f2fd7de2a5d8dda8fa25ebcd7c8964ff52) --- usr.bin/mdo/mdo.1 | 269 +++++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 245 insertions(+), 24 deletions(-) diff --git a/usr.bin/mdo/mdo.1 b/usr.bin/mdo/mdo.1 index c4586f628661..1de694c69e40 100644 --- a/usr.bin/mdo/mdo.1 +++ b/usr.bin/mdo/mdo.1 @@ -1,49 +1,270 @@ .\"- -.\" Copyright(c) 2024 Baptiste Daroussin -.\" .\" SPDX-License-Identifier: BSD-2-Clause .\" -.Dd May 26, 2025 +.\" Copyright (c) 2024 Baptiste Daroussin +.\" Copyright (c) 2025 Kushagra Srivastava +.\" Copyright (c) 2025 The FreeBSD Foundation +.\" +.\" Portions of this documentation were written by Olivier Certner +.\" at Kumacom SARL under sponsorship from the FreeBSD +.\" Foundation. +.\" +.Dd November 26, 2025 .Dt MDO 1 .Os .Sh NAME .Nm mdo -.Nd execute commands as another user +.Nd execute commands with specific credentials .Sh SYNOPSIS .Nm -.Op Fl u Ar username +.Op Fl u Ar user | Fl k .Op Fl i -.Op command Op args +.Op Fl g Ar group +.Op Fl G Ar group1,group2,... +.Op Fl s Ar groups_mod1,groups_mod2,... +.Op Fl h +.Op Fl -ruid Ar user +.Op Fl -svuid Ar user +.Op Fl -euid Ar user +.Op Fl -rgid Ar group +.Op Fl -svgid Ar group +.Op Fl -egid Ar group +.Op -- +.Op Ar command Op Ar args ... .Sh DESCRIPTION The .Nm -utility executes the specified +utility executes the passed .Ar command -as user -.Ar username . -.Pp -If no -.Ar username -is provided it defaults to the -.Va root -user. -If no +with the requested process credentials or, if no .Ar command -is specified, it will execute the shell specified as -.Va SHELL -environnement variable, falling back on -.Pa /bin/sh . +was specified, the program whose path is the value of the +.Ev SHELL +environment variable or +.Pa /bin/sh +if that variable is unset. +The calling user must either be the superuser +.Pq effective user ID of 0 +or the credentials transition from the caller's to the requested ones must be +authorized by a MAC module such as +.Xr mac_do 4 . +The target process credentials are applied atomically using +.Xr setcred 2 . .Pp +Process credentials comprise the real, effective and saved user IDs, the real, +effective and saved group IDs, hereby called the +.Dq primary +groups, and the supplementary groups as a set of group IDs. +Below, the +.Dq user +phrase implies that the real, effective and saved user IDs all have or are going +to be set to the same value. The +.Dq primary group +phrase is used similarly with respect to primary groups. +.Pp +The target process credentials have to be fully specified, either explicitly by +listing all attributes and their requested values, or indirectly by establishing +a baseline that provides a default value for each attribute, which can then be +amended by additional options. +.Pp +Possible baselines are either the full set of credentials established at login +for a specific named user, the current credentials, or the current credentials' +primary and supplementary groups which implies some user is specified +explicitly. +They are respectively established by using either option +.Fl u +with a named user argument, option +.Fl k , +or option .Fl i -option can be used to only call -.Fn setuid -and keep the group from the calling user. +in conjunction with +.Fl u +or no other options. +If no other option than +.Fl i +appears, a default of +.Fl u Cm root +is implied. +.Pp +The primary group can be set or amended with option +.Fl g , +whereas the supplementary groups can be either fully replaced with an explicit +list using option +.Fl G +or amended through set-like operations with option +.Fl s . +.Pp +Any of the individual real, effective and saved user and group IDs can be +overridden separately if desired through the options +.Fl -ruid , +.Fl -euid , +and +.Fl -svuid +for users, and +.Fl -rgid , +.Fl -egid , +and +.Fl -svgid +for groups respectively. +.Pp +The options are: +.Bl -tag -width indent +.It Fl -euid Ar user +Override the effective user. +As for +.Fl u , +.Ar user +may either be a name or a numerical ID. +.It Fl -egid Ar group +Override the effective group. +As for +.Fl g , +.Ar group +may either be a name or a numerical ID. +.It Fl G Ar group1,group2,... +Set or replace the full set of supplementary groups. +As for +.Fl g , +groups can be specified by name or numerical ID. +Groups must be separated by commas, and spaces around commas are not allowed. +.It Fl g Ar group +Set or amend the primary group. +.Ar group +may be the name of a group in the group database, else will be interpreted as +a numerical group ID. +.It Fl h +Display usage information and exit. +.It Fl i +Uses the current credentials' primary and supplementary groups as the baseline. +If no other option is present, the target user is assumed to be +.Dq root . +Otherwise, +.Fl u +or +.Fl k +must be specified. +.It Fl k +Use the current credentials as the baseline. +Incompatible with +.Fl u . +Implies +.Fl i . +.It Fl -ruid Ar user +Override the real user. +As for +.Fl u , +.Ar user +may either be a name or a numerical ID. +.It Fl -rgid Ar group +Override the real group. +As for +.Fl g , +.Ar group +may either be a name or a numerical ID. +.It Fl s Ar groups_mod1,groups_mod2,... +Incrementally modify the supplementary groups set. +The argument is a comma-separated list of directives: +.Bl -tag -width indent -compact +.It Cm @ +Reset the set to the empty set. +When present, must be the first directive. +.It Cm + Ns Ar group +Include a group. +.It Cm - Ns Ar group +Exclude a group. +.El +If +.Fl G +is also specified, +.Fl s +applies on the list installed by it. +In this case, the +.Cm @ +directive cannot be used +.Pq this limitation may be lifted in the future . +.It Fl -svuid Ar user +Override the saved user. +As for +.Fl u , +.Ar user +may either be a name or a numerical ID. +.It Fl -svgid Ar group +Override the saved group. +As for +.Fl g , +.Ar group +may either be a name or a numerical ID. +.It Fl u Ar user +Specify a target user. +If +.Ar user +is the name of some user in the user database, +this option establishes his full login credentials, as specified by the user and +group databases, as the baseline. +Else, +.Ar user +is interpreted as a numerical user ID, and that ID is used to set the target +user only. +.El +.Sh EXAMPLES +Run a command as another user: +.Bd -literal -offset indent +mdo -u alice id +.Ed +.Pp +Run with explicit primary and supplementary groups: +.Bd -literal -offset indent +mdo -u 1001 -g wheel -G staff,operator /bin/sh +.Ed +.Pp +Modify only supplementary groups for the current user: +.Bd -literal -offset indent +mdo -k -s +wheel,+operator /usr/bin/id +.Ed +.Pp +Emulate the effect of a set-user-ID bit on the process image file, assuming its +user ID is +.Dq root : +.Bd -literal -offset indent +mdo -k --euid root --svuid root id +.Ed .Sh SEE ALSO .Xr su 1 , +.Xr setcred 2 , .Xr mac_do 4 .Sh HISTORY The .Nm -command appeared in +command first appeared in .Fx 14.2 . +.Pp +Support for specifying or amending groups, group-only transitions and +fine-grained control of real, effective and saved variants of user and primary +group first appeared in +.Fx 15.0 . +.Sh AUTHORS +The +.Nm +program was originally created by +.An -nosplit +.An Baptiste Daroussin Aq Mt bapt@FreeBSD.org . +It was modified to use the +.Xr setcred 2 +system call by +.An Olivier Certner Aq Mt olce@FreeBSD.org , +who designed the group-related and fine-grained-control-of-target-credentials +functionalities and supervised +.An Kushagra Srivastava Aq Mt kushagra1403@gmail.com +to add them during Google Summer of Code 2025. +.Sh SECURITY CONSIDERATIONS +The +.Nm +program is geared to role-based scenarios. +Consequently, it does not ask for any password or request other form of +authentication before trying to establish new credentials, instead relying +solely on the requester's credentials for this purpose. +.Pp +Specific unprivileged uses may be enabled by using the +.Xr mac_do 4 +security policy. From nobody Wed Nov 26 20:35:36 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dGrt03PYRz6HPnj for ; Wed, 26 Nov 2025 20: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dGrt02bTqz3RwG for ; Wed, 26 Nov 2025 20: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=1764189336; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MGCIAFDn9Ola5GGZcKVRU0RZ7v1NTs3sU+58TJRetqQ=; b=G8lQK3z8Byu8VhGsZhgYi8PNjZsfNXyjLC5oJip/V+M4qyhv9s8Ll8yoeFfu2z4uKdRfrS yrPMm/yp0AoMKuUvxgC/jET4E/eli7yQGL0fPG7vst6HaZNfv53+8xp2awKL0N2N982GIU 9HQUTfptrwHXPZNueA0WDIsmfkpdPEi6DZ++dV7sw0BxWDguOlcLYU8HazhXbVqXAf/iBF WS9wwez3UoXys6+HnxvZWoCHHud/+SYZoBdnPk3xO0kvodyX2ghj8hXEbgZONsYg/iG8Hf lC2SMjuPW1N4pJkyBryA75czlWoZB/XWaqCZxXsXyHVeNPkc7nFSHLjL2HLRgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764189336; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MGCIAFDn9Ola5GGZcKVRU0RZ7v1NTs3sU+58TJRetqQ=; b=oe6lGB5397/XhrCmbXSlmblidLtbEdTchGQ446IwunfzQGhQnZP+D0s84+vd7UyPpWZlvs Fja3T6blORCG7GYYL6ZvB1cfGFnIFMOcMRTCTQQl9ze8c+/B4qhteWSTSBYnuddnOBE7TQ QJVrmDQvQyNrzvEJpyQsaz3ji2SpIOYA3KR1PbupSMN0U7cHn3ogBZJZtwQdzdb6VkrGIK 7zlY35BQHlogngiOm1RoUHJBCT5vPLVrRUoQ93FIJBmCnaPhsLIjl020kjFb7pM3Hm4SDQ rbDrPFyoPBsA1CVVeDEPUt5FvCSDyIwtDfeU0ZUPVz1cru9Pbjhw6zOkEbqT+w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764189336; a=rsa-sha256; cv=none; b=o/qkEmbEpTESkuscoiaZT06Syc0Jc5tTzzm+JNoHj90Fa2KD0gsulkiR4px4EJuHqJEPYk FnXqAgiXM2p+e/cjz2VIC2hCrqu/CYK3dOlw3jAHLkFwzjzxJ2JIzGescnIfQHfVHuYgut XJ1nHIQVEUxOXUDlycZ+uNSXpsIm57O30uizXPQlYwW+OSNSjI9J4qea4mGE76wxvERnaL 54T7zw6zBOagKAsYIw+ahEMIGNheh3987Irv40VtHnd4IDq34lqliC7UtlySdHhPHjYZf6 fi4zi03PBlomBGZ5LrQ5anPmur5+01gGTYYS8DE7zUhDSJs+oEBK3K2JJCIauA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dGrt0296Dz12fV for ; Wed, 26 Nov 2025 20:35:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 30e8f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 26 Nov 2025 20:35:36 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jose Luis Duran Subject: git: 19e153004fb6 - main - strfmon: Add tests for Austin Group Defect 1199 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 19e153004fb63c32eba0ef40249f5ede61a93170 Auto-Submitted: auto-generated Date: Wed, 26 Nov 2025 20:35:36 +0000 Message-Id: <69276498.30e8f.5ef3e274@gitrepo.freebsd.org> The branch main has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=19e153004fb63c32eba0ef40249f5ede61a93170 commit 19e153004fb63c32eba0ef40249f5ede61a93170 Author: Jose Luis Duran AuthorDate: 2025-11-26 20:34:55 +0000 Commit: Jose Luis Duran CommitDate: 2025-11-26 20:34:55 +0000 strfmon: Add tests for Austin Group Defect 1199 Add tests for The Open Group Base Specifications Issue 8[1], Austin Group Defect 1199[2]. Items marked with XXX represent an invalid output. These items will be fixed in subsequent commits. Notice that an existing test is now considered invalid. Our locale definitions do not include int_p_sep_by_space nor int_n_sep_by_space[3]. Those will be addressed in a subsequent commit. However, the CLDR project defines them as "0", which causes the output to appear as "USD123.45". If our locale definitions were to set the international {n,p}_sep_by_space to "1", the output would display as the expected "USD 123.45". While here, use the SPDX license identifier and add my name to the file. [1]: https://pubs.opengroup.org/onlinepubs/9799919799/functions/strfmon.html [2]: https://www.austingroupbugs.net/view.php?id=1199 [3]: https://unicode-org.atlassian.net/browse/CLDR-237 Reviewed by: kib MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D53911 --- lib/libc/tests/stdlib/strfmon_test.c | 80 +++++++++++++++++++++++++----------- 1 file changed, 57 insertions(+), 23 deletions(-) diff --git a/lib/libc/tests/stdlib/strfmon_test.c b/lib/libc/tests/stdlib/strfmon_test.c index 86f6256dba0b..3c97d61ba82c 100644 --- a/lib/libc/tests/stdlib/strfmon_test.c +++ b/lib/libc/tests/stdlib/strfmon_test.c @@ -1,31 +1,14 @@ -/*- - * Copyright (C) 2018 Conrad Meyer +/* + * Copyright (c) 2018 Conrad Meyer * All rights reserved. + * Copyright (c) 2022-2025 Jose Luis Duran * - * 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. + * SPDX-License-Identifier: BSD-2-Clause */ #include +#include #include #include #include @@ -208,6 +191,56 @@ ATF_TC_BODY(strfmon_international_currency_code, tc) } } +ATF_TC_WITHOUT_HEAD(strfmon_plus_or_parenthesis); +ATF_TC_BODY(strfmon_plus_or_parenthesis, tc) +{ + const struct { + const char *format; + const char *locale; + const char *expected; + } tests[] = { + { "%+n", "en_US.UTF-8", "[$123.45] [-$123.45]" }, + { "%+i", "en_US.UTF-8", "[USD123.45] [-USD123.45]" }, + { "%(n", "C", "[123.45] [(123.45)]" }, + { "%(i", "C", "[123.45] [(123.45)]" }, + { "%(n", "en_US.UTF-8", "[$123.45] [($123.45)]" }, + { "%(i", "en_US.UTF-8", "[USD123.45] [(USD123.45)]" }, + { "%n", "C", "[123.45] [(123.45)]" }, /* XXX */ + { "%i", "C", "[123.45] [(123.45)]" }, /* XXX */ + { "%n", "en_US.UTF-8", "[$123.45] [-$123.45]" }, + { "%i", "en_US.UTF-8", "[USD123.45] [-USD123.45]" }, + }; + size_t i; + char actual[100], format[50]; + + for (i = 0; i < nitems(tests); ++i) { + if (setlocale(LC_MONETARY, tests[i].locale) == NULL) + atf_tc_skip("unable to setlocale(): %s", + tests[i].locale); + + snprintf(format, sizeof(format), "[%s] [%s]", + tests[i].format, tests[i].format); + strfmon(actual, sizeof(actual) - 1, format, + 123.45, -123.45); + ATF_CHECK_STREQ_MSG(tests[i].expected, actual, + "[%s] %s", tests[i].format, tests[i].locale); + } + + /* + * The '+' flag was included in a conversion specification and + * the locale's positive_sign and negative_sign values would + * both be returned by localeconv() as empty strings. + */ + if (setlocale(LC_MONETARY, "C") == NULL) + atf_tc_skip("unable to setlocale(): %s", tests[i].locale); + + /* ATF_CHECK_ERRNO(EINVAL, strfmon(actual, sizeof(actual) - 1, + "[%+n] [%+n]", 123.45, -123.45)); XXX */ + + /* ATF_CHECK_ERRNO(EINVAL, strfmon(actual, sizeof(actual) - 1, + "[%+i] [%+i]", 123.45, -123.45)); XXX */ +} + ATF_TC(strfmon_l); ATF_TC_HEAD(strfmon_l, tc) { @@ -220,7 +253,7 @@ ATF_TC_BODY(strfmon_l, tc) const char *locale; const char *expected; } tests[] = { - { "C", "[ **1234.57 ] [ **1234.57 ]" }, + { "C", "[ **1234.57 ] [ **1234.57 ]" }, /* XXX */ { "de_DE.UTF-8", "[ **1234,57 €] [ **1.234,57 EUR]" }, { "en_GB.UTF-8", "[ £**1234.57] [ GBP**1,234.57]" }, }; @@ -247,6 +280,7 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, strfmon_cs_precedes_0); ATF_TP_ADD_TC(tp, strfmon_cs_precedes_1); ATF_TP_ADD_TC(tp, strfmon_international_currency_code); + ATF_TP_ADD_TC(tp, strfmon_plus_or_parenthesis); ATF_TP_ADD_TC(tp, strfmon_l); return (atf_no_error()); } From nobody Wed Nov 26 20:35:37 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dGrt15TmZz6HPmn for ; Wed, 26 Nov 2025 20: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dGrt13Yphz3SCM for ; Wed, 26 Nov 2025 20: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=1764189337; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZhYuXlgqPg888J96PJYX2MTFNqpEYjBGySCeqrTg7F8=; b=Fmc8xeYmITb+ptywQ35XxC9hPwPX0HTd+ph4mGBYxeoA9fVfLS4wxCDzCRZrypfDhb+feT EHNH+GX9bTm33AXaImvVqV3vbfV7L6mWPJy6CCCDoXSiZZK9RfS+3AyzI1iCAvffMaUqQ6 /23w3QoMysmaYfxHyQxupu5hLkFaOIdUUERlO2C+URkn7BYumUtMcpsRiydccFj1qyc3AV b9ixUxDoTbpUsNc7PT1ywLphdOjDcUjEepJ0H8aRrpq2IddcPtH2DsfPWtxpDpaBlegvho Vlm7CI+7yP8rPkalkmlhsPnzAObKKF0MqJwSDVUmY5C5KTe7Ta1z//DGkIk7vQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764189337; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZhYuXlgqPg888J96PJYX2MTFNqpEYjBGySCeqrTg7F8=; b=Lauw/Bc3de/1U+5HdZCdalEQmyDijme0rGGz7tVXXawyfHJnW+302+Uqq96blJbu9sa1GJ dqgpKMjdIyqLrTmobYM4V/aMDvw+sA7kwpwzEMXj9DrwmuRXNFGlSVCZRQXws9LIemfj/M szP6HkY2uPLHHLN9aL1QMjxoULiPl0N3u8G4zylEhxgPkIVMrZJyayh0jM9Fwb/W1lpTSj BkJ4tOYSiOpfJAMe5t1S9qg4DvSjLwGiQqZ1ovFZLuIlVGUVL6Os7WOhGz+mmlQpvv8/2E w40G+dkUTuCL42yzrD/jtnB/bXpAxxRyzOp+Trb1TnMcxA0o/d+GJcYQrBHHfw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764189337; a=rsa-sha256; cv=none; b=t9kS9vNiIfkjqWl7EkrO7tFFwgOs7S7F/rlDRQ/DD9dBUYT246qwM4d2cHjh9mtJRVlpTa UIO3qyBOuvClU4Fs+YGQ2Fastck02yoeJYwPeTpzziatlvGqf/PYUTisNL1m08Dxy6HVo0 URyAjuVb0/len3jei+YGwgprDStjkThv+Kis5dokcXyEQdQ1yE1RaLwi0v4d/9ftPKNd3A 8RTbFAlWUfdHFBJd3/htyqPqnG//4wzfk5UNwf+RxyIIUQ4vc9y796Ev9G4rKWxIbPfRb1 DQ5SKQUoZ2pYrBF1QswnT8G4N2R29/vnoibyJtWs8MLe43vl92HJfPsAOOKcCw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dGrt135MHz12CD for ; Wed, 26 Nov 2025 20:35:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2ed7b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 26 Nov 2025 20:35:37 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jose Luis Duran Subject: git: 1fd018972a18 - main - strfmon: EINVAL if the '+' flag and both signs are empty List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1fd018972a18b682521bb8f004dfd162327e5db2 Auto-Submitted: auto-generated Date: Wed, 26 Nov 2025 20:35:37 +0000 Message-Id: <69276499.2ed7b.2ef50b70@gitrepo.freebsd.org> The branch main has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=1fd018972a18b682521bb8f004dfd162327e5db2 commit 1fd018972a18b682521bb8f004dfd162327e5db2 Author: Jose Luis Duran AuthorDate: 2025-11-26 20:34:55 +0000 Commit: Jose Luis Duran CommitDate: 2025-11-26 20:34:55 +0000 strfmon: EINVAL if the '+' flag and both signs are empty According to the Open Group Base Specifications Issue 8[1], strfmon(3) should return EINVAL when the '+' flag was included in a conversion specification and the locale's positive_sign and negative_sign values would both be returned by localeconv(3) as empty strings. Austin Group Defect 1199[2] is applied, adding the [EINVAL] error. [1]: https://pubs.opengroup.org/onlinepubs/9799919799/functions/strfmon.html [2]: https://www.austingroupbugs.net/view.php?id=1199 Reviewed by: kib MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D53912 --- lib/libc/stdlib/strfmon.3 | 12 +++++++++++- lib/libc/stdlib/strfmon.c | 4 +++- lib/libc/tests/stdlib/strfmon_test.c | 8 ++++---- 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/lib/libc/stdlib/strfmon.3 b/lib/libc/stdlib/strfmon.3 index 20cc560d401d..d537d9d05fa7 100644 --- a/lib/libc/stdlib/strfmon.3 +++ b/lib/libc/stdlib/strfmon.3 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd December 6, 2023 +.Dd November 24, 2025 .Dt STRFMON 3 .Os .Sh NAME @@ -182,6 +182,16 @@ function will fail if: Conversion stopped due to lack of space in the buffer. .It Bq Er EINVAL The format string is invalid. +.It Bq Er EINVAL +The +.Cm + +flag was included in a conversion specification and the locale's +.Va positive_sign +and +.Va negative_sign +values would both be returned by +.Xr localeconv 3 +as empty strings. .It Bq Er ENOMEM Not enough memory for temporary buffers. .El diff --git a/lib/libc/stdlib/strfmon.c b/lib/libc/stdlib/strfmon.c index 230d194233f5..b19d9fc43369 100644 --- a/lib/libc/stdlib/strfmon.c +++ b/lib/libc/stdlib/strfmon.c @@ -171,7 +171,9 @@ literal: flags &= ~(NEED_GROUPING); continue; case '+': /* use locale defined signs */ - if (flags & SIGN_POSN_USED) + if ((flags & SIGN_POSN_USED) || + ((lc->positive_sign[0] == '\0') && + (lc->negative_sign[0] == '\0'))) goto format_error; flags |= (SIGN_POSN_USED | LOCALE_POSN); continue; diff --git a/lib/libc/tests/stdlib/strfmon_test.c b/lib/libc/tests/stdlib/strfmon_test.c index 3c97d61ba82c..165ddcc2ab56 100644 --- a/lib/libc/tests/stdlib/strfmon_test.c +++ b/lib/libc/tests/stdlib/strfmon_test.c @@ -234,11 +234,11 @@ ATF_TC_BODY(strfmon_plus_or_parenthesis, tc) if (setlocale(LC_MONETARY, "C") == NULL) atf_tc_skip("unable to setlocale(): %s", tests[i].locale); - /* ATF_CHECK_ERRNO(EINVAL, strfmon(actual, sizeof(actual) - 1, - "[%+n] [%+n]", 123.45, -123.45)); XXX */ + ATF_CHECK_ERRNO(EINVAL, strfmon(actual, sizeof(actual) - 1, + "[%+n] [%+n]", 123.45, -123.45)); - /* ATF_CHECK_ERRNO(EINVAL, strfmon(actual, sizeof(actual) - 1, - "[%+i] [%+i]", 123.45, -123.45)); XXX */ + ATF_CHECK_ERRNO(EINVAL, strfmon(actual, sizeof(actual) - 1, + "[%+i] [%+i]", 123.45, -123.45)); } ATF_TC(strfmon_l); From nobody Wed Nov 26 20:35:38 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dGrt25CNRz6HPtq for ; Wed, 26 Nov 2025 20: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dGrt24Fx3z3S6j for ; Wed, 26 Nov 2025 20: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=1764189338; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=F5HdoaC6VzmDqSE12pAVjFaQkIkExr9+PzaMjYpOTlU=; b=YRBbiD7T3EmDCNHJZz/RsLYsJVuoOOPH65DCwUWA8JsLuVEaS5KkNViQ7fLLevBc635Ts7 PVHlhwu0iZTU31eIRPAJIezD5nJBm8NIUYzf0hudCewD6wfA4bYj/K3fVFjIdgv7XMenoK nRqMdpf5td5NeAjs5sYI9IL5XN1yEQOwxYGIdxYGr4WQiuEUqPkelg96hgGZe09nK1Dwb+ hxt3rhfLqTSgVtThbYcezM16+guB8SH01p0aC02FlIZLuuDoweh272136eOxOIM0sPOB63 RP/rFvf8LOB+M7Ng3gCIFMYuya/dgNVuu1yol4DrocRFv6fgzRE/7hJJlh6vEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764189338; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=F5HdoaC6VzmDqSE12pAVjFaQkIkExr9+PzaMjYpOTlU=; b=t4Y654eSkuUvn56ruE4g9mkCHsIi+2cFFuwM5zU1rJxUAxNcVH0gVUWIDls3/zBWcHbBtV 8bqziRZJT5gnLXNBtl38Fpa0saX0Yw/sAVndPzYWQJKzqT5fVHEjABDFnMZvnCYBFXFK3K ZCa5j3Fg15OELI2VQeKnfYEGWLGL5cttcnk5m0VJ9JyxhbzWUR0fbyXORhAdX8qBNY0XH9 oLwQTldbKKOv6PE3cNHpDCk3Is9vDkNjeg7znoiyW7Bl0aTBwzORXWWt7wzPj45XlYH07H G13PZ2UkRTtKZdIXQy6RuJi+t95AXXkGPNWK/WE+HY0WF+crmNOqWCPKF/nwUQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764189338; a=rsa-sha256; cv=none; b=q+BIo8DRdGIalTkxwbWKcvjS7PRgOtaGFwYaWpwtzfFLwMi8vF1yt+dj3+j2hOQvsz71Yp DUKD1Zr5UYz6TKb1da6Yi1X9PBb+N+PafGHRXMkRllD8rvAz4tLx1cyHHs12u8dwFb2z8V hL/ESMuAUmsW0dwxzY6+i/BAXpkz/0O5zdRWuC7oq/u3iaSKWy08VbP1aUL2vjX9zn5j57 OBNclTMDk/btdZjeAg5eW8lw2Pn5HLY7ncKlKcLFfpjeLHYTC5AT863Ida+alU8931ZXEC /ouPaUjLH4hjrwXV+RQHu/NNb5cJW3SaJ7FflSSZ2nYV+RWtQQJ9dmjEcvj0LA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dGrt23kKsz1225 for ; Wed, 26 Nov 2025 20:35:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 31526 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 26 Nov 2025 20:35:38 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jose Luis Duran Subject: git: cf85e7034ad5 - main - strfmon: Fix negative sign handling for C locale List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cf85e7034ad5640b18a3b68d6b291b7bf89bfc80 Auto-Submitted: auto-generated Date: Wed, 26 Nov 2025 20:35:38 +0000 Message-Id: <6927649a.31526.2a622852@gitrepo.freebsd.org> The branch main has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=cf85e7034ad5640b18a3b68d6b291b7bf89bfc80 commit cf85e7034ad5640b18a3b68d6b291b7bf89bfc80 Author: Jose Luis Duran AuthorDate: 2025-11-26 20:34:56 +0000 Commit: Jose Luis Duran CommitDate: 2025-11-26 20:34:56 +0000 strfmon: Fix negative sign handling for C locale If the locale's positive_sign and negative_sign values would both be returned by localeconv() as empty strings, strfmon() shall behave as if the negative_sign value was the string "-". This occurs with the C locale. The implementation previously assigned "0" to sign_posn (parentheses around the entire string); now it assigns it to "1" (sign before the string) when it is undefined (CHAR_MAX). Austin Group Defect 1199[1] is applied, changing the requirements for the '+' and '(' flags. [1]: https://www.austingroupbugs.net/view.php?id=1199 Reviewed by: kib MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D53913 --- lib/libc/stdlib/strfmon.c | 2 +- lib/libc/tests/stdlib/strfmon_test.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/libc/stdlib/strfmon.c b/lib/libc/stdlib/strfmon.c index b19d9fc43369..611ac45b9c82 100644 --- a/lib/libc/stdlib/strfmon.c +++ b/lib/libc/stdlib/strfmon.c @@ -457,7 +457,7 @@ __setup_vars(int flags, char *cs_precedes, char *sep_by_space, char *sign_posn, if (*sep_by_space == CHAR_MAX) *sep_by_space = 0; if (*sign_posn == CHAR_MAX) - *sign_posn = 0; + *sign_posn = 1; } static int diff --git a/lib/libc/tests/stdlib/strfmon_test.c b/lib/libc/tests/stdlib/strfmon_test.c index 165ddcc2ab56..c6c20bd26985 100644 --- a/lib/libc/tests/stdlib/strfmon_test.c +++ b/lib/libc/tests/stdlib/strfmon_test.c @@ -205,8 +205,8 @@ ATF_TC_BODY(strfmon_plus_or_parenthesis, tc) { "%(i", "C", "[123.45] [(123.45)]" }, { "%(n", "en_US.UTF-8", "[$123.45] [($123.45)]" }, { "%(i", "en_US.UTF-8", "[USD123.45] [(USD123.45)]" }, - { "%n", "C", "[123.45] [(123.45)]" }, /* XXX */ - { "%i", "C", "[123.45] [(123.45)]" }, /* XXX */ + { "%n", "C", "[123.45] [-123.45]" }, + { "%i", "C", "[123.45] [-123.45]" }, { "%n", "en_US.UTF-8", "[$123.45] [-$123.45]" }, { "%i", "en_US.UTF-8", "[USD123.45] [-USD123.45]" }, }; @@ -253,7 +253,7 @@ ATF_TC_BODY(strfmon_l, tc) const char *locale; const char *expected; } tests[] = { - { "C", "[ **1234.57 ] [ **1234.57 ]" }, /* XXX */ + { "C", "[ **1234.57] [ **1234.57]" }, { "de_DE.UTF-8", "[ **1234,57 €] [ **1.234,57 EUR]" }, { "en_GB.UTF-8", "[ £**1234.57] [ GBP**1,234.57]" }, }; From nobody Wed Nov 26 21:16:16 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dGsmw5Ngnz6HVPw for ; Wed, 26 Nov 2025 21:16:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dGsmw1wGtz3YSG for ; Wed, 26 Nov 2025 21:16:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764191776; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pNW7SzH3U2rEcDCG2uk14ZfFCtJjn4z4ce0oT64bPfc=; b=vsUPUww8pLk93vljOCnc05eN5trnvisnHBBBJbPj1sOBWHEAPLd5AJv3v6lng8v4BcnOsM l0EEWQXYv3uj7enCRG6WA1zumIMrvVgdMHee242n9N4aL7CZhD1aqm7+UUQmJq06VWywfd O+ypyr2rshSztSSDbBiX0vfXvUFwUH8hl4rXtnWP/N4ek16ySP96tjL3NFqYjt/xfCN9hM 1c81mmJkHi4nNk8D6/bYwVPtZSPbM8DJ7snJR1E/re4yoB4PbwLeUp91eYM8OhjOdXcei9 jmpQ+nOPtnLO2YOPL3gTsPOV3GKYHbFWDZ+DjmYNTfXs7z/Thta94o7aeS6ztQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764191776; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pNW7SzH3U2rEcDCG2uk14ZfFCtJjn4z4ce0oT64bPfc=; b=AxodWontUo/xOMEpW5VuXXdqB3wSawopLocxED1giD7KB/s8/0Mvn+Ao/Snpg5JUmzKcIM WoiTeGw0UNVyjhU4XILk2IhCPy5M38tnDQnSatiRPj8ew7obhEUIpj1qoqaImRySuWoNQX Ubn05aQKHcPwjmoKGDJbzRDJZvHjSNfluyE1VCvbH9tbqU1bKZVmO0oc6a4h5vSKE1YHEB ZYgXPXMu73+AneWrjuW5kqSPJLXhhB4q4JhFHDeb+Gdi4RwfVHC0XiJu3ZmSx03xC+LqRh C7uZn55ZXlASHiDxRy08hjqgexAQg7lezEFQha2tpAQbjfr7W657eJRFkiD4dQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764191776; a=rsa-sha256; cv=none; b=oplu0iAmqOF8TAkKBNv1w0RpKvxMunFxMLXK/A2ExMy52NzzrTfYjX3JbMbqtTlCAbdBV5 VFESfmTIjL0z6umzMu6aqfZMJt894w34x0bacrp2gkPyGf3715NDranMaIhu2i8FOzTq0H faG2LUJgcmQ5iItBhSnULTo76U18TYKcFeGvN+E5qiV476PKyblFPFypDC6QySdEj8fLgk d/VHEun8ixDhxdOy9qyTO5qEG3qyniAXzd46OvfiRBm2RSuQq23rin9AUhUvSYC17XHMAG D2ZsJJsD5DhwaRPVitH/aMOUG17ajjBQbj7mz0b6NktRKGb4HehiFH+mX0bGug== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dGsmw1GRwz13c8 for ; Wed, 26 Nov 2025 21:16:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 34b99 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 26 Nov 2025 21:16:16 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 3e69618d4bfb - main - openzfs: We are FreeBSD, not posix. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3e69618d4bfbd0d952f86703c00a979f93e6152b Auto-Submitted: auto-generated Date: Wed, 26 Nov 2025 21:16:16 +0000 Message-Id: <69276e20.34b99.75998dcc@gitrepo.freebsd.org> The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=3e69618d4bfbd0d952f86703c00a979f93e6152b commit 3e69618d4bfbd0d952f86703c00a979f93e6152b Author: Warner Losh AuthorDate: 2025-11-26 20:30:13 +0000 Commit: Warner Losh CommitDate: 2025-11-26 21:01:05 +0000 openzfs: We are FreeBSD, not posix. Partially revert: https://github.com/openzfs/zfs/commit/99d7453b43dc0ef04a35e461ef14db72e1326c7c which introduced this file upstream. This causes this definition to be preferred for all builds. Make the smallest change possible to this file to change the default to FreeBSD. We're talking to the upstraem folks about the right fix. Feel free to revert this in the future, so long as `bectl activate -t` still works properly afterwards. Sponsored by: Netflix --- sys/contrib/openzfs/lib/libzpool/include/sys/zfs_bootenv_os.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/contrib/openzfs/lib/libzpool/include/sys/zfs_bootenv_os.h b/sys/contrib/openzfs/lib/libzpool/include/sys/zfs_bootenv_os.h index 44afbb6f5b6b..a4dadd83346f 100644 --- a/sys/contrib/openzfs/lib/libzpool/include/sys/zfs_bootenv_os.h +++ b/sys/contrib/openzfs/lib/libzpool/include/sys/zfs_bootenv_os.h @@ -30,7 +30,7 @@ extern "C" { #endif -#define BOOTENV_OS BE_POSIX_VENDOR +#define BOOTENV_OS BE_FREEBSD_VENDOR #ifdef __cplusplus } From nobody Wed Nov 26 22:47:52 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dGvpt0fzPz6Hh5X for ; Wed, 26 Nov 2025 22:48:06 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: from mail-il1-x132.google.com (mail-il1-x132.google.com [IPv6:2607:f8b0:4864:20::132]) (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 4dGvps3TLCz3nxK for ; Wed, 26 Nov 2025 22:48:00 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Authentication-Results: mx1.freebsd.org; none Received: by mail-il1-x132.google.com with SMTP id e9e14a558f8ab-4331709968fso1549415ab.2 for ; Wed, 26 Nov 2025 14:48:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd.org; s=google; t=1764197274; x=1764802074; darn=freebsd.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=1cSVrjpYAcDKNHgiQjs7JYwVdiDzgTUD/dalY61FVk0=; b=TsKh3xblEcajnHT5l5tD1WepV7Xi7xTu0M1w4RxW7KLGAFo9FWUNV0P/pLdb7OwNBY vnMMBlCPJAN/OKmGmqT5DVtL90bkgDLbP8r7eouZEU+UEo5iGekf55lBLbcbVNXOYoa6 01d+qJW2+HbEkXHDKbcGTFlneIwIpK9MpNpjknGVvrbYrJM0H6rDLJPxbC9leBzG5dW8 9twTgtBPOqiDk+xVNGEREqmWa+R3gpvL0EEBEQvCjzYrOHhp+K0vtIxTtyu+Zp1taVdh OLvss6lQqsJ2F32ouROYST53oWhSexOX2fIGt2iMbgi4jOQxDVxNcD6znA9UFczVORsV AbQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764197274; x=1764802074; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=1cSVrjpYAcDKNHgiQjs7JYwVdiDzgTUD/dalY61FVk0=; b=VtOif86eB/wziCpaqh+a4Srxnhc3Y5KJrZDtHKIeBAwu8P4GP6rRwudDmZ1ZJAU0nb mMQ+m1C2vxjlH7xA1HL83GKPSMbYEVf9XzugplfDl25wbQ342gShZNv/TeIAATCiiIL6 lHBtPepuE7tIObttFFw0PO8viY0MsrQU9ELtdJib2l6lNn0pTkt4HP09BhqKOKgIEuS3 5Ds4zBAyX3kDxcG10HIg8ikJwiFwQJsNgLQqgK+CiA5OuL3LDEqX4o2oWce18fka6jIp udp448+TEJKUAYlyHCwne0vsKTRDA+zUyXogHof63sJ2Ze7YOBAdv34uQOoY6xBNKtow RHZQ== X-Forwarded-Encrypted: i=1; AJvYcCXJd4Rq+w+ipQQFkWkXGZEDydizNORa61/1ql7ZogK0z4ExHaf+JLboAbGltClgiDzbtIOqhd+2ucqFPPXQRjPfvsuX@freebsd.org X-Gm-Message-State: AOJu0YzvFu7XnThyBHVRN4xXUfrXWkatmSVjf5N3aSEpfwt6xy4i1Vg6 lTxv2TXP8hUKnVV4Tblnbco2FcS8gGVgTqG/powUw0HRPxMnuaqDsrLao8Jsq0zQ+1c= X-Gm-Gg: ASbGnct0M69eFhAYrfu1l0TofrrHqHJyCpyQ9fqKjM00Kc+qoRwB/xow8K/Fh4Be5NI SFnUpUg91pLX7FaorgMuFXmHiwFd5FAbfkFJv4NCqjHuUYHTOFktiVJsB4zc4WzfLDjwYPlJQKp yYWEJ7lFO86syGcnKF5NU6HV/JYCTSIrWX6V/sa5npq/kvjj+FFm6+4fEl8HohUAJ32kGWfPiMc PMewxEeOgCFKHsUj5bh3BLmj2mFw3ufIcDquWMK5M/DzeB7Zgq8XBddQ2+Pxg9615At1Smlpagy BQSGcZkyDHX/MYzlfzIgtOvUFHx6mfR65uerNyUjsO3lt6IqrkP09VJTFFf611idgnPeOuGSMGS 7qBOKagBO1hlN8GNeOE1ZH6Jsisf9tVbTq+X1sMLl3ZTlMOWx5BfyexOfp//lcnN/Y5YKb7Elbh XwXS8= X-Google-Smtp-Source: AGHT+IH2DelQaxdne36vX98dzLUUwke14F0uCWpgMTvCBqzKRDP5fRQkfdTSF2h3gVz93MrQ98jEpw== X-Received: by 2002:a92:ca0f:0:b0:434:6f6a:fba4 with SMTP id e9e14a558f8ab-435b8c18b77mr186893175ab.5.1764197274078; Wed, 26 Nov 2025 14:47:54 -0800 (PST) Received: from mutt-hbsd ([2001:470:4001:1::95]) by smtp.gmail.com with ESMTPSA id e9e14a558f8ab-435a9069247sm91978675ab.15.2025.11.26.14.47.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Nov 2025 14:47:53 -0800 (PST) Date: Wed, 26 Nov 2025 22:47:52 +0000 From: Shawn Webb To: Gordon Tetlow Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 2a3a6a177114 - main - Mitigate YXDOMAIN and nodata non-referral answer poisoning. Message-ID: X-Operating-System: FreeBSD mutt-hbsd 14.3-STABLE-HBSD FreeBSD 14.3-STABLE-HBSD HARDENEDBSD-14-STABLE amd64 X-PGP-Key: https://git.hardenedbsd.org/hardenedbsd/pubkeys/-/blob/master/Shawn_Webb/03A4CBEBB82EA5A67D9F3853FF2E67A277F8E1FA.pub.asc References: <69272395.3426e.56ff4912@gitrepo.freebsd.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="geksarbedy6bkeao" Content-Disposition: inline In-Reply-To: <69272395.3426e.56ff4912@gitrepo.freebsd.org> X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4dGvps3TLCz3nxK --geksarbedy6bkeao Content-Type: text/plain; protected-headers=v1; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Subject: Re: git: 2a3a6a177114 - main - Mitigate YXDOMAIN and nodata non-referral answer poisoning. MIME-Version: 1.0 On Wed, Nov 26, 2025 at 03:58:13PM +0000, Gordon Tetlow wrote: > The branch main has been updated by gordon: >=20 > URL: https://cgit.FreeBSD.org/src/commit/?id=3D2a3a6a1771148a709c2d9694c1= d66c41ce8dee79 >=20 > commit 2a3a6a1771148a709c2d9694c1d66c41ce8dee79 > Author: Gordon Tetlow > AuthorDate: 2025-11-21 21:24:58 +0000 > Commit: Gordon Tetlow > CommitDate: 2025-11-26 15:57:33 +0000 >=20 > Mitigate YXDOMAIN and nodata non-referral answer poisoning. > =20 > Add a fix to apply scrubbing of unsolicited NS RRSets (and their > respective address records) for YXDOMAIN and nodata non-referral > answers. This prevents a malicious actor from exploiting a possible > cache poison attack. > =20 > Obtained from: NLnet Labs > Security: CVE-2025-11411 > --- > contrib/unbound/iterator/iter_scrub.c | 39 +++++++++++++++++++++++++++++= ++---- > 1 file changed, 35 insertions(+), 4 deletions(-) >=20 > diff --git a/contrib/unbound/iterator/iter_scrub.c b/contrib/unbound/iter= ator/iter_scrub.c > index 553d3655f0e3..8507a3fb65ac 100644 > --- a/contrib/unbound/iterator/iter_scrub.c > +++ b/contrib/unbound/iterator/iter_scrub.c > @@ -418,12 +418,13 @@ shorten_rrset(sldns_buffer* pkt, struct rrset_parse= * rrset, int count) > * @param qinfo: original query. > * @param region: where to allocate synthesized CNAMEs. > * @param env: module env with config options. > + * @param zonename: name of server zone. > * @return 0 on error. > */ > static int > scrub_normalize(sldns_buffer* pkt, struct msg_parse* msg,=20 > struct query_info* qinfo, struct regional* region, > - struct module_env* env) > + struct module_env* env, uint8_t* zonename) > { > uint8_t* sname =3D qinfo->qname; > size_t snamelen =3D qinfo->qname_len; > @@ -431,7 +432,8 @@ scrub_normalize(sldns_buffer* pkt, struct msg_parse* = msg, > int cname_length =3D 0; /* number of CNAMEs, or DNAMEs */ > =20 > if(FLAGS_GET_RCODE(msg->flags) !=3D LDNS_RCODE_NOERROR && > - FLAGS_GET_RCODE(msg->flags) !=3D LDNS_RCODE_NXDOMAIN) > + FLAGS_GET_RCODE(msg->flags) !=3D LDNS_RCODE_NXDOMAIN && > + FLAGS_GET_RCODE(msg->flags) !=3D LDNS_RCODE_YXDOMAIN) > return 1; > =20 > /* For the ANSWER section, remove all "irrelevant" records and add > @@ -470,6 +472,11 @@ scrub_normalize(sldns_buffer* pkt, struct msg_parse*= msg, > &aliaslen, pkt)) { > verbose(VERB_ALGO, "synthesized CNAME " > "too long"); > + if(FLAGS_GET_RCODE(msg->flags) =3D=3D LDNS_RCODE_YXDOMAIN) { > + prev =3D rrset; > + rrset =3D rrset->rrset_all_next; > + continue; > + } > return 0; > } > cname_length++; > @@ -650,6 +657,29 @@ scrub_normalize(sldns_buffer* pkt, struct msg_parse*= msg, > "RRset:", pkt, msg, prev, &rrset); > continue; > } > + /* Also delete promiscuous NS for other RCODEs */ > + if(FLAGS_GET_RCODE(msg->flags) !=3D LDNS_RCODE_NOERROR > + && env->cfg->iter_scrub_promiscuous) { > + remove_rrset("normalize: removing promiscuous " > + "RRset:", pkt, msg, prev, &rrset); > + continue; > + } > + /* Also delete promiscuous NS for NOERROR with nodata > + * for authoritative answers, not for delegations. > + * NOERROR with an_rrsets!=3D0 already handled. > + * Also NOERROR and soa_in_auth already handled. > + * NOERROR with an_rrsets=3D=3D0, and not a referral. > + * referral is (NS not the zonename, noSOA). > + */ > + if(FLAGS_GET_RCODE(msg->flags) =3D=3D LDNS_RCODE_NOERROR > + && msg->an_rrsets =3D=3D 0 > + && !(dname_pkt_compare(pkt, rrset->dname, > + zonename) !=3D 0 && !soa_in_auth(msg)) > + && env->cfg->iter_scrub_promiscuous) { > + remove_rrset("normalize: removing promiscuous " > + "RRset:", pkt, msg, prev, &rrset); > + continue; > + } > if(nsset =3D=3D NULL) { > nsset =3D rrset; > } else { > @@ -1060,7 +1090,8 @@ scrub_message(sldns_buffer* pkt, struct msg_parse* = msg, > /* this is not required for basic operation but is a forgery=20 > * resistance (security) feature */ > if((FLAGS_GET_RCODE(msg->flags) =3D=3D LDNS_RCODE_NOERROR || > - FLAGS_GET_RCODE(msg->flags) =3D=3D LDNS_RCODE_NXDOMAIN) && > + FLAGS_GET_RCODE(msg->flags) =3D=3D LDNS_RCODE_NXDOMAIN || > + FLAGS_GET_RCODE(msg->flags) =3D=3D LDNS_RCODE_YXDOMAIN) && > msg->qdcount =3D=3D 0) > return 0; > =20 > @@ -1074,7 +1105,7 @@ scrub_message(sldns_buffer* pkt, struct msg_parse* = msg, > } > =20 > /* normalize the response, this cleans up the additional. */ > - if(!scrub_normalize(pkt, msg, qinfo, region, env)) > + if(!scrub_normalize(pkt, msg, qinfo, region, env, zonename)) > return 0; > /* delete all out-of-zone information */ > if(!scrub_sanitize(pkt, msg, qinfo, zonename, env, ie, qstate)) >=20 Hey Gordon, Do you know if this fix was the incomplete one from Unbound 1.24.1? Or does this include the additional fix that landed in 1.24.2 earlier today? Thanks, --=20 Shawn Webb Cofounder / Security Engineer HardenedBSD Signal Username: shawn_webb.74 Tor-ified Signal: +1 303-901-1600 / shawn_webb_opsec.50 https://git.hardenedbsd.org/hardenedbsd/pubkeys/-/raw/master/Shawn_Webb/03A= 4CBEBB82EA5A67D9F3853FF2E67A277F8E1FA.pub.asc --geksarbedy6bkeao Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEA6TL67gupaZ9nzhT/y5nonf44foFAmkng5IACgkQ/y5nonf4 4fr0iBAAijqdG8MO0Np86jNz8P13yc8IPXV+wcLJitOPFgP+1km+eAD3tlvqm+hm 9YXvLLr2kZ0sVu2yr03LJMR22UbQyg2B6g/c7Nq1UB/HqQixqWYyMXvCtMazx9Ij W69QBXlF0Es9bGbVIcXI0EK4Tf81azI1cWTJ5kvsBqfLsppJKIZKUyq/Sot6QtSc Db7NOig1GckJxhnvrM113pRmkfJGwDOBPjKaGwMBAe/IGdzcQfQ03bzJokshIpLm crdwwmTToA0T9zxuo9e+eD1EDQSuBN5XJc0eXzHdqi7x8L4hqRfPTO03poQtvLX4 bVS7gBWLuZzaOwEZlGd0P8LEb2cpAa2IIigu/GQgxCx2kY95t5Dk+kpCaPIWckFS +2EXespt3JS1g5EiW/EzI6virY+96KUTS9TdDCMM3n386PRhrVQXGb5pH2LQ0Kz2 B3fZvXoY5/z8MKxG7TcTZDZBoGMDEJuiSQxNlj9Zj6ams+y4/0UuEpWmDwHwxzxN +xMvMejdTJkaB00cl+hRG5RBrHX9ZujHtWDSzTiaekh6zF4jI3nKDFdCiUWxQ7DJ SUFCbExA+yItBjsEpDHojv08nxZMlUhokfT9Iw5KtdwWCOIMEJQRXkd1kT18kI1K c78kV7kZVKtIlv7eSQL07AQlRs0gNOWR7B8vfhCIy/EmX5ARopA= =wmej -----END PGP SIGNATURE----- --geksarbedy6bkeao-- From nobody Wed Nov 26 23:32:20 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dGwnw4hHKz6HmQD for ; Wed, 26 Nov 2025 23:32:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dGwnw3YVKz3sn1 for ; Wed, 26 Nov 2025 23:32:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764199940; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=o8kc67xOTTa+9j3TRafWlSxqIF/gOs947jDv1sdHrUw=; b=sfDi2IsebfvBMtS5BKputF3q/JRGzOCZSMnHTLN9I4VXpm6KNZfnQq2oCfQCt9WrGNnIzK PeKn0p2MJMZkW3MB+elor4FEyWlKY3qmRfIYnNLUhe4GDrKCu9p207PEi8ZkCoISsW7LvI E5w+nmmRD3WW7vDl6pujrWSqQg3B+amIIr2z5nfDCBhdYdN+OuS8kiQR0MKoOmnkEo0EzI HABq9sEa4sf/jDhMXiieNTvh+O0jx1pSVilmpbLLVutUQRjMQFMSxb0zo5z98bySVP5VLs layDq9L4J89KOZr2bY1QD8PKcEmX5xuVV2Awvb37tKBjgD4RsMlLZJrUGRymaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764199940; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=o8kc67xOTTa+9j3TRafWlSxqIF/gOs947jDv1sdHrUw=; b=cWZwRctJodNdhIlN2IZe/lktc9j5gkIPfUkzWwLUpSZFLkNTzEpTse57PeGIXQ1BhjkwGp p2i+TXbK7VPXUuk3TmRDpM9dLRFS585adZaKGacfyv6H7qRPYw7JFof0KvKetjiT0bSuyb qutMukPPqJDbDFA/i8PFGcV99c7TXZGV99E5uzUgWnBmrIYKwaEiv/QRdSTbFnnwHmKG4+ Crl5p9pANleMeU/TGWmh8Wtxm2Ei/pqf/ERbFtFL2IJBvXeDDjiBr5A8IlQrObF76BarQ9 OwLWMPUjOGF2xsY1ErkkIv44sE7k8mB2Mc8FMl8LsokGUnejdd2y84bgiw/5AQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764199940; a=rsa-sha256; cv=none; b=WABpWhUHHx6JukSAcag70ZbGDRjQAU6iHZIYVqjS1JnTZKk/ma372rGjAAi3LoJ4Y+4lSb +Fdrt+WlSASzMIb8Dr72TYis3Krb9lpDj4nnRinNho8zqXQFFAXmqk/Ea+BogdVfDyYLnR wqze85tdSyjZfnSEY8WZevekDXJ6ButIC5Ca/2AUjRpnQVhyc3g+zz0EbHV6WkzFl1DuuE tyDjNtrTh6JAp3KJOIZLLoVXOpn66EaYDWlrffsU4RZfsVqtmvDJFZrpqacUl1dcnfwOfi 0zIlLWKAjGIxx+Nf8jwiAY7YNcpIeeEy8vptBlojC2wjAiGQAj6Xnr4RD6AoMw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dGwnw33DJz16ph for ; Wed, 26 Nov 2025 23:32:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id aa47 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 26 Nov 2025 23:32:20 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Cy Schubert Subject: git: 20c48f090b27 - main - ipfilter: Remove unused variable List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 20c48f090b270d0124d5f0b31c6f3a639efbbc80 Auto-Submitted: auto-generated Date: Wed, 26 Nov 2025 23:32:20 +0000 Message-Id: <69278e04.aa47.b59ef5b@gitrepo.freebsd.org> The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=20c48f090b270d0124d5f0b31c6f3a639efbbc80 commit 20c48f090b270d0124d5f0b31c6f3a639efbbc80 Author: Cy Schubert AuthorDate: 2025-11-26 23:24:17 +0000 Commit: Cy Schubert CommitDate: 2025-11-26 23:31:37 +0000 ipfilter: Remove unused variable Reported by: jlduran Fixes: eda1756d0454, 821774dfbdaa MFC after: 1 week X-MFC with: eda1756d0454, 821774dfbdaa --- sys/netpfil/ipfilter/netinet/fil.c | 2 +- sys/netpfil/ipfilter/netinet/ip_nat.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/netpfil/ipfilter/netinet/fil.c b/sys/netpfil/ipfilter/netinet/fil.c index 0de5378322df..166b7bfd9abe 100644 --- a/sys/netpfil/ipfilter/netinet/fil.c +++ b/sys/netpfil/ipfilter/netinet/fil.c @@ -4403,7 +4403,7 @@ int frrequest(ipf_main_softc_t *softc, int unit, ioctlcmd_t req, caddr_t data, int set, int makecopy) { - int error = 0, in, family, need_free = 0, interr, i; + int error = 0, in, family, need_free = 0, interr; int interr_tbl[3] = { 152, 156, 153}; enum { OP_ADD, /* add rule */ OP_REM, /* remove rule */ diff --git a/sys/netpfil/ipfilter/netinet/ip_nat.c b/sys/netpfil/ipfilter/netinet/ip_nat.c index 44ab7e9283de..d83454185609 100644 --- a/sys/netpfil/ipfilter/netinet/ip_nat.c +++ b/sys/netpfil/ipfilter/netinet/ip_nat.c @@ -974,7 +974,7 @@ ipf_nat_ioctl(ipf_main_softc_t *softc, caddr_t data, ioctlcmd_t cmd, int mode, int uid, void *ctx) { ipf_nat_softc_t *softn = softc->ipf_nat_soft; - int error = 0, ret, arg, getlock, interr, i; + int error = 0, ret, arg, getlock, interr; int interr_tbl[3] = { 60077, 60081, 60078 }; ipnat_t *nat, *nt, *n; ipnat_t natd; From nobody Wed Nov 26 23:32:19 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dGwp03Lsvz6HmRt for ; Wed, 26 Nov 2025 23:32:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dGwnv2csRz3shV for ; Wed, 26 Nov 2025 23:32:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764199939; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=w9W3/kXSYuiWxboRhnksrd4q/eIii1Bhfp28ZxWiAdE=; b=DMem0fjKJgEkD4jTJLg1xWd3ebhEBoxa6hTgXO2o7arM+Bmt7yArzxAxNE2GOGi7P7NMAt dHGtJYRA/XXyuzYztGxX1hVZqTYsFKimrHwnXEB8vzu9jCYjZ3VilflEKrjVt94j99Mdqb g0i5nH9XcyhgKNJcvZ5qa9qkLWhh8RWb59nNFWIcDNimK57IhlvsVf12UlaiwOeWO8bMoJ lXoGRjzGM6j0+YjYzgZajsnhinVqDXKNKL9B/qiaWEZrHRoZ0U+nYjj+jP6QZxZ9vPGOol 3asbBbsi97NO734FcNvQmuZTJqIZW9G+rBX6PJFzIUz47cqJOso23gtK2FizOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764199939; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=w9W3/kXSYuiWxboRhnksrd4q/eIii1Bhfp28ZxWiAdE=; b=GFNS0hg1akx0HcYeEcALL+q5S4r9k4fPbJe9Im5dWRc/L23T48zS55yo17P8knCqs2HBm5 vhXghjNIMc6kWxFwB+FoLthDpxVFOJ0L3RvnJB77mMzGzX7fy1szl7dqBwdjlZnUTE9gd1 LdkXj0ed4MC8QLnbfdIK/uC2r/MXzUpXjgetil7SazuhTM/QxcZos8thHnOV6MNwStke35 0zmlgidHR0TJom/7Nt9Bcwl8muuLac6cOx8euIu2ox32vkG+NLPG3CQovQifU6hJuJGtK6 T2Y1QgRIXpHjrdabVO9Qk45VUuv9I59ZNDa8Bvb+kKMY6FFIOZtqR25M59mAVw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764199939; a=rsa-sha256; cv=none; b=EC+iCP17tGqsLpVwLPR8Pb+LDpFeq317vqxZu8sig5jYq2TM13Amz7njWQrF8Dd2FTfyWa OR/xsUmcz+baUR9gBI+zgqyeKfWZXSuKviej8qGnMmmn6pfxVN1RULcuBNipt9DwWgkVXS q8F2qgRtDFvXf/gzvb8VbFzpxL1JI7MJF22CBdYyjtuReL1OLusXybUnmxEzKrgfiTCWU7 X6B2TYSYfP5YxUNL/jwfZHDskTpx9M6rmG/9gIY0TiLMUV/eK5x5kfJ4Ob/EEyaPvo82gS saQjdby5XiU9Q3FbiYkyh8bMufsTxGJmJ4oQ9mvtOhRm//OJcffbIeT7w/GRjw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dGwnv2CGcz16SF for ; Wed, 26 Nov 2025 23:32:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id a607 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 26 Nov 2025 23:32:19 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Cy Schubert Subject: git: d5d005e9bf49 - main - ipfilter: Load optionlist prior to ippool invocation List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d5d005e9bf4933d5680dd0bb5d42bdf440122aa4 Auto-Submitted: auto-generated Date: Wed, 26 Nov 2025 23:32:19 +0000 Message-Id: <69278e03.a607.69d46353@gitrepo.freebsd.org> The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=d5d005e9bf4933d5680dd0bb5d42bdf440122aa4 commit d5d005e9bf4933d5680dd0bb5d42bdf440122aa4 Author: Cy Schubert AuthorDate: 2025-11-26 19:40:36 +0000 Commit: Cy Schubert CommitDate: 2025-11-26 22:26:38 +0000 ipfilter: Load optionlist prior to ippool invocation As a safety precaution df381bec2d2b limits ippool hash table size to 1K. This causes any legitimely large hash table to fail to load. The htable_size_max ipf tuneable adjusts this but the adjustment is made in the ipfilter rc script, invoked after the ippool script (because it depends on ippool). Let's load the ipfilter_optionlist in ippool as well. ipfilter_optionlist load will also occur in the ipfilter rc script in case the user uses ipfilter without ippool. Fixes: df381bec2d2b MFC after: 3 days --- libexec/rc/rc.d/ippool | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libexec/rc/rc.d/ippool b/libexec/rc/rc.d/ippool index 0db8bbe98f61..5ef0d0522621 100755 --- a/libexec/rc/rc.d/ippool +++ b/libexec/rc/rc.d/ippool @@ -27,6 +27,9 @@ required_modules="ipl:ipfilter" ippool_start_precmd() { rc_flags="-f ${ippool_rules} ${rc_flags}" + if [ -n "${ifilter_optionlist}" ]; then + ${ipfilter_program:-/sbin/ipf} -T "${ipfilter_optionlist}" + fi } ippool_reload() From nobody Wed Nov 26 23:40:12 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dGwz060rrz6HnPW for ; Wed, 26 Nov 2025 23:40:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dGwz05GH8z3vK4 for ; Wed, 26 Nov 2025 23:40:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764200412; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Alftniuc3g8JvPJSA6wvzWaSkkEst3NLOfnCgDNArvw=; b=HVVBiQTBC1N0RfCoHekMFOHrMYCizequQtKent0/3HKIe3F6m9OWY/u+dAkBODmwty3Vxd hDz366Is1X+oeMN6XbVl57UZVy6l4d3dkPPEdg313rrBdHF4RlQiPFh39oT5t/RWc2uqnp ic6zjfrp/hi7MFDnVcW9t8GuAFeE2sVAm8T/NwAQ4kjk4jx6UOyKS9LyFnTjj1Wdeq9ZNc /oZetd3inE5BDimO365v9X1rylKf+tFzjjlfWkuYPGE43SlHTeTS3/7njEQsB4tVBr+Uhp rySRfirxvwwOXLb+wjYg4eHXuwXl1+1NlBlNbrJOUho+g9q4Fcvs4OUwdRIKCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764200412; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Alftniuc3g8JvPJSA6wvzWaSkkEst3NLOfnCgDNArvw=; b=oNStzCbLEs822I2wCOF3xoOyooHUIin3xgcCJcuvR5oGH11Is3UI27E5cCZez0+MHyTNtO N71u4tgtwbv+85EH52fR8uCWVBLhWbxVVQCBKLgSh1SEZHOglX9zau+I5aGO4asW2eCCJd 2tx452HsWJZn3F42NcxZs6Fi31MkI5uZZum6FBh8GlYrIjkuLH8tsZmzWZSYUz8/muyR7Q MMHjal5W/dwcTOl5aYSAngu5XJAhp2W2Q6ligt33hPaObLvn0gWmO8enR8hA79KzQH0v9p NP4+w8gBlGL2Z03IZDGvsKEOXvc1Cpz1VNrr1aL2RoFeIsCWTwDnUmDEiPLnTA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764200412; a=rsa-sha256; cv=none; b=ShStEb3feRyJaqYTJo84U6UHHvMnkS4yRV/RmsRVPkbdFUvPXsvL2ogM0rIIkM+LO2GNFi EBbHJqiEZo+dgZXtWEfyArCkP0xKnkQD6Eh5BL9GJ3ZDIr19I0Q/ycqxmIbthQ7u/PlbVu VlKKUcV6TisjSk5aGOMcNuwTn+pUzCbhjubeEps1Qnc+OjnOkEWW1SvQIDmJxAckMP+QLi fsbMt90yknUeZwOQygcJFytff11Ubd2FfkojigXDwzWaMDjAGNnn6VZ5RWnD5IymJ4MljU 883+aZREqsfB84z5Ms/rDaPNjk/VkXZHjUkuO8mguUP8GCA1W7YWw2SPx7ANIA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dGwz04dwkz1740 for ; Wed, 26 Nov 2025 23:40:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 8b5c by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 26 Nov 2025 23:40:12 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Cy Schubert Subject: git: 78c6cfdc3dc0 - main - ipfilter: Restore used variable List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 78c6cfdc3dc0b84aa2daf0f32c7c9cdf3b34fee5 Auto-Submitted: auto-generated Date: Wed, 26 Nov 2025 23:40:12 +0000 Message-Id: <69278fdc.8b5c.6b29ee91@gitrepo.freebsd.org> The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=78c6cfdc3dc0b84aa2daf0f32c7c9cdf3b34fee5 commit 78c6cfdc3dc0b84aa2daf0f32c7c9cdf3b34fee5 Author: Cy Schubert AuthorDate: 2025-11-26 23:39:24 +0000 Commit: Cy Schubert CommitDate: 2025-11-26 23:39:24 +0000 ipfilter: Restore used variable One of the "unused" i variables is actually used. Fixes: 20c48f090b27 --- sys/netpfil/ipfilter/netinet/fil.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netpfil/ipfilter/netinet/fil.c b/sys/netpfil/ipfilter/netinet/fil.c index 166b7bfd9abe..0de5378322df 100644 --- a/sys/netpfil/ipfilter/netinet/fil.c +++ b/sys/netpfil/ipfilter/netinet/fil.c @@ -4403,7 +4403,7 @@ int frrequest(ipf_main_softc_t *softc, int unit, ioctlcmd_t req, caddr_t data, int set, int makecopy) { - int error = 0, in, family, need_free = 0, interr; + int error = 0, in, family, need_free = 0, interr, i; int interr_tbl[3] = { 152, 156, 153}; enum { OP_ADD, /* add rule */ OP_REM, /* remove rule */ From nobody Wed Nov 26 23:42:49 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dGx2214jHz6HnGm for ; Wed, 26 Nov 2025 23:42:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dGx215yhzz3w0R for ; Wed, 26 Nov 2025 23:42:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764200569; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ShskMlIcsrLOXwlSYy/NW6c+sy94l+pYqiPQ8VsEgw0=; b=pyY+qKKcAok3bfExcpYJzmsRBmB2uD+8JloqXuNrSmBVtXTtgWUTF8Zot6beuutYwAeHeZ 0UzGFjcqXu5aBkMA/bNnCiN4CzGX7kosPb+Dxujz9fAACaiPsdLHfo2cBs50x11ep52KBI PVDaLJa7B5NHsmXa4lzjkidjfFEuxPqiO64U7k0v8rIRS49v6/bGCgAR+mkkHMGLc637Aq WTBuxZGV3KsvHAUm3YjKjXViK5+aev31cNbgTUTNcfaWKpctB+aHXPQAgcIPbYKsZeYOsc /HId9eOadg9x/ScCxxkA3rA/Z9BVu3DGskorNkLpWlJUQQMzLaBIv7Cpa2YiiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764200569; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ShskMlIcsrLOXwlSYy/NW6c+sy94l+pYqiPQ8VsEgw0=; b=JUjzyW9+AUZ+rDad/m4500Eu6vJxjmIRx5NO4kIZRkdKcY+RExO0dgmfo42J779Fy97Bwu EticAlTWVrpjw18PMDTF0Vl3JlvCkJfTAZzl9JTs7f0njMjmfUmsixgJ3P/etwM6jkzaq6 ToThzXcIXQbnS747AdmgMijmjATIw0ySIpE86Og/l5pAEbeCrhn9Q+VoJXUjAYrR3mcplh ZTkil3dC1EkSR4rwm3JzKIdDIX5prolcLAJa3S9mxAdvnjRYLfiPRWNp+7RUNfxQHN1LBd WYduHzSA9PJRmRW7Ce0C+KECvN/WxwqhUXOP3dAGe91GBPjC59+cP97Zvu4+cw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764200569; a=rsa-sha256; cv=none; b=QeCdXV3b/HKC0gk7IR+qkif+iRGMOFv3wzSDZJ3zV/23xj5/cP7f3mY9SG/wmlRxvSRxjT rqEhJl9l4+fWws3VtZMEO8gGAk6I+GRuVATfuzsngJ53uptPJXX8OpY+aUAIoFp3SM2xR9 dumafVi5UxrsWiLo1IUJFk1tshftf5C1VFFszEuUTsAkJsxjpymL//nKYigyouRl+26j93 WustZA6jBvaVoWPvKylYDXGLFmmlo3pB0sAhcSQX+9SSk/lZDD+2dDmgcDNwURxtDxv6dO MW0Zq+Rv97eI8f/RiRSfVA9m1GFJGKSMpIoamWc1oq8LNrmRh5hhyEcvQ/itFw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dGx215W8wz16nG for ; Wed, 26 Nov 2025 23:42:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 9376 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 26 Nov 2025 23:42:49 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: eb90470f5f2a - main - mqueuefs: Export another symbol required by linux.ko List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: eb90470f5f2a0e5c820c47be329423f5c60ca247 Auto-Submitted: auto-generated Date: Wed, 26 Nov 2025 23:42:49 +0000 Message-Id: <69279079.9376.51775aa3@gitrepo.freebsd.org> The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=eb90470f5f2a0e5c820c47be329423f5c60ca247 commit eb90470f5f2a0e5c820c47be329423f5c60ca247 Author: Ed Maste AuthorDate: 2025-11-26 23:35:35 +0000 Commit: Ed Maste CommitDate: 2025-11-26 23:42:38 +0000 mqueuefs: Export another symbol required by linux.ko Fixes: e00a781c216c ("mqueue: Export kern_kmq_* symbols from kernel module") Sponsored by: The FreeBSD Foundation --- sys/modules/mqueue/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/modules/mqueue/Makefile b/sys/modules/mqueue/Makefile index 55040a2282cb..b857ed3a9787 100644 --- a/sys/modules/mqueue/Makefile +++ b/sys/modules/mqueue/Makefile @@ -10,6 +10,7 @@ EXPORT_SYMS= \ kern_kmq_open \ kern_kmq_setattr \ kern_kmq_timedreceive \ - kern_kmq_timedsend + kern_kmq_timedsend \ + sys_kmq_unlink .include From nobody Wed Nov 26 23:49:33 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dGxB8453mz6Hp6R for ; Wed, 26 Nov 2025 23:49:52 +0000 (UTC) (envelope-from gordon@tetlows.org) Received: from outbound.mr.icloud.com (p-west2-cluster1-host8-snip4-10.eps.apple.com [57.103.68.103]) (using TLSv1.3 with cipher TLS_AES_256_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 4dGxB81spKz3wnp for ; Wed, 26 Nov 2025 23:49:52 +0000 (UTC) (envelope-from gordon@tetlows.org) Authentication-Results: mx1.freebsd.org; none Received: from outbound.mr.icloud.com (unknown [127.0.0.2]) by p00-icloudmta-asmtp-us-west-2a-10-percent-2 (Postfix) with ESMTPS id 36A6A180010D; Wed, 26 Nov 2025 23:49:47 +0000 (UTC) Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tetlows.org; s=sig1; bh=sr8AtIvWZtaQu0lkDchtJyyzKnVeb7UgmxGYnG1JK9E=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type:x-icloud-hme; b=QUbuZPfSBfuhrXkKCoqEO4VUlyxoY1jxfq8hHUFKeFa2qMTZqtA3B9Bgb+i+f8l5L1wCc2VR430IP+xQO4ifeb6gAxInDYz1LGhEzS8hkZjaCcQPZ5RKlGiRWNRoCLExzWFKmk9gvV+ixS4er3Q9MP0Phrxccn94U0+wmS/AWotHMCScvSrif54Nsgb2PEyD0iX44c7RTavRAy5CrcfrYrXr3R52EK9K05ABzB8GcmHd3SoRP1DXBdZZNMGVGwUoOIfjgLFY3WpDchv/SZkbTC4x6m7ITsdITYOUULhpny8Mj4kLPkbyAaKdy6ZS8m6HTkweiZW3Q71PiRJVuIBqkQ== mail-alias-created-date: 1644526483486 Received: from [192.168.64.1] (unknown [17.57.152.38]) by p00-icloudmta-asmtp-us-west-2a-10-percent-2 (Postfix) with ESMTPSA id 807D81800105; Wed, 26 Nov 2025 23:49:46 +0000 (UTC) From: Gordon Tetlow To: Shawn Webb Cc: Gordon Tetlow , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 2a3a6a177114 - main - Mitigate YXDOMAIN and nodata non-referral answer poisoning. Date: Wed, 26 Nov 2025 15:49:33 -0800 X-Mailer: MailMate (2.0r6290) Message-ID: <5AC69869-F66B-42E6-A184-4FB2D846F521@tetlows.org> In-Reply-To: References: <69272395.3426e.56ff4912@gitrepo.freebsd.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=_MailMate_C1261378-1F14-4D1D-BBE3-8F9295C3FF9B_="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Authority-Info: v=2.4 cv=SrmdKfO0 c=1 sm=1 tr=0 ts=6927921c cx=c_apl:c_pps a=9OgfyREA4BUYbbCgc0Y0oA==:117 a=9OgfyREA4BUYbbCgc0Y0oA==:17 a=6UeiqGixMTsA:10 a=VkNPw1HP01LnGYTKEx00:22 a=8S_DFC9sn7tn5IQ8J0IA:9 a=6I5d2MoRAAAA:8 a=oRwNZq7PmhNwhsH2JicA:9 a=QEXdDO2ut3YA:10 a=crwTN7nqdM1ofK4LXMwA:9 a=JVhx7BB7VI6T4m7_:21 a=_W_S_7VecoQA:10 a=lqcHg5cX4UMA:10 a=xiviEDyWbMfYgjJmyOAA:9 X-Proofpoint-ORIG-GUID: ytqMrpERbpHmKaQfXVsOjCSwJDJ2zoqm X-Proofpoint-GUID: ytqMrpERbpHmKaQfXVsOjCSwJDJ2zoqm X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUxMTI2MDE5MSBTYWx0ZWRfX+/ba6pB8mdwt f6mUBL+RkqjnlpfLt4xouwWDjGhKD3w9qPN710EagWFqiK/iMnTyY8foJy27Vje81NoShoxC39R CwNnsP3HoquoRDjBwfzTtNZaqtFBvuc8qjiKAE3kfWdyk+Tb1TiC/Tdexp3HuqqXId1fyFsUuKo Z0x/GOhlGs5Jc0tLRaBN7OVg/yRU3Ox48aMZVaVoj8tTXzC4PNvIQ5Ka5e9XR2VPXaawgIsmFBF 4iwcMbsyGQAc6q4xA2xZHom/iyufGrcwpesoJ2ksuZRwIBJcufcYnywdo1mXKAfWyxGhVpA9Awu iY4eHrKvX6EEUfDGIw9 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.9,FMLib:17.12.100.49 definitions=2025-11-25_02,2025-11-26_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 mlxscore=0 bulkscore=0 spamscore=0 mlxlogscore=999 suspectscore=0 malwarescore=0 clxscore=1030 phishscore=0 classifier=spam authscore=0 adjust=0 reason=mlx scancount=1 engine=8.22.0-2510240001 definitions=main-2511260191 X-JNJ: AAAAAAABMmf9e8SjGMZK0YbmPyIDgqQ4HUpjivgngBL8hCoD9yOp4+zOWHJQPVYv1IHg2sc4HG7G1rLfRbIRkM/fCex0A8bGiKgFuoxVPWoXzGblnt1PT9sOd8FDPAQN6vSDCx4XNUZT9DrBoHGz7Fau5SgZYN92I9T8wz62OMxGIMMGqIpGpiWVqTVGMRVl1+EzOPKuExRD+RqL7pClhgvZtrLfwnDZkjckarVePULMnt83retlYKcq8mUy/EIM9ioN0G7PsYv2Unqn9O2gfSCg80+T2RKLYE/khetlVvpkoyUCIQsRN0yhOjKtdu05QaZTzg41sLryepqDpTehoeutPimP69Kzc2hrGUguF696BHk53nH06N8YDQlCkTZ044Un9qNhv490S5EV+F9ENH/aZ7KS37OjIj/pct/no8MM3ENq63XXPSh6oHY4fGAsljetV3kfuYIDB5oLTJO4SrPiZspmfD5p0iXW08K8WeRU4oDn4qpnINhTaGjOdcc/etl9VrWu8XcXPZx7HW45XHp5YficYSsOMBozKUm7ZYZLfPpyLHmUVY0zyH+QAekMJoGLS7L4cbI8ZysMFL6VFzL+HIDDwW5VLtEUfvjOwr+xBdAS2g9eBvbB5lJh2kv+dU0denye8GGDd7AuaU8fspq/rgocZFwXs0mf9rSmYr1m3rKnidULMhwtBHywDTY/inAX1lwaiasu X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4dGxB81spKz3wnp This is an OpenPGP/MIME signed message (RFC 3156 and 4880). --=_MailMate_C1261378-1F14-4D1D-BBE3-8F9295C3FF9B_= Content-Type: multipart/alternative; boundary="=_MailMate_377CB89C-118C-41C2-8E32-6CB927C54777_=" --=_MailMate_377CB89C-118C-41C2-8E32-6CB927C54777_= Content-Type: text/plain; charset=UTF-8; markup=markdown Content-Transfer-Encoding: quoted-printable On 26 Nov 2025, at 14:47, Shawn Webb wrote: > On Wed, Nov 26, 2025 at 03:58:13PM +0000, Gordon Tetlow wrote: >> The branch main has been updated by gordon: >> >> URL: https://cgit.FreeBSD.org/src/commit/?id=3D2a3a6a1771148a709c2d969= 4c1d66c41ce8dee79 >> >> commit 2a3a6a1771148a709c2d9694c1d66c41ce8dee79 >> Author: Gordon Tetlow >> AuthorDate: 2025-11-21 21:24:58 +0000 >> Commit: Gordon Tetlow >> CommitDate: 2025-11-26 15:57:33 +0000 >> >> Mitigate YXDOMAIN and nodata non-referral answer poisoning. >> >> Add a fix to apply scrubbing of unsolicited NS RRSets (and their >> respective address records) for YXDOMAIN and nodata non-referral >> answers. This prevents a malicious actor from exploiting a possibl= e >> cache poison attack. >> >> Obtained from: NLnet Labs >> Security: CVE-2025-11411 > > Hey Gordon, > > Do you know if this fix was the incomplete one from Unbound 1.24.1? Or > does this include the additional fix that landed in 1.24.2 earlier > today? FreeBSD main, stable/15, and releng/15.0 already had 1.24.1. Those branch= es received the supplemental patch from 1.24.2 that was released today (w= hich is what this commit is). FreeBSD stable/14, releng/14.3, stable/13, and releng/13.5 all received t= he minimal patch provided by the vendor that contained both the original = 1.24.1 fix and today=E2=80=99s 1.24.2 fix. Best, Gordon --=_MailMate_377CB89C-118C-41C2-8E32-6CB927C54777_= Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

On 26 Nov 2025, at 14:47, Shawn Webb wrote:

On Wed, Nov 26, 2025 at 03:58:13PM +0000, Gordon Tetlow w= rote:

The branch main has been updated by gordon:

URL: https= ://cgit.FreeBSD.org/src/commit/?id=3D2a3a6a1771148a709c2d9694c1d66c41ce8d= ee79

commit 2a3a6a1771148a709c2d9694c1d66c41ce8dee79
Author: Gordon Tetlow gordon@FreeBSD.org
AuthorDate: 2025-11-21 21:24:58 +0000
Commit: Gordon Tetlow gordon@FreeBSD.org
CommitDate: 2025-11-26 15:57:33 +0000

Mitigate YXDOMAIN and nodata non-referra=
l answer poisoning.

Add a fix to apply scrubbing of unsolicited NS RRSets (and their
respective address records) for YXDOMAIN and nodata non-referral
answers. This prevents a malicious actor from exploiting a possible
cache poison attack.

Obtained from:  NLnet Labs
Security:       CVE-2025-11411

Hey Gordon,

Do you know if this fix was the incomplete one from Unbou= nd 1.24.1? Or
does this include the additional fix that landed in 1.24.2 earlier
today?

FreeBSD main, stable/15, and releng/15.0 already had 1.24= =2E1. Those branches received the supplemental patch from 1.24.2 that was= released today (which is what this commit is).

FreeBSD stable/14, releng/14.3, stable/13, and releng/13.= 5 all received the minimal patch provided by the vendor that contained bo= th the original 1.24.1 fix and today=E2=80=99s 1.24.2 fix.

Best,
Gordon

--=_MailMate_377CB89C-118C-41C2-8E32-6CB927C54777_=-- --=_MailMate_C1261378-1F14-4D1D-BBE3-8F9295C3FF9B_= Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQFHBAEBCgAxFiEEuyjUCzYO7pNq7RVv5fe8y6O93fgFAmknkg4THGdvcmRvbkB0 ZXRsb3dzLm9yZwAKCRDl97zLo73d+BPyB/9Xqg+2QU3C3DK/sm24oUz2jrHLF2gX q2+SCdB6gbYDsZ/eNEtq0fAm7NxIJR8EaYXeYmwvvnV7qr6NzVSfCV66LxEoBFGG u8WawvfQbvU4BMASUXzG/ho4L6KjHMuPTXOBKRwkxkYRxSnmSXm33eMHPhJ81Xrz E87Ro/Itsg4h3MH80qF7Nqm6KW7wKivBaA7fn1LhE8BlmmdopTbrEiNwvLes7Pub JRCpXOcphZBkRql51QJc/lo+VgK2kaZpJHZgThhPTxj/tTuK60MvPoc5LTWNC//y 1czFY08oDjcR4lbGvwacE7VloS6cBZdMdl1TqgTFxTGq1dJfwc704TTY =YD/A -----END PGP SIGNATURE----- --=_MailMate_C1261378-1F14-4D1D-BBE3-8F9295C3FF9B_=-- From nobody Wed Nov 26 23:58:23 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dGxN74gdLz6Hpsd for ; Wed, 26 Nov 2025 23:58:31 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: from mail-il1-x12f.google.com (mail-il1-x12f.google.com [IPv6:2607:f8b0:4864:20::12f]) (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 4dGxN72nZYz3xjt for ; Wed, 26 Nov 2025 23:58:31 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Authentication-Results: mx1.freebsd.org; none Received: by mail-il1-x12f.google.com with SMTP id e9e14a558f8ab-4331d3eea61so1738395ab.2 for ; Wed, 26 Nov 2025 15:58:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd.org; s=google; t=1764201505; x=1764806305; darn=freebsd.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=pr0TSUrZEMtVQqmDnXPL84kfAboYoabd5ERZl3859hY=; b=VYXnzBQ82GvemxcQ5k8T/EdoXygvSwPSlCfTCtxCQMfBc6R5Y5r6fyfnF0xXZ9blRZ EmoafVUBNyMayiihTM+VJablsIAbi8aUfpKFOYFYsJWicO6EZZEcoQ2q52SH5Q/GQGxv ln+tR88SzgQpKIWvNtVtzX8IFXSQDcuhCOhzkCPyT0jvhG9pQmNnzdYWtKsmxyFCVQP+ EpBcBjTPjPbJbfSYdS+swhnb15Jk23ss0gMrb/B2DrOfYsYtfGFfix29+kvpvwuGl1YX 59WWTTJfXuoum036OfidVBAjJBBOBx4PFVzPsegmQ3Jqt/Jjb7/flOXCA6qiU0ape5DS 8g3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764201505; x=1764806305; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=pr0TSUrZEMtVQqmDnXPL84kfAboYoabd5ERZl3859hY=; b=piQvmZj4TxPpwGkMfXmNm4LyNs/3FHGy/+Cs2cn7VyL7KaFTg2Pjigj0unTJMCqnxm uS25gHDwaonr1yyw+HNcqlWICVD/OmZGB1Mp+6kZQsGYrek/+gQnAPISAU5/8mNkp0jq ygiTpqasxwcN/KUq9JQ4NDubu79t+S7xlXU8XA+8UXinOsXEQXQ0DV7Moe+B8y8TkrV6 +rfQwkOgoN19x2Rp0JNkDIg53C+oFnEcfYavRiK1yH3kY43DNPGTxYEBqBSLRdNyj0Jf mmud2762GqbePiP5r/Vobaj55vYVIJIgufqK0TbWB7lxG94nhYqV2EQxracayOzSUBsf 5eew== X-Forwarded-Encrypted: i=1; AJvYcCWvskWEzxVxraOUb+5HEd7y11ET0WWQ3HfklEixtyS1ZTglQolsy7KcvBltM6D6lo098fafGdgld4adCQ9koKwdKR76@freebsd.org X-Gm-Message-State: AOJu0Yx8JU893w730d8PHtf7NEnGF5e7WFlaMWfxmu/2LfCCu2PSoSzk 1oZWEIYq1Ml+f3aTQY322hyzvfAsf25klYg+aJjFuCzrAysEPgc4E7oDovei28xyrbrmmwqliEw Uxvu2 X-Gm-Gg: ASbGncsAkdPitjAW3Lpbitck1R81+llsS3F+1Fu2LcfdJ8QVa1tihaV+uCtAgUAYjaN FFGS81j3Yrs4Rp3d3ShmOosUa1oxE/XARohY6lS1gceD8dzc436HXo3Iqy7K8bX86XTw6xFVGhr YznHdKPK4p43VsQwfnR+wtqDEOjYrv+uVuJOC5pcsERw7vfNmv1TWGYl2a2VL0NorRn+sayCPtH HB48ETHB7RGSbAgaIJBGzxhfEk0s3T4SMS77ylzq5+b+Qwt9TBgv31WpdK3U5RZi4yzqLNgkrCy mUP4oOa66UvdHmnSe4vd8EAZ/GgWzL/vcFKJgJ5tBtQDNdrY4p4omKpjn0fCWKUfqTnTSmQYR25 c4pwvYeldQ6H6350P0tmmIcKpKV+wvVORlOHv3DlI/Bf6dV2U4yVRit5HR5Qx9YEcYpDv X-Google-Smtp-Source: AGHT+IE7BUqBv0iC5JGK+e0NWMgoTuGYvFz9LdhlzZypbOPOaU8z07wCyUJAV8hZrL1Slmeep1Gf2A== X-Received: by 2002:a05:6e02:1486:b0:433:79e4:7adb with SMTP id e9e14a558f8ab-435dd065264mr71661065ab.11.1764201505514; Wed, 26 Nov 2025 15:58:25 -0800 (PST) Received: from mutt-hbsd ([2001:470:4001:1::95]) by smtp.gmail.com with ESMTPSA id ca18e2360f4ac-949386d8f05sm783986239f.19.2025.11.26.15.58.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Nov 2025 15:58:24 -0800 (PST) Date: Wed, 26 Nov 2025 23:58:23 +0000 From: Shawn Webb To: Gordon Tetlow Cc: Gordon Tetlow , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 2a3a6a177114 - main - Mitigate YXDOMAIN and nodata non-referral answer poisoning. Message-ID: <6bss565r2ljsoywbow4am2qo76t2iqwvwvf4vmvyctofsuiwdc@3omwjejpuxzo> X-Operating-System: FreeBSD mutt-hbsd 14.3-STABLE-HBSD FreeBSD 14.3-STABLE-HBSD HARDENEDBSD-14-STABLE amd64 X-PGP-Key: https://git.hardenedbsd.org/hardenedbsd/pubkeys/-/blob/master/Shawn_Webb/03A4CBEBB82EA5A67D9F3853FF2E67A277F8E1FA.pub.asc References: <69272395.3426e.56ff4912@gitrepo.freebsd.org> <5AC69869-F66B-42E6-A184-4FB2D846F521@tetlows.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="vp62ioreif4fllrt" Content-Disposition: inline In-Reply-To: <5AC69869-F66B-42E6-A184-4FB2D846F521@tetlows.org> X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4dGxN72nZYz3xjt --vp62ioreif4fllrt Content-Type: text/plain; protected-headers=v1; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Subject: Re: git: 2a3a6a177114 - main - Mitigate YXDOMAIN and nodata non-referral answer poisoning. MIME-Version: 1.0 On Wed, Nov 26, 2025 at 03:49:33PM -0800, Gordon Tetlow wrote: > On 26 Nov 2025, at 14:47, Shawn Webb wrote: >=20 > > On Wed, Nov 26, 2025 at 03:58:13PM +0000, Gordon Tetlow wrote: > >> The branch main has been updated by gordon: > >> > >> URL: https://cgit.FreeBSD.org/src/commit/?id=3D2a3a6a1771148a709c2d969= 4c1d66c41ce8dee79 > >> > >> commit 2a3a6a1771148a709c2d9694c1d66c41ce8dee79 > >> Author: Gordon Tetlow > >> AuthorDate: 2025-11-21 21:24:58 +0000 > >> Commit: Gordon Tetlow > >> CommitDate: 2025-11-26 15:57:33 +0000 > >> > >> Mitigate YXDOMAIN and nodata non-referral answer poisoning. > >> > >> Add a fix to apply scrubbing of unsolicited NS RRSets (and their > >> respective address records) for YXDOMAIN and nodata non-referral > >> answers. This prevents a malicious actor from exploiting a possible > >> cache poison attack. > >> > >> Obtained from: NLnet Labs > >> Security: CVE-2025-11411 > > > > Hey Gordon, > > > > Do you know if this fix was the incomplete one from Unbound 1.24.1? Or > > does this include the additional fix that landed in 1.24.2 earlier > > today? >=20 > FreeBSD main, stable/15, and releng/15.0 already had 1.24.1. Those branch= es received the supplemental patch from 1.24.2 that was released today (whi= ch is what this commit is). >=20 > FreeBSD stable/14, releng/14.3, stable/13, and releng/13.5 all received t= he minimal patch provided by the vendor that contained both the original 1.= 24.1 fix and today=E2=80=99s 1.24.2 fix. That's what I was thinking. Thank you for confirming! --=20 Shawn Webb Cofounder / Security Engineer HardenedBSD Signal Username: shawn_webb.74 Tor-ified Signal: +1 303-901-1600 / shawn_webb_opsec.50 https://git.hardenedbsd.org/hardenedbsd/pubkeys/-/raw/master/Shawn_Webb/03A= 4CBEBB82EA5A67D9F3853FF2E67A277F8E1FA.pub.asc --vp62ioreif4fllrt Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEA6TL67gupaZ9nzhT/y5nonf44foFAmknlBMACgkQ/y5nonf4 4frcAg/8C/R615pt+vPJ+CUICF7KZ4XctrjAqNfiAEgYai4ffhfM25ywh3PlGKlm ylY3s+brcrEHqQnwJ6y0nIOKO6YMnEse0r0OSYsK6unh41RVUUGCyfj1GoKaC4vj QpweXq0o6zz8s7qBCia33JKNYywqQDN8kJtQv3mvs54STMpX431qdIwpS2whPhvH LgZOVDlnmO/SN2SiGtZ8gbfcNtlS042G9/Lz9HwWk0V0+1B8Apc/v28rH9B09X9L Fw6TJ5OjO3jqd3gCemRIlXRM0jy+CGEtEhR1ffPzEUf5dOo8DBBY4fegI4mPhZ06 yYq7zUd+WOFNAqR6lXBwt8cXV3fVCM1VGoguaFR+apld7xtAmCGeribIBphtR2bD jT5TAk42Vkk2vOVlzvo1wi308ssgKVJaW78qTSAANy7SAOTl2JPOyrx/zCw3S85W gECTEe+uXKx0Ep6I32k6Ob+f8pCEBR6RkS4cYbZmzcVh5vSnL+yIphfwYviShdve G8F7zx7bovtcZbN2b85U1BMRBm3VNYB0rUDCvg3ygN2MurWEJO4UwIdywMmSu+WA SHjBdreR+SkpyU/dLvoHM+qxUaNr8kikvGFeMf9yYKrN0BRrjCGgaRFwVNzuPZrf s8kIogu3CT/gXPBL2D046X9rpShfuHWl1qzNoxCzAe71nG9GzZU= =fIr1 -----END PGP SIGNATURE----- --vp62ioreif4fllrt-- From nobody Thu Nov 27 00:05:41 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dGxXP4kvQz6Hqrm for ; Thu, 27 Nov 2025 00:05:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dGxXP43SQz40hH for ; Thu, 27 Nov 2025 00:05:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764201941; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/dMxJVIYN30koae7NwKDISw0GuORpPRKVq1WD4ppg6E=; b=rDSsNFD0Bqs2+JP4bl5faOd2FVT2lWRsPjsuE4UUeS0vYiDe8GWek6no6hEnNKHIWCti1L Y7DkkM16axjwdVb67lPsnaPnLZM0wMqFYBbuJMRPLVnhzBBuCjuf+UiFLaembxx8mTkeAq Bvkgy4NiKXOQZNFub6oEYyRBLb+EV+wgyrN7iLkbNG35+1EvvsJTmhdytWEA/3XDHWbnH8 7lQfF2I+gntbZgJoujr5/vskVA810QL4SbKE7OHo0BEszFTBVS0jo5cvsq5MXr4pBa3+Dg MdrFDwKAws/zVArEGzFa9skFBCP0IkpG2uwGyGGz2HtGkDUctb+DKCbn44C0Qw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764201941; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/dMxJVIYN30koae7NwKDISw0GuORpPRKVq1WD4ppg6E=; b=Z89YwhGl37r7xfSurxNcjE7QpUTWGmIPZGrzc+R6a2bp7kJXRrE7psDjuoWJlMqLdNC5hT vvaWJl7NsvbFEpaghgIAOdToQxdo15rHnQFFJla3SOhlC4DIEr17NXn8X9y5fpDHghhWoG 38AlO4x5EUmZfkvw8hUcAOXSxrhWpNQ2hinGGaWkwCrlLzPEzSHZdjLFLx3CYC5clZlWYu iogvrD/1FMVL0C9CWxntGXGM9KSYXwev0MaTYVii/RvT4IzIhX2FnAVokjPlcmXPh+baJZ FyY9fQj7yy3SYD9cIWO5xzQhN/SYh7OSfkkFKqQEyyZ15IWR/8GOoJrsCKqQTQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764201941; a=rsa-sha256; cv=none; b=n3KRBb22kkANAbzEWQ8LJ0G1RYCKWh7ObhOwaGZLb1pcZeXmZk3I98Njz2YB2s3Kj9t7q9 uLG0GwuEU3DbY85EvO35EoBCvvBA++UnOJMqeHNjTLlqMvD8R+O4TDGNqXz4WdzYEszdzO Y0tWLAzW98wcjoXEpyMsA019j0h5JATCAbezLvEAkwh09R70J4dRkVsbDgxHJMnzsszowB qPIgGnnE1Suu9xL2TxG9+rb+MdMcyIt04vug+Wl6zDwQlicauY+nTgxaXfwvs6v6ZATOEg FsnPjUZVz0feLPj2UK/KuqUMyLbiIODuOa+LTAU7dRuJnL/cnd+XnjRhXe5lFA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dGxXP3b5xz17Yc for ; Thu, 27 Nov 2025 00:05:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id d406 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 27 Nov 2025 00:05:41 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: ddec4209b10d - main - ipfilter: fix broken build List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ddec4209b10d65ef19e1d1b884e1b876eab58c7d Auto-Submitted: auto-generated Date: Thu, 27 Nov 2025 00:05:41 +0000 Message-Id: <692795d5.d406.41ba701c@gitrepo.freebsd.org> The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=ddec4209b10d65ef19e1d1b884e1b876eab58c7d commit ddec4209b10d65ef19e1d1b884e1b876eab58c7d Author: Warner Losh AuthorDate: 2025-11-27 00:04:29 +0000 Commit: Warner Losh CommitDate: 2025-11-27 00:05:35 +0000 ipfilter: fix broken build Every commit earns me a dozen emails that LINT is broken. This should stop that. Fixes: eda1756d0454f ipfilter: Verify frentry on entry into kernel Sponsored by: Netflix --- sys/netpfil/ipfilter/netinet/fil.c | 4 +--- sys/netpfil/ipfilter/netinet/ip_nat.c | 3 --- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/sys/netpfil/ipfilter/netinet/fil.c b/sys/netpfil/ipfilter/netinet/fil.c index 0de5378322df..0c5e22517dc4 100644 --- a/sys/netpfil/ipfilter/netinet/fil.c +++ b/sys/netpfil/ipfilter/netinet/fil.c @@ -4413,9 +4413,7 @@ frrequest(ipf_main_softc_t *softc, int unit, ioctlcmd_t req, caddr_t data, void *ptr, *uptr; u_int *p, *pp; frgroup_t *fg; - char *group, *name; - size_t v_fr_size, v_element_size; - int v_rem_namelen, v_fr_toend; + char *group; ptr = NULL; fg = NULL; diff --git a/sys/netpfil/ipfilter/netinet/ip_nat.c b/sys/netpfil/ipfilter/netinet/ip_nat.c index d83454185609..b8602db91820 100644 --- a/sys/netpfil/ipfilter/netinet/ip_nat.c +++ b/sys/netpfil/ipfilter/netinet/ip_nat.c @@ -978,9 +978,6 @@ ipf_nat_ioctl(ipf_main_softc_t *softc, caddr_t data, ioctlcmd_t cmd, int interr_tbl[3] = { 60077, 60081, 60078 }; ipnat_t *nat, *nt, *n; ipnat_t natd; - char *name; - size_t v_in_size, v_element_size; - int v_rem_namelen, v_in_toend; SPL_INT(s); #if !SOLARIS && defined(_KERNEL) From nobody Thu Nov 27 00:19:16 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dGxr96qlpz6HrWN for ; Thu, 27 Nov 2025 00:19:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dGxr96JGQz41lc for ; Thu, 27 Nov 2025 00:19:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764202761; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/3Te8U4e4bQL0z4xuhwXJp/VaC6pxtYlpzEu16CZb4M=; b=MU7Uww1MUIeReHq/WMqDia+tHWMGbXgyJbl+Tdm8J7BlWh2g5N5Exc/t2SMXQI5YTlrS97 NOg3nCzJ3SV9G3fkDcyLl4JLCSnLHeythPIC+EH7zkJryXNy4HsMPtQwEkBNEJvdsevWD+ CJ1jdQy/RMZTqzVVuitELbmUjVS6jQDBpNUi8eTF8Zl29y82cNnesQx7YCTTXaV76xkK5B 4AQnDIMnvT3SgFGw/MKYOt/T7CJbkHGgSiUeH1KQxGjZrZDR60ZGQfD1whzy/N8osqFFSy 1tfsu90VDl6Ckxx5n7QHUVP4fBpNrRD1B4uno8eDhFgnlQa/vMLLDUp4rK5h4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764202761; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/3Te8U4e4bQL0z4xuhwXJp/VaC6pxtYlpzEu16CZb4M=; b=SuxmhEL2hidLHF3ObzdbzsMZ6aLVZZijCbuWJ6BCe2FhHrnp2sGwOn1B6Kd0hvsEEQI0LY 4eaTUjC7yMjzCDKTN/l2kE4hdvrOfYMD0CfCczaSI8gqpawMV4dBVeGyzMfEB7YTg8/r3s mYms6okoWb9Q6jysP56rKfvZRSEAJPYW25LoA9gVKfXrHM3mRKHr24LJf8o9xqhUby8pfd eO1GrNNeUvM7Ja1osozrK2FmM0Ddewjyh7s+uG/srb/0I3HnPq8l3xpfYFuf6aSJ+6MsJL xNCItXZY3n/C/LJdZaWt4iLzemQh12rTYEmHslPLDmQKkQUhhBhOEqJ3gSs7dg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764202761; a=rsa-sha256; cv=none; b=NjlyOHm8iAR3SH/Mtl/QGjYjtnRbBHkdkPppHXWsU26/ocSnCglaXUSttuaHVI6ev242fb b5oxYj2SeBrydUFR8ZjG9oVN5ROqDoZc4nesm+ne22H0rCdaQl8RK6F0y7IWxKmLKr3IYs NRoaLX7yglQgN6gKvfZhxULUDu4YhOR/4Oj/ntgrd6fxW22siaDjH0pK8BaeRwVXBu2kB7 ldT7sa0gpruxsqHL/3hBCmO/VXJEJy8W7vsAWhtUtt+Q/wkaQf6dDf+ZWUIpx7JukNyMt2 3V3YXZ1pvm3kLHNEAqjiWVEkcn79upy0b2MMOEAEPMspQIZGj7Vuv37FiBCeBw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dGxr95vwRz17r9 for ; Thu, 27 Nov 2025 00:19:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id e067 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 27 Nov 2025 00:19:16 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 5198c3221003 - main - vt: Allow VT_SETMODE with frsig=0 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5198c32210039d8dc92554647384eee75688848c Auto-Submitted: auto-generated Date: Thu, 27 Nov 2025 00:19:16 +0000 Message-Id: <69279904.e067.1bd856b9@gitrepo.freebsd.org> The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=5198c32210039d8dc92554647384eee75688848c commit 5198c32210039d8dc92554647384eee75688848c Author: Ed Maste AuthorDate: 2025-09-30 19:39:34 +0000 Commit: Ed Maste CommitDate: 2025-11-27 00:19:04 +0000 vt: Allow VT_SETMODE with frsig=0 Linux does not check that any of the signals in vt_mode VT_SETMODE ioctl (relsig, acqsig, frsig) are valid, but FreeBSD required that all three are valid. frsig is unusued in both Linux and FreeBSD, and software typically leaves it unset. To improve portability, allow frsig to be set to zero. PR: 289812 Reported by: Dušan Gvozdenović Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D52835 --- sys/dev/vt/vt_core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/dev/vt/vt_core.c b/sys/dev/vt/vt_core.c index a1376be954ee..5e8f7b1d0bb7 100644 --- a/sys/dev/vt/vt_core.c +++ b/sys/dev/vt/vt_core.c @@ -3046,9 +3046,9 @@ skip_thunk: DPRINTF(5, "reset WAIT_ACQ, "); return (0); } else if (mode->mode == VT_PROCESS) { - if (!ISSIGVALID(mode->relsig) || - !ISSIGVALID(mode->acqsig) || - !ISSIGVALID(mode->frsig)) { + if (!(ISSIGVALID(mode->relsig) && + ISSIGVALID(mode->acqsig) && + (mode->frsig == 0 || ISSIGVALID(mode->frsig)))) { DPRINTF(5, "error EINVAL\n"); return (EINVAL); } From nobody Thu Nov 27 00:21:50 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dGxv221Jhz6Hrxp for ; Thu, 27 Nov 2025 00:21:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dGxv21VNCz42M2 for ; Thu, 27 Nov 2025 00:21:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764202910; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=c9yHKtCAdHfx65lRsYaMGGX57VWInF1IPOIX9uqIUXo=; b=gCMX3t4a0amVQEhoGYBOGMREoHK37bFt0rVK1c1khOSkt3D0ToblPd8JP2IvsNRnep07wR iZPcmlm/+ak90map2uGtnT5BLa/m0blxKQO44O350ZOqo+gh6JEkaBlfVUxymObh3QULPv nbhkrqQTpLiJchXghjmzJm8IgXv2IWdDHtdozCAUaDKRYlJ7GZdRNQf/4kfjDXjEOioATc 9uZIoL8FreQoXqvXwV7L0RHyERcAlXF+hu3hrEr21BvF6XN5Ddi6XoIGZXF7jN/AoiDkdN v7W2DafpJARmSw3xizKEAkRjEMhTxU7WoycdmcPdotzHGFrVEToT+IeqhrDrEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764202910; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=c9yHKtCAdHfx65lRsYaMGGX57VWInF1IPOIX9uqIUXo=; b=m0Ds/EHYYdBro+ZWSazpENLS+sBqR/2ZDppj29RPwdtaQ3QqN8mbReSdSbTpCvIrqcjubv bXuz7aGkH2YZ/xk3RJ6148153TRzKgIQX59DdKJ68MBB1yQbxM3arde+56Ttv5+e8CHr+5 E1ky6EB+bmXKQAXLlKKC80qQFUxX0dUsU7eJSYO3LGTJdrAxyPIuqtVyS8DnsnGxjeuved jqAh6jGFOZhU8/mSvdxq2xA0WUIEJytVzMIkVCXmNFHr7Oy6b//dJF0eYBTy6fHkV6cd1y GPLdL2Sf8d/ILRWFNamWpqNYtneguqqnbLgCeoZM6kOu1NgAr411ZQgmV/Rcow== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764202910; a=rsa-sha256; cv=none; b=Ez+Axg1ARGWu3Hj/+K3xuIDvsEW72pMYqAoCT7M2WFV3r9fPsFkIc9IpGN3vwSntExqBia 9D5FK0Qijq0C1skjL4fnFnDMpIGltoa2vKxxNFexiagAnqwrz3wDGRjUxvg/CjlafSBJYL kKFQaZYQNSJhdZEQ9hNXww/YSb0S1D9/61UxFz5WHjxLndRt957MROGcq1tULesPh+DJG7 axatZR5ScIWPBj5WoTY5IM61auXnnZvhi5e7l9A2pvJAcGxlRsTFv5ULPK7gzxeQhoybjq Rwy81bt5glu+tznnFaRuQ6zG0Q2p2vBPQUyinjrY28uSWnf9HRyj62Z6+h7sYQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dGxv215Tgz17XN for ; Thu, 27 Nov 2025 00:21:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id f0fb by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 27 Nov 2025 00:21:50 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 35232d8edb5b - main - papers: Retire phkmalloc paper List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 35232d8edb5b8b3f18b6d9b2a93ecc252f8ed5a2 Auto-Submitted: auto-generated Date: Thu, 27 Nov 2025 00:21:50 +0000 Message-Id: <6927999e.f0fb.4fe7f221@gitrepo.freebsd.org> The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=35232d8edb5b8b3f18b6d9b2a93ecc252f8ed5a2 commit 35232d8edb5b8b3f18b6d9b2a93ecc252f8ed5a2 Author: Ed Maste AuthorDate: 2025-06-17 15:07:42 +0000 Commit: Ed Maste CommitDate: 2025-11-27 00:21:08 +0000 papers: Retire phkmalloc paper It has not been installed since commit cdc37953165c ("In preparation for the removal of the roff toolchain, disconnect the") and turned up in a search for outdated MALLOC_OPTIONS settings. The rendered paper is available at https://papers.freebsd.org/1998/phk-malloc PR: 287357 Reviewed by: bapt Event: Kitchener-Waterloo Hackathon 202506 Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D50908 --- share/doc/papers/Makefile | 1 - share/doc/papers/malloc/Makefile | 7 - share/doc/papers/malloc/abs.ms | 33 ----- share/doc/papers/malloc/alternatives.ms | 43 ------ share/doc/papers/malloc/conclusion.ms | 46 ------ share/doc/papers/malloc/implementation.ms | 223 ------------------------------ share/doc/papers/malloc/intro.ms | 72 ---------- share/doc/papers/malloc/kernel.ms | 54 -------- share/doc/papers/malloc/malloc.ms | 70 ---------- share/doc/papers/malloc/performance.ms | 111 --------------- share/doc/papers/malloc/problems.ms | 52 ------- 11 files changed, 712 deletions(-) diff --git a/share/doc/papers/Makefile b/share/doc/papers/Makefile index 3c702b2aeaaa..0ab8a40d2cb7 100644 --- a/share/doc/papers/Makefile +++ b/share/doc/papers/Makefile @@ -7,7 +7,6 @@ SUBDIR= beyond4.3 \ jail \ kernmalloc \ kerntune \ - malloc \ newvm \ relengr \ sysperf \ diff --git a/share/doc/papers/malloc/Makefile b/share/doc/papers/malloc/Makefile deleted file mode 100644 index 755264466aa3..000000000000 --- a/share/doc/papers/malloc/Makefile +++ /dev/null @@ -1,7 +0,0 @@ -VOLUME= papers -DOC= malloc -SRCS= abs.ms intro.ms kernel.ms malloc.ms problems.ms alternatives.ms \ - performance.ms implementation.ms conclusion.ms -MACROS= -ms - -.include diff --git a/share/doc/papers/malloc/abs.ms b/share/doc/papers/malloc/abs.ms deleted file mode 100644 index ef70cec772af..000000000000 --- a/share/doc/papers/malloc/abs.ms +++ /dev/null @@ -1,33 +0,0 @@ -.\" -.\" ---------------------------------------------------------------------------- -.\" "THE BEER-WARE LICENSE" (Revision 42): -.\" wrote this file. As long as you retain this notice you -.\" can do whatever you want with this stuff. If we meet some day, and you think -.\" this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp -.\" ---------------------------------------------------------------------------- -.\" -.if n .ND -.TL -Malloc(3) in modern Virtual Memory environments. -.sp -Revised -Fri Apr 5 12:50:07 1996 -.AU -Poul-Henning Kamp -.AI - -Den Andensidste Viking -Valbygaardsvej 8 -DK-4200 Slagelse -Denmark -.AB -Malloc/free is one of the oldest parts of the C language environment -and obviously the world has changed a bit since it was first made. -The fact that most UNIX kernels have changed from swap/segment to -virtual memory/page based memory management has not been sufficiently -reflected in the implementations of the malloc/free API. -.PP -A new implementation was designed, written, tested and bench-marked -with an eye on the workings and performance characteristics of modern -Virtual Memory systems. -.AE diff --git a/share/doc/papers/malloc/alternatives.ms b/share/doc/papers/malloc/alternatives.ms deleted file mode 100644 index 02efa1f88901..000000000000 --- a/share/doc/papers/malloc/alternatives.ms +++ /dev/null @@ -1,43 +0,0 @@ -.\" -.\" ---------------------------------------------------------------------------- -.\" "THE BEER-WARE LICENSE" (Revision 42): -.\" wrote this file. As long as you retain this notice you -.\" can do whatever you want with this stuff. If we meet some day, and you think -.\" this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp -.\" ---------------------------------------------------------------------------- -.\" -.ds RH Alternative implementations -.NH -Alternative implementations -.PP -These problems were actually the inspiration for the first alternative -malloc implementations. -Since their main aim was debugging, they would often use techniques -like allocating a guard zone before and after the chunk, -and possibly filling these guard zones -with some pattern, so accesses outside the allocated chunk could be detected -with some decent probability. -Another widely used technique is to use tables to keep track of which -chunks are actually in which state and so on. -.PP -This class of debugging has been taken to its practical extreme by -the product "Purify" which does the entire memory-coloring exercise -and not only keeps track of what is in use and what isn't, but also -detects if the first reference is a read (which would return undefined -values) and other such violations. -.PP -Later actual complete implementations of malloc arrived, but many of -these still based their workings on the basic schema mentioned previously, -disregarding that in the meantime virtual memory and paging have -become the standard environment. -.PP -The most widely used "alternative" malloc is undoubtedly ``gnumalloc'' -which has received wide acclaim and certainly runs faster than -most stock mallocs. It does, however, tend to fare badly in -cases where paging is the norm rather than the exception. -.PP -The particular malloc that prompted this work basically didn't bother -reusing storage until the kernel forced it to do so by refusing -further allocations with sbrk(2). -That may make sense if you work alone on your own personal mainframe, -but as a general policy it is less than optimal. diff --git a/share/doc/papers/malloc/conclusion.ms b/share/doc/papers/malloc/conclusion.ms deleted file mode 100644 index 9d0d1f2a83a6..000000000000 --- a/share/doc/papers/malloc/conclusion.ms +++ /dev/null @@ -1,46 +0,0 @@ -.\" -.\" ---------------------------------------------------------------------------- -.\" "THE BEER-WARE LICENSE" (Revision 42): -.\" wrote this file. As long as you retain this notice you -.\" can do whatever you want with this stuff. If we meet some day, and you think -.\" this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp -.\" ---------------------------------------------------------------------------- -.\" -.ds RH Conclusion and experience. -.NH -Conclusion and experience. -.PP -In general the performance differences between gnumalloc and this -malloc are not that big. -The major difference comes when primary storage is seriously -over-committed, in which case gnumalloc -wastes time paging in pages it's not going to use. -In such cases as much as a factor of five in wall-clock time has -been seen in difference. -Apart from that gnumalloc and this implementation are pretty -much head-on performance-wise. -.PP -Several legacy programs in the BSD 4.4 Lite distribution had -code that depended on the memory returned from malloc -being zeroed. In a couple of cases, free(3) was called more than -once for the same allocation, and a few cases even called free(3) -with pointers to objects in the data section or on the stack. -.PP -A couple of users have reported that using this malloc on other -platforms yielded "pretty impressive results", but no hard benchmarks -have been made. -.ds RH Acknowledgements & references. -.NH -Acknowledgements & references. -.PP -The first implementation of this algorithm was actually a file system, -done in assembler using 5-hole ``Baudot'' paper tape for a drum storage -device attached to a 20 bit germanium transistor computer with 2000 words -of memory, but that was many years ago. -.PP -Peter Wemm came up with the idea to store the -page-directory in mmap(2)'ed memory instead of in the heap. -This has proven to be a good move. -.PP -Lars Fredriksen found and identified a -fence-post bug in the code. diff --git a/share/doc/papers/malloc/implementation.ms b/share/doc/papers/malloc/implementation.ms deleted file mode 100644 index f9b547be18f5..000000000000 --- a/share/doc/papers/malloc/implementation.ms +++ /dev/null @@ -1,223 +0,0 @@ -.\" -.\" ---------------------------------------------------------------------------- -.\" "THE BEER-WARE LICENSE" (Revision 42): -.\" wrote this file. As long as you retain this notice you -.\" can do whatever you want with this stuff. If we meet some day, and you think -.\" this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp -.\" ---------------------------------------------------------------------------- -.\" -.ds RH Implementation -.NH -Implementation -.PP -A new malloc(3) implementation was written to meet the goals, -and to the extent possible to address the shortcomings listed previously. -.PP -The source is 1218 lines of C code, and can be found in FreeBSD 2.2 -(and probably later versions as well) as src/lib/libc/stdlib/malloc.c. -.PP -The main data structure is the -.I page-directory -which contains a -.B void* -for each page we have control over. -The value can be one of: -.IP -.B MALLOC_NOT_MINE -Another part of the code may call brk(2) to get a piece of the cake. -Consequently, we cannot rely on the memory we get from the kernel -being one consecutive piece of memory, and therefore we need a way to -mark such pages as "untouchable". -.IP -.B MALLOC_FREE -This is a free page. -.IP -.B MALLOC_FIRST -This is the first page in a (multi-)page allocation. -.IP -.B MALLOC_FOLLOW -This is a subsequent page in a multi-page allocation. -.IP -.B -struct pginfo* -.R -A pointer to a structure describing a partitioned page. -.PP -In addition, there exists a linked list of small data structures that -describe the free space as runs of free pages. -.PP -Notice that these structures are not part of the free pages themselves, -but rather allocated with malloc so that the free pages themselves -are never referenced while they are free. -.PP -When a request for storage comes in, it will be treated as a ``page'' -allocation if it is bigger than half a page. -The free list will be searched and the first run of free pages that -can satisfy the request is used. The first page gets set to -.B MALLOC_FIRST -status. If more than that one page is needed, the rest of them get -.B MALLOC_FOLLOW -status in the page-directory. -.PP -If there were no pages on the free list, brk(2) will be called, and -the pages will get added to the page-directory with status -.B MALLOC_FREE -and the search restarts. -.PP -Freeing a number of pages is done by changing their state in the -page directory to MALLOC_FREE, and then traversing the free-pages list to -find the right place for this run of pages, possibly collapsing -with the two neighboring runs into one run and, if possible, -releasing some memory back to the kernel by calling brk(2). -.PP -If the request is less than or equal to half of a page, its size will be -rounded up to the nearest power of two before being processed -and if the request is less than some minimum size, it is rounded up to -that size. -.PP -These sub-page allocations are served from pages which are split up -into some number of equal size chunks. -For each of these pages a -.B -struct pginfo -.R -describes the size of the chunks on this page, how many there are, -how many are free and so on. -The description consist of a bitmap of used chunks, and various counters -and numbers used to keep track of the stuff in the page. -.PP -For each size of sub-page allocation, the pginfo structures for the -pages that have free chunks in them form a list. -The heads of these lists are stored in predetermined slots at -the beginning of the page directory to make access fast. -.PP -To allocate a chunk of some size, the head of the list for the -corresponding size is examined, and a free chunk found. The number -of free chunks on that page is decreased by one and, if zero, the -pginfo structure is unlinked from the list. -.PP -To free a chunk, the page is derived from the pointer, the page table -for that page contains a pointer to the pginfo structure, where the -free bit is set for the chunk, the number of free chunks increased by -one, and if equal to one, the pginfo structure is linked into the -proper place on the list for this size of chunks. -If the count increases to match the number of chunks on the page, the -pginfo structure is unlinked from the list and free(3)'ed and the -actual page itself is free(3)'ed too. -.PP -To be 100% correct performance-wise these lists should be ordered -according to the recent number of accesses to that page. This -information is not available and it would essentially mean a reordering -of the list on every memory reference to keep it up-to-date. -Instead they are ordered according to the address of the pages. -Interestingly enough, in practice this comes out to almost the same -thing performance-wise. -.PP -It's not that surprising after all, it's the difference between -following the crowd or actively directing where it can go, in both -ways you can end up in the middle of it all. -.PP -The side effect of this compromise is that it also uses less storage, -and the list never has to be reordered, all the ordering happens when -pages are added or deleted. -.PP -It is an interesting twist to the implementation that the -.B -struct pginfo -.R -is allocated with malloc. -That is, "as with malloc" to be painfully correct. -The code knows the special case where the first (couple) of allocations on -the page is actually the pginfo structure and deals with it accordingly. -This avoids some silly "chicken and egg" issues. -.ds RH Bells and whistles. -.NH -Bells and whistles. -.PP -brk(2) is actually not a very fast system call when you ask for storage. -This is mainly because of the need by the kernel to zero the pages before -handing them over, so therefore this implementation does not release -heap pages until there is a large chunk to release back to the kernel. -Chances are pretty good that we will need it again pretty soon anyway. -Since these pages are not accessed at all, they will soon be paged out -and don't affect anything but swap-space usage. -.PP -The page directory is actually kept in a mmap(2)'ed piece of -anonymous memory. This avoids some rather silly cases that -would otherwise have to be handled when the page directory -has to be extended. -.PP -One particularly nice feature is that all pointers passed to free(3) -and realloc(3) can be checked conclusively for validity: -First the pointer is masked to find the page. The page directory -is then examined, it must contain either MALLOC_FIRST, in which -case the pointer must point exactly at the page, or it can contain -a struct pginfo*, in which case the pointer must point to one of -the chunks described by that structure. -Warnings will be printed on -.B stderr -and nothing will be done with -the pointer if it is found to be invalid. -.PP -An environment variable -.B MALLOC_OPTIONS -allows the user some control over the behavior of malloc. -Some of the more interesting options are: -.IP -.B Abort -If malloc fails to allocate storage, core-dump the process with -a message rather than expect it handle this correctly. -It's amazing how few programs actually handle this condition correctly, -and consequently the havoc they can create is the more creative or -destructive. -.IP -.B Dump -Writes malloc statistics to a file called ``malloc.out'' prior -to process termination. -.IP -.B Hint -Pass a hint to the kernel about pages we no longer need through the -madvise(2) system call. This can help performance on machines that -page heavily by eliminating unnecessary page-ins and page-outs of -unused data. -.IP -.B Realloc -Always do a free and malloc when realloc(3) is called. -For programs doing garbage collection using realloc(3), this makes the -heap collapse faster since malloc will reallocate from the -lowest available address. -The default -is to leave things alone if the size of the allocation is still in -the same size-class. -.IP -.B Junk -will explicitly fill the allocated area with a particular value -to try to detect if programs rely on it being zero. -.IP -.B Zero -will explicitly zero out the allocated chunk of memory, while any -space after the allocation in the chunk will be filled with the -junk value to try to catch out of the chunk references. -.ds RH The road not taken. -.NH -The road not yet taken. -.PP -A couple of avenues were explored that could be interesting in some -set of circumstances. -.PP -Using mmap(2) instead of brk(2) was actually slower, since brk(2) -knows a lot of the things that mmap has to find out first. -.PP -In general there is little room for further improvement of the -time-overhead of the malloc, further improvements will have to -be in the area of improving paging behavior. -.PP -It is still under consideration to add a feature such that -if realloc is called with two zero arguments, the internal -allocations will be reallocated to perform a garbage collect. -This could be used in certain types of programs to collapse -the memory use, but so far it doesn't seem to be worth the effort. -.PP -Malloc/Free can be a significant point of contention in multi-threaded -programs. Low-grain locking of the data-structures inside the -implementation should be implemented to avoid excessive spin-waiting. diff --git a/share/doc/papers/malloc/intro.ms b/share/doc/papers/malloc/intro.ms deleted file mode 100644 index 59064ee166f1..000000000000 --- a/share/doc/papers/malloc/intro.ms +++ /dev/null @@ -1,72 +0,0 @@ -.\" -.\" ---------------------------------------------------------------------------- -.\" "THE BEER-WARE LICENSE" (Revision 42): -.\" wrote this file. As long as you retain this notice you -.\" can do whatever you want with this stuff. If we meet some day, and you think -.\" this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp -.\" ---------------------------------------------------------------------------- -.\" -.ds RH Introduction -.NH -Introduction -.PP -Most programs need to allocate storage dynamically in addition -to whatever static storage the compiler reserved at compile-time. -To C programmers this fact is rather obvious, but for many years -this was not an accepted and recognized fact, and many languages -still used today don't support this notion adequately. -.PP -The classic UNIX kernel provides two very simple and powerful -mechanisms for obtaining dynamic storage, the execution stack -and the heap. -The stack is usually put at the far upper end of the address-space, -from where it grows down as far as needed, though this may depend on -the CPU design. -The heap starts at the end of the -.B bss -segment and grows upwards as needed. -.PP -There isn't really a kernel-interface to the stack as such. -The kernel will allocate some amount of memory for it, -not even telling the process the exact size. -If the process needs more space than that, it will simply try to access -it, hoping that the kernel will detect that an access has been -attempted outside the allocated memory, and try to extend it. -If the kernel fails to extend the stack, this could be because of lack -of resources or permissions or because it may just be impossible -to do in the first place, the process will usually be shot down by the -kernel. -.PP -In the C language, there exists a little used interface to the stack, -.B alloca(3) , -which will explicitly allocate space on the stack. -This is not an interface to the kernel, but merely an adjustment -done to the stack-pointer such that space will be available and -unharmed by any subroutine calls yet to be made while the context -of the current subroutine is intact. -.PP -Due to the nature of normal use of the stack, there is no corresponding -"free" operator, but instead the space is returned when the current -function returns to its caller and the stack frame is dismantled. -This is the cause of much grief, and probably the single most important -reason that alloca(3) is not, and should not be, used widely. -.PP -The heap on the other hand has an explicit kernel-interface in the -system call -.B brk(2) . -The argument to brk(2) is a pointer to where the process wants the -heap to end. -There is also an interface called -.B sbrk(2) -taking an increment to the current end of the heap, but this is merely a -.B libc -front for brk(2). -.PP -In addition to these two memory resources, modern virtual memory kernels -provide the mmap(2)/munmap(2) interface which allows almost complete -control over any bit of virtual memory in the process address space. -.PP -Because of the generality of the mmap(2) interface and the way the -data structures representing the regions are laid out, sbrk(2) is actually -faster in use than the equivalent mmap(2) call, simply because -mmap(2) has to search for information that is implicit in the sbrk(2) call. diff --git a/share/doc/papers/malloc/kernel.ms b/share/doc/papers/malloc/kernel.ms deleted file mode 100644 index 3672065ddef4..000000000000 --- a/share/doc/papers/malloc/kernel.ms +++ /dev/null @@ -1,54 +0,0 @@ -.\" -.\" ---------------------------------------------------------------------------- -.\" "THE BEER-WARE LICENSE" (Revision 42): -.\" wrote this file. As long as you retain this notice you -.\" can do whatever you want with this stuff. If we meet some day, and you think -.\" this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp -.\" ---------------------------------------------------------------------------- -.\" -.ds RH The kernel and memory -.NH -The kernel and memory -.PP -Brk(2) isn't a particularly convenient interface, -it was probably made more to fit the memory model of the -hardware being used, than to fill the needs of the programmers. -.PP -Before paged and/or virtual memory systems became -common, the most popular memory management facility used for -UNIX was segments. -This was also very often the only vehicle for imposing protection on -various parts of memory. -Depending on the hardware, segments can be anything, and consequently -how the kernels exploited them varied a lot from UNIX to UNIX and from -machine to machine. -.PP -Typically a process would have one segment for the text section, one -for the data and bss section combined and one for the stack. -On some systems the text shared a segment with the data and bss, and was -consequently just as writable as them. -.PP -In this setup all the brk(2) system call has to do is to find the -right amount of free storage, possibly moving things around in physical -memory, maybe even swapping out a segment or two to make space, -and change the upper limit on the data segment according to the address given. -.PP -In a more modern page based virtual memory implementation this is still -pretty much the situation, except that the granularity is now pages: -The kernel finds the right number of free pages, possibly paging some -pages out to free them up, and then plugs them into the page-table of -the process. -.PP -As such the difference is very small, the real difference is that in -the old world of swapping, either the entire process was in primary -storage or it wouldn't be selected to be run. In a modern VM kernel, -a process might only have a subset of its pages in primary memory, -the rest will be paged in, if and when the process tries to access them. -.PP -Only very few programs deal with the brk(2) interface directly. -The few that do usually have their own memory management facilities. -LISP or FORTH interpreters are good examples. -Most other programs use the -.B malloc(3) -interface instead, and leave it to the malloc implementation to -use brk(2) to get storage allocated from the kernel. diff --git a/share/doc/papers/malloc/malloc.ms b/share/doc/papers/malloc/malloc.ms deleted file mode 100644 index 79e5173226b2..000000000000 --- a/share/doc/papers/malloc/malloc.ms +++ /dev/null @@ -1,70 +0,0 @@ -.\" -.\" ---------------------------------------------------------------------------- -.\" "THE BEER-WARE LICENSE" (Revision 42): -.\" wrote this file. As long as you retain this notice you -.\" can do whatever you want with this stuff. If we meet some day, and you think -.\" this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp -.\" ---------------------------------------------------------------------------- -.\" -.ds RH Malloc and free -.NH -Malloc and free -.PP -The job of malloc(3) is to turn the rather simple -brk(2) facility into a service programs can -actually use without getting hurt. -.PP -The archetypical malloc(3) implementation keeps track of the memory between -the end of the bss section, as defined by the -.B _end -symbol, and the current brk(2) point using a linked list of chunks of memory. -Each item on the list has a status as either free or used, a pointer -to the next entry and in most cases to the previous as well, to speed -up inserts and deletes in the list. -.PP -When a malloc(3) request comes in, the list is traversed from the -front and if a free chunk big enough to hold the request is found, -it is returned, if the free chunk is bigger than the size requested, -a new free chunk is made from the excess and put back on the list. -.PP -When a chunk is -.B free(3) 'ed, -the chunk is found in the list, its status -is changed to free and if one or both of the surrounding chunks -are free, they are collapsed to one. -.PP -A third kind of request, -.B realloc(3) , -will resize -a chunk, trying to avoid copying the contents if possible. -It is seldom used, and has only had a significant impact on performance -in a few special situations. -The typical pattern of use is to malloc(3) a chunk of the maximum size -needed, read in the data and adjust the size of the chunk to match the -size of the data read using realloc(3). -.PP -For reasons of efficiency, the original implementation of malloc(3) -put the small structure used to contain the next and previous pointers -plus the state of the chunk right before the chunk itself. -.PP -As a matter of fact, the canonical malloc(3) implementation can be -studied in the ``Old testament'', chapter 8 verse 7 [Kernighan & Ritchie] -.PP -Various optimisations can be applied to the above basic algorithm: -.IP -If in freeing a chunk, we end up with the last chunk on the list being -free, we can return that to the kernel by calling brk(2) with the first -address of that chunk and then make the previous chunk the last on the -chain by terminating its ``next'' pointer. -.IP -A best-fit algorithm can be used instead of first-fit at an expense -of memory, because statistically fewer chances to brk(2) backwards will -present themselves. -.IP -Splitting the list in two, one for used and one for free chunks, to -speed the searching. -.IP -Putting free chunks on one of several free lists, depending on their size, -to speed allocation. -.IP -\&... diff --git a/share/doc/papers/malloc/performance.ms b/share/doc/papers/malloc/performance.ms deleted file mode 100644 index 49e9d6b75517..000000000000 --- a/share/doc/papers/malloc/performance.ms +++ /dev/null @@ -1,111 +0,0 @@ -.\" -.\" ---------------------------------------------------------------------------- -.\" "THE BEER-WARE LICENSE" (Revision 42): -.\" wrote this file. As long as you retain this notice you -.\" can do whatever you want with this stuff. If we meet some day, and you think -.\" this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp -.\" ---------------------------------------------------------------------------- -.\" -.ds RH Performance -.NH -Performance -.PP -Performance for a malloc(3) implementation comes as two variables: -.IP -A: How much time does it use for searching and manipulating data structures. -We will refer to this as ``overhead time''. -.IP -B: How well does it manage the storage. -This rather vague metric we call ``quality of allocation''. -.PP -The overhead time is easy to measure, just do a lot of malloc/free calls -of various kinds and combination, and compare the results. -.PP -The quality of allocation is not quite as simple as that. -One measure of quality is the size of the process, that should obviously -be minimized. -Another measure is the execution time of the process. -This is not an obvious indicator of quality, but people will generally -agree that it should be minimized as well, and if malloc(3) can do -anything to do so, it should. -Explanation why it is still a good metric follows: -.PP -In a traditional segment/swap kernel, the desirable behavior of a process -is to keep the brk(2) as low as possible, thus minimizing the size of the -data/bss/heap segment, which in turn translates to a smaller process and -a smaller probability of the process being swapped out, qed: faster -execution time as an average. -.PP -In a paging environment this is not a bad choice for a default, but -a couple of details needs to be looked at much more carefully. -.PP -First of all, the size of a process becomes a more vague concept since -only the pages that are actually used need to be in primary storage -for execution to progress, and they only need to be there when used. -That implies that many more processes can fit in the same amount of -primary storage, since most processes have a high degree of locality -of reference and thus only need some fraction of their pages to actually -do their job. -.PP -From this it follows that the interesting size of the process, is some -subset of the total amount of virtual memory occupied by the process. -This number isn't a constant, it varies depending on the whereabouts -of the process, and it may indeed fluctuate wildly over the lifetime -of the process. -.PP -One of the names for this vague concept is ``current working set''. -It has been defined many different ways over the years, mostly to -satisfy and support claims in marketing or benchmark contexts. -.PP -For now we can simply say that it is the number of pages the process -needs in order to run at a sufficiently low paging rate in a congested -primary storage. -(If primary storage isn't congested, this is not really important -of course, but most systems would be better off using the pages for -disk-cache or similar functions, so from that perspective it will -always be congested.) -If the number of pages is too small, the process will wait for its -pages to be read from secondary storage much of the time, if it's too -big, the space could be used better for something else. -.PP -From the view of any single process, this number of pages is -"all of my pages", but from the point of view of the OS it should -be tuned to maximise the total throughput of all the processes on -the machine at the time. -This is usually done using various kinds of least-recently-used -replacement algorithms to select page candidates for replacement. -.PP -With this knowledge, can we decide what the performance goal is for -a modern malloc(3) ? -Well, it's almost as simple as it used to be: -.B -Minimize the number of pages accessed. -.R -.PP -This really is the core of it all. -If the number of accessed pages is smaller, then locality of reference is -higher, and all kinds of caches (which is essentially what the -primary storage is in a VM system) work better. -.PP -It's interesting to notice that the classical malloc fails on this one -because the information about free chunks is kept with the free -chunks themselves. In some of the benchmarks this came out as all the -pages being paged in every time a malloc call was made, because malloc -had to traverse the free list to find a suitable chunk for the allocation. -If memory is not in use, then you shouldn't access it. -.PP -The secondary goal is more evident: -.B -Try to work in pages. -.R -.PP -That makes it easier for the kernel, and wastes less virtual memory. -Most modern implementations do this when they interact with the -kernel, but few try to avoid objects spanning pages. -.PP -If an object's size -is less than or equal to a page, there is no reason for it to span two pages. -Having objects span pages means that two pages must be -paged in, if that object is accessed. -.PP -With this analysis in the luggage, we can start coding. diff --git a/share/doc/papers/malloc/problems.ms b/share/doc/papers/malloc/problems.ms deleted file mode 100644 index fa27effce999..000000000000 --- a/share/doc/papers/malloc/problems.ms +++ /dev/null @@ -1,52 +0,0 @@ -.\" -.\" ---------------------------------------------------------------------------- -.\" "THE BEER-WARE LICENSE" (Revision 42): -.\" wrote this file. As long as you retain this notice you -.\" can do whatever you want with this stuff. If we meet some day, and you think -.\" this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp -.\" ---------------------------------------------------------------------------- -.\" -.ds RH The problems -.NH -The problems -.PP -Even though malloc(3) is a lot simpler to use -than the raw brk(2)/sbrk(2) interface, -or maybe exactly because -of that, -a lot of problems arise from its use. -.IP -Writing to memory outside the allocated chunk. -The most likely result being that the data structure used to hold -the links and flags about this chunk or the next one gets thrashed. -.IP -Freeing a pointer to memory not allocated by malloc. -This is often a pointer that points to an object on the stack or in the -data-section, in newer implementations of C it may even be in the text- -section where it is likely to be readonly. -Some malloc implementations detect this, some don't. -.IP -Freeing a modified pointer. This is a very common mistake, freeing -not the pointer malloc(3) returned, but rather some offset from it. -Some mallocs will handle this correctly if the offset is positive. -.IP -Freeing the same pointer more than once. -.IP -Accessing memory in a chunk after it has been free(3)'ed. -.PP -The handling of these problems have traditionally been weak. -A core-dump was the most common form for "handling", but in rare -cases one could experience the famous "malloc: corrupt arena." -message before the core-dump. -Even worse though, very often the program will just continue, -possibly giving wrong results. -.PP -An entirely different form of problem is that -the memory returned by malloc(3) can contain any value. -Unfortunately most kernels, correctly, zero out the storage they -provide with brk(2), and thus the storage malloc returns will be zeroed -in many cases as well, so programmers are not particular apt to notice -that their code depends on malloc'ed storage being zeroed. -.PP -With problems this big and error handling this weak, it is not -surprising that problems are hard and time consuming to find and fix. From nobody Thu Nov 27 00:33:34 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dGy8Z4DRwz6HtCJ for ; Thu, 27 Nov 2025 00:33:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dGy8Z3ZMzz43VM for ; Thu, 27 Nov 2025 00:33:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764203614; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lzQ5n1kwq+mFr6MfTAvbRzCR2Y75dR8CGx/aiwzA2y4=; b=eEXlIOE/OiJNAAEDtX2iRlMia2b1X2+UOStUBiHasQwo7hq6WY720CocsQd8Qo4lfSI4X7 hScba3nMePEkbDujbJIN2kkztjg7LR+J4EBxpm4d+UpXI0RnbBxzZRGTmJfyGgBtMSAe7j ac8SkS2ArBLBBGq0yxpkjT4/Dt5fsKaK8NNuVMAnixhPct6uDVOo0gHAYFV70A+iH7GqGr TOKmIHy8jfVJh9k+atX1WNqu32koplJLFdkhfKzuZS60+ueJsFxl975O+/h48fw3SxUg9C EJ5qEtVZw+rm5OFcsRXAskR7jKOneSOFLYPJeLoy6dl53S3HYuPyT4/UB7kbCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764203614; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lzQ5n1kwq+mFr6MfTAvbRzCR2Y75dR8CGx/aiwzA2y4=; b=yRsaqp9Y/4iCCLeOMvEW5WdYYoLMRuyoHVcsmAbuGWA1B0h33hmQdR3pe15GViGBzxdQh4 /H1bIa58qlIG2JrZKm3kgOxzD7jgqCtAB6sTtwBOD3HhmPPlZXjur1T5M1sQNO58Fb/gFg O+U2RnVhmTJxRrcIzqppVYnmxe4I8WDxPjIwwEtc4wVRnUzkoj7GBQA43hrq8ob590RINp yq2flo1r263zwa0zE05eYZ1jqdgXWgeQj3cy1IOgilHzCfQl2XUvtVKfX+xRmQ8Rwg7hS0 /m2AEn//qWaB7iS9R3dyCYr9fBQkHekTWT+2CA528g3qzRIfuY/OdZQoKiy45g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764203614; a=rsa-sha256; cv=none; b=oSMVwq4sal09Vu3jnjNzxhIOt7QNphTfXMpWc2W++eyQtvM48hsU7fkb9/fw1SBSd1PG6I jCTrY6wOX3gUrn6uGfdmdO/Ul1f08plRTAYY7ZHeDvq9RtEJ5708tOEfMZiB3ZnP7W2aW0 XIDbnkgGSvua9RwrWI4tdpAs3N/dGRc/yAnLzHaFUf743eitSx2FsPfmtsNcNlVtkHhoJZ xt+Sg0ln/kAcRjmDhr9ZBestOl+V7hErsE/U45932V6fdVqQtt6PMmVG9+iGBFZxRjQQfA 9xn1i5ov6JThsxUcvNJqrqWwBLR3cIJmnRtkvGhIWlMv2uea2v3PGzlrRWl/Cg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dGy8Z2ySpz18Jf for ; Thu, 27 Nov 2025 00:33:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id f2b6 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 27 Nov 2025 00:33:34 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: 068b20e200fb - stable/15 - sound: Fix KASSERT panics in chn_read() and chn_write() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 068b20e200fbd9db5dbe102f9e0715c121b86494 Auto-Submitted: auto-generated Date: Thu, 27 Nov 2025 00:33:34 +0000 Message-Id: <69279c5e.f2b6.30064da5@gitrepo.freebsd.org> The branch stable/15 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=068b20e200fbd9db5dbe102f9e0715c121b86494 commit 068b20e200fbd9db5dbe102f9e0715c121b86494 Author: Christos Margiolis AuthorDate: 2025-11-20 15:23:09 +0000 Commit: Christos Margiolis CommitDate: 2025-11-27 00:33:08 +0000 sound: Fix KASSERT panics in chn_read() and chn_write() INVARIANTS kernels may trigger a KASSERT panic from sndbuf_acquire(), when fuzzing write(2) using stress2, because of a race in chn_write(). In the case of chn_write(), what sndbuf_acquire() does is extend the ready-to-read area of the buffer by a specified amount of bytes. The KASSERT in question makes sure the number of bytes we want to extend the ready area by, is less than or equal to the number of free bytes in the buffer. This makes sense, because we cannot extend the ready area to something larger than what is available (i.e., free) in the first place. What chn_write() currently does for every write is; calculate the appropriate write size, let's say X, unlock the channel, uiomove() X bytes to the channel's buffer, lock the channel, and call sndbuf_acquire() to extend the ready area by X bytes. The problem with this approach, however, is the following. Suppose an empty channel buffer with a length of 1024 bytes, and 2 threads, (A) and (B), where (B) is a higher-priority one. Suppose thread (A) wants to write 1024 bytes. It unlocks the channel and uiomove()s 1024 bytes to the channel buffer. At the same time, thread (B) picks up the lock, and because it is higher priority, it keeps dominating the lock for a few iterations. By the time thread (A) picks up the lock again, it tries to call sndbuf_acquire() with a size of 1024 bytes, which was calculated before it performed the uiomove(). In this case, there is a very high chance that the buffer will not be empty, that is, have a free area of 1024 bytes, as was the case when thread (A) started executing, and so the KASSERT will trigger a panic because the condition (bytes <= free) is not met. Another scenario that can trigger a panic is the following: suppose a buffer with a size of 4 bytes, and two threads: (A) and (B). In the first iteration, thread (A) wants to write 2 bytes, while the buffer is empty, BUT the pointer (sndbuf_getfreeptr()) is at the end (i.e., buf[3]). In the first iteration of the loop, because of the way we calculate t, we'll end up writing only 1 byte, so after sz -= t, sz will be 1, and so we'll need one more iteration in the inner loop, to write the remaining 1 byte. Now we're at the end of the first loop, thread (A) unlocks the channel, it has written 1 byte, it needs to write 1 more, and the buffer is left with 3 empty slots. Now thread (B) picks up the lock, and it wants to write 3 (or more) bytes. Eventually it writes the 3 bytes, and it leaves the buffer with 0 free slots. By the time thread (A) picks up the lock again, and continues with the second iteration of the inner loop, it will try to write the last byte, but sndbuf_acquire() will panic because there is no free space anymore. To fix this, get rid of the inner loop and calculate the write size on each iteration. Also, call sndbuf_acquire() before unlocking the channel. In the scenarios explained above, we'll end up entering the chn_sleep() case. Modify it as well, so that we do not kill the channel if we need to sleep more. Do the same for chn_read() to avoid possible similar panics from sndbuf_dispose(). Reported by: pho Tested by: christos, pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: pho, kib Differential Revision: https://reviews.freebsd.org/D53666 (cherry picked from commit 253b98f749cf93a9a682f46925c43cbbd04e1110) --- sys/dev/sound/pcm/channel.c | 70 ++++++++++++++------------------------------- 1 file changed, 22 insertions(+), 48 deletions(-) diff --git a/sys/dev/sound/pcm/channel.c b/sys/dev/sound/pcm/channel.c index f29a819ce0ae..e92181d74e19 100644 --- a/sys/dev/sound/pcm/channel.c +++ b/sys/dev/sound/pcm/channel.c @@ -438,7 +438,7 @@ chn_write(struct pcm_channel *c, struct uio *buf) { struct snd_dbuf *bs = c->bufsoft; void *off; - int ret, timeout, sz, t, p; + int ret, timeout, sz, p; CHN_LOCKASSERT(c); @@ -446,24 +446,17 @@ chn_write(struct pcm_channel *c, struct uio *buf) timeout = chn_timeout * hz; while (ret == 0 && buf->uio_resid > 0) { + p = sndbuf_getfreeptr(bs); sz = min(buf->uio_resid, sndbuf_getfree(bs)); + sz = min(sz, bs->bufsize - p); if (sz > 0) { - /* - * The following assumes that the free space in - * the buffer can never be less around the - * unlock-uiomove-lock sequence. - */ - while (ret == 0 && sz > 0) { - p = sndbuf_getfreeptr(bs); - t = min(sz, bs->bufsize - p); - off = sndbuf_getbufofs(bs, p); - CHN_UNLOCK(c); - ret = uiomove(off, t, buf); - CHN_LOCK(c); - sz -= t; - sndbuf_acquire(bs, NULL, t); - } - ret = 0; + off = sndbuf_getbufofs(bs, p); + sndbuf_acquire(bs, NULL, sz); + CHN_UNLOCK(c); + ret = uiomove(off, sz, buf); + CHN_LOCK(c); + if (ret != 0) + break; if (CHN_STOPPED(c) && !(c->flags & CHN_F_NOTRIGGER)) { ret = chn_start(c, 0); if (ret != 0) @@ -483,13 +476,7 @@ chn_write(struct pcm_channel *c, struct uio *buf) ret = EAGAIN; } else { ret = chn_sleep(c, timeout); - if (ret == EAGAIN) { - ret = EINVAL; - c->flags |= CHN_F_DEAD; - device_printf(c->dev, "%s(): %s: " - "play interrupt timeout, channel dead\n", - __func__, c->name); - } else if (ret == ERESTART || ret == EINTR) + if (ret == ERESTART || ret == EINTR) c->flags |= CHN_F_ABORTING; } } @@ -552,7 +539,7 @@ chn_read(struct pcm_channel *c, struct uio *buf) { struct snd_dbuf *bs = c->bufsoft; void *off; - int ret, timeout, sz, t, p; + int ret, timeout, sz, p; CHN_LOCKASSERT(c); @@ -568,35 +555,22 @@ chn_read(struct pcm_channel *c, struct uio *buf) timeout = chn_timeout * hz; while (ret == 0 && buf->uio_resid > 0) { + p = sndbuf_getreadyptr(bs); sz = min(buf->uio_resid, sndbuf_getready(bs)); + sz = min(sz, bs->bufsize - p); if (sz > 0) { - /* - * The following assumes that the free space in - * the buffer can never be less around the - * unlock-uiomove-lock sequence. - */ - while (ret == 0 && sz > 0) { - p = sndbuf_getreadyptr(bs); - t = min(sz, bs->bufsize - p); - off = sndbuf_getbufofs(bs, p); - CHN_UNLOCK(c); - ret = uiomove(off, t, buf); - CHN_LOCK(c); - sz -= t; - sndbuf_dispose(bs, NULL, t); - } - ret = 0; + off = sndbuf_getbufofs(bs, p); + sndbuf_dispose(bs, NULL, sz); + CHN_UNLOCK(c); + ret = uiomove(off, sz, buf); + CHN_LOCK(c); + if (ret != 0) + break; } else if (c->flags & (CHN_F_NBIO | CHN_F_NOTRIGGER)) ret = EAGAIN; else { ret = chn_sleep(c, timeout); - if (ret == EAGAIN) { - ret = EINVAL; - c->flags |= CHN_F_DEAD; - device_printf(c->dev, "%s(): %s: " - "record interrupt timeout, channel dead\n", - __func__, c->name); - } else if (ret == ERESTART || ret == EINTR) + if (ret == ERESTART || ret == EINTR) c->flags |= CHN_F_ABORTING; } } From nobody Thu Nov 27 00:33:35 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dGy8c0LTbz6Ht0K for ; Thu, 27 Nov 2025 00:33:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dGy8b4LQbz43VN for ; Thu, 27 Nov 2025 00:33:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764203615; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JlAcdzkG4N3puaqBf9k6bgMuh2xGlc66nf8jCb7qVZU=; b=qGCjGuMmzhr09GKlZAvUpz0VGJGtkOvzQ8VmaIdk99F5P+51vqcuTSgFejCQY1vr8QEAnf AOPC7bsW8AtaswH8Gxdn6qtAWqVzT6FYhFCmgJYaDGbxjWZhPB8X85bVqfsui/VlB/cYPg 4Mta1FbYVxIq6VqNtF1M/FCGGCWiQFBRX9iLtfTHWYk2WJGlKs5FSZ1ihD4IR+ok4xb8T0 U1kogaLyv7YEmcRvwf811hl6iCA/S/o/P6Kcx6EChnfDkG9g5h+myUoCP9MDT6Hah+79BL xFntZoUvamQT1pOjH/YY1uGiG3bgqwGUEBPEuGrqjJKXsIiM6/mZTWkDqbTVLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764203615; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JlAcdzkG4N3puaqBf9k6bgMuh2xGlc66nf8jCb7qVZU=; b=ejFvpu+zd6pzmfXEJybFcxBexndnW8p5nYSrbd+K+pnRPuEs6QHJece/boKoxGgU3h90XE Lc6frGzn8179R8pweb8BRTczHaAa0urerZ9G6aeZMNZGe8YRGtA9jy+PlVO9fvuFZlcB2p nN0uvIBYcsSOctGSYyzKinc4VDbU8X6rULoUlQYfURwOUD3+ApLkwd+xyHN2zG0lKN/e4X SFkluv4bqJ/qy8jInwpgm/8Q4VYoVF67vu77TSbYh7LLqbpopkwjVix8zS2fiwFdkDJT2H kKLjGTbWs3BUuQlnbUVn6DEWoeQRSAtvPkvDqIdB6hI+2OyImB/EF8o7OXDXQQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764203615; a=rsa-sha256; cv=none; b=WMpriqm3wtwbMIoLM6Nznne8ZkCSV9mfE7LLaAOIkCCOtK02vFfewSpHzPbR7sbqemQVs2 r31+vRgjLpuyTXd8rxk4AuwfV7v8TQXFN4aLG06WST1Z5TrA3UUYKAb/n6f+SALjmgReE3 B/2Kg//wBW5TRDTXwMnzlNdrlfPB10cnv4/hNl01FbXBJ82ibFiolcTi6HyXD9Q4gQKY+e R34jEd9inRas5wcvcq8ewCgBLSsx59SXWlu9WBEAA7UwbVXaNbhsS3MN/dJoCSTR33pSMn lRSW8rLqMiuwqVHMFXSSObwzf6VNNEX0vv6YaPXVGY8PbED1LKEMCkmhWTFp8Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dGy8b3n57z18WS for ; Thu, 27 Nov 2025 00:33:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id f2ba by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 27 Nov 2025 00:33:35 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: 3cf8333f877d - stable/15 - sound: Remove vchan_passthrough() and hw.snd.passthrough_verbose List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 3cf8333f877dce4eeeec850684508a7ffec99c95 Auto-Submitted: auto-generated Date: Thu, 27 Nov 2025 00:33:35 +0000 Message-Id: <69279c5f.f2ba.2845986a@gitrepo.freebsd.org> The branch stable/15 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=3cf8333f877dce4eeeec850684508a7ffec99c95 commit 3cf8333f877dce4eeeec850684508a7ffec99c95 Author: Christos Margiolis AuthorDate: 2025-11-20 15:24:49 +0000 Commit: Christos Margiolis CommitDate: 2025-11-27 00:33:19 +0000 sound: Remove vchan_passthrough() and hw.snd.passthrough_verbose Unused and confusing. Sponsored by: The FreeBSD Foundation MFC after: 1 week (cherry picked from commit 3612ef642f511a1bd9f759da87abeafe7d6ff110) --- sys/dev/sound/pcm/vchan.c | 18 ------------------ sys/dev/sound/pcm/vchan.h | 5 ----- 2 files changed, 23 deletions(-) diff --git a/sys/dev/sound/pcm/vchan.c b/sys/dev/sound/pcm/vchan.c index b31e28d51453..dcb49e3003d0 100644 --- a/sys/dev/sound/pcm/vchan.c +++ b/sys/dev/sound/pcm/vchan.c @@ -47,13 +47,6 @@ #define FMTLIST_OFFSET 4 #define DIGFMTS_MAX 2 -#ifdef SND_DEBUG -static int snd_passthrough_verbose = 0; -SYSCTL_INT(_hw_snd, OID_AUTO, passthrough_verbose, CTLFLAG_RWTUN, - &snd_passthrough_verbose, 0, "passthrough verbosity"); - -#endif - struct vchan_info { struct pcm_channel *channel; struct pcmchan_caps caps; @@ -723,11 +716,7 @@ vchan_destroy(struct pcm_channel *c) } int -#ifdef SND_DEBUG -vchan_passthrough(struct pcm_channel *c, const char *caller) -#else vchan_sync(struct pcm_channel *c) -#endif { int ret; @@ -744,13 +733,6 @@ vchan_sync(struct pcm_channel *c) if (ret != 0) c->flags |= CHN_F_DIRTY; -#ifdef SND_DEBUG - if (snd_passthrough_verbose) { - device_printf(c->dev, "%s(%s/%s) %s() -> re-sync err=%d\n", - __func__, c->name, c->comm, caller, ret); - } -#endif - return (ret); } diff --git a/sys/dev/sound/pcm/vchan.h b/sys/dev/sound/pcm/vchan.h index 65b0218781fb..5d8057cd4b7f 100644 --- a/sys/dev/sound/pcm/vchan.h +++ b/sys/dev/sound/pcm/vchan.h @@ -39,12 +39,7 @@ extern bool snd_vchans_enable; int vchan_create(struct pcm_channel *, struct pcm_channel **); int vchan_destroy(struct pcm_channel *); -#ifdef SND_DEBUG -int vchan_passthrough(struct pcm_channel *, const char *); -#define vchan_sync(c) vchan_passthrough(c, __func__) -#else int vchan_sync(struct pcm_channel *); -#endif #define VCHAN_SYNC_REQUIRED(c) \ (((c)->flags & CHN_F_VIRTUAL) && (((c)->flags & CHN_F_DIRTY) || \ From nobody Thu Nov 27 00:44:29 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dGyPD12gZz6HvBb; Thu, 27 Nov 2025 00:44:32 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from omta003.cacentral1.a.cloudfilter.net (omta001.cacentral1.a.cloudfilter.net [3.97.99.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dGyPC5LSsz45L9; Thu, 27 Nov 2025 00:44:31 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Authentication-Results: mx1.freebsd.org; none Received: from shw-obgw-4003b.ext.cloudfilter.net ([10.228.9.157]) by cmsmtp with ESMTPS id OJGivbMzeAPFJOQ7avCVWD; Thu, 27 Nov 2025 00:44:30 +0000 Received: from spqr.komquats.com ([70.66.136.217]) by cmsmtp with ESMTPSA id OQ7ZvP6rj24TSOQ7avsgfI; Thu, 27 Nov 2025 00:44:30 +0000 X-Auth-User: cschuber X-Authority-Analysis: v=2.4 cv=Ie+KmGqa c=1 sm=1 tr=0 ts=69279eee a=h7br+8Ma+Xn9xscxy5znUg==:117 a=h7br+8Ma+Xn9xscxy5znUg==:17 a=kj9zAlcOel0A:10 a=6UeiqGixMTsA:10 a=6I5d2MoRAAAA:8 a=EkcXrb_YAAAA:8 a=YxBL1-UpAAAA:8 a=iFOJyE4y5vjxbGPV8i8A:9 a=CjuIK1q_8ugA:10 a=LK5xJRSDVpKd5WXXoEvA:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy.cwsent.com [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTP id 5C16CA7; Wed, 26 Nov 2025 16:44:29 -0800 (PST) Received: by slippy.cwsent.com (Postfix, from userid 1000) id 2367C18D; Wed, 26 Nov 2025 16:44:29 -0800 (PST) X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.8+dev Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Warner Losh cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: ddec4209b10d - main - ipfilter: fix broken build In-reply-to: <692795d5.d406.41ba701c@gitrepo.freebsd.org> References: <692795d5.d406.41ba701c@gitrepo.freebsd.org> Comments: In-reply-to Warner Losh message dated "Thu, 27 Nov 2025 00:05:41 +0000." List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 26 Nov 2025 16:44:29 -0800 Message-Id: <20251127004429.2367C18D@slippy.cwsent.com> X-CMAE-Envelope: MS4xfLz+eyJmjj3a2NuGdptL/Ozxtwtkd2OZwCX5ErN+keDLQ25v4zJNbJkBX2mt9m0fi9hEBowaNHMXsTc79yVLTEkQnbjb8X7VkKrO+kqQ1xJLAXR5tcRR GW7r6R5l1Pti+rUbYWSjLNXZWhe8dlaMQEhv8v/ugGSC2oGvNXC/kRVUI40FRV4PooHpOIVGrUPA73jmytrSQ8iPxybV+wAq2OfycpvsuUeG9dEnKmM3Syi/ RYx02kq/gIjNzza13GEftojZbygLf4NU2kEZfaG3Hxh20RKWt82vQiaWb70TGW/lIJ1WhO0/afGG+PN1MlgSDN5Gx8n+9B1U0WLxKr4jrp4= X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4dGyPC5LSsz45L9 In message <692795d5.d406.41ba701c@gitrepo.freebsd.org>, Warner Losh writes: > The branch main has been updated by imp: > > URL: https://cgit.FreeBSD.org/src/commit/?id=ddec4209b10d65ef19e1d1b884e1b876 > eab58c7d > > commit ddec4209b10d65ef19e1d1b884e1b876eab58c7d > Author: Warner Losh > AuthorDate: 2025-11-27 00:04:29 +0000 > Commit: Warner Losh > CommitDate: 2025-11-27 00:05:35 +0000 > > ipfilter: fix broken build > > Every commit earns me a dozen emails that LINT is broken. This should > stop that. > > Fixes: eda1756d0454f ipfilter: Verify frentry on entry into kernel > Sponsored by: Netflix Thank you. Sorry for the breakage. > --- > sys/netpfil/ipfilter/netinet/fil.c | 4 +--- > sys/netpfil/ipfilter/netinet/ip_nat.c | 3 --- > 2 files changed, 1 insertion(+), 6 deletions(-) > > diff --git a/sys/netpfil/ipfilter/netinet/fil.c b/sys/netpfil/ipfilter/netine > t/fil.c > index 0de5378322df..0c5e22517dc4 100644 > --- a/sys/netpfil/ipfilter/netinet/fil.c > +++ b/sys/netpfil/ipfilter/netinet/fil.c > @@ -4413,9 +4413,7 @@ frrequest(ipf_main_softc_t *softc, int unit, ioctlcmd_t > req, caddr_t data, > void *ptr, *uptr; > u_int *p, *pp; > frgroup_t *fg; > - char *group, *name; > - size_t v_fr_size, v_element_size; > - int v_rem_namelen, v_fr_toend; > + char *group; > > ptr = NULL; > fg = NULL; > diff --git a/sys/netpfil/ipfilter/netinet/ip_nat.c b/sys/netpfil/ipfilter/net > inet/ip_nat.c > index d83454185609..b8602db91820 100644 > --- a/sys/netpfil/ipfilter/netinet/ip_nat.c > +++ b/sys/netpfil/ipfilter/netinet/ip_nat.c > @@ -978,9 +978,6 @@ ipf_nat_ioctl(ipf_main_softc_t *softc, caddr_t data, ioct > lcmd_t cmd, > int interr_tbl[3] = { 60077, 60081, 60078 }; > ipnat_t *nat, *nt, *n; > ipnat_t natd; > - char *name; > - size_t v_in_size, v_element_size; > - int v_rem_namelen, v_in_toend; > SPL_INT(s); > > #if !SOLARIS && defined(_KERNEL) > -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org e**(i*pi)+1=0 From nobody Thu Nov 27 01:56:13 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dGzzy0RzGz6J41k for ; Thu, 27 Nov 2025 01:56:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dGzzx3fjtz3CjG for ; Thu, 27 Nov 2025 01:56:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764208573; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2/LUPwQxPRTSXmI808NpY0hb25+XMC30QCsmt/v+JaQ=; b=db+NF4DylzAMip+ztU3VPBGu+0iG4V7jWII1LHhl25BC5AQVY8i4pmBqqPRXN7UdpyWHdN WtxmzZp0VD0zNofjI4czqnrUN+kpevBDUrwJmO0MXd8xoESAdczEj6QRouwp9PH3+Od0l+ L8V4TKSfjZrJl4fwN8KQfi6tWnzcPO3OZOhrVZeFWX6rZfiybE+oBk5QE9d+s/0b0QEu5u Et32R1v1c1s2n9x/Ec+xXOmQsU7cn5uDkEbpJm4BMsgL+ukiJo8jk2upHwk5iqur1Tw7MT jY3uALyehc+DrHfStnYzHIjqGViKinAWB9q7dpscLcg15/7ab8Jj2DSB85jh6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764208573; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2/LUPwQxPRTSXmI808NpY0hb25+XMC30QCsmt/v+JaQ=; b=e6c0ykgSciqs34Oyx18+NsTgHs85FM3CLd5SaFjpkTfTYWPFgrO8G2kg9tFdygK1aDiu7L gL9G9pWMnGxzMAHe0bf8g2LTcycx8/tTyGRiR8P4rWUHwOwV6V8HuLQfh0B8rmkDsNl7US lQalgfglMMpj4QWGh0qIZO2IUfN0AwW/Pqfxy/7RRtVEVuWbJPBwm+l4iROUqnEW+DzoYv ebywFVqY+ggdjlm8zINhYmo8lAtUv2jTtUF0OCG2Pm+X+9EwTrhOz3s0RGTMhjHo1sYPwM MvCRxOj3ITuZYADdFRTdphnl8M9HdrH8RQFU+0XOh4xiNTLLmmIn3STTpztbbQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764208573; a=rsa-sha256; cv=none; b=JvWK1amknyTc5Y0sTa1mND8yrGAyGlezJb9zceeHQ4AB9RZBq2CaVQ3jLkV1n6qwkAwU2a ALl2CD9YnloiOY0rYPHiGGIYY/L9LTXb9aR5+UTc1JyyqPCz1ne7DnQBYgVgETiGfePGqU 2y5Ys1Kep5uPfMU3MMBw/K+6XLL/aPqGDilgMMLxf6vI4d1wcO8/LA2h0H6i18k8CJjo6l Etgoew1OuLJyCVdW2HqCa5M5BBrLKxpAGEnxeMOr67yppFvWvD/COcZ1XBO+HTWJp1Vzap VvP5dWqRVaJ20kdX0NBO3K2fEFrPa8VZwFVIb1pzEuHdsJFFB72QXqEfxj/MrQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dGzzx2x48z1B5q for ; Thu, 27 Nov 2025 01:56:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2951e by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 27 Nov 2025 01:56:13 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: 56275b7b0672 - stable/15 - bsdinstall: Ignore -p[0-9]+ in determining BRANCH List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 56275b7b06726aa530c1bcab176d225d5d4b7893 Auto-Submitted: auto-generated Date: Thu, 27 Nov 2025 01:56:13 +0000 Message-Id: <6927afbd.2951e.2541247@gitrepo.freebsd.org> The branch stable/15 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=56275b7b06726aa530c1bcab176d225d5d4b7893 commit 56275b7b06726aa530c1bcab176d225d5d4b7893 Author: Colin Percival AuthorDate: 2025-11-26 03:33:22 +0000 Commit: Colin Percival CommitDate: 2025-11-27 01:56:02 +0000 bsdinstall: Ignore -p[0-9]+ in determining BRANCH The patch level is not part of the branch per se and should not be used in constructing the FreeBSD-base.conf file used by bsdinstall. MFC after: 1 day (cherry picked from commit d45816f369eb0099fd274fee23a3bf137ee794b1) --- usr.sbin/bsdinstall/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/bsdinstall/Makefile b/usr.sbin/bsdinstall/Makefile index 9a6b25fc5c7a..a576f2d0794e 100644 --- a/usr.sbin/bsdinstall/Makefile +++ b/usr.sbin/bsdinstall/Makefile @@ -16,7 +16,7 @@ FILESDIR= ${SHAREDIR}/bsdinstall FILES= FreeBSD-base.conf _BRANCH!= ${MAKE} -C ${SRCTOP}/release -V BRANCH -BRANCH?= ${_BRANCH} +BRANCH?= ${_BRANCH:C/-p[0-9]+$//} _REVISION!= ${MAKE} -C ${SRCTOP}/release -V REVISION REVISION?= ${_REVISION} From nobody Thu Nov 27 01:57:47 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dH01m1T8dz6J3v2 for ; Thu, 27 Nov 2025 01:57:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dH01m0N91z3D1g for ; Thu, 27 Nov 2025 01:57:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764208668; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lL1idqUAVYX+AnDcxmZvyn5Sewc6Le93zGDRxhtn1Lg=; b=i6cANf/EcUhq0G23s++lKpR2V+4VVGn+CkO9BoHyj1C7oMNt/dh7JHgy2Oz1FQrY9e74jJ DtF1VOr9CODf0YDFH/QMnpSn1vv6BjMMG35XXAfTLUAuWzvV1jcFJl/WPdRW95KZxYCC4f 10duDyTfunGjqhBgOa4Ss+DuLqxpJMdex5IF6QvNof/SB8EFbBXeyQ5992QgIeqEZQk1Jq jsG+x6qgWSCnSWcESS0FouvrnTSmsNGsMnVE9ypATnD1WEAIdOJ5iVyWXQwRTFa6wgnXHq Pe0cfpxIzrqM6gxEsu3NMlD0gTOJS1ZfCI5mFniYnbpAtRO0BmUvyF45HeaQHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764208668; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lL1idqUAVYX+AnDcxmZvyn5Sewc6Le93zGDRxhtn1Lg=; b=TtZ/AV2xmAkusORK1WEBypR5cmSYBclQSu/k76MiTPq0sxTLW69LHktJjJBugJ4Yu+FIuR RSjAL5qbPAQShJ3R4eh6nzjZt2AKWi9VfrkeiODxDTfAPLuj2wjHyWxco+u1GHjKxW9Dcz RarFQaE0aKPWfJx73YLB/ntsMkO68SK9H+cYS0/yarrT2Q8vjtjHhFfcGtJGqft8W8DyiG y2vvKWeCicQOg8Uo09UX3By6x5mDvJwH3XcfqdsEYl47MxaXQ7JUQDEV1tz9Ca40LbHfko 2pp1RKEk6oECOEk9mDClTlL2jbSH1FBPw9lNg/JeTNB8MEBKT+qPQjtDEG/8mQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764208668; a=rsa-sha256; cv=none; b=eahfNS3aVhWWHHXAnfdV0EdzWptUF5DzrVQ0SpfA5kXomeJwGKpI18dgCujAsOGc0CUIR6 ccZuEN8s7TjXMnOyWNGWSQxuK17eB2y5tj9BX9X271yPy0JJFuw/RslmsoyRLBMSwKXIDZ L0jA26TeDs1RVL2QQD7inrwnoKBCSp4o1VEuGTCGUfvDeU/61L8El9DSAL598/5AhWu01p bGLQhX0fDph0A+74P7/veWQzwcEwn5VaLpjbvDb+xeGpCUhX7KuwrNRiXbEAS7rlbN3Lxg V/7CzQcc8rrhrcnS8TQ3hycm9Wjdh1lt0U2YfTfWhAEXe7Myak1aZNDQuRrLGA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dH01l6v8tz1BN6 for ; Thu, 27 Nov 2025 01:57:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2a801 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 27 Nov 2025 01:57:47 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: f73d78e3ff12 - releng/15.0 - bsdinstall: Ignore -p[0-9]+ in determining BRANCH List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.0 X-Git-Reftype: branch X-Git-Commit: f73d78e3ff1295d3227849ac993d4b2e5f206d6d Auto-Submitted: auto-generated Date: Thu, 27 Nov 2025 01:57:47 +0000 Message-Id: <6927b01b.2a801.3cca8d7@gitrepo.freebsd.org> The branch releng/15.0 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=f73d78e3ff1295d3227849ac993d4b2e5f206d6d commit f73d78e3ff1295d3227849ac993d4b2e5f206d6d Author: Colin Percival AuthorDate: 2025-11-26 03:33:22 +0000 Commit: Colin Percival CommitDate: 2025-11-27 01:57:20 +0000 bsdinstall: Ignore -p[0-9]+ in determining BRANCH The patch level is not part of the branch per se and should not be used in constructing the FreeBSD-base.conf file used by bsdinstall. Approved by: re (cperciva) MFC after: 1 day (cherry picked from commit d45816f369eb0099fd274fee23a3bf137ee794b1) (cherry picked from commit 56275b7b06726aa530c1bcab176d225d5d4b7893) --- usr.sbin/bsdinstall/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/bsdinstall/Makefile b/usr.sbin/bsdinstall/Makefile index 9a6b25fc5c7a..a576f2d0794e 100644 --- a/usr.sbin/bsdinstall/Makefile +++ b/usr.sbin/bsdinstall/Makefile @@ -16,7 +16,7 @@ FILESDIR= ${SHAREDIR}/bsdinstall FILES= FreeBSD-base.conf _BRANCH!= ${MAKE} -C ${SRCTOP}/release -V BRANCH -BRANCH?= ${_BRANCH} +BRANCH?= ${_BRANCH:C/-p[0-9]+$//} _REVISION!= ${MAKE} -C ${SRCTOP}/release -V REVISION REVISION?= ${_REVISION} From nobody Thu Nov 27 01:57:49 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dH01n3cvGz6J3wy for ; Thu, 27 Nov 2025 01:57:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dH01n1Zw1z3D8w for ; Thu, 27 Nov 2025 01:57:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764208669; 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=3MLxJfSt8FKhj2E1Lil4goAXzpjFmjqxVKlDZ1uePRs=; b=XyYocYZ6Kl9pwkiZLygEjcqHj8tR+lXkbp8NzPMUUhLxOItWOy0Rr3GSZgkHSDwdiI0k6/ ajwTztELYZWKh6zIpcSEK94mfY2TYdAUup10Jt2YZaIUaJ4xrasPPeRio3OgZvVmsneMgE xARE7zAlLHB2Ei/WYhJ0WCEvyDpkFn339mH0eqe10VcDdWVApuTK5bXmexchrTy6k2J4eC 7bBvrgumLYlXCwvqC8y3fPOl0IO5UsA4iSFe+nBzEycmE5i0dR3yqE+lAvzeB66QhuJmZk DmqL3LZCKnCy0V2JWubdnW7Lwl85BOdGM+nxVs/WXM/dtKWiNhknxr5uN9GF9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764208669; 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=3MLxJfSt8FKhj2E1Lil4goAXzpjFmjqxVKlDZ1uePRs=; b=yzomXfhLclDZ1j67oqT0gZEu291Fw5QiPwvPAN9NwoQQkyvlB++u8TAryBFiErpGLaUNYg 2+DpvoTWUpUgnYdInvxX1WrVmjENHTX5osshNsj5fWjp803/RfDGMWZSfdtkLnOO8C9RJT anX7qTYQdOwOLi7Em1fYdcm/vWzY/OozJLbvERp+qo4wZ7enNiwYGQEOpTNRtNxobHKpUU L2GyUzc4jX3FJNeBXjat80zTm1PjuIzQ0/UlOWlwbzjfl13Fx8C55ECBTtJPIsH0xr4FJk 44SGr2wMBM2cix3db2WiFaipuC76ZtZYsFF0fFxGSYrnS5Gr6cdwIdEWdE6MeA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764208669; a=rsa-sha256; cv=none; b=kMyBMBu+j9TaG750+jRTB4o06tCVzpuRRtTr8WyHIpEApYXKsQRwW0PQw+H0fv7RwNCtZN 0yoVVZiNXZ/zxmlnPgYQEm2HpcW7Yzp+Ly4yWVTn6fKEziWs8FmYoWXikw7ocUupuK465K GS8nByBbYcT7/OC+hMWHrlExjPWJW1mCD4zqjOJPPjdiwQz9Kzn5Y1XSXJrG9ZBQCa7dXE pb0RzO6nkCLWlkdBdAAMZ1TUV7VfxQXTsNf2bQ8A0l72coWNZKxxRDvDTaoC54fImDVDaF dkQ3JntptxdEFbuYROYA/z5iW++/yhcTB6sMTTTwGI9VYeLUxLZZCCgThuZFTw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dH01n0fB9z194Q for ; Thu, 27 Nov 2025 01:57:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 29421 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 27 Nov 2025 01:57:49 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Olivier Certner From: Colin Percival Subject: git: 20ebb6ec5ac0 - releng/15.0 - mdo.1: Document group-related and fine-grained control functionalities List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.0 X-Git-Reftype: branch X-Git-Commit: 20ebb6ec5ac0745fe063bd315bd953312bfcb1a2 Auto-Submitted: auto-generated Date: Thu, 27 Nov 2025 01:57:49 +0000 Message-Id: <6927b01d.29421.4c941264@gitrepo.freebsd.org> The branch releng/15.0 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=20ebb6ec5ac0745fe063bd315bd953312bfcb1a2 commit 20ebb6ec5ac0745fe063bd315bd953312bfcb1a2 Author: Olivier Certner AuthorDate: 2025-09-01 15:24:54 +0000 Commit: Colin Percival CommitDate: 2025-11-27 01:57:24 +0000 mdo.1: Document group-related and fine-grained control functionalities This is a manual page update describing the functionality that was added to mdo(1) in commit 3ca1e69028ac ("mdo(1): Add support and shortcuts for fully specifying users and groups"). Please either refer to that commit or the new manual page's content for more information. While here: - Add to the introduction a description of process credentials and some specific vocabulary that is used throughout the page, as well as the relationship between mdo(1) and mac_do(4). - Update the HISTORY section. - Add AUTHORS and SECURITY CONSIDERATIONS sections. Approved by: re (cperciva) Reviewed by: ziaee MFC after: 1 minute Sponsored by: The FreeBSD Foundation Sponsored by: Google LLC (GSoC 2025) Co-authored-by: Kushagra Srivastava Differential Revision: https://reviews.freebsd.org/D53905 (cherry picked from commit 73dd00f2fd7de2a5d8dda8fa25ebcd7c8964ff52) (cherry picked from commit dc75034792739a638edf3d7b756e7175e5a79bf7) --- usr.bin/mdo/mdo.1 | 269 +++++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 245 insertions(+), 24 deletions(-) diff --git a/usr.bin/mdo/mdo.1 b/usr.bin/mdo/mdo.1 index c4586f628661..1de694c69e40 100644 --- a/usr.bin/mdo/mdo.1 +++ b/usr.bin/mdo/mdo.1 @@ -1,49 +1,270 @@ .\"- -.\" Copyright(c) 2024 Baptiste Daroussin -.\" .\" SPDX-License-Identifier: BSD-2-Clause .\" -.Dd May 26, 2025 +.\" Copyright (c) 2024 Baptiste Daroussin +.\" Copyright (c) 2025 Kushagra Srivastava +.\" Copyright (c) 2025 The FreeBSD Foundation +.\" +.\" Portions of this documentation were written by Olivier Certner +.\" at Kumacom SARL under sponsorship from the FreeBSD +.\" Foundation. +.\" +.Dd November 26, 2025 .Dt MDO 1 .Os .Sh NAME .Nm mdo -.Nd execute commands as another user +.Nd execute commands with specific credentials .Sh SYNOPSIS .Nm -.Op Fl u Ar username +.Op Fl u Ar user | Fl k .Op Fl i -.Op command Op args +.Op Fl g Ar group +.Op Fl G Ar group1,group2,... +.Op Fl s Ar groups_mod1,groups_mod2,... +.Op Fl h +.Op Fl -ruid Ar user +.Op Fl -svuid Ar user +.Op Fl -euid Ar user +.Op Fl -rgid Ar group +.Op Fl -svgid Ar group +.Op Fl -egid Ar group +.Op -- +.Op Ar command Op Ar args ... .Sh DESCRIPTION The .Nm -utility executes the specified +utility executes the passed .Ar command -as user -.Ar username . -.Pp -If no -.Ar username -is provided it defaults to the -.Va root -user. -If no +with the requested process credentials or, if no .Ar command -is specified, it will execute the shell specified as -.Va SHELL -environnement variable, falling back on -.Pa /bin/sh . +was specified, the program whose path is the value of the +.Ev SHELL +environment variable or +.Pa /bin/sh +if that variable is unset. +The calling user must either be the superuser +.Pq effective user ID of 0 +or the credentials transition from the caller's to the requested ones must be +authorized by a MAC module such as +.Xr mac_do 4 . +The target process credentials are applied atomically using +.Xr setcred 2 . .Pp +Process credentials comprise the real, effective and saved user IDs, the real, +effective and saved group IDs, hereby called the +.Dq primary +groups, and the supplementary groups as a set of group IDs. +Below, the +.Dq user +phrase implies that the real, effective and saved user IDs all have or are going +to be set to the same value. The +.Dq primary group +phrase is used similarly with respect to primary groups. +.Pp +The target process credentials have to be fully specified, either explicitly by +listing all attributes and their requested values, or indirectly by establishing +a baseline that provides a default value for each attribute, which can then be +amended by additional options. +.Pp +Possible baselines are either the full set of credentials established at login +for a specific named user, the current credentials, or the current credentials' +primary and supplementary groups which implies some user is specified +explicitly. +They are respectively established by using either option +.Fl u +with a named user argument, option +.Fl k , +or option .Fl i -option can be used to only call -.Fn setuid -and keep the group from the calling user. +in conjunction with +.Fl u +or no other options. +If no other option than +.Fl i +appears, a default of +.Fl u Cm root +is implied. +.Pp +The primary group can be set or amended with option +.Fl g , +whereas the supplementary groups can be either fully replaced with an explicit +list using option +.Fl G +or amended through set-like operations with option +.Fl s . +.Pp +Any of the individual real, effective and saved user and group IDs can be +overridden separately if desired through the options +.Fl -ruid , +.Fl -euid , +and +.Fl -svuid +for users, and +.Fl -rgid , +.Fl -egid , +and +.Fl -svgid +for groups respectively. +.Pp +The options are: +.Bl -tag -width indent +.It Fl -euid Ar user +Override the effective user. +As for +.Fl u , +.Ar user +may either be a name or a numerical ID. +.It Fl -egid Ar group +Override the effective group. +As for +.Fl g , +.Ar group +may either be a name or a numerical ID. +.It Fl G Ar group1,group2,... +Set or replace the full set of supplementary groups. +As for +.Fl g , +groups can be specified by name or numerical ID. +Groups must be separated by commas, and spaces around commas are not allowed. +.It Fl g Ar group +Set or amend the primary group. +.Ar group +may be the name of a group in the group database, else will be interpreted as +a numerical group ID. +.It Fl h +Display usage information and exit. +.It Fl i +Uses the current credentials' primary and supplementary groups as the baseline. +If no other option is present, the target user is assumed to be +.Dq root . +Otherwise, +.Fl u +or +.Fl k +must be specified. +.It Fl k +Use the current credentials as the baseline. +Incompatible with +.Fl u . +Implies +.Fl i . +.It Fl -ruid Ar user +Override the real user. +As for +.Fl u , +.Ar user +may either be a name or a numerical ID. +.It Fl -rgid Ar group +Override the real group. +As for +.Fl g , +.Ar group +may either be a name or a numerical ID. +.It Fl s Ar groups_mod1,groups_mod2,... +Incrementally modify the supplementary groups set. +The argument is a comma-separated list of directives: +.Bl -tag -width indent -compact +.It Cm @ +Reset the set to the empty set. +When present, must be the first directive. +.It Cm + Ns Ar group +Include a group. +.It Cm - Ns Ar group +Exclude a group. +.El +If +.Fl G +is also specified, +.Fl s +applies on the list installed by it. +In this case, the +.Cm @ +directive cannot be used +.Pq this limitation may be lifted in the future . +.It Fl -svuid Ar user +Override the saved user. +As for +.Fl u , +.Ar user +may either be a name or a numerical ID. +.It Fl -svgid Ar group +Override the saved group. +As for +.Fl g , +.Ar group +may either be a name or a numerical ID. +.It Fl u Ar user +Specify a target user. +If +.Ar user +is the name of some user in the user database, +this option establishes his full login credentials, as specified by the user and +group databases, as the baseline. +Else, +.Ar user +is interpreted as a numerical user ID, and that ID is used to set the target +user only. +.El +.Sh EXAMPLES +Run a command as another user: +.Bd -literal -offset indent +mdo -u alice id +.Ed +.Pp +Run with explicit primary and supplementary groups: +.Bd -literal -offset indent +mdo -u 1001 -g wheel -G staff,operator /bin/sh +.Ed +.Pp +Modify only supplementary groups for the current user: +.Bd -literal -offset indent +mdo -k -s +wheel,+operator /usr/bin/id +.Ed +.Pp +Emulate the effect of a set-user-ID bit on the process image file, assuming its +user ID is +.Dq root : +.Bd -literal -offset indent +mdo -k --euid root --svuid root id +.Ed .Sh SEE ALSO .Xr su 1 , +.Xr setcred 2 , .Xr mac_do 4 .Sh HISTORY The .Nm -command appeared in +command first appeared in .Fx 14.2 . +.Pp +Support for specifying or amending groups, group-only transitions and +fine-grained control of real, effective and saved variants of user and primary +group first appeared in +.Fx 15.0 . +.Sh AUTHORS +The +.Nm +program was originally created by +.An -nosplit +.An Baptiste Daroussin Aq Mt bapt@FreeBSD.org . +It was modified to use the +.Xr setcred 2 +system call by +.An Olivier Certner Aq Mt olce@FreeBSD.org , +who designed the group-related and fine-grained-control-of-target-credentials +functionalities and supervised +.An Kushagra Srivastava Aq Mt kushagra1403@gmail.com +to add them during Google Summer of Code 2025. +.Sh SECURITY CONSIDERATIONS +The +.Nm +program is geared to role-based scenarios. +Consequently, it does not ask for any password or request other form of +authentication before trying to establish new credentials, instead relying +solely on the requester's credentials for this purpose. +.Pp +Specific unprivileged uses may be enabled by using the +.Xr mac_do 4 +security policy. From nobody Thu Nov 27 02:18:51 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dH0V41M2hz6J6FD for ; Thu, 27 Nov 2025 02:18:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dH0V36Hhcz3FrL for ; Thu, 27 Nov 2025 02:18:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764209931; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=e2xi/ao9+BCRJbMC1OuTATX7l8zI+aLGyBB0wIEuskY=; b=fw9c4MqAQavpbN2bKZGgP+cwc2YXJ3qPODj7FqVM2ejZcDqcO2siHqTH6vwsQDv1bCxdiU t5pzRE04Het7HcTyQmQEPnT4QmGygwbiQossELOIZXVIySoyZZrrpG0aZ9vLaWGCtRaCL5 Fv/sRBV92hrXFaZCA5fiPWlAiUxa4soSWdfsMgEEE9l26pXWu9lxXnExaHBu7PT/HZnJw3 aiBFZx0rVul0CJVyGbSbVP3RXdN16vjgqoCZkX71Bx7MWNPjqytkADp6dzFfUmzWkEkhkU Td70lc2NRwpfcemZphpWj2WXYenzQLfQvfWc5eWOz3+EzzHAFtl823Kz1XArRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764209931; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=e2xi/ao9+BCRJbMC1OuTATX7l8zI+aLGyBB0wIEuskY=; b=l/SDpWBdIHpmB5puUsKKJ0259FoVqeOol9rWh2V4PGAjVBV9zY6gByoysCac6gtXecK9ME hd0xFlSjXkGyOtezasM/dvz0luNxCLVr+zO5vI5yRfToCQlKjx8baSIGPKPG8Jcvs6nUiS oZwrZ34e4CdZYPHLlCLC7dc0ZkgL932J3eKz3ZlmsFXxyuPOe9UEXJ7LxFd7WZuGoW6QSx dZIfAAiaTXL7bW2t5EkBFobWx6ju1JiSngOeZTRz8twHDNwEu4FiBHUN8zmDd6YQ5Ez2mm 1R8sXc5Dhp22T3gyctQbqb8Hty68xk8EH2yfJIBvoYY5b8yHAD8xCRPOMHMQPg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764209931; a=rsa-sha256; cv=none; b=HrKrnCLDNxHWzbQaWpyJTgsBE8J40enbZ0plue4/mU/VKimSXvc6BabuPVCQsxD9rS6D9s ugCYixUYhWHRrbA2z6ONbzULjnM0QouqXjnUuiCtMercCQXM8XNgalRrDxWqmc+YwKJVQ1 MYwqJ7XHnhqa+L9gsVTp4F5bjGFn5L//yPydK7oKjdDIa5wcXG5asYdHVs3dR2n+UVhf7S /Gi/xh0yu6XYSXIYlnjuJ+08HvWl+j6E8aRDc2gRyIZ5zAje7TPZ0nzp2dMCAEdfiGZfCT v/WaJMPJIgcOtlMKowP4Ua3yV6xGhPRkre0KquBVkm8NS/VAFSWfuauOHW4X8A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dH0V35Frrz1C6y for ; Thu, 27 Nov 2025 02:18:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2c780 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 27 Nov 2025 02:18:51 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ka Ho Ng Subject: git: 52c0749723bd - main - libsecureboot: do further checks on files without manifests List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: khng X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 52c0749723bd80017fb0c0487440762a783ad323 Auto-Submitted: auto-generated Date: Thu, 27 Nov 2025 02:18:51 +0000 Message-Id: <6927b50b.2c780.4b67f7f9@gitrepo.freebsd.org> The branch main has been updated by khng: URL: https://cgit.FreeBSD.org/src/commit/?id=52c0749723bd80017fb0c0487440762a783ad323 commit 52c0749723bd80017fb0c0487440762a783ad323 Author: Ka Ho Ng AuthorDate: 2025-11-27 02:17:14 +0000 Commit: Ka Ho Ng CommitDate: 2025-11-27 02:18:23 +0000 libsecureboot: do further checks on files without manifests verify_prep can return VE_FINGERPRINT_NONE. Consider such scenario so the VE_GEUSS heuristics works with files that likely will not have fingerprints in the manifest file. Obtained from: Hewlett Packard Enterprise Reviewed by: sjg MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D53940 --- lib/libsecureboot/verify_file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libsecureboot/verify_file.c b/lib/libsecureboot/verify_file.c index 753204a33b6a..ee263dafe774 100644 --- a/lib/libsecureboot/verify_file.c +++ b/lib/libsecureboot/verify_file.c @@ -539,7 +539,7 @@ verify_file(int fd, const char *filename, off_t off, int severity, return (0); if (rc != VE_FINGERPRINT_WRONG && loaded_manifests) { - if (rc != VE_NOT_CHECKED) + if (rc != VE_NOT_CHECKED && rc != VE_FINGERPRINT_NONE) return (rc); if (severity <= VE_GUESS) From nobody Thu Nov 27 04:43:16 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dH3hj0RZPz6JN4B for ; Thu, 27 Nov 2025 04:43:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dH3hh677fz3TPZ for ; Thu, 27 Nov 2025 04:43:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764218596; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ie/xAQgsiVjXrSu14xH3ge2apgFxXROK0iRKz4AzMXY=; b=Yr+bhyYEC58Z6j1JCmusVlwnHUVY9Ffis7r9W96wXGgtRoseBMg4LsustgH5VFlINAzo0E EyV7/GK3EspxNYrTdVQBASwl7Df1M4uieCPKKjkADPW0WTpK6KqKcCGt8mp8Vz/nww4hKK +U/F2C18cUwxJaksjgomNXl6JzxpH/+6uzNHoeuNnbQ567kniU3K/EdgJ9DBTVM6N3JOjF uQVpzWWbTWhMdWGCZpNUW0D8VBEo2Fmk/kbu7PDNCgEfm7q/8v3qqNO6kJIEQHKHxGW+lk NJWH83UeB7VLVrZpMMjdfGOl7eT/om4qV3C2ClIRfAzFwj9mip+uuhqOLZGR6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764218596; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ie/xAQgsiVjXrSu14xH3ge2apgFxXROK0iRKz4AzMXY=; b=wi0gucC1A98q1kPJ4WLz6dRlxmGc8b2JVfm4rZaxjg/2/3Qi+kss3M+pZCQ3vyaTSPpG+m LG8P2p7H7IGGMP8pO3HyqZtJyYirxZRoSMVJVt0EnFoMoVhJcK6IFhU+ARhJVVmyLP+OFS S0oHFyMd7DSTG0k7wE5QCw6/arLvaHJfSB0moGevlLJyBJVeyy49PEcObuMCf3pUXuvA8Q BJyiagFZ5JpJNEtg1UGe4h5gT4NYHZkVKnsEymFtXned0S1fMir2ynovONEX1X7IBYj5Yv mZI6UiiaHLCrWQndjhHIUQxGWlEExvld7lQDUJX6KZFSBgKdG8XV9SAwaBi/zg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764218596; a=rsa-sha256; cv=none; b=ac0RFiC3qzkLaUc2IGmSid0aOBvQgu/ONl3oJGPbNXKVvWyrpNyimGAJ3gvCKrZaMdXwhC bBRxCKoELRf+2LIz9yxoHo5/6B4QWJs7k+W6mu4ofu6UchdIZuRfmcbzuJbCwcExcg70nP 2+C1yRAXeI0hEstq8Ln+KLS6eFJduZOer0JkdbSx4XwQPFZL6OxdPl5H66p4clDWmCleoF LzdO+T4tM8nLaQrp3j0rV8BzKEsjxlAR6VZv+/kzJUr+j53TJwjUtaDm+zGw93ZhCeCF2j FCxcyeO/LbgiRAbdWt0OjIHKSDKLL4DDkjRdpalvye+utr7FnMZbuvjxwsMYwQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dH3hh5czYz1Gxn for ; Thu, 27 Nov 2025 04:43:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 39a4a by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 27 Nov 2025 04:43:16 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 7fe881e87b4a - main - loader: Note current autoboot_delay behavior List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7fe881e87b4a9a65bb5cbba0e4d6808639a55781 Auto-Submitted: auto-generated Date: Thu, 27 Nov 2025 04:43:16 +0000 Message-Id: <6927d6e4.39a4a.1060829a@gitrepo.freebsd.org> The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=7fe881e87b4a9a65bb5cbba0e4d6808639a55781 commit 7fe881e87b4a9a65bb5cbba0e4d6808639a55781 Author: Warner Losh AuthorDate: 2025-11-27 04:39:48 +0000 Commit: Warner Losh CommitDate: 2025-11-27 04:43:11 +0000 loader: Note current autoboot_delay behavior Some time ago, the boot loader stopped polling for a key press during the kernel and module loading prior to the transition to lua. Inspection of the code shows the polling is no longer there. Document the change. Sponsored by: Netflix --- stand/defaults/loader.conf.5 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/stand/defaults/loader.conf.5 b/stand/defaults/loader.conf.5 index 8c43bb62a135..5b2ce413db9d 100644 --- a/stand/defaults/loader.conf.5 +++ b/stand/defaults/loader.conf.5 @@ -21,7 +21,7 @@ .\" 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 September 2, 2025 +.Dd November 26, 2025 .Dt LOADER.CONF 5 .Os .Sh NAME @@ -94,8 +94,8 @@ are processed normally, using a 10 second delay. .Pp If set to .Dq Li 0 , -no delay is inserted, but any keys pressed while the kernel and modules are -loaded will enter interactive mode. +no delay will be inserted and the boot will proceed immediately unless a key +has already been pressed, which may be practically impossible. .Pp If set to .Dq Li -1 , From nobody Thu Nov 27 06:33:13 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dH67Y5YkYz6JYxD for ; Thu, 27 Nov 2025 06:33:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dH67Y4V0Bz3fg5 for ; Thu, 27 Nov 2025 06:33:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764225193; 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=izmbFjuShyNTOCckmmS+NQSmM4ypwPUAB6fMwtgpKyk=; b=gFmoz2mcC2UxttzPg6dfv0ktmOxh/QomwPC05Szlsn0stEufN43MQL0BvQHD2lbcdKeB1f Grh9g52HZef7BI3JJFm149brAFnTbk3XOpKBi7JHSXoDTJuf/kfbX1MHGtzX6+LQJsJZW1 jy1dnbkoO5eCQ1k5bvZDXpEB4g19ploUdqsfiWWm6oRcQbdOfdh/BCjuoTQkXuiSUFNmwc 7rXV1b02kYEApZlXYgqVctJfJh+U/PweGVfZppPPDj/7JpbvUNC9MoQNyVOn0yv3C0lDKl 9GChOYEOKOYVAo9O1Fx3tvFRpCj2n65B1FYhhAcf9RrOXOmZ/6lHPkWOc694xw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764225193; 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=izmbFjuShyNTOCckmmS+NQSmM4ypwPUAB6fMwtgpKyk=; b=lpSzrXWbtN+urEf52IGT3/GHtSlzLE+i0GZGoEEgG1ve1c+MMEo/wb2Qv3CCx2O0wIsU9j boH2KY/NTDwskFigd9UaZY3JznLfngi9Hvi9xbFhfFcDAVkdSocMRi2qlJCjP0tkWJs4Gw RbvIeZIx1xMuI4hgMFL4tZuRtEnMRSZ3uvDx8AIruW+hJ4qiKSy0oISagvaUQxKRKfbtlq aKJ4b3glvx+iNCYl6X7KJ3E4PY8n27ulJI/cPE8rPMZuNDBJ7ULpHlx/mw//JNPgWarOLg svJjdBq8yH4ppI9ybkvxeZPR9rzUCop8Tv1JcF5SEWdBoH4S0dcbgcMp2ASGlw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764225193; a=rsa-sha256; cv=none; b=O95LC0Y0ceUGp46t8aIKLRdi4x88lFpmR2abJjsW80orV+MqK7b1Yg8GVxuAaPhpyP2rzZ WUCfWd9o+lYDoSZEEdfwsTFeoa5EhMTnbq9P/Ia9UQOatTipdvrWxUR1obgIPTZpZaCgr+ 8yjpAmJjnoLQoytIVwFMRW+MAYj/Tu5fZBGwiUbjnZJd5gEspsmUeiNtKkrnSa6VxMcr68 9PK4/RU489+K2LbdZxYl2ZNoZLrpkpjLdIHmOcVkWBbcPzJvLXDoDxH5AV9XVg9vg6zf0/ TCQnnyQVqTxkCqlhRPYmhM4CEjXdV7NUHaRxa2wYIy0cVk03yzK6wKdLvUwsEA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dH67Y42wpz1KP8 for ; Thu, 27 Nov 2025 06:33:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id d49d by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 27 Nov 2025 06:33:13 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: ykla From: Warner Losh Subject: git: 2996c41ee89d - main - NOTES: fix typos and unify terminology in comments List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2996c41ee89dbd6426254457398f49572e9b425d Auto-Submitted: auto-generated Date: Thu, 27 Nov 2025 06:33:13 +0000 Message-Id: <6927f0a9.d49d.350eaf24@gitrepo.freebsd.org> The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=2996c41ee89dbd6426254457398f49572e9b425d commit 2996c41ee89dbd6426254457398f49572e9b425d Author: ykla AuthorDate: 2025-11-26 05:57:47 +0000 Commit: Warner Losh CommitDate: 2025-11-27 05:11:11 +0000 NOTES: fix typos and unify terminology in comments Signed-off-by: ykla yklaxds@gmail.com Sponsored by: Chinese FreeBSD Community Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1901 --- sys/conf/NOTES | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/sys/conf/NOTES b/sys/conf/NOTES index 8a11f8ec86b1..2ba211fa45c9 100644 --- a/sys/conf/NOTES +++ b/sys/conf/NOTES @@ -1848,9 +1848,9 @@ device nsphyter # NatSemi DP83843/DP83815 device pnaphy # HomePNA device qsphy # Quality Semiconductor QS6612 device rdcphy # RDC Semiconductor R6040 -device rgephy # RealTek 8169S/8110S/8211B/8211C -device rlphy # RealTek 8139 -device rlswitch # RealTek 8305 +device rgephy # Realtek 8169S/8110S/8211B/8211C +device rlphy # Realtek 8139 +device rlswitch # Realtek 8305 device smcphy # SMSC LAN91C111 device tdkphy # TDK 89Q2120 device truephy # LSI TruePHY @@ -1920,17 +1920,17 @@ device xmphy # XaQti XMAC II # EP-320G-TX and the Netgear GA622T. # oce: Emulex 10 Gbit adapters (OneConnect Ethernet) # ral: Ralink Technology IEEE 802.11 wireless adapter -# re: RealTek 8139C+/8169/816xS/811xS/8101E PCI/PCIe Ethernet adapter -# rl: Support for PCI fast ethernet adapters based on the RealTek 8129/8139 -# chipset. Note that the RealTek driver defaults to using programmed +# re: Realtek 8139C+/8169/816xS/811xS/8101E PCI/PCIe Ethernet adapter +# rl: Support for PCI fast ethernet adapters based on the Realtek 8129/8139 +# chipset. Note that the Realtek driver defaults to using programmed # I/O to do register accesses because memory mapped mode seems to cause # severe lockups on SMP hardware. This driver also supports the # Accton EN1207D `Cheetah' adapter, which uses a chip called -# the MPX 5030/5038, which is either a RealTek in disguise or a -# RealTek workalike. Note that the D-Link DFE-530TX+ uses the RealTek +# the MPX 5030/5038, which is either a Realtek in disguise or a +# Realtek workalike. Note that the D-Link DFE-530TX+ uses the Realtek # chipset and is supported by this driver, not the 'vr' driver. -# rtwn: RealTek wireless adapters. -# rtwnfw: RealTek wireless firmware. +# rtwn: Realtek wireless adapters. +# rtwnfw: Realtek wireless firmware. # sge: Silicon Integrated Systems SiS190/191 Fast/Gigabit Ethernet adapter # sis: Support for NICs based on the Silicon Integrated Systems SiS 900, # SiS 7016 and NS DP83815 PCI fast ethernet controller chips. @@ -1984,8 +1984,8 @@ device mlx5en # Mellanox ConnectX-4 and ConnectX-4 LX device msk # Marvell/SysKonnect Yukon II Gigabit Ethernet device my # Myson Fast Ethernet (MTD80X, MTD89X) device nge # NatSemi DP83820 gigabit Ethernet -device re # RealTek 8139C+/8169/8169S/8110S -device rl # RealTek 8129/8139 +device re # Realtek 8139C+/8169/8169S/8110S +device rl # Realtek 8129/8139 device sge # Silicon Integrated Systems SiS190/191 device sis # Silicon Integrated Systems SiS 900/SiS 7016 device sk # SysKonnect SK-984x & SK-982x gigabit Ethernet @@ -1998,8 +1998,8 @@ device xl # 3Com 3c90x (``Boomerang'', ``Cyclone'') # PCI/PCI-X/PCIe Ethernet NICs that use iflib infrastructure device iflib device em # Intel Pro/1000 Gigabit Ethernet -device ix # Intel Pro/10Gbe PCIE Ethernet -device ixv # Intel Pro/10Gbe PCIE Ethernet VF +device ix # Intel Pro/10GbE PCIE Ethernet +device ixv # Intel Pro/10GbE PCIE Ethernet VF # PCI Ethernet NICs. device cxgb # Chelsio T3 10 Gigabit Ethernet @@ -2008,7 +2008,7 @@ device cxgbe # Chelsio T4-T6 1/10/25/40/100 Gigabit Ethernet device cxgbev # Chelsio T4-T6 Virtual Functions device le # AMD Am7900 LANCE and Am79C9xx PCnet device mxge # Myricom Myri-10G 10GbE NIC -device oce # Emulex 10 GbE (OneConnect Ethernet) +device oce # Emulex 10GbE (OneConnect Ethernet) device ti # Alteon Networks Tigon I/II gigabit Ethernet # PCI IEEE 802.11 Wireless NICs @@ -2105,7 +2105,7 @@ device sound # snd_neomagic: Neomagic 256 AV/ZX PCI. # snd_solo: ESS Solo-1x PCI. # snd_spicds: SPI codec driver, needed by Envy24/Envy24HT drivers. -# snd_t4dwave: Trident 4DWave DX/NX PCI, Sis 7018 PCI and Acer Labs +# snd_t4dwave: Trident 4DWave DX/NX PCI, SiS 7018 PCI and Acer Labs # M5451 PCI. # snd_uaudio: USB audio. # snd_via8233: VIA VT8233x PCI. @@ -2552,14 +2552,14 @@ device cue # and 2104USB, and the Corega USB-T. device kue # -# RealTek RTL8150 USB to fast ethernet. Supports the Melco LUA-KTX +# Realtek RTL8150 USB to fast ethernet. Supports the Melco LUA-KTX # and the GREEN HOUSE GH-USB100B. device rue # # Davicom DM9601E USB to fast ethernet. Supports the Corega FEther USB-TXC. device udav # -# RealTek RTL8152/RTL8153 USB Ethernet driver +# Realtek RTL8152/RTL8153 USB Ethernet driver device ure # # Moschip MCS7730/MCS7840 USB to fast ethernet. Supports the Sitecom LN030. From nobody Thu Nov 27 06:33:14 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dH67Z64Zkz6JZ8W for ; Thu, 27 Nov 2025 06:33:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dH67Z5FDxz3fcn for ; Thu, 27 Nov 2025 06:33:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764225194; 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=QtGb+aHo4Xe9ovWX52yv4ldq4Wop3tKMSUCXqUSpyIk=; b=tt+4EiHtI5D17/OIeOPyeY1+egzoivXkKN4aZ/zIBA1cmOs4mefhxCv/oLU8ZDhoKFxWVU JPNuSSCaliUZ4IwsNVvlQF4rmhOr6Bu5Ni3YJr3o3JE67b5fb1a0Wr6tHe+3XbsHxvXSic EbBZgDA4gaz1kpy3LHrYiMPm1FFdaqQevyPCXuLHFEo/ewNF8Nsc2LeiFm1iABDjx/2JP1 kHaOpMZ0UT1j4n+OzQnh2C321MXbgVdfqFkft6xqZfOHona+61C+LMAk2aEERij4V2+VDy 7LSc56UTyTej75BEZjlNdST410bNXRPJIImpYMGiASTPxNW6zwPWsxFxmDXH+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764225194; 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=QtGb+aHo4Xe9ovWX52yv4ldq4Wop3tKMSUCXqUSpyIk=; b=ukDUJqCn/bJfRK6dNpJ60Ke1yfPxJfDInbw1/Z0QkHWCgTDu4LHjaKU/pwvgbM+T7rUJAv WaIucA5qgRJO5npfdFcyiL2LWMrXtMvmR5ORgZdkVGgCTtxFKVMBjq9rOCVVXPuokSf9sw /GRw1Xe+PkgL/VuUeWVn3eD41tVrl/9e/99y8z0OeAvXQZpYoitKx90NmDRGMUeVA8abVo dGMHeHrU47WeGcJH2xyRGvf5+T7EL+A160uv6Q/SDG+57dq1d+3LNaa8oGRt31tjGM7FQl OC1QzOU9CqF12ziwndNHGGr59DzD6x9dp1oVP+1ZV5zttqiaxCoOrkYMcW5mvA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764225194; a=rsa-sha256; cv=none; b=AAzx9pZKYLPU2GEQLgcYJYaLH//p111UTg48rVD+tQO4SnhodvOJNHklyKvzGUTlUFEoWS meh5dChMsdAfyg61im2qirrgjn5WxfpWbHxa5VtOVSwwfDgvaK7SrkMdxdX8RETVBe8cBH 0iJ5U34v6kO1AYCTw/YkvJz8e3e8gzXEMU4aRt4BBt5XBtcaUAgBxmzDxn4dqZOr9awl/Q Mym4kzp10dAyMdGrMUrb6Prgo4+Y9FNwsGlb0gs8kdEVBYphP+scO77NKihxXivuboqfUT Z/chCI1UHYuUW6D4I/63R/Z6HznOeKBP2OTwKIk0GNlSYnupN/ieA2jFoHH4xw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dH67Z4n0Hz1KV2 for ; Thu, 27 Nov 2025 06:33:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id afec by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 27 Nov 2025 06:33:14 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: ykla From: Warner Losh Subject: git: 5fd8a01e9b7c - main - man: RealTek -> Realtek List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5fd8a01e9b7c0fcf3ac0bab5cd137c9bbdda3341 Auto-Submitted: auto-generated Date: Thu, 27 Nov 2025 06:33:14 +0000 Message-Id: <6927f0aa.afec.722a4dab@gitrepo.freebsd.org> The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=5fd8a01e9b7c0fcf3ac0bab5cd137c9bbdda3341 commit 5fd8a01e9b7c0fcf3ac0bab5cd137c9bbdda3341 Author: ykla AuthorDate: 2025-11-26 08:43:52 +0000 Commit: Warner Losh CommitDate: 2025-11-27 06:19:22 +0000 man: RealTek -> Realtek Realtek changed how it styled its name 25 or so years ago, but the old style persisted in many places. These products use the new styling in their datasheets. Signed-off-by: ykla yklaxds@gmail.com Sponsored by: Chinese FreeBSD Community Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1901 --- share/man/man4/miibus.4 | 8 ++++---- share/man/man4/re.4 | 12 ++++++------ share/man/man4/rgephy.4 | 4 ++-- share/man/man4/rl.4 | 16 ++++++++-------- share/man/man4/rue.4 | 8 ++++---- 5 files changed, 24 insertions(+), 24 deletions(-) diff --git a/share/man/man4/miibus.4 b/share/man/man4/miibus.4 index f53abdb405f2..9291d3d84adc 100644 --- a/share/man/man4/miibus.4 +++ b/share/man/man4/miibus.4 @@ -86,11 +86,11 @@ NVIDIA nForce MCP Networking Adapter .It Xr nge 4 National Semiconductor DP83820/DP83821 Gigabit Ethernet .It Xr re 4 -RealTek 8139C+/8169/8169S/8110S +Realtek 8139C+/8169/8169S/8110S .It Xr rl 4 -RealTek 8129/8139 +Realtek 8129/8139 .It Xr rue 4 -RealTek RTL8150 USB To Fast Ethernet +Realtek RTL8150 USB To Fast Ethernet .It Xr sge 4 Silicon Integrated Systems SiS190/191 Ethernet .It Xr sis 4 @@ -106,7 +106,7 @@ Sundance/Tamarack TC9021 Gigabit Ethernet .It Xr udav 4 Davicom DM9601 USB Ethernet .It Xr ure 4 -RealTek RTL8152 USB To Fast Ethernet +Realtek RTL8152 USB To Fast Ethernet .It Xr vge 4 VIA VT612x PCI Gigabit Ethernet .It Xr vr 4 diff --git a/share/man/man4/re.4 b/share/man/man4/re.4 index ac33aa4c4e3c..980247af142d 100644 --- a/share/man/man4/re.4 +++ b/share/man/man4/re.4 @@ -33,7 +33,7 @@ .Os .Sh NAME .Nm re -.Nd "RealTek 8139C+/8169/816xS/811xS/8168/810xE/8111 PCI/PCIe Ethernet adapter driver" +.Nd "Realtek 8139C+/8169/816xS/811xS/8168/810xE/8111 PCI/PCIe Ethernet adapter driver" .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your @@ -52,7 +52,7 @@ if_re_load="YES" .Sh DESCRIPTION The .Nm -driver provides support for various NICs based on the RealTek RTL8139C+, +driver provides support for various NICs based on the Realtek RTL8139C+, RTL8169, RTL816xS, RTL811xS, RTL8168, RTL810xE and RTL8111 PCI and PCIe Ethernet controllers. .Pp @@ -115,7 +115,7 @@ or modes. .It Cm 1000baseTX Set 1000baseTX operation over twisted pair. -The RealTek gigE chips support 1000Mbps in +The Realtek gigE chips support 1000Mbps in .Cm full-duplex mode only. .\" .It Cm 1000baseSX @@ -142,7 +142,7 @@ For more information on configuring this device, see .Sh HARDWARE The .Nm -driver supports RealTek RTL8139C+, RTL8169, RTL816xS, RTL811xS, RTL8168, +driver supports Realtek RTL8139C+, RTL8169, RTL816xS, RTL811xS, RTL8168, RTL810xE and RTL8111 based Fast Ethernet and Gigabit Ethernet adapters including: .Pp .Bl -bullet -compact @@ -241,7 +241,7 @@ the network connection (cable). .Xr vlan 4 , .Xr ifconfig 8 .Rs -.%T RealTek Semiconductor RTL8139C+, RTL8169, RTL8169S and RTL8110S datasheets +.%T Realtek Semiconductor RTL8139C+, RTL8169, RTL8169S and RTL8110S datasheets .%U https://www.realtek.com .Re .Sh HISTORY @@ -281,7 +281,7 @@ The user should ensure the NIC is installed in a 32-bit PCI slot to avoid this problem. .Pp -The RealTek 8169, 8169S and 8110S chips appear to only be capable of +The Realtek 8169, 8169S and 8110S chips appear to only be capable of transmitting jumbo frames up to 7.5K in size. .Pp If this driver is causing problems then an updated driver from diff --git a/share/man/man4/rgephy.4 b/share/man/man4/rgephy.4 index 2cc655aacb18..2e3048a32894 100644 --- a/share/man/man4/rgephy.4 +++ b/share/man/man4/rgephy.4 @@ -28,7 +28,7 @@ .Os .Sh NAME .Nm rgephy -.Nd RealTek RTL8168/8169/8110/8211 series 10/100/1000 Gigabit Ethernet PHY driver +.Nd Realtek RTL8168/8169/8110/8211 series 10/100/1000 Gigabit Ethernet PHY driver .Sh SYNOPSIS To compile all available PHY drivers into the kernel, place the following line in your kernel configuration file: @@ -45,7 +45,7 @@ place the following lines in your kernel configuration file instead: .Sh DESCRIPTION The .Nm -driver supports the RealTek RTL8168, RTL8169, RTL8110 and RTL8211 series +driver supports the Realtek RTL8168, RTL8169, RTL8110 and RTL8211 series integrated 10/100/1000 Gigabit Ethernet PHYs. .Pp In order to get a list of media types and options supported by a specific diff --git a/share/man/man4/rl.4 b/share/man/man4/rl.4 index 9323e046a5e1..ba93b282ef73 100644 --- a/share/man/man4/rl.4 +++ b/share/man/man4/rl.4 @@ -33,7 +33,7 @@ .Os .Sh NAME .Nm rl -.Nd "RealTek 8129/8139 Fast Ethernet device driver" +.Nd "Realtek 8129/8139 Fast Ethernet device driver" .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your @@ -53,10 +53,10 @@ if_rl_load="YES" The .Nm driver provides support for PCI Ethernet adapters and embedded -controllers based on the RealTek 8129 and 8139 Fast Ethernet controller +controllers based on the Realtek 8129 and 8139 Fast Ethernet controller chips. .Pp -The RealTek 8129/8139 series controllers use bus master DMA but do not use a +The Realtek 8129/8139 series controllers use bus master DMA but do not use a descriptor-based data transfer mechanism. The receiver uses a single fixed size ring buffer from which packets must be copied @@ -86,7 +86,7 @@ driver supports the following media types: .It autoselect Enable autoselection of the media type and options. This is only -supported if the PHY chip attached to the RealTek controller +supported if the PHY chip attached to the Realtek controller supports NWAY autonegotiation. The user can manually override the autoselected mode by adding media options to the @@ -135,7 +135,7 @@ driver include: .It Accton .Dq Cheetah -EN1207D (MPX 5030/5038; RealTek 8139 clone) +EN1207D (MPX 5030/5038; Realtek 8139 clone) .It Allied Telesyn AT2550 .It @@ -259,7 +259,7 @@ the card should be configured correctly. .Xr polling 4 , .Xr ifconfig 8 .Rs -.%B The RealTek 8129, 8139 and 8139C+ datasheets +.%B The Realtek 8129, 8139 and 8139C+ datasheets .%U https://www.realtek.com .Re .Sh HISTORY @@ -284,7 +284,7 @@ longword aligned by definition. The driver probably should not be depending on this characteristic. .Pp -The RealTek data sheets are of especially poor quality, +The Realtek data sheets are of especially poor quality, and there is a lot of information missing particularly concerning the receiver operation. One particularly @@ -307,4 +307,4 @@ When the driver encounters this value, it knows that it has finished processing all currently available packets. Neither this magic value nor its significance are -documented anywhere in the RealTek data sheets. +documented anywhere in the Realtek data sheets. diff --git a/share/man/man4/rue.4 b/share/man/man4/rue.4 index c30d8ca2c757..b26acd575d65 100644 --- a/share/man/man4/rue.4 +++ b/share/man/man4/rue.4 @@ -28,7 +28,7 @@ .Os .Sh NAME .Nm rue -.Nd "RealTek RTL8150 USB to Fast Ethernet controller driver" +.Nd "Realtek RTL8150 USB to Fast Ethernet controller driver" .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your @@ -51,7 +51,7 @@ if_rue_load="YES" .Sh DESCRIPTION The .Nm -driver provides support for USB Ethernet adapters based on the RealTek +driver provides support for USB Ethernet adapters based on the Realtek RTL8150 USB to Fast Ethernet controller chip. .Pp The RTL8150 contains an integrated Fast Ethernet MAC, which supports @@ -107,7 +107,7 @@ For more information on configuring this device, see .Sh HARDWARE The .Nm -driver supports RealTek RTL8150 based USB Ethernet +driver supports Realtek RTL8150 based USB Ethernet adapters including: .Pp .Bl -bullet -compact @@ -138,7 +138,7 @@ The driver failed to allocate an mbuf for the receiver ring. .Xr ng_ether 4 , .Xr ifconfig 8 .Rs -.%T "RealTek RTL8150 data sheet" +.%T "Realtek RTL8150 data sheet" .%U http://pdf.seekdatasheet.com/2008714/200807142333305235.pdf .Re .Sh HISTORY From nobody Thu Nov 27 06:33:15 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dH67c0lJ1z6JZ8Z for ; Thu, 27 Nov 2025 06: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dH67b5jS8z3fxF for ; Thu, 27 Nov 2025 06:33:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764225195; 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=/oGYLMnECIL5KrF3TSdgaP1+Lw7+7YpLkQ9bbIIq0Bk=; b=IX8LRJ2wjDjQ/cwv+vaVqVbzGg/Vf54WVVAxZXmljf5Y6gaXBJd90RY5qvqIKgWXMLDaGm LD+deSBfPVnpLXC2nDRSu6nGqCigpZzx1HDZm4+lKc+OKSWHnhREV1LSd3v0N0yD6aAZMC l/ptd2kkqaUUP34bf+HHHlEDrPQ5NX2HPYzrs+zpduIAK1x1EaT6haG2ZxrbQOaL+bPN+k WvKkMyEB1Ofr2snE+91IXMymUsKxUNKszEXGy+aZZjSV9rCKotHq6sw+SSXX0ARUNo7Cf3 XpXz1n7wuxJUDXEIg/meIW26W6u2S8fgkvoA8HeoaUQkvwYRkOD7M1B4iOHrjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764225195; 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=/oGYLMnECIL5KrF3TSdgaP1+Lw7+7YpLkQ9bbIIq0Bk=; b=EW9Lg7m4W8n5ccRFMS9ZthzPMDzUQLCLlEG3+m2H+GYbAN4sx0gCDxVeg+GmyWXFBYzpAO xDkHsg4Upmmhp1vsHW9Czxm3jFG/7lNqh7eCIZh9V+DZYOiOIf2mVuOjZJKpZutG6uNkqG VlLN+j6/HHpSkl3jhtLYxUQFOWeWDkfcT3x5bggKnm9av1poGxmDC2y1X33peuu5xkfxFv HX3oRyRUjKjl772lDGaYpuOqlV1ghUzAeBPZPwg9z8TYMEATjrP1s/UjsTBBbP5JrYKdlI VYfttIB92bKxtx5p1EGnQhzxLeMOSknNPkApLQs33zS5CmhMyCuXD3OSKFwbGQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764225195; a=rsa-sha256; cv=none; b=FPjL6ieQhEtELmSrIJFb+eOQx/bBje4cx02HWbIVjsGj6lrPiM7j0AeE8FCo0eTWxJT9wo dHLmFRFnPKxfabzMvMZp8RKhP70x4jKtdn7Z+TIa20NNU65xIiKyHcVGoJsgUawH6Kcylh 6TEU0Paad8wYaFyXF+bgPvJhBQWzuCw2AkHqXnulR5DN/PO8CTbikhn2LtKswGr4YwzBzs 5UQVF108uyXtXOBUBUVq4eKf1rfLzWGUJBM/lUNOggImxoKJsxzrbq3jHZdLRstfiCQ+bB Pae/xrtqDbRz1QruYGg2typQ8/5TcaCTSZMG1oakcmPJATNuL4c6E1QXsWa7zQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dH67b5Gfzz1KXh for ; Thu, 27 Nov 2025 06:33:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id aff1 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 27 Nov 2025 06:33:15 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: ykla From: Warner Losh Subject: git: 8cbe0dd5097f - main - sys: RealTek -> Realtek List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8cbe0dd5097fbcbfbfbba50b016ec48352892ca7 Auto-Submitted: auto-generated Date: Thu, 27 Nov 2025 06:33:15 +0000 Message-Id: <6927f0ab.aff1.43f4037a@gitrepo.freebsd.org> The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=8cbe0dd5097fbcbfbfbba50b016ec48352892ca7 commit 8cbe0dd5097fbcbfbfbba50b016ec48352892ca7 Author: ykla AuthorDate: 2025-11-26 09:02:25 +0000 Commit: Warner Losh CommitDate: 2025-11-27 06:19:26 +0000 sys: RealTek -> Realtek Realtek changed how it styled its name 25 or so years ago, but the old style persisted in many places. These products use the new styling in their datasheets. Signed-off-by: ykla yklaxds@gmail.com Sponsored by: Chinese FreeBSD Community Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1901 --- sys/amd64/conf/GENERIC | 4 ++-- sys/arm/conf/GENERIC | 2 +- sys/arm/conf/TEGRA124 | 4 ++-- sys/arm64/conf/std.nvidia | 2 +- sys/arm64/iommu/smmu_quirks.c | 2 +- sys/dev/ale/if_ale.c | 2 +- sys/dev/mii/miidevs | 8 ++++---- sys/dev/mii/rgephy.c | 6 +++--- sys/dev/mii/rgephyreg.h | 2 +- sys/dev/mii/rlphy.c | 18 +++++++++--------- sys/dev/mii/rlswitch.c | 2 +- sys/dev/re/if_re.c | 36 ++++++++++++++++++------------------ sys/dev/rl/if_rl.c | 32 ++++++++++++++++---------------- sys/dev/rl/if_rlreg.h | 10 +++++----- sys/dev/usb/net/if_axe.c | 2 +- sys/dev/usb/net/if_rue.c | 2 +- sys/dev/usb/net/ruephy.c | 8 ++++---- sys/i386/conf/GENERIC | 4 ++-- sys/powerpc/conf/GENERIC64 | 4 ++-- sys/powerpc/conf/GENERIC64LE | 4 ++-- 20 files changed, 77 insertions(+), 77 deletions(-) diff --git a/sys/amd64/conf/GENERIC b/sys/amd64/conf/GENERIC index 4e710e47fdae..ef7ce215474e 100644 --- a/sys/amd64/conf/GENERIC +++ b/sys/amd64/conf/GENERIC @@ -271,8 +271,8 @@ device lge # Level 1 LXT1001 gigabit Ethernet device msk # Marvell/SysKonnect Yukon II Gigabit Ethernet device nfe # nVidia nForce MCP on-board Ethernet device nge # NatSemi DP83820 gigabit Ethernet -device re # RealTek 8139C+/8169/8169S/8110S -device rl # RealTek 8129/8139 +device re # Realtek 8139C+/8169/8169S/8110S +device rl # Realtek 8129/8139 device sge # Silicon Integrated Systems SiS190/191 device sis # Silicon Integrated Systems SiS 900/SiS 7016 device sk # SysKonnect SK-984x & SK-982x gigabit Ethernet diff --git a/sys/arm/conf/GENERIC b/sys/arm/conf/GENERIC index 89841947713d..b0a2eb92554b 100644 --- a/sys/arm/conf/GENERIC +++ b/sys/arm/conf/GENERIC @@ -100,7 +100,7 @@ device pci device pci_host_generic # PCI NICs -device re # RealTek 8139C+/8169/8169S/8110S +device re # Realtek 8139C+/8169/8169S/8110S # VirtIO device virtio diff --git a/sys/arm/conf/TEGRA124 b/sys/arm/conf/TEGRA124 index ff23e63f77bd..86462841f24e 100644 --- a/sys/arm/conf/TEGRA124 +++ b/sys/arm/conf/TEGRA124 @@ -98,7 +98,7 @@ device ums # USB mouse #device cdce # Generic USB over Ethernet #device cue # CATC USB Ethernet #device kue # Kawasaki LSI USB Ethernet -#device rue # RealTek RTL8150 USB Ethernet +#device rue # Realtek RTL8150 USB Ethernet #device udav # Davicom DM9601E USB # USB Wireless @@ -117,7 +117,7 @@ device pci # PCI Ethernet NICs that use the common MII bus controller code. # NOTE: Be sure to keep the 'device miibus' line in order to use these NICs! -device re # RealTek 8139C+/8169/8169S/8110S +device re # Realtek 8139C+/8169/8169S/8110S # DRM2 device fbd diff --git a/sys/arm64/conf/std.nvidia b/sys/arm64/conf/std.nvidia index fa12fdf8b90d..907da1c8c38c 100644 --- a/sys/arm64/conf/std.nvidia +++ b/sys/arm64/conf/std.nvidia @@ -10,7 +10,7 @@ device uart_ns8250 # ns8250-type UART driver device uart_snps # Ethernet NICs -device re # RealTek 8139C+/8169/8169S/8110S +device re # Realtek 8139C+/8169/8169S/8110S # USB support device tegra210_xusb_fw # Tegra XUSB firmware diff --git a/sys/arm64/iommu/smmu_quirks.c b/sys/arm64/iommu/smmu_quirks.c index 8e8e9ab28c9f..a63f3571fd69 100644 --- a/sys/arm64/iommu/smmu_quirks.c +++ b/sys/arm64/iommu/smmu_quirks.c @@ -56,7 +56,7 @@ struct smmu_quirk_entry { /* List of events that are known and will be silenced. */ static const struct smmu_quirk_entry smmu_quirk_table[] = { - { 0x10ec, 0x8168, "RealTek 8168/8111", 0x10 /* F_TRANSLATION */, 0x0 }, + { 0x10ec, 0x8168, "Realtek 8168/8111", 0x10 /* F_TRANSLATION */, 0x0 }, { 0, 0, NULL, 0, 0 }, }; diff --git a/sys/dev/ale/if_ale.c b/sys/dev/ale/if_ale.c index 09e0820d2c74..0c84575d6754 100644 --- a/sys/dev/ale/if_ale.c +++ b/sys/dev/ale/if_ale.c @@ -2452,7 +2452,7 @@ ale_rxeof(struct ale_softc *sc, int count) * reproduce this and I doubt it could be related * with FIFO overflow of hardware or activity of Tx * CMB updates. I also remember similar behaviour - * seen on RealTek 8139 which uses resembling Rx + * seen on Realtek 8139 which uses resembling Rx * scheme. */ if (bootverbose) diff --git a/sys/dev/mii/miidevs b/sys/dev/mii/miidevs index 5c10fd0f0224..ca7e78a1cdd5 100644 --- a/sys/dev/mii/miidevs +++ b/sys/dev/mii/miidevs @@ -69,7 +69,7 @@ oui NATSEMI 0x080017 National Semiconductor oui PMCSIERRA 0x00e004 PMC-Sierra oui QUALSEMI 0x006051 Quality Semiconductor oui RDC 0x00d02d RDC Semiconductor -oui REALTEK 0x00e04c RealTek Semicondctor +oui REALTEK 0x00e04c Realtek Semicondctor oui SEEQ 0x00a07d Seeq Technology oui SIS 0x00e006 Silicon Integrated Systems oui SMC 0x00800f SMC @@ -109,8 +109,8 @@ oui yyDAVICOM 0x000602 Davicom Semiconductor oui xxICPLUS 0x0009c3 IC Plus Corp. oui xxPMCSIERRA 0x0009c0 PMC-Sierra oui xxPMCSIERRA2 0x009057 PMC-Sierra -oui xxREALTEK 0x000732 RealTek Semicondctor -oui yyREALTEK 0x000004 RealTek Semicondctor +oui xxREALTEK 0x000732 Realtek Semicondctor +oui yyREALTEK 0x000004 Realtek Semicondctor oui xxTI 0x100014 Texas Instruments /* @@ -325,7 +325,7 @@ model xxQUALSEMI QS6612 0x0000 QS6612 10/100 media interface model RDC R6040 0x0003 R6040 10/100 media interface model RDC R6040_2 0x0005 R6040 10/100 media interface -/* RealTek Semicondctor PHYs */ +/* Realtek Semicondctor PHYs */ model yyREALTEK RTL8201L 0x0020 RTL8201L 10/100 media interface model xxREALTEK RTL8169S 0x0011 RTL8169S/8110S/8211 1000BASE-T media interface model REALTEK RTL8305SC 0x0005 RTL8305SC 10/100 802.1q switch diff --git a/sys/dev/mii/rgephy.c b/sys/dev/mii/rgephy.c index 4ff86c8c8ccb..32559517680a 100644 --- a/sys/dev/mii/rgephy.c +++ b/sys/dev/mii/rgephy.c @@ -34,7 +34,7 @@ #include /* - * Driver for the RealTek 8169S/8110S/8211B/8211C internal 10/100/1000 PHY. + * Driver for the Realtek 8169S/8110S/8211B/8211C internal 10/100/1000 PHY. */ #include @@ -263,7 +263,7 @@ setit: /* * Callback if something changed. Note that we need to poke - * the DSP on the RealTek PHYs if the media changes. + * the DSP on the Realtek PHYs if the media changes. * */ if (sc->mii_media_active != mii->mii_media_active || @@ -459,7 +459,7 @@ rgephy_loop(struct mii_softc *sc) PHY_WRITE(x, y, (PHY_READ(x, y) & ~(z))) /* - * Initialize RealTek PHY per the datasheet. The DSP in the PHYs of + * Initialize Realtek PHY per the datasheet. The DSP in the PHYs of * existing revisions of the 8169S/8110S chips need to be tuned in * order to reliably negotiate a 1000Mbps link. This is only needed * for rev 0 and rev 1 of the PHY. Later versions work without diff --git a/sys/dev/mii/rgephyreg.h b/sys/dev/mii/rgephyreg.h index fef985ebe30e..89a862734f33 100644 --- a/sys/dev/mii/rgephyreg.h +++ b/sys/dev/mii/rgephyreg.h @@ -41,7 +41,7 @@ #define RGEPHY_8211FVD 8 /* - * RealTek 8169S/8110S gigE PHY registers + * Realtek 8169S/8110S gigE PHY registers */ #define RGEPHY_MII_BMCR 0x00 diff --git a/sys/dev/mii/rlphy.c b/sys/dev/mii/rlphy.c index 71b9dc63f839..094fff438a56 100644 --- a/sys/dev/mii/rlphy.c +++ b/sys/dev/mii/rlphy.c @@ -34,7 +34,7 @@ #include /* - * driver for RealTek 8139 internal PHYs + * driver for Realtek 8139 internal PHYs */ #include @@ -82,11 +82,11 @@ static int rlphy_service(struct mii_softc *, struct mii_data *, int); static void rlphy_status(struct mii_softc *); /* - * RealTek internal PHYs don't have vendor/device ID registers; + * Realtek internal PHYs don't have vendor/device ID registers; * re(4) and rl(4) fake up a return value of all zeros. */ static const struct mii_phydesc rlintphys[] = { - { 0, 0, "RealTek internal media interface" }, + { 0, 0, "Realtek internal media interface" }, MII_PHY_END }; @@ -122,7 +122,7 @@ rlphy_attach(device_t dev) { /* - * The RealTek PHY can never be isolated. + * The Realtek PHY can never be isolated. */ mii_phy_dev_attach(dev, MIIF_NOISOLATE | MIIF_NOMANPAUSE, &rlphy_funcs, 1); @@ -143,7 +143,7 @@ rlphy_service(struct mii_softc *sc, struct mii_data *mii, int cmd) case MII_TICK: /* - * The RealTek PHY's autonegotiation doesn't need to be + * The Realtek PHY's autonegotiation doesn't need to be * kicked; it continues in the background. */ break; @@ -222,20 +222,20 @@ rlphy_status(struct mii_softc *phy) */ /* - * The RealTek PHY supports non-NWAY link speed + * The Realtek PHY supports non-NWAY link speed * detection, however it does not report the link * detection results via the ANLPAR or BMSR registers. - * (What? RealTek doesn't do things the way everyone + * (What? Realtek doesn't do things the way everyone * else does? I'm just shocked, shocked I tell you.) * To determine the link speed, we have to do one * of two things: * - * - If this is a standalone RealTek RTL8201(L) or + * - If this is a standalone Realtek RTL8201(L) or * workalike PHY, we can determine the link speed by * testing bit 0 in the magic, vendor-specific register * at offset 0x19. * - * - If this is a RealTek MAC with integrated PHY, we + * - If this is a Realtek MAC with integrated PHY, we * can test the 'SPEED10' bit of the MAC's media status * register. */ diff --git a/sys/dev/mii/rlswitch.c b/sys/dev/mii/rlswitch.c index 653751df0f4c..fad2aaa64d4c 100644 --- a/sys/dev/mii/rlswitch.c +++ b/sys/dev/mii/rlswitch.c @@ -35,7 +35,7 @@ #include /* - * driver for RealTek 8305 pseudo PHYs + * driver for Realtek 8305 pseudo PHYs */ #include diff --git a/sys/dev/re/if_re.c b/sys/dev/re/if_re.c index d56c975a43d2..50e7e1cad16c 100644 --- a/sys/dev/re/if_re.c +++ b/sys/dev/re/if_re.c @@ -34,7 +34,7 @@ #include /* - * RealTek 8139C+/8169/8169S/8110S/8168/8111/8101E PCI NIC driver + * Realtek 8139C+/8169/8169S/8110S/8168/8111/8101E PCI NIC driver * * Written by Bill Paul * Senior Networking Software Engineer @@ -42,7 +42,7 @@ */ /* - * This driver is designed to support RealTek's next generation of + * This driver is designed to support Realtek's next generation of * 10/100 and 10/100/1000 PCI ethernet controllers. There are currently * seven devices in this family: the RTL8139C+, the RTL8169, the RTL8169S, * RTL8110S, the RTL8168, the RTL8111 and the RTL8101E. @@ -97,7 +97,7 @@ * (the 'S' stands for 'single-chip'). These devices have the same * programming API as the older 8169, but also have some vendor-specific * registers for the on-board PHY. The 8110S is a LAN-on-motherboard - * part designed to be pin-compatible with the RealTek 8100 10/100 chip. + * part designed to be pin-compatible with the Realtek 8100 10/100 chip. * * This driver takes advantage of the RX and TX checksum offload and * VLAN tag insertion/extraction features. It also implements TX @@ -179,21 +179,21 @@ static const struct rl_type re_devs[] = { { DLINK_VENDORID, DLINK_DEVICEID_530T_REVC, 0, "D-Link DGE-530(T) Gigabit Ethernet Adapter" }, { RT_VENDORID, RT_DEVICEID_2600, 0, - "RealTek Killer E2600 Gigabit Ethernet Controller" }, + "Realtek Killer E2600 Gigabit Ethernet Controller" }, { RT_VENDORID, RT_DEVICEID_8139, 0, - "RealTek 8139C+ 10/100BaseTX" }, + "Realtek 8139C+ 10/100BaseTX" }, { RT_VENDORID, RT_DEVICEID_8101E, 0, - "RealTek 810xE PCIe 10/100baseTX" }, + "Realtek 810xE PCIe 10/100baseTX" }, { RT_VENDORID, RT_DEVICEID_8168, 0, - "RealTek 8168/8111 B/C/CP/D/DP/E/F/G PCIe Gigabit Ethernet" }, + "Realtek 8168/8111 B/C/CP/D/DP/E/F/G PCIe Gigabit Ethernet" }, { RT_VENDORID, RT_DEVICEID_8161, 0, - "RealTek 8168 Gigabit Ethernet" }, + "Realtek 8168 Gigabit Ethernet" }, { NCUBE_VENDORID, RT_DEVICEID_8168, 0, "TP-Link TG-3468 v2 (RTL8168) Gigabit Ethernet" }, { RT_VENDORID, RT_DEVICEID_8169, 0, - "RealTek 8169/8169S/8169SB(L)/8110S/8110SB(L) Gigabit Ethernet" }, + "Realtek 8169/8169S/8169SB(L)/8110S/8110SB(L) Gigabit Ethernet" }, { RT_VENDORID, RT_DEVICEID_8169SC, 0, - "RealTek 8169SC/8110SC Single-chip Gigabit Ethernet" }, + "Realtek 8169SC/8110SC Single-chip Gigabit Ethernet" }, { COREGA_VENDORID, COREGA_DEVICEID_CGLAPCIGT, 0, "Corega CG-LAPCIGT (RTL8169S) Gigabit Ethernet" }, { LINKSYS_VENDORID, LINKSYS_DEVICEID_EG1032, 0, @@ -647,7 +647,7 @@ re_miibus_statchg(device_t dev) } } /* - * RealTek controllers do not provide any interface to the RX/TX + * Realtek controllers do not provide any interface to the RX/TX * MACs for resolved speed, duplex and flow-control parameters. */ } @@ -703,7 +703,7 @@ re_set_rxmode(struct rl_softc *sc) if (hashes[0] != 0 || hashes[1] != 0) { /* - * For some unfathomable reason, RealTek decided to + * For some unfathomable reason, Realtek decided to * reverse the order of the multicast hash registers * in the PCI Express parts. This means we have to * write the hash pattern in reverse order for those @@ -932,7 +932,7 @@ done: #endif /* - * Probe for a RealTek 8139C+/8169/8110 chip. Check the PCI vendor and device + * Probe for a Realtek 8139C+/8169/8110 chip. Check the PCI vendor and device * IDs against our list and return a device name if we find a match. */ static int @@ -1007,9 +1007,9 @@ re_allocmem(device_t dev, struct rl_softc *sc) /* * Allocate the parent bus DMA tag appropriate for PCI. * In order to use DAC, RL_CPLUSCMD_PCI_DAC bit of RL_CPLUS_CMD - * register should be set. However some RealTek chips are known + * register should be set. However some Realtek chips are known * to be buggy on DAC handling, therefore disable DAC by limiting - * DMA address space to 32bit. PCIe variants of RealTek chips + * DMA address space to 32bit. PCIe variants of Realtek chips * may not have the limitation. */ lowaddr = BUS_SPACE_MAXADDR; @@ -1957,7 +1957,7 @@ re_newbuf(struct rl_softc *sc, int idx) #ifdef RE_FIXUP_RX /* * This is part of an evil trick to deal with non-x86 platforms. - * The RealTek chip requires RX buffers to be aligned on 64-bit + * The Realtek chip requires RX buffers to be aligned on 64-bit * boundaries, but that will hose non-x86 machines. To get around * this, we leave some empty space at the start of each buffer * and for non-x86 hosts, we copy the buffer back six bytes @@ -2242,7 +2242,7 @@ re_rxeof(struct rl_softc *sc, int *rx_npktsp) * it is 13 bits (since the max RX frame length is 16K). * Unfortunately, all 32 bits in the status word * were already used, so to make room for the extra - * length bit, RealTek took out the 'frame alignment + * length bit, Realtek took out the 'frame alignment * error' bit and shifted the other status bits * over one slot. The OWN, EOR, FS and LS bits are * still in the same places. We have already extracted @@ -2742,7 +2742,7 @@ re_encap(struct rl_softc *sc, struct mbuf **m_head) M_ASSERTPKTHDR((*m_head)); /* - * With some of the RealTek chips, using the checksum offload + * With some of the Realtek chips, using the checksum offload * support in conjunction with the autopadding feature results * in the transmission of corrupt frames. For example, if we * need to send a really small IP fragment that's less than 60 diff --git a/sys/dev/rl/if_rl.c b/sys/dev/rl/if_rl.c index c045e57fb79a..09ed88cd6d82 100644 --- a/sys/dev/rl/if_rl.c +++ b/sys/dev/rl/if_rl.c @@ -32,10 +32,10 @@ #include /* - * RealTek 8129/8139 PCI NIC driver + * Realtek 8129/8139 PCI NIC driver * * Supports several extremely cheap PCI 10/100 adapters based on - * the RealTek chipset. Datasheets can be obtained from + * the Realtek chipset. Datasheets can be obtained from * www.realtek.com.tw. * * Written by Bill Paul @@ -43,7 +43,7 @@ * Columbia University, New York City */ /* - * The RealTek 8139 PCI NIC redefines the meaning of 'low end.' This is + * The Realtek 8139 PCI NIC redefines the meaning of 'low end.' This is * probably the worst PCI ethernet controller ever made, with the possible * exception of the FEAST chip made by SMC. The 8139 supports bus-master * DMA, but it has a terrible interface that nullifies any performance @@ -132,15 +132,15 @@ MODULE_DEPEND(rl, miibus, 1, 1, 1); */ static const struct rl_type rl_devs[] = { { RT_VENDORID, RT_DEVICEID_8129, RL_8129, - "RealTek 8129 10/100BaseTX" }, + "Realtek 8129 10/100BaseTX" }, { RT_VENDORID, RT_DEVICEID_8139, RL_8139, - "RealTek 8139 10/100BaseTX" }, + "Realtek 8139 10/100BaseTX" }, { RT_VENDORID, RT_DEVICEID_8139D, RL_8139, - "RealTek 8139 10/100BaseTX" }, + "Realtek 8139 10/100BaseTX" }, { RT_VENDORID, RT_DEVICEID_8138, RL_8139, - "RealTek 8139 10/100BaseTX CardBus" }, + "Realtek 8139 10/100BaseTX CardBus" }, { RT_VENDORID, RT_DEVICEID_8100, RL_8139, - "RealTek 8100 10/100BaseTX" }, + "Realtek 8100 10/100BaseTX" }, { ACCTON_VENDORID, ACCTON_DEVICEID_5030, RL_8139, "Accton MPX 5030/5038 10/100BaseTX" }, { DELTA_VENDORID, DELTA_DEVICEID_8139, RL_8139, @@ -499,7 +499,7 @@ rl_miibus_statchg(device_t dev) } } /* - * RealTek controllers do not provide any interface to + * Realtek controllers do not provide any interface to * Tx/Rx MACs for resolved speed, duplex and flow-control * parameters. */ @@ -577,7 +577,7 @@ rl_reset(struct rl_softc *sc) } /* - * Probe for a RealTek 8129/8139 chip. Check the PCI vendor and device + * Probe for a Realtek 8129/8139 chip. Check the PCI vendor and device * IDs against our list and return a device name if we find a match. */ static int @@ -669,7 +669,7 @@ rl_attach(device_t dev) * there appear to be problems with memory mapped mode: it looks * like doing too many memory mapped access back to back in rapid * succession can hang the bus. I'm inclined to blame this on - * crummy design/construction on the part of RealTek. Memory + * crummy design/construction on the part of Realtek. Memory * mapped mode does appear to work on uniprocessor systems though. */ prefer_iomap = 1; @@ -1143,11 +1143,11 @@ rl_rxeof(struct rl_softc *sc) /* * Here's a totally undocumented fact for you. When the - * RealTek chip is in the process of copying a packet into + * Realtek chip is in the process of copying a packet into * RAM for you, the length will be 0xfff0. If you spot a * packet header with this value, you need to stop. The * datasheet makes absolutely no mention of this and - * RealTek should be shot for this. + * Realtek should be shot for this. */ total_len = rxstat >> 16; if (total_len == RL_RXSTAT_UNFINISHED) @@ -1166,7 +1166,7 @@ rl_rxeof(struct rl_softc *sc) rx_bytes += total_len + 4; /* - * XXX The RealTek chip includes the CRC with every + * XXX The Realtek chip includes the CRC with every * received frame, and there's no way to turn this * behavior off (at least, I can't find anything in * the manual that explains how to do it) so we have @@ -1288,7 +1288,7 @@ rl_twister_update(struct rl_softc *sc) { uint16_t linktest; /* - * Table provided by RealTek (Kinston ) for + * Table provided by Realtek (Kinston ) for * Linux driver. Values undocumented otherwise. */ static const uint32_t param[4][4] = { @@ -1551,7 +1551,7 @@ rl_encap(struct rl_softc *sc, struct mbuf **m_head) if (m->m_pkthdr.len < RL_MIN_FRAMELEN) padlen = RL_MIN_FRAMELEN - m->m_pkthdr.len; /* - * The RealTek is brain damaged and wants longword-aligned + * The Realtek is brain damaged and wants longword-aligned * TX buffers, plus we can only have one fragment buffer * per packet. We have to copy pretty much all the time. */ diff --git a/sys/dev/rl/if_rlreg.h b/sys/dev/rl/if_rlreg.h index 6339b12472b6..10e25fcb5373 100644 --- a/sys/dev/rl/if_rlreg.h +++ b/sys/dev/rl/if_rlreg.h @@ -31,7 +31,7 @@ */ /* - * RealTek 8129/8139 register offsets + * Realtek 8129/8139 register offsets */ #define RL_IDR0 0x0000 /* ID register 0 (station addr) */ #define RL_IDR1 0x0001 /* Must use 32-bit accesses (?) */ @@ -544,7 +544,7 @@ #define RL_GMEDIASTAT_TBI 0x80 /* TBI enabled */ /* - * The RealTek doesn't use a fragment-based descriptor mechanism. + * The Realtek doesn't use a fragment-based descriptor mechanism. * Instead, there are only four register sets, each of which represents * one 'descriptor.' Basically, each TX descriptor is just a contiguous * packet buffer (32-bit aligned!) and we place the buffer addresses in @@ -801,7 +801,7 @@ struct rl_stats { #define RL_ADDR_HI(y) ((uint64_t) (y) >> 32) /* - * The number of bits reserved for MSS in RealTek controllers is + * The number of bits reserved for MSS in Realtek controllers is * 11bits. This limits the maximum interface MTU size in TSO case * as upper stack should not generate TCP segments with MSS greater * than the limit. @@ -985,12 +985,12 @@ struct rl_softc { /* * General constants that are fun to know. * - * RealTek PCI vendor ID + * Realtek PCI vendor ID */ #define RT_VENDORID 0x10EC /* - * RealTek chip device IDs. + * Realtek chip device IDs. */ #define RT_DEVICEID_2600 0x2600 #define RT_DEVICEID_8139D 0x8039 diff --git a/sys/dev/usb/net/if_axe.c b/sys/dev/usb/net/if_axe.c index 117a3daa170f..38690931c13e 100644 --- a/sys/dev/usb/net/if_axe.c +++ b/sys/dev/usb/net/if_axe.c @@ -49,7 +49,7 @@ /* * The AX88172 provides USB ethernet supports at 10 and 100Mbps. - * It uses an external PHY (reference designs use a RealTek chip), + * It uses an external PHY (reference designs use a Realtek chip), * and has a 64-bit multicast hash filter. There is some information * missing from the manual which one needs to know in order to make * the chip function: diff --git a/sys/dev/usb/net/if_rue.c b/sys/dev/usb/net/if_rue.c index d1b46887cd20..37512d902b4f 100644 --- a/sys/dev/usb/net/if_rue.c +++ b/sys/dev/usb/net/if_rue.c @@ -59,7 +59,7 @@ */ /* - * RealTek RTL8150 USB to fast ethernet controller driver. + * Realtek RTL8150 USB to fast ethernet controller driver. * Datasheet is available from * ftp://ftp.realtek.com.tw/lancard/data_sheet/8150/. */ diff --git a/sys/dev/usb/net/ruephy.c b/sys/dev/usb/net/ruephy.c index 2b5358ab8d0c..8f46fb75c1c5 100644 --- a/sys/dev/usb/net/ruephy.c +++ b/sys/dev/usb/net/ruephy.c @@ -28,7 +28,7 @@ */ /* - * driver for RealTek RTL8150 internal PHY + * driver for Realtek RTL8150 internal PHY */ #include @@ -76,11 +76,11 @@ static void ruephy_reset(struct mii_softc *); static void ruephy_status(struct mii_softc *); /* - * The RealTek RTL8150 internal PHY doesn't have vendor/device ID + * The Realtek RTL8150 internal PHY doesn't have vendor/device ID * registers; rue(4) fakes up a return value of all zeros. */ static const struct mii_phydesc ruephys[] = { - { 0, 0, "RealTek RTL8150 internal media interface" }, + { 0, 0, "Realtek RTL8150 internal media interface" }, MII_PHY_END }; @@ -167,7 +167,7 @@ ruephy_reset(struct mii_softc *sc) mii_phy_reset(sc); /* - * XXX RealTek RTL8150 PHY doesn't set the BMCR properly after + * XXX Realtek RTL8150 PHY doesn't set the BMCR properly after * XXX reset, which breaks autonegotiation. */ PHY_WRITE(sc, MII_BMCR, (BMCR_S100 | BMCR_AUTOEN | BMCR_FDX)); diff --git a/sys/i386/conf/GENERIC b/sys/i386/conf/GENERIC index 06738a7ed506..5162775df8fd 100644 --- a/sys/i386/conf/GENERIC +++ b/sys/i386/conf/GENERIC @@ -232,8 +232,8 @@ device lge # Level 1 LXT1001 gigabit Ethernet device msk # Marvell/SysKonnect Yukon II Gigabit Ethernet device nfe # nVidia nForce MCP on-board Ethernet device nge # NatSemi DP83820 gigabit Ethernet -device re # RealTek 8139C+/8169/8169S/8110S -device rl # RealTek 8129/8139 +device re # Realtek 8139C+/8169/8169S/8110S +device rl # Realtek 8129/8139 device sge # Silicon Integrated Systems SiS190/191 device sis # Silicon Integrated Systems SiS 900/SiS 7016 device sk # SysKonnect SK-984x & SK-982x gigabit Ethernet diff --git a/sys/powerpc/conf/GENERIC64 b/sys/powerpc/conf/GENERIC64 index e215651e4c3d..1c8309fbf3e7 100644 --- a/sys/powerpc/conf/GENERIC64 +++ b/sys/powerpc/conf/GENERIC64 @@ -180,8 +180,8 @@ device bge # Broadcom BCM570xx Gigabit Ethernet device gem # Sun GEM/Sun ERI/Apple GMAC device dc # DEC/Intel 21143 and various workalikes device fxp # Intel EtherExpress PRO/100B (82557, 82558) -device re # RealTek 8139C+/8169/8169S/8110S -device rl # RealTek 8129/8139 +device re # Realtek 8139C+/8169/8169S/8110S +device rl # Realtek 8129/8139 # Nvidia/Mellanox Connect-X 4 and later, Ethernet only # mlx5ib requires ibcore infra and is not included by default diff --git a/sys/powerpc/conf/GENERIC64LE b/sys/powerpc/conf/GENERIC64LE index 4759b70a3d1f..d7eb006a08ad 100644 --- a/sys/powerpc/conf/GENERIC64LE +++ b/sys/powerpc/conf/GENERIC64LE @@ -176,8 +176,8 @@ device bge # Broadcom BCM570xx Gigabit Ethernet device gem # Sun GEM/Sun ERI/Apple GMAC device dc # DEC/Intel 21143 and various workalikes device fxp # Intel EtherExpress PRO/100B (82557, 82558) -device re # RealTek 8139C+/8169/8169S/8110S -device rl # RealTek 8129/8139 +device re # Realtek 8139C+/8169/8169S/8110S +device rl # Realtek 8129/8139 # Nvidia/Mellanox Connect-X 4 and later, Ethernet only # mlx5ib requires ibcore infra and is not included by default From nobody Thu Nov 27 06:33:16 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dH67d1Gdgz6JZ7R for ; Thu, 27 Nov 2025 06:33:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dH67c6Wk9z3gD3 for ; Thu, 27 Nov 2025 06: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=1764225196; 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=+1Use9GkcgTGpYhczH0hhNq0JPa/T61HdRuLPIIT5yg=; b=adzvzDyFLmr7AxkeZlp/FB3q4EV8AonKYL4Wku8u55u+qkwV4XedkMzp5pZz8sa1Euxl27 9LSf8T0rDcoOl77Nl1zlItNGhSYwwiNoA8saJdlP+rF/E3COuoSV360rHoJHFO+mcqh3Or JetxzJdtG7+dhEX/Dsigpjkr89V+N/hEwd+hpQa5nKFW/tpt1RszqAFOoF9k9gpLXEcE2D rVizyaQEr1Iv3Z0hSzGrMlfiIPI4g/RtGIJwnribSmSOMhNKVmqNrPf6cCBGhpAXUrft38 CCvc6Vjw/ZfI++JNxVkbWF+qm7QX6VsubscWUfV+nmMcCOMVO+PICy7+AudFWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764225196; 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=+1Use9GkcgTGpYhczH0hhNq0JPa/T61HdRuLPIIT5yg=; b=KxWgmAbiy/M21doFRDxYaxJ7Mh8LELJayD+8DtFMF72bBeugJ1Z8Ju+Be6n6eAfB3enETc GJnxbamGEaFwwVthNI9kdib+yujGFwvb7ldN1p5t7wYsHecya7mKkrRW0RrPAWgBmXSWhp Uoi66p5Sx4hQze2VXUO8zuC5fTvdl5BYFrYgbzZ+KdOeehqOSQgkQkQAt0njtE7jlMAWjz 8VNnqrxbKOP2bYUhVEF69wl588YoGVoszxOGJH1sNkX7BFROZUQ7t55fgq2cwGtame/gR2 bWGw7ftJSfpUI9uDz2SCVF43g6xo4hUyKyTaKdDdeq/Fw9CKmfsB8FyLt+EZxw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764225196; a=rsa-sha256; cv=none; b=NZ2yQGoInvb9pF1TlGOadaygiW+fOJEDoyUuFadHGpTpqPQhuefYFGpeKsu8AFSpiaSICU vyVJVo7WCUIhAByp6gBEzDontv2+12P+O5tnANAhsGDeKuk6KgEeA6V1p78sb42nHdZwIj nTojXkFdKxriCCqkgDMvpQ9OlxRXZplWxIKQ/gInFa4gsncHMbpaQUaN1bh0MKjcBplvtm fsdXap4DBZWN0dDZIXEzhVWkvvwsrBGk2VRAx3R+Wx6lCbKntmA84Sc7FuyyaD3jURC/tg gY1zT7QfHZnHxZJwSQpazT3GqPRGRbzlj1g8z+JH/g9q1LO5Rv6bA14Zpzl1xg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dH67c60Dsz1Khj for ; Thu, 27 Nov 2025 06:33:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id c044 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 27 Nov 2025 06:33:16 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: ykla From: Warner Losh Subject: git: e27d5c190a41 - main - bsdconfig: RealTek -> Realtek List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e27d5c190a41c79b3764ff1a9893eb81a9050e63 Auto-Submitted: auto-generated Date: Thu, 27 Nov 2025 06:33:16 +0000 Message-Id: <6927f0ac.c044.4bff037a@gitrepo.freebsd.org> The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=e27d5c190a41c79b3764ff1a9893eb81a9050e63 commit e27d5c190a41c79b3764ff1a9893eb81a9050e63 Author: ykla AuthorDate: 2025-11-26 09:15:09 +0000 Commit: Warner Losh CommitDate: 2025-11-27 06:19:26 +0000 bsdconfig: RealTek -> Realtek Realtek changed how it styled its name 25 or so years ago, but the old style persisted in many places. These products use the new styling in their datasheets. Signed-off-by: ykla yklaxds@gmail.com Sponsored by: Chinese FreeBSD Community Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1901 --- usr.sbin/bsdconfig/share/device.subr | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/usr.sbin/bsdconfig/share/device.subr b/usr.sbin/bsdconfig/share/device.subr index 4ca2a80c69a5..ecaec6a2b7cd 100644 --- a/usr.sbin/bsdconfig/share/device.subr +++ b/usr.sbin/bsdconfig/share/device.subr @@ -1327,9 +1327,9 @@ f_network "pcn%d" "AMD Am79c79x PCI Ethernet card" f_network "plip%d" "Parallel Port IP (PLIP) peer connection" f_network "ral%d" "Ralink Technology IEEE 802.11 wireless adapter" f_network "ray%d" "Raytheon Raylink 802.11 wireless adapter" -f_network "re%d" "RealTek 8139C+/8169/8169S/8110S PCI Ethernet adapter" -f_network "rl%d" "RealTek 8129/8139 PCI Ethernet card" -f_network "rue%d" "RealTek USB Ethernet card" +f_network "re%d" "Realtek 8139C+/8169/8169S/8110S PCI Ethernet adapter" +f_network "rl%d" "Realtek 8129/8139 PCI Ethernet card" +f_network "rue%d" "Realtek USB Ethernet card" f_network "rum%d" "Ralink Technology USB IEEE 802.11 wireless adapter" f_network "sf%d" "Adaptec AIC-6915 PCI Ethernet card" f_network "sge%d" "Silicon Integrated Systems SiS190/191 Ethernet" From nobody Thu Nov 27 09:00:28 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dH9PS3Zgrz6Hsg0 for ; Thu, 27 Nov 2025 09:00:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dH9PS33z3z3tx1 for ; Thu, 27 Nov 2025 09:00:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764234028; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=c1wqJHuAeaKcwCeM97ssk1jQTqRK39IZzm5WRtdjWP0=; b=YQUZ0Ot0N0IppkqXqnkFAgTFMEvM1Q/5WOC9sFYGsMUdvwdYso7NSA8GKl1m0QPXfGxXzq foHPcN1YjDe26UksE956zCfATHAy2XuHE6/OXpUKC0Saz0CMINqQBXwWQBs1LEC+uivWi/ eGKy4ALCty91CKWdcpv2l1/ecQ5XnV2qQp6giSCwtVzqhvM7jPzvAMj6elKZLwfYHgB95z 1c5A+0k0fg+SKbaeYScMaXcmUki8NQjL5zyHwnA/tKg99U33w24aBbiflOmDixdHtFxkcC G40V98aPnJM8+lr1KMFjw9kQAJsJjxYOUffiznXDUwVxxFtAh0gKVjuGbP8gnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764234028; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=c1wqJHuAeaKcwCeM97ssk1jQTqRK39IZzm5WRtdjWP0=; b=Ie9wdvcoOut6aCEdK00jzbVfHCf1YIijZNZmdOPdxU79qp0wzjaltvboIkoCk3qJ70GXvv V3Qb6HFO9aibbc/7SQ8Yu9CBFyqQEiKxQroU31kweAJ+1LkVOGh3G1d77bn1hQWRSa6a9k /Mf5jHbwMd72kiBH6yzXjorIurujOut3RCr/Rs2ao+K/gAoOk8tHqtZl0ffLJLyCszMZ3o uQZm64ZIQDzGaVvqaO+bFmJ2eW3dFyaiuDVquy2PnWdA+64PdDLvvK7Cj4o4YziHkxCi80 1JkTldj7dyVDTMUVY4dPLOQ1VRCOwYOLRuxI6A8VuBsYvano4+j+DOhjFNp52A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764234028; a=rsa-sha256; cv=none; b=QNtoo/JTG9fX21OWJeyTcbjutoCqGVLnhrPxCNjSq+9WTot1wWDqT1WmVeb180FvFRP+fT 76vIg21qMibmEBoIoN3GaksgUgIK4nMKlJ4Web4HDLh9Ba4S1UEmxVD5ik0sRrOxT0o9U0 NJln5J9ZCQpYvJuNFYMZyZrb+IhFzTmFwwYB7HVSWRQk2uMW5AxLaoZu8itbCQ/dlb/eYf usdE8pubBSrHTmH2Qfe0xgPhKOq4lwpiF1jvN0ean6e+z3JlyRgIaMznARCcFE3PGvTKQV U9h1lVQb/TkgPrWVhmK5iWaAiYCXDA+Jxysa1YJhIvYfy0pTRVKiYyrwkfVm4A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dH9PS2Y75z1NZ1 for ; Thu, 27 Nov 2025 09:00:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2bcd0 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 27 Nov 2025 09:00:28 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ruslan Bukin Subject: git: 06a4a092e684 - main - riscv: include Xilinx PCIe controller driver. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: br X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 06a4a092e6846f64cacdff9a8c5efa294ce35a88 Auto-Submitted: auto-generated Date: Thu, 27 Nov 2025 09:00:28 +0000 Message-Id: <6928132c.2bcd0.2e9e36fc@gitrepo.freebsd.org> The branch main has been updated by br: URL: https://cgit.FreeBSD.org/src/commit/?id=06a4a092e6846f64cacdff9a8c5efa294ce35a88 commit 06a4a092e6846f64cacdff9a8c5efa294ce35a88 Author: Ruslan Bukin AuthorDate: 2025-11-27 08:56:34 +0000 Commit: Ruslan Bukin CommitDate: 2025-11-27 08:59:38 +0000 riscv: include Xilinx PCIe controller driver. This is used on Codasip Prime. Sponsonred by: CHERI Research Centre --- sys/riscv/conf/GENERIC | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/riscv/conf/GENERIC b/sys/riscv/conf/GENERIC index b645cd3499cb..7a2c88c0b4cb 100644 --- a/sys/riscv/conf/GENERIC +++ b/sys/riscv/conf/GENERIC @@ -96,6 +96,7 @@ device cpufreq # Bus drivers device pci +device xlnx_pcib # Xilinx PCIe Controller # Block devices device ahci From nobody Thu Nov 27 10:06:04 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dHBs92fncz6J1K6 for ; Thu, 27 Nov 2025 10:06:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dHBs91G1Jz41nt for ; Thu, 27 Nov 2025 10:06:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764237965; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2LGVWUuZsRAtFMxLLzYbUQ1hZUqdUs0rg2QGz71ciIU=; b=Mzt9X4ASRRJiB89XJfrxBBZhvMa1DCdxtbHM1x2OKt0PIAyX0hnx3Ggq07Zu9sxTdhAiRm 8UEOJAVYn4l16VwCZ0nlYZdWzPGHbcGDSx3N6EKMY1aPL4HsoNQQgADJDo47t+/6dvJRh9 D0A2QBZmh/6R5JnpmfO5JV+4X1ugJUDADpd5cC4L92VXkmwIBzAWpTswanQV0ln9n7Oyp2 lGkLik7HQKX2+Ki87pn6x3+cRdna0uUHruTXytjddxt5xVquBzEOgIiSONX/eV1LMWst9A F7ojOnERAHFIMJ8iux8+gqtwYo5CtgtLrC9qxuSUIL0OSr64xEGnlpfnMNonpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764237965; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2LGVWUuZsRAtFMxLLzYbUQ1hZUqdUs0rg2QGz71ciIU=; b=j1y08vqK8GvfNpcjBaKjDQSXGMN2ae0u0v8ywsOOCryQR8zJMuHwY87HaB8ykBMGMWfA0M D6mdmBYtApijYp9F0wwbcl85KGgFTxI4GTVag5RsPl5HFso76UNlNQUXHq9jWN9vWOnj3i HDVFZTNMi7KfG/AUd3mr8Zol8Dt5KWzHwhfO9vTYFkQW4LWzEq+fTpZ//i3wOal3kMaUfn fl63eOC9COmFgn/f9jFbcmXWnUyQxMRI++U3i8uPzwleiS11VP4NJEczVnUNxyAuoFhX9e DhdLsirzPxZOcLL2xe1K26hkpbuxe249Am7n3lbRAnrb1uDT9trQbQfYOd1ZHQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764237965; a=rsa-sha256; cv=none; b=ckpKV5DD5Cs3m1BCfDlgdhd1Ateg5d1vWUqO+Z6RpCwOInG8FAHZe3SRqVE9+jyyqUhZOd ThjlEt8hX89ChxX4UtztgmTKlKfNnBGWY/UYfKwvG3kemUJJAQ3lEAO4C7EP6jiD9mOIJj ABGGKpRwbXGH/IPUFDPEJBxQjE/wJvnCcFwA/tkuHrh0tUo7OwV4xg7RW8PHAKSr3S5vLc kAU5OuQ5zcKS15jqRAj0ZkLk72KN8WX9i887CY0wqb/1XgI0BTFyfUczWfTEgp3UqCfEN3 24OdJfx7rM/Oj+fON7B0xflOByezodYzsazEGQuQ5sqGBTbG7PcJ/A7KLcRNCA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dHBs90GlRz1QKw for ; Thu, 27 Nov 2025 10:06:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 325cb by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 27 Nov 2025 10:06:04 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: 000d5b52c19f - main - setcred(2): Fix a panic on too many groups from latest commit List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 000d5b52c19ff3858a6f0cbb405d47713c4267a4 Auto-Submitted: auto-generated Date: Thu, 27 Nov 2025 10:06:04 +0000 Message-Id: <6928228c.325cb.6de6fb72@gitrepo.freebsd.org> The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=000d5b52c19ff3858a6f0cbb405d47713c4267a4 commit 000d5b52c19ff3858a6f0cbb405d47713c4267a4 Author: Olivier Certner AuthorDate: 2025-11-27 09:04:50 +0000 Commit: Olivier Certner CommitDate: 2025-11-27 10:05:50 +0000 setcred(2): Fix a panic on too many groups from latest commit kern_setcred_copyin_supp_groups() is documented to always set 'sc_supp_groups', but did not do it if there are more supplementary groups than 'ngroups_max'. Also, that case was omitted from the herald comment. Add it there, also including it as a case where 'sc_supp_groups_nb' is reset to 0 as a security measure. Initially, kern_setcred_copyin_supp_groups() had the usual property that nothing had to be freed on it returning an error, but was then converted to relying on the caller to free() even on error, and this part was missed during the conversion. The benefits of this unusual convention are that we can zero or NULLify groups-related attributes in advance, preventing inadvertent use of stale data (defensive security measure), and we can avoid some small code duplication (no need to have two same calls to free()). This makes sense as kern_setcred_copyin_supp_groups() is meant to be a private sub-routine of user_setcred() only. While here, rename kern_setcred_copyin_supp_groups() => user_setcred_copyin_supp_groups(). Reported by: pho Fixes: 4cd93df95e69 ("setcred(): Remove an optimization for when cr_groups[0] was the egid") Sponsored by: The FreeBSD Foundation --- sys/kern/kern_prot.c | 34 ++++++++++++++++++++++------------ 1 file changed, 22 insertions(+), 12 deletions(-) diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index 34d68927be71..b1e4b731145e 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -529,44 +529,54 @@ gidp_cmp(const void *p1, const void *p2) * 'smallgroups' must be an (uninitialized) array of length CRED_SMALLGROUPS_NB. * Always sets 'sc_supp_groups', either to a valid kernel-space groups array * (which may or may not be 'smallgroups'), or NULL if SETCREDF_SUPP_GROUPS was - * not specified, or a buffer containing garbage on copyin() failure. In the - * last two cases, 'sc_supp_groups_nb' is additionally set to 0 as a security - * measure. 'sc_supp_groups' must be freed (M_TEMP) if not equal to - * 'smallgroups' even on failure. + * not specified or there are too many groups, or a buffer containing garbage on + * copyin() failure. In the last two cases, 'sc_supp_groups_nb' is additionally + * set to 0 as a security measure. 'sc_supp_groups' must be freed (M_TEMP) if + * not equal to 'smallgroups' even on failure. */ static int -kern_setcred_copyin_supp_groups(struct setcred *const wcred, +user_setcred_copyin_supp_groups(struct setcred *const wcred, const u_int flags, gid_t *const smallgroups) { gid_t *groups; int error; if ((flags & SETCREDF_SUPP_GROUPS) == 0) { - wcred->sc_supp_groups_nb = 0; - wcred->sc_supp_groups = NULL; - return (0); + error = 0; + goto reset_groups_exit; } /* * Check the number of groups' limit right now in order to limit the * amount of bytes to copy. */ - if (wcred->sc_supp_groups_nb > ngroups_max) - return (EINVAL); + if (wcred->sc_supp_groups_nb > ngroups_max) { + error = EINVAL; + goto reset_groups_exit; + } groups = wcred->sc_supp_groups_nb <= CRED_SMALLGROUPS_NB ? smallgroups : malloc(wcred->sc_supp_groups_nb * sizeof(gid_t), M_TEMP, M_WAITOK); - error = copyin(wcred->sc_supp_groups, groups, wcred->sc_supp_groups_nb * sizeof(gid_t)); wcred->sc_supp_groups = groups; + if (error != 0) { wcred->sc_supp_groups_nb = 0; + /* + * 'sc_supp_groups' must be freed by caller if not + * 'smallgroups'. + */ return (error); } return (0); + +reset_groups_exit: + wcred->sc_supp_groups_nb = 0; + wcred->sc_supp_groups = NULL; + return (error); } int @@ -601,7 +611,7 @@ user_setcred(struct thread *td, const u_int flags, struct setcred *const wcred) * alternative for 32-bit compatibility as 'gid_t' has the same size * everywhere. */ - error = kern_setcred_copyin_supp_groups(wcred, flags, smallgroups); + error = user_setcred_copyin_supp_groups(wcred, flags, smallgroups); if (error != 0) goto free_groups; From nobody Thu Nov 27 10:07:30 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dHBtp6k7Hz6J1ft for ; Thu, 27 Nov 2025 10:07:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dHBtp5xSCz42Bv for ; Thu, 27 Nov 2025 10:07:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764238050; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SstyXFUpVYfX7v9flXAqVAFH7Wb85sElk4ooevFDDZA=; b=WhXcFTZbIEnEgYx2HjjwCdf+mrifdXfZwkB+2xLkiHtkVBtXOi/qLjcDhIAemJ/Mh/PVil adUL0V/akyhDCDustZmX/BO2SP387ZeldGWl5NIaK91bTtkx0m2v4KL1AeWFtO03pBSNgd X6iB2gAcAxrA+Xs4cpOllhB8Pn2HoJzmUn5jFx/5465gFjfwcx9YDJgeXXTdM+tWym/XoG T2mqo2fC+0qvhPSRV1eYUFcDaHjijKzdlzrwRPtA3Ws8ii0pdc+Zg6gO8tlHLVrAVJhoDE eaWzRBioerWD8D/CfjBdbona0T/IipkYJ6N9d5Wc1ZRrlJ7ozhTylAc0soq3jg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764238050; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SstyXFUpVYfX7v9flXAqVAFH7Wb85sElk4ooevFDDZA=; b=ArjcSBB1A7Mm8AlS08Kdn+b+LHQ6jJsb9MEaXzP9BTjMC/lucAiGoyzJIZk6qShKXgl2eS y2Oyvo/HCMRzEETLHhy/9GjLiWhnP5zTXiksb/wL3bD9bdrnED/i8ikCnW4pCtUOdJIqsV i4ehVpPX4QdsqvilEr53+vsV7YBCZv+8Hv8rJX2+N5nyoSXkeGQzq/TZvKtDlIPqDq8tNm NkQ8AyA/og5tf+8dCyg+Bw00rifIIb7eRTbYGKNIFWIu5nJEpKte0Ykq957zd9wOupAzLF bU9Mb0YHwZgCNiYpSQ1oFTDu9VjBH6zxMFbt0RR+pheFW74rkQUk72dR2b+XaA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764238050; a=rsa-sha256; cv=none; b=mgS4hGH7YZC80T7fDYYjXwrJWstxWVSlE2uz007nUEPZ45jg47fdIn7lhnQqxG7mWqzPh6 hB8DcJdIQ8OjP1ZAVKPNH35LZUyXsWaEHf7O+o9WjHBAJSXfMwuqK2+Zlzx/E5GFfzPSQ3 sQycG/g4U0W3nGZ3JffwGjp5vOcm7OfM5S3cpNN6w+ImI6X9uwRY7TfKrZtByJmy6M4x+l JVQam6P/RUi19aHk3P76z2vTX6AmOEG2rJc4nQUEnbJ/hSiiU+7qHfHOFnQzfVrpZgkcAw nXgL7++30IXaSrBPYmiN+7YLNBWP3CCFSuRGpYLhYGAZKXOyeiQOOKcCUeO+0w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dHBtp5YWTz1QG3 for ; Thu, 27 Nov 2025 10:07:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 33e00 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 27 Nov 2025 10:07:30 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: d9e734d65084 - main - exterrvar.h: style(9): Fix two small nits List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d9e734d650844f4465a2e064fc9ee0897ed9aa95 Auto-Submitted: auto-generated Date: Thu, 27 Nov 2025 10:07:30 +0000 Message-Id: <692822e2.33e00.256da21e@gitrepo.freebsd.org> The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=d9e734d650844f4465a2e064fc9ee0897ed9aa95 commit d9e734d650844f4465a2e064fc9ee0897ed9aa95 Author: Olivier Certner AuthorDate: 2025-11-27 09:42:50 +0000 Commit: Olivier Certner CommitDate: 2025-11-27 10:07:15 +0000 exterrvar.h: style(9): Fix two small nits - Use tabs before '\'. - Comment for '#else' must be the negation of the initial '#if''s test. No functional change. Sponsored by: The FreeBSD Foundation --- sys/sys/exterrvar.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/sys/exterrvar.h b/sys/sys/exterrvar.h index 8e2961356a1e..6c75a2d01174 100644 --- a/sys/sys/exterrvar.h +++ b/sys/sys/exterrvar.h @@ -44,7 +44,7 @@ (kep)->p1 = (pp1); \ (kep)->p2 = (pp2); \ (kep)->src_line = __LINE__; \ - (kep)->error; \ + (kep)->error; \ }) #define _SET_ERROR0_KE(kep, eerror, mmsg) \ _SET_ERROR2_KE(kep, eerror, mmsg, 0, 0) @@ -77,7 +77,7 @@ int exterr_set(int eerror, int category, const char *mmsg, uintptr_t pp1, int exterr_to_ue(struct thread *td, struct uexterror *ue); void ktrexterr(struct thread *td); -#else /* _KERNEL */ +#else /* !_KERNEL */ #include From nobody Thu Nov 27 13:01:37 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dHGlj5tM6z6JMvt for ; Thu, 27 Nov 2025 13:01:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dHGlj4HHfz3T0Z for ; Thu, 27 Nov 2025 13:01:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764248497; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MDpl0CP8N/MHQefxfWC6738Kcl984/Vmt+Q7JMELEXI=; b=KRGQDqvVoa8HrGSmw13HA1oE/GRAh9wg+R+fIOxTi1wLbX8pKi6J3W5CS5aQvCXbzuoNlm ye+Q6gvyLndPvGargW4VvwMDI++zdZ53JQVIqFWwSnITwXYL3sDrvR2Nzuu8IPNejE2IjH JbjqTXQCdizGalxkXxnRiBIZDl3G4aNIKYcVbSdTUM9fVhv+l4766M33UYr04jSpWroMb4 blyPPsTrgTSexJnld0PvPcvcWPzNO7T0GJmPuQcJFHB0s2/jK+AAVvE0s2vPTzMP4gmweV qOKkuB5yyc0dbc0H8SgjdMz064TBQYUN5ZABnIuFiChieFp17ahvPdaXGTjFZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764248497; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MDpl0CP8N/MHQefxfWC6738Kcl984/Vmt+Q7JMELEXI=; b=cZ0EIJfmfsgb26s/mXDZmCU31+fDvjHNxqJ+TEA2/xnSWxJDdymDiI2UdtPNraryMfQprr bufqQV0H0kVoNvM/wSGPxdPopPs0oz3KdcDMNBCF0yJTuJEq0TMeoYtiDpCCi7kK1DVeMG 4Uhlk0TC2PCA5R0Sagooc6yubG+ncYpMEFH8tpo8Fk9ukHuAZriizW2GaNBbazy3Cs+Qrj 2WMyKxkXpooYkM+SdamqnB6YchcgFgyGtxQzT8x/KupfqsgGYA+OgI3FUk9YX4uea8towI JXN/TDN+nD8Vbi7nZahILMXnNS1DO3Q7g24nrlz2H6h8bDiyZ+SSG3I48Gebfw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764248497; a=rsa-sha256; cv=none; b=USbdFUqDmQV8w8QnbH/4tAyqdUB+RAocE+jDn8poftq3lEG5Y4qOl56h/dZyRCPgy95rF2 kailsQZt4CVzr1UOwWiAzLeR+iK5Z5nGqarHOul+85pLUQzNZnsEoNz4VaTtBNTN02+eqS FcVKsdUM+4M3mrfk+5r54c+dDBQfxnvMA0nNP8MsZiBifFEVgs6mKgKZTgU15Drlp2Krm1 g/VfNYUbDB4IrHKBTqeV+iWSDsK+FXgcpGp0RHxxSraHF6y68P1SyKMwaJzBY47SzUdoX+ 4pHJu+BqqT4yhk052KePaXzLfGKye+QOGSZrNWxa9A0r+gZel5FjuPv6H2LUVQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dHGlj2xYjz2Pr for ; Thu, 27 Nov 2025 13:01:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 24faa by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 27 Nov 2025 13:01:37 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: a82347584ba7 - main - pf tests: fix killstate:v6 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a82347584ba708c4d20b25b2ed13794905ff639f Auto-Submitted: auto-generated Date: Thu, 27 Nov 2025 13:01:37 +0000 Message-Id: <69284bb1.24faa.703abbbe@gitrepo.freebsd.org> The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=a82347584ba708c4d20b25b2ed13794905ff639f commit a82347584ba708c4d20b25b2ed13794905ff639f Author: Kristof Provost AuthorDate: 2025-11-26 16:08:15 +0000 Commit: Kristof Provost CommitDate: 2025-11-27 10:43:53 +0000 pf tests: fix killstate:v6 Allow neighbor discovery/advertisement packets, but don't create state for them. This ensures that the destination jail can respond to our echo requests, and that we don't create extra states that would confuse the test. Sponsored by: Rubicon Communications, LLC ("Netgate") --- tests/sys/netpfil/pf/killstate.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/sys/netpfil/pf/killstate.sh b/tests/sys/netpfil/pf/killstate.sh index ffb01df57908..4c34c8036f06 100644 --- a/tests/sys/netpfil/pf/killstate.sh +++ b/tests/sys/netpfil/pf/killstate.sh @@ -187,6 +187,7 @@ v6_body() jexec alcatraz pfctl -e pft_set_rules alcatraz "block all" \ + "pass quick inet6 proto ipv6-icmp all icmp6-type { neighbrsol, neighbradv } no state" \ "pass in proto icmp6" \ "set skip on lo" From nobody Thu Nov 27 13:01:38 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dHGll082Bz6JMw3 for ; Thu, 27 Nov 2025 13:01:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dHGlk41XZz3T36 for ; Thu, 27 Nov 2025 13:01:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764248498; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WzineZ52Jj3uw9CZKi0UcLMWA+Iyoyjafyli2CFJFus=; b=lgYpITG5fVT4zMJR1qVYOUwqKBKlHMeTuXJiiHE9Tl0AiApdKvb9K0Z3GtPRzLQEnqQvOu JT/r239lXCyUn/CBzxSTyvJWA713P8pGyl0Sivywn3s2KNSbBlDsN+NxjH0qkQb5NH+smQ eeKlVVcb6obXXDUurImJWDymqk3FRqp4vZXk2sQggRnGZukTgQljDGrbtCp5Gu253uaYq1 dVHmYc2x7ODrOMznuTYtYL32+JV+7SD/5yycoCQK+zXPOLUjT4entCRkYaASyHG8AG2SYX JxGXvLzB+dAty1ufx+gokdMIuHJGBqV9+KjqvSZeUKgFyU2CmsntjokaA7A4EQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764248498; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WzineZ52Jj3uw9CZKi0UcLMWA+Iyoyjafyli2CFJFus=; b=f1a2lQHoSKSYE3+0YuztiF+9YtPq1MYnHm25RabPHyaBIiT4Aa7Y1DaE/xkuSXg5i3MQdU n144krStomjMQEsT4/H6td6LBbxl4kx+IQuN06yW+NabkmhDonuY/tHfvsR/z4mKYG0ltr 84nww/QZicNo54wF74GUOEhpMo04q2iQ77Jxl4NBOoI7uDeCyyNSXz/DgjhQZ4lQvzaaXy 1CW2bYlHiN/nNB0vAYwvBLZcXN/q03ED7sEkF8ceqAwJ98QsyYA2QvPWK7zdTlvnwCLpRp nsKUAzebIJwVmRKeFqGquOGZ5SUoE995QTVclykZSuVKhCSQaGkiyfpVq6MTxg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764248498; a=rsa-sha256; cv=none; b=p4pD75ByncqRnO7uZJRfCo8qexbAJlgKyMJw+2S0w0ilcTK873MestBiN9p3Vq0om3AMc6 Sl6Cwrbnl93tx/RGYiU8q1jfNfhZYct6n8lJ0qRQMjIgMF61Wc3wCXBcGnyhRBq+/6Xsdh jdB0u3KvRHxPfZAXWjK9FU1CF28jMvD+r0LbD3ANnuoUtDBiSMyirGExIMuw28Wuj+IAur ZpT9DMyjyw2y3rjZYKgSPXmW3ccDeglZQoCtkKAfUFiwd2DeFIEg8ORe9rilZ2KDpy6e/e Z4H7kWB0weqW1z+gVRrxPUCkNA0vlZ7g2kZ+IOVWd14Z/i/baSXPxNERNK33zw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dHGlk3Xw6z2Ps for ; Thu, 27 Nov 2025 13:01:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 26536 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 27 Nov 2025 13:01:38 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 8cf099b4fcb8 - main - pf tests: fix syncookie:loopback_v6 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8cf099b4fcb803d995192851f02294e0ef329073 Auto-Submitted: auto-generated Date: Thu, 27 Nov 2025 13:01:38 +0000 Message-Id: <69284bb2.26536.7c15def1@gitrepo.freebsd.org> The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=8cf099b4fcb803d995192851f02294e0ef329073 commit 8cf099b4fcb803d995192851f02294e0ef329073 Author: Kristof Provost AuthorDate: 2025-11-26 16:26:28 +0000 Commit: Kristof Provost CommitDate: 2025-11-27 10:43:53 +0000 pf tests: fix syncookie:loopback_v6 Use 'no_dad' when assigning a v6 address, because otherwise we may try to use it before it becomes usable. Sponsored by: Rubicon Communications, LLC ("Netgate") --- tests/sys/netpfil/pf/syncookie.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/sys/netpfil/pf/syncookie.sh b/tests/sys/netpfil/pf/syncookie.sh index 598ac17c67f5..460c923179a3 100644 --- a/tests/sys/netpfil/pf/syncookie.sh +++ b/tests/sys/netpfil/pf/syncookie.sh @@ -310,7 +310,7 @@ loopback_v6_body() loopback_test ::1 8080 epair=$(vnet_mkepair) - atf_check ifconfig ${epair}a inet6 2001:db8::1/64 + atf_check ifconfig ${epair}a inet6 2001:db8::1/64 no_dad loopback_test 2001:db8::1 8081 } From nobody Thu Nov 27 13:01:39 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dHGll6pSyz6JMr0 for ; Thu, 27 Nov 2025 13:01:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dHGll5Bcjz3SvK for ; Thu, 27 Nov 2025 13:01:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764248499; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=m1M4ZNCQZKp/xfavfwUTsWKRycxfpQ4QJdy0+p+BV3U=; b=hQsq+MNcL3Mo1mME5UNR3i2pbUZLjHFBhnRvRqpyaVX+qS9mRUG+6SfrU/X90yW7yEkrP+ lj4NwxrcJi2QEvDi4JCN76inzc0SKhnk5mlOALRUtUNCijYT7LL31AIfo3RrTVetqTJsz0 2By+OAYfidoSCCxm/NXGHp1eI3xcFisN0YHgDJMqoxZuqfXavrwd/ikJcJN2Mgbdxx1q1e Xx5tHHF18auG+FQJMi57FdQj5FZipmKDj9yD38Tl7I8W75vNefOkQF/oVdJJLh4T0yGf02 hQD5q7+4mxldEbgTWTihB4WWGDjtYJ8+L5uV+QF7ErEMB4hYVeyVEaeBhB9IZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764248499; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=m1M4ZNCQZKp/xfavfwUTsWKRycxfpQ4QJdy0+p+BV3U=; b=vcalSinZ+FULSNVwJsSxBlhs7Z20xXW7QjYn/O3JQ9FjMC6ya9/FJT40mZ2p+2AGpn0Bsm 5u6kYvjLxwB7REyobiBKH6JWfa2YvA/eawKkgIUxhPEGCr1Pdl9k24uJIihR0MkF+VOTyw PSyPSd70yoxrgaz0eKR8xX1kE/lrj2agaibCh7lS6Njux9X1XbAJliOfRYAFqSAr8FnEiY 3iuX5Y4V5dfONRPG4PpO6A6+SQMBVPN3E7Ry5EN6lDBRhK83Y0AvNTVk0xTM2dhnLljJe8 yiRci1jYUMBWdffL+4tlCTkcd58+EFnh3tkf0XVSqaTPNhNCTc5YUBVNIR8tRg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764248499; a=rsa-sha256; cv=none; b=jeOoO6rzIQLUY9UmbZ0QVYt+Pg1ci4KLAy+00+rCPmsrc22wXDiV/8KOcesmBwCZyS/247 2AWrB3IeU0y9BXFdnXA5lr1yPkoxwoCFDDpDgkGmT4pFzzdwOywyaOTd5g4CQECHgiotvn 8AI2YfSj2DKvBNkkjiJ8SIaIXHI/KVAhpkNspNlmhMKx2529RhPXiUYhgYxD6CIpn+ZPMS XKGccUl/Y5WV73Jmi9hOzRSYce6cpiHLeVuBk6wwPNwnzi69sNbH0JJHysdGmsXSt+4QP1 WvBA3Fvg+24294gBJyiZxFg0UTHAtT2+ePdtOLDi4DIR1w+OzsYAdqo2fSfBqQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dHGll40dFz2kd for ; Thu, 27 Nov 2025 13:01:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2585e by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 27 Nov 2025 13:01:39 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 685d5860acea - main - pf tests: explicitly set the source address in killstate:v6 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 685d5860aceac1c01bc34ec1ca5d726b88cb6e27 Auto-Submitted: auto-generated Date: Thu, 27 Nov 2025 13:01:39 +0000 Message-Id: <69284bb3.2585e.7dba47c3@gitrepo.freebsd.org> The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=685d5860aceac1c01bc34ec1ca5d726b88cb6e27 commit 685d5860aceac1c01bc34ec1ca5d726b88cb6e27 Author: Kristof Provost AuthorDate: 2025-11-19 13:35:59 +0000 Commit: Kristof Provost CommitDate: 2025-11-27 10:43:53 +0000 pf tests: explicitly set the source address in killstate:v6 We've seen failures due to pft_ping.py selecting the wrong source address. Explicitly use 2001:db8::1 as source, to match the tests's expectations. Sponsored by: Rubicon Communications, LLC ("Netgate") --- tests/sys/netpfil/pf/killstate.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/sys/netpfil/pf/killstate.sh b/tests/sys/netpfil/pf/killstate.sh index 4c34c8036f06..dc082464b36c 100644 --- a/tests/sys/netpfil/pf/killstate.sh +++ b/tests/sys/netpfil/pf/killstate.sh @@ -194,6 +194,7 @@ v6_body() # Sanity check & establish state atf_check -s exit:0 -o ignore ${common_dir}/pft_ping.py \ --sendif ${epair}a \ + --fromaddr 2001:db8::1 \ --to 2001:db8::2 \ --replyif ${epair}a From nobody Thu Nov 27 13:01:40 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dHGlm6tcbz6JMt1 for ; Thu, 27 Nov 2025 13:01:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dHGlm5bbdz3T5Y for ; Thu, 27 Nov 2025 13:01:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764248500; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rSWWqCIqzo74TZIAgUpR9vRotLvwAT7iSmSy0N4sG/s=; b=sMfi8ZwSpKzCdt0SF/5dYry3xV/+hF7xubdMDLxpZJ5ICMmFCA3osJnVXLp6dPMow+Smaz gxZm1curEm+Q+aa1i8/OwkNH5eIxZfc3ZhAMn+EXCttf8iEmQUfO/laMD8C7u8twtDPnmD boMB+yxgnsQYAFJumQhFrygyiypnSmkPp2uL/1c+b2JPxKG7Ea4vW0o7ZR+7MgZRiRYjb+ smvPgi+Ab9wszsVZhe0YGfcnAc0TzP/yeom3brAnbH6ymsPU95fk6nSsSMAeSFJScPDqxN qkk/1uGmntjsJutFPV6+ANRBWAlg4kdzs5zp7kE2y23b+LIiz0Q6zQz41revJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764248500; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rSWWqCIqzo74TZIAgUpR9vRotLvwAT7iSmSy0N4sG/s=; b=UCzm3UlsgCUCnTzhfhK8CexA7p1zf9AWZdMQx8Q+fGp80pnfTGtO9YuK6nZdcVfnjR9MC5 JXMzUDpN1G2ldKv93XGUCv87hA2FWzJuYikLDZ7I/63kvrRtZcKzA1r1mxBebfFbjaaqe6 juBuKJPVUoFBXjPsjUWqA/GLEEikyC6Loxjl//b1atOcD1ZktUf6TjuPKW8A74SvClhK89 LWA9kkzCAL44pT0FVxAov8syl5tGQubzd7bKuHfAwDIOx1SbU1LU4xdKXC3i0DxzItCm9f KvAfuV7GVb/aF8grMm2Y+l4hqjkVvOkjyBBluF4CFrC/JhrPyIj+mxWiym3L9Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764248500; a=rsa-sha256; cv=none; b=vbNKeb4EQQdgakbxsp0cSR+MDINaiBkz4hi9KQajSzRf5XhGPSJ3+8TCby2DUE8knvABHp 6E3IyB3zyzViFf2/cwVEVvGAG+oGo8nphACtbo3uNwdgMOGv8WlUN9y4sFH79e2V0LIVii 64DtAR+TcKOsVy84/KBLZDrJwdMawlwtq6lEhldR/yQj1hIGNWXjU8wzpwbIfIzAkLGu9q XB0KXTbqUv6pMUKbD8U4EhcIvnnvdlGpcOMI/jmog3hfshvoekt+CiPvDMa22JNpl4vyrv 0Nf2cCguw408ffY/CGCPL4A8eMRf3Tj9AkK/m7JVySp1k2rnXjF+ORUeGYCjEA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dHGlm4qTsz2kf for ; Thu, 27 Nov 2025 13:01:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 25e9b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 27 Nov 2025 13:01:40 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 39cbfc78b50c - main - pf tests: pflog:{rdr_action,state_max} disable IPv6 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 39cbfc78b50c2b940d131834c8a5fb72442358c0 Auto-Submitted: auto-generated Date: Thu, 27 Nov 2025 13:01:40 +0000 Message-Id: <69284bb4.25e9b.86dcd9e@gitrepo.freebsd.org> The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=39cbfc78b50c2b940d131834c8a5fb72442358c0 commit 39cbfc78b50c2b940d131834c8a5fb72442358c0 Author: Kristof Provost AuthorDate: 2025-11-26 17:20:24 +0000 Commit: Kristof Provost CommitDate: 2025-11-27 10:43:54 +0000 pf tests: pflog:{rdr_action,state_max} disable IPv6 Turn off IPv6 on all interfaces to avoid having multicast listener reports generated that might turn up in out pflog output, disrupting the test. Sponsored by: Rubicon Communications, LLC ("Netgate") --- tests/sys/netpfil/pf/pflog.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/sys/netpfil/pf/pflog.sh b/tests/sys/netpfil/pf/pflog.sh index 550548a59c11..b11b1a3bade0 100644 --- a/tests/sys/netpfil/pf/pflog.sh +++ b/tests/sys/netpfil/pf/pflog.sh @@ -205,9 +205,11 @@ state_max_body() epair=$(vnet_mkepair) vnet_mkjail alcatraz ${epair}a + jexec alcatraz ifconfig ${epair}a inet6 ifdisabled jexec alcatraz ifconfig ${epair}a 192.0.2.1/24 up ifconfig ${epair}b 192.0.2.2/24 up + ifconfig ${epair}b inet6 ifdisabled # Sanity check atf_check -s exit:0 -o ignore \ @@ -353,6 +355,11 @@ rdr_action_body() vnet_mkjail ${j}gw ${epair_srv}b ${epair_c}a vnet_mkjail ${j}c ${epair_c}b + jexec ${j}srv ifconfig ${epair_srv}a inet6 ifdisabled + jexec ${j}gw ifconfig ${epair_srv}b inet6 ifdisabled + jexec ${j}gw ifconfig ${epair_c}a inet6 ifdisabled + jexec ${j}c ifconfig ${epair_c}b inet6 ifdisabled + jexec ${j}srv ifconfig ${epair_srv}a 198.51.100.1/24 up # No default route in srv jail, to ensure we're NAT-ing jexec ${j}gw ifconfig ${epair_srv}b 198.51.100.2/24 up From nobody Thu Nov 27 14:56:05 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dHKHn3ctkz6HMYp for ; Thu, 27 Nov 2025 14:56:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dHKHn31ydz3nGN for ; Thu, 27 Nov 2025 14:56:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764255365; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QjncMZu3/7+4YyPJkPbLUTWdwywNDUXoOl0QmMQI7Mw=; b=Th7UOkA9Omh9ICyMZVTQ2gwDXY9dPe6YBAUjkEUGBc+6wOIYmJinADvJvy9Kc2c/CZTHTn IkKYRgFQFEK3IdjzZuz33ju0xe6pIMwt/qVsjrwKyeGoYK88QVcdILBHe8kTgf/ovTC6wM R5j7/aNnCH07N0WDrubiySNkJ1xgju2e8cZ+W6jnnvmesudiUBveffHg9QR985Vu0U1HLm Tua93ZUwqc5TktKzbVKd2z2WDjUtTmBI/P4Zmm5jsBIIhXrRKyHVSYlFmqXSKwBRgWbNws CICJIi4Kpw5ln+3lKRWeupUBHJjaznpjw1DXGo0N1tOx/TjWZzSkN04dsi1HvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764255365; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QjncMZu3/7+4YyPJkPbLUTWdwywNDUXoOl0QmMQI7Mw=; b=BveUct+7MNiKoj0m2k6IBlqT+YoNEcj4sVKfvhup6Gpee8toXJYEw5JlSGflA3sxNH7bCo hVE83d+KgwXj7MrEx20uTROU9kAuDB0vKe23OqcUhHTVN05WoKU3AevjTKZ7+7pOXZSfP4 QFQGdO9ayQFOQEzg2HTdH3auVRAI2MmzQyfJ113URTpNMDbNB5P3B/pGNOWIT1cVrx7bYE jVIgv9b5TyXYCa8GcwEDgOEmxX4eucD0w6Ijrhbt27Y66HpixJ27S4lMqwmSpwVtxp8Vw+ qI5AVo/oFDkgkGCz8cADbpMJvfRlAn2lLbxSgjW8w+5tEAjjiBWWSlbbdLnEqA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764255365; a=rsa-sha256; cv=none; b=leQFFLPOM7qprAiuNuNoBQjhrFdAWOdUFUjdqx+kLPIyqxQ9CqH3MGx0dd55sPqgm7+4U6 KljwD2nVZemzBuUlQ8LPxoPdZp+j2hcYTjqOMdLXDI/IO1i6iF9reXrPuo+U0fiQ+Dl2hr Scc6jnj7U7OYtz5MyWkwVU2H4uXwtaEEbxB6k1/0DpfTsL9AE3F+GySn25FLezpd3QXNUc BzWDyy8IjIorzTaBrQo1Th06VNyjN0rRkJV36ThYE8J2IB/7sFfiiL2iAZ5dMuKTDTjiah z8T8StUR3MHibRPHp05EX4tp/OMqr55lQyc7JRARF1sSz3XlKxIovzf50L6npA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dHKHn2ZWYz52g for ; Thu, 27 Nov 2025 14:56:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 30faa by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 27 Nov 2025 14:56:05 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: dca634d1544b - main - new type: ptraddr_t List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: dca634d1544b5cd202dcd06c8c5ea5cbea6c3300 Auto-Submitted: auto-generated Date: Thu, 27 Nov 2025 14:56:05 +0000 Message-Id: <69286685.30faa.6a6ab3ca@gitrepo.freebsd.org> The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=dca634d1544b5cd202dcd06c8c5ea5cbea6c3300 commit dca634d1544b5cd202dcd06c8c5ea5cbea6c3300 Author: Brooks Davis AuthorDate: 2025-11-27 14:54:55 +0000 Commit: Brooks Davis CommitDate: 2025-11-27 14:54:55 +0000 new type: ptraddr_t ptraddr_t is an unsigned integer type that can hold the address of any pointer. It differes from uintptr_t in that it does not carry provenance which is useful for CHERI in that it can disambigurate the provenance of uintptr_t expressions. It differes from size_t in that some segmented architecture (not supported by FreeBSD) may have a size_t that does not hold an address. ptraddr_t is not yet standardized, but is currently proposed for inclusion in C++2Y. Prefer the compiler defined __PTRADDR_TYPE__ defintion where available as this a new type and we don't need to worry about historical values. Fall back to __size_t where unavailable. Reviewed by: kib, markj Effort: CHERI upstreaming Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D53817 --- share/man/man7/arch.7 | 5 +++-- sys/sys/_types.h | 6 ++++++ sys/sys/stddef.h | 8 ++++++++ 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/share/man/man7/arch.7 b/share/man/man7/arch.7 index 5170a27768b8..628d3837f011 100644 --- a/share/man/man7/arch.7 +++ b/share/man/man7/arch.7 @@ -24,7 +24,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd October 1, 2025 +.Dd November 27, 2025 .Dt ARCH 7 .Os .Sh NAME @@ -48,7 +48,8 @@ and later, unless otherwise noted. .Fx uses a flat address space. Variables of types -.Vt unsigned long +.Vt unsigned long , +.Vt ptraddr_t , and .Vt size_t have the same representation. diff --git a/sys/sys/_types.h b/sys/sys/_types.h index 6b70b8dc6e32..6e69b06f689d 100644 --- a/sys/sys/_types.h +++ b/sys/sys/_types.h @@ -103,6 +103,12 @@ typedef __int32_t __ptrdiff_t; /* ptr1 - ptr2 */ #error unsupported ptrdiff_t size #endif +#ifdef __PTRADDR_TYPE__ +typedef __PTRADDR_TYPE__ __ptraddr_t; +#else +typedef __size_t __ptraddr_t; +#endif + /* * Target-dependent type definitions. */ diff --git a/sys/sys/stddef.h b/sys/sys/stddef.h index 73636f5a2370..90186eed7624 100644 --- a/sys/sys/stddef.h +++ b/sys/sys/stddef.h @@ -32,6 +32,14 @@ #include #include #include +#include + +#if __BSD_VISIBLE +#ifndef _PTRADDR_T_DECLARED +typedef __ptraddr_t ptraddr_t; +#define _PTRADDR_T_DECLARED +#endif +#endif #ifndef _PTRDIFF_T_DECLARED typedef __ptrdiff_t ptrdiff_t; From nobody Thu Nov 27 14:56:06 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dHKHp6kWyz6HMdm for ; Thu, 27 Nov 2025 14:56:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dHKHp3yyzz3n9Y for ; Thu, 27 Nov 2025 14:56:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764255366; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=A5mXCflSmFob/LjzT5VZQqA0M7ApB6eRtwbyaGp6qvU=; b=KFgE5ZKEHDl1Y+79POH0MRy3W60QgYrvEfsMvR1LwsmNibj8Gw2Ny4mC59J1PdSGJv/QP+ g/a7HjZYnEfEO9t74YGR7UzzOXIyr3PszNl+x0twAQSFka0BCS1m1ukqKOWyqV690r+Q7v DNpzd2fDGv8zc1Zgdt9r+FDNYj+4LP9HMmQTwYswYf0f0XLPhwrYE+zLoJNz+Gkd8m+BVC jTG/9pVnIVFgL4xQizp2RuIC+Pp/qqJza7/hYUZDKF5FotHKXs9WSeuEmepQpPjUQ7F4q7 ZTqt1K1zJOdwStJL+GzUzvtqCBcq18M2faWshJoC9m4dF3DvtRsogMn7MGpKvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764255366; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=A5mXCflSmFob/LjzT5VZQqA0M7ApB6eRtwbyaGp6qvU=; b=gmjvfGhDBDHF0iWGZ+y5TX9N1Lckvi29qzqp3TAQtVLuOdUklD3qVvCCQPyFOEuM86gFy4 phtXO3D/6n1z68pBbP0iEFQmby9JgZqM9sA7rPcVRQRGlWYVOorSypV3w7krpNXbfcDR2A 8/sCghWYCxlq3tlwALVPb5Lb/FrqDRS+sRxs0ECJsVwMnJ54KUG0V6l3YeRXqNuZTI4o+L NRnlEkZkCpqt+LRuFFAV/EbecyDUT0Hx5HwMvspvnemZPIu1T3E6aWvWYiElnOalGuHhEP PF6hPIYROfJ18AE2dth56jClngF3pu9ZFwSwvgyTvz98xo322ideYKHCR1o1mA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764255366; a=rsa-sha256; cv=none; b=gCi2tOrpvGUFaj4EiAIgd+uGZdcbfmTC0BcHM32DfwiHvfCfYQ85LADJpJKp4CBVvpcfHZ 2cVQfHuuCM9XzDUbZTP2qPH+XRul4X+jI412DCpOvDYLfnNBJ6Rtz/Ze/oEa4escXuDFnR z+GVvMWfwD+KO4QHMWaewrlJsIXRNGkuuT7fZzlhCATQcy0r6gRVc2YvHrSmqCsvmmR9xq 1zMHtS+kvFhl9T1+aZmhiWHUSBkD+OiPEv5sT5KsoU3WKYFiaMkIRsFAVfse2IT/+iTnBz gosNN/znYFhiC3OS+/G6ZdYJGc1MIsbzkQafizY+E3Zthq1XMjE0qOhPUORS+w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dHKHp3N4Fz5s3 for ; Thu, 27 Nov 2025 14:56:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 31cb4 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 27 Nov 2025 14:56:06 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 6aaba753830e - main - sys/_types.h: centralize __vm_offset_t and __vm_size_t definitions List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6aaba753830ec1d82959f21151dfb6563d38efba Auto-Submitted: auto-generated Date: Thu, 27 Nov 2025 14:56:06 +0000 Message-Id: <69286686.31cb4.32e873ee@gitrepo.freebsd.org> The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=6aaba753830ec1d82959f21151dfb6563d38efba commit 6aaba753830ec1d82959f21151dfb6563d38efba Author: Brooks Davis AuthorDate: 2025-11-27 14:54:56 +0000 Commit: Brooks Davis CommitDate: 2025-11-27 14:54:56 +0000 sys/_types.h: centralize __vm_offset_t and __vm_size_t definitions Use __ptraddr_t to define __vm_offset_t and __size_t for __vm_size_t rather than per-pointer-size definitions. Reviewed by: kib, markj Effort: CHERI upstreaming Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D53818 --- sys/sys/_types.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sys/sys/_types.h b/sys/sys/_types.h index 6e69b06f689d..3589fcb87a9e 100644 --- a/sys/sys/_types.h +++ b/sys/sys/_types.h @@ -72,15 +72,11 @@ typedef __int64_t __intptr_t; typedef __int64_t __intfptr_t; typedef __uint64_t __uintptr_t; typedef __uint64_t __uintfptr_t; -typedef __uint64_t __vm_offset_t; -typedef __uint64_t __vm_size_t; #elif __SIZEOF_POINTER__ == 4 typedef __int32_t __intptr_t; typedef __int32_t __intfptr_t; typedef __uint32_t __uintptr_t; typedef __uint32_t __uintfptr_t; -typedef __uint32_t __vm_offset_t; -typedef __uint32_t __vm_size_t; #else #error unsupported pointer size #endif @@ -109,6 +105,9 @@ typedef __PTRADDR_TYPE__ __ptraddr_t; typedef __size_t __ptraddr_t; #endif +typedef __ptraddr_t __vm_offset_t; +typedef __size_t __vm_size_t; + /* * Target-dependent type definitions. */ From nobody Thu Nov 27 14:56:07 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dHKHq6HBpz6HMhZ for ; Thu, 27 Nov 2025 14:56:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dHKHq4blvz3nSy for ; Thu, 27 Nov 2025 14:56:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764255367; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xiK7QL2zGLhfnHCAehnPLHL609RvNF3AsDxnbXuFWNI=; b=eeMjJydinFj5QfZ63SRfdUlTZgE7p3mbze2dJxMshbaye9NyZ/5VIttHFzZO526Y6iNDia yB42iWG2BbvhNMsGLMGa0XocUkb4+L6KTzz7WbreWtCfc1sVvRYqobz3bEnqlMUQEOwOGH q8zT//WWA07EpeMTIGPASyN8ecYdalmWcv/LrKpNdaoiuKiMR/ueWF4K6aOXoYTGzSeIHQ gNiy9WSvweUdWZRFC45WAkj+Tnc+fmzJGrrggV3BJ13bRyjQQTOrMtGna/6GIhHIf2lk6J RYvufL8nQaeoCy3eEwoJ47PZcnO7JS4SG4jLdSDRnJKLMVQHpQxc+/BX0bJMXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764255367; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xiK7QL2zGLhfnHCAehnPLHL609RvNF3AsDxnbXuFWNI=; b=FUFlwp679V634ug7xdzAivHEA5/ABKN0vhgODbKw8FfggzUpUfZwRjxTbFtNfNGZT1hffE uLkp0z8oVXJQF6kCBmymsBB915TJ3R0d9O0ZSTm/0mFe1EkvQdB6gElJNLcLFIYK52kIro YQX7HAXUnPBa4DlK+qGA6LP2ofXuCmXA8aRp2L94QPVyfEUV2CpuMZY7/i6fuuT4pqVUVW OGATpVYZEBW4HTw35+zdAiMx5RLWglPt2IbBmx3uhblRRK9TTid66hbI3z6hjGmjXbaWAN L3TO7f1unsyc5+DMg4IF3TT7efKniF3wAXbveMGpnDP0BalVJlnz+Cc5MQHZ6Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764255367; a=rsa-sha256; cv=none; b=XDV45YBZVP1Awnm9GO9iW4fUGrMmneHxAZ5q5LjB+pgTuR6S4lday6vDodzBhUtejA7pzH UOAAG5gdr3aR1EP9LlO319DMxGhmZ0yON+DNE1Dm1f0i6oNW1crM8fyBCDWaC7syAp3165 RTZl5fliBs43IKFKBkLSWpYZgcLJmWHTAEhDHNho4r+Lrb+io52qsMIv9VOQbHW1mTEyHV st5hbo5xNuKi9npPgmaTH2pWXBNvk6F0LVHzYxCxzXYOeIMUBJgc7G61vgBAOWWlvGqsRN 7AitRh3WbQyiC9hc8OpxPzLODqTd090LuBCQDSrjfJ8eDAlkX6iQkJNgkSG4Rw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dHKHq48hxz5fL for ; Thu, 27 Nov 2025 14:56:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 304f1 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 27 Nov 2025 14:56:07 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 96e05e2d1dfc - main - sys/_types.h: define __(u)int(f)ptr_t for CHERI List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 96e05e2d1dfc69f67d3099440561530501cc09b5 Auto-Submitted: auto-generated Date: Thu, 27 Nov 2025 14:56:07 +0000 Message-Id: <69286687.304f1.7df44779@gitrepo.freebsd.org> The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=96e05e2d1dfc69f67d3099440561530501cc09b5 commit 96e05e2d1dfc69f67d3099440561530501cc09b5 Author: Brooks Davis AuthorDate: 2025-11-27 14:54:56 +0000 Commit: Brooks Davis CommitDate: 2025-11-27 14:54:56 +0000 sys/_types.h: define __(u)int(f)ptr_t for CHERI On pure-capability ABIs, uintptr_t and variants are capabilities and defined to the new primative type __uintcap_t and variants. This is required to allow pointers (capabilities) to round trip through uintptr_t as required by the C standard. Reviewed by: kib, markj Effort: CHERI upstreaming Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D53819 --- sys/sys/_types.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sys/sys/_types.h b/sys/sys/_types.h index 3589fcb87a9e..4f5b8e5db273 100644 --- a/sys/sys/_types.h +++ b/sys/sys/_types.h @@ -67,7 +67,12 @@ typedef __uint32_t __uint_least32_t; typedef __uint64_t __uint_least64_t; typedef __uint64_t __uintmax_t; -#if __SIZEOF_POINTER__ == 8 +#ifdef __CHERI__ +typedef __intcap_t __intptr_t; +typedef __intcap_t __intfptr_t; +typedef __uintcap_t __uintptr_t; +typedef __uintcap_t __uintfptr_t; +#elif __SIZEOF_POINTER__ == 8 typedef __int64_t __intptr_t; typedef __int64_t __intfptr_t; typedef __uint64_t __uintptr_t; From nobody Thu Nov 27 14:56:08 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dHKHs125Tz6HMmr for ; Thu, 27 Nov 2025 14:56:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dHKHr70l9z3nJr for ; Thu, 27 Nov 2025 14:56:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764255369; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TKeFeJ8AbqQdrQTgP1a8gf7+0cnZFBQAJf1hRmd9Myc=; b=EoH3jv1CSMaCgav40lE+GM5dnwDnJ7VEpYjTep1B7N2WEHzNksc+6Vf/sO3VLqiyiKKC+4 Fjqb7L1Ggqm4FjOG6j3+OWBNaxKJZmgGYO/rgnbBtkm2Sxf+60lm6T0JGJVCS8fJa6ce04 JkDMXbPuhOraQ1zGh/bl6QmRoEZSPWBFdMpotYBIjq5on5io1QPZBgzsqSdFczu20A6ugI 9xtScZ1GwJ+mjvKz5KhqvrrP/I2kVoaFrbYWPz02u5f24GmL5wrS4eFG+iMHDYFLTjIliz L4by8lMDPPItjPvWNeqkn1LY7HANphSrHBCflw0hSFSqWfTPay/r68McxjeGNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764255369; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TKeFeJ8AbqQdrQTgP1a8gf7+0cnZFBQAJf1hRmd9Myc=; b=mewXRJLDPFqqoJoj0XUAV55dfCabRmCb44jzyRhA91/o2toZjHZLpegqedSnBYuT4601s5 0RRM0/n3Y9DWtvYO5PnvHXvWLvorivE2rodj80eFbtkp6DTi/6/XQWSB//3DGx+75QGfHk jicOq+evVk7JLk1qCQ2rLOaOInS0Zeh99Si+rZpgDoYChHQbJ/VxfXhd9xfBKbU0/425+r 6ih0tRNrT05gl/+8n0birDtv5wisD65fRUilN3HMdGFJk8eVJOqX3f7mBOC787gOYpOWKr xWdQ1rzl2O32Gcb5e5d3b6eqHJa4KSqUDVwiw+Ae3YCb/WtV2qDmXgLnDtSgEQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764255369; a=rsa-sha256; cv=none; b=pg/5W0f4yg/hIVUpP6iwCctOw1f3L8CzlwYcyTOJthwhhDymrXnBgajEsVmsRy9h5icT/J 44qgf8Bcd2rj3hsXqn7P1P+JET4wpSKqDeyFkT2dt28HKSbKoHan6oHCFhFsExPYELpMVd tnG+0kDovMoBCxblt9g4JSlFQZQz43hURJ2qp2DY5k7X1lUJZ1WpOXz1Q8qlLrOtgbj4GF nvf5vMWFq9Dc3dlnxycnDcsm1mfwSNbwgVj0P+fNyeeV+npPD0fQFsAtFalP42w7xbccpL wi2UTkn+F0YMFZnM4MqNUCCYph4b5UB6sNP0vsK4UIpr2cKwxskGGyQO7cRS7A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dHKHr4x4zz5fM for ; Thu, 27 Nov 2025 14:56:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 30746 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 27 Nov 2025 14:56:08 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 85ab981a8e4e - main - sys/_types.h: define fallback __(u)intcap_t List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 85ab981a8e4e1a7a078dbf553cb20cb2e58aeff9 Auto-Submitted: auto-generated Date: Thu, 27 Nov 2025 14:56:08 +0000 Message-Id: <69286688.30746.14c84aea@gitrepo.freebsd.org> The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=85ab981a8e4e1a7a078dbf553cb20cb2e58aeff9 commit 85ab981a8e4e1a7a078dbf553cb20cb2e58aeff9 Author: Brooks Davis AuthorDate: 2025-11-27 14:54:56 +0000 Commit: Brooks Davis CommitDate: 2025-11-27 14:54:56 +0000 sys/_types.h: define fallback __(u)intcap_t __intcap_t and __uintcap_t are new primative types in CHERI-aware ABIs that are used to define (u)intptr_t. To allow coexistance of integer pointers and hybrid code, define them to __(u)intptr_t when they are not otherwise available. Reviewed by: kib, markj Effort: CHERI upstreaming Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D53820 --- sys/sys/_types.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/sys/sys/_types.h b/sys/sys/_types.h index 4f5b8e5db273..e4d14da3c11e 100644 --- a/sys/sys/_types.h +++ b/sys/sys/_types.h @@ -155,6 +155,17 @@ typedef int __cpulevel_t; /* level parameter for cpuset. */ typedef int __cpusetid_t; /* cpuset identifier. */ typedef __int64_t __daddr_t; /* bwrite(3), FIOBMAP2, etc */ +#if !__has_feature(capabilities) +/* + * On non-CHERI systems, define __(u)intcap_t to __(u)intptr_t so that + * hybrid-C code which needs to be explicitly aware of capabilities can + * use it. These types may be present in some third-party code and + * should not generally be used in FreeBSD code. + */ +typedef __intptr_t __intcap_t; +typedef __uintptr_t __uintcap_t; +#endif + /* * Unusual type definitions. */ From nobody Thu Nov 27 14:56:09 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dHKHt3SvNz6HMdr for ; Thu, 27 Nov 2025 14:56:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dHKHs6Cscz3nR6 for ; Thu, 27 Nov 2025 14:56:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764255369; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+mQpinm3/6uq/+Vre+ogBy90oRfaVeFuubUZUib6cFM=; b=JijuPly7F5k3IdlzijEaQUaNMoeJbDyJtgVmS5PATLTmkUN7thIaJlm5SHbKpY3CsyuYQ1 5xXVMcB4lzBrLPz+gVzrWvvRBNVHklMVxzauDFMQblfrQsq0dxtc8eNIij4bm1TrLyIiVF gs4DQTW4xYiwWEPn6CxG0jjVfo/tflLAiAhpErZsrfykQLIHu5GGGwy3g2PdACq5QFLoQ4 r3G8cPti5azheAJ2QAKlJPFvNB+3z1ymX/CFsqgQ5WU01bUfa5Nv6+W05J7B/ZBxagFZcO 6114DvIpXPreUvCE0+IjByKBR8uHktuBDHd2x0KFmPpWg8Vu0i6WtsXeiAGDLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764255369; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+mQpinm3/6uq/+Vre+ogBy90oRfaVeFuubUZUib6cFM=; b=mamREQp2QNEL49u8pg+d37a7U19Pi2HiKhY2m+xl1PDjZYj8GxXC0eSKKClFyOCA3iPanX wT5QmSikhOVELMiPeJtiUyjQ8nTe3uHVHz9ld1QkAjQmARl3AGQ0snC4pzPltzAJcgDLqM E06PijuT8STQw2ZKdTHoz+NxS0bdIXQVich8AY1WHyQQ5UidjDwdSKG3NWy39ZLabFfU+b 5GAEf8Mljr/zpFlUShKA5eZYvkvSU8J24EC2uBwtk8SO3ordyhjr3/M9M+4mmIE8dMXMMr WQmIjK8WTBLtCoZ/xKE1zc9imQ/tGjCyQbdsa26Hlj31jgHnRXKBO4imcseEVw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764255369; a=rsa-sha256; cv=none; b=DCxwFPAyt5wz+XGztX3tooMq6hB8x7TB13XIaPMkCI1ncaeKqHgvH6T+sTj4Ec6h6ABzgZ CvhyRO7hRqu5m9Dmt61JPs4WCnxBffOWZwHC5UDWuWlcpc5acRizp983qCD7tmkJ/6lEjd NQMaeunhNyrRY1R2jYdomFGovBrlATcoa15WWNyC4nLfVivXcBc8o52DQ1DZ5HANbLxBIR MbCpp2MSF/D8JuQOu2wV6VYF0bCsS2axZm95g8BMfKSwapKagnNgmfeYAu5Qq9dKO4K3gT xk/EJVD/K4t6pgCUsKve9qJkLIbWGimB7ds447W6WcsR+6HCLHUMD0lXq1TbWA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dHKHs5j10z50H for ; Thu, 27 Nov 2025 14:56:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 313f2 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 27 Nov 2025 14:56:09 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 528e70a12ca6 - main - sys/_types.h: add void * to __max_align_t List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 528e70a12ca6ba07f1d8c88800871ceecbacfc70 Auto-Submitted: auto-generated Date: Thu, 27 Nov 2025 14:56:09 +0000 Message-Id: <69286689.313f2.40dcf11e@gitrepo.freebsd.org> The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=528e70a12ca6ba07f1d8c88800871ceecbacfc70 commit 528e70a12ca6ba07f1d8c88800871ceecbacfc70 Author: Brooks Davis AuthorDate: 2025-11-27 14:54:56 +0000 Commit: Brooks Davis CommitDate: 2025-11-27 14:54:56 +0000 sys/_types.h: add void * to __max_align_t Add a pointer member to __max_align_t as pointers may have different alignment requirements than long long or long double. Reviewed by: kib Effort: CHERI upstreaming Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D53821 --- sys/sys/_types.h | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/sys/_types.h b/sys/sys/_types.h index e4d14da3c11e..7aa7f7bfeb72 100644 --- a/sys/sys/_types.h +++ b/sys/sys/_types.h @@ -206,6 +206,7 @@ typedef struct { long double __max_align2 __attribute__((__aligned__(__alignof__(long double)))); #endif + void *__max_align3 __attribute__((__aligned__(__alignof__(void *)))); } __max_align_t; /* Types for sys/acl.h */ From nobody Thu Nov 27 14:56:10 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dHKHv3NRGz6HMsS for ; Thu, 27 Nov 2025 14:56:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dHKHt72xSz3nWt for ; Thu, 27 Nov 2025 14:56:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764255371; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=942ck7GAgTi/szFsBG/zqm0zamfJpfXRTbd93l5Ri7I=; b=FT0FbJHF5c2LLnmT9epbahlVhk9MSayzoyRE1tN9UBxpm0DWAYP7YbQ2eBFWuRGpNR7wr/ aZ1n26AdP3vRtHs/oswMZ7EM4YbfPJm4FixDBONzbPhrMQrl/1Ug6ZLVbOBgGsWkBsfIYq AyWM5uVF+/DVqvEBlt+8Wk1hDrXfrokgu4LiXqp9I670zUF4X/je2AewdI05dpTULEqoT8 s9Efi583Md08JlhMNFterKaL1QtRxYJ1kSfWBiW+AZzutCKyzp6fweGzmh/Q0VMO/00BN6 qO2iga4/uEB43VQftkqG198572h5v36kw1iyTP+kMzbRFAaauig/K55+/rpU/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764255371; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=942ck7GAgTi/szFsBG/zqm0zamfJpfXRTbd93l5Ri7I=; b=PEF+03h+DbY0bp0ikWEhyhyeJVN5Jh+sechg5snjvGkGFN3xftQl9KDy/8WU3+F/l6xnb7 cwkurgIKSnNWwKk9G8gVPJHd9gGwaPFG5TU9zOIXK6YZ42RsjaYIjUNumWZ+RucQS5/2g4 +bCwQtjPaKyVsluG+0BNk/MBFKNHyn/oQ01ep9qDfkf2Q+tbsCtpiUqtdWhfTveYpFKkYV ylvhImeyOptSZ18nsBuCEeQfUsb3pWagQ6iZdpU1K/WN7dOWVlrMB6lE99VqxyTo5caRTr 8JCOXopz7mXpuFF4Z9kjiw871wim/jQLLEExrC6a2aUaHLSFfTqdmZY9TmaUjQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764255371; a=rsa-sha256; cv=none; b=dPm8z3AxF4ZRqUt7Fwuuap8Tg3GW2mfdcF01KGRM/W//ECuq2gPiu/jKFgnNAh6kbILYVb c7GrghWJWIgULPZkOR+eTCDECwL56JadWJv4eXlrdJlqfaRUvTJyNmuVxc5uOij+WC3+ka 6o6oZ1lJa/IJFrqnTW55uHIo+xN+chQjvzSx5rOFeRYf5W6KoWbwAh/aGriNTy/UsFFdVs 2trc6QOwZYFpzHmekcGBC1ptVdBp6cR2p7Bnng57vBCzVfnz3pPB5IdsqWCAH4BZplxcrd a/byGSehI/hT/14P+b51WxJoVqAVLERZu4lRh1FHZ4tivmmSm7sYTlRbR9Y8Fg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dHKHt6LQnz5cK for ; Thu, 27 Nov 2025 14:56:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 310cf by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 27 Nov 2025 14:56:10 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 6ebbfe723bd2 - main - sys/_types.h: add __intptr_t to __mbstate_t List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6ebbfe723bd284e197a197b6aefd27870876b7f9 Auto-Submitted: auto-generated Date: Thu, 27 Nov 2025 14:56:10 +0000 Message-Id: <6928668a.310cf.17119f9a@gitrepo.freebsd.org> The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=6ebbfe723bd284e197a197b6aefd27870876b7f9 commit 6ebbfe723bd284e197a197b6aefd27870876b7f9 Author: Brooks Davis AuthorDate: 2025-11-27 14:54:56 +0000 Commit: Brooks Davis CommitDate: 2025-11-27 14:54:56 +0000 sys/_types.h: add __intptr_t to __mbstate_t Extend __mbstate_t to include an intptr_t to ensure it can hold a pointer if required. Reviewed by: kib, markj Effort: CHERI upstreaming Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D53822 --- sys/sys/_types.h | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/sys/_types.h b/sys/sys/_types.h index 7aa7f7bfeb72..6be3d2c66012 100644 --- a/sys/sys/_types.h +++ b/sys/sys/_types.h @@ -229,6 +229,7 @@ typedef __uint32_t __fixpt_t; /* fixed point number */ typedef union { char __mbstate8[128]; __int64_t _mbstateL; /* for alignment */ + __intptr_t _mbstateP; /* for alignment */ } __mbstate_t; typedef __uintmax_t __rman_res_t; From nobody Thu Nov 27 14:56:11 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dHKHw4116z6HMhs for ; Thu, 27 Nov 2025 14:56:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dHKHw1DJQz3nX6 for ; Thu, 27 Nov 2025 14:56:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764255372; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Sp/5ry8UVEl8DZqyC0WoGOu55Zktc+e77AqURPt6Yec=; b=APd78rrAeZgdasgruwmkN+STE/67RF75+BY4nxeIJ9LfQMGqThThKoCF7+b2zo1EDBXa1T MatlW7y9gvXhWl8rzdv0eHkiLczxhwD8QVoUyu4mYYBQOYt+oEIOOAYvy+TFcNCiVYh3Se KmxZdDkrFnqPK8FJvjUYaYD6RiPcRcL9oINOESDYsl7TK+cM+9GLLWV9f3oEYTRIpqK+wN XQpwscUOfXdU/qiyB9kIQOArKEzeAHwlvVrTs5FC4CaVqCldFhaNz3QuJyBbSURcwWpXgy pEiDWG85rWKgDqYAx+cgm6Th+bvzqLTpHp+slnat/3Tk3ZOuhl9xGwS4CieA+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764255372; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Sp/5ry8UVEl8DZqyC0WoGOu55Zktc+e77AqURPt6Yec=; b=aYlnTKl0WSLNzOiO+Cs+C9HeSx/II4TYzWko5UJ+6RAFUt7rZGaYjFs3oX+3W+X0UKcRMt dwzNb4ifacBLcwnpeN2pTGx3mbe5Ly58XLKccFGnRTisDRcjFd+/jHx57RHeWpj+llf/Kz ZdaWun/IAJdnJqqqGyFcs7GH3o59gjYEN/e2JxCLjqzlDVo2taZKc9PFpt2KgbDDUHbMBq 6MiIPSP4/iFQiPZZcZT3DTGlgMisDIGS19eTEs5JVMWAerB3/XlKnsTnsuD85EPrTLy4EA srpAAShaXJV032JTgAVKKd/Yqo6734ONDDZb5iO8Q0TblX5v27Ll45frUAC8+A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764255372; a=rsa-sha256; cv=none; b=AiEAOuQqxKWakv/9DE71sPYwBQGxYOUgw4m1q4W7w8zCPWLfTUawQHWAr2sYj/3WBmR9e0 +1UPp5XmrhEfPV6r+KdTmq4OX2Ixn4qJYYHX/OGKqzAEqyAYdbFq8LmGXvLtQUa0VZ8vDk no1Lx0SiubCKdre3W03LEdBUYH37VlC6oMq7aNRQiN9jHfhZor8SYFvJwPGeBXxvr89R2S +0qxvjSrdVZt96kyIcodB4UyPlq5eHO2qs5Po1XcOMTv5MBvvF+1dGsmDcekowCGNpB6Yo 13zF1udWfMQNJPLPZe5WPoOPgHPp6dpYC0Y0B/j/kQJoHvCBuNMWP+6vIY6/Yw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dHKHv75SQz5s6 for ; Thu, 27 Nov 2025 14:56:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3074a by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 27 Nov 2025 14:56:11 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 4e22cd3bf0b4 - main - add types: (u)int64ptr_t List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4e22cd3bf0b4112e541bc585a6be57662cb0b52b Auto-Submitted: auto-generated Date: Thu, 27 Nov 2025 14:56:11 +0000 Message-Id: <6928668b.3074a.3eea8291@gitrepo.freebsd.org> The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=4e22cd3bf0b4112e541bc585a6be57662cb0b52b commit 4e22cd3bf0b4112e541bc585a6be57662cb0b52b Author: Brooks Davis AuthorDate: 2025-11-27 14:54:56 +0000 Commit: Brooks Davis CommitDate: 2025-11-27 14:54:56 +0000 add types: (u)int64ptr_t This type represents an integer value of at least 64 bits which is capable of being cast to and from pointer types. It is intended to replace various spellings of (u)int64_t there the value is expected to hold a pointer. This is common in Linux code to allow 32-bit and 64-bit structures to be the same and used other places including OpenZFS. With the introduction of CHERI this no longer works, but we need to preserve the ABI for integer pointer targets. Rather than adding ifdefs in every case, we introduce a new type. Reviewed by: kib, markj Effort: CHERI upstreaming Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D53823 --- sys/sys/_stdint.h | 16 ++++++++++++++++ sys/sys/_types.h | 6 ++++++ 2 files changed, 22 insertions(+) diff --git a/sys/sys/_stdint.h b/sys/sys/_stdint.h index 5bb089adfba3..a2caec7e9eb9 100644 --- a/sys/sys/_stdint.h +++ b/sys/sys/_stdint.h @@ -78,6 +78,22 @@ typedef __intptr_t intptr_t; typedef __uintptr_t uintptr_t; #define _UINTPTR_T_DECLARED #endif +#if defined(__BSD_VISIBLE) && __BSD_VISIBLE +/* + * Integer types which are 64-bits unless it needs to be larger to hold + * a pointer. These are to be used when the ABI for integer targets + * uses a fixed 64-bit integer to hold values including pointers in + * order to simplify 32- and 64-bit compatibility. + */ +#ifndef _INT64PTR_T_DECLARED +typedef __int64ptr_t int64ptr_t; +#define _INT64PTR_T_DECLARED +#endif +#ifndef _UINT64PTR_T_DECLARED +typedef __uint64ptr_t uint64ptr_t; +#define _UINT64PTR_T_DECLARED +#endif +#endif #ifndef _INTMAX_T_DECLARED typedef __intmax_t intmax_t; #define _INTMAX_T_DECLARED diff --git a/sys/sys/_types.h b/sys/sys/_types.h index 6be3d2c66012..e368f44f950e 100644 --- a/sys/sys/_types.h +++ b/sys/sys/_types.h @@ -70,18 +70,24 @@ typedef __uint64_t __uintmax_t; #ifdef __CHERI__ typedef __intcap_t __intptr_t; typedef __intcap_t __intfptr_t; +typedef __intptr_t __int64ptr_t; typedef __uintcap_t __uintptr_t; typedef __uintcap_t __uintfptr_t; +typedef __uintptr_t __uint64ptr_t; #elif __SIZEOF_POINTER__ == 8 typedef __int64_t __intptr_t; typedef __int64_t __intfptr_t; +typedef __int64_t __int64ptr_t; typedef __uint64_t __uintptr_t; typedef __uint64_t __uintfptr_t; +typedef __uint64_t __uint64ptr_t; #elif __SIZEOF_POINTER__ == 4 typedef __int32_t __intptr_t; typedef __int32_t __intfptr_t; +typedef __int64_t __int64ptr_t; typedef __uint32_t __uintptr_t; typedef __uint32_t __uintfptr_t; +typedef __uint64_t __uint64ptr_t; #else #error unsupported pointer size #endif From nobody Thu Nov 27 15:57:22 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dHLfV3hZyz6HVPh for ; Thu, 27 Nov 2025 15:57:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dHLfV1W1sz43x9 for ; Thu, 27 Nov 2025 15:57:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764259042; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3SoUQU3eZCvIy6WhEvF2pckmHEboYBMQxjWAIKgAZwo=; b=t7yd/BvC0QDJqVoN22K9imJs6fYp5czmt30LWH8Ik4h0H+ZaUjeoeH6E7T6gFBtu+PGLhL zkqJ90xu+YiXiUFIgwSYl1T0fHA7tj3RpeYsPsoN+5w6IW/avEUdvMc0Jkr6zXU39eQP3G iwLuk+P+fie15iDILpAXwba1PFOdzWwjP8CBaIaxzn5MiDDcv9NU5Qf5N+V3qmD2KTmpDA C/hBaESblLrv7yfNlNd2AMUs86Ffka4CYRio1zmOVH0SNQF/WYv4Vldaw3SbL0iTTsEmoP 2x7K2uO6xPrAK1FGrx06lqDCJwEHfNiqhPzUD+MbVNAapVMKzlzwAVvH7bwbcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764259042; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3SoUQU3eZCvIy6WhEvF2pckmHEboYBMQxjWAIKgAZwo=; b=t7AUd9lvh0jw5V+G98wWZVy1zSid9GSyPtRuLYmn6z4G8IYvg8eVWbIylgof/E+sEsLCuC 5P4hkhwU26YRMcayVM6hQ1owTqhSgqIV171XENlwcgf5a4nQugzZ0QKAJzjjgnxvueOuLF yl1i3pnHhTz0Q5RhQtj/e3hAK8/LyqXpT3pZXEMxX7nTrUWsaAvcVWEvNdERNHZcP7LGCV FTQ8hGca7lltwbY+yCb/Jv6U6zMwmELBs3nyORpACgjm7TgoesjVoU/R/2h8E6a9iIdo0Z UU77/lBVu2UOaW4hzfx1Bo2ERtV5IoOfiQpfublHSI5RiTU90yZHLuzOxP/+Pw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764259042; a=rsa-sha256; cv=none; b=iRc1iF7Agg76qItmuCDpKSbGLtFUyH8GmtqZNlt6EMTMV6WgmfRzQWMTevUTd06GzndAVS IsPmCn3bRXCHq29FtuUh0Yf7BOGvR2Kd9fvWewnLXIHBnXAEnhLJa5IlgoH5+Oaw0Er9Oe I0hvqso2wwcudPKATyfl/dp7T8CroeKadNgYjMDsWOlR2hCBT4e8te/Go/+/mw3OMzWh33 TyDntrnPWh/5fLfWxzQRrADu6bV2iqgC92k/M2ld2baN+qu8zkB1NOlci4b4tnfihHCRvF tGPwgRtJ2/7S9mDqEl6aayY73L+hwf1wRL3bU7ZtQQb7+OfP7vjL5Eq9vRRQUw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dHLfV0jfMz6T9 for ; Thu, 27 Nov 2025 15:57:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 35e47 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 27 Nov 2025 15:57:22 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 56114d2a68d9 - stable/15 - max_align_t: apply alignof to 'long double' for long double alignment List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 56114d2a68d9bcf86322fa6642be2af0e2fd183a Auto-Submitted: auto-generated Date: Thu, 27 Nov 2025 15:57:22 +0000 Message-Id: <692874e2.35e47.23dfdd65@gitrepo.freebsd.org> The branch stable/15 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=56114d2a68d9bcf86322fa6642be2af0e2fd183a commit 56114d2a68d9bcf86322fa6642be2af0e2fd183a Author: Konstantin Belousov AuthorDate: 2025-11-19 14:51:54 +0000 Commit: Konstantin Belousov CommitDate: 2025-11-27 15:56:57 +0000 max_align_t: apply alignof to 'long double' for long double alignment (cherry picked from commit 39cad8402d19f361cb8d489a3a69ff94b643c6df) --- sys/sys/_types.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/sys/_types.h b/sys/sys/_types.h index fe345b43d5eb..6b70b8dc6e32 100644 --- a/sys/sys/_types.h +++ b/sys/sys/_types.h @@ -183,7 +183,7 @@ typedef struct { __attribute__((__aligned__(__alignof__(long long)))); #ifndef _STANDALONE long double __max_align2 - __attribute__((__aligned__(__alignof__(long long)))); + __attribute__((__aligned__(__alignof__(long double)))); #endif } __max_align_t; From nobody Thu Nov 27 18:07:35 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dHPXs1bHYz6Hmfb for ; Thu, 27 Nov 2025 18:07:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dHPXl70pTz4Plb for ; Thu, 27 Nov 2025 18:07:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764266856; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9lFvY51gmG0ODYPSZW356EZnUPS3QQTUBVvCITjTOr4=; b=CDSpP0HghMi0RQL2e8k0B3w0Hmy1TTi8ebs9pbYWrhEtyX/AF6SJBj123NGQQV34b3FSqO 0qB7JJ6MOD/PmqFu27JS34BXNzQV/WFunh5vdg3wmCZKmhm9w3UWlLoKZz60vTzmzRvkDS wkDL6Ni+g0cAOJA5Qs0HPdn6AVoOWML98BtDMjf8tIQOIuriLKO0vbehKdihp5JS7KGFOJ 54r8sGreh6zA3zXqSdEumQ7cez5jHcGtehcr+yAizbvrksgyqgPx5oM/ddT29oLDkEipPe ex5DX30XoNZZvx3DGchnyBnA8hLwDaal7LE7YHOTKp6eTE/YLdypNtNHDojDig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764266856; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9lFvY51gmG0ODYPSZW356EZnUPS3QQTUBVvCITjTOr4=; b=gZBzaum+qOZ7uA0tTY8JHaYHLnEW3dUtkxAZpkHFVa2mhKOHBxzzLNy163lgusFiK/yVoh Sy7Th99pOnsnZRIGVnXSZUdCfhzIILDC6wVKLm2O9UXaeBl/WUBGpDZaazJUV7ARK67N+Z ODi3+PUggSCZUuDuHCbJgtJgBrt/Ac/j/tG205krfAkIHTC4/5ThMy30By/tE8a8uo8zCM whohpjY7u43VffEyhJs8fb6fd8onoafeGtD6O6BgxAWJd5iFhVG0bggMBDXFJwoiI1HDiP HnnFIw/OEH7YztgXkDogbU7Ut4oCEHznmDeCuo0nocXWWDqjYq4BKgh1iGZE5g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764266856; a=rsa-sha256; cv=none; b=jaoekgvYp9VnS/2ZuVWyINoVL5w4ArKF3HkETU/JoUfSan8pcC0aCgl/KesTUlZXUFltXi I1pcF1ln1NFdusu2tHfoLqqztVkVd7Pw+W37NIgGHLgN2Ud6bMyKg6A4ezyHdR2+umCxmx VpYkoB/JW7QN2p88iSQsZbe3v9oIPlKsbE/Y6J+Zz2bdHnFdBP/SgrB3zxMRZcOFU/F99k /VOS71PMXmC2r134jRaIj/X9f8cvcSQIWJ7FrRonjHmJAqNrkNYFES+MPhFino3Fmh2Ke/ MQU7KSumDMu9lBZZ28LcdmP06i6+egXf4DqbMrdzHAxY+t4hFSSIGK9pNPU7+g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dHPXl5zcMzBpC for ; Thu, 27 Nov 2025 18:07:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id a7f0 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 27 Nov 2025 18:07:35 +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: b3e53f9fff11 - main - git-arc: Don't require devel/arcanist List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b3e53f9fff11e2e6289f5c69ad08f5acd727abd6 Auto-Submitted: auto-generated Date: Thu, 27 Nov 2025 18:07:35 +0000 Message-Id: <69289367.a7f0.52d52c35@gitrepo.freebsd.org> The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=b3e53f9fff11e2e6289f5c69ad08f5acd727abd6 commit b3e53f9fff11e2e6289f5c69ad08f5acd727abd6 Author: Dag-Erling Smørgrav AuthorDate: 2025-11-27 18:07:15 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-11-27 18:07:15 +0000 git-arc: Don't require devel/arcanist Instead of invoking just “arc”, which requires devel/arcanist, which conflicts with archivers/arc, invoke the underlying script installed by devel/arcanist-lib. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D53942 --- tools/tools/git/git-arc.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tools/tools/git/git-arc.sh b/tools/tools/git/git-arc.sh index fa618cdcbc22..f33a73334799 100644 --- a/tools/tools/git/git-arc.sh +++ b/tools/tools/git/git-arc.sh @@ -171,6 +171,20 @@ get_bool_config() test "$(git config --bool --get $1 2>/dev/null || echo $2)" != "false" } +# +# Invoke the actual arc command. This allows us to only rely on the +# devel/arcanist-lib port, which installs the actual script, rather than +# the devel/arcanist-port, which installs a symlink in ${LOCALBASE}/bin +# but conflicts with the archivers/arc port. +# +: ${LOCALBASE:=$(sysctl -n user.localbase)} +: ${LOCALBASE:=/usr/local} +: ${ARC_CMD:=${LOCALBASE}/lib/php/arcanist/bin/arc} +arc() +{ + ${ARC_CMD} "$@" +} + # # Filter the output of call-conduit to remove the warnings that are generated # for some installations where openssl module is mysteriously installed twice so From nobody Thu Nov 27 19:49:35 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dHRpR6zSSz6HyjV for ; Thu, 27 Nov 2025 19:49:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dHRpR6RYZz3SlN for ; Thu, 27 Nov 2025 19:49:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764272975; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+YfcBcfQr44X7bA8WzVxTs6Dwk/ugaz7ZUTyfS76olU=; b=Va+IWnLLg13WSJlfVLCfD4D+tyDW8vWcWmcyYrQXIMN115/oWPGCFexq6LqdYzbvEElt5x OjdHeayyJ17lyw73nRcw1Oj7QSGlV9rx1DRny/ngboiGbOuSId90hw4b2vrHRuztKnZTKT RIybydZZkQUE9HAdd3z+U23vdQmM3ZGrK/V6okqLl8bYQ1j+qKgYNInpQ48OeoFQGzmT6D +5uFS/TqDiSXAK+6UgtKncDUemUOWO87fJ9nApXyRjdD5WTYMqBeI2tsWBF/UNUx1anlj4 d7izD1xVlvYBhcapErC+3HpqRCbIQ7DVfA+2WtxmztzvR4EdafJpeAJt1fId2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764272975; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+YfcBcfQr44X7bA8WzVxTs6Dwk/ugaz7ZUTyfS76olU=; b=yLEv4U+ZXKEXYTCaPpjKDND7iqvaRFZOJaeOyUvSVIyhFBVGpGttC6lta4zCdFuPtUfGQY Mguo+yVnNb8Tw/TNbXVJDbJMV7k/3xb/pk76YTuM8dudu1vae/05tbjmw/8+dtza6SgaDD c9CtB5YwhlKhW2QrE6FAnaS0IdvS/ZyesrakMJq1KZcPTO3ekQnPTk/agaEwCBPtEAI1yD RdmxEHX+zP1CaGZFulB/2wqTbdNnK2deDHR2GGuFGaoIEY97syD55pEicmkEHrRHFkpJXv m2rYIf+8rcMfYMRizMv5iNzDf4O1OhJk8xAZ+9WMkb8GuNZrWGS+cHWm73Gjpg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764272975; a=rsa-sha256; cv=none; b=QT8RuuArH6xYr78XDJd/m2SzbTlU7IauiQ9KmgSceu5KjHN4GI9GbYcwnc1sO75USiWLkC EWlvkiDk32VFz2Tyyc+++ZsrLu04cF1NqoZVFhXAnicPDSO90e5NjXoTT+HhLDCSeMWzmP DSmCZD/j8tEP5HHmDhlm59ofTtCB2OfgSQ1qMgDWQ9eQG5MHROVt8nC0DzziFmDTUUvlLW rv8wAuvjPnMbRoIwz51m5AVa+XQ8cX75bLhxcY/NxizYTvrYtQpQgUMw7jfH9g5jlNUG0W yx/3pHHB2h45GRIx3R+qwBrcmXca8K0XYwaIG4N3D62/qR9XgOjN2kYLN/3gIA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dHRpR5sS3zVRL for ; Thu, 27 Nov 2025 19:49:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 26d49 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 27 Nov 2025 19:49:35 +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: 257da67d2808 - main - git-arc: Fix existence check List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 257da67d2808b7abf6c53569532ccf26db3008b0 Auto-Submitted: auto-generated Date: Thu, 27 Nov 2025 19:49:35 +0000 Message-Id: <6928ab4f.26d49.7a239fef@gitrepo.freebsd.org> The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=257da67d2808b7abf6c53569532ccf26db3008b0 commit 257da67d2808b7abf6c53569532ccf26db3008b0 Author: Dag-Erling Smørgrav AuthorDate: 2025-11-27 19:48:31 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-11-27 19:49:08 +0000 git-arc: Fix existence check Fixes: b3e53f9fff11 ("git-arc: Don't require devel/arcanist") Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D53942 --- tools/tools/git/git-arc.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/tools/git/git-arc.sh b/tools/tools/git/git-arc.sh old mode 100644 new mode 100755 index f33a73334799..eef01b75663e --- a/tools/tools/git/git-arc.sh +++ b/tools/tools/git/git-arc.sh @@ -786,7 +786,7 @@ shift $((OPTIND-1)) [ $# -ge 1 ] || err_usage -which arc >/dev/null 2>&1 || err "arc is required, install devel/arcanist" +[ -x "${ARC_CMD}" ] || err "arc is required, install devel/arcanist-lib" which jq >/dev/null 2>&1 || err "jq is required, install textproc/jq" if [ "$VERBOSE" ]; then From nobody Thu Nov 27 19:53:26 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dHRtt75hZz6J0WS for ; Thu, 27 Nov 2025 19:53:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dHRtt6RQgz3TbM for ; Thu, 27 Nov 2025 19:53:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764273206; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=26N5/z6Z5Xlc84YKGYnPzkfCyPBw87sqzR2qGpR99NM=; b=rGbsYaU5xq4mW02KUcMq/v8EuigxA9EXSME6aQcZMicDHeiSYp5xRHZpM8ZyRvsqrTah1R ayWSDrevezM54vWZS29sSyu9UkupHb8nzSSk5mrcb+g8iRC3C+eHL03oXNGii1nS+rgzzs wUBOp70giO13ksskZfHms4N8AIGtYKGbZimOcPe1gesNiJBjCGhuvnDC1xyqCuyhB+o1OM zFlsfJEO593XHy55LHfcqMDMkrOpMw8naFfW5NE5VoS1wf+eROxidkHgzO/bZYGl7lr5P5 GakVEYVqb7yw+sBsJxvE0QoK1s42WSDI3P236d4LOUS53enSHSdgXGh6G8mBKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764273206; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=26N5/z6Z5Xlc84YKGYnPzkfCyPBw87sqzR2qGpR99NM=; b=oMexJLVQnGK4LLVHUMUgBYUk5gvlmFE/lYlf9PGOQIe+9xWxhrKEqb+YM+clyMPs3bo4QX M7w0+qk61QWHIcjebHtlf5y2iyj9VQhl+tUtsUo3e1DtNdTRejTiOQQ7VB196cNvvfX0LQ UmwF2byFcCh19Xsq5/M9oFuNmFu+y+O7L/HMHYfc3cVqTt5EaqWiqOxDOPOF6lGrSK1MUG bpV2FEtn3FIT3ViKp/ZrMTeYqjBjK9EIOAKNXAhfJJToM02Y7MZ3O9aRPhnb828uDqlFsn rMpQDOhj2yAWrdDouU8yVFwZafeNRiD2NmjGswm7YkJmOx3A3is1xW3wuRfXCQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764273206; a=rsa-sha256; cv=none; b=issilxeW2v6nFKq/OZ9Ym4Zk+hi8opTn0Zqdfk7g1/XQyPYhdIe2oDv+0JzmQhrLEouKgd nrcNElrbBtK/Ar0KAiScIRulQzzSH9Zj4aTgBbH6Kp5ASMZCs2lyyVEc4DIj3wqCf+7sSv UqruWD2c2Y4/dEVWoOhrxPEEFcHbvofkiyXOElf12R7LzgQjT/CoWUVcCR3IBneqYQqEIz jx+O7KW2Qv0iwiQQnRd4aE+kgHyLxpPbU1+zi0btzn/pq928Aw6rd9dgW8iYV5fP5vlZ+f RuXp1XHTWYAQNkEXQSGbGtblKv1vgrzSmkaSusF+mjyruvE4fOtAbvpPqEuH+A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dHRtt5mW7zVrX for ; Thu, 27 Nov 2025 19:53:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 27c06 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 27 Nov 2025 19:53:26 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: e60861eb41ca - main - bsd.lib.mk: document INTERNALLIB and PRIVATELIB List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e60861eb41ca9d141a0d967db3ecbe2b2909c300 Auto-Submitted: auto-generated Date: Thu, 27 Nov 2025 19:53:26 +0000 Message-Id: <6928ac36.27c06.6b843965@gitrepo.freebsd.org> The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=e60861eb41ca9d141a0d967db3ecbe2b2909c300 commit e60861eb41ca9d141a0d967db3ecbe2b2909c300 Author: Konstantin Belousov AuthorDate: 2025-11-27 16:41:29 +0000 Commit: Konstantin Belousov CommitDate: 2025-11-27 19:53:19 +0000 bsd.lib.mk: document INTERNALLIB and PRIVATELIB Reviewed by: des, dim, emaste Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D53948 --- share/mk/bsd.lib.mk | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/share/mk/bsd.lib.mk b/share/mk/bsd.lib.mk index 159957b6300b..e3b3d760ff28 100644 --- a/share/mk/bsd.lib.mk +++ b/share/mk/bsd.lib.mk @@ -1,3 +1,18 @@ +# If INTERNALLIB is defined, we build lib.a and lib_pie.a, +# i.e. only static archives without dso, in both non-PIE and PIE variants, +# suitable for static linking into binaries. +# INTERNALLIB library headers are not installed. A component that uses +# the library should add explicit -I$(LIBDIR) to CFLAGS. +# +# If PRIVATELIB is defined, we build and install both libprivate.a +# and libprivate.so, so the library can be linked dynamically, but +# cannot be picked up by third-party configure scripts. +# PRIVATELIB library headers are installed into include/private/. +# +# If neither of control variables are defined, we install headers into +# include/, and both non-pic static and shared libraries under the defined +# name. + .include .include .include From nobody Thu Nov 27 20:35:46 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dHSqk5cgyz6J4j2 for ; Thu, 27 Nov 2025 20:35:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dHSqk4BBCz3Y4N for ; Thu, 27 Nov 2025 20:35:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764275746; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4kJyhVTUgXsF8Tnj0FUi0mTfMsMSpASj5+PADQcqUsQ=; b=qCfqtr5D2pquwFH2Id9EncDw46tCd6PwPmlMa4p8qo4GEh1KtNrybNJ9LjVc5SOx9IUbDK lmhJF+3uajxrzf2ZIP64LudyvofTLq6LLHn4LD9Pg8v52yywSE7CivmrOlPrdhHK6nsHJ/ MaoINzAOLyBUpxKlYUY+kO14DWSq5Xb4S/aa3umgDsnoYk9RSaRg97lhf3KIhwzPlzTG0g 5vLE32eWjh3iXt9pfcUBddRWQTiI0vORDyMgZ9XLP7LjAxh/Jt1MXdcXrQzNu1IK5/mw0T kZ5Ip2B2QgyTXW6JmAgPaQtyWoFggHF0SY4QYDADt22RNk8RDq8O/XtSiS7/nw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764275746; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4kJyhVTUgXsF8Tnj0FUi0mTfMsMSpASj5+PADQcqUsQ=; b=ApjBiwBRjH9v1vQc6HZUtlmmxbcYQ+EAMSyLKuZDrCi2xQ4AUqfD1r3dj9VN88f7141/qL 03S3JgGu/eo5WeMI7qFHMhXckMTL/O6KAdh/YCcLziFJyPbSgbAh2gluvYopbAxk2yjyMt docq/SPMJl5TVptgOdD5SPbBEnDYQ3aqfYqfxPoC0+Rs+nJF7gTO0X0n1vLJprCFeSqR/d 2CSduM4FztLPqPmFngEKZ4Cynyjk0DrOeY9jF7cHQcN69VXuvu9k4SwS46/AP9do46rzY7 6qmLBtkoesMgvlGBnTgkjsJZCuX4sOqZt6Epb84Np5jLJE/4ciwdbtYgVg8fOg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764275746; a=rsa-sha256; cv=none; b=ItI8OxOYtuaILtmv2gC/YQQv8BIimjN/7Jq9YkgiVTx1RDWwV3Yv8DTKP8qFTj/tz2uGjp hJulV6jrYhmL2K8t2eaAUtypLIizrU53IYnc6HE7f+gKsPT6CX6oMqnVS+e2bgKxTqdipt US9xIHBPJphXyCc/WBQmzYd2Mkk75KNGy9d+cOGdVkCNzM8NubLefiuFtN9tkACBxGrZxj Cj5zX52p9J60T9M8U6jtRwkbuDa1vvGhTq4lQP+ZE7kC7hzafH+AwK2ZgZK/c7GXMO5oUT 7+2Is8KeeJPjeqEj5QZDimaitwk/Z3sgGkrYWYXXYkFAiA0YNPV3ERnk5HUd3g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dHSqk3RlczXdt for ; Thu, 27 Nov 2025 20:35:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2ac66 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 27 Nov 2025 20:35:46 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: 7521dc5dce35 - main - exports.5: Typo: "auomatically" => "automatically" List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7521dc5dce35159add70003340e1555456721a2d Auto-Submitted: auto-generated Date: Thu, 27 Nov 2025 20:35:46 +0000 Message-Id: <6928b622.2ac66.176b2011@gitrepo.freebsd.org> The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=7521dc5dce35159add70003340e1555456721a2d commit 7521dc5dce35159add70003340e1555456721a2d Author: Olivier Certner AuthorDate: 2025-11-27 20:27:14 +0000 Commit: Olivier Certner CommitDate: 2025-11-27 20:35:31 +0000 exports.5: Typo: "auomatically" => "automatically" Fixes: 9d975e47d5a3 ("exports.5: Clarify that exported dirs should be local mount points") MFC after: 3 days Sponsored by: The FreeBSD Foundation --- usr.sbin/mountd/exports.5 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/mountd/exports.5 b/usr.sbin/mountd/exports.5 index 786411fbf6d8..0362ad552670 100644 --- a/usr.sbin/mountd/exports.5 +++ b/usr.sbin/mountd/exports.5 @@ -83,7 +83,7 @@ As such, to avoid confusion with respect to what is exported, it may be prudent to limit exported directories to server local file system mount points. When exporting ZFS datasets with the .Sy sharenfs -property, this is auomatically the case. +property, this is automatically the case. If the .Fl alldirs flag is specified and From nobody Thu Nov 27 22:09:46 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dHVwC1WQ6z6JFfg for ; Thu, 27 Nov 2025 22:09:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dHVwC0jfwz3h60 for ; Thu, 27 Nov 2025 22:09:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764281387; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Rb9zN/zC+z3viyIh1sEAgj6hNP63Ya3d7gNVo37Kx88=; b=nHNlYMW3EKF/A1Egn28eBbzy8u3UKjj/I/m0odHhdOAT4VT9qBpDw3lSgsupQbOLvq1AEV +/4k2TfMpwJDuLk4LTN8HRTcw9k5xxTYBoz8btjPa0lXzFdOudZBieFa8Gxn25NBgAq7uj DfBQzxn+9A9tULp3aOMlXFCDTMVh0LLX8mm4dY9+TsmLcX7IUajh5NBaKh0ySvriDyJx2F wMIcEf/v7Gjfv8nYs2kziO4hdrj1W60RZzt/8TDmniuts/7elG9hS7LJCLV+hAY2as9ew6 4TM8qBzv+d/Iyk4Uz1vkdJHSNO4qpy8qnVvqM7OjOd5933Rb6g0BJ2CJZBTYjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764281387; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Rb9zN/zC+z3viyIh1sEAgj6hNP63Ya3d7gNVo37Kx88=; b=Boxl3RZAhtRLBMnK1cIUJmo94ZZ29dMLcQfZLsoJuhhQ+YbW1PRIb1KuPSevhvIWdhNA71 Zud/1h0LTP87K3fxrsL+8KegK+I/VIenVFzqNZAAMR+OOf7XNQGOX3iBADHSk1eZEN/J1K 0/g8NCNuyF7s5szuR8KJSvWxZWQcKwhJlfjE5xuJp2P4PfpNqLLV96RVo7j27Wcf7qEGTT wABZT8Qv39LjCT5zdwWfY7VWN/6QF6jLI/e81forzL3kAk2TR5EbqKiH5al5vyPehevKyl mg/Qg3pLQ+T2NUBNZlPJSLOmJjQqA1TWl42q0KVCr7THd7pSxH2dqOUh7GixeQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764281387; a=rsa-sha256; cv=none; b=B2x1N8Jl72Bos18F1i6VfvC6LVOnELLRFCfg7xKOGXbIo5jLXUU7NaHKwznMVgCfGHYCTc DJu9VnsGjtSbiZxzDZOx17t9/X/d3HZq59z2qQwm8lKcRJrWbikYKpKaxv3cNzHM5ZgIfP 6QjjecXXqM1Oq0G/V36ST8HB/SBr9Cy7uBKuKaYTNwnE+Vs/aVr5/jl2ErkU7JhwPgXimH bwFnTDu+8pyMDs5Qyl3C8mCdl11XjKiYDuvpIPIplZSdcwK56X8PJfyfOILu4xkW8K0gk5 s6XBm/iG8DxRl/50VE0EoXXnhVhUqIxEMolfWlb3zaa9BKnz4Ldh63KORgxpfg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dHVwB6fntzbP9 for ; Thu, 27 Nov 2025 22:09:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 328eb by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 27 Nov 2025 22:09:46 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Philip Paeps Subject: git: d4e9c5ac6eab - Create tag release/13.5.0-p7 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: philip X-Git-Repository: src X-Git-Refname: refs/tags/release/13.5.0-p7 X-Git-Reftype: annotated tag X-Git-Commit: d4e9c5ac6eabed5bbf25e00edb0884e89afa4209 Auto-Submitted: auto-generated Date: Thu, 27 Nov 2025 22:09:46 +0000 Message-Id: <6928cc2a.328eb.5800cc53@gitrepo.freebsd.org> The annotated tag release/13.5.0-p7 has been created by philip: URL: https://cgit.FreeBSD.org/src/tag/?h=release/13.5.0-p7 tag release/13.5.0-p7 Tagger: Philip Paeps TaggerDate: 2025-11-27 22:07:12 +0000 Tag FreeBSD 13.5-RELEASE-p7 commit 4fc17862cb506bfe121c293500177e8447120068 Author: Gordon Tetlow AuthorDate: 2025-11-26 16:12:10 +0000 Commit: Gordon Tetlow CommitDate: 2025-11-26 16:12:10 +0000 Add UPDATING entries and bump version. Approved by: so From nobody Thu Nov 27 22:12:11 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dHVz00fldz6JFwy for ; Thu, 27 Nov 2025 22:12:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dHVyz6MbZz3jdD for ; Thu, 27 Nov 2025 22:12:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764281531; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Hida/O4DC3mZNjUy1UE5rdqzSjGBy56/tuTZ20gg0aM=; b=VLrwkyH/SiOuKgDYqvkqUe1z2Tx3M6Kz0G2EwLE5kOC4w91BgrXhXePjq/0PoWowd479qz Qzvej6dfTzQ5FSFUom/91F/+W91pdAewpMlL+7OGiomXxYjX8fdmhx9nXDsaajyHve7Kat Ix17+qTen22SUYD0RCmQETGCl/SqRnQrl9uKw7lcw2EMnaZ+cS5qQBWqavvxItmr6ehz/E zxze1P/YIv84GDz/oCXUT8q9dCkh2xYL1QzeA11HDFAaTVR7bbD2ONniHv1BcBU/RpbMGL YnOeyqAjxrkzX9+LJYBD1RQ1FjSveOdVUlPejSGnc8/QQIdxPtVAUINATlc1gA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764281531; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Hida/O4DC3mZNjUy1UE5rdqzSjGBy56/tuTZ20gg0aM=; b=HAM/2TJHXC7aDJyHDLq4prkY2wEX3hSUhpaWWOawJKeRCPBHjSt4MC668ogPE/D+wYAj4i 7m2OtrJu6tP1hEu66/tpzyGBaB4xKaAkLLA2o4lMbxk6ryf9Mo4SgOyzoZ/V6WqQkklOp3 UfgzcRqYSOtk/pqvyHELzIZxzKV6PxYVDpqKZpWPkHd8lMlodKUiyjOi20lESNKv99h4T/ AuednNXccSFWlcpsLDY9OwNDVzUMYqmF3XvZpf7pqzWCFitT3qorJFez5EXmhvpjVlBamC +5U8IGSi/sDL17VRgzXdBu3rQ1pWHaGL9Dty+YFBbHXM8D8rA7myT3Ly2c3ssQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764281531; a=rsa-sha256; cv=none; b=bIAtZ/ZAvYmaPXcbJJwvxNyKhRsvbzHLBoZX8Z7T+Xef+VLBz/m7LaCP5z+9A8rDFkljXY mrrQd45i7Qqyg2hCL6ihvI0K5UZCn0A+g/VkPEKoUbJHyteE+a4P4g1XhNpDitOX/MPScb KLyYOqkzDPWYQe97KZgW7USEv7NzCer40S1NJKuPCnaV1shcBqG7TouhAcjADvmkewlczu LmqyOpdME/l9qOGINee8XVLEvPHjr/nc+PR74Crj/M+Rhcz2/Z3QMFQ1dZ1l8J8Ida9TF2 IGEfMWQiy4BXBHrhv5NN/VPKDHm00vKQDOw9FiEW30mqOspnOX6xkiEkvUHbWQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dHVyz5brWzbq4 for ; Thu, 27 Nov 2025 22:12:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 35adc by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 27 Nov 2025 22:12:11 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Philip Paeps Subject: git: d091602e3e89 - Create tag release/14.3.0-p6 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: philip X-Git-Repository: src X-Git-Refname: refs/tags/release/14.3.0-p6 X-Git-Reftype: annotated tag X-Git-Commit: d091602e3e89857013949ff86ee814d373e86c97 Auto-Submitted: auto-generated Date: Thu, 27 Nov 2025 22:12:11 +0000 Message-Id: <6928ccbb.35adc.7678d90f@gitrepo.freebsd.org> The annotated tag release/14.3.0-p6 has been created by philip: URL: https://cgit.FreeBSD.org/src/tag/?h=release/14.3.0-p6 tag release/14.3.0-p6 Tagger: Philip Paeps TaggerDate: 2025-11-27 22:09:54 +0000 Tag FreeBSD 14.3-RELEASE-p6 commit 476b20984a6fed7e966f7b790444e23700603b6b Author: Gordon Tetlow AuthorDate: 2025-11-26 16:12:27 +0000 Commit: Gordon Tetlow CommitDate: 2025-11-26 16:12:27 +0000 Add UPDATING entries and bump version. Approved by: so From nobody Thu Nov 27 22:38:59 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dHWYw15tHz6JJmH for ; Thu, 27 Nov 2025 22:39:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dHWYv6JtKz3m0g for ; Thu, 27 Nov 2025 22:38:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764283139; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZynmZaPBKq8XBAFx7ooD8laXcGpZqt22ZUJPj36BvhY=; b=YPnccAP5QCEzhuBTyuKji0+XH5oQMlt2sxk73hjcDkGLPcZeOUMZGSH2Rnr6CoCtcKFhmU Cj0epKas3a4Pq1vd8EkpfGegsEDoT4Ij+sEAAwMYjHtsx3gOwSF/IwMdXupe+gVnGcNe9N K8cHqfYScH9cGcuW2a9vrRWXAg/zI04J49FqhxKjt50lOKtPOy8hY7m2ymNxLoKxp0u45Y 404u5PdrgwO6p88LYP7jp8lyUrA5c3bUAC1KsTqeZmWNbL+JWFsmrqTnjDPVtcOQzHWsGO 8YBoK02O2rF4k/uT3FkuzfDsUYqx6jzELkodQ0bdnhYRrhuGzDzdDAjsAk1h1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764283139; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZynmZaPBKq8XBAFx7ooD8laXcGpZqt22ZUJPj36BvhY=; b=Nq3AVH2dciWq1kqAbkVhjbhuHXEqOIJe1/I6Wojdv4kvtxinX9Wmg9zN0HpEiFgTmyCvml KfgsnHa2BolYxzzZO5TbDVuNsTlc0PIb3TK/Prq8QqNSXd0Mp2ST97Q41QH7jcRuY/zgRN 9wIl6VCg5IZmj9nrEZ/rgXE6LPSrYd/sPhjnD54r2c2nLDRjw2YCLvM+SycT9EarPI7o2r s/Kg9HW0rEbG6iqjRWnBDlkEGIUNZZqcSG1HN8/FgqnrCt1RU8JTaKMSLSb9q+OOA+Ira4 y1O2qds8Coh4ueBLumvx5foUfqmOTI7WIosRr0kAkjEZ0Z6hl7IDh7ykCDp9zQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764283139; a=rsa-sha256; cv=none; b=M2msYdLOp9wDawRkB80cgcvUxoc5O/eoai8vMJq3INi4jOXMk+Gmdk2bbC0G0GPVSj/FKc g+a9uiCHhL5IQZ3qTMjwapX5ke4ax3b/J5aPDfWInU68nsyxrWjhYJMPY4KtY0JTCqa6l4 OilxwUXtYqFbdQ9hgGG7uuZvZHWNpwfgm52LBeK3BrAoIu5EZVN6FEjY4Bj6n1pu891KQI WNZue31qM0sVNvGtlRkiii9CR/gpMyxFsHsYuLBUFFTeghfscYkJ2xrqz06N4ewI+ZBPl1 ilASatse1uLZPIstZLIhQgOLxSwjZ+0TPECXs/UnWrJcPf7DqagE5gMIvNgrDQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dHWYv54qNzbwr for ; Thu, 27 Nov 2025 22:38:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 36477 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 27 Nov 2025 22:38:59 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Colin Percival Subject: git: a3b0902d7390 - main - pkg: Move FreeBSD-base to pkg.freebsd.org List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a3b0902d73901e7243103e60cf78c53cd7f566a1 Auto-Submitted: auto-generated Date: Thu, 27 Nov 2025 22:38:59 +0000 Message-Id: <6928d303.36477.2230b6ef@gitrepo.freebsd.org> The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=a3b0902d73901e7243103e60cf78c53cd7f566a1 commit a3b0902d73901e7243103e60cf78c53cd7f566a1 Author: Colin Percival AuthorDate: 2025-11-27 21:30:10 +0000 Commit: Colin Percival CommitDate: 2025-11-27 22:13:52 +0000 pkg: Move FreeBSD-base to pkg.freebsd.org Rather than fetching packages directly from the CDN which currently backs pkgbase.freebsd.org, requests will go to pkg.freebsd.org mirrors and be 302ed to the correct servers. This adds ~70 seconds to the process of installing or upgrading a pkgbase system; it also orphans systems with 15.0-{PRERELEASE,ALPHA*,BETA*} installed since they are expecting to see pkgbase files signed with the pkg keys, not the new pkgbase signing keys. Reviewed by: dch, philip MFC after: immediately (for 15.0-RELEASE) With hat: re Requested by: clusteradm, core Differential Revision: https://reviews.freebsd.org/D53964 --- usr.sbin/pkg/FreeBSD.conf.quarterly-release | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/pkg/FreeBSD.conf.quarterly-release b/usr.sbin/pkg/FreeBSD.conf.quarterly-release index 035d0ae976b9..47183d41dc6d 100644 --- a/usr.sbin/pkg/FreeBSD.conf.quarterly-release +++ b/usr.sbin/pkg/FreeBSD.conf.quarterly-release @@ -24,7 +24,7 @@ FreeBSD-ports-kmods: { enabled: yes } FreeBSD-base: { - url: "pkg+https://pkgbase.FreeBSD.org/${ABI}/base_release_${VERSION_MINOR}", + url: "pkg+https://pkg.FreeBSD.org/${ABI}/base_release_${VERSION_MINOR}", mirror_type: "srv", signature_type: "fingerprints", fingerprints: "/usr/share/keys/pkgbase-${VERSION_MAJOR}", From nobody Thu Nov 27 22:39:22 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dHWZL2YY6z6JJrT for ; Thu, 27 Nov 2025 22:39:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dHWZL1xNtz3mFj for ; Thu, 27 Nov 2025 22:39:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764283162; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NG0kC+6AN/LOuvaOd5I2Sqx2EPTDAR7litRqF5g+gDQ=; b=oFh9/jQEJkQPptCwyzatqmUFbvBuQvCTSa33EKbo2w/hhJz6zPscwPgwpM0hRYGWXeOEzu 7A+D6J/W3VKzq0BmeJCe+OuUyf9WA+u6HObD8vkQoE0YQxgiErE0i2/+wQijtAq/khSSLS NE+k3aXofW24qPNCI1DCXPlv+Zl7wEub+/Lz60gvbJVC9vssdhLGzBSSY0uQUlHEeiWBhQ nTEJ5aK5PD12M9tbvVEW5LdyfBKM+odyJ3NgSJ5m4YVzIpMF3dcpdxREMZw4N8gcX90tOt tlYkHM8+4i6wohZm1lbuywDr3f9hW4xmJ8/5zCGaz6wTDCugDUe6u74F0UH1ZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764283162; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NG0kC+6AN/LOuvaOd5I2Sqx2EPTDAR7litRqF5g+gDQ=; b=AOU/vD82KVZfp0uW/HMnAYqpkFrCZ/OyGu4iyJIYNSICLGttUSenNV9WEcRT6F9S4PpwNi xzecpY3wGZN0N8qyyzGHm/HdR8MKBiwQfwi6cTBnI1Hms/GtSmSsl0V+yVLOEY6FaH89sJ VhF9qLZ48U/lMqcv9EpB0/qzYnopfILfSpNhfI9bLoK2gp1wPjZqyRTezrzQmT/ksBg7pW mjXbAByaPAbVZrY55FPW4H4apsaQQ3OErOnstscGrysktz989CTgI/shxrNNZmFD03saJ9 AWR8LcP5Ot39+b+wuDGx5NRpCr4qjadQjcxEntvD+4kCk/7cFG5axUsy++l6hA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764283162; a=rsa-sha256; cv=none; b=I39dw7YAYzVrj/Z2Lmf1PMi/Cjb3qakjqn26iHganewaP3hhnIWUQvoI1QyseUyX+6djc9 +bHuAaZ99rUf9dTRiMf2nXYt256FvHE/ddFpevX1GwVmXg5UCcwobxrujxMCuio/QiEsJv dJfJChqhGxY210PCBCorn/SzEEWtLP3r3kqlYtYZCnuWFqlUzq6NZn+SC2yc0CK0mhrEr9 YWxgRWH5cXsmo9GOymx6t+ziNDR6Uzp0h2HhuVjF1kq77Tbo57n7+T8IAfZRuIQPPpwxwY uFrLX5I1xjagWNzRsqhdnFEygMcplbmWUXI3CbPlmzr8Rtp6P+Yi9oOauog7dw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dHWZL1TgTzb9t for ; Thu, 27 Nov 2025 22:39:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 365e2 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 27 Nov 2025 22:39:22 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: 0c87d29a54da - stable/15 - pkg: Move FreeBSD-base to pkg.freebsd.org List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 0c87d29a54da527b2f624cf4d2999ebeb9885f15 Auto-Submitted: auto-generated Date: Thu, 27 Nov 2025 22:39:22 +0000 Message-Id: <6928d31a.365e2.5999f94d@gitrepo.freebsd.org> The branch stable/15 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=0c87d29a54da527b2f624cf4d2999ebeb9885f15 commit 0c87d29a54da527b2f624cf4d2999ebeb9885f15 Author: Colin Percival AuthorDate: 2025-11-27 21:30:10 +0000 Commit: Colin Percival CommitDate: 2025-11-27 22:39:16 +0000 pkg: Move FreeBSD-base to pkg.freebsd.org Rather than fetching packages directly from the CDN which currently backs pkgbase.freebsd.org, requests will go to pkg.freebsd.org mirrors and be 302ed to the correct servers. This adds ~70 seconds to the process of installing or upgrading a pkgbase system; it also orphans systems with 15.0-{PRERELEASE,ALPHA*,BETA*} installed since they are expecting to see pkgbase files signed with the pkg keys, not the new pkgbase signing keys. Reviewed by: dch, philip MFC after: immediately (for 15.0-RELEASE) With hat: re Requested by: clusteradm, core Differential Revision: https://reviews.freebsd.org/D53964 (cherry picked from commit a3b0902d73901e7243103e60cf78c53cd7f566a1) --- usr.sbin/pkg/FreeBSD.conf.quarterly-release | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/pkg/FreeBSD.conf.quarterly-release b/usr.sbin/pkg/FreeBSD.conf.quarterly-release index 035d0ae976b9..47183d41dc6d 100644 --- a/usr.sbin/pkg/FreeBSD.conf.quarterly-release +++ b/usr.sbin/pkg/FreeBSD.conf.quarterly-release @@ -24,7 +24,7 @@ FreeBSD-ports-kmods: { enabled: yes } FreeBSD-base: { - url: "pkg+https://pkgbase.FreeBSD.org/${ABI}/base_release_${VERSION_MINOR}", + url: "pkg+https://pkg.FreeBSD.org/${ABI}/base_release_${VERSION_MINOR}", mirror_type: "srv", signature_type: "fingerprints", fingerprints: "/usr/share/keys/pkgbase-${VERSION_MAJOR}", From nobody Thu Nov 27 22:41:39 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dHWcz6pCdz6JJCV for ; Thu, 27 Nov 2025 22:41:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dHWcz5z9xz3mbV for ; Thu, 27 Nov 2025 22:41:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764283299; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lTmZhpY79B64uL2wS4eMumCZORKs5u60eo8+2fU1Nqw=; b=Q3kgYmdT3kkxz6GRcfScSxK52Xh98H6XGLQEYk8he0OZTZ2zyvQz34bIo0HHgxlfdOaQhM bJdrU7ofmlpJA2pmKcdgixwlgyf4JVcbE8hwXVr6FhKEc9NDMCcmQRWgYPpwadSnJPYKGy PgC9XHdDmwnJKPMqLcedx3XZnhEA0z7p3PmG6T7aN1sk1fgwlK14yEddtoEY08/qA1JaJg IeOKpKvtFSmKYX11Fc9bWbCNmKoZrzfMH8WLEyZ26KYMdaoQd612Yf2wxN5umCMnhfRI7+ 4ncNp3hmkWgaaiKRSa0SXSNN+7OqlcjvQSeO1I16f/aVKPwPG9YvNg1ZMEy9zg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764283299; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lTmZhpY79B64uL2wS4eMumCZORKs5u60eo8+2fU1Nqw=; b=hSoyY7ct27L+d0eTX88zPpYISFPpMzdwxc09jZUgG6thflUTCVioel03RQsSS+lqc5g9ve B9ukA8u73SlqzQzq/LImsgf6ZYSx9OCc/PrvXhJsH6ySfCa1Fjk8F9OKcDV+JWYtNZHQp6 rwshA4L9ULfNSYnJhJ9Uwk2DbBXFV780cTiZiGgh9OPeoy+mfL29REyeu0W0ox3ZGknn1w 7okQsgCs/qE0YfPdtbxP0LDrq9UwHnqrSYzPlLjogO9sLf63hFF2YxW6VsZvUWqGjmCpQM /HI+QiMAtx4q8A8HVcB+D3t1fiCzE8ar0I/7tvn+KPocILGF4q7y7+KG+MNVvQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764283299; a=rsa-sha256; cv=none; b=Rf4yFA54QJ7VbOVPY9P5zbR19gVuVO63xnBF03A1mCcOXzdw6vSRIR7GrZbZ0cvnikCZaT pfIsUwqDxqArRHvpVaJiasD2fSyXbq5T++QwgvWW9qWIYPmfW2UhFI4IjIpWUQJvmPn3+X 6DbUclnkK2oHlJqrz4quffWd8yUTYtf0YlseAz5z0Eobzcei4q1h63zVJXhIq7jYVu5MGf gQhc0RDpiiKRAIR1Z2I00fBRcGBDMVsVxYQb7xGkLPSafLAuHVX7qEpuwXGwUmmk/kZr0U kr+kMEvZcyxeAPgpMRdarOaBvtMLchTY6z/hrFviRY7I/DPCArLEuAMKjly5Gw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dHWcz5JYGzcBb for ; Thu, 27 Nov 2025 22:41:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 8cda by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 27 Nov 2025 22:41:39 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: 463cec10a5fb - releng/15.0 - pkg: Move FreeBSD-base to pkg.freebsd.org List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.0 X-Git-Reftype: branch X-Git-Commit: 463cec10a5fba0b42db7bf699b21e569f2fd6459 Auto-Submitted: auto-generated Date: Thu, 27 Nov 2025 22:41:39 +0000 Message-Id: <6928d3a3.8cda.3204d84b@gitrepo.freebsd.org> The branch releng/15.0 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=463cec10a5fba0b42db7bf699b21e569f2fd6459 commit 463cec10a5fba0b42db7bf699b21e569f2fd6459 Author: Colin Percival AuthorDate: 2025-11-27 21:30:10 +0000 Commit: Colin Percival CommitDate: 2025-11-27 22:40:59 +0000 pkg: Move FreeBSD-base to pkg.freebsd.org Rather than fetching packages directly from the CDN which currently backs pkgbase.freebsd.org, requests will go to pkg.freebsd.org mirrors and be 302ed to the correct servers. This adds ~70 seconds to the process of installing or upgrading a pkgbase system; it also orphans systems with 15.0-{PRERELEASE,ALPHA*,BETA*} installed since they are expecting to see pkgbase files signed with the pkg keys, not the new pkgbase signing keys. Approved by: re (cperciva) Reviewed by: dch, philip MFC after: immediately (for 15.0-RELEASE) With hat: re Requested by: clusteradm, core Differential Revision: https://reviews.freebsd.org/D53964 (cherry picked from commit a3b0902d73901e7243103e60cf78c53cd7f566a1) (cherry picked from commit 0c87d29a54da527b2f624cf4d2999ebeb9885f15) --- usr.sbin/pkg/FreeBSD.conf.quarterly-release | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/pkg/FreeBSD.conf.quarterly-release b/usr.sbin/pkg/FreeBSD.conf.quarterly-release index 035d0ae976b9..47183d41dc6d 100644 --- a/usr.sbin/pkg/FreeBSD.conf.quarterly-release +++ b/usr.sbin/pkg/FreeBSD.conf.quarterly-release @@ -24,7 +24,7 @@ FreeBSD-ports-kmods: { enabled: yes } FreeBSD-base: { - url: "pkg+https://pkgbase.FreeBSD.org/${ABI}/base_release_${VERSION_MINOR}", + url: "pkg+https://pkg.FreeBSD.org/${ABI}/base_release_${VERSION_MINOR}", mirror_type: "srv", signature_type: "fingerprints", fingerprints: "/usr/share/keys/pkgbase-${VERSION_MAJOR}", From nobody Fri Nov 28 00:00:04 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dHYMS5nLGz6JS82 for ; Fri, 28 Nov 2025 00:00:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dHYMS5Bqhz415S for ; Fri, 28 Nov 2025 00:00:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764288004; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5p9JD16QuXEAo6xtMB6UaMw4nfoU8FtoBvuxCRv3PQ8=; b=UBORIU1mwedpdMC5/PPXjj4bBu1dHKPT1UaFxG829Vwb8wfbi5stAVS9HBDG2o/VazyQ1X A1cSFeRp+pvT01FrC9IG4D4Od39KKlRK5eHMVF6zmq1d/BV8OVl0cHjazlrlDUtulBt86L J+efFz3BoxGEOcChjDhkuC2c5s/kay9gUSJdgQaovbN4gPUt1iQWQStQTykze6MXwBetVp 5VzxGMm+zryaLt9VibfiBfW8IMyGq6/Zf1Ca5V77INy+JG3P+BMvKP3Vvk5Me3S/sw56t4 7C1mDqobCwNNPo+6zXS53nlNSl2PcrxBsvbl2cHZ7kXa5Hy//tSclY2+iAaNLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764288004; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5p9JD16QuXEAo6xtMB6UaMw4nfoU8FtoBvuxCRv3PQ8=; b=qz1IWhxvX2+uOX6wPx5ZOg20Bvf88EGC6ykiWgkBquvUOvu/t74CnjByUoopgclSkgE+gX IcnTR7oVjIPOaYjOTX/GdD4g+gau3zbBLm/I7XsMQ2w/MjF1Xvx5RPdEvVMQUhKgNg0P/q kYk3TOyYw7kT/lnEu/t8KvarAYQYEyOpfs8WRKm+Y5Q25Q0bfj32cuQ/uOStHRye1glufS WNvcJje4fk9Gspkl1oOdsohpRQpgkKaTdsb+GZX5MGn922SLy3Sp2xZJX410LrC2Tfb7a5 VUTGZQ9WHwBXS8TwoyEFQ0JZ9g99MSOe1nRFDgWfgYeY8dpwp5lz4G/qvVlXmw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764288004; a=rsa-sha256; cv=none; b=ZcyARU8+5NLDtaBS77S0xSCKlZspcCHJJhhfq7O6Do9Qb+u7F/XIOlj1Kxg/gdFMk5dXV4 AsR+Um+loxaf6ddbXEzVfy07tXq25OjGFcQFFdUxifvclc3TqOQXV4HaT8JBvTg4R8vVWO aaXBA3DigK+BwQ2VpGQ5d7EQEkKGAtGuRwQrZL7RSKjT0DMUZxvSqzEY4EJ64tMpP89rTF q0wQQ/ybxIpPsqw8NwyIjdAR4O9pVb5Te9iYKXlJFX/2xGa+k5frkWpDu3zuZGEtxvpWF6 nDDZcxnULivvOW+T2tyds7OoS/qlzz3Zki3ZjLyMFnBBUDTDaADLeIQy+TkwEg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dHYMS4kByzdZG for ; Fri, 28 Nov 2025 00:00:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id e26b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 28 Nov 2025 00:00:04 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: 7aedc8de6446 - releng/15.0 - Update in preparation for 15.0-RELEASE List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.0 X-Git-Reftype: branch X-Git-Commit: 7aedc8de6446ad5a10d553b926423c689f0a3363 Auto-Submitted: auto-generated Date: Fri, 28 Nov 2025 00:00:04 +0000 Message-Id: <6928e604.e26b.2acda5a0@gitrepo.freebsd.org> The branch releng/15.0 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=7aedc8de6446ad5a10d553b926423c689f0a3363 commit 7aedc8de6446ad5a10d553b926423c689f0a3363 Author: Colin Percival AuthorDate: 2025-11-28 00:00:00 +0000 Commit: Colin Percival CommitDate: 2025-11-28 00:00:00 +0000 Update in preparation for 15.0-RELEASE - Bump BRANCH to RELEASE - Add the anticipated RELEASE announcement date - Set a static __FreeBSD_version Approved by: re (implicit) --- UPDATING | 3 +++ lib/csu/common/crtbrand.S | 2 +- sys/conf/newvers.sh | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/UPDATING b/UPDATING index 0db786a70646..c23c9a66cbaa 100644 --- a/UPDATING +++ b/UPDATING @@ -12,6 +12,9 @@ Items affecting the ports and packages system can be found in /usr/ports/UPDATING. Please read that file before updating system packages and/or ports. +20251202: + 15.0-RELEASE. + 20251126: 15.0-RC4-p1 SA-25:10.unbound diff --git a/lib/csu/common/crtbrand.S b/lib/csu/common/crtbrand.S index a06f72daa99d..f62736c52301 100644 --- a/lib/csu/common/crtbrand.S +++ b/lib/csu/common/crtbrand.S @@ -43,7 +43,7 @@ .4byte NT_FREEBSD_ABI_TAG 1: .asciz NOTE_FREEBSD_VENDOR 2: .p2align 2 -3: .4byte __FreeBSD_version +3: .4byte 1500068 4: .section .note.GNU-stack,"",%progbits diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh index 9d9a75a22c25..e48cfd747602 100644 --- a/sys/conf/newvers.sh +++ b/sys/conf/newvers.sh @@ -51,7 +51,7 @@ TYPE="FreeBSD" REVISION="15.0" -BRANCH="RC4-p1" +BRANCH="RELEASE" if [ -n "${BRANCH_OVERRIDE}" ]; then BRANCH=${BRANCH_OVERRIDE} fi From nobody Fri Nov 28 00:00:10 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dHYMZ357bz6JS5j for ; Fri, 28 Nov 2025 00:00:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dHYMZ1BDPz41YT for ; Fri, 28 Nov 2025 00:00:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764288010; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0bSOXmnM5dkghEdnFdCNuz0YtEZVZlZrW65hi1IhhkI=; b=qhXARZPbD0S0sadP/r4OiNx9/R7bH8tQxJ9ZA9SvUhuizZgv/lWKfmqjD8WxaFLv5p+l7o k1XiD7p2mn/1rAD89lahOyjkuScaSd+9eiG1jFjYl9Q8n2TgYiAJKowQG6gkL8LLp/rJyM 4orXMi02G8hK7OXwnl4uhQg1r8Xl0jYxZkkmcZCxRqobZ4y+iJsR117GHrgO1API4bigMB GPlqBrBigJMT96yNBdBWZLU+xZOZje1eReFylq8ls/lBkYoXELzWkSm3udlyO0nAEZ45Yd ezNaWFyAWnE87ff+jNVCTR1BcXn2MZkyzuVbPcRbVe5Y7ohkKX9CSivfBcpxeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764288010; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0bSOXmnM5dkghEdnFdCNuz0YtEZVZlZrW65hi1IhhkI=; b=rdDt5JXUUce7VVC4p4/Bi8YIqLjRGxXuYaJUQHIVrdUTv8LdZFeZdJZf6xOdCT9msXswx/ S8yjhYxR6e5Q8aT2JiCICfBJOSpOnbTG/gkv0eZ69jhpLjP5BmJsxTlx2eDD2V2L1C+WXb 8pl0dsz44seShnxhKRYmSB97dMqHwTYInmAz7/2+vlfYUJhYuIRAGQzjLykPJtmnjEWf9M 3+pbMrfI73O7vmhuTxXB48G3RevLf/ESa43N/JVGjITM9a2RfkWw28kcHpgpd+siTDWJRT XIpgQ6UxXeOVr08N2uGtnq8XZQWiAosI0c3alS3e6V1STP+Sd/fL0vTXYZEl4A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764288010; a=rsa-sha256; cv=none; b=I1f3iYCCzaELvr48LqzTqU093CD9ckBQ63oRpVPzdujPgrB/KTwY/+gstWPBQ2k3SNfnFS A+rJohycmiQdXjXtESMZRz9nDtRNS+VtGZ0N810HJ/GoDoWUEeuNox+T7VpgQesxsvA3yH 7S0Z/G3FNLeOrDHU6cCZVKk99LpNpxrNNEaTTzPHsCLjqAdcwE67Boa22EKZdKN0SXfYCQ FlKuU14XebMfKq92iFGjiNcOS3o9eZ6kEHRvnFHASkEzYbvYCmaOBtRLocy0RHE7p3h6Ap G7mMPmez53wfCNeN+JhaluNo8tg3RZIo8qYh+30MNuQMHKmJmf5VLhocf5wPDg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dHYMZ0ZYCzdh0 for ; Fri, 28 Nov 2025 00:00:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id eaf4 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 28 Nov 2025 00:00:10 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: 52f8c56b66b5 - Create tag release/15.0.0 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/tags/release/15.0.0 X-Git-Reftype: annotated tag X-Git-Commit: 52f8c56b66b5c83be3711351b117223954092b52 Auto-Submitted: auto-generated Date: Fri, 28 Nov 2025 00:00:10 +0000 Message-Id: <6928e60a.eaf4.48ebebc2@gitrepo.freebsd.org> The annotated tag release/15.0.0 has been created by cperciva: URL: https://cgit.FreeBSD.org/src/tag/?h=release/15.0.0 tag release/15.0.0 Tagger: Colin Percival TaggerDate: 2025-11-28 00:00:00 +0000 Tag 15.0-RELEASE from 7aedc8de6446 -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEglY7hNBiDtwN+4ZBOJfy4i5lrT8FAmko3nsACgkQOJfy4i5l rT+/lw//XbB5nRuaj6ZgGgS8JVrIx1SxMzevLQ99z7nAxxMVcKHg0zdSmkwMX/FA QwbuwkPHEuTEE6RnaxHKnLuY5c2mSjZLJCYAiKoDtZgvPGsgGf73n5XYQsNQQa3k YCj0NfXh4j9wstoy9Q/OqKtyyMJ3tSp4ZwLysyKxUTiT3VhJc6qFSjU8zgeFy67v gVMl233RXG5Oj8Ioj8D2+3Km9r7kwuYrtRPy8EyWN/nViNVhjYjN5cyUq8lA5mMN 5WUZOgE29vEAQVbN+1iIWssjHfLl2/W83v4MHrlTWqTKNkIWaBBpthWRAahdpqqR xcqK1FuDzHnW/9rdKqvqfUTXr1LHIWi3L7WPNkhrYmRTJDNb2AqLP0LameJpfVv+ /h5DdJ5idyeaFpZiudtTyJyjIdzgZTcZpEYMAEkD2MmXGABcharrnyhC/ElbhdvD OCv3UwiFwx0CqzzwMg/914TmCVp9d0sl1VrvQlprNYomITroP2h1ICkUJeTVbJVL um6KeiVntIoz1XqRk+Svp1q150IaWwawrdt32S6qKFT9hKYCuqTuYdG2EebnZc4U kdF47N5POBGVT3htZzR21ikmpEVTqiF086tr89p0kIOQB8QDG1qc+LZJnvszOhxu IVsou7ZvxvcJ98OjfBXrEpCkqcKkYeZdcVV3byiMLBg3sVKY9rE= =dcEG -----END PGP SIGNATURE----- commit 7aedc8de6446ad5a10d553b926423c689f0a3363 Author: Colin Percival AuthorDate: 2025-11-28 00:00:00 +0000 Commit: Colin Percival CommitDate: 2025-11-28 00:00:00 +0000 Update in preparation for 15.0-RELEASE - Bump BRANCH to RELEASE - Add the anticipated RELEASE announcement date - Set a static __FreeBSD_version Approved by: re (implicit) From nobody Fri Nov 28 00:32:03 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dHZ4T43dXz6JVBn; Fri, 28 Nov 2025 00:32:09 +0000 (UTC) (envelope-from philip@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dHZ4T0TBtz444p; Fri, 28 Nov 2025 00:32:09 +0000 (UTC) (envelope-from philip@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764289929; 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=A4BlmPXG4wCZ5aCvPVvZ8kd2zVTmcTBobquhHyz00WY=; b=nqcUtUJBBV5qvOdjqKBEz6IvhjzO5l62SH993cNxfY0UfRUI0LG0nSlsYzlGY+gFxjrse7 q1WUOUMfN+6vzjQemiejRY5eVWseQtvbMTm68Jp2LwlLsHC8p05qHAkd1zZoRca6uxSecq fD6UP+rH8xsuwYgZh0P9jzukYew5L6ORIsC58qBFDtXsRgcjHb/U9prZwOqJ6ve5Nkg+z0 kfXS4JDSQl2T1JZ9Dp0z6zgYG+sBPuJdCZvESHOmJVwMMRpzh0RaME86pFez4/Tk3S3PpP 1hqAqYtAtQFlgEdUiEfqUjp9+uIFy+W0JRZWwhb6FT+RrYyLXl6Fiqq2OMiHiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764289929; 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=A4BlmPXG4wCZ5aCvPVvZ8kd2zVTmcTBobquhHyz00WY=; b=g0YpIdm+GTMuOB5/dVtjPZnbenaz4vCjlkIma5dAO66AUmz9fi59W6FGzZzR73uzpLEzRd OM4VPNobwljJdmTxH2BvqopaHNfsPKkkVOxSfTFjFrgc56fiISi12p6P8kcztwBtXLPWGq x0NMgImpIELYfLsHp/t/+OOD3I8GVubP48AtHT6vUDCZS6u4ptXN9qtwRdWrwYmUBtofbd +m7bWsREx7zMar1uLUMKbcXfsYP29uuzNadBkTIH4SA23Bw7EYaaB4nsO9cxExD0ZH6KR5 0W8dnEXvT/dThwPFf81pDml05Z6lBm1uLmdULfj1EypxBUhrsJb9eDnRTBJNZw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764289929; a=rsa-sha256; cv=none; b=QRDuFO6CqXVFJ8FlPVZeLqrT8BE9XzGbtfnAGx3/s+2S6nadSrwExhmcL7fD85e67y3yO9 PzCMp1ZAl0LECa8MzEt1lIpbVZkzO/xG7EAmqX03++hD4d2wBBtDisespw0yFYAForTbta tiwoBfaMnN2AgsHi3QHkg0jHKWNmuPgwASvwO5Ypd2/r4+xMea8BySJ27PsZr5h1vpDjfU DWgBZ6+DIHiMGtgjeryHUwRtZmHH+N4ZOoVdxjSDpx1zGYoOtr+EPFwWctn4as8AgCRSD2 2r16GNWKm37LXHXvQnOO483iseL9mzTnQ/fSgoVVgMIq4GA4DiE8X4wcRxrSmw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from fauth-a1-smtp.messagingengine.com (fauth-a1-smtp.messagingengine.com [103.168.172.200]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: philip/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4dHZ4S6rS2zZP7; Fri, 28 Nov 2025 00:32:08 +0000 (UTC) (envelope-from philip@freebsd.org) Received: from phl-compute-02.internal (phl-compute-02.internal [10.202.2.42]) by mailfauth.phl.internal (Postfix) with ESMTP id C8615F40074; Thu, 27 Nov 2025 19:32:08 -0500 (EST) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-02.internal (MEProxy); Thu, 27 Nov 2025 19:32:08 -0500 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdeggddvgeekheejucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhephffvvefufffokfgjfhggtgesthdtmhdtredttdenucfhrhhomheprfhhihhlihhp ucfrrggvphhsuceophhhihhlihhpsehfrhgvvggsshgurdhorhhgqeenucggtffrrghtth gvrhhnpedvheehkefghfeiteehteduudeuhfdvgeettdeihfffleeuteeggeetuddttddu feenucffohhmrghinhepfhhrvggvsghsugdrohhrghenucevlhhushhtvghrufhiiigvpe dtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehphhhilhhiphdomhgvshhmthhprghuthhh phgvrhhsohhnrghlihhthidqudduieeivdeivdegkedqvdefhedukedttdekqdhphhhilh hipheppehfrhgvvggsshgurdhorhhgsehtrhhouhgslhgvrdhishdpnhgspghrtghpthht ohepgedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtoheptghpvghrtghivhgrsehfrh gvvggsshgurdhorhhgpdhrtghpthhtohepshhrtgdqtghomhhmihhtthgvrhhssehfrhgv vggsshgurdhorhhgpdhrtghpthhtohepuggvvhdqtghomhhmihhtshdqshhrtgdqrghllh esfhhrvggvsghsugdrohhrghdprhgtphhtthhopeguvghvqdgtohhmmhhithhsqdhsrhgt qdhmrghinhesfhhrvggvsghsugdrohhrgh X-ME-Proxy: Feedback-ID: ia691475d:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 27 Nov 2025 19:32:06 -0500 (EST) From: Philip Paeps To: Colin Percival Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: a3b0902d7390 - main - pkg: Move FreeBSD-base to pkg.freebsd.org Date: Thu, 27 Nov 2025 14:32:03 -1000 X-Mailer: MailMate (2.0r6290) Message-ID: In-Reply-To: <6928d303.36477.2230b6ef@gitrepo.freebsd.org> References: <6928d303.36477.2230b6ef@gitrepo.freebsd.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain On 2025-11-27 12:38:59 (-1000), Colin Percival wrote: > commit a3b0902d73901e7243103e60cf78c53cd7f566a1 > Author: Colin Percival > AuthorDate: 2025-11-27 21:30:10 +0000 > Commit: Colin Percival > CommitDate: 2025-11-27 22:13:52 +0000 > > pkg: Move FreeBSD-base to pkg.freebsd.org Thank you. Philip From nobody Fri Nov 28 00:44:51 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dHZM73vz7z6JWg2 for ; Fri, 28 Nov 2025 00:44:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dHZM73C5Rz45hh for ; Fri, 28 Nov 2025 00: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=1764290691; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yEaKhBjwCJLKeugK0xsYirmktfSnWEOLMOcAm6xvVgQ=; b=Vno2lOxS+DlaKm58I/wlQv4DXmz97KBCKi+gDWqXhQ9ralcbvkt5todhdPB2cYawvIMMgt prtrKzSc59E+BxgAeH4kx6uddtdoEbcmjvOz5Y687bNtfPxZh0qujhpUemfLLNNYSFXy/3 1ip2N5auS3bKJTfNfl8kLUAleMma0OL4Cmz3fd3DOOSVFfz6/qO/FGg3r3+yMc5JUpk2kV cEUur3Vj64lXJcTnRpb/gTEImXw1sjL8XU6Ds1cmyF+TdiFYKxqz/aeUUComi2TUrIpT5a RF8wAl9iEbDUGxcz/NAgqBPp6tpRnx6PgOAOk/Fa6juK4hkwjFc0wADx+C314A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764290691; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yEaKhBjwCJLKeugK0xsYirmktfSnWEOLMOcAm6xvVgQ=; b=agfDBbrkICbvu9PLcAH6WaRFY9khJe6D0s9XgGCwB7jBtHzuVK8psZpGEsggHXA5ieVM+U v7v0AsENDljc7VWh90PFBerxS6rOb6kRJBwMzHYz/Kz5g7kDuWh7uo527yL7IcYoWWZV54 dkkz46FA5g7eGzybc0195/tZoygxb+auQTjatXVSX+YLlrgdi7E1sHJjb1L5NQBOZBBq9I /4EiBAe/KgPA3Ng+kW2Z/nuMR6V+RVyDes5g6VqvI32hUK2/P6cqQh4UmFcN+0Uub9dMVc /yrt/mNcSXgk6z7EtKZJbZn9di6dzQSDsanNFp4v6eWgIf1iz8Zbv6f/rUU77A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764290691; a=rsa-sha256; cv=none; b=aauieTrUWYynEEgwMoU1DP80McyrVH+o2dHFpjfsOQ6ue8h396BX0k4rQ+bCeJ/Bd3vHXO LTwJcKnMLGwsMHR/Xe5YfdpGudQFukcNdreYk09ax9sCkw8rFyhyr5ZzToMctpGL9B66H1 LvziIw/GphFQyjhDX87Q4zzNpi6NYDaHtqHEKqNZP+GJ80+N7AUcFG3FHw/zMmyFLFxNNx 5VCpeMgoShKZdrNwYaOexENoXycECpjsz7w2uveNkyrB4D95ra4MlBeezEGDpTNsOTcYh+ SxHSSglDDxzGvwEQ4BtWY3Xx80WRenjLSwmx3cydvhq2Gah+kzne8Cv0lsNTvg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dHZM726vkzgPZ for ; Fri, 28 Nov 2025 00:44:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 25e4f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 28 Nov 2025 00:44:51 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 452052e82708 - stable/15 - vm_page_free_prep(): convert PG_ZERO zeroed page check to use sf_buf List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 452052e82708bf130bcd0d5a12af88abb7581a5a Auto-Submitted: auto-generated Date: Fri, 28 Nov 2025 00:44:51 +0000 Message-Id: <6928f083.25e4f.670caf11@gitrepo.freebsd.org> The branch stable/15 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=452052e82708bf130bcd0d5a12af88abb7581a5a commit 452052e82708bf130bcd0d5a12af88abb7581a5a Author: Konstantin Belousov AuthorDate: 2025-11-21 08:57:17 +0000 Commit: Konstantin Belousov CommitDate: 2025-11-28 00:44:15 +0000 vm_page_free_prep(): convert PG_ZERO zeroed page check to use sf_buf (cherry picked from commit b9fc7628dbb24b55cbb8791c83bd69f73cfadf23) --- sys/vm/vm_extern.h | 3 +++ sys/vm/vm_page.c | 32 +++++++++++++++++++++++++------- 2 files changed, 28 insertions(+), 7 deletions(-) diff --git a/sys/vm/vm_extern.h b/sys/vm/vm_extern.h index 1fd6518cf4ed..d0e005088745 100644 --- a/sys/vm/vm_extern.h +++ b/sys/vm/vm_extern.h @@ -164,5 +164,8 @@ vm_addr_ok(vm_paddr_t pa, vm_paddr_t size, u_long alignment, return (vm_addr_align_ok(pa, alignment) && vm_addr_bound_ok(pa, size, boundary)); } + +extern bool vm_check_pg_zero; + #endif /* _KERNEL */ #endif /* !_VM_EXTERN_H_ */ diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c index 16878604fa11..b39d665f9e0f 100644 --- a/sys/vm/vm_page.c +++ b/sys/vm/vm_page.c @@ -84,6 +84,7 @@ #include #include #include +#include #include #include #include @@ -145,6 +146,13 @@ SYSCTL_ULONG(_vm_stats_page, OID_AUTO, nofreeq_size, CTLFLAG_RD, &nofreeq_size, 0, "Size of the nofree queue"); +#ifdef INVARIANTS +bool vm_check_pg_zero = false; +SYSCTL_BOOL(_debug, OID_AUTO, vm_check_pg_zero, CTLFLAG_RWTUN, + &vm_check_pg_zero, 0, + "verify content of freed zero-filled pages"); +#endif + /* * bogus page -- for I/O to/from partially complete buffers, * or for paging into sparsely invalid regions. @@ -4050,14 +4058,24 @@ vm_page_free_prep(vm_page_t m) */ atomic_thread_fence_acq(); -#if defined(DIAGNOSTIC) && defined(PHYS_TO_DMAP) - if (PMAP_HAS_DMAP && (m->flags & PG_ZERO) != 0) { - uint64_t *p; +#ifdef INVARIANTS + if (vm_check_pg_zero && (m->flags & PG_ZERO) != 0) { + struct sf_buf *sf; + unsigned long *p; int i; - p = (uint64_t *)PHYS_TO_DMAP(VM_PAGE_TO_PHYS(m)); - for (i = 0; i < PAGE_SIZE / sizeof(uint64_t); i++, p++) - KASSERT(*p == 0, ("vm_page_free_prep %p PG_ZERO %d %jx", - m, i, (uintmax_t)*p)); + + sched_pin(); + sf = sf_buf_alloc(m, SFB_CPUPRIVATE | SFB_NOWAIT); + if (sf != NULL) { + p = (unsigned long *)sf_buf_kva(sf); + for (i = 0; i < PAGE_SIZE / sizeof(*p); i++, p++) { + KASSERT(*p == 0, + ("zerocheck failed page %p PG_ZERO %d %jx", + m, i, (uintmax_t)*p)); + } + sf_buf_free(sf); + } + sched_unpin(); } #endif if ((m->oflags & VPO_UNMANAGED) == 0) { From nobody Fri Nov 28 00:44:52 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dHZM84jrQz6JWnB for ; Fri, 28 Nov 2025 00: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dHZM82zPpz45H5 for ; Fri, 28 Nov 2025 00: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=1764290692; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dzZ+I4YPX12eiF/ZnLtzMLp4X6aCOF7FezZtBRPEe0c=; b=GIvV9Z89LqAz0BoSihq51bDzrskqnJj9wQJGTn6yulghIvnGlT3Cr+PHp8oKlDd0b7cmJV I/FMD/7IH6uKZ0DFsSWs/XvanzO72//vBoA0EMouapxbmL2OrtEkYWj7ztkw3AHdRsYKK6 M2Nacquax2o08b12q9Ad9elaFBryxq8FFbycZBgfexovVPFqxlVxZgoCQYGkU2RqPkoG7o ve2q2TR1HJHP2C2JVb9fQ1YCaJ2wlqBZa0k8k66u/dVG+22Ou/L0SLNtxKSekTwZcgVWpw xF/T9IemDOMdVkt6c5HqL+BgGs2vwY/tCIv+rO646TsBUIM83UqQzTY2dsIRPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764290692; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dzZ+I4YPX12eiF/ZnLtzMLp4X6aCOF7FezZtBRPEe0c=; b=Ziy/DBh1byIUyR9xC3UszcaWkr1ULWgwwpctTGqV7lYD9ZtWFCxMiQoXSVtFS1f/7AGBJj 0dUeSI4AAsCMnv0llAez61B+WyGXBapNrBnN2vA8shOplB6HOwxzut3qxJ8uDN79omtPN4 ii52do000hJO2R0fhPDULfqD77wAOuM770Zgt5vr5Ik3o7bdhAbozIg4XlJhjEDaq4BED4 P8n1YzkhlEiuQKGZDza3ak2oLtlTOIgPf7uTcvZhOek11ON7mJ/mGpWMEczQI1rqEL1Cl6 lwiv/xDq1b/bCtVIjHeNyFRpCD7PQ2OuESzc7HWZy1HfT12pDTHh7jLf49LtkA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764290692; a=rsa-sha256; cv=none; b=PAtVsZ3J+ry7wA6LAyAnQwtyNXdjsLsVhM2a52bsMe/jxC0TX+28FM+FjkXBCUqYwlC9n9 6AinDpMa2fZRYt/r2NnM8LWnlVS4wQbBg9MTZkrNe/CZcSy/DYRV24yZQdwwzacP1gXPM0 9xP2VFDxv+u7C6fVH3UzoLtiiaSR5vPsKvRuf1cx3NkZs5Eb1F+b7Yzw7LZGYzMx/Cdvh4 b0bz3VPMsyKJ/3hGY3zkF5xVqLauuTyim8xGdUj+2Tb9kXxzKW0SfJiKsS3APuaexK4dPS 56RfiqJukyd0U7X4IzaPOtTk2moHtsA8XR0VsGIZkOaCoWsF8I/a+hypfzH37Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dHZM82Tqfzg87 for ; Fri, 28 Nov 2025 00:44:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2592b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 28 Nov 2025 00:44:52 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: be9e4c000ad6 - stable/15 - vm_fault: add a verifier that the PG_ZERO page is indeed zeroed List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: be9e4c000ad68612aef5b2d2802cb5e46b966fc6 Auto-Submitted: auto-generated Date: Fri, 28 Nov 2025 00:44:52 +0000 Message-Id: <6928f084.2592b.6fddcfc0@gitrepo.freebsd.org> The branch stable/15 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=be9e4c000ad68612aef5b2d2802cb5e46b966fc6 commit be9e4c000ad68612aef5b2d2802cb5e46b966fc6 Author: Konstantin Belousov AuthorDate: 2025-11-21 08:34:51 +0000 Commit: Konstantin Belousov CommitDate: 2025-11-28 00:44:15 +0000 vm_fault: add a verifier that the PG_ZERO page is indeed zeroed (cherry picked from commit d8bfcacd12aba73188c44a157c707908e275825d) --- sys/vm/vm_fault.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/sys/vm/vm_fault.c b/sys/vm/vm_fault.c index 2e150b368d71..3bf16778d987 100644 --- a/sys/vm/vm_fault.c +++ b/sys/vm/vm_fault.c @@ -85,6 +85,8 @@ #include #include #include +#include +#include #include #include #include @@ -1220,6 +1222,24 @@ vm_fault_zerofill(struct faultstate *fs) if ((fs->m->flags & PG_ZERO) == 0) { pmap_zero_page(fs->m); } else { +#ifdef INVARIANTS + if (vm_check_pg_zero) { + struct sf_buf *sf; + unsigned long *p; + int i; + + sched_pin(); + sf = sf_buf_alloc(fs->m, SFB_CPUPRIVATE); + p = (unsigned long *)sf_buf_kva(sf); + for (i = 0; i < PAGE_SIZE / sizeof(*p); i++, p++) { + KASSERT(*p == 0, + ("zerocheck failed page %p PG_ZERO %d %jx", + fs->m, i, (uintmax_t)*p)); + } + sf_buf_free(sf); + sched_unpin(); + } +#endif VM_CNT_INC(v_ozfod); } VM_CNT_INC(v_zfod); From nobody Fri Nov 28 00:44:53 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dHZM965Bkz6JWwD for ; Fri, 28 Nov 2025 00: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dHZM93v08z45ht for ; Fri, 28 Nov 2025 00:44:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764290693; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+2g8iHVvtRLtRSp7tBhxk1UZYDi7l5sWxgPTjiTJInY=; b=qDYkkratYplN+Clh34FM4n6XHHziWWDVIMBuf48Ec7gNMCslcXIOpFIPMcVCXGwXXXS1XB Tyigx12fMtGk2HRS43ekNDbu8Ggb4L6mtcIleL0z8iI4Aw0hlsMKle9eITFHC2XHKyMpid 8Mow5sH740RzpkyLvGmby3O1QEz++9bI8FMkAh4t0Fpdm61Aajv5yf1a8BHyUFAhWdmo4J QoogGwnLTL7jMWDDEJmsNcfWGihaVzbD/azQ87L+XXQloIBVvV6yoA+Vzhmt0yyjTOl7a9 I9xpgEblWM7SbqyzV2pZQptMdGTGqySYlqtRpEGkIiWxDTck11M3nuCLSmqYtg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764290693; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+2g8iHVvtRLtRSp7tBhxk1UZYDi7l5sWxgPTjiTJInY=; b=LgL61Klzar6U2t8KriEkuNWifxdb4vJvD56UG57pwCTed68jxlBp8JGkLD99S8HVE1ZqYd XTDwcjoJKp/mpLd4uTSeXm8zGv31aD9O8r+y9Ij7LMN/msT/jffLOupSQeHBzp3Kv5sNwP roVZDq+LejLbv7sgWB0PVWvA6KWszB/6T/BQzYD52vAeQw6dD/NkufIQC+kixVwkj8FTcN HrGnSk9UuSnBX5+5rU41/ifc8ua7h5u7WlaZ90kYf6aD20RScMQksk2JJ8/5l3xaa1lLjC zQ7VoIQUgl/VSJ52oErVrOmw4kLn5/pOIxSPbvJh7nSv14z6h5eW0HLql4xdOQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764290693; a=rsa-sha256; cv=none; b=U806/dxuCTnxZnGWpGHi0qQB8ieZXHSim/hmYsiLlo0bRIgf9yfY7hCM67lxiHXcUg5IbK XbXKHdzWij4Hg3JMw5ykQd6xRZkNKYuSkN0RrEL/iR3KwEnWjWSPudZ/79TlJX/PSEOEAY MN4+6Y/WeULlVvL4+P4mYQTv/y9CTlPxSf7VRZ3jBUMFMxhnkaSotDy9jT08Yw/kviWqGM jNnv5IV9lPdEgMvhUUNNGkO2InLIRyBdz3jRlomc8RafgNh4v3/qdRH2wBTAwy1GBSe8M5 SEeqt2V6XxV0HxnT0rjpfBdtMoBihC/rlGDHaoLlw3FD9PHpQdef7OIvVRIDIA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dHZM93Nv3zgT2 for ; Fri, 28 Nov 2025 00:44:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 23748 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 28 Nov 2025 00:44:53 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: ff6a70efd974 - stable/15 - rtld-elf: move powerpc-specific auxv compat code into arch hook List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: ff6a70efd974fe8844f7cc40c4cea2ba2e88a45a Auto-Submitted: auto-generated Date: Fri, 28 Nov 2025 00:44:53 +0000 Message-Id: <6928f085.23748.483191f5@gitrepo.freebsd.org> The branch stable/15 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=ff6a70efd974fe8844f7cc40c4cea2ba2e88a45a commit ff6a70efd974fe8844f7cc40c4cea2ba2e88a45a Author: Konstantin Belousov AuthorDate: 2025-11-18 11:06:04 +0000 Commit: Konstantin Belousov CommitDate: 2025-11-28 00:44:15 +0000 rtld-elf: move powerpc-specific auxv compat code into arch hook (cherry picked from commit b2b3d2a962eb00005641546fbe672b95e5d0672a) --- libexec/rtld-elf/aarch64/rtld_machdep.h | 2 ++ libexec/rtld-elf/amd64/rtld_machdep.h | 2 ++ libexec/rtld-elf/arm/rtld_machdep.h | 2 ++ libexec/rtld-elf/i386/rtld_machdep.h | 2 ++ libexec/rtld-elf/powerpc/reloc.c | 26 ++++++++++++++++++++++++++ libexec/rtld-elf/powerpc/rtld_machdep.h | 2 ++ libexec/rtld-elf/powerpc64/reloc.c | 26 ++++++++++++++++++++++++++ libexec/rtld-elf/powerpc64/rtld_machdep.h | 2 ++ libexec/rtld-elf/riscv/rtld_machdep.h | 2 ++ libexec/rtld-elf/rtld.c | 25 +------------------------ 10 files changed, 67 insertions(+), 24 deletions(-) diff --git a/libexec/rtld-elf/aarch64/rtld_machdep.h b/libexec/rtld-elf/aarch64/rtld_machdep.h index 3cc1339fcad4..d689ae354c49 100644 --- a/libexec/rtld-elf/aarch64/rtld_machdep.h +++ b/libexec/rtld-elf/aarch64/rtld_machdep.h @@ -52,6 +52,8 @@ bool arch_digest_dynamic(struct Struct_Obj_Entry *obj, const Elf_Dyn *dynp); bool arch_digest_note(struct Struct_Obj_Entry *obj, const Elf_Note *note); +#define arch_fix_auxv(a, ai) do {} while (0) + Elf_Addr reloc_jmpslot(Elf_Addr *where, Elf_Addr target, const struct Struct_Obj_Entry *defobj, const struct Struct_Obj_Entry *obj, const Elf_Rel *rel); diff --git a/libexec/rtld-elf/amd64/rtld_machdep.h b/libexec/rtld-elf/amd64/rtld_machdep.h index 1797d13c847d..2ee63d566bed 100644 --- a/libexec/rtld-elf/amd64/rtld_machdep.h +++ b/libexec/rtld-elf/amd64/rtld_machdep.h @@ -47,6 +47,8 @@ Elf_Dyn *rtld_dynamic_addr(void); /* No architecture specific notes */ #define arch_digest_note(obj, note) false +#define arch_fix_auxv(a, ai) do {} while (0) + Elf_Addr reloc_jmpslot(Elf_Addr *where, Elf_Addr target, const struct Struct_Obj_Entry *obj, const struct Struct_Obj_Entry *refobj, const Elf_Rel *rel); diff --git a/libexec/rtld-elf/arm/rtld_machdep.h b/libexec/rtld-elf/arm/rtld_machdep.h index f59b30028a3b..88fa18a0c07a 100644 --- a/libexec/rtld-elf/arm/rtld_machdep.h +++ b/libexec/rtld-elf/arm/rtld_machdep.h @@ -47,6 +47,8 @@ struct Struct_Obj_Entry; /* No architecture specific notes */ #define arch_digest_note(obj, note) false +#define arch_fix_auxv(a, ai) do {} while (0) + Elf_Addr reloc_jmpslot(Elf_Addr *where, Elf_Addr target, const struct Struct_Obj_Entry *defobj, const struct Struct_Obj_Entry *obj, const Elf_Rel *rel); diff --git a/libexec/rtld-elf/i386/rtld_machdep.h b/libexec/rtld-elf/i386/rtld_machdep.h index 581f1dfb002d..079991f913d6 100644 --- a/libexec/rtld-elf/i386/rtld_machdep.h +++ b/libexec/rtld-elf/i386/rtld_machdep.h @@ -60,6 +60,8 @@ Elf_Addr reloc_jmpslot(Elf_Addr *where, Elf_Addr target, #define call_init_pointer(obj, target) \ (((InitArrFunc)(target))(main_argc, main_argv, environ)) +#define arch_fix_auxv(a, ai) do {} while (0) + extern uint32_t cpu_feature; extern uint32_t cpu_feature2; extern uint32_t cpu_stdext_feature; diff --git a/libexec/rtld-elf/powerpc/reloc.c b/libexec/rtld-elf/powerpc/reloc.c index 8932c2c21278..a38cadfe76ba 100644 --- a/libexec/rtld-elf/powerpc/reloc.c +++ b/libexec/rtld-elf/powerpc/reloc.c @@ -840,3 +840,29 @@ __tls_get_addr(tls_index* ti) return (tls_get_addr_common(_tcb_get(), ti->ti_module, ti->ti_offset + TLS_DTV_OFFSET)); } + +void +arch_fix_auxv(Elf_Auxinfo *aux, Elf_Auxinfo *aux_info[]) +{ + Elf_Auxinfo *aux; + bool old_auxv_format; + + old_auxv_format = true; + for (auxp = aux; auxp->a_type != AT_NULL; auxp++) { + if (auxp->a_type == 23) /* AT_STACKPROT */ + return; + } + + /* Remap from old-style auxv numbers. */ + aux_info[23] = aux_info[21]; /* AT_STACKPROT */ + aux_info[21] = aux_info[19]; /* AT_PAGESIZESLEN */ + aux_info[19] = aux_info[17]; /* AT_NCPUS */ + aux_info[17] = aux_info[15]; /* AT_CANARYLEN */ + aux_info[15] = aux_info[13]; /* AT_EXECPATH */ + aux_info[13] = NULL; /* AT_GID */ + + aux_info[20] = aux_info[18]; /* AT_PAGESIZES */ + aux_info[18] = aux_info[16]; /* AT_OSRELDATE */ + aux_info[16] = aux_info[14]; /* AT_CANARY */ + aux_info[14] = NULL; /* AT_EGID */ +} diff --git a/libexec/rtld-elf/powerpc/rtld_machdep.h b/libexec/rtld-elf/powerpc/rtld_machdep.h index ec470f238991..de6a894ac1f5 100644 --- a/libexec/rtld-elf/powerpc/rtld_machdep.h +++ b/libexec/rtld-elf/powerpc/rtld_machdep.h @@ -46,6 +46,8 @@ bool arch_digest_dynamic(struct Struct_Obj_Entry *, const Elf_Dyn *); /* No architecture specific notes */ #define arch_digest_note(obj, note) false +void arch_fix_auxv(Elf_Auxinfo *aux, Elf_Auxinfo *aux_info[]); + Elf_Addr reloc_jmpslot(Elf_Addr *where, Elf_Addr target, const struct Struct_Obj_Entry *defobj, const struct Struct_Obj_Entry *obj, const Elf_Rel *rel); diff --git a/libexec/rtld-elf/powerpc64/reloc.c b/libexec/rtld-elf/powerpc64/reloc.c index 9ea14f63b5c7..29c52d8fc19f 100644 --- a/libexec/rtld-elf/powerpc64/reloc.c +++ b/libexec/rtld-elf/powerpc64/reloc.c @@ -737,3 +737,29 @@ __tls_get_addr(tls_index* ti) return (tls_get_addr_common(_tcb_get(), ti->ti_module, ti->ti_offset + TLS_DTV_OFFSET)); } + +void +arch_fix_auxv(Elf_Auxinfo *aux, Elf_Auxinfo *aux_info[]) +{ + Elf_Auxinfo *aux; + bool old_auxv_format; + + old_auxv_format = true; + for (auxp = aux; auxp->a_type != AT_NULL; auxp++) { + if (auxp->a_type == 23) /* AT_STACKPROT */ + return; + } + + /* Remap from old-style auxv numbers. */ + aux_info[23] = aux_info[21]; /* AT_STACKPROT */ + aux_info[21] = aux_info[19]; /* AT_PAGESIZESLEN */ + aux_info[19] = aux_info[17]; /* AT_NCPUS */ + aux_info[17] = aux_info[15]; /* AT_CANARYLEN */ + aux_info[15] = aux_info[13]; /* AT_EXECPATH */ + aux_info[13] = NULL; /* AT_GID */ + + aux_info[20] = aux_info[18]; /* AT_PAGESIZES */ + aux_info[18] = aux_info[16]; /* AT_OSRELDATE */ + aux_info[16] = aux_info[14]; /* AT_CANARY */ + aux_info[14] = NULL; /* AT_EGID */ +} diff --git a/libexec/rtld-elf/powerpc64/rtld_machdep.h b/libexec/rtld-elf/powerpc64/rtld_machdep.h index d628e776bae9..06eb6d884101 100644 --- a/libexec/rtld-elf/powerpc64/rtld_machdep.h +++ b/libexec/rtld-elf/powerpc64/rtld_machdep.h @@ -46,6 +46,8 @@ bool arch_digest_dynamic(struct Struct_Obj_Entry *, const Elf_Dyn *); /* No architecture specific notes */ #define arch_digest_note(obj, note) false +void arch_fix_auxv(Elf_Auxinfo *aux, Elf_Auxinfo *aux_info[]); + Elf_Addr reloc_jmpslot(Elf_Addr *where, Elf_Addr target, const struct Struct_Obj_Entry *defobj, const struct Struct_Obj_Entry *obj, const Elf_Rel *rel); diff --git a/libexec/rtld-elf/riscv/rtld_machdep.h b/libexec/rtld-elf/riscv/rtld_machdep.h index c6600b583612..1f4fe2e928fe 100644 --- a/libexec/rtld-elf/riscv/rtld_machdep.h +++ b/libexec/rtld-elf/riscv/rtld_machdep.h @@ -60,6 +60,8 @@ uint64_t set_gp(struct Struct_Obj_Entry *obj); /* No architecture specific notes */ #define arch_digest_note(obj, note) false +#define arch_fix_auxv(a, ai) do {} while (0) + Elf_Addr reloc_jmpslot(Elf_Addr *where, Elf_Addr target, const struct Struct_Obj_Entry *defobj, const struct Struct_Obj_Entry *obj, const Elf_Rel *rel); diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c index d27af520c21d..bdfff7361e96 100644 --- a/libexec/rtld-elf/rtld.c +++ b/libexec/rtld-elf/rtld.c @@ -521,9 +521,6 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_proc, Obj_Entry **objp) char buf[MAXPATHLEN]; int argc, fd, i, mib[4], old_osrel, osrel, phnum, rtld_argc; size_t sz; -#ifdef __powerpc__ - int old_auxv_format = 1; -#endif bool dir_enable, dir_ignore, direct_exec, explicit_fd, search_in_path; /* @@ -549,28 +546,8 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_proc, Obj_Entry **objp) for (auxp = aux; auxp->a_type != AT_NULL; auxp++) { if (auxp->a_type < AT_COUNT) aux_info[auxp->a_type] = auxp; -#ifdef __powerpc__ - if (auxp->a_type == 23) /* AT_STACKPROT */ - old_auxv_format = 0; -#endif - } - -#ifdef __powerpc__ - if (old_auxv_format) { - /* Remap from old-style auxv numbers. */ - aux_info[23] = aux_info[21]; /* AT_STACKPROT */ - aux_info[21] = aux_info[19]; /* AT_PAGESIZESLEN */ - aux_info[19] = aux_info[17]; /* AT_NCPUS */ - aux_info[17] = aux_info[15]; /* AT_CANARYLEN */ - aux_info[15] = aux_info[13]; /* AT_EXECPATH */ - aux_info[13] = NULL; /* AT_GID */ - - aux_info[20] = aux_info[18]; /* AT_PAGESIZES */ - aux_info[18] = aux_info[16]; /* AT_OSRELDATE */ - aux_info[16] = aux_info[14]; /* AT_CANARY */ - aux_info[14] = NULL; /* AT_EGID */ } -#endif + arch_fix_auxv(aux, aux_info); /* Initialize and relocate ourselves. */ assert(aux_info[AT_BASE] != NULL); From nobody Fri Nov 28 00:44:54 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dHZMB6YV4z6JWg9 for ; Fri, 28 Nov 2025 00: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dHZMB49ytz45mN for ; Fri, 28 Nov 2025 00: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=1764290694; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TUq7TM0PUIr7m9ABSpHwM0LZ/m66ZUwNC4fskikyuOA=; b=KtFC+H/JQhN1NeaBO7VOIvTawkPSyZgg6OERtifnfRY1xYG2YN1Hap+/nxGLvupg/aCxbg 2Hcw+gzaSqD4iu2ULSSvPxqkwsGM/woP0PKGmwRqMcmPjmgb+v6eZ1qKNijXSKIXMVyNHW ZKuzN5aIr7iR84RKm4oyRzq6GcRYmrxfTr5wlyL/0CzawHE/dTB0sknJIH1cs993dH0xjL yM2GQVGAO6YUJBAg0CZkpKMst6uIzIUut2JjD4giW8OA5vhR8zoP8NubIMXIbKTTF/U0A+ 2PMCRYCi4/OJNAJzuNstV2tkon4SJNhGjconN62u71C92jmKBdN+epq/zoW7Rw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764290694; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TUq7TM0PUIr7m9ABSpHwM0LZ/m66ZUwNC4fskikyuOA=; b=yetMyVkKfP4LPppCen6eVC9TOgJGMbGJlH2aPaRKgO7HZ83nR5BOySnyQGNbq+8vgUu/1t mruVLOeQ1/75UbgglpCBAhBmYJZoRDJneIaOEqqy9aUx8kLtoN9qeSFO+A+k7QU90up4I7 +x35tYL8k4jTLoz8jyhbLGOQmNObBN+f/BUYN4JEdmNSVRkHxCCnmloIB+gc42XTvuYZZI 8XuA/1yF1N5PRBM5NIlK/iFynvv/wtOyQpaw9rUkmDddBtstT7wmbe56ctrSIVw7ME1CDW cICtTwstDOnkAoTMTrCRNZTYde3KHFTJmGS6pIUv/73Si7UmOSpheYzyh6Nndg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764290694; a=rsa-sha256; cv=none; b=U/MKw3UkCGWGkrQn6IxJ5yqg8aSCyLEPsL+UtSjLKqkRdoZlhsWZqrbZyE+YM6Jq885BZ6 41xdKJrw2WYdNm4Lnjs9p4tuQ/2iW0DGbdKlESg+pSgYxNyGbS/Bmlsm6yzYRDKvfXmIg5 yEaQYhpF1c7qLw4oX2DMZYpuSJ6catBmFVccACC9sJXCPGjA3oKc/yXMr9QHcnve6bx8CG evLhav5YlnBFUVaSRsfCqiLd+GVyg2YckVIHAg4MnctfEP9mEyHFaQhrLtMXPkqKbkxTnL Pn1YeaQdYm4nD2RN91rJJKV43KPIi9lWb+e5N28xSXEj0l/XlQ9JGwQl2VKoAQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dHZMB3j8Qzgd7 for ; Fri, 28 Nov 2025 00:44:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 23b76 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 28 Nov 2025 00:44:54 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: b903f27e171b - stable/15 - rtld: fix powerpc build List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: b903f27e171b120f2396de1074549e0f917156b5 Auto-Submitted: auto-generated Date: Fri, 28 Nov 2025 00:44:54 +0000 Message-Id: <6928f086.23b76.54493994@gitrepo.freebsd.org> The branch stable/15 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=b903f27e171b120f2396de1074549e0f917156b5 commit b903f27e171b120f2396de1074549e0f917156b5 Author: Konstantin Belousov AuthorDate: 2025-11-24 08:44:52 +0000 Commit: Konstantin Belousov CommitDate: 2025-11-28 00:44:15 +0000 rtld: fix powerpc build (cherry picked from commit 0628c252bd161ccdd1228a3b8aefeb471044ca04) --- libexec/rtld-elf/powerpc/reloc.c | 4 +--- libexec/rtld-elf/powerpc64/reloc.c | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/libexec/rtld-elf/powerpc/reloc.c b/libexec/rtld-elf/powerpc/reloc.c index a38cadfe76ba..c160028cea6d 100644 --- a/libexec/rtld-elf/powerpc/reloc.c +++ b/libexec/rtld-elf/powerpc/reloc.c @@ -844,10 +844,8 @@ __tls_get_addr(tls_index* ti) void arch_fix_auxv(Elf_Auxinfo *aux, Elf_Auxinfo *aux_info[]) { - Elf_Auxinfo *aux; - bool old_auxv_format; + Elf_Auxinfo *auxp; - old_auxv_format = true; for (auxp = aux; auxp->a_type != AT_NULL; auxp++) { if (auxp->a_type == 23) /* AT_STACKPROT */ return; diff --git a/libexec/rtld-elf/powerpc64/reloc.c b/libexec/rtld-elf/powerpc64/reloc.c index 29c52d8fc19f..4a4107aef861 100644 --- a/libexec/rtld-elf/powerpc64/reloc.c +++ b/libexec/rtld-elf/powerpc64/reloc.c @@ -741,10 +741,8 @@ __tls_get_addr(tls_index* ti) void arch_fix_auxv(Elf_Auxinfo *aux, Elf_Auxinfo *aux_info[]) { - Elf_Auxinfo *aux; - bool old_auxv_format; + Elf_Auxinfo *auxp; - old_auxv_format = true; for (auxp = aux; auxp->a_type != AT_NULL; auxp++) { if (auxp->a_type == 23) /* AT_STACKPROT */ return; From nobody Fri Nov 28 01:00:50 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dHZjg2Hl7z6JXJh for ; Fri, 28 Nov 2025 01:00:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dHZjg1jCDz480D for ; Fri, 28 Nov 2025 01:00:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764291655; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=v+JW15XnIhjy3K1C8MrixecrEZCCrQjDl44Y5S7rqOo=; b=DtKAtTmIMAv9cAZoajjAKeHdt6+2C6L2sTwIQwbtOCOjBJE7demgkyDikH6XUpGGA2rQOp lz/s2hDgGr4wKwnsrM2wygyryVodOvoIjIznbcwyjb9k6p0+5p7WBFxD1FoSBeSOgxpgsx XC76T/JFB1ekPJEwzWEROR5HfX5b6vbjAOiLUKGVGafTzWa5+lpqOjQEGdSlWdqdf0wG2A lYjsSgbL19F2jqxQT578s5ekcEM+VbHQlDzBsxr9uct/a6YntpeFC8w1aa6ZEvd1874y92 BlpfZKsT2BEdNVSxBDmCeRUpg4S3NzN04j2exSC2zPAaOk2Dfr8Rqh2fc7HiRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764291655; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=v+JW15XnIhjy3K1C8MrixecrEZCCrQjDl44Y5S7rqOo=; b=CouSsow/qxI8b14EjtnScP8Y4lHmdWNZN/f2IcFOew6uVwaDx8eaoFYeowr5hSNF7/7uXt tNWDvVJ9+hFHfsAUGk4g1eQKagSeEPQTNiEB6fwdJYHbxMb9Mn1gwnI2aWbSsm9Qd0fFLA bKm0ermQ1PlG3KI/NgQcFbiLujfWPaQoV7+JcCXnvhWGEmkADppppAgMplhDR/muFKoYmn rDqmROVESt31lDCC43/Xnm/IHcVI/1bCpFcp0mHddghEUFuEs6R4w5VQ7Ahi/uGTkpcWrv FH9baeaCt5z250KKN/wpQ+oC407cLeHVpK/YXvOnjjUaBR4k393Dg6IKfjxyKA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764291655; a=rsa-sha256; cv=none; b=q+vrPJrZdZY+Zc5vl/zxkUpFHIY5SEC5ffw3x6wWyJh+ldj+YrwraRyKCP+cy1W8qS7an+ UauN4SKRkFv+wJtIUv0eIz67MsRK4NWrXTWT2ePUm0M+f55QpkQTy2gGmIEAXjxF2FRPBV Ado3QeHYDr0eW4e32cgpOHyN9JUKz3bLdT9jBcQ7UbtxjPc1dzKWcwKRaEO2l+/ODGpdTn NqEYMxMaFZctIIPV+5J07vth6uVN2+hLoFR4H8+uSHAaI6zNxaXQiv5i4xHntwIVPQXM97 hcbILS5x8+gGSDnzrfH+bNCuWrB0x0ViLbsCWfmQsWs0t5dwwMeihieJL5MF5w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dHZjg15Smzgt8 for ; Fri, 28 Nov 2025 01:00:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 278f4 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 28 Nov 2025 01:00:50 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Joseph Mingrone Subject: git: 6049f1bc2106 - main - git-arc: Fix failure to call arc() function List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jrm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6049f1bc210653b126974961b29d6eb71a6c6709 Auto-Submitted: auto-generated Date: Fri, 28 Nov 2025 01:00:50 +0000 Message-Id: <6928f442.278f4.18def5e9@gitrepo.freebsd.org> The branch main has been updated by jrm: URL: https://cgit.FreeBSD.org/src/commit/?id=6049f1bc210653b126974961b29d6eb71a6c6709 commit 6049f1bc210653b126974961b29d6eb71a6c6709 Author: Joseph Mingrone AuthorDate: 2025-11-27 22:46:43 +0000 Commit: Joseph Mingrone CommitDate: 2025-11-28 00:53:56 +0000 git-arc: Fix failure to call arc() function As of b3e53f9fff11, git-arc attempted to call the internal shell function, arc(), using env(1). However, because env(1) does not call shell functions, it actually attempted to run the arc utility. This led to errors: % git arc create -r xxx HEAD env: arc: No such file or directory git-arc: could not create Phabricator diff This change removes the unnecessary use of env(1), so the arc() function is correctly called. Reviewed by: markj Fixes: b3e53f9fff11 ("git-arc: Don't require devel/arcanist") Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D53972 --- tools/tools/git/git-arc.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/tools/git/git-arc.sh b/tools/tools/git/git-arc.sh index eef01b75663e..8507d96fda63 100755 --- a/tools/tools/git/git-arc.sh +++ b/tools/tools/git/git-arc.sh @@ -315,7 +315,7 @@ create_one_review() printf "\nSubscribers:\n" >> "$msg" printf "%s\n" "${subscribers}" >> "$msg" - yes | env EDITOR=true \ + yes | EDITOR=true \ arc diff --message-file "$msg" --never-apply-patches --create \ --allow-untracked $BROWSE --head "$commit" "${commit}~" [ $? -eq 0 ] || err "could not create Phabricator diff" From nobody Fri Nov 28 01:30:08 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dHbMP35Nrz6HcGH for ; Fri, 28 Nov 2025 01:30:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dHbMP0mKvz3Db2 for ; Fri, 28 Nov 2025 01:30:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764293409; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RgDkWW5a3h9vYWff/YHh7bElUSA0OEBXHSU+wvgGJTQ=; b=no1iWC1CxrOghCWzezXWrwZu1zex920xwShGzctPNGXqtKEIrUVjBpCJPPb1lRpQ8Q/aqq 83+nfwSWcx0PVzzBY11hAr7avS72sOWubGQ2zzpJuJvEwubx+Eu2vqexbUstZ2WbeCEDiW Kj+OckawoZd9cGt6CZTL6rUvzwBVMUHbmAe+klZsuTldpCkH+OknX9yLBl3NczjczC3Df9 9N09zq9xab2oRoP7ggMYrolRNYKfKSuyY5+Zb4heYgmBtiLtiQdaHHLKf7zbkZdh9reW2p EsP2TeIdRQwFB1x4Ay1BnMIaNVpYvVRbEaCUAElH0vWhO7cS7hJ8Xy/MUwhzjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764293409; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RgDkWW5a3h9vYWff/YHh7bElUSA0OEBXHSU+wvgGJTQ=; b=ZDGjQ2DZUnhwhNqUbFLwXDdgEgfaUgYcFvDmou27bJHlVNzmUvZ6t1eD7tb3CDgUAz6irO l5/YJGI+Yz8peDQNHw+Bw7i5zBrHtbzaMeLWVYObgwllsn+y2Rwwo3yWsdctVPHvjRoIrK dX4fpwutvYhZJ2EcIPCO1eNO1uJSNga/8ZRcq4AeeN0N2S1Q/1ojxfaDVFBND5k6sLJW+e MdAB0whpy03UAxMM5/4woIo6YvCf5K+oe+Kg4ybVygImEcYpZ2BXeaNVcqjAWWGcgiaiwk QPs7zLaJKAXuCMsEV/tmwceoDQLmJnRbVxhZv6/w9XvkBLbQjdvP5TXBZMRXyQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764293409; a=rsa-sha256; cv=none; b=wQbW3ZZ9jF5Of5/rFyylqTe5SCb4InQPxVobS3A9MAzoiQk0nWGHM2pSW47YnnzT1R2RyS J1ELfPRYTTN5vih2ajLuN+ipw4hFtMVOR9Kn5wa0H2kQsDCu0AgeMxDOco4LsPgIWLRFh6 b8cdi9Slx/sCHDXM8oQLzLgQ375TYFFOVddS657kwtXeKhq9SdjXUyG/rUxbTZWIqXS51i VUkoKVeeM4bS9ImvsF8Z1VvqVZnURVZtv2daNZ3HXAazXf6L6Rj2z3jhDKhOS4TtIZJtLf hZqmsE7ezUUxiBo2/lfshnfNuYVaI3b3TMDeqtyqqIVatx2jnTYBpK0lY5Airw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dHbMN6nQczhDG for ; Fri, 28 Nov 2025 01:30:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2a9b3 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 28 Nov 2025 01:30:08 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 6901376f59b8 - main - kgssapi: Remove broken MOD_UNLOAD code List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6901376f59b870ddbb0d922e3455a388333cd460 Auto-Submitted: auto-generated Date: Fri, 28 Nov 2025 01:30:08 +0000 Message-Id: <6928fb20.2a9b3.132fb674@gitrepo.freebsd.org> The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=6901376f59b870ddbb0d922e3455a388333cd460 commit 6901376f59b870ddbb0d922e3455a388333cd460 Author: Ed Maste AuthorDate: 2025-11-27 16:44:08 +0000 Commit: Ed Maste CommitDate: 2025-11-28 01:29:55 +0000 kgssapi: Remove broken MOD_UNLOAD code The module panicked at unload with "recursing but non-recursive rw". There is a comment that "Unloading of the kgssapi module is not currently supported" and the MOD_UNLOAD case falls through to returning EOPNOTSUPP anyway. Just #if 0 the code in the unload path, leaving it as a hint in case someone implements unload support later on. PR: 291249 Reviewed by: rmacklem Fixes: ad704a34bc2c ("Use syscall_helper_register(9) rather than syscall_register().") Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D53949 --- sys/kgssapi/gss_impl.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/kgssapi/gss_impl.c b/sys/kgssapi/gss_impl.c index c9cd4d880695..323b379e1619 100644 --- a/sys/kgssapi/gss_impl.c +++ b/sys/kgssapi/gss_impl.c @@ -88,6 +88,7 @@ kgss_load(void) return (0); } +#if 0 static void kgss_unload(void) { @@ -96,6 +97,7 @@ kgss_unload(void) clnt_destroy(KGSS_VNET(kgss_gssd_handle)); KGSS_CURVNET_RESTORE(); } +#endif int kgss_oid_equal(const gss_OID oid1, const gss_OID oid2) @@ -297,8 +299,10 @@ kgssapi_modevent(module_t mod, int type, void *data) error = kgss_load(); break; case MOD_UNLOAD: +#if 0 kgss_unload(); mtx_destroy(&kgss_gssd_lock); +#endif /* * Unloading of the kgssapi module is not currently supported. * If somebody wants this, we would need to keep track of From nobody Fri Nov 28 03:37:17 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dHfB55ntGz6Hrvk for ; Fri, 28 Nov 2025 03:37:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dHfB51mxKz3RDp for ; Fri, 28 Nov 2025 03:37:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764301037; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YsEbNK5+X38V7RFZFwiVLctlUFg8xYudUc7y9pIY6Q4=; b=C51lKLsCnFNN6soBJG1nIk8LuP6pH4EU4D89KolYvPO9rCSICdqhQgIQUGZ0I8egoD6lfc vW9IbI1Mil51bsLGVil5omi4VKwYNOfRKVpK6m4qOQHPq/sICQpTW31cfHBXoXbE7cLAw7 +TvkNK5BDVssOfksQwQWVycbbK/ur7TYG88hfC3cJuh7geqr6UlXH0J0zF7jqLKi/ge5D+ p0MoemfPxP1nqiUU0M/XpU8oDaWMwiKrw/aZVi5rpPnP67zTSf0uhNzYF0v9YUBK5qZukn tMy7N2LD7RKZlfu9xVuZZVapGszRhl6jtCMnEpjfPiTBA2qFDCuoLCsjpNCo7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764301037; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YsEbNK5+X38V7RFZFwiVLctlUFg8xYudUc7y9pIY6Q4=; b=cIL6dPQ+yMfgKKtRsEZAMbWOcU7073athQpoQ8qgVGeLzrY/PxWyumIRMT4MULkYr8Ut+w d9K25YuJ2jpZnYbtoRq0fqrjCBKP9zFuFu9GKH7/5mMdSvbqyjbzZWVW8xzi8xI5HRu8XH 2taXGpYqMjbhdvC7PhXrH5GiiVt1/8t17qfxwz/JsR/jaGIf8+Pn16u51cEAaVktrJegcl TOumKbs4EA5EcSvQKXMtDw0wwG/jwLUHP01/uf/ZZ5NrPiyFWPh0rjlO0IG7X97IMti/dI 2z1rD3VaP8Y8cMBx/Nt5v3bTS/4o/ke/Nl7cJ9OdPh6RhAP2e8ixV29VlLdMjQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764301037; a=rsa-sha256; cv=none; b=fKpFZgfz025diN/HwYr+/B1/H2W4ZDWagd1oXVRHYA2qqG7slAJ0T+LHvl7OmOSEANa/aC N4juEsxq5ABdkLqQz50vvNOq4+3pKY3isR8OoHwqoeCr3rjzFjHTH8sHTkEew09JfG5ViL DhuzN92z3GgxK8aH6s+l7aZmAnaNYZBBVqa/QwlDQC4VSHrqRS905IKK2rWdRskDozTevO bHWOxXlbeGONrBlhrFDkbK/e0OOV38TLhvSkv6Uw+2TUD0TvIi+iP2Y0KGpxYyXK0ORnYk v6vXa647R8EPMEBnn9S+Km4tZyL7CYRcof7Xs/EQDHScjakiHpLdJhr/+E7OHg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dHfB51LJ8zlgK for ; Fri, 28 Nov 2025 03:37:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 363a6 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 28 Nov 2025 03:37:17 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Navdeep Parhar Subject: git: dcab3c4f4964 - main - Export t4_tom's symbols for other offload modules List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: np X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: dcab3c4f496414309371c4d671b35b3528419600 Auto-Submitted: auto-generated Date: Fri, 28 Nov 2025 03:37:17 +0000 Message-Id: <692918ed.363a6.1f2a3455@gitrepo.freebsd.org> The branch main has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=dcab3c4f496414309371c4d671b35b3528419600 commit dcab3c4f496414309371c4d671b35b3528419600 Author: Navdeep Parhar AuthorDate: 2025-11-27 19:48:50 +0000 Commit: Navdeep Parhar CommitDate: 2025-11-28 03:33:27 +0000 Export t4_tom's symbols for other offload modules This allows iw_cxgbe.ko, cxgbei.ko, nvmf_che.ko, etc. to be loaded when debug.link_elf_leak_locals and debug.link_elf_obj_leak_locals are disabled. PR: 291250 MFC after: 1 week Sponsored by: Chelsio Communications --- sys/modules/cxgbe/tom/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/modules/cxgbe/tom/Makefile b/sys/modules/cxgbe/tom/Makefile index 301958ac5844..955f7956467a 100644 --- a/sys/modules/cxgbe/tom/Makefile +++ b/sys/modules/cxgbe/tom/Makefile @@ -22,4 +22,6 @@ SRCS+= t4_tom_l2t.c CFLAGS+= -I${CXGBE} +EXPORT_SYMS= YES + .include From nobody Fri Nov 28 03:37:18 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dHfB652QMz6Hs81 for ; Fri, 28 Nov 2025 03:37:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dHfB62jwnz3RSC for ; Fri, 28 Nov 2025 03:37:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764301038; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=s7TRCOur2LkKGchDB6l8lkLYyc82+qqbgDra1Hl+hBE=; b=cWTeONWR0T6V6rApgyOSlRiHNRkHMpq0L/XM3EuRkIVXMMEC9rYWezfI0LCOboJ/5IE0n1 33biYzALQA/vKDh0Mg4FiXI9nYcFmUbc4nOAwtXrS447k1ds4HmjG2x2Oc3h9IYVJ1YNM6 IOrIf+oSJnQZ1Jgp22z5XHGT0ocTxIzCzH3CwpMZrCPf+MXJ23QmwaOO9yO1Zq0E153dDs mCB4ZIalW5wkiffsLFzfeasJkmGJNBQofFH6YsSxPyWdz/vx6GIyyi9M/XAGajAzIIXlRg IyX0aOjgZR4NtYA79usUeKq+05dbHtzyBpwtYWksERTyuvV1y1bEbqdPR9VHzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764301038; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=s7TRCOur2LkKGchDB6l8lkLYyc82+qqbgDra1Hl+hBE=; b=t5tCIGVPt0nMFMPdWqsHkb4K7B7OXgpRKdJGyunm/z62a/L2a4VJe4XWHp15x9ihi62iQP ZZHO4qLa1AFfX5MSlod5WQrVhK6CjiB95NPH+E8b7dcEE0oJl8vs2DXzmJmltR/9wr04yj wVvp4CiKI5y1Sq8Lj92bscwb+VU61YWvSHasRh2526PkBm/Zt/nUm52a324ZAhxk0qlyQI WclwGHOM60cuxYJdmuONjIYrOuK8YDCe++vlPbqp2dUmCGXOEKwq0sVair/bAqMCDHb0TE 9dctFWF/zjkh3JrHvZHGmZQqSbk3qRupwVXTUbI4W+05sAQdNQUJFl6cbSABVA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764301038; a=rsa-sha256; cv=none; b=kTIlLc3iSHl2N60U6pJNW9kBNn02KYksUpfpTiG8Rpz0pJA4H1SMh+yIrWXpMJra0EBNBY MUcAMK6TRWEFF9q9U6wUxOggYt6iRw51QYKBKiVU/LCHGxKaJQ29TSE+7rNYdqjjDShSeA +9FoGHTXd66+ITiHcYtykyas1dxUWAJ4DAm2kulFSinbvTlXVv1hPOr8T0/vWZNUfRpzZc DXQsQ+QdN4TPNSo6H44LBc51eDNytawCyfsqAlRBIH0zmHxhrYW+e6dtqqnY97sfJSrgbL 3XZt8dO5wmo8NfHebyCCTZ27X6h7xH5YqH/sKFK2das18R67QCP+9mSXYmi69w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dHfB622QwzlgL for ; Fri, 28 Nov 2025 03:37:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 345ff by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 28 Nov 2025 03:37:18 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Navdeep Parhar Subject: git: 34d66b0c96d5 - main - cxgbe(4): Delete leftovers from $FreeBSD$ removal List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: np X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 34d66b0c96d50cfa3e33316a0c0ffab152385461 Auto-Submitted: auto-generated Date: Fri, 28 Nov 2025 03:37:18 +0000 Message-Id: <692918ee.345ff.47d429b4@gitrepo.freebsd.org> The branch main has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=34d66b0c96d50cfa3e33316a0c0ffab152385461 commit 34d66b0c96d50cfa3e33316a0c0ffab152385461 Author: Navdeep Parhar AuthorDate: 2025-11-27 19:50:25 +0000 Commit: Navdeep Parhar CommitDate: 2025-11-28 03:33:48 +0000 cxgbe(4): Delete leftovers from $FreeBSD$ removal No functional change. MFC after: 1 week Sponsored by: Chelsio Communications --- sys/modules/cxgbe/if_cc/Makefile | 3 --- sys/modules/cxgbe/if_ccv/Makefile | 3 --- sys/modules/cxgbe/if_cxgbe/Makefile | 3 --- sys/modules/cxgbe/if_cxgbev/Makefile | 3 --- sys/modules/cxgbe/if_cxl/Makefile | 3 --- sys/modules/cxgbe/if_cxlv/Makefile | 3 --- sys/modules/cxgbe/t4_firmware/Makefile | 3 --- sys/modules/cxgbe/t5_firmware/Makefile | 3 --- sys/modules/cxgbe/t6_firmware/Makefile | 3 --- sys/modules/cxgbe/t7_firmware/Makefile | 4 ---- sys/modules/cxgbe/tom/Makefile | 3 --- 11 files changed, 34 deletions(-) diff --git a/sys/modules/cxgbe/if_cc/Makefile b/sys/modules/cxgbe/if_cc/Makefile index 76a482a98b30..00e4d9a1ce28 100644 --- a/sys/modules/cxgbe/if_cc/Makefile +++ b/sys/modules/cxgbe/if_cc/Makefile @@ -1,6 +1,3 @@ -# -# - CXGBE= ${SRCTOP}/sys/dev/cxgbe .PATH: ${CXGBE} diff --git a/sys/modules/cxgbe/if_ccv/Makefile b/sys/modules/cxgbe/if_ccv/Makefile index fc71092dd70e..b40eb39897c0 100644 --- a/sys/modules/cxgbe/if_ccv/Makefile +++ b/sys/modules/cxgbe/if_ccv/Makefile @@ -1,6 +1,3 @@ -# -# - CXGBE= ${SRCTOP}/sys/dev/cxgbe .PATH: ${CXGBE} diff --git a/sys/modules/cxgbe/if_cxgbe/Makefile b/sys/modules/cxgbe/if_cxgbe/Makefile index 33383c84837f..43ca9ac3f48e 100644 --- a/sys/modules/cxgbe/if_cxgbe/Makefile +++ b/sys/modules/cxgbe/if_cxgbe/Makefile @@ -1,6 +1,3 @@ -# -# - .include CXGBE= ${SRCTOP}/sys/dev/cxgbe diff --git a/sys/modules/cxgbe/if_cxgbev/Makefile b/sys/modules/cxgbe/if_cxgbev/Makefile index 122733276535..a91f791cbefc 100644 --- a/sys/modules/cxgbe/if_cxgbev/Makefile +++ b/sys/modules/cxgbe/if_cxgbev/Makefile @@ -1,6 +1,3 @@ -# -# - CXGBE= ${SRCTOP}/sys/dev/cxgbe .PATH: ${CXGBE} ${CXGBE}/common diff --git a/sys/modules/cxgbe/if_cxl/Makefile b/sys/modules/cxgbe/if_cxl/Makefile index f387de89eb33..c8641c0fa507 100644 --- a/sys/modules/cxgbe/if_cxl/Makefile +++ b/sys/modules/cxgbe/if_cxl/Makefile @@ -1,6 +1,3 @@ -# -# - CXGBE= ${SRCTOP}/sys/dev/cxgbe .PATH: ${CXGBE} diff --git a/sys/modules/cxgbe/if_cxlv/Makefile b/sys/modules/cxgbe/if_cxlv/Makefile index b289f673bf15..68017786e16f 100644 --- a/sys/modules/cxgbe/if_cxlv/Makefile +++ b/sys/modules/cxgbe/if_cxlv/Makefile @@ -1,6 +1,3 @@ -# -# - CXGBE= ${SRCTOP}/sys/dev/cxgbe .PATH: ${CXGBE} diff --git a/sys/modules/cxgbe/t4_firmware/Makefile b/sys/modules/cxgbe/t4_firmware/Makefile index 15928bdb0207..67dc80efc305 100644 --- a/sys/modules/cxgbe/t4_firmware/Makefile +++ b/sys/modules/cxgbe/t4_firmware/Makefile @@ -1,6 +1,3 @@ -# -# - T4FW= ${SRCTOP}/sys/dev/cxgbe/firmware .PATH: ${T4FW} diff --git a/sys/modules/cxgbe/t5_firmware/Makefile b/sys/modules/cxgbe/t5_firmware/Makefile index cf2c3e9006bd..41ea2a7f4203 100644 --- a/sys/modules/cxgbe/t5_firmware/Makefile +++ b/sys/modules/cxgbe/t5_firmware/Makefile @@ -1,6 +1,3 @@ -# -# - T5FW= ${SRCTOP}/sys/dev/cxgbe/firmware .PATH: ${T5FW} diff --git a/sys/modules/cxgbe/t6_firmware/Makefile b/sys/modules/cxgbe/t6_firmware/Makefile index 5bc7c8e8e0b6..d2499164c0c1 100644 --- a/sys/modules/cxgbe/t6_firmware/Makefile +++ b/sys/modules/cxgbe/t6_firmware/Makefile @@ -1,6 +1,3 @@ -# -# - T6FW= ${SRCTOP}/sys/dev/cxgbe/firmware .PATH: ${T6FW} diff --git a/sys/modules/cxgbe/t7_firmware/Makefile b/sys/modules/cxgbe/t7_firmware/Makefile index afce06487f22..4717865f15ba 100644 --- a/sys/modules/cxgbe/t7_firmware/Makefile +++ b/sys/modules/cxgbe/t7_firmware/Makefile @@ -1,7 +1,3 @@ -# -# $FreeBSD$ -# - T7FW= ${SRCTOP}/sys/dev/cxgbe/firmware .PATH: ${T7FW} diff --git a/sys/modules/cxgbe/tom/Makefile b/sys/modules/cxgbe/tom/Makefile index 955f7956467a..3b3b1b9d840c 100644 --- a/sys/modules/cxgbe/tom/Makefile +++ b/sys/modules/cxgbe/tom/Makefile @@ -1,6 +1,3 @@ -# -# - CXGBE= ${SRCTOP}/sys/dev/cxgbe .PATH: ${CXGBE}/tom From nobody Fri Nov 28 09:18:06 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dHnlM0mlsz6JVbk for ; Fri, 28 Nov 2025 09:18:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dHnlL5g79z43R5 for ; Fri, 28 Nov 2025 09:18:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764321486; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Y8HqSTzWBUZt1omtCtcSlQwmA1XyU6e/fdcs/q6xiz4=; b=MsE0+hnVQooqpgChcPFHVxI4HWy3kT2YKmJHCff0JQB/tvCGo0PldlZj/5QNX5+nbW0nwK cF05Ehm3cEJ09vnYUc48Of/mKhKzb5GDjoAvF/aYrMFXOWqtSIlBTZN8sl7Sbp5hTcZKOt RjsCRllk8QxhICPlb02wtKbc5Bs5LHhTgIBS4oJMB7fSMe26eCK3Azzw/ChFqmV/ijnn92 53hl6J+QIzOzmV8YnuXf637yAv9/quviDNHKe9q+4HVmDD58sjUP6sLO9dM8EVrumvNo0y k6ewypidmYRXWk7GJ8bVcdG+JYUuOKE8uvF0821czUMV7AdI3mIzfNQ6oyNcHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764321486; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Y8HqSTzWBUZt1omtCtcSlQwmA1XyU6e/fdcs/q6xiz4=; b=byakkJRoSqDUGr72DMZiO8B/xwOS5aCMiLeyjGxH1vuOqnB1+2x11Y7GhE4Hsf1aAX6TT6 WSt1eNr238mGKzbNuG9yEvZg7hDFF3/vM5UuTUFS/tD04tKCwRAFLx9M6z8mjmOV2cPUSO SqR2OGx/uppnykj749ZrsUu/4cB+87XUxyf1kr5o2ksh8UOhRYefHmRS+jd1kVnMvXwyy7 VFVb8ulcbx+gOvxCmxDbrgZ0fdso/ztMUc6ZQh+XFvkARSPs9VryAKihQfq7OhlgfTmoJd mxDC8Zgf+pjuI8n3YiVI2i5YMbVEVeLe6NHVtNTM1Hop602AqVD/QD1BZbdt/g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764321486; a=rsa-sha256; cv=none; b=Zb5yHAgy70g+bk8JZnxXzdUZAPVX7zBmGtVX3r6QbeM40Mz5DIUAM9xybqaogNU2n58eZp AlvlKaC30vfAqmSc/sIreqjrQmqX8pTzGBaEEgAISg05vB/OojAT2p2Sl/0qaKiTA8YmUX +acidfiSJ9nC0ay2JgpZFcVRXllN2wfANXzW+cTJG38xa/lMw492Al0v4j/RQBQOoQPZhC JB06LSr1oTVhfQB9MErwf+7GdAtZHyQ9p9h5XQkaJKXUBoUt7ns8qKqaXGBLXUmj1+rSyp xNbEz84oBUOGBaN0rRxZHIAE3zO4GXGf0ladUKUP3QOhFUrOB4g5+drSk+I95w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dHnlL4fNWzwlF for ; Fri, 28 Nov 2025 09:18:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 31fd6 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 28 Nov 2025 09:18: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: 330d4437f210 - main - bus: Add device_has_children predicate List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 330d4437f2100fc05e576763f4f6a7198080663a Auto-Submitted: auto-generated Date: Fri, 28 Nov 2025 09:18:06 +0000 Message-Id: <692968ce.31fd6.26c4e4f2@gitrepo.freebsd.org> The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=330d4437f2100fc05e576763f4f6a7198080663a commit 330d4437f2100fc05e576763f4f6a7198080663a Author: Dag-Erling Smørgrav AuthorDate: 2025-11-28 09:14:31 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-11-28 09:17:09 +0000 bus: Add device_has_children predicate Add a device_has_children() function which can be used to check if a device has children without allocating a list of them which we aren't going to use, or even counting them. Also modify device_get_children() so it can be used to query the count without allocating a list. MFC after: 1 week Sponsored by: Klara, Inc. Sponsored by: NetApp, Inc. Reviewed by: imp, markj Differential Revision: https://reviews.freebsd.org/D53918 --- share/man/man9/Makefile | 1 + share/man/man9/device_get_children.9 | 47 ++++++++++++++++++++++++++++++------ sys/kern/subr_bus.c | 18 ++++++++++++++ sys/sys/bus.h | 1 + 4 files changed, 59 insertions(+), 8 deletions(-) diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile index 22358e8d033a..ac5224b76444 100644 --- a/share/man/man9/Makefile +++ b/share/man/man9/Makefile @@ -1040,6 +1040,7 @@ MLINKS+=devfs_set_cdevpriv.9 devfs_clear_cdevpriv.9 \ MLINKS+=device_add_child.9 device_add_child_ordered.9 MLINKS+=device_enable.9 device_disable.9 \ device_enable.9 device_is_enabled.9 +MLINKS+=device_get_children.9 device_has_children.9 MLINKS+=device_get_ivars.9 device_set_ivars.9 MLINKS+=device_get_name.9 device_get_nameunit.9 MLINKS+=device_get_state.9 device_busy.9 \ diff --git a/share/man/man9/device_get_children.9 b/share/man/man9/device_get_children.9 index f9c36971e9b5..45f8f468531b 100644 --- a/share/man/man9/device_get_children.9 +++ b/share/man/man9/device_get_children.9 @@ -1,6 +1,7 @@ .\" -*- nroff -*- .\" .\" Copyright (c) 1998 Doug Rabson +.\" Copyright (c) 2025 Dag-Erling Smørgrav .\" .\" All rights reserved. .\" @@ -26,21 +27,27 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd August 23, 2008 +.Dd November 28, 2025 .Dt DEVICE_GET_CHILDREN 9 .Os .Sh NAME -.Nm device_get_children -.Nd get a list of devices connected to a device +.Nm device_get_children , +.Nm device_has_children +.Nd examine devices connected to a device .Sh SYNOPSIS .In sys/param.h .In sys/bus.h .Ft int .Fn device_get_children "device_t dev" "device_t **devlistp" "int *devcountp" +.Ft bool +.Fn device_has_children "device_t dev" .Sh DESCRIPTION -Retrieve a list of all device instances currently connected to -.Pa dev -and return the list in +The +.Nm device_get_children +function retrieves a list of all device instances currently connected +to +.Fa dev . +It returns the list in .Fa *devlistp and the count in .Fa *devcountp . @@ -50,11 +57,35 @@ The memory allocated for the list should be freed using and .Fa devcountp are not changed when an error is returned. +.Pp +As a special case, if +.Fa devlistp +is null, no memory is allocated but the count is still returned in +.Fa *devcountp . +.Pp +The +.Nm device_has_children +function returns +.Dv true +if +.Fa dev +has at least one child and +.Dv false +if it has none. .Sh RETURN VALUES -Zero is returned on success, otherwise an appropriate error is returned. +The +.Nm device_get_children +function returns zero on success and an appropriate error otherwise. +The +.Nm device_has_children +function returns true if the specified device has at least one child +and false otherwise. .Sh SEE ALSO .Xr devclass 9 , .Xr device 9 .Sh AUTHORS +.An -nosplit This manual page was written by -.An Doug Rabson . +.An Doug Rabson Aq Mt dfr@FreeBSD.org +and +.An Dag-Erling Sm\(/orgrav Aq Mt des@FreeBSD.org . diff --git a/sys/kern/subr_bus.c b/sys/kern/subr_bus.c index b84f69cfd03e..755d7d41899f 100644 --- a/sys/kern/subr_bus.c +++ b/sys/kern/subr_bus.c @@ -1858,6 +1858,10 @@ device_get_children(device_t dev, device_t **devlistp, int *devcountp) TAILQ_FOREACH(child, &dev->children, link) { count++; } + if (devlistp == NULL) { + *devcountp = count; + return (0); + } if (count == 0) { *devlistp = NULL; *devcountp = 0; @@ -1880,6 +1884,20 @@ device_get_children(device_t dev, device_t **devlistp, int *devcountp) return (0); } +/** + * @brief Check if a device has children + * + * @param dev the device to examine + * + * @rerval true the device has at least one child + * @retval false the device has no children + */ +bool +device_has_children(device_t dev) +{ + return (!TAILQ_EMPTY(&dev->children)); +} + /** * @brief Return the current driver for the device or @c NULL if there * is no driver currently attached diff --git a/sys/sys/bus.h b/sys/sys/bus.h index 4cc8091bf775..f54ed2c58fd1 100644 --- a/sys/sys/bus.h +++ b/sys/sys/bus.h @@ -713,6 +713,7 @@ device_state_t device_get_state(device_t dev); int device_get_unit(device_t dev); struct sysctl_ctx_list *device_get_sysctl_ctx(device_t dev); struct sysctl_oid *device_get_sysctl_tree(device_t dev); +bool device_has_children(device_t dev); int device_has_quiet_children(device_t dev); int device_is_alive(device_t dev); /* did probe succeed? */ int device_is_attached(device_t dev); /* did attach succeed? */ From nobody Fri Nov 28 09:18:07 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dHnlN05yVz6JVTT for ; Fri, 28 Nov 2025 09:18:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dHnlM4m5xz43Lw for ; Fri, 28 Nov 2025 09:18:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764321487; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=d0rQ4lyomu11bgxWhojM7ERdcAS5Ui7ifkFxS33Ksf8=; b=gHhHaVGVaEiDjqK9qu20hTudZ+tqwVhC7vfW8mrnzMWroUIXzmn80HwaYAZ6sEqHqqOcnA 16Kp4FJCXt48WwUfJZxEkRDHnTXoIi52zz+ok1iWzU15yolMGKYMbxPtY+qy8y9HGly6f1 td9Uhf8wc3xT6ybAvw1rkQvpQX4iNKcf0J8NZiB39B621r+gF7heXlLgFN5TGCiT/x2DWZ AQ1hQQkmbnek2ycy9rJZXHBQ/nkkiITJXk8+RTtZWQIUKMyZajvSZkJBKP5k2sUV4G85xs bVkqPxycQyeLKYVU5B5w3XQrUYT/M3WkRRGsXNEz1J28T/+haJ9xztYXBiUEZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764321487; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=d0rQ4lyomu11bgxWhojM7ERdcAS5Ui7ifkFxS33Ksf8=; b=qrIx7qhGPkPvait9ox/cex9shNnqmszjqKmbdIbmHtqC/lwILrwNA7ZOw2G8nWr6Ltt5zF 7fE8hlcmEy7SBKURJTxzAF2NMrFQxJzlUIHGnoJcHiq8lOSEHyi4E6ecjC03c41Fk4UC/E zuY2ArVz29KzFV+knp4VRmimRKxH7FnlJujm2Pik0o+1LpWMfKJd41iCJGMlXXU4W+PiNm AyT2vdQYfneSW6VHFExuYoY7QWNl4umTetUeLU8AUS7bsHH27AxAarf3Nef5mpsMFtG2OM X6+C+p/0XAPDrP5DkYJG9WxqwpIbsrId6RD6XrbMH+323k17RdBEiKuZZ40+8g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764321487; a=rsa-sha256; cv=none; b=FZ5Ir93sdI57k0Xt5VeHbGjjN2Ruo+lXOqswC14/PJo7u+THibtXZWehUKdly/jBlbtOqy EbIW0atufNKtU6JGrMXQZRvgjnzKPd5FDaIxUONwzYz0UE6RZLAtK5g7xwO4tX8AwnngXU HbJbx/TLU4cLa60vj9ltprFWUim1CpwHtOiT2nGuthO4E5GFWmPszlWI05br/iOUaSNuLM QOVx9gKvYHPIKgZJfhFuRswBixTMAnSBhi5XEjY99Y6hw8imuSG9+QK+UgI48aQeJ2RsqW NURNkhzBC4bG0hArHliCchuwjXNmD6s9OpnN3L19Wia2G70zWYg1pvbrljmMWA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dHnlM4JJLzwj0 for ; Fri, 28 Nov 2025 09:18:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3190b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 28 Nov 2025 09:18:07 +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: 6facc476f305 - main - bus: Apply consistent style to prototypes List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6facc476f3056037f8b5cdb5546554ab3a887463 Auto-Submitted: auto-generated Date: Fri, 28 Nov 2025 09:18:07 +0000 Message-Id: <692968cf.3190b.28fc8b4@gitrepo.freebsd.org> The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=6facc476f3056037f8b5cdb5546554ab3a887463 commit 6facc476f3056037f8b5cdb5546554ab3a887463 Author: Dag-Erling Smørgrav AuthorDate: 2025-11-28 09:16:14 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-11-28 09:17:17 +0000 bus: Apply consistent style to prototypes Sponsored by: Klara, Inc. Sponsored by: NetApp, Inc. --- sys/sys/bus.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/sys/sys/bus.h b/sys/sys/bus.h index f54ed2c58fd1..e0c6c590ce8d 100644 --- a/sys/sys/bus.h +++ b/sys/sys/bus.h @@ -747,7 +747,7 @@ void device_unbusy(device_t dev); void device_verbose(device_t dev); ssize_t device_get_property(device_t dev, const char *prop, void *val, size_t sz, device_property_type_t type); -bool device_has_property(device_t dev, const char *prop); +bool device_has_property(device_t dev, const char *prop); /* * Access functions for devclass. @@ -860,10 +860,10 @@ int bus_get_pass(void); * Routines to lock / unlock the newbus lock. * Must be taken out to interact with newbus. */ -void bus_topo_lock(void); -void bus_topo_unlock(void); +void bus_topo_lock(void); +void bus_topo_unlock(void); struct mtx * bus_topo_mtx(void); -void bus_topo_assert(void); +void bus_topo_assert(void); /** * Shorthands for constructing method tables. @@ -958,17 +958,17 @@ varp ## _set_ ## var(device_t dev, type t) \ struct device_location_cache; typedef struct device_location_cache device_location_cache_t; device_location_cache_t *dev_wired_cache_init(void); -void dev_wired_cache_fini(device_location_cache_t *dcp); -bool dev_wired_cache_match(device_location_cache_t *dcp, device_t dev, const char *at); +void dev_wired_cache_fini(device_location_cache_t *dcp); +bool dev_wired_cache_match(device_location_cache_t *dcp, device_t dev, const char *at); #define DEV_PROP_NAME_IOMMU "iommu-unit" typedef void (*device_prop_dtr_t)(device_t dev, const char *name, void *val, void *dtr_ctx); -int device_set_prop(device_t dev, const char *name, void *val, +int device_set_prop(device_t dev, const char *name, void *val, device_prop_dtr_t dtr, void *dtr_ctx); -int device_get_prop(device_t dev, const char *name, void **valp); -int device_clear_prop(device_t dev, const char *name); -void device_clear_prop_alldev(const char *name); +int device_get_prop(device_t dev, const char *name, void **valp); +int device_clear_prop(device_t dev, const char *name); +void device_clear_prop_alldev(const char *name); /** * Shorthand macros, taking resource argument From nobody Fri Nov 28 14:35:28 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dHwnX5hf9z6HZXf for ; Fri, 28 Nov 2025 14:35:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dHwnX33JRz3sLV for ; Fri, 28 Nov 2025 14:35:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764340528; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/TrSwgmTfVou5qiMufO1Y4wwAo+hnKyevNXLF1DJpp4=; b=UuRGii2R4wqRpBBMbtJzG4ldGZ9cW3Ocj6isHpAz9942SmotJmsTI6fPLvEi4xHQEpiB1Y HruogMdscPiT80bV91paoQLmUPE3ualHMUNh07pbDejYzwub8gpg3Lihlzp8Bq+kKLkv6C tEAjKj7t7sBkpQVj3qWeqOVNoW+eX440wMqETxSSH96gNnXPkLgEv4Lkf8C7dk3dte/QVp zRMsRwv5e2+7Ug66G9Uq+4S0mVBC8CegqlmNa9X42wyH3Ls62zkf7UHgguwZ0pPXqQoqJi A0IRCLsEnvLfyEWSjiZ9Nar26X2tzaIMlz44uUnRZZz9FaQDm6WV0ni18ZDPpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764340528; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/TrSwgmTfVou5qiMufO1Y4wwAo+hnKyevNXLF1DJpp4=; b=X7uhBP4dyqeHbDbY7op9erIuSSLlodeY07qX2FympRsgDVUtL2x1VS+bra6GOn4V/FVwS8 qarER+eek0ZHON1ZHSNGSHDRcnt5dNfTIAcGqcMxXif8Axc+orjnCsc6RzRfmBH8IZEq4g Lu58XnOlONFr2lWSDjf4TPkzXKv1Df1CubgGQQJO/kEQ1HfpmrsB/c+eCRrwWqmS0rRANh YHl/SDSEOVNwiLcFRyz9d1NzjRZIYCjzbBdi5kdZfjtYKz2ua9a9+SQPa605ZSUpJZaDE1 Qi57Cau9pYpXIg9UxM0vKawbT//UCyJufHghg5oni1l55DvtlqcwLIX/lW1/AA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764340528; a=rsa-sha256; cv=none; b=nl9Fk1P7qdMI0kvHS8kFsURjYQJ1O7j5u9mlsRkGADmjgH9NEkd1iYh2KumvEBbYH/Ydhi BjKHX+xSIxjIpvc9aF7BL5gewGP065+QD3vLGhqWyJ7aHmZRLr2zWIzNrr7Xm5VZy9tphj eprtv0xFB1FzwUWyDjHUjOR6fXYacGrYfbvNHn7c8mh+AGdOq4FzGlnwKbvk92xdjTscq/ jHWUjKMaY+rk+4NDwe5/0XXUuAa61FOWBb8r09viE4TZuf0bORi87ncOn85KDKt6rL/vRo pNCX0cLg20u0x9N4vMaeRd5Z/IlAl2p9cizY7RlhiYLb8rX13Hs8jsbhIxMRMg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dHwnX2gDRz15sK for ; Fri, 28 Nov 2025 14:35:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2a6e8 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 28 Nov 2025 14:35:28 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: efb513fc19c8 - stable/15 - sound: Clean up midi/ includes List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: efb513fc19c80e814bc04b018492b2235cade928 Auto-Submitted: auto-generated Date: Fri, 28 Nov 2025 14:35:28 +0000 Message-Id: <6929b330.2a6e8.2310b424@gitrepo.freebsd.org> The branch stable/15 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=efb513fc19c80e814bc04b018492b2235cade928 commit efb513fc19c80e814bc04b018492b2235cade928 Author: Christos Margiolis AuthorDate: 2025-11-21 16:14:18 +0000 Commit: Christos Margiolis CommitDate: 2025-11-28 14:34:41 +0000 sound: Clean up midi/ includes Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D53841 (cherry picked from commit 4e8eb778803a8bffd0faa507ae2662725363cae5) --- sys/dev/sound/midi/midi.c | 23 +++++++++-------------- sys/dev/sound/midi/mpu401.c | 11 ++--------- 2 files changed, 11 insertions(+), 23 deletions(-) diff --git a/sys/dev/sound/midi/midi.c b/sys/dev/sound/midi/midi.c index b39288675ea6..e14a28557406 100644 --- a/sys/dev/sound/midi/midi.c +++ b/sys/dev/sound/midi/midi.c @@ -32,34 +32,29 @@ #include #include -#include +#include +#include #include +#include #include +#include #include -#include -#include -#include +#include +#include #include -#include -#include #include -#include -#include -#include +#include #include -#include -#include -#include -#include #ifdef HAVE_KERNEL_OPTION_HEADERS #include "opt_snd.h" #endif #include +#include + #include "mpu_if.h" -#include MALLOC_DEFINE(M_MIDI, "midi buffers", "Midi data allocation area"); #define MIDI_NAMELEN 16 diff --git a/sys/dev/sound/midi/mpu401.c b/sys/dev/sound/midi/mpu401.c index af3149ec8180..7d3edb6323ef 100644 --- a/sys/dev/sound/midi/mpu401.c +++ b/sys/dev/sound/midi/mpu401.c @@ -27,17 +27,10 @@ */ #include -#include -#include -#include -#include -#include -#include -#include #include +#include +#include #include -#include -#include /* to get driver_intr_t */ #ifdef HAVE_KERNEL_OPTION_HEADERS #include "opt_snd.h" From nobody Fri Nov 28 14:35:27 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dHwnW4v4xz6HZp2 for ; Fri, 28 Nov 2025 14:35:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dHwnW32b4z3sm2 for ; Fri, 28 Nov 2025 14:35:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764340527; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+08zxuL+sjVlH+3nD1vDYn8Gs6aHy4jvez9RmlSlMHk=; b=tFAfXN5PiVYm79c3VOtJJ5L7Hzy5Q4JRiRIdLsBNs8kTLgoGG3UMlct8/EhECV9R3RVSNZ dh/Q18ZhxerCqw5dFcm8lbdGQ1GiqOnTiwXUlLgb+O5qnONEKXHgladoZYgTQ0rBFffP/K sW4eRI3Qa07pTNpbhpbFkb4G/9B6k96vhcMP1M6tB3E5Hj3UKwoITPiVarakmLmDqdEjvx oXANvwHCDCHuSVFQJbX1GdASF5KSUph90Vl+wM59eZk177chBQsoSwRf+iHGrTPqJkh5fm Y+gPS27bRuJwNrVLtx/kAFvCvz+XvGCpfogZInNWGbYMi4yaAwKriy64SPCgnw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764340527; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+08zxuL+sjVlH+3nD1vDYn8Gs6aHy4jvez9RmlSlMHk=; b=D85m4dNO55FeEc5KrEnkiTdgX9E1Nsr3/k5lfJoMMsg7zjPLjC/4K3jJnVUETbt7RvpVCP TBWTSJuJGM9jvKFB9JNu2pVbJJvWvGosceIzG8YZdm/wL4keSIBlcMGiDqX0e+n4Cs2r4M Z+V59l9B+O3bt7fGpPukroTDqTZCKwfgkFVke9jWCb7E3+5JUXh6b2tZGnPqamhXyUWNdI aSK+noxfJQYkbuxUKgZ2radEcqz+OpBq23A+hJdInUJIVKjBQ84qh+gbms4svQIAktxH9Y BrEdiEsVB/c/l6UcfONtq/q4NSMwahHhuxdq6M8aioArZyS2Xdn6jc2+fEZzGw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764340527; a=rsa-sha256; cv=none; b=nCw2/gp9f18xw6JRWjZ1l64cXDx7pG5X+prd4u0b9rR1jxpKv75/Buvk5K2VpS5BbOKsrY 6XGVB32QtsdRVvj/4Zhfrf+r0dbrYGGlUD47sZ+sBdMIPVNUvd+WF4z4x2OOn746X9F2qe Kr5XP5Q4QwPDOzQ44QNJGTrPRhp66sCEoSMk7bNt2FvEsLV2fEprjQc2rdMyODLLcCu0ZC 5Nf875ridPq/kiyDQEl1ap0zo9xbEPSpcEDSl+cxLmlQ8LVp9Uf5fwgJxINiKzwOnRI6K4 ah9cBbYkkLUerFEEhWHVekLzQVS1t+cXm/Af8klEpJlAsRjmLOxTmVvXHoF7fQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dHwnW2FtRz15kZ for ; Fri, 28 Nov 2025 14:35:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 28cc9 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 28 Nov 2025 14:35:27 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: 48765e9306e9 - stable/15 - sound: Simplify logic in dsp_io_ops() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 48765e9306e94ea0910280f2ce2f4a6f0a38a7d1 Auto-Submitted: auto-generated Date: Fri, 28 Nov 2025 14:35:27 +0000 Message-Id: <6929b32f.28cc9.e2bb68c@gitrepo.freebsd.org> The branch stable/15 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=48765e9306e94ea0910280f2ce2f4a6f0a38a7d1 commit 48765e9306e94ea0910280f2ce2f4a6f0a38a7d1 Author: Christos Margiolis AuthorDate: 2025-11-21 16:14:13 +0000 Commit: Christos Margiolis CommitDate: 2025-11-28 14:34:41 +0000 sound: Simplify logic in dsp_io_ops() Use CHN_LOCK()/CHN_UNLOCK() directly, instead of dsp_lock_chans()/dsp_unlock_chans(). These functions are useful when we want to potentially lock both channels. Here we know which channel we are locking, so we can just lock it directly. This way we get rid of the prio variable as well. Related to runpid again, there is no reason to assign it when CHN_F_RUNNING is not set. channel->pid (as well as channel->comm) is always assigned in dsp_chn_alloc(). Get rid of runpid. I do not see how we can end up with channel->pid (td->td_proc->p_pid) not matching buf->uio_td->td_proc->p_pid. Also improve errno values. Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D53736 (cherry picked from commit b4c32d67d40a862620aa3e565ed0cb9ad59f1e60) --- sys/dev/sound/pcm/dsp.c | 32 ++++++++++---------------------- 1 file changed, 10 insertions(+), 22 deletions(-) diff --git a/sys/dev/sound/pcm/dsp.c b/sys/dev/sound/pcm/dsp.c index 1ae090f252c2..cb8b5414973c 100644 --- a/sys/dev/sound/pcm/dsp.c +++ b/sys/dev/sound/pcm/dsp.c @@ -464,8 +464,7 @@ dsp_io_ops(struct dsp_cdevpriv *priv, struct uio *buf) struct snddev_info *d; struct pcm_channel *ch; int (*chn_io)(struct pcm_channel *, struct uio *); - int prio, ret; - pid_t runpid; + int ret; d = priv->sc; if (!DSP_REGISTERED(d)) @@ -475,37 +474,27 @@ dsp_io_ops(struct dsp_cdevpriv *priv, struct uio *buf) switch (buf->uio_rw) { case UIO_READ: - prio = FREAD; ch = priv->rdch; chn_io = chn_read; break; case UIO_WRITE: - prio = FWRITE; ch = priv->wrch; chn_io = chn_write; break; } - - runpid = buf->uio_td->td_proc->p_pid; - - dsp_lock_chans(priv, prio); - - if (ch == NULL || !(ch->flags & CHN_F_BUSY)) { - if (priv->rdch != NULL || priv->wrch != NULL) - dsp_unlock_chans(priv, prio); + if (ch == NULL) { PCM_GIANT_EXIT(d); - return (EBADF); + return (ENXIO); } + CHN_LOCK(ch); - if (ch->flags & (CHN_F_MMAP | CHN_F_DEAD) || - (ch->flags & CHN_F_RUNNING && ch->pid != runpid)) { - dsp_unlock_chans(priv, prio); + if (!(ch->flags & CHN_F_BUSY) || + (ch->flags & (CHN_F_MMAP | CHN_F_DEAD))) { + CHN_UNLOCK(ch); PCM_GIANT_EXIT(d); - return (EINVAL); - } else if (!(ch->flags & CHN_F_RUNNING)) { + return (ENXIO); + } else if (!(ch->flags & CHN_F_RUNNING)) ch->flags |= CHN_F_RUNNING; - ch->pid = runpid; - } /* * chn_read/write must give up channel lock in order to copy bytes @@ -517,8 +506,7 @@ dsp_io_ops(struct dsp_cdevpriv *priv, struct uio *buf) ch->inprog--; CHN_BROADCAST(&ch->cv); - - dsp_unlock_chans(priv, prio); + CHN_UNLOCK(ch); PCM_GIANT_LEAVE(d); From nobody Fri Nov 28 14:35:29 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dHwnY6dG3z6HZb9 for ; Fri, 28 Nov 2025 14: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dHwnY3rMbz3sLW for ; Fri, 28 Nov 2025 14: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=1764340529; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2H9kCFQJNR+maWyk48g0ekdqwjmWxEbJ3ecuTUPqISE=; b=vGPLMfduVivWGPoRhvIUUVfDE0QxcsJh0STEDW442OoH3tVAsX5ueTqI2TFKrm8On5UkWO HsJAB6RwzAlDIxkY8fTSqlccsq12G74U26gg51cp6H9y4gx8xHJFr7PigIKIXo45nIKmF2 thiKKFnTerS652Cm5R2acKh8eKEoOyOdmodBgr7fySJAVsmAsPKGED8dnBCElqNRa2BKvJ U2w42UQMeYi+Xp2B5Scl63+zd5/QDBkpC9Z9Iw3mwUSAehij+gBar/ndK/JGZyp3ewggP6 B3MCCdF2x7ilRV/Yw4T8AU97RbfrestqJtOdnYLtKT2KWSEwj6n2IHzmuktRdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764340529; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2H9kCFQJNR+maWyk48g0ekdqwjmWxEbJ3ecuTUPqISE=; b=ZQ2yoXrRkJMvQA/FrnmvVvXuvlcLtlcpUHwSNI1w90XrbnAaHGZ0nVvuO7gUdgRMHuiQhu vuWqR8F0WQ+NNtfL+aDgN39c2dFGaSwSiEJWjCXXJbv+3P7906/7KLSh7YzwVex0+tDtJi yj03DkYzuEZHc9nsAK9WWGi9C0wAwHH60XnvlqfWrhZel5Wb0q/GjJTJtoUKXjbYwFqEwx IIBY/BvUjnbNncqxd+QIsH685HGebAlF5gCocVhtKKfVj17KOcONwo0msZPkEl5f47l6io dPMIIlw6SY2eTX251xt0JmNSToCG3rywNiojWG14/BOQRFHkegbWk3bTwbKQbg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764340529; a=rsa-sha256; cv=none; b=xcXP/Zkkf4TTiKQk3LfLV/PhjhMQCLpXHKsp/qGfiHTSzRkw8hkD2dCi680q3B+8BEZA2N lj8OenkPa0cNjp8Hredk3VoEwQMBkX5VH4//cg5KtohdlQ8uHWQk34cOq+qy93kOCrCC/v MWtXzCyjCmDImVbcnx6rsLaMc2lzZs4eywGtTCY2WX5klGT8ktZGb3QnxydvyV2maVuoGh H0rkSi9NnDlzRfybmNe4adI0V7NOJN7cuEe+rKnciGZXLX1ig+ImvW05TCVpvp1vbQ6/hx tI4W9Hxw3mfXGamnIWWqbT3q2IibSIi6X8qiuLgZArXLeZIzktttKyOUFPXo4w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dHwnY3RyGz15sL for ; Fri, 28 Nov 2025 14:35:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 28f78 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 28 Nov 2025 14:35:29 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: 839da868a5f9 - stable/15 - sound: Merge PCM_ALIVE() with PCM_REGISTERED() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 839da868a5f9eb8bddd20d44f1cd0f293c5685cd Auto-Submitted: auto-generated Date: Fri, 28 Nov 2025 14:35:29 +0000 Message-Id: <6929b331.28f78.6d1edb6d@gitrepo.freebsd.org> The branch stable/15 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=839da868a5f9eb8bddd20d44f1cd0f293c5685cd commit 839da868a5f9eb8bddd20d44f1cd0f293c5685cd Author: Christos Margiolis AuthorDate: 2025-11-21 16:14:24 +0000 Commit: Christos Margiolis CommitDate: 2025-11-28 14:34:41 +0000 sound: Merge PCM_ALIVE() with PCM_REGISTERED() PCM_ALIVE() is used only in pcm_unregister(), but it does not hurt to use PCM_REGISTERED(), which uses PCM_ALIVE() internally. In fact, it's more robust this way. Sponsored by: The FreeBSD Foundation MFC after: 1 week (cherry picked from commit 3107b952f534813846e4f58afdb57624a81618d8) --- sys/dev/sound/pcm/sound.c | 2 +- sys/dev/sound/pcm/sound.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/dev/sound/pcm/sound.c b/sys/dev/sound/pcm/sound.c index cb510d526fa8..60236eb4c69c 100644 --- a/sys/dev/sound/pcm/sound.c +++ b/sys/dev/sound/pcm/sound.c @@ -467,7 +467,7 @@ pcm_unregister(device_t dev) d = device_get_softc(dev); - if (!PCM_ALIVE(d)) { + if (!PCM_REGISTERED(d)) { device_printf(dev, "unregister: device not configured\n"); return (0); } diff --git a/sys/dev/sound/pcm/sound.h b/sys/dev/sound/pcm/sound.h index 8542a96ccb14..c03ac2c8ee58 100644 --- a/sys/dev/sound/pcm/sound.h +++ b/sys/dev/sound/pcm/sound.h @@ -133,8 +133,8 @@ struct snd_mixer; "\015PVCHANS" \ "\016RVCHANS" -#define PCM_ALIVE(x) ((x) != NULL && (x)->lock != NULL) -#define PCM_REGISTERED(x) (PCM_ALIVE(x) && ((x)->flags & SD_F_REGISTERED)) +#define PCM_REGISTERED(x) \ + ((x) != NULL && (x)->lock != NULL && ((x)->flags & SD_F_REGISTERED)) #define PCM_MAXCHANS 10000 #define PCM_CHANCOUNT(d) \ From nobody Fri Nov 28 14:35:30 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dHwnb1RNJz6HZp8 for ; Fri, 28 Nov 2025 14: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dHwnZ550hz3sNx for ; Fri, 28 Nov 2025 14: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=1764340530; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TR6S1696fLtnQGO/RgqJbMfbHq744UbbMDNClpkT6is=; b=mJc2tkwhpMTiJOAulYyigQwkTS4oxHEyf7CIEkac+d8qjyPmN0pjMinmJdeVy3egwxTKvg RrMQohO0fHfya+6x8DpwwKlOScG629Gw0w/cF2a3/seXPOq1hG5GDIZq6K8cbxKLOwEWLA rYN3cKX+qoYceeIsZimYoU0VAkRtpssxNBs6oMoI6BPsL9SJVfKuKnEj+1Vn7HadLd1a0d kZFVch9ptvMxUglqjLsCfrQnrRbcqPquKgeWOqeUGodNwlQ8TJKUd3Djfr7aljx4gvwcbN UHWILm8crs3NL90ugFksIlR9S0/2fu53vRwTfu6w1teofEjzWCuKYabJFwyGMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764340530; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TR6S1696fLtnQGO/RgqJbMfbHq744UbbMDNClpkT6is=; b=so/jG0p91N4oOB0IzdvjuP3GEVtOD2wp0aNZ4xNaS5kEUkizkKIBVEuKunvHPjHUApD7Y/ 9wbJKybAM3hatBNF9JpiDDrGu1vGFYBzbjRg+so51JeTg3vCK3FLBkG16u0WenfBesWoeA JOyHPlILsmEHfJaNW9tb7YxEMUyssg66mGLMDhrKfLVo0KeqI5nZ6h6klFpf3LwnIUG/oj /CAjFg27eDDSluRo4OX9/Aa08xBOrhV+5mKB7oCIl8lUtpIZXZnBT7TmQxZv3A9WNYjX0m qp60mpT/nzyAaZ4+KvjfDUCrfY75mOBwMaIuXI1GylvVuDHPdOnZbe88UbQRFQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764340530; a=rsa-sha256; cv=none; b=J4qphhTeMUGxetDBbe0rRN/iVfOQh9e297E5YfOjAT+r9SHDtdMLamJvZuJjm226TAayZA LsoScL2N95s+vyjogPR+ALl84WvxDoPi7gYO5icf9D+VAEB7P6xnDUAwBP8qy9zl15Sb8y P1H6CQdlmnRexkCSQzWUCvtMtA9F+tkUHQVM85W8ExOnUMI9RhP+BNHUWzGjP5/O0YGpl7 xRqsjRQLyr8FgoMVfAFOlR4YIHhe67QdfwNTfWelVJP/IiF/hcVfht57o67k5/qbJH6IK6 J8nKtEfOAMpgBHmDYN0zmBd/B8PSeEDwoKun39a7fBi9EYLNmJZiiqVpdHwVSw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dHwnZ4dMKz15Yb for ; Fri, 28 Nov 2025 14:35:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 28db3 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 28 Nov 2025 14:35:30 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: 47bb49b54098 - stable/15 - sound: Retire snd_mtx* wrappers List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 47bb49b540983dafe61e25cab7b165e97a234769 Auto-Submitted: auto-generated Date: Fri, 28 Nov 2025 14:35:30 +0000 Message-Id: <6929b332.28db3.22c08492@gitrepo.freebsd.org> The branch stable/15 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=47bb49b540983dafe61e25cab7b165e97a234769 commit 47bb49b540983dafe61e25cab7b165e97a234769 Author: Christos Margiolis AuthorDate: 2025-11-21 16:14:33 +0000 Commit: Christos Margiolis CommitDate: 2025-11-28 14:34:49 +0000 sound: Retire snd_mtx* wrappers Do not create mutexes with snd_mtxcreate(). It doesn't provide any value, plus it first allocates the mutex with malloc(9). Allocate mutexes in the stack and use mtx_* functions directly instead of the snd_mtx* wrappers. Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: kib, markj Differential Revision: https://reviews.freebsd.org/D53855 (cherry picked from commit 9d18115ca0ab0ef3f34173d4e2bdabec916d0b60) (cherry picked from commit 120f8a4c2ae8a011827d83b098ecf70c791f794b) --- sys/arm/allwinner/a10_codec.c | 10 ++-- sys/arm/freescale/imx/imx6_ssi.c | 24 ++++---- sys/arm/freescale/vybrid/vf_sai.c | 24 ++++---- sys/dev/sound/dummy.c | 29 +++++----- sys/dev/sound/pci/als4000.c | 50 ++++++++--------- sys/dev/sound/pci/atiixp.c | 18 +++--- sys/dev/sound/pci/cmi.c | 54 +++++++++--------- sys/dev/sound/pci/emu10k1.c | 57 +++++++++---------- sys/dev/sound/pci/emu10kx-pcm.c | 47 ++++++++-------- sys/dev/sound/pci/envy24.c | 68 +++++++++++------------ sys/dev/sound/pci/envy24ht.c | 69 ++++++++++++----------- sys/dev/sound/pci/es137x.c | 16 +++--- sys/dev/sound/pci/hda/hdaa.c | 6 +- sys/dev/sound/pci/hda/hdac.c | 15 ++--- sys/dev/sound/pci/hda/hdac_private.h | 2 +- sys/dev/sound/pci/hda/hdacc.c | 6 +- sys/dev/sound/pci/hdsp-pcm.c | 28 +++++----- sys/dev/sound/pci/hdsp.c | 35 ++++++------ sys/dev/sound/pci/hdsp.h | 2 +- sys/dev/sound/pci/hdspe-pcm.c | 28 +++++----- sys/dev/sound/pci/hdspe.c | 35 ++++++------ sys/dev/sound/pci/hdspe.h | 2 +- sys/dev/sound/pci/ich.c | 16 +++--- sys/dev/sound/pci/maestro3.c | 17 +++--- sys/dev/sound/pci/solo.c | 18 +++--- sys/dev/sound/pci/spicds.c | 34 ++++++------ sys/dev/sound/pci/t4dwave.c | 29 +++++----- sys/dev/sound/pci/via8233.c | 101 +++++++++++++++++---------------- sys/dev/sound/pci/via82c686.c | 36 ++++++------ sys/dev/sound/pcm/ac97.c | 52 ++++++++--------- sys/dev/sound/pcm/channel.c | 16 +++--- sys/dev/sound/pcm/channel.h | 14 ++--- sys/dev/sound/pcm/dsp.c | 4 +- sys/dev/sound/pcm/mixer.c | 105 +++++++++++++++++------------------ sys/dev/sound/pcm/sound.c | 33 +---------- sys/dev/sound/pcm/sound.h | 24 +++----- sys/dev/sound/usb/uaudio.c | 2 +- 37 files changed, 537 insertions(+), 589 deletions(-) diff --git a/sys/arm/allwinner/a10_codec.c b/sys/arm/allwinner/a10_codec.c index 0a4ba7aa31b2..d3920eddc1f1 100644 --- a/sys/arm/allwinner/a10_codec.c +++ b/sys/arm/allwinner/a10_codec.c @@ -159,7 +159,7 @@ struct a10codec_chinfo { struct a10codec_info { device_t dev; struct resource *res[2]; - struct mtx *lock; + struct mtx lock; bus_dma_tag_t dmat; unsigned dmasize; void *ih; @@ -949,7 +949,7 @@ a10codec_chan_trigger(kobj_t obj, void *data, int go) if (!PCMTRIG_COMMON(go)) return (0); - snd_mtxlock(sc->lock); + mtx_lock(&sc->lock); switch (go) { case PCMTRIG_START: ch->run = 1; @@ -964,7 +964,7 @@ a10codec_chan_trigger(kobj_t obj, void *data, int go) default: break; } - snd_mtxunlock(sc->lock); + mtx_unlock(&sc->lock); return (0); } @@ -1075,7 +1075,7 @@ a10codec_attach(device_t dev) sc = malloc(sizeof(*sc), M_DEVBUF, M_WAITOK | M_ZERO); sc->cfg = (void *)ofw_bus_search_compatible(dev, compat_data)->ocd_data; sc->dev = dev; - sc->lock = snd_mtxcreate(device_get_nameunit(dev), "a10codec softc"); + mtx_init(&sc->lock, device_get_nameunit(dev), "a10codec_softc", MTX_DEF); if (bus_alloc_resources(dev, a10codec_spec, sc->res)) { device_printf(dev, "cannot allocate resources for device\n"); @@ -1180,7 +1180,7 @@ a10codec_attach(device_t dev) fail: bus_release_resources(dev, a10codec_spec, sc->res); - snd_mtxfree(sc->lock); + mtx_destroy(&sc->lock); free(sc, M_DEVBUF); return (ENXIO); diff --git a/sys/arm/freescale/imx/imx6_ssi.c b/sys/arm/freescale/imx/imx6_ssi.c index 5a0e671f15a2..f4ef955761b4 100644 --- a/sys/arm/freescale/imx/imx6_ssi.c +++ b/sys/arm/freescale/imx/imx6_ssi.c @@ -173,7 +173,7 @@ struct sc_info { bus_space_tag_t bst; bus_space_handle_t bsh; device_t dev; - struct mtx *lock; + struct mtx lock; void *ih; int pos; int dma_size; @@ -242,10 +242,10 @@ ssimixer_init(struct snd_mixer *m) mask = SOUND_MASK_PCM; mask |= SOUND_MASK_VOLUME; - snd_mtxlock(sc->lock); + mtx_lock(&sc->lock); pcm_setflags(scp->dev, pcm_getflags(scp->dev) | SD_F_SOFTPCMVOL); mix_setdevs(m, mask); - snd_mtxunlock(sc->lock); + mtx_unlock(&sc->lock); return (0); } @@ -290,14 +290,14 @@ ssichan_init(kobj_t obj, void *devinfo, struct snd_dbuf *b, scp = (struct sc_pcminfo *)devinfo; sc = scp->sc; - snd_mtxlock(sc->lock); + mtx_lock(&sc->lock); ch = &scp->chan[0]; ch->dir = dir; ch->run = 0; ch->buffer = b; ch->channel = c; ch->parent = scp; - snd_mtxunlock(sc->lock); + mtx_unlock(&sc->lock); if (sndbuf_setup(ch->buffer, sc->buf_base, sc->dma_size) != 0) { device_printf(scp->dev, "Can't setup sndbuf.\n"); @@ -318,9 +318,9 @@ ssichan_free(kobj_t obj, void *data) device_printf(scp->dev, "ssichan_free()\n"); #endif - snd_mtxlock(sc->lock); + mtx_lock(&sc->lock); /* TODO: free channel buffer */ - snd_mtxunlock(sc->lock); + mtx_unlock(&sc->lock); return (0); } @@ -565,7 +565,7 @@ ssichan_trigger(kobj_t obj, void *data, int go) scp = ch->parent; sc = scp->sc; - snd_mtxlock(sc->lock); + mtx_lock(&sc->lock); switch (go) { case PCMTRIG_START: @@ -590,7 +590,7 @@ ssichan_trigger(kobj_t obj, void *data, int go) break; } - snd_mtxunlock(sc->lock); + mtx_unlock(&sc->lock); return (0); } @@ -736,11 +736,7 @@ ssi_attach(device_t dev) sc->pos = 0; sc->conf = malloc(sizeof(struct sdma_conf), M_DEVBUF, M_WAITOK | M_ZERO); - sc->lock = snd_mtxcreate(device_get_nameunit(dev), "ssi softc"); - if (sc->lock == NULL) { - device_printf(dev, "Can't create mtx\n"); - return (ENXIO); - } + mtx_init(&sc->lock, device_get_nameunit(dev), "ssi softc", MTX_DEF); if (bus_alloc_resources(dev, ssi_spec, sc->res)) { device_printf(dev, "could not allocate resources\n"); diff --git a/sys/arm/freescale/vybrid/vf_sai.c b/sys/arm/freescale/vybrid/vf_sai.c index 9c0125768fee..d3a3ab93fe80 100644 --- a/sys/arm/freescale/vybrid/vf_sai.c +++ b/sys/arm/freescale/vybrid/vf_sai.c @@ -138,7 +138,7 @@ struct sc_info { bus_space_tag_t bst; bus_space_handle_t bsh; device_t dev; - struct mtx *lock; + struct mtx lock; uint32_t speed; uint32_t period; void *ih; @@ -206,10 +206,10 @@ saimixer_init(struct snd_mixer *m) mask = SOUND_MASK_PCM; - snd_mtxlock(sc->lock); + mtx_lock(&sc->lock); pcm_setflags(scp->dev, pcm_getflags(scp->dev) | SD_F_SOFTPCMVOL); mix_setdevs(m, mask); - snd_mtxunlock(sc->lock); + mtx_unlock(&sc->lock); return (0); } @@ -252,14 +252,14 @@ saichan_init(kobj_t obj, void *devinfo, struct snd_dbuf *b, scp = (struct sc_pcminfo *)devinfo; sc = scp->sc; - snd_mtxlock(sc->lock); + mtx_lock(&sc->lock); ch = &scp->chan[0]; ch->dir = dir; ch->run = 0; ch->buffer = b; ch->channel = c; ch->parent = scp; - snd_mtxunlock(sc->lock); + mtx_unlock(&sc->lock); if (sndbuf_setup(ch->buffer, sc->buf_base, sc->dma_size) != 0) { device_printf(scp->dev, "Can't setup sndbuf.\n"); @@ -280,9 +280,9 @@ saichan_free(kobj_t obj, void *data) device_printf(scp->dev, "saichan_free()\n"); #endif - snd_mtxlock(sc->lock); + mtx_lock(&sc->lock); /* TODO: free channel buffer */ - snd_mtxunlock(sc->lock); + mtx_unlock(&sc->lock); return (0); } @@ -513,7 +513,7 @@ saichan_trigger(kobj_t obj, void *data, int go) struct sc_pcminfo *scp = ch->parent; struct sc_info *sc = scp->sc; - snd_mtxlock(sc->lock); + mtx_lock(&sc->lock); switch (go) { case PCMTRIG_START: @@ -532,7 +532,7 @@ saichan_trigger(kobj_t obj, void *data, int go) break; } - snd_mtxunlock(sc->lock); + mtx_unlock(&sc->lock); return (0); } @@ -691,11 +691,7 @@ sai_attach(device_t dev) sc->sr = &rate_map[0]; sc->pos = 0; - sc->lock = snd_mtxcreate(device_get_nameunit(dev), "sai softc"); - if (sc->lock == NULL) { - device_printf(dev, "Cant create mtx\n"); - return (ENXIO); - } + mtx_init(&sc->lock, device_get_nameunit(dev), "sai softc", MTX_DEF); if (bus_alloc_resources(dev, sai_spec, sc->res)) { device_printf(dev, "could not allocate resources\n"); diff --git a/sys/dev/sound/dummy.c b/sys/dev/sound/dummy.c index 0a2717ec418c..74ca1d0c924c 100644 --- a/sys/dev/sound/dummy.c +++ b/sys/dev/sound/dummy.c @@ -64,7 +64,7 @@ struct dummy_softc { int chnum; struct dummy_chan chans[DUMMY_NCHAN]; struct callout callout; - struct mtx *lock; + struct mtx lock; bool stopped; }; @@ -74,7 +74,7 @@ dummy_active(struct dummy_softc *sc) struct dummy_chan *ch; int i; - snd_mtxassert(sc->lock); + mtx_assert(&sc->lock, MA_OWNED); for (i = 0; i < sc->chnum; i++) { ch = &sc->chans[i]; @@ -109,9 +109,9 @@ dummy_chan_io(void *arg) ch->ptr %= ch->buf->bufsize; } else sndbuf_fillsilence(ch->buf); - snd_mtxunlock(sc->lock); + mtx_unlock(&sc->lock); chn_intr(ch->chan); - snd_mtxlock(sc->lock); + mtx_lock(&sc->lock); } if (!sc->stopped) callout_schedule(&sc->callout, 1); @@ -141,7 +141,7 @@ dummy_chan_init(kobj_t obj, void *devinfo, struct snd_dbuf *b, sc = devinfo; - snd_mtxlock(sc->lock); + mtx_lock(&sc->lock); ch = &sc->chans[sc->chnum++]; ch->sc = sc; @@ -150,7 +150,7 @@ dummy_chan_init(kobj_t obj, void *devinfo, struct snd_dbuf *b, ch->buf = b; ch->caps = &sc->caps; - snd_mtxunlock(sc->lock); + mtx_unlock(&sc->lock); bufsz = pcm_getbuffersize(sc->dev, 2048, 2048, 65536); buf = malloc(bufsz, M_DEVBUF, M_WAITOK | M_ZERO); @@ -199,10 +199,10 @@ dummy_chan_trigger(kobj_t obj, void *data, int go) struct dummy_chan *ch = data; struct dummy_softc *sc = ch->sc; - snd_mtxlock(sc->lock); + mtx_lock(&sc->lock); if (sc->stopped) { - snd_mtxunlock(sc->lock); + mtx_unlock(&sc->lock); return (0); } @@ -222,7 +222,7 @@ dummy_chan_trigger(kobj_t obj, void *data, int go) break; } - snd_mtxunlock(sc->lock); + mtx_unlock(&sc->lock); return (0); } @@ -320,8 +320,9 @@ dummy_attach(device_t dev) sc = device_get_softc(dev); sc->dev = dev; - sc->lock = snd_mtxcreate(device_get_nameunit(dev), "snd_dummy softc"); - callout_init_mtx(&sc->callout, sc->lock, 0); + mtx_init(&sc->lock, device_get_nameunit(dev), "snd_dummy softc", + MTX_DEF); + callout_init_mtx(&sc->callout, &sc->lock, 0); sc->cap_fmts[0] = SND_FORMAT(AFMT_S32_LE, 2, 0); sc->cap_fmts[1] = SND_FORMAT(AFMT_S24_LE, 2, 0); @@ -362,12 +363,12 @@ dummy_detach(device_t dev) struct dummy_softc *sc = device_get_softc(dev); int err; - snd_mtxlock(sc->lock); + mtx_lock(&sc->lock); sc->stopped = true; - snd_mtxunlock(sc->lock); + mtx_unlock(&sc->lock); callout_drain(&sc->callout); err = pcm_unregister(dev); - snd_mtxfree(sc->lock); + mtx_destroy(&sc->lock); return (err); } diff --git a/sys/dev/sound/pci/als4000.c b/sys/dev/sound/pci/als4000.c index a8c3303af74f..aea7cc6d3a64 100644 --- a/sys/dev/sound/pci/als4000.c +++ b/sys/dev/sound/pci/als4000.c @@ -79,7 +79,7 @@ struct sc_info { struct resource *reg, *irq; int regid, irqid; void *ih; - struct mtx *lock; + struct mtx lock; unsigned int bufsz; struct sc_chinfo pch, rch; @@ -208,7 +208,7 @@ alschan_init(kobj_t obj, void *devinfo, struct sc_info *sc = devinfo; struct sc_chinfo *ch; - snd_mtxlock(sc->lock); + mtx_lock(&sc->lock); if (dir == PCMDIR_PLAY) { ch = &sc->pch; ch->gcr_fifo_status = ALS_GCR_FIFO0_STATUS; @@ -223,7 +223,7 @@ alschan_init(kobj_t obj, void *devinfo, ch->format = SND_FORMAT(AFMT_U8, 1, 0); ch->speed = 8000; ch->buffer = b; - snd_mtxunlock(sc->lock); + mtx_unlock(&sc->lock); if (sndbuf_alloc(ch->buffer, sc->parent_dmat, 0, sc->bufsz) != 0) return NULL; @@ -278,9 +278,9 @@ alschan_getptr(kobj_t obj, void *data) struct sc_info *sc = ch->parent; int32_t pos, sz; - snd_mtxlock(sc->lock); + mtx_lock(&sc->lock); pos = als_gcr_rd(ch->parent, ch->gcr_fifo_status) & 0xffff; - snd_mtxunlock(sc->lock); + mtx_unlock(&sc->lock); sz = ch->buffer->bufsize; return (2 * sz - pos - 1) % sz; } @@ -397,7 +397,7 @@ alspchan_trigger(kobj_t obj, void *data, int go) if (!PCMTRIG_COMMON(go)) return 0; - snd_mtxlock(sc->lock); + mtx_lock(&sc->lock); switch(go) { case PCMTRIG_START: als_playback_start(ch); @@ -409,7 +409,7 @@ alspchan_trigger(kobj_t obj, void *data, int go) default: break; } - snd_mtxunlock(sc->lock); + mtx_unlock(&sc->lock); return 0; } @@ -493,7 +493,7 @@ alsrchan_trigger(kobj_t obj, void *data, int go) struct sc_chinfo *ch = data; struct sc_info *sc = ch->parent; - snd_mtxlock(sc->lock); + mtx_lock(&sc->lock); switch(go) { case PCMTRIG_START: als_capture_start(ch); @@ -503,7 +503,7 @@ alsrchan_trigger(kobj_t obj, void *data, int go) als_capture_stop(ch); break; } - snd_mtxunlock(sc->lock); + mtx_unlock(&sc->lock); return 0; } @@ -637,19 +637,19 @@ als_intr(void *p) struct sc_info *sc = (struct sc_info *)p; u_int8_t intr, sb_status; - snd_mtxlock(sc->lock); + mtx_lock(&sc->lock); intr = als_intr_rd(sc); if (intr & 0x80) { - snd_mtxunlock(sc->lock); + mtx_unlock(&sc->lock); chn_intr(sc->pch.channel); - snd_mtxlock(sc->lock); + mtx_lock(&sc->lock); } if (intr & 0x40) { - snd_mtxunlock(sc->lock); + mtx_unlock(&sc->lock); chn_intr(sc->rch.channel); - snd_mtxlock(sc->lock); + mtx_lock(&sc->lock); } /* ACK interrupt in PCI core */ @@ -667,7 +667,7 @@ als_intr(void *p) if (sb_status & ALS_IRQ_CR1E) als_ack_read(sc, ALS_CR1E_ACK_PORT); - snd_mtxunlock(sc->lock); + mtx_unlock(&sc->lock); return; } @@ -749,10 +749,7 @@ als_resource_free(device_t dev, struct sc_info *sc) bus_dma_tag_destroy(sc->parent_dmat); sc->parent_dmat = 0; } - if (sc->lock) { - snd_mtxfree(sc->lock); - sc->lock = NULL; - } + mtx_destroy(&sc->lock); } static int @@ -808,7 +805,8 @@ als_pci_attach(device_t dev) char status[SND_STATUSLEN]; sc = malloc(sizeof(*sc), M_DEVBUF, M_WAITOK | M_ZERO); - sc->lock = snd_mtxcreate(device_get_nameunit(dev), "snd_als4000 softc"); + mtx_init(&sc->lock, device_get_nameunit(dev), "snd_als4000 softc", + MTX_DEF); sc->dev = dev; pci_enable_busmaster(dev); @@ -882,11 +880,11 @@ als_pci_suspend(device_t dev) { struct sc_info *sc = pcm_getdevinfo(dev); - snd_mtxlock(sc->lock); + mtx_lock(&sc->lock); sc->pch.dma_was_active = als_playback_stop(&sc->pch); sc->rch.dma_was_active = als_capture_stop(&sc->rch); als_uninit(sc); - snd_mtxunlock(sc->lock); + mtx_unlock(&sc->lock); return 0; } @@ -895,16 +893,16 @@ als_pci_resume(device_t dev) { struct sc_info *sc = pcm_getdevinfo(dev); - snd_mtxlock(sc->lock); + mtx_lock(&sc->lock); if (als_init(sc) != 0) { device_printf(dev, "unable to reinitialize the card\n"); - snd_mtxunlock(sc->lock); + mtx_unlock(&sc->lock); return ENXIO; } if (mixer_reinit(dev) != 0) { device_printf(dev, "unable to reinitialize the mixer\n"); - snd_mtxunlock(sc->lock); + mtx_unlock(&sc->lock); return ENXIO; } @@ -915,7 +913,7 @@ als_pci_resume(device_t dev) if (sc->rch.dma_was_active) { als_capture_start(&sc->rch); } - snd_mtxunlock(sc->lock); + mtx_unlock(&sc->lock); return 0; } diff --git a/sys/dev/sound/pci/atiixp.c b/sys/dev/sound/pci/atiixp.c index 30f061fd9388..12906ecc6253 100644 --- a/sys/dev/sound/pci/atiixp.c +++ b/sys/dev/sound/pci/atiixp.c @@ -129,7 +129,7 @@ struct atiixp_info { uint32_t blkcnt; int registered_channels; - struct mtx *lock; + struct mtx lock; struct callout poll_timer; int poll_ticks, polling; }; @@ -139,9 +139,9 @@ struct atiixp_info { #define atiixp_wr(_sc, _reg, _val) \ bus_space_write_4((_sc)->st, (_sc)->sh, _reg, _val) -#define atiixp_lock(_sc) snd_mtxlock((_sc)->lock) -#define atiixp_unlock(_sc) snd_mtxunlock((_sc)->lock) -#define atiixp_assert(_sc) snd_mtxassert((_sc)->lock) +#define atiixp_lock(_sc) mtx_lock(&(_sc)->lock) +#define atiixp_unlock(_sc) mtx_unlock(&(_sc)->lock) +#define atiixp_assert(_sc) mtx_assert(&(_sc)->lock, MA_OWNED) static uint32_t atiixp_fmt_32bit[] = { SND_FORMAT(AFMT_S16_LE, 2, 0), @@ -1019,7 +1019,7 @@ atiixp_chip_post_init(void *arg) if (sc->codec_not_ready_bits == 0) { /* wait for the interrupts to happen */ do { - msleep(sc, sc->lock, PWAIT, "ixpslp", max(hz / 10, 1)); + msleep(sc, &sc->lock, PWAIT, "ixpslp", max(hz / 10, 1)); if (sc->codec_not_ready_bits != 0) break; } while (--timeout); @@ -1157,10 +1157,7 @@ atiixp_release_resource(struct atiixp_info *sc) bus_dma_tag_destroy(sc->sgd_dmat); sc->sgd_dmat = NULL; } - if (sc->lock) { - snd_mtxfree(sc->lock); - sc->lock = NULL; - } + mtx_destroy(&sc->lock); free(sc, M_DEVBUF); } @@ -1190,7 +1187,8 @@ atiixp_pci_attach(device_t dev) int i; sc = malloc(sizeof(*sc), M_DEVBUF, M_WAITOK | M_ZERO); - sc->lock = snd_mtxcreate(device_get_nameunit(dev), "snd_atiixp softc"); + mtx_init(&sc->lock, device_get_nameunit(dev), "snd_atiixp softc", + MTX_DEF); sc->dev = dev; callout_init(&sc->poll_timer, 1); diff --git a/sys/dev/sound/pci/cmi.c b/sys/dev/sound/pci/cmi.c index 28427d449c8d..99925d236c08 100644 --- a/sys/dev/sound/pci/cmi.c +++ b/sys/dev/sound/pci/cmi.c @@ -116,7 +116,7 @@ struct sc_info { struct resource *reg, *irq; int regid, irqid; void *ih; - struct mtx *lock; + struct mtx lock; int spdif_enabled; unsigned int bufsz; @@ -361,13 +361,13 @@ cmichan_init(kobj_t obj, void *devinfo, } ch->dir = dir; - snd_mtxlock(sc->lock); + mtx_lock(&sc->lock); if (ch->dir == PCMDIR_PLAY) { cmi_dma_prog(sc, ch, CMPCI_REG_DMA0_BASE); } else { cmi_dma_prog(sc, ch, CMPCI_REG_DMA1_BASE); } - snd_mtxunlock(sc->lock); + mtx_unlock(&sc->lock); return ch; } @@ -394,7 +394,7 @@ cmichan_setformat(kobj_t obj, void *data, u_int32_t format) f |= CMPCI_REG_FORMAT_MONO; } - snd_mtxlock(sc->lock); + mtx_lock(&sc->lock); if (ch->dir == PCMDIR_PLAY) { cmi_partial_wr4(ch->parent, CMPCI_REG_CHANNEL_FORMAT, @@ -408,7 +408,7 @@ cmichan_setformat(kobj_t obj, void *data, u_int32_t format) CMPCI_REG_CH1_FORMAT_MASK, f); } - snd_mtxunlock(sc->lock); + mtx_unlock(&sc->lock); ch->fmt = format; return 0; @@ -422,7 +422,7 @@ cmichan_setspeed(kobj_t obj, void *data, u_int32_t speed) u_int32_t r, rsp __unused; r = cmpci_rate_to_regvalue(speed); - snd_mtxlock(sc->lock); + mtx_lock(&sc->lock); if (ch->dir == PCMDIR_PLAY) { if (speed < 44100) { /* disable if req before rate change */ @@ -450,7 +450,7 @@ cmichan_setspeed(kobj_t obj, void *data, u_int32_t speed) rsp >>= CMPCI_REG_ADC_FS_SHIFT; rsp &= CMPCI_REG_ADC_FS_MASK; } - snd_mtxunlock(sc->lock); + mtx_unlock(&sc->lock); ch->spd = cmpci_regvalue_to_rate(r); DEB(printf("cmichan_setspeed (%s) %d -> %d (%d)\n", @@ -484,7 +484,7 @@ cmichan_trigger(kobj_t obj, void *data, int go) if (!PCMTRIG_COMMON(go)) return 0; - snd_mtxlock(sc->lock); + mtx_lock(&sc->lock); if (ch->dir == PCMDIR_PLAY) { switch(go) { case PCMTRIG_START: @@ -506,7 +506,7 @@ cmichan_trigger(kobj_t obj, void *data, int go) break; } } - snd_mtxunlock(sc->lock); + mtx_unlock(&sc->lock); return 0; } @@ -517,13 +517,13 @@ cmichan_getptr(kobj_t obj, void *data) struct sc_info *sc = ch->parent; u_int32_t physptr, bufptr, sz; - snd_mtxlock(sc->lock); + mtx_lock(&sc->lock); if (ch->dir == PCMDIR_PLAY) { physptr = cmi_rd(sc, CMPCI_REG_DMA0_BASE, 4); } else { physptr = cmi_rd(sc, CMPCI_REG_DMA1_BASE, 4); } - snd_mtxunlock(sc->lock); + mtx_unlock(&sc->lock); sz = ch->buffer->bufsize; bufptr = (physptr - ch->phys_buf + sz - ch->bps) % sz; @@ -538,7 +538,7 @@ cmi_intr(void *data) u_int32_t intrstat; u_int32_t toclear; - snd_mtxlock(sc->lock); + mtx_lock(&sc->lock); intrstat = cmi_rd(sc, CMPCI_REG_INTR_STATUS, 4); if ((intrstat & CMPCI_REG_ANY_INTR) != 0) { toclear = 0; @@ -554,7 +554,7 @@ cmi_intr(void *data) if (toclear) { cmi_clr4(sc, CMPCI_REG_INTR_CTRL, toclear); - snd_mtxunlock(sc->lock); + mtx_unlock(&sc->lock); /* Signal interrupts to channel */ if (intrstat & CMPCI_REG_CH0_INTR) { @@ -565,14 +565,14 @@ cmi_intr(void *data) chn_intr(sc->rch.channel); } - snd_mtxlock(sc->lock); + mtx_lock(&sc->lock); cmi_set4(sc, CMPCI_REG_INTR_CTRL, toclear); } } if(sc->mpu_intr) { (sc->mpu_intr)(sc->mpu); } - snd_mtxunlock(sc->lock); + mtx_unlock(&sc->lock); return; } @@ -799,10 +799,10 @@ cmi_muninit(struct mpu401 *arg, void *cookie) { struct sc_info *sc = cookie; - snd_mtxlock(sc->lock); + mtx_lock(&sc->lock); sc->mpu_intr = NULL; sc->mpu = NULL; - snd_mtxunlock(sc->lock); + mtx_unlock(&sc->lock); return 0; } @@ -933,7 +933,8 @@ cmi_attach(device_t dev) char status[SND_STATUSLEN]; sc = malloc(sizeof(*sc), M_DEVBUF, M_WAITOK | M_ZERO); - sc->lock = snd_mtxcreate(device_get_nameunit(dev), "snd_cmi softc"); + mtx_init(&sc->lock, device_get_nameunit(dev), "snd_cmi softc", + MTX_DEF); pci_enable_busmaster(dev); sc->dev = dev; @@ -1007,8 +1008,7 @@ cmi_attach(device_t dev) bus_release_resource(dev, SYS_RES_IRQ, sc->irqid, sc->irq); if (sc->reg) bus_release_resource(dev, SYS_RES_IOPORT, sc->regid, sc->reg); - if (sc->lock) - snd_mtxfree(sc->lock); + mtx_destroy(&sc->lock); if (sc) free(sc, M_DEVBUF); @@ -1037,7 +1037,7 @@ cmi_detach(device_t dev) if (sc->mpu_reg) bus_release_resource(dev, SYS_RES_IOPORT, sc->mpu_regid, sc->mpu_reg); - snd_mtxfree(sc->lock); + mtx_destroy(&sc->lock); free(sc, M_DEVBUF); return 0; @@ -1048,11 +1048,11 @@ cmi_suspend(device_t dev) { struct sc_info *sc = pcm_getdevinfo(dev); - snd_mtxlock(sc->lock); + mtx_lock(&sc->lock); sc->pch.dma_was_active = cmi_ch0_stop(sc, &sc->pch); sc->rch.dma_was_active = cmi_ch1_stop(sc, &sc->rch); cmi_power(sc, 3); - snd_mtxunlock(sc->lock); + mtx_unlock(&sc->lock); return 0; } @@ -1061,17 +1061,17 @@ cmi_resume(device_t dev) { struct sc_info *sc = pcm_getdevinfo(dev); - snd_mtxlock(sc->lock); + mtx_lock(&sc->lock); cmi_power(sc, 0); if (cmi_init(sc) != 0) { device_printf(dev, "unable to reinitialize the card\n"); - snd_mtxunlock(sc->lock); + mtx_unlock(&sc->lock); return ENXIO; } if (mixer_reinit(dev) == -1) { device_printf(dev, "unable to reinitialize the mixer\n"); - snd_mtxunlock(sc->lock); + mtx_unlock(&sc->lock); return ENXIO; } @@ -1086,7 +1086,7 @@ cmi_resume(device_t dev) cmichan_setformat(NULL, &sc->rch, sc->rch.fmt); cmi_ch1_start(sc, &sc->rch); } - snd_mtxunlock(sc->lock); + mtx_unlock(&sc->lock); return 0; } diff --git a/sys/dev/sound/pci/emu10k1.c b/sys/dev/sound/pci/emu10k1.c index a85031977f4b..da2ddc99f5a1 100644 --- a/sys/dev/sound/pci/emu10k1.c +++ b/sys/dev/sound/pci/emu10k1.c @@ -218,7 +218,7 @@ struct sc_info { struct resource *reg, *irq; void *ih; - struct mtx *lock; + struct mtx lock; unsigned int bufsz; int timer, timerinterval; @@ -820,10 +820,10 @@ emupchan_init(kobj_t obj, void *devinfo, struct snd_dbuf *b, ch->blksz = sc->bufsz / 2; ch->fmt = SND_FORMAT(AFMT_U8, 1, 0); ch->spd = 8000; - snd_mtxlock(sc->lock); + mtx_lock(&sc->lock); ch->master = emu_valloc(sc); ch->slave = emu_valloc(sc); - snd_mtxunlock(sc->lock); + mtx_unlock(&sc->lock); r = (emu_vinit(sc, ch->master, ch->slave, sc->bufsz, ch->buffer)) ? NULL : ch; @@ -837,9 +837,9 @@ emupchan_free(kobj_t obj, void *data) struct sc_info *sc = ch->parent; int r; - snd_mtxlock(sc->lock); + mtx_lock(&sc->lock); r = emu_memfree(sc, ch->buffer->buf); - snd_mtxunlock(sc->lock); + mtx_unlock(&sc->lock); return r; } @@ -869,9 +869,9 @@ emupchan_setblocksize(kobj_t obj, void *data, u_int32_t blocksize) struct sc_info *sc = ch->parent; ch->blksz = blocksize; - snd_mtxlock(sc->lock); + mtx_lock(&sc->lock); emu_settimer(sc); - snd_mtxunlock(sc->lock); + mtx_unlock(&sc->lock); return blocksize; } @@ -884,7 +884,7 @@ emupchan_trigger(kobj_t obj, void *data, int go) if (!PCMTRIG_COMMON(go)) return 0; - snd_mtxlock(sc->lock); + mtx_lock(&sc->lock); if (go == PCMTRIG_START) { emu_vsetup(ch); emu_vwrite(sc, ch->master); @@ -901,7 +901,7 @@ emupchan_trigger(kobj_t obj, void *data, int go) } ch->run = (go == PCMTRIG_START) ? 1 : 0; emu_vtrigger(sc, ch->master, ch->run); - snd_mtxunlock(sc->lock); + mtx_unlock(&sc->lock); return 0; } @@ -912,9 +912,9 @@ emupchan_getptr(kobj_t obj, void *data) struct sc_info *sc = ch->parent; int r; - snd_mtxlock(sc->lock); + mtx_lock(&sc->lock); r = emu_vpos(sc, ch->master); - snd_mtxunlock(sc->lock); + mtx_unlock(&sc->lock); return r; } @@ -984,10 +984,10 @@ emurchan_init(kobj_t obj, void *devinfo, struct snd_dbuf *b, if (sndbuf_alloc(ch->buffer, sc->parent_dmat, 0, sc->bufsz) != 0) return NULL; else { - snd_mtxlock(sc->lock); + mtx_lock(&sc->lock); emu_wrptr(sc, 0, ch->basereg, ch->buffer->buf_addr); emu_wrptr(sc, 0, ch->sizereg, 0); /* off */ - snd_mtxunlock(sc->lock); + mtx_unlock(&sc->lock); return ch; } } @@ -1027,9 +1027,9 @@ emurchan_setblocksize(kobj_t obj, void *data, u_int32_t blocksize) struct sc_info *sc = ch->parent; ch->blksz = blocksize; - snd_mtxlock(sc->lock); + mtx_lock(&sc->lock); emu_settimer(sc); - snd_mtxunlock(sc->lock); + mtx_unlock(&sc->lock); return blocksize; } @@ -1069,7 +1069,7 @@ emurchan_trigger(kobj_t obj, void *data, int go) sz = EMU_RECBS_BUFSIZE_4096; } - snd_mtxlock(sc->lock); + mtx_lock(&sc->lock); switch(go) { case PCMTRIG_START: ch->run = 1; @@ -1111,7 +1111,7 @@ emurchan_trigger(kobj_t obj, void *data, int go) default: break; } - snd_mtxunlock(sc->lock); + mtx_unlock(&sc->lock); return 0; } @@ -1123,9 +1123,9 @@ emurchan_getptr(kobj_t obj, void *data) struct sc_info *sc = ch->parent; int r; - snd_mtxlock(sc->lock); + mtx_lock(&sc->lock); r = emu_rdptr(sc, 0, ch->idxreg) & 0x0000ffff; - snd_mtxunlock(sc->lock); + mtx_unlock(&sc->lock); return r; } @@ -1171,9 +1171,9 @@ emu_muninit(struct mpu401 *arg, void *cookie) { struct sc_info *sc = cookie; - snd_mtxlock(sc->lock); + mtx_lock(&sc->lock); sc->mpu_intr = NULL; - snd_mtxunlock(sc->lock); + mtx_unlock(&sc->lock); *** 3084 LINES SKIPPED *** From nobody Fri Nov 28 14:35:31 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dHwnc14MBz6HZdw for ; Fri, 28 Nov 2025 14:35:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dHwnb6HRLz3sLY for ; Fri, 28 Nov 2025 14: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=1764340531; 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=cpN/l+XKNFMcLUQAWHih1HruIsi60PugloXGJq6Of/U=; b=fXmZFIYL2bT3A/mViTzCwzjHjwWPacroUW3d2lNLB5GN9ZgP77LgfRnvDC6QaLLV7/cqtA 2uGH0olceHJU64GLHiHMPnFjM0e4iVhO2iseLtxnQSp9uwqtXqBnPjmsJ3cK/GM9qnK/oU /NLqPcq/Oee4p7JZCNGlhtrPpbi0ob6D9ZzLWX+hW6jpoVHD+QicGzyPY8nBc9JCBVTOXi bpPlzz+XsimFfWxqNC7JkqMqkPTwns2+2Gj5wISclygZdBc992ot8XgyK7wPuDABbdKa+c qHUu8pmrEAy+Sv+AcUwwB8aes4AvweEVn0S2Eb70VDAZ7M/m1/5JOaN77kiGOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764340531; 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=cpN/l+XKNFMcLUQAWHih1HruIsi60PugloXGJq6Of/U=; b=YUigsNme6hvkV9dIm42THgVpyxUpM26EiMSGnWCNvOLh4f2N2vFgpzO3M4CogQ/ESGbJuW dQvLqO8e6rjtTvJCvce+0fgAV/sfGRtrbRDxwAFbFmQrYDid5K1xxL44WkJLTKPqqOSHRY ZYkGKcERIJHzDucvTLQec9AG5jNSK9NY4LGTAR6UIkplqVS9ew3lSfV0gZS7mPyASUHqX5 Jh0OgHtql4Ru0XOxHAHnFEiEcgZzMoDfG7NkQ2ghxxnciI1D4WBeHsal2tpmw0WMvNIxps nLTW+86MMQLo1j1rKaWJTCl5QnVQ2BgCkncJLp0xZzc+PRUAeriz1dkGBGtaAw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764340531; a=rsa-sha256; cv=none; b=IqK9rjN64L06nYPs6sN5Da5jJlTYuIOEexLLIZEZflnce8awXnjnQI2OpuHZcdqv/+2Grz lhzf/rTf5d4ywYEEf48pWTQIHs+R9nB5n3YjD3RGP6bfyCuR0JZMMzKXAxprTcKmdEhNlI 6h2J/e+W2hNEXKgVy2ghgQgMWhc66P/RbgmCTbLoOBNQfKikSeWVSlVsaeoqE7snIN4tXM 8GiVXjyh6LWBWZfwEsC/3DVUDnntJNG5EiG/n9lp3XuKh1MjYhRlZ1gFNG6k3UO63qU9xR Xj8SFtsZIlq5iMaBA1BaodBFSRZP8Uajs8/IdTm+1Vik3vM5EXIZ89u0F2KTVA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dHwnb5QjDz15Yd for ; Fri, 28 Nov 2025 14:35:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2a4fb by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 28 Nov 2025 14:35:31 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Nicolas Provost From: Christos Margiolis Subject: git: b1e9512cba83 - stable/15 - sound: Fix revents in midi_poll() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: b1e9512cba837df02879427a77bc3acdc1658dfc Auto-Submitted: auto-generated Date: Fri, 28 Nov 2025 14:35:31 +0000 Message-Id: <6929b333.2a4fb.67996735@gitrepo.freebsd.org> The branch stable/15 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=b1e9512cba837df02879427a77bc3acdc1658dfc commit b1e9512cba837df02879427a77bc3acdc1658dfc Author: Nicolas Provost AuthorDate: 2025-11-24 13:35:08 +0000 Commit: Christos Margiolis CommitDate: 2025-11-28 14:35:00 +0000 sound: Fix revents in midi_poll() Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: christos Pull Request: https://github.com/freebsd/freebsd-src/pull/1887 (cherry picked from commit 8f8b8e4af91d4e158caf6ba4b728482311bfc7c3) --- sys/dev/sound/midi/midi.c | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/sys/dev/sound/midi/midi.c b/sys/dev/sound/midi/midi.c index e14a28557406..cca7b93abf5f 100644 --- a/sys/dev/sound/midi/midi.c +++ b/sys/dev/sound/midi/midi.c @@ -658,21 +658,19 @@ midi_poll(struct cdev *i_dev, int events, struct thread *td) mtx_lock(&m->lock); mtx_lock(&m->qlock); - if (events & (POLLIN | POLLRDNORM)) + if (events & (POLLIN | POLLRDNORM)) { if (!MIDIQ_EMPTY(m->inq)) - events |= events & (POLLIN | POLLRDNORM); - - if (events & (POLLOUT | POLLWRNORM)) - if (MIDIQ_AVAIL(m->outq) < m->hiwat) - events |= events & (POLLOUT | POLLWRNORM); - - if (revents == 0) { - if (events & (POLLIN | POLLRDNORM)) + revents |= events & (POLLIN | POLLRDNORM); + else selrecord(td, &m->rsel); - - if (events & (POLLOUT | POLLWRNORM)) + } + if (events & (POLLOUT | POLLWRNORM)) { + if (MIDIQ_AVAIL(m->outq) < m->hiwat) + revents |= events & (POLLOUT | POLLWRNORM); + else selrecord(td, &m->wsel); } + mtx_unlock(&m->lock); mtx_unlock(&m->qlock); From nobody Fri Nov 28 14:35:32 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dHwnd2FHrz6HZmd for ; Fri, 28 Nov 2025 14: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dHwnc6xbHz3spf for ; Fri, 28 Nov 2025 14:35:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764340533; 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=Bqv9Jqe1pWJ5+574IxKH1tWKniRMLcREF3dpqi3eMpI=; b=rw6F6boSDsFApj223Hz5c+miw2+g02dn22vI3zCtT19TXA8wmnXZYZEiAaU0GBam6+znqB 0NR+hQqJehq8FzeAotun+m98TopXzuP6bAdzO41S73dvh5EdFKMhTh3MrWMrWHO6LSMp0n fVIyxGo+6aVY0V0rbhg0quNfbsmUVTZgbYoKgwvpRQSbMKTQvj8rLFryC3iVmdXJSffWBl Dh1uCXkcd4pPOczsUAkYiuTujmjLoWzrfRr9jTLhneOt0t5MwxdMfHN8vJe4VF8K3aXLVu xgKXJKXao/NOzt53cWoNY/QylNXNRF1qV4QJHGW3n16p5ot8gY3/bBLgWim4vA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764340533; 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=Bqv9Jqe1pWJ5+574IxKH1tWKniRMLcREF3dpqi3eMpI=; b=rkS4DI7tYvuVCrpcFyCps1ofTw5lnpfv6G//2HT/hhvwg6Lm4s4TZ+hUpYv6QL95qW54TG ccwQOUAAaTqYtVqnq6luMqxRqa7kS6VXgLZPuD8CY+rSlgSYTFmRJ7aH5ni9iQorCP7p/t TJXXDO+WvRIrIB5Iynco72G7uUZrcSSi01hbAvGthj4k+Oid0zljFOby0jTksFo1NGD2cp L2uf23ZM7pSLxSX4auJuPAL3o4LqUoEfKfdip16BKmGvCvRjCyWQ4GQOGKMQksss4f9CFy JxPnT8+oq7s0UiZb9VB7g1J4fI+Lrr30kUtC/zm7oPeKgbTSKQu0vNQXBRFa7g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764340533; a=rsa-sha256; cv=none; b=xkKHfXpR0j8gJ/+5QQXaWMKw1uoL05WzroOEbYfPF+dIev3GIoE6CoKF0pdjs6Q/zE6mge yPK/YNy+dbWKLJ8zNkq72UU4Lrz+zfGODGZNo2zn8Pw1JP2q/L3BID2qlp1EYwNBWceT3d EeO8GjbEnctbJ6/mXxUdaCuNTo5cXweDSX9qhOZAPpZR7xv6LyPEoB+1bSEXsMi3cw5oUy o2KysOhlF6sAIck/I1Hw0QkqZwpuoO+TCxYZsp6yyHxhN9NDfElOSGqsUjhyhzWw5wnapL QAJ8w6L4oNthUSnkw0Jm7m1Gw5pBA69F5oMAYThIC+zLwC0TrV2xy8aEhGzw9Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dHwnc6DDnz15Pc for ; Fri, 28 Nov 2025 14:35:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2a528 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 28 Nov 2025 14:35:32 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Goran=?utf-8?Q? Meki=C4=87?= From: Christos Margiolis Subject: git: 7587270512d1 - stable/15 - sound examples: Fix buffer mapping/allocation List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 7587270512d12f13d2d225dc893ec85bfb6501a7 Auto-Submitted: auto-generated Date: Fri, 28 Nov 2025 14:35:32 +0000 Message-Id: <6929b334.2a528.3774ff06@gitrepo.freebsd.org> The branch stable/15 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=7587270512d12f13d2d225dc893ec85bfb6501a7 commit 7587270512d12f13d2d225dc893ec85bfb6501a7 Author: Goran Mekić AuthorDate: 2025-11-26 19:33:05 +0000 Commit: Christos Margiolis CommitDate: 2025-11-28 14:35:00 +0000 sound examples: Fix buffer mapping/allocation The buffer in struct config should be allocated or mmap'ed. The code without this patch allocates the buffer unconditionally, even for mmap configs. MFC after: 1 week Reviewed by: christos Differential Revision: https://reviews.freebsd.org/D53939 (cherry picked from commit ebf1d98d60725feccd726ef8e4fa518661f9eae0) --- share/examples/sound/oss.h | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/share/examples/sound/oss.h b/share/examples/sound/oss.h index 437c6d69d454..e1ba4165810f 100644 --- a/share/examples/sound/oss.h +++ b/share/examples/sound/oss.h @@ -25,6 +25,7 @@ * SUCH DAMAGE. */ +#include #include #include @@ -84,7 +85,7 @@ static void oss_init(struct config *config) { unsigned long request = SNDCTL_DSP_GETOSPACE; - int tmp = 0; + int tmp = 0, prot = 0; if ((config->fd = open(config->device, config->mode)) < 0) err(1, "Error opening the device %s", config->device); @@ -194,7 +195,6 @@ oss_init(struct config *config) } config->sample_count = config->buffer_info.bytes / config->sample_size; config->chsamples = config->sample_count / config->audio_info.max_channels; - config->buf = malloc(config->buffer_info.bytes); printf("bytes: %d, fragments: %d, fragsize: %d, fragstotal: %d, " "samples: %d\n", @@ -202,21 +202,36 @@ oss_init(struct config *config) config->buffer_info.fragsize, config->buffer_info.fragstotal, config->sample_count); - /* Set the trigger */ + /* Set trigger direction and mmap protection */ switch (config->mode & O_ACCMODE) { case O_RDONLY: tmp = PCM_ENABLE_INPUT; + prot = PROT_READ; break; case O_WRONLY: tmp = PCM_ENABLE_OUTPUT; + prot = PROT_WRITE; break; case O_RDWR: tmp = PCM_ENABLE_INPUT | PCM_ENABLE_OUTPUT; + prot = PROT_READ | PROT_WRITE; break; default: errx(1, "Invalid mode %d", config->mode); break; } + + /* Map or allocate the buffer */ + if (config->mmap) { + config->buf = mmap(NULL, config->buffer_info.bytes, prot, MAP_SHARED, config->fd, 0); + if (config->buf == MAP_FAILED) + err(1, "Memory map failed"); + } else { + if ((config->buf = malloc(config->buffer_info.bytes)) == NULL) + err(1, "Allocating buffer failed"); + } + + /* Set the trigger */ if (ioctl(config->fd, SNDCTL_DSP_SETTRIGGER, &tmp) < 0) err(1, "Failed to set trigger"); } From nobody Fri Nov 28 14:36:06 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dHwpH1KFfz6HZHy for ; Fri, 28 Nov 2025 14:36:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dHwpH04Drz3tnt for ; Fri, 28 Nov 2025 14:36:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764340567; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CZyrTkiBhodP/3wkC8h4K5TwGRJWNmOw0PtpHwmYFHM=; b=pIizVZfqaOWFU3PcAGvVAK0WcwCFxkWMxDfgZD264vTRuQ3zOEcAxrUf/AvpEKrNfM4bsb LMzvTen3hvmEwQLo0HXdSH07ZH3fGz8FQQ9j8e/Vg3/4wLZXc3ZeI3/nF7bSVmBra+/9H8 Z5XF6XK+M8IkJVs3cajkEYaLWvPYVydip0Z4WzH5qY2GFyg/NJsFWhVn71UUcOQad5kMp4 KhcFWDNGfd7xCBe+3nT8lsLx5m5uvDJvlmRjI5C0T4q3+Gb9liofFyTd8kwxrMXFkJJyEt 2n3MaaCpRYLPMDguTUt+H8rFSxFWvkAsYxAIQxQtibbvmsOlrl0a14ER1bGu9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764340567; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CZyrTkiBhodP/3wkC8h4K5TwGRJWNmOw0PtpHwmYFHM=; b=YcDWI/MFLcJC3pMH/jpZCStEZfnJkzGWaWOgsjYLSW/UJ8tr/014XcZgBeSJrQ3HKiNfvj SSsamDOPvSDL0XUKfevGF6opHHlpOk8k1542MjvknW2kMcAoOZ7snP+TbTlgiDWb9ZLD/C XsTR4u0EZbQkjj6ACsCAmYNGhPdYr+AZtUpCu+AnfRNI+7pOBAoaUq9COajB9Dz/3AvpFR U2HRvta3Vqa7avXDu5Ff+QICDDjtLM2RXqCgfxF7lTl+1cJBX99UiAAWKDT2l58Ok5QCYk WZYzh/TZI9/08AMHczw48k5MzI9fbiQVq1D9ZDBC4f6d0J1ndmFOgVy4zeA1lA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764340567; a=rsa-sha256; cv=none; b=R9Gk35YxztiOisOCGwvLCXbc8FiW0L5RDPz9bN9GgZ9ZBpda6nel3yH5x5lHTFS7jaEwjY 192k770YXdY+H1HP+3BeuuuXu62QeNrv697T6AoGCFKGgqJ6ggQCqXyzjZBH7DjTBCMdFX QXJSfJc44gZTZa0lyfaXrvcVbtOC0pdcbmEquQnCcJfUHstwA0pPxtsPJ/Ax+EL1OZMb8W Q6vqKO/EnzGF7koWVBG9+9R7AshyZAnTmWV23XO80aCMRChwJNUgk8vLPZdcueoairC4fK lauZHfbQknZcJ5xCPAxBVoiUVA75yXMG+R4AQWu7n2rv5WpMPPi1mk1/99fhjg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dHwpG6GHCz15Pf for ; Fri, 28 Nov 2025 14:36:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 288ef by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 28 Nov 2025 14:36:06 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: e5d50a679aa1 - main - sound: Retire snd_mixer->busy List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e5d50a679aa1a72a7cbcb0281b9420aad4a7dc7a Auto-Submitted: auto-generated Date: Fri, 28 Nov 2025 14:36:06 +0000 Message-Id: <6929b356.288ef.34d36fd4@gitrepo.freebsd.org> The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=e5d50a679aa1a72a7cbcb0281b9420aad4a7dc7a commit e5d50a679aa1a72a7cbcb0281b9420aad4a7dc7a Author: Christos Margiolis AuthorDate: 2025-11-28 14:35:56 +0000 Commit: Christos Margiolis CommitDate: 2025-11-28 14:35:56 +0000 sound: Retire snd_mixer->busy Does not really serve any real purpose. It gets set on mixer_open() and unset on mixer_close(), so it essentially tells us whether the mixer is open or not. mixer_close() uses it to return EBADF in case the mixer is not busied, as in, the mixer has not been open()'d yet. This is redundant. The other place where this is used is to decide whether to serve an ioctl issued by userland, in which case it won't if, again, the mixer has not been busied (i.e., opened). Again, seems redundant. Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D53859 --- sys/dev/sound/pci/es137x.c | 4 ---- sys/dev/sound/pcm/mixer.c | 30 +----------------------------- sys/dev/sound/pcm/mixer.h | 2 -- 3 files changed, 1 insertion(+), 35 deletions(-) diff --git a/sys/dev/sound/pci/es137x.c b/sys/dev/sound/pci/es137x.c index cc51005309b0..4e8c7911e95e 100644 --- a/sys/dev/sound/pci/es137x.c +++ b/sys/dev/sound/pci/es137x.c @@ -1540,10 +1540,6 @@ sysctl_es137x_single_pcm_mixer(SYSCTL_HANDLER_ARGS) PCM_RELEASE_QUICK(d); return (ENODEV); } - if (mixer_busy(m) != 0) { - PCM_RELEASE_QUICK(d); - return (EBUSY); - } level = mix_get(m, SOUND_MIXER_PCM); recsrc = mix_getrecsrc(m); if (level < 0 || recsrc < 0) { diff --git a/sys/dev/sound/pcm/mixer.c b/sys/dev/sound/pcm/mixer.c index 55ce9596dde9..f6eb669010b5 100644 --- a/sys/dev/sound/pcm/mixer.c +++ b/sys/dev/sound/pcm/mixer.c @@ -48,7 +48,6 @@ SYSCTL_INT(_hw_snd, OID_AUTO, vpc_mixer_bypass, CTLFLAG_RWTUN, struct snd_mixer { KOBJ_FIELDS; void *devinfo; - int busy; int hwvol_mixer; int hwvol_step; int type; @@ -651,7 +650,6 @@ mixer_obj_create(device_t dev, kobj_class_t cls, void *devinfo, "primary pcm mixer" : "secondary pcm mixer", MTX_DEF); m->type = type; m->devinfo = devinfo; - m->busy = 0; m->dev = dev; for (i = 0; i < nitems(m->parent); i++) { m->parent[i] = SOUND_MIXER_NONE; @@ -947,14 +945,6 @@ mixer_hwvol_step(device_t dev, int left_step, int right_step) mtx_unlock(&m->lock); } -int -mixer_busy(struct snd_mixer *m) -{ - KASSERT(m != NULL, ("NULL snd_mixer")); - - return (m->busy); -} - int mix_set(struct snd_mixer *m, u_int dev, u_int left, u_int right) { @@ -1035,12 +1025,6 @@ mixer_open(struct cdev *i_dev, int flags, int mode, struct thread *td) if (!PCM_REGISTERED(d)) return (EBADF); - /* XXX Need Giant magic entry ??? */ - - mtx_lock(&m->lock); - m->busy = 1; - mtx_unlock(&m->lock); - return (0); } @@ -1049,7 +1033,6 @@ mixer_close(struct cdev *i_dev, int flags, int mode, struct thread *td) { struct snddev_info *d; struct snd_mixer *m; - int ret; if (i_dev == NULL || i_dev->si_drv1 == NULL) return (EBADF); @@ -1059,14 +1042,7 @@ mixer_close(struct cdev *i_dev, int flags, int mode, struct thread *td) if (!PCM_REGISTERED(d)) return (EBADF); - /* XXX Need Giant magic entry ??? */ - - mtx_lock(&m->lock); - ret = (m->busy == 0) ? EBADF : 0; - m->busy = 0; - mtx_unlock(&m->lock); - - return (ret); + return (0); } static int @@ -1262,10 +1238,6 @@ mixer_ioctl_cmd(struct cdev *i_dev, u_long cmd, caddr_t arg, int mode, return (EBADF); mtx_lock(&m->lock); - if (from == MIXER_CMD_CDEV && !m->busy) { - mtx_unlock(&m->lock); - return (EBADF); - } switch (cmd) { case SNDCTL_DSP_GET_RECSRC_NAMES: bcopy((void *)&m->enuminfo, arg, sizeof(oss_mixer_enuminfo)); diff --git a/sys/dev/sound/pcm/mixer.h b/sys/dev/sound/pcm/mixer.h index c47247ab570d..3ce8a4f5adee 100644 --- a/sys/dev/sound/pcm/mixer.h +++ b/sys/dev/sound/pcm/mixer.h @@ -45,8 +45,6 @@ void mixer_hwvol_mute(device_t dev); void mixer_hwvol_step_locked(struct snd_mixer *m, int l_step, int r_step); void mixer_hwvol_step(device_t dev, int left_step, int right_step); -int mixer_busy(struct snd_mixer *m); - int mix_set(struct snd_mixer *m, u_int dev, u_int left, u_int right); int mix_get(struct snd_mixer *m, u_int dev); int mix_setrecsrc(struct snd_mixer *m, u_int32_t src); From nobody Fri Nov 28 14:44:45 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dHx0G0Tfxz6HbZr for ; Fri, 28 Nov 2025 14:44:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dHx0F4lHrz3xdB for ; Fri, 28 Nov 2025 14:44:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764341085; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EsvVCdzCdz2kUa7X0mIagdBaJ4GIBGbyBLyQWyKC3RI=; b=aMS1D4miPzPlDBYos6NGzJd+kNNHrUCtoNiL/NDnw5HXrBt0a2WdfTMbOAiVEdMfJvksxP SQMcJ1zoBTS9crfDt4BIuAFkJNoLBpK3kbG44Z8i8A8vyn118lL9yjZs4pHQaiTDZtO9t6 Yi99deTmnv7nNfdzwGEoOTODUJksqJxRZMQWDSICKoXVFhm74mAozrsZAcfVWCGHfEOG7e 6TzSifgtJa4Es24rUhM53p6lcBffaNn4h6jZlcy6hypCjDjz6SIYUXyAWZDRfG7h8jl2Gb pAIkya1dBHJoJUbzh5N1C+qUF+oGlI350xb2KqfaeAPourS8JzG+JfiSF0JWAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764341085; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EsvVCdzCdz2kUa7X0mIagdBaJ4GIBGbyBLyQWyKC3RI=; b=E/7nWaIuE3wkddm1vNJjZbUD/9ys7RGkcFDlauDdaWVnW80iq0zaiozmZvbwi9j/Nb+g96 V3Pup68fjd9GtEbE5iaBaoPa+w1jQ7mEb7RoT7oUt6oHlud1Y77nwS/K6Lz/1xndHADP1t V+MaLAwAj0DyQTuVLsEQMYDCHNMR8AiJekfd2sa9CYavlCiSlQwkdKGvmt9uw4TjEQVTxP WGqoBtCGBzroO1W/lNClXd4hr+rNhmAELBy2FcSRyiEoDsXfPnPXDGMgnTf6wa3Bq34mDQ 13aOew2D4srzY5RtKGkCpAA2D+P+Ko9IQO/DcLlPaIe/7i0xzgYazevmPmGXGQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764341085; a=rsa-sha256; cv=none; b=KEAXJQRfrazBgMRRtGVwJTULnSK6QKmudbH7wsZUo97FUxvhIEr54XA2P3RjMmHGHH73wb F9P/rwCWVV3d+W42zo528XEFewWT1oIdJRzyNM3Kp8SPZ1G34GQTGXxyDskf3P26sfvUjq cmRf/23/uVBKp6opSxp+daZXV1ONUKXJi8iHIjpSWKM6OtCqpPMynyKhBRMitl0fqt4UTl 8Sclg8MCKPypdgToZSLoU1HMwBBJKBbT2mPyRHZwV5T3ANI9xkWJrcp9E58epHBLEj3iRs X6xG6llGcEdsDFVvb7wxfQ4CHsuzCQeaWYROnjGlL7I9dh1BW0arcjVQAkZeew== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dHx0F3HvZz15qS for ; Fri, 28 Nov 2025 14:44:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2b59a by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 28 Nov 2025 14:44:45 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Aymeric Wibo Subject: git: eeaa865edba6 - main - acpi: Fix setting sleep state sysctls to NONE List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: eeaa865edba685545ac22c378b35552e09bf1b41 Auto-Submitted: auto-generated Date: Fri, 28 Nov 2025 14:44:45 +0000 Message-Id: <6929b55d.2b59a.8a970bd@gitrepo.freebsd.org> The branch main has been updated by obiwac: URL: https://cgit.FreeBSD.org/src/commit/?id=eeaa865edba685545ac22c378b35552e09bf1b41 commit eeaa865edba685545ac22c378b35552e09bf1b41 Author: Aymeric Wibo AuthorDate: 2025-11-25 19:34:34 +0000 Commit: Aymeric Wibo CommitDate: 2025-11-28 14:42:54 +0000 acpi: Fix setting sleep state sysctls to NONE This restores the functionality as it was pre-97d152698f48. A stopgap was committed by glebius@ in 34dfccc64f47 ("acpi: in acpi_stype_sysctl() use same logic as in acpi_sleep_state_sysctl()"). PR: 290651 Reviewed by: thj, emaste Approved by: thj Fixes: 97d152698f48 ("acpi: Use sleep types defined in sys/power.h") Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D53909 --- sys/dev/acpica/acpi.c | 39 ++++++++++++++++++++++++--------------- 1 file changed, 24 insertions(+), 15 deletions(-) diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c index e3ff4f6937d2..99dd817f9158 100644 --- a/sys/dev/acpica/acpi.c +++ b/sys/dev/acpica/acpi.c @@ -4318,13 +4318,15 @@ acpi_sname_to_sstate(const char *sname) { int sstate; + if (strcasecmp(sname, "NONE") == 0) + return (ACPI_STATE_UNKNOWN); + if (toupper(sname[0]) == 'S') { sstate = sname[1] - '0'; if (sstate >= ACPI_STATE_S0 && sstate <= ACPI_STATE_S5 && sname[2] == '\0') return (sstate); - } else if (strcasecmp(sname, "NONE") == 0) - return (ACPI_STATE_UNKNOWN); + } return (-1); } @@ -4379,8 +4381,10 @@ acpi_suspend_state_sysctl(SYSCTL_HANDLER_ARGS) if (new_sstate < 0) return (EINVAL); new_stype = acpi_sstate_to_stype(new_sstate); - if (acpi_supported_stypes[new_stype] == false) + if (new_sstate != ACPI_STATE_UNKNOWN && + acpi_supported_stypes[new_stype] == false) return (EOPNOTSUPP); + if (new_stype != old_stype) power_suspend_stype = new_stype; return (err); @@ -4423,21 +4427,26 @@ acpi_stype_sysctl(SYSCTL_HANDLER_ARGS) if (err != 0 || req->newptr == NULL) return (err); - new_stype = power_name_to_stype(name); - if (new_stype == POWER_STYPE_UNKNOWN) { - sstate = acpi_sname_to_sstate(name); - if (sstate < 0) - return (EINVAL); - printf("warning: this sysctl expects a sleep type, but an ACPI S-state has " - "been passed to it. This functionality is deprecated; see acpi(4).\n"); - if (sstate < ACPI_S_STATE_COUNT && - !acpi_supported_sstates[sstate]) + if (strcasecmp(name, "NONE") == 0) { + new_stype = POWER_STYPE_UNKNOWN; + } else { + new_stype = power_name_to_stype(name); + if (new_stype == POWER_STYPE_UNKNOWN) { + sstate = acpi_sname_to_sstate(name); + if (sstate < 0) + return (EINVAL); + printf("warning: this sysctl expects a sleep type, but an ACPI " + "S-state has been passed to it. This functionality is " + "deprecated; see acpi(4).\n"); + MPASS(sstate < ACPI_S_STATE_COUNT); + if (acpi_supported_sstates[sstate] == false) + return (EOPNOTSUPP); + new_stype = acpi_sstate_to_stype(sstate); + } + if (acpi_supported_stypes[new_stype] == false) return (EOPNOTSUPP); - new_stype = acpi_sstate_to_stype(sstate); } - if (acpi_supported_stypes[new_stype] == false) - return (EOPNOTSUPP); if (new_stype != old_stype) *(enum power_stype *)oidp->oid_arg1 = new_stype; return (0); From nobody Fri Nov 28 14:44:46 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dHx0G6H6Hz6HblC for ; Fri, 28 Nov 2025 14:44:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dHx0G3w90z3y7v for ; Fri, 28 Nov 2025 14:44:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764341086; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=R8b6wUV8hkQVtglHlkC8RufHt0AK6IuXys5/FLEgb+c=; b=B4L0QYorBq4wk+T1nja5cYMRNLsc1/qXRsothORNSdVH9XEQgmeCMNFf61bsEFwS2dxA6u tnjnl8FeibHveTo++iDlOtqZd3iXsLrF2HPezMxUSIr8BUeiCRjf82WUG5ynCgpjQRL0D3 UcXKIHeDXEB7yZGkP3qwAk+jC80wOXbpOoCwtIXYDim2YGg1m9Crnpld2GXkLmKFt95K1P Xd16JAffXU0AogOGXEC11FK+JmvjIReJcs9VWf679jjr0I83HLhFT9vkr3WToUyoySQ7n4 fRoNLUZZIfTsVccawFnFJSX+1zxWUP8ar83iepFlqpgsaYtuTZcHsmB33GnmZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764341086; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=R8b6wUV8hkQVtglHlkC8RufHt0AK6IuXys5/FLEgb+c=; b=N1tQ4++xeUDHXle0nBfk5fQI9Y3XUfq4ZIJVW+cyGDhf8ZMzWeI+SCqSXmvdm6yqgUukGz +Kwdt5gAlirbSwM7dFPgE2zasD03bMzNnJUj9gzhoi3wC6fwnhyvgyLbQ+Q89d3XAAK46O w+jW8jb0xHPiAxYgX4GuQ3WexBDJ3Pq1rIY/hm7UuoqCsa9/QfbNUS7lUBjxsIA7OINL+o DjQhzeLbq36vlZij8UXwAgZ3bErdckylHwiiCKkGz6QiWRANvG1CaOiZGbBmogkz8OQqWQ Q5vsvivptzH3TQwk8qcq2W7uQvvyzyT4+NQNflCLPiuib+3weYb6vHbnXEeOIA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764341086; a=rsa-sha256; cv=none; b=DC2jsSRlrW10f+PdAPq8P3h7Bd/Ndy3EtVhK0xrmbr2U1d5is8sr7kQZ0qZ+kIq/qlRNYI Q30rKkAY8sNFQIghlAOlLV6wxu2Bxe6AhMOTFTsjhfmtVfogPOKBedyGJWIXZkLpcJ66l9 q1D8a+Oe39Nc6EXXR3eW0WvgtFfFDv8qdt3uItqThtmbefU8NiGRUFdz34uR6MmLGLqS3s JlwflhyXfRn6nfil0CXQ2tLlFB8+q4KzFxfjeX7ETSleL3AEP09WyGT0xMcbGOaeFfnzFr koR4u7WAKA2ar/0o1nVk8rdQT1QT0/+62QHZsRTmdhdpOxEMa4LBeqUTBHygpQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dHx0G3X56z15qV for ; Fri, 28 Nov 2025 14:44:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2afd9 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 28 Nov 2025 14:44:46 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Aymeric Wibo Subject: git: e966eb403971 - main - acpi: Fix typos in sysctl descriptions List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: e966eb4039717c888ee74a65768346088012fb4a Auto-Submitted: auto-generated Date: Fri, 28 Nov 2025 14:44:46 +0000 Message-Id: <6929b55e.2afd9.150428e1@gitrepo.freebsd.org> The branch main has been updated by obiwac: URL: https://cgit.FreeBSD.org/src/commit/?id=e966eb4039717c888ee74a65768346088012fb4a commit e966eb4039717c888ee74a65768346088012fb4a Author: Aymeric Wibo AuthorDate: 2025-11-28 14:26:26 +0000 Commit: Aymeric Wibo CommitDate: 2025-11-28 14:42:57 +0000 acpi: Fix typos in sysctl descriptions Reviewed by: thj, emaste Approved by: thj Sponsored by: The FreeBSD Foundation --- sys/dev/acpica/acpi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c index 99dd817f9158..54e0d7be7920 100644 --- a/sys/dev/acpica/acpi.c +++ b/sys/dev/acpica/acpi.c @@ -616,7 +616,7 @@ acpi_attach(device_t dev) CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_MPSAFE, &sc->acpi_lid_switch_stype, 0, acpi_stype_sysctl, "A", "Lid ACPI sleep state. Set to s2idle or s2mem if you want to suspend " - "your laptop when close the lid."); + "your laptop when you close the lid."); SYSCTL_ADD_PROC(&sc->acpi_sysctl_ctx, SYSCTL_CHILDREN(sc->acpi_sysctl_tree), OID_AUTO, "suspend_state", CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_MPSAFE, NULL, 0, acpi_suspend_state_sysctl, "A", @@ -626,7 +626,7 @@ acpi_attach(device_t dev) OID_AUTO, "standby_state", CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_MPSAFE, &sc->acpi_standby_sx, 0, acpi_sleep_state_sysctl, "A", - "ACPI Sx state to use when going standby (S1 or S2)."); + "ACPI Sx state to use when going standby (usually S1 or S2)."); SYSCTL_ADD_INT(&sc->acpi_sysctl_ctx, SYSCTL_CHILDREN(sc->acpi_sysctl_tree), OID_AUTO, "sleep_delay", CTLFLAG_RW, &sc->acpi_sleep_delay, 0, "sleep delay in seconds"); From nobody Fri Nov 28 15:20:05 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dHxn161lHz6HgQm for ; Fri, 28 Nov 2025 15:20:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dHxn15SGxz47Rd for ; Fri, 28 Nov 2025 15:20:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764343205; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fGcXjNCKbuaMhxz5DDGVO6KyzJK3g5JxnRawKHTSdzk=; b=wC1GqPfAZliukJJdp8Rr6CPmYVn7wYRkkGlftiGG+g4sWZjlNZ7rXYJWUHeFwxGcDUqXgO 6Pjt11LvlM7N1zz7a/MS4K8vyUVLGX/RnlgkBDw4ucmEympRsD3qTpkDSJQVGM1YYChv7P ynG5Bs57jPxY0PMx/oZdervRAoCwY3I/sKgXtzJNBw9R6Rar9k4tzGnTqu5VN0jybGWIap wPkMO+I2dxJPLwg5qwU801keth099L8YwB5RRLe4NUpNBdE9D06HPZEfLus7xpCkx/ejef TyTbrjAD/qKwGfVEpRs6rXoBdL1eLOrFE7IvJe3NejkuMb9gokAuTRKgbJ0UgQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764343205; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fGcXjNCKbuaMhxz5DDGVO6KyzJK3g5JxnRawKHTSdzk=; b=QTMWYD/W6DzeOQZf4FbC1xI82BkuIs4bZYPjf1Lpb1jKxDzgYDr6l9J6JE6zw5JoBu5N9h TixG5Mi0m2e5ys9svkp+6OAqWMA9PBn5mjOOESwhLXmxk7jgYeYi1iwY+pYI/a5Pz8oM9P OQFYA5Jg4GRe6V/1dChOQ7K7o9+s+F5xc3QWVQq3E7CrOhTrJH1T9ADGSho2amnCTy3GhX mmEOJzntE4SEg9N2zT1EAVGgTWW50l7/3Ih9j6buJsxXvTVglw5Q7m3LVUrot55BOTDXxI NToSZClYZIF4ql0jfmDQqiHTDdJgtqacfyXSgd8Iwh6x3Y7r4JgzLEK61CGIhg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764343205; a=rsa-sha256; cv=none; b=jxintDBYwUyPWgAemJJt4fLSXdDvtSrew2dP7igcFyBAZW/NZM2lr4lickCJ/ScloBrq6O rtJvHyrI4DxrreaZlIMIBDvBlBtarSfeYZ0eihn95EiXberb0Cwss4Um/HL05oYR7fvg87 wNcKcSfyAHoxSEOvcV8aYLxRdExhgckNqms9zKf8IPguwAWwIWm+7M9kmXd8713yb24ysc xdWbgolwj2n/5X/dz+aF6xjYPijJ+SWIZ3JAqiwC73nVF/Y6+O0EEKbWhvcSAdqKZNjVR5 sJln//srKLqI687/CwIP5U8FrXj2P0KoqcSWaQ02ztv9wyyBy9UA/LXHqYs6aA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dHxn14bNfz16j4 for ; Fri, 28 Nov 2025 15:20:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2caff by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 28 Nov 2025 15:20:05 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Robert Clausecker Subject: git: 5da388c633f8 - main - time.h: add timegm() to the C23 namespace List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: fuz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5da388c633f8da8fbb35b8407ca848373e3ea977 Auto-Submitted: auto-generated Date: Fri, 28 Nov 2025 15:20:05 +0000 Message-Id: <6929bda5.2caff.7c93bee2@gitrepo.freebsd.org> The branch main has been updated by fuz: URL: https://cgit.FreeBSD.org/src/commit/?id=5da388c633f8da8fbb35b8407ca848373e3ea977 commit 5da388c633f8da8fbb35b8407ca848373e3ea977 Author: Robert Clausecker AuthorDate: 2025-11-27 17:36:18 +0000 Commit: Robert Clausecker CommitDate: 2025-11-28 15:19:40 +0000 time.h: add timegm() to the C23 namespace This function is part of ISO/IEC 9899:2024 (C23) and was forgotten in D47856. Reviewed by: imp Approved by: markj (mentor) See also: D47856 Fixes: 59677aecb67bbedcfa2ee5d7d2b189193cdc4af7 MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D53951 --- include/time.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/time.h b/include/time.h index 9e71a85f6a9a..295df3b5790a 100644 --- a/include/time.h +++ b/include/time.h @@ -170,7 +170,6 @@ extern int daylight; #if __BSD_VISIBLE time_t timelocal(struct tm * const); -time_t timegm(struct tm * const); int timer_oshandle_np(timer_t timerid); time_t time2posix(time_t t); time_t posix2time(time_t t); @@ -193,6 +192,7 @@ int timespec_get(struct timespec *ts, int base); #define TIME_MONOTONIC 2 /* monotonic time */ /* ISO/IEC 9899:2024 7.29.2.7 The timespec_getres function */ int timespec_getres(struct timespec *, int); +time_t timegm(struct tm * const); #endif #endif From nobody Fri Nov 28 15:20:06 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dHxn25tJ7z6Hg4d for ; Fri, 28 Nov 2025 15:20:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dHxn252DHz47Gv for ; Fri, 28 Nov 2025 15:20:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764343206; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=K7Qpzpgtl7XUa6zxfHAjoIfUIPBQfaQA8hVtVIrq+HM=; b=lKgcpyzzjeuUqxcU6weYL/Shk77QblcGh50NDQ1Cyzz+3q/lXfgS3dVdOwoZrI+CEgKtlR JbPJZto4heFRL60D4oikDJbRgpYQ/nU2O/r4D1imEVbR9U+dJ2vDYzrRbzBWVrJduzhaFI HVhNZbpk4jX6zBJkJK3kSPqH6jZkWYFMB4boDXnRsVBE6s3+1jqZYgty3wyYuDoYM65xzn /R2D4hYgon7zI/7x9wudlPnqPnxohyJ92MyflXEaTu64p3pEwcH07eBipmvK59tPdR0sze KSC2sT56NdFWYGBPpyT5Iuv9lMunxzDgX+XT+q/mwBoxIsitQiJmdoDRbhOGlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764343206; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=K7Qpzpgtl7XUa6zxfHAjoIfUIPBQfaQA8hVtVIrq+HM=; b=WIIHdkQM09JDEbErbkoXQ4BcY6OnIdc26+selEyEHqKbEYfFCLvulnOFCMiBgDV4Yzf1Pv gF/1in5PbgXbHMYeokXBR4iWIzxJffBLD3uujeZf4IXKhXuC1vAepKmF2lz/S/lN53D0Rf KAE7B5qjxKog4BmP//5ODKgB/y/cI9D2yLY+SHHrpDhE6DHcuDvV8GLGgBKxuyKXqmSBKn M7eFghQRwQ2F/8MMCHRFTuq1Sk5eSmEf0feF4BuoSNbxvpGmldWkECXZ65gCXBsfG6GPQi Ehq/mfkkcCYwXE2bp2aeYTwnus3kWLsoCmLWbCCVEMgI8/RgtmOH9XmGtRrG+A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764343206; a=rsa-sha256; cv=none; b=mPSaerp57iLd5FGPGCOgAMLLOpcu/s3cBTjohl7H983C50IPylg9HoIWE8SMEIJVzSWXc7 Y4SaXdaBZK/NK4MGhi9OFloUNNXmO91mJKuDYwJLlnJRkMoAQtWozKijGthyw4Yfz7eT4f WdIwhGaT71kk8FYCGAf/MctdzHUrkkF/cLu8hIACqNa+8Q29VLB7taF59pBZwM05eGbpGM aMEzUfcyHDxQ1FTaPDBRwrp3G5rkzSwcgeQwReXs09o69h97UZLDFTPPqwYQEdp+O5jmiX TOvCB1q8JggP9qSzTgCG1TEHN06PgiQniPQkrgVHHOMmUM2bzJNfZRJs6BmmPQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dHxn24MqSz16Lm for ; Fri, 28 Nov 2025 15:20:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2ee02 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 28 Nov 2025 15:20:06 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Robert Clausecker Subject: git: f0e541118c37 - main - uchar.h: add char8_t List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: fuz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f0e541118c374869a8226eaa1320bb6eda248a20 Auto-Submitted: auto-generated Date: Fri, 28 Nov 2025 15:20:06 +0000 Message-Id: <6929bda6.2ee02.6bec62c6@gitrepo.freebsd.org> The branch main has been updated by fuz: URL: https://cgit.FreeBSD.org/src/commit/?id=f0e541118c374869a8226eaa1320bb6eda248a20 commit f0e541118c374869a8226eaa1320bb6eda248a20 Author: Robert Clausecker AuthorDate: 2025-11-27 17:57:02 +0000 Commit: Robert Clausecker CommitDate: 2025-11-28 15:19:53 +0000 uchar.h: add char8_t A type similar to char16 and char32_t, for compliance with C23. The related type atomic_char8_t is added to stdatomic.h. As char8_t is always unsigned char, I've skipped adding __char8_t. This can be added, too, if desired. Reviewed by: imp Approved by: markj (mentor) MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D53952 --- include/uchar.h | 5 +++++ sys/sys/stdatomic.h | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/include/uchar.h b/include/uchar.h index 951c6339abec..ebb2c89776b8 100644 --- a/include/uchar.h +++ b/include/uchar.h @@ -32,6 +32,11 @@ #include #include +#if __ISO_C_VISIBLE >= 2023 && !defined(_CHAR8_T_DECLARED) +typedef unsigned char char8_t; +#define _CHAR8_T_DECLARED +#endif + #ifndef _CHAR16_T_DECLARED typedef __char16_t char16_t; #define _CHAR16_T_DECLARED diff --git a/sys/sys/stdatomic.h b/sys/sys/stdatomic.h index 099097ea84a4..67107f47e6b3 100644 --- a/sys/sys/stdatomic.h +++ b/sys/sys/stdatomic.h @@ -54,6 +54,9 @@ #ifdef __GCC_ATOMIC_CHAR_LOCK_FREE #define ATOMIC_CHAR_LOCK_FREE __GCC_ATOMIC_CHAR_LOCK_FREE #endif +#if __ISO_C_VISIBLE >= 2023 && defined(__GCC_ATOMIC_CHAR8_T_LOCK_FREE) +#define ATOMIC_CHAR8_T_LOCK_FREE __GCC_ATOMIC_CHAR8_T_LOCK_FREE +#endif #ifdef __GCC_ATOMIC_CHAR16_T_LOCK_FREE #define ATOMIC_CHAR16_T_LOCK_FREE __GCC_ATOMIC_CHAR16_T_LOCK_FREE #endif @@ -199,6 +202,9 @@ typedef _Atomic(long) atomic_long; typedef _Atomic(unsigned long) atomic_ulong; typedef _Atomic(long long) atomic_llong; typedef _Atomic(unsigned long long) atomic_ullong; +#if __ISO_C_VISIBLE >= 2023 +typedef _Atomic(unsigned char) atomic_char8_t; +#endif typedef _Atomic(__char16_t) atomic_char16_t; typedef _Atomic(__char32_t) atomic_char32_t; typedef _Atomic(___wchar_t) atomic_wchar_t; From nobody Fri Nov 28 15:57:49 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dHycZ0CHNz6HkSv for ; Fri, 28 Nov 2025 15:57:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dHycY546Dz4F6s for ; Fri, 28 Nov 2025 15:57:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764345469; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GFRgQcYyT6LbFwPfh/y4fHHjftpHv/lcWmZFuTw+CzI=; b=Z/3myxjcKKUNP8nnAmXg+DqN/+KSouqXs7SjEtAaZtCSlsN+QcAArtsH75hmqVqkHKo2WA Y8p3ojLVB+LHqjSEpkfh0RG3v91Z/e56NA/2DwyGaSKbgMXzGjK99ClY91IBx9JwXR6JVE OrluVUb9ezjqCS6vWl0jna0iPRQabXFvexILuwQeZkWYTiF3SYDcmr2ZeBz6eCDSv+1nnC brX3Ja3/FBN1k0gzOUcFcv89hzurS9Ineao6QmG+hf5MCNFJV1HPl4Nfgb20qaXUyvszWp 1RLK23NRSYy4w0AeD1WYO5+ogjY/GupHqJV9aiFze92R+qJcluan9d2dm4mLdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764345469; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GFRgQcYyT6LbFwPfh/y4fHHjftpHv/lcWmZFuTw+CzI=; b=Qkj+XB4GZtVkZniXb31w7s9g3IGHCYFIhXA2dkYTTsOBTb5ZARJ1IjnpZT1V51g+lelIvp 9OvbgvoPwVngXRWzTZh9woUssM4sh/5z6pMc7d1luREv9t2S4zh98yEHCUADNWx6yTjYvh MUWdX81rlnJQ5sUnSPLj2YohLLyaU4WCixM5G0IRxQToy4PNCOCCkkc3RvFAjVa+FfgpX+ ZnC8EiCKqmjxARWEzJQcVnQ7vxnDR/JA2bW8CmwkITRs+jOqflAHsV+uPbMqPOR3rRFnxo L3Ev/QMRBJ7RuP8y/2x+62lL4qbvvFOCuVkjVCvcVhQn2Y8INw+NUjjZmpO6Eg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764345469; a=rsa-sha256; cv=none; b=veaGD4wCg58Pdq+Vc7p4vHLfCgeiuM6vHaQxz2a3CzZwbfZ/g97Qf62hhMLclH5dFhUEPC lDxv3aD4RpFg7z3o6hnJ4xcbWrjLphK8KXwAya9QeUHn6C2rZHKtN3fmn69xdU0XJd2lPZ K9AMjPFoBqdpVU9Thl+Y2LwQWSb88ls5vEsBv64Px2EwzDIDZY3GKN2sFdToES4O6pPiy+ dbjekk++wJ4OfCHP9+Jw+QyhofgmoeCYcgXBZ+QV9AGNFgO53VR/DtAPOz/4aQyEPydDgj r3SIANe+zIwxE7mHmZ6cz3iH3/Pmn87zjYNDscq7akk9Vzx097pp/69ZB4jKtw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dHycY430vz16l1 for ; Fri, 28 Nov 2025 15:57:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 313b8 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 28 Nov 2025 15:57:49 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Robert Clausecker Subject: git: 04d000a378b0 - main - jemalloc: avoid clash with C23 unreachable() macro List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: fuz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 04d000a378b04bca1aff4a1cc3d74f5c9c5368b9 Auto-Submitted: auto-generated Date: Fri, 28 Nov 2025 15:57:49 +0000 Message-Id: <6929c67d.313b8.42f274c8@gitrepo.freebsd.org> The branch main has been updated by fuz: URL: https://cgit.FreeBSD.org/src/commit/?id=04d000a378b04bca1aff4a1cc3d74f5c9c5368b9 commit 04d000a378b04bca1aff4a1cc3d74f5c9c5368b9 Author: Robert Clausecker AuthorDate: 2025-11-27 21:59:12 +0000 Commit: Robert Clausecker CommitDate: 2025-11-28 15:55:05 +0000 jemalloc: avoid clash with C23 unreachable() macro Summary: This avoids a clash with the new macro in introduced in D53967 Reviewed by: imp Approved by: markj (mentor) MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D53968 --- contrib/jemalloc/include/jemalloc/internal/util.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/contrib/jemalloc/include/jemalloc/internal/util.h b/contrib/jemalloc/include/jemalloc/internal/util.h index dcb1c0a5d62b..da84b09d0132 100644 --- a/contrib/jemalloc/include/jemalloc/internal/util.h +++ b/contrib/jemalloc/include/jemalloc/internal/util.h @@ -40,6 +40,9 @@ # error JEMALLOC_INTERNAL_UNREACHABLE should have been defined by configure #endif +#ifdef unreachable +# undef unreachable +#endif #define unreachable() JEMALLOC_INTERNAL_UNREACHABLE() /* Set error code. */ From nobody Fri Nov 28 15:57:50 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dHycZ6q3nz6Hkdr for ; Fri, 28 Nov 2025 15:57:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dHycZ4ZZdz4FCy for ; Fri, 28 Nov 2025 15:57:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764345470; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WM6NSFJh68HQsYa4DqE72QwPfKqEF0grx+P5eQ9MbD0=; b=bId2cQXWbmO9hB+gMwjIuNSkcSqhbKkanEIJmlXsYI3cp6qTtPnUcU9NWoKn4iDTlNjQ+C +rh4e2NSzZWhBCXJOmxwqYZmhqUnbrQq3BOfn6izxHxbYGGxDqXdH30JFBpFm18/Q8hdHL 0VXoCZARy4cz3+tQjwswx2gox8KbAIi0s/N6Lpvt8OxJtFKHlbqpG8KsSKOXkRJhcEjGpA urd2VzjnAlwJfIPynWynMcgIz3D2KA7mIr0ugivxjpFY1lrP8/igKHgPAkaiB6YqTij89c UVL/+5sXLga23nxr8RjoTONOVGATfdYnvHu7t3PkbxG5zAgnjFBXXgt1Clii/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764345470; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WM6NSFJh68HQsYa4DqE72QwPfKqEF0grx+P5eQ9MbD0=; b=Q0VTiuGMcQ78z9qqwS1gGO06bgpxiKlaK6Q86QNPkzrHnNs427wsseVEM3oIh1lNkkXmVj 7OkAhf2fwGrGY17T4sD7b1xT1c4GG4yx0qp0IiAlHKZPP12hoJ+wwn83vtwopBc26FXud7 +6mLMgdqE56rsYaYEYguTavory8+DW7E5BUw0IsD5JfWhnPxnoUitLFTVd8QHpCN9rqXPr k1eeiNCzp+KIv7TEjm9kAMKszQ6rX9VRRj0e4/zdtJJIwWFkl4Kn0YpW4qj6104Z0M6f0h 4LQ7eLl9gcFfoLs6YICf/drEEZ2MvWYRhPRuuW87xPgoIN7Ccub0zoHzulaJlA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764345470; a=rsa-sha256; cv=none; b=Zg+lchkBRZ5Ga1L5wKYr5hLrsLSwsMQeppylz3rvtXFAWzz3kN8ECVCrhiBjWA51hn7kOw jqS6EJ2mtKcIhQW817ChVtRqmD/OJyReI5cjowphw3qPU/q8Lwg+K2IAd0SbOYsyL5wxYc ZwxMETir6v6P1vzAavekUtMCq5L77casC6pyxnJsS8WRkVEHKiJvcig2Xcv1JXJ/S9EFqu b1p+3mutxe3a1IfvCkjHQ8RADqMUOHldER6+XLwKLLyUUTOIwxubGwIUWyyWi04zdrKda+ p5zisLlBEGfpR9grBSwTfMdEroHLDyvXAL8m1Pf18eYV6OAAKsP0oVepvJxCbg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dHycZ472Xz17p7 for ; Fri, 28 Nov 2025 15:57:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 30e32 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 28 Nov 2025 15:57:50 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Robert Clausecker Subject: git: b381d0980221 - main - stddef.h: add unreachable() for C23 compliance List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: fuz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b381d0980221b476cadbef862a8e5973d675fb7a Auto-Submitted: auto-generated Date: Fri, 28 Nov 2025 15:57:50 +0000 Message-Id: <6929c67e.30e32.51dd4352@gitrepo.freebsd.org> The branch main has been updated by fuz: URL: https://cgit.FreeBSD.org/src/commit/?id=b381d0980221b476cadbef862a8e5973d675fb7a commit b381d0980221b476cadbef862a8e5973d675fb7a Author: Robert Clausecker AuthorDate: 2025-11-27 20:19:49 +0000 Commit: Robert Clausecker CommitDate: 2025-11-28 15:56:49 +0000 stddef.h: add unreachable() for C23 compliance unreachable() is a hint to the compiler that it is unreachable. Add a new man page unreachable(3) to document this macro. Reviewed by: imp Approved by: markj (mentor) MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D53967 --- include/stddef.h | 4 ++ share/man/man3/Makefile | 3 +- share/man/man3/assert.3 | 5 ++- share/man/man3/unreachable.3 | 89 ++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 98 insertions(+), 3 deletions(-) diff --git a/include/stddef.h b/include/stddef.h index 3ba9a9946b01..2ac8e9fe3f77 100644 --- a/include/stddef.h +++ b/include/stddef.h @@ -61,6 +61,10 @@ typedef __max_align_t max_align_t; #endif #endif +#if __ISO_C_VISIBLE >= 2023 +#define unreachable(x) __unreachable(x) +#endif + #ifndef offsetof #define offsetof(type, field) __builtin_offsetof(type, field) #endif diff --git a/share/man/man3/Makefile b/share/man/man3/Makefile index bce57291f073..e5e790194ffc 100644 --- a/share/man/man3/Makefile +++ b/share/man/man3/Makefile @@ -35,7 +35,8 @@ MAN= alloca.3 \ sysexits.3 \ tgmath.3 \ timeradd.3 \ - tree.3 + tree.3 \ + unreachable.3 MLINKS= arb.3 ARB8_ENTRY.3 \ arb.3 ARB8_HEAD.3 \ diff --git a/share/man/man3/assert.3 b/share/man/man3/assert.3 index f219aa1d6743..cbaedb49010a 100644 --- a/share/man/man3/assert.3 +++ b/share/man/man3/assert.3 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd April 20, 2021 +.Dd November 27, 2025 .Dt ASSERT 3 .Os .Sh NAME @@ -118,7 +118,8 @@ constraint and includes the provided string literal: If none is provided, it only points at the constraint. .Sh SEE ALSO .Xr abort2 2 , -.Xr abort 3 +.Xr abort 3 , +.Xr unreachable 3 .Sh STANDARDS The .Fn assert diff --git a/share/man/man3/unreachable.3 b/share/man/man3/unreachable.3 new file mode 100644 index 000000000000..8a1c2d142578 --- /dev/null +++ b/share/man/man3/unreachable.3 @@ -0,0 +1,89 @@ +.\" +.\" Copyright (c) 2025 Robert Clausecker +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.Dd November 27, 2025 +.Dt UNREACHABLE 3 +.Os +.Sh NAME +.Nm unreachable +.Nd the unreachable macro +.Sh SYNOPSIS +.In stddef.h +.Fd #define unreachable() +.Sh DESCRIPTION +If the +.Fn unreachable +macro is reached during execution, behavior is undefined. +This can be useful to hint to the compiler that some invariant is guaranteed to +hold or that some case cannot occur. +.Sh EXAMPLES +Suppose a floating-point number +.Va x +is to be classified using the +.Xr fpclassify 3 +macro and a different action is to be taken based on the result of the +classification. +As the set of possible return values is known, the +.Fn unreachable +macro can be used to hint to the compiler that it can omit checks for +other possible return values: +.Bd -literal -offset 3n +#include +#include +#include + +void print_classification(double x) +{ + printf("%f: ", x); + + switch (fpclassify(x)) { + case FP_INFINITE: + puts("infinite"); + break; + + case FP_NAN: + puts("not a number"); + break; + + case FP_NORMAL: + puts("normal"); + break; + + case FP_SUBNORMAL: + puts("subnormal"); + break; + + case FP_ZERO: + puts("zero"); + break; + + default: + unreachable(); +} +.Ed +.Sh SEE ALSO +.Xr assert 3 +.Sh STANDARDS +The +.Fn unreachable +macro conforms to +.St -isoC-2023 . +.Sh HISTORY +A +.Dv /*NOTREACHED*/ +conventional comment was supported by the historical +.Xr lint 1 +utility to suppress warnings about unreachable statements during static +analysis. +The +.Fn unreachable +macro was added in +.Fx 15.1 +based on the earlier private +.Fn __unreachable +macro for compliance with +.St -isoC-2023 . +.Sh AUTHOR +.Ah Robert Clausecker Aq Mt fuz@FreeBSD.org From nobody Fri Nov 28 18:14:24 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dJ1f83LVmz6J0Dd for ; Fri, 28 Nov 2025 18:14:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dJ1f821cjz3L8K for ; Fri, 28 Nov 2025 18: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=1764353664; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XUZML/hfpp6gGLdo/0qNwhJxTHMBHPhCIu4NLEoczsY=; b=eKy1CRnIt9mTHHRu6N0hE9Ei//1zOjC3tFANqy7nBQPg2s/pO1xpH82mPZF1ZCf2EoYipw oMR0rcvvcHaO0chdG+J/x/Of129J9ddtqHjoeFoDQtIpZ3IngPpZJjQvUSsfMkNJrg4gMR DbWYvvdkTCqRCGpAHQ2qWQkn/L40v2wxqGOwtSURBxH6rPH68DoW6LlBHj5/vRDzLNcqtq hZ9miZwgl3owTIxNNHuDjcBgSBDKXY3t9yulUZQDc756jpL+xGaDSPwl2ge7b+JiCmtuhR yJuMCcuQcMKEMUN+gBZoHiTCurTeivmvzND2VmXF11SntcStZacEFjUTYFlxvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764353664; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XUZML/hfpp6gGLdo/0qNwhJxTHMBHPhCIu4NLEoczsY=; b=i4crAaJJM907s3+825glwqHSYxZBUlgkokxbRKvLV4d8T5EbH/S+EzwxJajF+lyU0WBu6B QeDPZWbXKGDnAM9xBO3wmKER9XCc/PEIwgTPlHXSarh3/B5zFTJnwQjuQURjnU0op1b1GX D00VVA9UGKEhF7YctpR07rKuvSVx2MrsPPpGv92Y8ZxFOnSHodOv/qgUGf1mEKM23FqaMn KaZvEPIG5cQ1K8uDtccnNtagY45UWHqZRYG/P3GjQxv4GC9mL4h0DMyC3dJbUxEEtCCoIf 6NVdMS38X9x+DunJgygdfCN3B/N/5wHxQxu68zAKSDFPm9fwtg6hB05yZBtBMw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764353664; a=rsa-sha256; cv=none; b=eeEyinzHwakGuHrSKyABxIFNfz4oCvNWuppaCQTMOBJDnc6HCpnqcbocF8ij/d21AJh++n cXTAPoUlBtOCSzsHSuyEPat9vbywUimNbSSFX6kxJV0HZv1b6iq0yRgTCAbQXIWqN0lvzQ T4mLzBP7XluwR69o1ifodNJ7V0Kqiqw/JbJXmj+IWKz5hUhDU5nPVcRNoGMT4rJf8bLTVW Qbuc+oqHccXOgKCe/wHLtAwIWcxTf0LO8IljavzkgW74nnm84Ga9ClvSWOZ2T06amA5C4t LCGi4+tihAZ2GnDqxbP4zGeyAx9Kw8qavbRT5GkiX+ib4I50s8nTKASTIvhfxw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dJ1f81Wghz1CC7 for ; Fri, 28 Nov 2025 18:14:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id e5ab by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 28 Nov 2025 18:14:24 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dimitry Andric Subject: git: 9978553d0199 - main - Remove TableGen objects from libllvm, fixing bad option registrations List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9978553d0199e7ec0bdd1c44fc7f6c7b0c11e43b Auto-Submitted: auto-generated Date: Fri, 28 Nov 2025 18:14:24 +0000 Message-Id: <6929e680.e5ab.5cd0ed49@gitrepo.freebsd.org> The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=9978553d0199e7ec0bdd1c44fc7f6c7b0c11e43b commit 9978553d0199e7ec0bdd1c44fc7f6c7b0c11e43b Author: Dimitry Andric AuthorDate: 2025-11-28 18:12:01 +0000 Commit: Dimitry Andric CommitDate: 2025-11-28 18:14:15 +0000 Remove TableGen objects from libllvm, fixing bad option registrations In 986e05bc2a18 I revamped the build for all the llvm subprojects. Among others I added objects under contrib/llvm-project/llvm/lib/TableGen, but I missed that upstream explicitly removes these when building the shared llvm library: https://github.com/llvm/llvm-project/blob/llvmorg-19.1.7/llvm/tools/llvm-shlib/CMakeLists.txt#L23 In 2e47f35be5dc I converted libllvm to a shared library. From that point onwards, some of the global command line option objects registered in llvm/lib/TableGen/Main.cpp conflict with similar objects in tools like llvm-cov, llvm-as, etc. This results in an error when running these tools: "CommandLine Error: Option 'o' registered more than once!", followed by a fatal exit. Fix this by removing the TableGen objects from libllvm. Note that we no longer install any of the tblgen binaries, these are only used during buildworld, and then in a statically linked form. PR: 291233 MFC after: 3 days --- lib/clang/libllvm/Makefile | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/lib/clang/libllvm/Makefile b/lib/clang/libllvm/Makefile index e634a72b4f90..810eac08d8d5 100644 --- a/lib/clang/libllvm/Makefile +++ b/lib/clang/libllvm/Makefile @@ -1245,16 +1245,6 @@ SRCS_MIN+= Support/regexec.c SRCS_MIN+= Support/regfree.c SRCS_MIN+= Support/regstrlcpy.c SRCS_MIN+= Support/xxhash.cpp -SRCS_MIN+= TableGen/DetailedRecordsBackend.cpp -SRCS_MIN+= TableGen/Error.cpp -SRCS_MIN+= TableGen/JSONBackend.cpp -SRCS_MIN+= TableGen/Main.cpp -SRCS_MIN+= TableGen/Record.cpp -SRCS_MIN+= TableGen/SetTheory.cpp -SRCS_MIN+= TableGen/StringMatcher.cpp -SRCS_MIN+= TableGen/TGLexer.cpp -SRCS_MIN+= TableGen/TGParser.cpp -SRCS_MIN+= TableGen/TableGenBackend.cpp .if ${MK_LLVM_TARGET_AARCH64} != "no" SRCS_MIN+= Target/AArch64/AArch64A53Fix835769.cpp SRCS_MIN+= Target/AArch64/AArch64A57FPLoadBalancing.cpp From nobody Fri Nov 28 19:49:02 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dJ3lL4L0Gz6J8lD for ; Fri, 28 Nov 2025 19:49:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dJ3lL2ltCz3Vcs for ; Fri, 28 Nov 2025 19:49:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764359342; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=F5vqkuQjJo6lZk3yNt5odnLVsTyJAbujsGUG/6JXURY=; b=qZEg5Ni2QzhELqTCTz2Es5uvYoAGhQLA/NA6Bo6aVIb/0bmQZh2LgojlKtuHFCtkBb+1Zp u8TmchANnHRWPsFtkZZQBmbP+rMyWmZSalPVkn45UUNV3GqjnFHKJbAzy0x++sOKYUCXeZ XgOtbH7fZMSIomYtg4EdHpj+NwoTWFCOj13Ip8kRmderCuxBIGY7zFG8EMn0VX3JoeWXAu vnsbRmstpSCkLw989kpthB4146ii1I6yjr8xck3HktGIeBuBJFQ7WrPqkgEnM3BR0FgDgw s5aaS5fsMXwo6QF/fb+h7voQjYlCVzAnZdeJnLYt5xJUKVyZo95cXzOLfasrcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764359342; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=F5vqkuQjJo6lZk3yNt5odnLVsTyJAbujsGUG/6JXURY=; b=twRdFgQ3OLlqoZM/KiI35GZIDk+dwqZwel7Vh8RDaWFgH2fLwq3FCH3YFzeumqrsbwyniS ntUOgIHKXNa5GanXvkzFgM8FAaLC+H5jejYq8f10s8w+xx0Uw7c59xpA4P2ddJuzWghiNk C8c0SAgumAxopxuwT3JsaV+qNhoctzw7z4hqAVeZeY9G2B3vQ2bf733XL5GcTqXY2xpqZ8 YOj/ulBR6TEgFulEX4Yv/qTE48DgDZzh2D0t32fCFNPRoTVRuiIA4oJYNgkwd2euUa6Axe UPHp00AfeyTN5eFuXdDxS7P1af5VjKHS3YAjRl1/G7i4/ls+7bd/wFD/KVPIog== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764359342; a=rsa-sha256; cv=none; b=nZ0wMq/XkeeuOkY3kKAVj5/utjxZJsCx/ql/OiocvKr+OyyPxhmsJ2C9y42VSYxaz8w9eT hSvuTdwUnb4uLAcdjmyhX9Ao19PU26Hg18LwwGrV/vAPkuPr2vQTnp/alat5kjF8pwKOWU tjHsd0Ehkz/aOnIZktpEl/QAKdYrDTRoOLvtf2UKHSquuadUCHpMclYj6M7mtxGBm9hJjp 6tC5xw61RVZXesyFT6ZVKOyEg1ceBfL85jRCTcBRXnhi5mO+QZ6GwxuFeZKj2pq9Afo1Ke vRTZs+q7+rvIDXpGBJlRBYFEym+68Vxj4+gV+3A53Jm65jGzDLmm56rzCkMaQg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dJ3lL2Hxdz1g8 for ; Fri, 28 Nov 2025 19:49:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2962d by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 28 Nov 2025 19:49:02 +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: 19728f31ae42 - main - sys/_types.h: Unbreak gcc build List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 19728f31ae421f40e2b0b0c775f4eedd7f927be0 Auto-Submitted: auto-generated Date: Fri, 28 Nov 2025 19:49:02 +0000 Message-Id: <6929fcae.2962d.8015a0f@gitrepo.freebsd.org> The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=19728f31ae421f40e2b0b0c775f4eedd7f927be0 commit 19728f31ae421f40e2b0b0c775f4eedd7f927be0 Author: Dag-Erling Smørgrav AuthorDate: 2025-11-28 19:47:04 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-11-28 19:47:22 +0000 sys/_types.h: Unbreak gcc build We can't assume that is in scope. Fixes: 85ab981a8e4e ("sys/_types.h: define fallback __(u)intcap_t") Reviewed by: olce, imp, emaste Differential Revision: https://reviews.freebsd.org/D53980 --- sys/sys/_types.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/sys/_types.h b/sys/sys/_types.h index e368f44f950e..f3c80957af34 100644 --- a/sys/sys/_types.h +++ b/sys/sys/_types.h @@ -161,7 +161,7 @@ typedef int __cpulevel_t; /* level parameter for cpuset. */ typedef int __cpusetid_t; /* cpuset identifier. */ typedef __int64_t __daddr_t; /* bwrite(3), FIOBMAP2, etc */ -#if !__has_feature(capabilities) +#if !defined(__has_feature) || !__has_feature(capabilities) /* * On non-CHERI systems, define __(u)intcap_t to __(u)intptr_t so that * hybrid-C code which needs to be explicitly aware of capabilities can From nobody Fri Nov 28 20:37:12 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dJ4q13vR1z6JFBS for ; Fri, 28 Nov 2025 20:37:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dJ4pw2nmWz3ZGy for ; Fri, 28 Nov 2025 20:37:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764362232; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1041ihqDZRthqOCSmMoXoKZQVrkCD+/5jig4Rp8Nhls=; b=UBmYkyoGd8WdDQbxREqyaMBkfH9Qa7rHI5HzMSB2gwLfWZ+kfOT6/FLF/MryAbkTBSJSNJ N8GouBlgDoUrcR6qhUDDk7wEtI6ZPTllFqNlvE49FYNaK375aw/tR/zKcR/Io+Jr7ITkWK zrXJY9Trve+EURQzT57NsmbLb4tehJJID25kRaou1Ft5QkNwQpSmObmDUuMhPeZO2pRpk8 7Kz1bcsratbdNF8zVEQLSJnz785LOLgn5jjgg3ZShuP7GU04US1MpHlXQ3GW+Usfpymeod 2YWqoXY8knqi1bzD419eVGFTFDxrS+8gihT9gc91FRvG3y3Nl1BGu/A7+0gfrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764362232; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1041ihqDZRthqOCSmMoXoKZQVrkCD+/5jig4Rp8Nhls=; b=fd+XKULgMWT6Evlj3FJrx/ZBNho+jLiW0jixMXCGmbC+K3GA6V0C073p1rJLCK7e7ZJucW s9KxDoZ1NDkGe0Thjvyv0PdXOA0/UmIukYc0zMlbtrRQNa/wjKaOlcZUa1tZa3g2zNIJ+E uTx2Hw0CY7/F6gfYoAJeM9RH8HHGdT+c0aQF5wTdAeTX5jnZwQbfi4+UtCl3WCCNtknnvI 59HPT6+yp8ekiWoNOQcCLz27JkqvMsaab+qztG4LzYMfY95vnqHYSlA3baehASxckkEi/+ VeVzyrdrYbeaJuHt5g6uOzVnIqc1pbMW1BUEB5kwPJpAX2u1ZkML7CWDahUJVA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764362232; a=rsa-sha256; cv=none; b=muJNuk2mEzfgmTNTmPwgujjARsZeOA9k1KQG6yzu/Q73eylBDvUv5fjJl5VLSyMBR0nbBj qp9p653NRz3vjFE+2oxFTO39LGuDeeJOcQPBj8BT5WTwUjZcWBWDmOFeRdfzkxgU2lq5R3 ePixrqcuWO5UTagcrlra+ZM241jVZDYz3fE1irjGzA/pDjTSAKH6CIPGW/4fba6thp98XY 7amADH6eOrTLuaE/IFOjjApRcPkFEbUQYvntva9rRELzHfqYp3I2dii6XtbifC8QhRuXh8 1bNYVnBrs9//g+QxEO2mpbuhBALrvSbmColaWshDH3ojglVv0nFwxakKeKEQ1A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dJ4pw2LDKz2wF for ; Fri, 28 Nov 2025 20:37:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2da36 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 28 Nov 2025 20:37:12 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 6da01ce6d36f - stable/15 - pf: fix another endpoint-independent crash List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 6da01ce6d36f6b0cc781894d49bff93bf0d9c881 Auto-Submitted: auto-generated Date: Fri, 28 Nov 2025 20:37:12 +0000 Message-Id: <692a07f8.2da36.834a69b@gitrepo.freebsd.org> The branch stable/15 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=6da01ce6d36f6b0cc781894d49bff93bf0d9c881 commit 6da01ce6d36f6b0cc781894d49bff93bf0d9c881 Author: Kristof Provost AuthorDate: 2025-11-21 09:03:36 +0000 Commit: Kristof Provost CommitDate: 2025-11-28 20:33:47 +0000 pf: fix another endpoint-independent crash In c12013f5bb38 we fixed udp_mapping cleanup issues in pf_get_sport(), but missed the static-port case (i.e. low == 0 && high == 0). We could still exit pf_get_sport() without either inserting the udp_mapping or freeing it. Address this and add a test case to provoke the problem. Reviewed by: thj MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D53856 (cherry picked from commit 7dedc3c21436bb5a1220f8901992d2772a163f78) --- sys/netpfil/pf/pf_lb.c | 16 ++++++++++++---- tests/sys/netpfil/pf/nat.sh | 30 ++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 4 deletions(-) diff --git a/sys/netpfil/pf/pf_lb.c b/sys/netpfil/pf/pf_lb.c index c6cdc4e03f3e..beffdcd017b4 100644 --- a/sys/netpfil/pf/pf_lb.c +++ b/sys/netpfil/pf/pf_lb.c @@ -407,10 +407,18 @@ pf_get_sport(struct pf_pdesc *pd, struct pf_krule *r, struct pf_addr *naddr, */ key.port[sidx] = pd->nsport; if (!pf_find_state_all_exists(&key, dir)) { - MPASS(udp_mapping == NULL || - *udp_mapping == NULL); - *nport = pd->nsport; - return (0); + if (udp_mapping && *udp_mapping != NULL) { + (*udp_mapping)->endpoints[1].port = pd->nsport; + if (pf_udp_mapping_insert(*udp_mapping) == 0) { + *nport = pd->nsport; + return (0); + } + } else { + MPASS(udp_mapping == NULL || + *udp_mapping == NULL); + *nport = pd->nsport; + return (0); + } } } else if (low == high) { key.port[sidx] = htons(low); diff --git a/tests/sys/netpfil/pf/nat.sh b/tests/sys/netpfil/pf/nat.sh index 7d5db6743424..71af0f31d174 100644 --- a/tests/sys/netpfil/pf/nat.sh +++ b/tests/sys/netpfil/pf/nat.sh @@ -286,6 +286,35 @@ endpoint_independent_exhaust_cleanup() rm -f server2.out } +atf_test_case "endpoint_independent_static_port" "cleanup" +endpoint_independent_static_port_head() +{ + atf_set descr 'Test that a client behind NAT gets the same external IP:port for different servers, with static-port' + atf_set require.user root +} + +endpoint_independent_static_port_body() +{ + endpoint_independent_setup # Sets ${epair_…} variables + + endpoint_independent_common \ + "nat on ${epair_nat}a inet from ! (${epair_nat}a) to any -> (${epair_nat}a)" \ + "nat on ${epair_nat}a inet from ! (${epair_nat}a) to any -> (${epair_nat}a) static-port sticky-address endpoint-independent" + + # Exhaust the available nat ports + for i in $(seq 1 10); do + echo "ping" | jexec client nc -u 198.51.100.32 1234 -w 0 + echo "ping" | jexec client nc -u 198.51.100.22 1234 -w 0 + done +} + +endpoint_independent_static_port_cleanup() +{ + pft_cleanup + rm -f server1.out + rm -f server2.out +} + atf_test_case "endpoint_independent_pass" "cleanup" endpoint_independent_pass_head() { @@ -881,6 +910,7 @@ atf_init_test_cases() atf_add_test_case "nested_anchor" atf_add_test_case "endpoint_independent_compat" atf_add_test_case "endpoint_independent_exhaust" + atf_add_test_case "endpoint_independent_static_port" atf_add_test_case "endpoint_independent_pass" atf_add_test_case "nat6_nolinklocal" atf_add_test_case "empty_table_source_hash" From nobody Fri Nov 28 20:53:31 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dJ59l1XnCz6JGpr for ; Fri, 28 Nov 2025 20:53:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dJ59l0g48z3bhj for ; Fri, 28 Nov 2025 20:53:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764363211; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lRaj/r2vggxieOF8zdgQlll7MsOL3EHl2loqYm+44Q8=; b=HYmRjGXK8MbEa5em1STtYIsCl3vhDcyQU7lKnwfRG/PiUYVopEq4qD5LVZep4KataXJ0Hf lwM7wXOyHPeRU9s4PXcx51H6Fg8hWhvaLvWhQpfcVfIqGTeSbn8P4qtOVifoaNIe9T4A9b jhvPvkfBZ3HaWoomw8c8KQWXHyyjfongvS1HZRBS74fVsDx112FKtl31cxD2Vx0Ms9wqDA huLVz0Vxe/hwKb2K1TDDUkm6GspnbgcrtYODbZMfQ5ng9fJSNTkhh6ceh8Yz03NSroj10Q RA6NVpu6BuvbjqNC1v3WGmviusH0S+wtawBy0n6OZZO1hkqAK5zWHj/GBpuMLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764363211; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lRaj/r2vggxieOF8zdgQlll7MsOL3EHl2loqYm+44Q8=; b=vgVaZEgQGNndaOj5bEYymCu4IVHs4WAcaMzRAgqL9eiBM+aNRcTcUzzPKxKnGsjlKztqK8 316lYSbhdNI7wBOz+Kz2YkJXK+IGra9IfXbJt6YKZljX/zcnd1FwUG1pfzFuv/yflipVLp D0tySHLVh4tjqq7NbbWQmv8vJExL+Wp2wjAZV5iEBd/YqevGTi2sr9Q218d7p8sIYBpefd gNyt4sD2Zm15/wVQAQdqzpGY1rYSr/syNWXfAVHi39Dv2/fPzfhrLaP0eYT7C7XJhi48l7 1ZSPsypAHezNUh+B8p5CQ31hLM1+tkTLNtDRM7ohULRolJ9Y/UnzzD7LygNj6w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764363211; a=rsa-sha256; cv=none; b=Ej24HqZXXiULW03JqdtnnHG54oXcbjt2R9HabAfFhdpRFHTGA19vTRbJrbUpP+5OtR6j78 8M/rhZDtWM90biwefrvDng/vknsPazzN3PThY+6+zscLQs9khdwo02aCcJlfHcYt1OO4Xz NMlngrqkhVmQ/2JBHEFiDqL8SKQ6vwzgmJ810El3NWNwQ/b/Mb2zOWXUXN4VDqdAPeJmBC 30bwirKBRIZtGYjovz6f+uVAGYSMRTfpdWmwEh4eQ/8ngxdlg8tc3LKvzlmIo0sRtnPsON r11ic48CKxVSDnZvD2n9M1RSuoKmEsP7eEqSFDqeQuugFYmd2CTsXxQ2EJgQ9w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dJ59l02lwz3SM for ; Fri, 28 Nov 2025 20:53:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 30a8b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 28 Nov 2025 20:53:31 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 687ab0dc54a9 - main - umass(4): Update to include pointers to quirks List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 687ab0dc54a926092548310d71afdbe386150838 Auto-Submitted: auto-generated Date: Fri, 28 Nov 2025 20:53:31 +0000 Message-Id: <692a0bcb.30a8b.7b76654d@gitrepo.freebsd.org> The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=687ab0dc54a926092548310d71afdbe386150838 commit 687ab0dc54a926092548310d71afdbe386150838 Author: Warner Losh AuthorDate: 2025-11-28 20:49:16 +0000 Commit: Warner Losh CommitDate: 2025-11-28 20:53:13 +0000 umass(4): Update to include pointers to quirks umass(4), while much improved, still sometimes need quirks. Add a pointer to usb_quirk(4) and usbconfig(8). Sponsored by: Netflix --- share/man/man4/umass.4 | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/share/man/man4/umass.4 b/share/man/man4/umass.4 index 8c6b03a3afea..306dc4e851ba 100644 --- a/share/man/man4/umass.4 +++ b/share/man/man4/umass.4 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd October 9, 2025 +.Dd November 28, 2025 .Dt UMASS 4 .Os .Sh NAME @@ -87,6 +87,25 @@ USB hard disk drives .It USB floppy drives .El +.Pp +The +.Nm +driver tries its best to avoid issues with the drives, not all issues +can be handled automatically, so quirks may be necessary. +See the +.Em USB Mass Sotrage quirks +section of +.Xr usb_quirk 4 +for quirks for the drives. +The +.Cd add_dev_quirk_vplh +and +.Cd add_quirk +commands of +.Xr usbconfig 8 +can manage these dynamically. +Quirks can be specified via tuables, as described in +.Xr usb_quirk 4 . .Sh EXAMPLES Rescan all slots on a multi-slot flash reader, where the slots map to separate LUNs on a single SCSI ID: @@ -106,8 +125,10 @@ the flash reader is the first SCSI bus in the system and has 4 slots. .Xr ohci 4 , .Xr uhci 4 , .Xr usb 4 , +.Xr usb_quirk 4 , .Xr xhci 4 , -.Xr camcontrol 8 +.Xr camcontrol 8 , +.Xr usbconfig 8 . .Sh HISTORY The .Nm From nobody Fri Nov 28 20:58:23 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dJ5HM6xK8z6JH7t for ; Fri, 28 Nov 2025 20:58:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dJ5HM4pQ0z3c8b for ; Fri, 28 Nov 2025 20:58:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764363503; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RvZrJRQHPEPA3WDhaJDEGt8bkDgq5Eo9TAaUDs0iXaE=; b=VFatYG76u5MSdVkAdiJJz4TBxTVKreC9zqg4E2AZ7sHSIaev8Y9e3MqeloYLvW2AWe8RlF 2D/4NY+hPmw27iMLL10L1EyKGI2/d1aCAzsdzVBo5dYgSZu82EFmaY2O6fNg1AiI9SONGo Hi9cfegpGFrQUP7sryCQzr3DprGz4di5XOY51bqFsq6WSx9TCHItFxBUl3bS1N9M7CxBtK NAPnuzl3Uadhu5GhlGFmuASo3b+AlhVRCSmDqu8IOKAp+wdwa/ByGPD2ibGMumM9baGx42 Jw3npV9+OLHl6fEqcx6jsRYz92OFBcpwLxl9qVr3BhSwivVv77avzhZsVOdRsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764363503; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RvZrJRQHPEPA3WDhaJDEGt8bkDgq5Eo9TAaUDs0iXaE=; b=stcA1IxIssCI/1AqDF3YCHLJouiWGA4gHaelxIs1u7qO13H/3mGUeBeZ1PSmY+LPHORJDm 7jEOfReuTtiSAAkY7WeEYuqEWJy+3qj18Ods6NEpbYAmocsqMpS9pNUihpGcOf9oO1r86Y m70YeyAFI7njBHFEgF7vypkY3I0XLeZSguogYA0sJeFyumKs+MbqwSDrl1WSQ1b0ZELME1 rLWKnjubcSm+rIiMyzkpQuBfvYV8IWVU1/2x59RzMbntsd6Im87+Iri8AS11cjfkzKdADm wszY8DUTL1cjLNflUA17OFBckd1TYKR/4XK30bSTxl9cde3bHcQTi2hsqCMaZA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764363503; a=rsa-sha256; cv=none; b=B1enqZsvz6S+rRSTz6SX8QgwEekD8m/I+Bf0VSEuSGu+VI0bnDUshnc1pNgxqNSR9q60q/ LWVP6tLrWFudaTNEbDmT/GgjuSzWSxTdufITPC8YcYuRGYxg2Z03TxcPuyEm5fnJalqBTn eeEod0NxBmCKaoVEtOCngBoNT9gWYMpClVT01AIdk25OamGvKkt8tN2QyL197PX7VG6KM5 pPyJALflijwodkDhe0xJJPGzrWdCs8rCDRW0o3XyHl5Cogfw1zPOpxzY+MdOK1mU9sezVW E8mGopx1GXrjXuCSsSxJDxUk9ZrVAq8zGNWrvtQLfSowGtbIWhvXb8grbfs/aw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dJ5HM4LW9z3SP for ; Fri, 28 Nov 2025 20:58:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 30da7 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 28 Nov 2025 20:58:23 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Krzysztof Galazka Subject: git: 18e83edd1378 - stable/15 - igb(4): Fix VLAN support on VFs List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/15 X-Git-Reftype: branch X-Git-Commit: 18e83edd13786718b8c2528b540c91c36275f234 Auto-Submitted: auto-generated Date: Fri, 28 Nov 2025 20:58:23 +0000 Message-Id: <692a0cef.30da7.67d50b8a@gitrepo.freebsd.org> The branch stable/15 has been updated by kgalazka: URL: https://cgit.FreeBSD.org/src/commit/?id=18e83edd13786718b8c2528b540c91c36275f234 commit 18e83edd13786718b8c2528b540c91c36275f234 Author: Krzysztof Galazka AuthorDate: 2025-11-17 15:30:26 +0000 Commit: Krzysztof Galazka CommitDate: 2025-11-28 20:57:44 +0000 igb(4): Fix VLAN support on VFs Virtual Functions are considered untrusted and have no control over VLAN filtering configuration in HW. To allow using VLANs on VF intreface driver has to assume that VLAN HW Filtering is always enabled and pass requests for adding or removing VLAN tags to Physical Function driver using Mailbox API. Signed-off-by: Krzysztof Galazka Approved by: kbowling (mentor) Reviewed by: erj (previous version) Tested by: gowtham.kumar.ks_intel.com Sponsored by: Intel Corporation Differential Revision: https://reviews.freebsd.org/D53245 (cherry picked from commit 1839526b7315cae62efbd2d1493e6243439effcb) --- sys/dev/e1000/if_em.c | 34 ++++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/sys/dev/e1000/if_em.c b/sys/dev/e1000/if_em.c index 168648c8c5ea..465e019029d9 100644 --- a/sys/dev/e1000/if_em.c +++ b/sys/dev/e1000/if_em.c @@ -4023,7 +4023,15 @@ em_if_vlan_register(if_ctx_t ctx, u16 vtag) bit = vtag & 0x1F; sc->shadow_vfta[index] |= (1 << bit); ++sc->num_vlans; - em_if_vlan_filter_write(sc); + if (!sc->vf_ifp) + em_if_vlan_filter_write(sc); + else + /* + * Physical funtion may reject registering VLAN + * but we have no way to inform the stack + * about that. + */ + e1000_vfta_set_vf(&sc->hw, vtag, true); } static void @@ -4036,7 +4044,10 @@ em_if_vlan_unregister(if_ctx_t ctx, u16 vtag) bit = vtag & 0x1F; sc->shadow_vfta[index] &= ~(1 << bit); --sc->num_vlans; - em_if_vlan_filter_write(sc); + if (!sc->vf_ifp) + em_if_vlan_filter_write(sc); + else + e1000_vfta_set_vf(&sc->hw, vtag, false); } static bool @@ -4094,22 +4105,15 @@ em_if_vlan_filter_write(struct e1000_softc *sc) { struct e1000_hw *hw = &sc->hw; - if (sc->vf_ifp) - return; + KASSERT(!sc->vf_ifp, ("VLAN filter write on VF\n")); /* Disable interrupts for lem(4) devices during the filter change */ if (hw->mac.type < em_mac_min) em_if_intr_disable(sc->ctx); for (int i = 0; i < EM_VFTA_SIZE; i++) - if (sc->shadow_vfta[i] != 0) { - /* XXXKB: incomplete VF support, we returned above */ - if (sc->vf_ifp) - e1000_vfta_set_vf(hw, sc->shadow_vfta[i], - true); - else - e1000_write_vfta(hw, i, sc->shadow_vfta[i]); - } + if (sc->shadow_vfta[i] != 0) + e1000_write_vfta(hw, i, sc->shadow_vfta[i]); /* Re-enable interrupts for lem-class devices */ if (hw->mac.type < em_mac_min) @@ -4124,8 +4128,10 @@ em_setup_vlan_hw_support(if_ctx_t ctx) if_t ifp = iflib_get_ifp(ctx); u32 reg; - /* XXXKB: Return early if we are a VF until VF decap and filter - * management is ready and tested. + /* + * Only PFs have control over VLAN HW filtering + * configuration. VFs have to act as if it's always + * enabled. */ if (sc->vf_ifp) return; From nobody Fri Nov 28 20:59:38 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dJ5Jq0HW7z6JH6j for ; Fri, 28 Nov 2025 20:59:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dJ5Jp6Q9Dz3cX6 for ; Fri, 28 Nov 2025 20:59:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764363578; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZhSkBlnNgVIgh3oxaIwjVHZdoyEU1K/2d8lYMZLIJ2w=; b=wRUFBml4RbWD88O2TpX2h6yr9Tu4nOe7mqXUPxt6Mt7y9L7VQlDl3fFama+n0hSxVxZYw9 BJmHWf31Y4+icOJU9ZTSYsE38wNv5qYbWKk3NhI14+TvnyZveu8kkHXB1xqjvkDZwr5POb KnUKHFfLBqSq/53XnY41D4LznzDy07FZ4tCcbEvlOp0VA/hLTwceiSHmHn12h14MenWIS2 S2T0xMdUsw99Zb19/9iUf03OWUzeeEDku6KjVS0lRuBw94o2ycvtt9siJXA7qNDso0WVGE OqkCBHE4IHIYWzRNHqMJvDX8ln0d6QLtLgW47149/vY+1iTOD6h7Yu8IF2XjqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764363578; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZhSkBlnNgVIgh3oxaIwjVHZdoyEU1K/2d8lYMZLIJ2w=; b=f+FSob7VuKwl0RaujLizSU8ltMpTc8K2yoiq4S1ICIeZ4vP6QFcyrALeD7iTl1EO3LKYII KXwiox51YqMYsiOYyZT/7KpaPwTg3N8hLVOX/qVMa4N+9Q5MLMeSUi7LJS4Ixh/c8y2Z2t ZCYQp0qIYGYvrk7XRmR7sqPlQLpOjlBrugbJDiMrn7kApw0ExrqRtPc9Wn78jML89MtyXZ DY5UWYeJYfERcw4Lnw9UHoyjFDTSRpvLWJFx6pzkvXbrXrcrl2viNqK0nj9l3KlFTx5aiB YmC+8wAKaeM7LwfeddIC6pHf/C68yexf5VA0vLMRcViSA6FEJgWWiEEKvTnuYg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764363578; a=rsa-sha256; cv=none; b=vCxjK6ew2QoxU3w7p+2h3/LM9VqF7ndxDbTyiprAOOjgVfpHWEjgE8pR5mGziagOEelfZf zywpxRmmQdRFSv5gKMf8Q7rinzH21YRiw3iyI8iek3sv/zshTPpQ0uqRNvjJUS5/SgFUIo k889Q2tJBpjfYB1UYsr7LiPGdH3/rnVSFszXKbb4SumnIpp+oJCcd7dvIRSx8C6TZB42G3 wCBSDjSevHlAR9rQIaG0Xz3ahHZwopD4A3HAGMU00xWMzS0TkZsT0XQ7FL2gqMdG/i0fTD Oa/efDIip5TCVJs3Yv5UTHbXM+kl4Q93lmKg7GlTIzaOMGRkotmxv8GluUYNyg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dJ5Jp5zx1z3SQ for ; Fri, 28 Nov 2025 20:59:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 30a8f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 28 Nov 2025 20:59:38 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Krzysztof Galazka Subject: git: 40a6ada9e614 - stable/14 - igb(4): Fix VLAN support on VFs List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 40a6ada9e614c1a6fd93e4164f7de416af1a23b2 Auto-Submitted: auto-generated Date: Fri, 28 Nov 2025 20:59:38 +0000 Message-Id: <692a0d3a.30a8f.3f503b03@gitrepo.freebsd.org> The branch stable/14 has been updated by kgalazka: URL: https://cgit.FreeBSD.org/src/commit/?id=40a6ada9e614c1a6fd93e4164f7de416af1a23b2 commit 40a6ada9e614c1a6fd93e4164f7de416af1a23b2 Author: Krzysztof Galazka AuthorDate: 2025-11-17 15:30:26 +0000 Commit: Krzysztof Galazka CommitDate: 2025-11-28 20:59:24 +0000 igb(4): Fix VLAN support on VFs Virtual Functions are considered untrusted and have no control over VLAN filtering configuration in HW. To allow using VLANs on VF intreface driver has to assume that VLAN HW Filtering is always enabled and pass requests for adding or removing VLAN tags to Physical Function driver using Mailbox API. Signed-off-by: Krzysztof Galazka Approved by: kbowling (mentor) Reviewed by: erj (previous version) Tested by: gowtham.kumar.ks_intel.com Sponsored by: Intel Corporation Differential Revision: https://reviews.freebsd.org/D53245 (cherry picked from commit 1839526b7315cae62efbd2d1493e6243439effcb) --- sys/dev/e1000/if_em.c | 34 ++++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/sys/dev/e1000/if_em.c b/sys/dev/e1000/if_em.c index 9040949b36c7..ce4269728903 100644 --- a/sys/dev/e1000/if_em.c +++ b/sys/dev/e1000/if_em.c @@ -4048,7 +4048,15 @@ em_if_vlan_register(if_ctx_t ctx, u16 vtag) bit = vtag & 0x1F; sc->shadow_vfta[index] |= (1 << bit); ++sc->num_vlans; - em_if_vlan_filter_write(sc); + if (!sc->vf_ifp) + em_if_vlan_filter_write(sc); + else + /* + * Physical funtion may reject registering VLAN + * but we have no way to inform the stack + * about that. + */ + e1000_vfta_set_vf(&sc->hw, vtag, true); } static void @@ -4061,7 +4069,10 @@ em_if_vlan_unregister(if_ctx_t ctx, u16 vtag) bit = vtag & 0x1F; sc->shadow_vfta[index] &= ~(1 << bit); --sc->num_vlans; - em_if_vlan_filter_write(sc); + if (!sc->vf_ifp) + em_if_vlan_filter_write(sc); + else + e1000_vfta_set_vf(&sc->hw, vtag, false); } static bool @@ -4119,22 +4130,15 @@ em_if_vlan_filter_write(struct e1000_softc *sc) { struct e1000_hw *hw = &sc->hw; - if (sc->vf_ifp) - return; + KASSERT(!sc->vf_ifp, ("VLAN filter write on VF\n")); /* Disable interrupts for lem(4) devices during the filter change */ if (hw->mac.type < em_mac_min) em_if_intr_disable(sc->ctx); for (int i = 0; i < EM_VFTA_SIZE; i++) - if (sc->shadow_vfta[i] != 0) { - /* XXXKB: incomplete VF support, we returned above */ - if (sc->vf_ifp) - e1000_vfta_set_vf(hw, sc->shadow_vfta[i], - true); - else - e1000_write_vfta(hw, i, sc->shadow_vfta[i]); - } + if (sc->shadow_vfta[i] != 0) + e1000_write_vfta(hw, i, sc->shadow_vfta[i]); /* Re-enable interrupts for lem-class devices */ if (hw->mac.type < em_mac_min) @@ -4149,8 +4153,10 @@ em_setup_vlan_hw_support(if_ctx_t ctx) if_t ifp = iflib_get_ifp(ctx); u32 reg; - /* XXXKB: Return early if we are a VF until VF decap and filter - * management is ready and tested. + /* + * Only PFs have control over VLAN HW filtering + * configuration. VFs have to act as if it's always + * enabled. */ if (sc->vf_ifp) return; From nobody Fri Nov 28 21:15:44 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dJ5gP4jJ6z6JJCX for ; Fri, 28 Nov 2025 21:15:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dJ5gP1HKfz3db2 for ; Fri, 28 Nov 2025 21:15:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764364545; 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=Xxx4waLUKlxraWTymFwXpcJYEdwfW4NT0cePu6tatEg=; b=lgnrfSKdcM8vqfiUe5SBZOc7u/eFpcmKOCOy2VXu//4kBdjDHQPNbso5OLfmtdsCsGDG7C S+0q656qJLygo5wkhWk0rTOSH0Sw4Ap6YH1FiY8zIfSEaISGvdsVbfIrDqe4eYbDKxPjdS /0MVSRfUciDrjcRdKvwB7FZEVJpH6oW7aLzPnSoZWvSfaNMi6nmySTSfJ5+qwryiTv7p3e qWs1BZXpByg9xhc3nIfODR6JCY6hJ+qLEy8k3aAZUIuG/ZdzifxOmPzVMuLvQU4RMmwNhv fJtnCyCK2TPurj5hEy8HXsc0uZqjSUs1TZ9s3lS5X4yb49byJk3AyPRHj+XBCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764364545; 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=Xxx4waLUKlxraWTymFwXpcJYEdwfW4NT0cePu6tatEg=; b=FD8zARYfRIMod7MDhIxHd2okSaoPdgDwajWH7Rb7hzQX3aDa7KuaOvvE5VcQq85d80Uw6Y ClkpaPAmA8JGkT057g8vtDJbg3d0qY2f2fAvNcLIY+RHsgqdEGi9pBxlFuMztiE7/H8j/2 oo/8hfL0FBscWOOW1Pe0VcUdKuzCrD7bN9id3tlQbn43erByftexnHkrN0J9bCw17IZj6s exmkXKGBO4571GtZe0/dI4z5Hf+LLTdN9ayLVV8PwYWimbz5deXcxV1h8p80w8CIc90zfx 4OBu7IXj3ZD5YBl+khoJFTLMS5e/JMMkLFJ3l5BIkFh46fZdZSrdbvam8ejiIw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764364545; a=rsa-sha256; cv=none; b=eRi7Pp7dtibZYbKzKdFNevfdjkfR+NtCbddcOVES/MtagiVnm5zdIy5/VZp9/cJ1jrQoQy ZowhNvjJd/7/FjCOESAQyehxgxgYgo5DpZHIoB7FMTxlFN+4FWwXjy5WSAAIll4jdfp4Z8 LehW0CbdtUw5GAplP3SlY81EvJk0MFzNbTuyDBpq0bB4+zfxYhP8AAi2AvlMrFOMMle299 LgpVmmUZ5HwW6+sKuq0QF8gZyCDD//Rhwa6c7cUuUxkx6oCRkQfSAcNRyi78Ah0tfF7uvc ZFhZJ+2/1wlv097EzOO7IIsf1XRQAa4anYEzco7K4z/xCqoFWmvzp5YcHDOA8g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dJ5gN6vtRz3fB for ; Fri, 28 Nov 2025 21:15:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 331fc by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 28 Nov 2025 21:15:44 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Bhosale, Yogesh From: Krzysztof Galazka Subject: git: 0224c9f6d0f3 - stable/15 - ix(4): Add support for debug dump for E610 adapters List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/15 X-Git-Reftype: branch X-Git-Commit: 0224c9f6d0f3454cc6ffc82d2f6079f5924ac9d6 Auto-Submitted: auto-generated Date: Fri, 28 Nov 2025 21:15:44 +0000 Message-Id: <692a1100.331fc.d29ab49@gitrepo.freebsd.org> The branch stable/15 has been updated by kgalazka: URL: https://cgit.FreeBSD.org/src/commit/?id=0224c9f6d0f3454cc6ffc82d2f6079f5924ac9d6 commit 0224c9f6d0f3454cc6ffc82d2f6079f5924ac9d6 Author: Bhosale, Yogesh AuthorDate: 2025-10-10 09:39:16 +0000 Commit: Krzysztof Galazka CommitDate: 2025-11-28 21:08:55 +0000 ix(4): Add support for debug dump for E610 adapters This is part 2 of the support for the new Intel Ethernet E610 family of devices. Intel E610 Ethernet Controller devices feature a debug dump capability that allows you to capture runtime register values directly from the hardware, with assistance from the firmware. These registers are organized into clusters based on their function, enabling targeted debugging. This information is consolidated into a single dump file, facilitating the debugging of complex issues encountered in the field. The debug dump provides a snapshot of the device's current hardware configuration, including switch tables, transmit scheduler tables, and other relevant data. It captures the state of specified clusters and serves as a stateless snapshot of the entire device. This update introduces ioctl and sysctl support for the debug dump feature. Signed-off-by: Yogesh Bhosale yogesh.bhosale@intel.com Co-developed-by: Krzysztof Galazka krzysztof.galazka@intel.com Approved by: kbowling (mentor), erj (mentor) Tested by: gowtham.kumar.ks_intel.com Sponsored by: Intel Corporation Differential Revision: https://reviews.freebsd.org/D50934 (cherry picked from commit 2170400142b99c0eb604403b74ebd88c05dd7ed4) --- sys/dev/ixgbe/if_ix.c | 521 +++++++++++++++++++++++++++++++++++++++++ sys/dev/ixgbe/ixgbe.h | 52 ++++ sys/dev/ixgbe/ixgbe_features.h | 1 + 3 files changed, 574 insertions(+) diff --git a/sys/dev/ixgbe/if_ix.c b/sys/dev/ixgbe/if_ix.c index 5c4ca585c323..7f234ce45dbd 100644 --- a/sys/dev/ixgbe/if_ix.c +++ b/sys/dev/ixgbe/if_ix.c @@ -192,6 +192,8 @@ static int ixgbe_if_i2c_req(if_ctx_t, struct ifi2creq *); static bool ixgbe_if_needs_restart(if_ctx_t, enum iflib_restart_event); int ixgbe_intr(void *); +static int ixgbe_if_priv_ioctl(if_ctx_t ctx, u_long command, caddr_t data); + /************************************************************************ * Function prototypes ************************************************************************/ @@ -239,6 +241,13 @@ static void ixgbe_setup_vlan_hw_support(if_ctx_t); static void ixgbe_config_gpie(struct ixgbe_softc *); static void ixgbe_config_delay_values(struct ixgbe_softc *); +static void ixgbe_add_debug_sysctls(struct ixgbe_softc *sc); +static void ixgbe_add_debug_dump_sysctls(struct ixgbe_softc *sc); +static int ixgbe_debug_dump_ioctl(struct ixgbe_softc *sc, struct ifdrv *ifd); +static u8 ixgbe_debug_dump_print_cluster(struct ixgbe_softc *sc, + struct sbuf *sbuf, u8 cluster_id); +static int ixgbe_nvm_access_ioctl(struct ixgbe_softc *sc, struct ifdrv *ifd); + /* Sysctl handlers */ static int ixgbe_sysctl_flowcntl(SYSCTL_HANDLER_ARGS); static int ixgbe_sysctl_advertise(SYSCTL_HANDLER_ARGS); @@ -260,6 +269,9 @@ static int ixgbe_sysctl_wol_enable(SYSCTL_HANDLER_ARGS); static int ixgbe_sysctl_wufc(SYSCTL_HANDLER_ARGS); static int ixgbe_sysctl_tso_tcp_flags_mask(SYSCTL_HANDLER_ARGS); +static int ixgbe_sysctl_debug_dump_set_clusters(SYSCTL_HANDLER_ARGS); +static int ixgbe_sysctl_dump_debug_dump(SYSCTL_HANDLER_ARGS); + /* Deferred interrupt tasklets */ static void ixgbe_handle_msf(void *); static void ixgbe_handle_mod(void *); @@ -330,6 +342,7 @@ static device_method_t ixgbe_if_methods[] = { DEVMETHOD(ifdi_get_counter, ixgbe_if_get_counter), DEVMETHOD(ifdi_i2c_req, ixgbe_if_i2c_req), DEVMETHOD(ifdi_needs_restart, ixgbe_if_needs_restart), + DEVMETHOD(ifdi_priv_ioctl, ixgbe_if_priv_ioctl), #ifdef PCI_IOV DEVMETHOD(ifdi_iov_init, ixgbe_if_iov_init), DEVMETHOD(ifdi_iov_uninit, ixgbe_if_iov_uninit), @@ -1015,6 +1028,8 @@ ixgbe_if_attach_pre(if_ctx_t ctx) if (hw->mac.type == ixgbe_mac_E610) ixgbe_init_aci(hw); + sc->do_debug_dump = false; + if (hw->mac.ops.fw_recovery_mode && hw->mac.ops.fw_recovery_mode(hw)) { device_printf(dev, @@ -1396,6 +1411,248 @@ ixgbe_if_needs_restart(if_ctx_t ctx __unused, enum iflib_restart_event event) } } +/************************************************************************ + * ixgbe_if_priv_ioctl - Ioctl handler for driver + * + * Handler for custom driver specific ioctls + * + * return 0 on success, positive on failure + ************************************************************************/ +static int +ixgbe_if_priv_ioctl(if_ctx_t ctx, u_long command, caddr_t data) +{ + struct ixgbe_softc *sc = iflib_get_softc(ctx); + struct ifdrv *ifd; + device_t dev = sc->dev; + + /* Make sure the command type is valid */ + switch (command) { + case SIOCSDRVSPEC: + case SIOCGDRVSPEC: + /* Accepted commands */ + break; + case SIOCGPRIVATE_0: + /* + * Although we do not support this ioctl command, it's expected + * that iflib will forward it to the IFDI_PRIV_IOCTL handler. + * Do not print a message in this case. + */ + return (ENOTSUP); + default: + /* + * If we get a different command for this function, it's + * definitely unexpected, so log a message indicating what + * command we got for debugging purposes. + */ + device_printf(dev, + "%s: unexpected ioctl command %08lx\n", + __func__, command); + return (EINVAL); + } + + ifd = (struct ifdrv *)data; + + switch (ifd->ifd_cmd) { + case IXGBE_NVM_ACCESS: + IOCTL_DEBUGOUT("ioctl: NVM ACCESS"); + return (ixgbe_nvm_access_ioctl(sc, ifd)); + case IXGBE_DEBUG_DUMP: + IOCTL_DEBUGOUT("ioctl: DEBUG DUMP"); + return (ixgbe_debug_dump_ioctl(sc, ifd)); + default: + IOCTL_DEBUGOUT1( + "ioctl: UNKNOWN SIOC(S|G)DRVSPEC (0x%X) command\n", + (int)ifd->ifd_cmd); + return (EINVAL); + } + + return (0); +} + +/************************************************************************ + * ixgbe_nvm_access_ioctl + * + * Handles an NVM access ioctl request + ************************************************************************/ +static int +ixgbe_nvm_access_ioctl(struct ixgbe_softc *sc, struct ifdrv *ifd) +{ + struct ixgbe_nvm_access_data *data; + struct ixgbe_nvm_access_cmd *cmd; + struct ixgbe_hw *hw = &sc->hw; + size_t ifd_len = ifd->ifd_len; + size_t malloc_len; + device_t dev = sc->dev; + u8 *nvm_buffer; + s32 error = 0; + + /* + * ifioctl forwards SIOCxDRVSPEC to iflib without conducting + * a privilege check. Subsequently, iflib passes the ioctl to the driver + * without verifying privileges. To prevent non-privileged threads from + * accessing this interface, perform a privilege check at this point. + */ + error = priv_check(curthread, PRIV_DRIVER); + if (error) + return (error); + + if (ifd_len < sizeof(*cmd)) { + device_printf(dev, + "%s: ifdrv length is too small. Got %zu, " + "but expected %zu\n", + __func__, ifd_len, sizeof(*cmd)); + return (EINVAL); + } + + if (ifd->ifd_data == NULL) { + device_printf(dev, "%s: No ifd data buffer.\n", + __func__); + return (EINVAL); + } + + malloc_len = max(ifd_len, sizeof(*data) + sizeof(*cmd)); + + nvm_buffer = (u8 *)malloc(malloc_len, M_IXGBE, M_ZERO | M_NOWAIT); + if (!nvm_buffer) + return (ENOMEM); + + /* Copy the NVM access command and data in from user space */ + error = copyin(ifd->ifd_data, nvm_buffer, ifd_len); + if (error) { + device_printf(dev, "%s: Failed to copy data in, error: %d\n", + __func__, error); + goto cleanup_free_nvm_buffer; + } + + /* + * The NVM command structure is immediately followed by data which + * varies in size based on the command. + */ + cmd = (struct ixgbe_nvm_access_cmd *)nvm_buffer; + data = (struct ixgbe_nvm_access_data *) + (nvm_buffer + sizeof(struct ixgbe_nvm_access_cmd)); + + /* Handle the NVM access request */ + error = ixgbe_handle_nvm_access(hw, cmd, data); + if (error) { + device_printf(dev, "%s: NVM access request failed, error %d\n", + __func__, error); + } + + /* Copy the possibly modified contents of the handled request out */ + error = copyout(nvm_buffer, ifd->ifd_data, ifd_len); + if (error) { + device_printf(dev, "%s: Copying response back to " + "user space failed, error %d\n", + __func__, error); + goto cleanup_free_nvm_buffer; + } + +cleanup_free_nvm_buffer: + free(nvm_buffer, M_IXGBE); + return (error); +} + +/************************************************************************ + * ixgbe_debug_dump_ioctl + * + * Makes debug dump of internal FW/HW data. + ************************************************************************/ +static int +ixgbe_debug_dump_ioctl(struct ixgbe_softc *sc, struct ifdrv *ifd) +{ + struct ixgbe_debug_dump_cmd *dd_cmd; + struct ixgbe_hw *hw = &sc->hw; + size_t ifd_len = ifd->ifd_len; + device_t dev = sc->dev; + s32 error = 0; + + if (!(sc->feat_en & IXGBE_FEATURE_DBG_DUMP)) + return (ENODEV); + + /* Data returned from ACI command */ + u16 ret_buf_size = 0; + u16 ret_next_cluster = 0; + u16 ret_next_table = 0; + u32 ret_next_index = 0; + + /* + * ifioctl forwards SIOCxDRVSPEC to iflib without conducting + * a privilege check. Subsequently, iflib passes the ioctl to the driver + * without verifying privileges. To prevent non-privileged threads from + * accessing this interface, perform a privilege check at this point. + */ + error = priv_check(curthread, PRIV_DRIVER); + if (error) + return (error); + + if (ifd_len < sizeof(*dd_cmd)) { + device_printf(dev, + "%s: ifdrv length is too small. Got %zu, " + "but expected %zu\n", + __func__, ifd_len, sizeof(*dd_cmd)); + return (EINVAL); + } + + if (ifd->ifd_data == NULL) { + device_printf(dev, "%s: No ifd data buffer.\n", + __func__); + return (EINVAL); + } + + dd_cmd = (struct ixgbe_debug_dump_cmd *)malloc(ifd_len, M_IXGBE, + M_NOWAIT | M_ZERO); + if (!dd_cmd) { + error = -ENOMEM; + goto out; + } + /* copy data from userspace */ + error = copyin(ifd->ifd_data, dd_cmd, ifd_len); + if (error) { + device_printf(dev, "%s: Failed to copy data in, error: %d\n", + __func__, error); + goto out; + } + + /* ACI command requires buf_size arg to be grater than 0 */ + if (dd_cmd->data_size == 0) { + device_printf(dev, "%s: data_size must be greater than 0\n", + __func__); + error = EINVAL; + goto out; + } + + /* Zero the data buffer memory space */ + memset(dd_cmd->data, 0, ifd_len - sizeof(*dd_cmd)); + + error = ixgbe_aci_get_internal_data(hw, dd_cmd->cluster_id, + dd_cmd->table_id, dd_cmd->offset, dd_cmd->data, dd_cmd->data_size, + &ret_buf_size, &ret_next_cluster, &ret_next_table, &ret_next_index); + if (error) { + device_printf(dev, + "%s: Failed to get internal FW/HW data, error: %d\n", + __func__, error); + goto out; + } + + dd_cmd->cluster_id = ret_next_cluster; + dd_cmd->table_id = ret_next_table; + dd_cmd->offset = ret_next_index; + dd_cmd->data_size = ret_buf_size; + + error = copyout(dd_cmd, ifd->ifd_data, ifd->ifd_len); + if (error) { + device_printf(dev, + "%s: Failed to copy data out, error: %d\n", + __func__, error); + } + +out: + free(dd_cmd, M_IXGBE); + + return (error); +} + /************************************************************************ * ixgbe_add_media_types ************************************************************************/ @@ -2884,6 +3141,264 @@ ixgbe_sysctl_interrupt_rate_handler(SYSCTL_HANDLER_ARGS) return (0); } /* ixgbe_sysctl_interrupt_rate_handler */ +/************************************************************************ + * ixgbe_debug_dump_print_cluster + ************************************************************************/ +static u8 +ixgbe_debug_dump_print_cluster(struct ixgbe_softc *sc, struct sbuf *sbuf, + u8 cluster_id) +{ + u16 data_buf_size = IXGBE_ACI_MAX_BUFFER_SIZE; + device_t dev = sc->dev; + struct ixgbe_hw *hw = &sc->hw; + const u8 reserved_buf[8] = {}; + int max_aci_calls = 1000; + int error, counter = 0; + u8 *data_buf; + + /* Input parameters / loop variables */ + u16 table_id = 0; + u32 offset = 0; + + /* Data returned from ACI command */ + u16 ret_buf_size = 0; + u16 ret_next_cluster = 0; + u16 ret_next_table = 0; + u32 ret_next_index = 0; + + data_buf = (u8 *)malloc(data_buf_size, M_IXGBE, M_NOWAIT | M_ZERO); + if (!data_buf) + return (0); + + DEBUGOUT2("%s: dumping cluster id (relative) %d\n", + __func__, cluster_id); + + do { + DEBUGOUT3("table_id 0x%04x offset 0x%08x buf_size %d\n", + table_id, offset, data_buf_size); + + error = ixgbe_aci_get_internal_data(hw, cluster_id, table_id, + offset, data_buf, data_buf_size, &ret_buf_size, + &ret_next_cluster, &ret_next_table, &ret_next_index); + if (error) { + device_printf(dev, + "%s: Failed to get internal FW/HW data, error: %d, " + "last aci status: %d\n", + __func__, error, hw->aci.last_status); + break; + } + + DEBUGOUT3("ret_table_id 0x%04x ret_offset 0x%08x " + "ret_buf_size %d\n", + ret_next_table, ret_next_index, ret_buf_size); + + /* Print cluster id */ + u32 print_cluster_id = (u32)cluster_id; + sbuf_bcat(sbuf, &print_cluster_id, sizeof(print_cluster_id)); + /* Print table id */ + u32 print_table_id = (u32)table_id; + sbuf_bcat(sbuf, &print_table_id, sizeof(print_table_id)); + /* Print table length */ + u32 print_table_length = (u32)ret_buf_size; + sbuf_bcat(sbuf, &print_table_length, + sizeof(print_table_length)); + /* Print current offset */ + u32 print_curr_offset = offset; + sbuf_bcat(sbuf, &print_curr_offset, sizeof(print_curr_offset)); + /* Print reserved bytes */ + sbuf_bcat(sbuf, reserved_buf, sizeof(reserved_buf)); + /* Print data */ + sbuf_bcat(sbuf, data_buf, ret_buf_size); + + /* Prepare for the next loop spin */ + memset(data_buf, 0, data_buf_size); + + bool last_index = (ret_next_index == 0xffffffff); + bool last_table = ((ret_next_table == 0xff || + ret_next_table == 0xffff) && + last_index); + + if (last_table) { + /* End of the cluster */ + DEBUGOUT1("End of the cluster ID %d\n", cluster_id); + break; + } else if (last_index) { + /* End of the table */ + table_id = ret_next_table; + offset = 0; + } else { + /* More data left in the table */ + offset = ret_next_index; + } + } while (++counter < max_aci_calls); + + if (counter >= max_aci_calls) + device_printf(dev, "Exceeded nr of ACI calls for cluster %d\n", + cluster_id); + + free(data_buf, M_IXGBE); + + return (++cluster_id); +} /* ixgbe_print_debug_dump_cluster */ + +/************************************************************************ + * ixgbe_sysctl_debug_dump_set_clusters + * + * Sets the cluster to dump from FW when Debug Dump requested. + ************************************************************************/ +static int +ixgbe_sysctl_debug_dump_set_clusters(SYSCTL_HANDLER_ARGS) +{ + struct ixgbe_softc *sc = (struct ixgbe_softc *)arg1; + u32 clusters = sc->debug_dump_cluster_mask; + device_t dev = sc->dev; + int error; + + error = sysctl_handle_32(oidp, &clusters, 0, req); + if ((error) || !req->newptr) + return (error); + + if (clusters & ~(IXGBE_DBG_DUMP_VALID_CLUSTERS_MASK)) { + device_printf(dev, + "%s: Unrecognized parameter: %u\n", + __func__, clusters); + sc->debug_dump_cluster_mask = + IXGBE_ACI_DBG_DUMP_CLUSTER_ID_INVALID; + return (EINVAL); + } + + sc->debug_dump_cluster_mask = clusters; + + return (0); +} /* ixgbe_sysctl_debug_dump_set_clusters */ + +/************************************************************************ + * ixgbe_sysctl_dump_debug_dump + ************************************************************************/ +static int +ixgbe_sysctl_dump_debug_dump(SYSCTL_HANDLER_ARGS) +{ + struct ixgbe_softc *sc = (struct ixgbe_softc *)arg1; + device_t dev = sc->dev; + struct sbuf *sbuf; + int error = 0; + + UNREFERENCED_PARAMETER(arg2); + + if (!sc->do_debug_dump) { + if (req->oldptr == NULL && req->newptr == NULL) { + error = SYSCTL_OUT(req, 0, 0); + return (error); + } + + char input_buf[2] = ""; + error = sysctl_handle_string(oidp, input_buf, + sizeof(input_buf), req); + if ((error) || (req->newptr == NULL)) + return (error); + + if (input_buf[0] == '1') { + if (sc->debug_dump_cluster_mask == + IXGBE_ACI_DBG_DUMP_CLUSTER_ID_INVALID) { + device_printf(dev, + "Debug Dump failed because an invalid " + "cluster was specified.\n"); + return (EINVAL); + } + + sc->do_debug_dump = true; + return (0); + } + + return (EINVAL); + } + + /* Caller just wants the upper bound for size */ + if (req->oldptr == NULL && req->newptr == NULL) { + size_t est_output_len = IXGBE_DBG_DUMP_BASE_SIZE; + if (sc->debug_dump_cluster_mask & 0x2) + est_output_len += IXGBE_DBG_DUMP_BASE_SIZE; + error = SYSCTL_OUT(req, 0, est_output_len); + return (error); + } + + sbuf = sbuf_new_for_sysctl(NULL, NULL, 128, req); + sbuf_clear_flags(sbuf, SBUF_INCLUDENUL); + + DEBUGOUT("FW Debug Dump running...\n"); + + if (sc->debug_dump_cluster_mask) { + for (u8 id = 0; id <= IXGBE_ACI_DBG_DUMP_CLUSTER_ID_MAX; id++) { + if (sc->debug_dump_cluster_mask & BIT(id)) { + DEBUGOUT1("Dumping cluster ID %u...\n", id); + ixgbe_debug_dump_print_cluster(sc, sbuf, id); + } + } + } else { + u8 next_cluster_id = 0; + do { + DEBUGOUT1("Dumping cluster ID %u...\n", + next_cluster_id); + next_cluster_id = ixgbe_debug_dump_print_cluster(sc, + sbuf, next_cluster_id); + } while (next_cluster_id != 0 && + next_cluster_id <= IXGBE_ACI_DBG_DUMP_CLUSTER_ID_MAX); + } + + sbuf_finish(sbuf); + sbuf_delete(sbuf); + + sc->do_debug_dump = false; + + return (error); +} /* ixgbe_sysctl_dump_debug_dump */ + +/************************************************************************ + * ixgbe_add_debug_dump_sysctls + ************************************************************************/ +static void +ixgbe_add_debug_dump_sysctls(struct ixgbe_softc *sc) +{ + struct sysctl_oid_list *debug_list, *dump_list; + struct sysctl_oid *dump_node; + struct sysctl_ctx_list *ctx; + device_t dev = sc->dev; + + ctx = device_get_sysctl_ctx(dev); + debug_list = SYSCTL_CHILDREN(sc->debug_sysctls); + + dump_node = SYSCTL_ADD_NODE(ctx, debug_list, OID_AUTO, "dump", + CTLFLAG_RD, NULL, "Internal FW/HW Dump"); + dump_list = SYSCTL_CHILDREN(dump_node); + + SYSCTL_ADD_PROC(ctx, dump_list, OID_AUTO, "clusters", + CTLTYPE_U32 | CTLFLAG_RW, sc, 0, + ixgbe_sysctl_debug_dump_set_clusters, "SU", + IXGBE_SYSCTL_DESC_DEBUG_DUMP_SET_CLUSTER); + + SYSCTL_ADD_PROC(ctx, dump_list, OID_AUTO, "dump", + CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_MPSAFE, sc, 0, + ixgbe_sysctl_dump_debug_dump, "", + IXGBE_SYSCTL_DESC_DUMP_DEBUG_DUMP); +} /* ixgbe_add_debug_dump_sysctls */ + +static void +ixgbe_add_debug_sysctls(struct ixgbe_softc *sc) +{ + struct sysctl_oid_list *ctx_list; + struct sysctl_ctx_list *ctx; + device_t dev = sc->dev; + + ctx = device_get_sysctl_ctx(dev); + ctx_list = SYSCTL_CHILDREN(device_get_sysctl_tree(dev)); + + sc->debug_sysctls = SYSCTL_ADD_NODE(ctx, ctx_list, OID_AUTO, "debug", + CTLFLAG_RD, NULL, "Debug Sysctls"); + + if (sc->feat_en & IXGBE_FEATURE_DBG_DUMP) + ixgbe_add_debug_dump_sysctls(sc); +} /* ixgbe_add_debug_sysctls */ + /************************************************************************ * ixgbe_add_device_sysctls ************************************************************************/ @@ -2994,6 +3509,8 @@ ixgbe_add_device_sysctls(if_ctx_t ctx) CTLTYPE_INT | CTLFLAG_RW, sc, 0, ixgbe_sysctl_eee_state, "I", "EEE Power Save State"); } + + ixgbe_add_debug_sysctls(sc); } /* ixgbe_add_device_sysctls */ /************************************************************************ @@ -5184,6 +5701,7 @@ ixgbe_init_device_features(struct ixgbe_softc *sc) break; case ixgbe_mac_E610: sc->feat_cap |= IXGBE_FEATURE_RECOVERY_MODE; + sc->feat_cap |= IXGBE_FEATURE_DBG_DUMP; break; default: break; @@ -5205,6 +5723,9 @@ ixgbe_init_device_features(struct ixgbe_softc *sc) /* Recovery mode */ if (sc->feat_cap & IXGBE_FEATURE_RECOVERY_MODE) sc->feat_en |= IXGBE_FEATURE_RECOVERY_MODE; + /* FW Debug Dump */ + if (sc->feat_cap & IXGBE_FEATURE_DBG_DUMP) + sc->feat_en |= IXGBE_FEATURE_DBG_DUMP; /* Enabled via global sysctl... */ /* Flow Director */ diff --git a/sys/dev/ixgbe/ixgbe.h b/sys/dev/ixgbe/ixgbe.h index 844064bf8543..624b71acabea 100644 --- a/sys/dev/ixgbe/ixgbe.h +++ b/sys/dev/ixgbe/ixgbe.h @@ -46,6 +46,7 @@ #include #include #include +#include #include #include @@ -475,6 +476,20 @@ struct ixgbe_softc { u32 feat_cap; u32 feat_en; u16 lse_mask; + + struct sysctl_oid *debug_sysctls; + u32 debug_dump_cluster_mask; + bool do_debug_dump; +}; + +struct ixgbe_debug_dump_cmd { + u32 offset; /* offset to read/write from table, in bytes */ + u8 cluster_id; /* also used to get next cluster id */ + u16 table_id; + u16 data_size; /* size of data field, in bytes */ + u16 reserved1; + u32 reserved2; + u8 data[]; }; /* Precision Time Sync (IEEE 1588) defines */ @@ -499,6 +514,43 @@ struct ixgbe_softc { #define IXGBE_PHY_CURRENT_TEMP 0xC820 #define IXGBE_PHY_OVERTEMP_STATUS 0xC830 +/** + * The ioctl command number used by NVM update for accessing the driver for + * NVM access commands. + */ +#define IXGBE_NVM_ACCESS \ + (((((((('E' << 4) + '1') << 4) + 'K') << 4) + 'G') << 4) | 5) + +/* + * The ioctl command number used by a userspace tool for accessing the driver + * for getting debug dump data from the firmware. + */ +#define IXGBE_DEBUG_DUMP \ + (((((((('E' << 4) + '1') << 4) + 'K') << 4) + 'G') << 4) | 6) + +/* Debug Dump related definitions */ +#define IXGBE_ACI_DBG_DUMP_CLUSTER_ID_INVALID 0xFFFFFF +#define IXGBE_ACI_DBG_DUMP_CLUSTER_ID_BASE 50 +#define IXGBE_ACI_DBG_DUMP_CLUSTER_ID_MAX 1 + +#define IXGBE_DBG_DUMP_VALID_CLUSTERS_MASK 0x3 +#define IXGBE_DBG_DUMP_BASE_SIZE (2 * 1024 * 1024) + +#define IXGBE_SYSCTL_DESC_DEBUG_DUMP_SET_CLUSTER \ +"\nSelect clusters to dump with \"dump\" sysctl" \ +"\nFlags:" \ +"\n\t 0x1 - Link" \ +"\n\t 0x2 - Full CSR Space, excluding RCW registers" \ +"\n\t" \ +"\nUse \"sysctl -x\" to view flags properly." + +#define IXGBE_SYSCTL_DESC_DUMP_DEBUG_DUMP \ +"\nWrite 1 to output a FW debug dump containing the clusters " \ +"specified by the \"clusters\" sysctl" \ +"\nThe \"-b\" flag must be used in order to dump this data " \ +"as binary data because" \ +"\nthis data is opaque and not a string." + /* Sysctl help messages; displayed with sysctl -d */ #define IXGBE_SYSCTL_DESC_ADV_SPEED \ "\nControl advertised link speed using these flags:\n" \ diff --git a/sys/dev/ixgbe/ixgbe_features.h b/sys/dev/ixgbe/ixgbe_features.h index 0cef334a185f..bee9040319d8 100644 --- a/sys/dev/ixgbe/ixgbe_features.h +++ b/sys/dev/ixgbe/ixgbe_features.h @@ -57,6 +57,7 @@ #define IXGBE_FEATURE_LEGACY_IRQ (u32)(1 << 12) #define IXGBE_FEATURE_NEEDS_CTXD (u32)(1 << 13) #define IXGBE_FEATURE_RECOVERY_MODE (u32)(1 << 15) +#define IXGBE_FEATURE_DBG_DUMP (u32)(1 << 16) /* Check for OS support. Undefine features if not included in the OS */ #ifndef PCI_IOV From nobody Fri Nov 28 21:15:46 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dJ5gQ5Svdz6JK0y for ; Fri, 28 Nov 2025 21:15:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dJ5gQ2fJVz3dxk for ; Fri, 28 Nov 2025 21:15:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764364546; 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=PYOrsqMreEmH/WPaWaolH7xI9S6M7Q8vRqo+btoCQoU=; b=N1tzUPDUP0HkN074PRjpWeqa4rixYTHG8hv+0A5n3BpMimfOFYSRbl/FistO+mHpl6Sk0e 53vq/xGs63u/E3Ot4IakIHMlGpLHJ2L0BnW1VhCy57W83DSIlFkVc4svDBm+NWeCBXANnf 6crIbUrnl1o2n1BXDoRRafGucZ0uq5ejwZ1n6YZRC95GmVUdyGYzCJPxmxkrJnIe+dDgFN X4CafxJjJNJqgv4Y8Ug6/2hpv4gmt9e3sGeIGMiZ4GRoJRCcnHphoLW/oIseKFu5fWW+cx ztGDJt0HfXZhYx52bPBVc4B6u5XwHg7sD9BRWfuDk/tUfwjrjg+AtuRpoXMccw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764364546; 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=PYOrsqMreEmH/WPaWaolH7xI9S6M7Q8vRqo+btoCQoU=; b=qJDniXCBwwZeMxWmw3so18p2eZXN7Bn32W6+MKV+ppfXp+buKoqNiTItBoqJOyS80fE6ur rnC6LfINH8wy4G6wu27fnEq9PNIiAFgNDvxNoTPQ4BBZ9CZIACZLUVqCnloeMW4yyfVxkL lzJSR8UxONMY4QSLQeBJt3b5LR2ZTmyR44/zFcBB9bO3aUNderiUeuMg1JqzpPbFH4l8Mm 5wFpHUB5wnrLP1ucv6k7JsDqI5GAUZTkfbWhQWS9QIyLJw5AzrU/AiqQhOJXVZxWgLE7uL //fHwlLuKRPPNdvwxh6m14CGa1idW6/4tdFNdmIGh8LI4b43OQWmLgGhfitcmg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764364546; a=rsa-sha256; cv=none; b=bC4wr+JEPwvSd8YqH2NrcqBctU3tfH4o8u4tN6hf8O0T/7dvjnPqEfs+P7osueICrTS9MW PLvxjp7jsBqXknBqaYhr1m8W4ODFxDq9W0tKCYM2GyOEPH4nISsAR6Ua+9xu1Y9BjmLaM+ XWow1HGN1moOBpwZV4LJFvjpiHdzcpunCUjSGsUEyZNkqE/bvFhUKvTXpPq1jBRDmOfn/L /JhGKJ0Lc2zhQbUfnAdF0L8pFEeK++bavUlDiN3EFGwvksrRWHanF4PNV7Y/DR+bEW961M +nlBQnAQyW8/hoOBe3kqMR7UlDk186dGfz/R6OLLMTQT+45pCRMvxnarXQ3J0A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dJ5gQ06CNz40k for ; Fri, 28 Nov 2025 21:15:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 32dcb by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 28 Nov 2025 21:15:46 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Yogesh Bhosale From: Krzysztof Galazka Subject: git: 283162be308e - stable/15 - ix.4: Document E610 debug dump List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/15 X-Git-Reftype: branch X-Git-Commit: 283162be308e05f6a55c0a76f2f89891aea5f754 Auto-Submitted: auto-generated Date: Fri, 28 Nov 2025 21:15:46 +0000 Message-Id: <692a1102.32dcb.7a8568a7@gitrepo.freebsd.org> The branch stable/15 has been updated by kgalazka: URL: https://cgit.FreeBSD.org/src/commit/?id=283162be308e05f6a55c0a76f2f89891aea5f754 commit 283162be308e05f6a55c0a76f2f89891aea5f754 Author: Yogesh Bhosale AuthorDate: 2025-11-10 18:03:54 +0000 Commit: Krzysztof Galazka CommitDate: 2025-11-28 21:14:10 +0000 ix.4: Document E610 debug dump Explain how to collect E610 device debug dump data with sysctl for troubleshooting with Intel Customer Support. Fixes: 2170400142b9 (Add support for debug dump) Reviewed by: bcr, erj (previous version), ziaee Signed-off-by: Yogesh Bhosale Differential Revision: https://reviews.freebsd.org/D52990 (cherry picked from commit 8225ed665eea69b3df3ea57009cf8fe61863c1fc) --- share/man/man4/ix.4 | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/share/man/man4/ix.4 b/share/man/man4/ix.4 index e6f4276e1a77..09af85f5c4a7 100644 --- a/share/man/man4/ix.4 +++ b/share/man/man4/ix.4 @@ -132,6 +132,35 @@ Enable Adaptive Interrupt Moderation (AIM). Vary the interrupt rate over time based on the traffic for that interrupt vector. .El +.Sh SYSCTL VARIABLES +The +.Nm +driver supports the following +.Xr sysctl 8 +variables: +.Bl -tag -width "dev.ix.?.debug.dump.clusters" +.It Va dev.ix.?.debug.dump.clusters +Specify a bitmask to select firmware event clusters +to be included in the debug dump. +Possible values include: +.Pp +.Bl -tag -compact +.It 0 +All clusters excluding Manageability Transactions +.It 0x1 +Link cluster +.It 0x2 +Full CSR Space excluding RCW registers +.El +.Pp +This feature is only supported on E610 devices. +.It Va dev.ix.?.debug.dump.dump +Specify 1 to generate a per-device debugging snapshot. +Output must be redirected to a file +and decoded by Intel Customer Support. +.Pp +This feature is only supported on E610. +.El .Sh DIAGNOSTICS .Bl -diag .It "ix%d: Unable to allocate bus resource: memory" From nobody Fri Nov 28 21:21:15 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dJ5nl6Z6Jz6JKKf for ; Fri, 28 Nov 2025 21:21:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dJ5nl5G61z3fmn for ; Fri, 28 Nov 2025 21:21:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764364875; 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=5UtuCqCVByWPumoN3uuyZIbRQceSW7sUECEMcNYXsk4=; b=jYgZ1fmin/iu5pMf4/c7poUYBkIHRMB9PII4dSltkt070M/Bxezse4gZJsIP97K1LPDfzo bDFsmcuieIH/Uc4dr/uqgj6Aok5lUMKcefwUjIjH5mFBw7tArd6WkaxUJrMTjyTlYykEAh wP7YmlXg0Xzmb0kV9MuWyN5WLuEKQBXjRyflZoaYmuGSNuARoHWOVr+gkWFbxv9TpoBHDE u0goShoLt68ALQESxlL0E/I9oDspJM+XUaXHPB8NaMWBGV6xf6wOsItSLFfjvm2Utlpn3Q Mu4YZMe5ZixvU6ZpCoHsW9h2e2sXRVLDPwkFCLL6JkQDR9ekzBkXtoLnIR+2uw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764364875; 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=5UtuCqCVByWPumoN3uuyZIbRQceSW7sUECEMcNYXsk4=; b=UWlbok7e/PWGNDJaBopW7ytIdKVuK1Pp4WJ4TfVKyzC9Zdex6yBcSsBZmk9uaDdrA9UdrD 9SFHnKwWxeDEXzpERzZ8Nq2QLBUppbDS2a57lf2wsY8zQXCZxm301K+XihMtzVmdFWzFWN HaPLWbKJerbn0UYaGj22G0CgT5bBAtb7naHs3HLU4wBniEhOJBKni1MDeZgVLq6O/CLGBa 2imO01jKTEGGGSV1UZ8h8wl1LUt7FJSLOTwBnH/VJrHHKUJVuWHqx0KPLmZKch01gPzd8v 1CSZDs2iqzJeLuAbiI2jduhcoc0pYt5xSBAM+SfTxZdOD2VsgUiiKYjjjdrspQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764364875; a=rsa-sha256; cv=none; b=BdpcqQS1PuYZ37I3zRZsK36no6ob5wrxGbpdBjGLkffzDkQcrih9yJ7+pTHJBD3Oer9nFx /g4DpJkgwfedTTXYf8BR2HdKwNqMcagqt8C99+qKqgXHUqiZcnz6Cw4dr5Df6a70mq3wpu 4wSV7i9wJH1kiBMK55E4dIAqvTMSNbddAGDA08BAJJNKmA+8TLkHUDBGgDuGTnARcoTKIP 1QuiagxI9er0IyXMuiYsUkSs27UbQktDedk+bIApctgxlaTx5Jx4aLY0xaG9tr8H/SqoYB 5xNEWM/rsv0fJahR2As5y6k2G84J2GNrpx3RUUyzLWQJoN3UgYJO/LyVE5N0+A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dJ5nl4bWGz3j9 for ; Fri, 28 Nov 2025 21:21:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 33e75 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 28 Nov 2025 21:21:15 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Yogesh Bhosale From: Krzysztof Galazka Subject: git: e7da904b73ab - stable/14 - ix.4: Add E610 to HARDWARE section List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kgalazka X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: e7da904b73abb8f3e2f1eb52ad7015ca731feff8 Auto-Submitted: auto-generated Date: Fri, 28 Nov 2025 21:21:15 +0000 Message-Id: <692a124b.33e75.23ce7dba@gitrepo.freebsd.org> The branch stable/14 has been updated by kgalazka: URL: https://cgit.FreeBSD.org/src/commit/?id=e7da904b73abb8f3e2f1eb52ad7015ca731feff8 commit e7da904b73abb8f3e2f1eb52ad7015ca731feff8 Author: Yogesh Bhosale AuthorDate: 2025-11-10 19:23:46 +0000 Commit: Krzysztof Galazka CommitDate: 2025-11-28 21:20:11 +0000 ix.4: Add E610 to HARDWARE section Reviewed by: ziaee Fixes: dea5f973d0c8 (new Intel Ethernet E610 family) Differential Revision: https://reviews.freebsd.org/D52990 (cherry picked from commit abd53b16c03f77c12bb8b77d9e2e4cf392745361) --- share/man/man4/ix.4 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/share/man/man4/ix.4 b/share/man/man4/ix.4 index 418b6e1188ab..e6f4276e1a77 100644 --- a/share/man/man4/ix.4 +++ b/share/man/man4/ix.4 @@ -29,7 +29,7 @@ .\" .\" * Other names and brands may be claimed as the property of others. .\" -.Dd October 26, 2024 +.Dd November 10, 2025 .Dt IX 4 .Os .Sh NAME @@ -78,6 +78,8 @@ including: .Pp .Bl -bullet -compact .It +Intel(R) Ethernet E610 +.It Intel(R) Ethernet X553 .It Intel(R) Ethernet X552 From nobody Fri Nov 28 21:21:16 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dJ5nn1X67z6JKRf for ; Fri, 28 Nov 2025 21:21:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dJ5nn0536z3ffH for ; Fri, 28 Nov 2025 21:21:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764364877; 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=QLTg92poj23VCvWbrHtqOvLuphLrd5wjVOhxM2Qw47c=; b=vjWKunxXsVzejwC1sk7qtIK+Lr2/dH0978zUcVdXvw8fnFAB+4Aq7yW0EOXIBQHnOrbHPW WxehBEhZkd4me5CwXa2WvBfBihfiylYOEaFx1XWcokNP3MLmpJQihd+7IQyhLRxvrYnox2 B4nrZp+AN/o+Q5qJ54zJZh+if5vEMJgBzUVDfafnRN7REPTcyNEkAZ7Ae4HTTthC1Q5AQx Ffvsv75kq4Is21l8KFATVyVIYuF6qCt8FqhqF2GI2ZtiDGawjoZz++T4hZtpYndQCCvpPG wTxVoE/knZOOmqlSkt75tkdWBAudYOLVV2M8kt5e3TGcXETshbJK90q/0jrhzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764364877; 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=QLTg92poj23VCvWbrHtqOvLuphLrd5wjVOhxM2Qw47c=; b=oG2q9u1P34CO+qGB/IiN/5XGiATPRH/n+ZIzM7jBflr+V9t7E561bxm0OtJ0ys10+v87S3 ms4KfszwJPMsCRHOf4B99tN3F0he59QOQJyL5lsVTSQhqPmRt4dhwc6Ejom/nCDhkH0f0E 6yky8PDoTSjScHfe3YK/3L7NE7DIoCJ8slnUBGbSlSWrWPiSm39BmwkxNX2Rla+vivHvv7 xMNGcyjgGnmi8qBTihmAFJWACSB8G7OBBmEXBqoXjzj9oLaaVOaIdkOd7uHp717aQRuNwY vW8R9Q1fRDQyWBypTOaisoSWGGC67wmsqvuvMhsqRgFal6L0Z37s18GZeGBrVA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764364877; a=rsa-sha256; cv=none; b=tUcOr76xvBjBEqK8jmcz1LVwY9caxcCcnbMueHciaspkM56Mms35HrFh05YpZgzdh10a7f 5eDcnmH7iLuslL4Olu6Sc3o8UOGIP75h0vA8/1+eH3wOAv0j6eCV/6x6WPiyrk7ANoowAQ dlnCL0Pqgq04UHw7ThRu/D0dLsbJhwtph3Y87Y+dN2fGMiJFBzUtljkecX4+u7yrzEPOm5 vtWG0KdBrR6Nn3i/PkpBeFLhJfZmt365++3sDmGDQFK2NfXabgb/1t7MB6KCLrizbkP9fC PK2j6ufnSUZLvIb7gsvYL6h9k+mYBDvE/AwphROLYWxtjWjeDqjoTK1lxfwKXg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dJ5nm5Lt7z3bk for ; Fri, 28 Nov 2025 21:21:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 31b39 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 28 Nov 2025 21:21:16 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Yogesh Bhosale From: Krzysztof Galazka Subject: git: f28019f570cc - stable/14 - ix.4: Document E610 debug dump List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: f28019f570cc1bbfe0f0597dc2f46cfd9438359a Auto-Submitted: auto-generated Date: Fri, 28 Nov 2025 21:21:16 +0000 Message-Id: <692a124c.31b39.3866ef66@gitrepo.freebsd.org> The branch stable/14 has been updated by kgalazka: URL: https://cgit.FreeBSD.org/src/commit/?id=f28019f570cc1bbfe0f0597dc2f46cfd9438359a commit f28019f570cc1bbfe0f0597dc2f46cfd9438359a Author: Yogesh Bhosale AuthorDate: 2025-11-10 18:03:54 +0000 Commit: Krzysztof Galazka CommitDate: 2025-11-28 21:20:34 +0000 ix.4: Document E610 debug dump Explain how to collect E610 device debug dump data with sysctl for troubleshooting with Intel Customer Support. Fixes: 2170400142b9 (Add support for debug dump) Reviewed by: bcr, erj (previous version), ziaee Signed-off-by: Yogesh Bhosale Differential Revision: https://reviews.freebsd.org/D52990 (cherry picked from commit 8225ed665eea69b3df3ea57009cf8fe61863c1fc) --- share/man/man4/ix.4 | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/share/man/man4/ix.4 b/share/man/man4/ix.4 index e6f4276e1a77..09af85f5c4a7 100644 --- a/share/man/man4/ix.4 +++ b/share/man/man4/ix.4 @@ -132,6 +132,35 @@ Enable Adaptive Interrupt Moderation (AIM). Vary the interrupt rate over time based on the traffic for that interrupt vector. .El +.Sh SYSCTL VARIABLES +The +.Nm +driver supports the following +.Xr sysctl 8 +variables: +.Bl -tag -width "dev.ix.?.debug.dump.clusters" +.It Va dev.ix.?.debug.dump.clusters +Specify a bitmask to select firmware event clusters +to be included in the debug dump. +Possible values include: +.Pp +.Bl -tag -compact +.It 0 +All clusters excluding Manageability Transactions +.It 0x1 +Link cluster +.It 0x2 +Full CSR Space excluding RCW registers +.El +.Pp +This feature is only supported on E610 devices. +.It Va dev.ix.?.debug.dump.dump +Specify 1 to generate a per-device debugging snapshot. +Output must be redirected to a file +and decoded by Intel Customer Support. +.Pp +This feature is only supported on E610. +.El .Sh DIAGNOSTICS .Bl -diag .It "ix%d: Unable to allocate bus resource: memory" From nobody Fri Nov 28 21:21:14 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dJ5nr1RZMz6JKKj for ; Fri, 28 Nov 2025 21:21:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dJ5nq4VW0z3fWn for ; Fri, 28 Nov 2025 21:21:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764364879; 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=vek54AdnOz9wh2Ve3gZaOJbIjEmXJ9WskYzBicE1zN0=; b=munIsQPQ6OWd3AcB7CJ72AXaAcvm7pkADmR4V88ltjjS3vb1uXdQEGSBEAdSUsrOATglha 5RHmf/hy7MX0X4KGYV5mwBp6QusF3AjweDzzdG2UVOd3VOLKvg9/OILh6bCKNGOhp4XWVH UDD0t9SJ5gisv5eQsfLeGxl6FKXtrykUW9UlQZLur1yoYVgwILQcNjWkLVZt0Ga5VSfnm2 ig1OiXCsEMtlzZczXaIg62YefSkTgDSZP0zn2QaeozydffbaZ1kg9DhmzSEK1x19pEPFlD b03ANUi61d/y553ZId1d/tSZritZikABwYm4AQ/hTCjLs+HmFBGHQVxK9TWoRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764364879; 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=vek54AdnOz9wh2Ve3gZaOJbIjEmXJ9WskYzBicE1zN0=; b=ErDJ4Ip+aJ/HXbtzUDRzGkOe5wQWB13/0G4s5ur8K04Qw8WnGVjZTmVvYv5GnQNxPRZ5bq cchau76/2Gpt23QF4ecxzw1ZBSiemEveSM2ouhMDm88wURzMWDNahAQNTBXo7HseTwA1Mf bi9UZtbjVOwLTSwqSzgFr1VpsirilAwpqL/DUmbf2B2yRFTSHcmQYudxSXDNulRINDzDQU IoiapSGeWvg65YBueX/an6OiEFol6gOgOK2a+uLGIck6aJAUFaSB961WeCrKdkR3F5m4Dy PE09bed9D9s1tlXCaTd5/BWCq5+qqiyAWeyZr7DfV+WaHh4spJfeoCPZqWig7Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764364879; a=rsa-sha256; cv=none; b=oq2o1JwT+JEXrKqV7aycFuarLIjJLldisn+4ez7CKtI8ovd5sKpgpAFNHrZGiy0enpwaG/ 6UzAzegGcSTkgnYIMbpZOwgXnOkk6HMmgEM5uVhwvz+EDCnuZQCGVyQ0+zLAh2VNYG0rb1 mIg+Ckz1CTT4nZituN9F0zxSCThBjukDgD+u8GathVEe7NpxlnAdJxlYvz3emz0aG6cjzn DgYHEH2phZxB93Ojkg+v+sIdBwLV24ptEZmbIDVW2mnbwbtDU4bc1bzpOWIWzeQOKGcQwf pQp/VbPBmmcXBT8wHCtmdAnfMZKNm3yoAbpjCjYPafVkgoZhkJWzzz+rNMIhFw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dJ5nq3s5fz414 for ; Fri, 28 Nov 2025 21:21:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 32df5 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 28 Nov 2025 21:21:14 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Bhosale, Yogesh From: Krzysztof Galazka Subject: git: d6a05d332394 - stable/14 - ix(4): Add support for debug dump for E610 adapters List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: d6a05d33239403065463b12375045f9245a0eb3c Auto-Submitted: auto-generated Date: Fri, 28 Nov 2025 21:21:14 +0000 Message-Id: <692a124a.32df5.6e3b9aaf@gitrepo.freebsd.org> The branch stable/14 has been updated by kgalazka: URL: https://cgit.FreeBSD.org/src/commit/?id=d6a05d33239403065463b12375045f9245a0eb3c commit d6a05d33239403065463b12375045f9245a0eb3c Author: Bhosale, Yogesh AuthorDate: 2025-10-10 09:39:16 +0000 Commit: Krzysztof Galazka CommitDate: 2025-11-28 21:16:35 +0000 ix(4): Add support for debug dump for E610 adapters This is part 2 of the support for the new Intel Ethernet E610 family of devices. Intel E610 Ethernet Controller devices feature a debug dump capability that allows you to capture runtime register values directly from the hardware, with assistance from the firmware. These registers are organized into clusters based on their function, enabling targeted debugging. This information is consolidated into a single dump file, facilitating the debugging of complex issues encountered in the field. The debug dump provides a snapshot of the device's current hardware configuration, including switch tables, transmit scheduler tables, and other relevant data. It captures the state of specified clusters and serves as a stateless snapshot of the entire device. This update introduces ioctl and sysctl support for the debug dump feature. Signed-off-by: Yogesh Bhosale yogesh.bhosale@intel.com Co-developed-by: Krzysztof Galazka krzysztof.galazka@intel.com Approved by: kbowling (mentor), erj (mentor) Tested by: gowtham.kumar.ks_intel.com Sponsored by: Intel Corporation Differential Revision: https://reviews.freebsd.org/D50934 (cherry picked from commit 2170400142b99c0eb604403b74ebd88c05dd7ed4) --- sys/dev/ixgbe/if_ix.c | 521 +++++++++++++++++++++++++++++++++++++++++ sys/dev/ixgbe/ixgbe.h | 52 ++++ sys/dev/ixgbe/ixgbe_features.h | 1 + 3 files changed, 574 insertions(+) diff --git a/sys/dev/ixgbe/if_ix.c b/sys/dev/ixgbe/if_ix.c index 5c4ca585c323..7f234ce45dbd 100644 --- a/sys/dev/ixgbe/if_ix.c +++ b/sys/dev/ixgbe/if_ix.c @@ -192,6 +192,8 @@ static int ixgbe_if_i2c_req(if_ctx_t, struct ifi2creq *); static bool ixgbe_if_needs_restart(if_ctx_t, enum iflib_restart_event); int ixgbe_intr(void *); +static int ixgbe_if_priv_ioctl(if_ctx_t ctx, u_long command, caddr_t data); + /************************************************************************ * Function prototypes ************************************************************************/ @@ -239,6 +241,13 @@ static void ixgbe_setup_vlan_hw_support(if_ctx_t); static void ixgbe_config_gpie(struct ixgbe_softc *); static void ixgbe_config_delay_values(struct ixgbe_softc *); +static void ixgbe_add_debug_sysctls(struct ixgbe_softc *sc); +static void ixgbe_add_debug_dump_sysctls(struct ixgbe_softc *sc); +static int ixgbe_debug_dump_ioctl(struct ixgbe_softc *sc, struct ifdrv *ifd); +static u8 ixgbe_debug_dump_print_cluster(struct ixgbe_softc *sc, + struct sbuf *sbuf, u8 cluster_id); +static int ixgbe_nvm_access_ioctl(struct ixgbe_softc *sc, struct ifdrv *ifd); + /* Sysctl handlers */ static int ixgbe_sysctl_flowcntl(SYSCTL_HANDLER_ARGS); static int ixgbe_sysctl_advertise(SYSCTL_HANDLER_ARGS); @@ -260,6 +269,9 @@ static int ixgbe_sysctl_wol_enable(SYSCTL_HANDLER_ARGS); static int ixgbe_sysctl_wufc(SYSCTL_HANDLER_ARGS); static int ixgbe_sysctl_tso_tcp_flags_mask(SYSCTL_HANDLER_ARGS); +static int ixgbe_sysctl_debug_dump_set_clusters(SYSCTL_HANDLER_ARGS); +static int ixgbe_sysctl_dump_debug_dump(SYSCTL_HANDLER_ARGS); + /* Deferred interrupt tasklets */ static void ixgbe_handle_msf(void *); static void ixgbe_handle_mod(void *); @@ -330,6 +342,7 @@ static device_method_t ixgbe_if_methods[] = { DEVMETHOD(ifdi_get_counter, ixgbe_if_get_counter), DEVMETHOD(ifdi_i2c_req, ixgbe_if_i2c_req), DEVMETHOD(ifdi_needs_restart, ixgbe_if_needs_restart), + DEVMETHOD(ifdi_priv_ioctl, ixgbe_if_priv_ioctl), #ifdef PCI_IOV DEVMETHOD(ifdi_iov_init, ixgbe_if_iov_init), DEVMETHOD(ifdi_iov_uninit, ixgbe_if_iov_uninit), @@ -1015,6 +1028,8 @@ ixgbe_if_attach_pre(if_ctx_t ctx) if (hw->mac.type == ixgbe_mac_E610) ixgbe_init_aci(hw); + sc->do_debug_dump = false; + if (hw->mac.ops.fw_recovery_mode && hw->mac.ops.fw_recovery_mode(hw)) { device_printf(dev, @@ -1396,6 +1411,248 @@ ixgbe_if_needs_restart(if_ctx_t ctx __unused, enum iflib_restart_event event) } } +/************************************************************************ + * ixgbe_if_priv_ioctl - Ioctl handler for driver + * + * Handler for custom driver specific ioctls + * + * return 0 on success, positive on failure + ************************************************************************/ +static int +ixgbe_if_priv_ioctl(if_ctx_t ctx, u_long command, caddr_t data) +{ + struct ixgbe_softc *sc = iflib_get_softc(ctx); + struct ifdrv *ifd; + device_t dev = sc->dev; + + /* Make sure the command type is valid */ + switch (command) { + case SIOCSDRVSPEC: + case SIOCGDRVSPEC: + /* Accepted commands */ + break; + case SIOCGPRIVATE_0: + /* + * Although we do not support this ioctl command, it's expected + * that iflib will forward it to the IFDI_PRIV_IOCTL handler. + * Do not print a message in this case. + */ + return (ENOTSUP); + default: + /* + * If we get a different command for this function, it's + * definitely unexpected, so log a message indicating what + * command we got for debugging purposes. + */ + device_printf(dev, + "%s: unexpected ioctl command %08lx\n", + __func__, command); + return (EINVAL); + } + + ifd = (struct ifdrv *)data; + + switch (ifd->ifd_cmd) { + case IXGBE_NVM_ACCESS: + IOCTL_DEBUGOUT("ioctl: NVM ACCESS"); + return (ixgbe_nvm_access_ioctl(sc, ifd)); + case IXGBE_DEBUG_DUMP: + IOCTL_DEBUGOUT("ioctl: DEBUG DUMP"); + return (ixgbe_debug_dump_ioctl(sc, ifd)); + default: + IOCTL_DEBUGOUT1( + "ioctl: UNKNOWN SIOC(S|G)DRVSPEC (0x%X) command\n", + (int)ifd->ifd_cmd); + return (EINVAL); + } + + return (0); +} + +/************************************************************************ + * ixgbe_nvm_access_ioctl + * + * Handles an NVM access ioctl request + ************************************************************************/ +static int +ixgbe_nvm_access_ioctl(struct ixgbe_softc *sc, struct ifdrv *ifd) +{ + struct ixgbe_nvm_access_data *data; + struct ixgbe_nvm_access_cmd *cmd; + struct ixgbe_hw *hw = &sc->hw; + size_t ifd_len = ifd->ifd_len; + size_t malloc_len; + device_t dev = sc->dev; + u8 *nvm_buffer; + s32 error = 0; + + /* + * ifioctl forwards SIOCxDRVSPEC to iflib without conducting + * a privilege check. Subsequently, iflib passes the ioctl to the driver + * without verifying privileges. To prevent non-privileged threads from + * accessing this interface, perform a privilege check at this point. + */ + error = priv_check(curthread, PRIV_DRIVER); + if (error) + return (error); + + if (ifd_len < sizeof(*cmd)) { + device_printf(dev, + "%s: ifdrv length is too small. Got %zu, " + "but expected %zu\n", + __func__, ifd_len, sizeof(*cmd)); + return (EINVAL); + } + + if (ifd->ifd_data == NULL) { + device_printf(dev, "%s: No ifd data buffer.\n", + __func__); + return (EINVAL); + } + + malloc_len = max(ifd_len, sizeof(*data) + sizeof(*cmd)); + + nvm_buffer = (u8 *)malloc(malloc_len, M_IXGBE, M_ZERO | M_NOWAIT); + if (!nvm_buffer) + return (ENOMEM); + + /* Copy the NVM access command and data in from user space */ + error = copyin(ifd->ifd_data, nvm_buffer, ifd_len); + if (error) { + device_printf(dev, "%s: Failed to copy data in, error: %d\n", + __func__, error); + goto cleanup_free_nvm_buffer; + } + + /* + * The NVM command structure is immediately followed by data which + * varies in size based on the command. + */ + cmd = (struct ixgbe_nvm_access_cmd *)nvm_buffer; + data = (struct ixgbe_nvm_access_data *) + (nvm_buffer + sizeof(struct ixgbe_nvm_access_cmd)); + + /* Handle the NVM access request */ + error = ixgbe_handle_nvm_access(hw, cmd, data); + if (error) { + device_printf(dev, "%s: NVM access request failed, error %d\n", + __func__, error); + } + + /* Copy the possibly modified contents of the handled request out */ + error = copyout(nvm_buffer, ifd->ifd_data, ifd_len); + if (error) { + device_printf(dev, "%s: Copying response back to " + "user space failed, error %d\n", + __func__, error); + goto cleanup_free_nvm_buffer; + } + +cleanup_free_nvm_buffer: + free(nvm_buffer, M_IXGBE); + return (error); +} + +/************************************************************************ + * ixgbe_debug_dump_ioctl + * + * Makes debug dump of internal FW/HW data. + ************************************************************************/ +static int +ixgbe_debug_dump_ioctl(struct ixgbe_softc *sc, struct ifdrv *ifd) +{ + struct ixgbe_debug_dump_cmd *dd_cmd; + struct ixgbe_hw *hw = &sc->hw; + size_t ifd_len = ifd->ifd_len; + device_t dev = sc->dev; + s32 error = 0; + + if (!(sc->feat_en & IXGBE_FEATURE_DBG_DUMP)) + return (ENODEV); + + /* Data returned from ACI command */ + u16 ret_buf_size = 0; + u16 ret_next_cluster = 0; + u16 ret_next_table = 0; + u32 ret_next_index = 0; + + /* + * ifioctl forwards SIOCxDRVSPEC to iflib without conducting + * a privilege check. Subsequently, iflib passes the ioctl to the driver + * without verifying privileges. To prevent non-privileged threads from + * accessing this interface, perform a privilege check at this point. + */ + error = priv_check(curthread, PRIV_DRIVER); + if (error) + return (error); + + if (ifd_len < sizeof(*dd_cmd)) { + device_printf(dev, + "%s: ifdrv length is too small. Got %zu, " + "but expected %zu\n", + __func__, ifd_len, sizeof(*dd_cmd)); + return (EINVAL); + } + + if (ifd->ifd_data == NULL) { + device_printf(dev, "%s: No ifd data buffer.\n", + __func__); + return (EINVAL); + } + + dd_cmd = (struct ixgbe_debug_dump_cmd *)malloc(ifd_len, M_IXGBE, + M_NOWAIT | M_ZERO); + if (!dd_cmd) { + error = -ENOMEM; + goto out; + } + /* copy data from userspace */ + error = copyin(ifd->ifd_data, dd_cmd, ifd_len); + if (error) { + device_printf(dev, "%s: Failed to copy data in, error: %d\n", + __func__, error); + goto out; + } + + /* ACI command requires buf_size arg to be grater than 0 */ + if (dd_cmd->data_size == 0) { + device_printf(dev, "%s: data_size must be greater than 0\n", + __func__); + error = EINVAL; + goto out; + } + + /* Zero the data buffer memory space */ + memset(dd_cmd->data, 0, ifd_len - sizeof(*dd_cmd)); + + error = ixgbe_aci_get_internal_data(hw, dd_cmd->cluster_id, + dd_cmd->table_id, dd_cmd->offset, dd_cmd->data, dd_cmd->data_size, + &ret_buf_size, &ret_next_cluster, &ret_next_table, &ret_next_index); + if (error) { + device_printf(dev, + "%s: Failed to get internal FW/HW data, error: %d\n", + __func__, error); + goto out; + } + + dd_cmd->cluster_id = ret_next_cluster; + dd_cmd->table_id = ret_next_table; + dd_cmd->offset = ret_next_index; + dd_cmd->data_size = ret_buf_size; + + error = copyout(dd_cmd, ifd->ifd_data, ifd->ifd_len); + if (error) { + device_printf(dev, + "%s: Failed to copy data out, error: %d\n", + __func__, error); + } + +out: + free(dd_cmd, M_IXGBE); + + return (error); +} + /************************************************************************ * ixgbe_add_media_types ************************************************************************/ @@ -2884,6 +3141,264 @@ ixgbe_sysctl_interrupt_rate_handler(SYSCTL_HANDLER_ARGS) return (0); } /* ixgbe_sysctl_interrupt_rate_handler */ +/************************************************************************ + * ixgbe_debug_dump_print_cluster + ************************************************************************/ +static u8 +ixgbe_debug_dump_print_cluster(struct ixgbe_softc *sc, struct sbuf *sbuf, + u8 cluster_id) +{ + u16 data_buf_size = IXGBE_ACI_MAX_BUFFER_SIZE; + device_t dev = sc->dev; + struct ixgbe_hw *hw = &sc->hw; + const u8 reserved_buf[8] = {}; + int max_aci_calls = 1000; + int error, counter = 0; + u8 *data_buf; + + /* Input parameters / loop variables */ + u16 table_id = 0; + u32 offset = 0; + + /* Data returned from ACI command */ + u16 ret_buf_size = 0; + u16 ret_next_cluster = 0; + u16 ret_next_table = 0; + u32 ret_next_index = 0; + + data_buf = (u8 *)malloc(data_buf_size, M_IXGBE, M_NOWAIT | M_ZERO); + if (!data_buf) + return (0); + + DEBUGOUT2("%s: dumping cluster id (relative) %d\n", + __func__, cluster_id); + + do { + DEBUGOUT3("table_id 0x%04x offset 0x%08x buf_size %d\n", + table_id, offset, data_buf_size); + + error = ixgbe_aci_get_internal_data(hw, cluster_id, table_id, + offset, data_buf, data_buf_size, &ret_buf_size, + &ret_next_cluster, &ret_next_table, &ret_next_index); + if (error) { + device_printf(dev, + "%s: Failed to get internal FW/HW data, error: %d, " + "last aci status: %d\n", + __func__, error, hw->aci.last_status); + break; + } + + DEBUGOUT3("ret_table_id 0x%04x ret_offset 0x%08x " + "ret_buf_size %d\n", + ret_next_table, ret_next_index, ret_buf_size); + + /* Print cluster id */ + u32 print_cluster_id = (u32)cluster_id; + sbuf_bcat(sbuf, &print_cluster_id, sizeof(print_cluster_id)); + /* Print table id */ + u32 print_table_id = (u32)table_id; + sbuf_bcat(sbuf, &print_table_id, sizeof(print_table_id)); + /* Print table length */ + u32 print_table_length = (u32)ret_buf_size; + sbuf_bcat(sbuf, &print_table_length, + sizeof(print_table_length)); + /* Print current offset */ + u32 print_curr_offset = offset; + sbuf_bcat(sbuf, &print_curr_offset, sizeof(print_curr_offset)); + /* Print reserved bytes */ + sbuf_bcat(sbuf, reserved_buf, sizeof(reserved_buf)); + /* Print data */ + sbuf_bcat(sbuf, data_buf, ret_buf_size); + + /* Prepare for the next loop spin */ + memset(data_buf, 0, data_buf_size); + + bool last_index = (ret_next_index == 0xffffffff); + bool last_table = ((ret_next_table == 0xff || + ret_next_table == 0xffff) && + last_index); + + if (last_table) { + /* End of the cluster */ + DEBUGOUT1("End of the cluster ID %d\n", cluster_id); + break; + } else if (last_index) { + /* End of the table */ + table_id = ret_next_table; + offset = 0; + } else { + /* More data left in the table */ + offset = ret_next_index; + } + } while (++counter < max_aci_calls); + + if (counter >= max_aci_calls) + device_printf(dev, "Exceeded nr of ACI calls for cluster %d\n", + cluster_id); + + free(data_buf, M_IXGBE); + + return (++cluster_id); +} /* ixgbe_print_debug_dump_cluster */ + +/************************************************************************ + * ixgbe_sysctl_debug_dump_set_clusters + * + * Sets the cluster to dump from FW when Debug Dump requested. + ************************************************************************/ +static int +ixgbe_sysctl_debug_dump_set_clusters(SYSCTL_HANDLER_ARGS) +{ + struct ixgbe_softc *sc = (struct ixgbe_softc *)arg1; + u32 clusters = sc->debug_dump_cluster_mask; + device_t dev = sc->dev; + int error; + + error = sysctl_handle_32(oidp, &clusters, 0, req); + if ((error) || !req->newptr) + return (error); + + if (clusters & ~(IXGBE_DBG_DUMP_VALID_CLUSTERS_MASK)) { + device_printf(dev, + "%s: Unrecognized parameter: %u\n", + __func__, clusters); + sc->debug_dump_cluster_mask = + IXGBE_ACI_DBG_DUMP_CLUSTER_ID_INVALID; + return (EINVAL); + } + + sc->debug_dump_cluster_mask = clusters; + + return (0); +} /* ixgbe_sysctl_debug_dump_set_clusters */ + +/************************************************************************ + * ixgbe_sysctl_dump_debug_dump + ************************************************************************/ +static int +ixgbe_sysctl_dump_debug_dump(SYSCTL_HANDLER_ARGS) +{ + struct ixgbe_softc *sc = (struct ixgbe_softc *)arg1; + device_t dev = sc->dev; + struct sbuf *sbuf; + int error = 0; + + UNREFERENCED_PARAMETER(arg2); + + if (!sc->do_debug_dump) { + if (req->oldptr == NULL && req->newptr == NULL) { + error = SYSCTL_OUT(req, 0, 0); + return (error); + } + + char input_buf[2] = ""; + error = sysctl_handle_string(oidp, input_buf, + sizeof(input_buf), req); + if ((error) || (req->newptr == NULL)) + return (error); + + if (input_buf[0] == '1') { + if (sc->debug_dump_cluster_mask == + IXGBE_ACI_DBG_DUMP_CLUSTER_ID_INVALID) { + device_printf(dev, + "Debug Dump failed because an invalid " + "cluster was specified.\n"); + return (EINVAL); + } + + sc->do_debug_dump = true; + return (0); + } + + return (EINVAL); + } + + /* Caller just wants the upper bound for size */ + if (req->oldptr == NULL && req->newptr == NULL) { + size_t est_output_len = IXGBE_DBG_DUMP_BASE_SIZE; + if (sc->debug_dump_cluster_mask & 0x2) + est_output_len += IXGBE_DBG_DUMP_BASE_SIZE; + error = SYSCTL_OUT(req, 0, est_output_len); + return (error); + } + + sbuf = sbuf_new_for_sysctl(NULL, NULL, 128, req); + sbuf_clear_flags(sbuf, SBUF_INCLUDENUL); + + DEBUGOUT("FW Debug Dump running...\n"); + + if (sc->debug_dump_cluster_mask) { + for (u8 id = 0; id <= IXGBE_ACI_DBG_DUMP_CLUSTER_ID_MAX; id++) { + if (sc->debug_dump_cluster_mask & BIT(id)) { + DEBUGOUT1("Dumping cluster ID %u...\n", id); + ixgbe_debug_dump_print_cluster(sc, sbuf, id); + } + } + } else { + u8 next_cluster_id = 0; + do { + DEBUGOUT1("Dumping cluster ID %u...\n", + next_cluster_id); + next_cluster_id = ixgbe_debug_dump_print_cluster(sc, + sbuf, next_cluster_id); + } while (next_cluster_id != 0 && + next_cluster_id <= IXGBE_ACI_DBG_DUMP_CLUSTER_ID_MAX); + } + + sbuf_finish(sbuf); + sbuf_delete(sbuf); + + sc->do_debug_dump = false; + + return (error); +} /* ixgbe_sysctl_dump_debug_dump */ + +/************************************************************************ + * ixgbe_add_debug_dump_sysctls + ************************************************************************/ +static void +ixgbe_add_debug_dump_sysctls(struct ixgbe_softc *sc) +{ + struct sysctl_oid_list *debug_list, *dump_list; + struct sysctl_oid *dump_node; + struct sysctl_ctx_list *ctx; + device_t dev = sc->dev; + + ctx = device_get_sysctl_ctx(dev); + debug_list = SYSCTL_CHILDREN(sc->debug_sysctls); + + dump_node = SYSCTL_ADD_NODE(ctx, debug_list, OID_AUTO, "dump", + CTLFLAG_RD, NULL, "Internal FW/HW Dump"); + dump_list = SYSCTL_CHILDREN(dump_node); + + SYSCTL_ADD_PROC(ctx, dump_list, OID_AUTO, "clusters", + CTLTYPE_U32 | CTLFLAG_RW, sc, 0, + ixgbe_sysctl_debug_dump_set_clusters, "SU", + IXGBE_SYSCTL_DESC_DEBUG_DUMP_SET_CLUSTER); + + SYSCTL_ADD_PROC(ctx, dump_list, OID_AUTO, "dump", + CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_MPSAFE, sc, 0, + ixgbe_sysctl_dump_debug_dump, "", + IXGBE_SYSCTL_DESC_DUMP_DEBUG_DUMP); +} /* ixgbe_add_debug_dump_sysctls */ + +static void +ixgbe_add_debug_sysctls(struct ixgbe_softc *sc) +{ + struct sysctl_oid_list *ctx_list; + struct sysctl_ctx_list *ctx; + device_t dev = sc->dev; + + ctx = device_get_sysctl_ctx(dev); + ctx_list = SYSCTL_CHILDREN(device_get_sysctl_tree(dev)); + + sc->debug_sysctls = SYSCTL_ADD_NODE(ctx, ctx_list, OID_AUTO, "debug", + CTLFLAG_RD, NULL, "Debug Sysctls"); + + if (sc->feat_en & IXGBE_FEATURE_DBG_DUMP) + ixgbe_add_debug_dump_sysctls(sc); +} /* ixgbe_add_debug_sysctls */ + /************************************************************************ * ixgbe_add_device_sysctls ************************************************************************/ @@ -2994,6 +3509,8 @@ ixgbe_add_device_sysctls(if_ctx_t ctx) CTLTYPE_INT | CTLFLAG_RW, sc, 0, ixgbe_sysctl_eee_state, "I", "EEE Power Save State"); } + + ixgbe_add_debug_sysctls(sc); } /* ixgbe_add_device_sysctls */ /************************************************************************ @@ -5184,6 +5701,7 @@ ixgbe_init_device_features(struct ixgbe_softc *sc) break; case ixgbe_mac_E610: sc->feat_cap |= IXGBE_FEATURE_RECOVERY_MODE; + sc->feat_cap |= IXGBE_FEATURE_DBG_DUMP; break; default: break; @@ -5205,6 +5723,9 @@ ixgbe_init_device_features(struct ixgbe_softc *sc) /* Recovery mode */ if (sc->feat_cap & IXGBE_FEATURE_RECOVERY_MODE) sc->feat_en |= IXGBE_FEATURE_RECOVERY_MODE; + /* FW Debug Dump */ + if (sc->feat_cap & IXGBE_FEATURE_DBG_DUMP) + sc->feat_en |= IXGBE_FEATURE_DBG_DUMP; /* Enabled via global sysctl... */ /* Flow Director */ diff --git a/sys/dev/ixgbe/ixgbe.h b/sys/dev/ixgbe/ixgbe.h index 844064bf8543..624b71acabea 100644 --- a/sys/dev/ixgbe/ixgbe.h +++ b/sys/dev/ixgbe/ixgbe.h @@ -46,6 +46,7 @@ #include #include #include +#include #include #include @@ -475,6 +476,20 @@ struct ixgbe_softc { u32 feat_cap; u32 feat_en; u16 lse_mask; + + struct sysctl_oid *debug_sysctls; + u32 debug_dump_cluster_mask; + bool do_debug_dump; +}; + +struct ixgbe_debug_dump_cmd { + u32 offset; /* offset to read/write from table, in bytes */ + u8 cluster_id; /* also used to get next cluster id */ + u16 table_id; + u16 data_size; /* size of data field, in bytes */ + u16 reserved1; + u32 reserved2; + u8 data[]; }; /* Precision Time Sync (IEEE 1588) defines */ @@ -499,6 +514,43 @@ struct ixgbe_softc { #define IXGBE_PHY_CURRENT_TEMP 0xC820 #define IXGBE_PHY_OVERTEMP_STATUS 0xC830 +/** + * The ioctl command number used by NVM update for accessing the driver for + * NVM access commands. + */ +#define IXGBE_NVM_ACCESS \ + (((((((('E' << 4) + '1') << 4) + 'K') << 4) + 'G') << 4) | 5) + +/* + * The ioctl command number used by a userspace tool for accessing the driver + * for getting debug dump data from the firmware. + */ +#define IXGBE_DEBUG_DUMP \ + (((((((('E' << 4) + '1') << 4) + 'K') << 4) + 'G') << 4) | 6) + +/* Debug Dump related definitions */ +#define IXGBE_ACI_DBG_DUMP_CLUSTER_ID_INVALID 0xFFFFFF +#define IXGBE_ACI_DBG_DUMP_CLUSTER_ID_BASE 50 +#define IXGBE_ACI_DBG_DUMP_CLUSTER_ID_MAX 1 + +#define IXGBE_DBG_DUMP_VALID_CLUSTERS_MASK 0x3 +#define IXGBE_DBG_DUMP_BASE_SIZE (2 * 1024 * 1024) + +#define IXGBE_SYSCTL_DESC_DEBUG_DUMP_SET_CLUSTER \ +"\nSelect clusters to dump with \"dump\" sysctl" \ +"\nFlags:" \ +"\n\t 0x1 - Link" \ +"\n\t 0x2 - Full CSR Space, excluding RCW registers" \ +"\n\t" \ +"\nUse \"sysctl -x\" to view flags properly." + +#define IXGBE_SYSCTL_DESC_DUMP_DEBUG_DUMP \ +"\nWrite 1 to output a FW debug dump containing the clusters " \ +"specified by the \"clusters\" sysctl" \ +"\nThe \"-b\" flag must be used in order to dump this data " \ +"as binary data because" \ +"\nthis data is opaque and not a string." + /* Sysctl help messages; displayed with sysctl -d */ #define IXGBE_SYSCTL_DESC_ADV_SPEED \ "\nControl advertised link speed using these flags:\n" \ diff --git a/sys/dev/ixgbe/ixgbe_features.h b/sys/dev/ixgbe/ixgbe_features.h index 0cef334a185f..bee9040319d8 100644 --- a/sys/dev/ixgbe/ixgbe_features.h +++ b/sys/dev/ixgbe/ixgbe_features.h @@ -57,6 +57,7 @@ #define IXGBE_FEATURE_LEGACY_IRQ (u32)(1 << 12) #define IXGBE_FEATURE_NEEDS_CTXD (u32)(1 << 13) #define IXGBE_FEATURE_RECOVERY_MODE (u32)(1 << 15) +#define IXGBE_FEATURE_DBG_DUMP (u32)(1 << 16) /* Check for OS support. Undefine features if not included in the OS */ #ifndef PCI_IOV From nobody Fri Nov 28 22:00:06 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dJ6fb2WZ0z6Hdy3 for ; Fri, 28 Nov 2025 22:00:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dJ6fb0Z6Qz3kT7 for ; Fri, 28 Nov 2025 22:00:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764367207; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uAtmIERrGJmAtzD7MFpH235v35CADmD6EKd/rPAtkHo=; b=T6Y6mXFRLdahw7ePGVKt5WBoxm52eiX1ZIMEGLARUco5o4ujny1I0sF9EUgtO1o+AeGNII g/6vcSd8nm5iN5Bmko1HMCoYFoNTY1scXxxV+56Qy+PXyo2JxMh0Tt2/h84KDMg5WhR7SX La2R6nUuksH/iFgUEM+nJGmI11Z8o9gR3zR+6BL2mm+Ff1Z0VaRfKCqbpu7A9HnDnnQsKK 0wSD9Gy89tSmjPAHo8zLqv2bF/R8n3pPtWAqA/t3ZiPs1XIxR4+pkO0M48VnExSycpSNTa LTS669AWbOueunbEVOKndxJtSanEAjVA0hq/0/fsIVIRVYNRYxEoJMctbkuVlg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764367207; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uAtmIERrGJmAtzD7MFpH235v35CADmD6EKd/rPAtkHo=; b=aIsVFuPqt/N3+/7KPbFRMw4ce2+XFFUWoWWyFLwdC16Ai/U3z492kvN5nVTbkvfPPkyNpH A8iEmy3TFCa5vr1iFhJ+I14umaBa6S7AjdDCgzYPmJlKSsw+ZajKyBXdojtVzmWZQiBUAM fNFzG+6vePs7z8i8wRlTuMB7FHDXdT4cMmadjwSevdidSgjvXd/f9UxLkAVsoezxdtJ75v Y+Kf9GB7YZm1ESD0DAKLr591kv9j7vkItXJTWUzjMuYKNznF383OwhEvxcybBUb1PwauJB imknBQQPJOsqO2GgDRoO1lJQv8GnAk8yyakfgREmgugIbf2YU1L/b/2McTDDFQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764367207; a=rsa-sha256; cv=none; b=VAtW0xMGxYutmfRMTck5Yl350nfO++LUA9WL6+EdUMDO+DW7fM0RyGsmyMLuG7FGTjCAIX cAeqN6eAlARO5ZD+aNmSDqDFrxfahPpzp4UtG02VCROkGe/aaLVkEBtr/mZGEraH6bt4Rw TFoBId1I32f/JpDWtOz0NBD7RKQJz8K6Lssv+mwZkRg9Q79hSFUFysPgfDMhxNXdXs/bhL xfGQXN+6JP9Wue6lC/tQLAZxkwir+OcsRteOZxzCXqjkfWAezB+qB6FpUJP6x5ryPi2ALt pjV6JSJUBpP2IcbksO15d9cVujcCp1E5CX9nUoIHjYb6yQ8i4BQP9A7feEs+zA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dJ6fZ6SRfz4h0 for ; Fri, 28 Nov 2025 22:00:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 36db9 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 28 Nov 2025 22:00:06 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Robert Clausecker Subject: git: 233ddc56a7ed - main - unreachable.3: add missing brace in example List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: fuz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 233ddc56a7ed222ea8903479cd3ae9df044b990a Auto-Submitted: auto-generated Date: Fri, 28 Nov 2025 22:00:06 +0000 Message-Id: <692a1b66.36db9.3cb29033@gitrepo.freebsd.org> The branch main has been updated by fuz: URL: https://cgit.FreeBSD.org/src/commit/?id=233ddc56a7ed222ea8903479cd3ae9df044b990a commit 233ddc56a7ed222ea8903479cd3ae9df044b990a Author: Robert Clausecker AuthorDate: 2025-11-28 20:45:00 +0000 Commit: Robert Clausecker CommitDate: 2025-11-28 21:59:30 +0000 unreachable.3: add missing brace in example Reported by: alc Approved by: markj (mentor) MFC after: 1 month Fixes: b381d0980221b476cadbef862a8e5973d675fb7a See also: D53967 --- share/man/man3/unreachable.3 | 1 + 1 file changed, 1 insertion(+) diff --git a/share/man/man3/unreachable.3 b/share/man/man3/unreachable.3 index 8a1c2d142578..9dd7da806d42 100644 --- a/share/man/man3/unreachable.3 +++ b/share/man/man3/unreachable.3 @@ -61,6 +61,7 @@ void print_classification(double x) default: unreachable(); + } } .Ed .Sh SEE ALSO From nobody Sat Nov 29 00:13:50 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dJ9ct3fqSz6HvLJ for ; Sat, 29 Nov 2025 00:13:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dJ9ct2c5Bz3xG5 for ; Sat, 29 Nov 2025 00:13:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764375230; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iAU7BxEUZJYQ+wDqnO/33fX0o2vdRcGCWYkoHnlc11Q=; b=jJgeC883o0h2+hCWHmeLY/4FRDrrSiExQrootlKV/WddqSRPSD+5t2wnACsxO+36VD/Xzj psDrIn4/VUT5m2Kl6gDX2YBMRqQ946Zjau04sLSso5CHq3BWmIfItwrA0YFIiyiR3sqQXS 7OXb/i2SpBXxt5hF09zavvDRBTVpJZUYLJqihW9vV+Gqo5NOXtCIWEAOW0jnegAxNXwpNB SMVCJySgLNNBTUSOZEa5Xj2Zu8te6IO11mYMfct5efr/8mnMEG/AjmVyvNjjRZ/hVYC6Kp ZfmCoAZQM9CSvbS/741sc2WA2mIAkjq10APTMKyzf9NsBJSIstEXQ7v/wGrfSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764375230; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iAU7BxEUZJYQ+wDqnO/33fX0o2vdRcGCWYkoHnlc11Q=; b=gBwmUlDUtjoKk4yXiexHeDiSFRj8ZIQ6Xo0DlnLa/1bvTEXtoZcFlmybEWWhgknN2ntO8p CIxG14k4fDHem1OeXFy+GPQ5PGa3WhvN6LY/ro6B/PtBkVzamxWk1c7RK9eVImfzM1sgi8 BrFdzytcTHjCmdaa0huiT4GECb1TjcuCM2ovwNPPnFdo80MseTx6hlF03DOywoEQJxKHCp Tcvk+n7hQnZfavRte3PUlJ6EQbC5odowdohAixS0MrxDk8yA5QKLWbfDe2rW0YezBHLQKg XuKut2vdMkF4kTDPwKOdJMpHrjVFSvHpqmpKPZNchjFLLW5Mw80TemjZjO5A4A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764375230; a=rsa-sha256; cv=none; b=o5u83gd8NiXm4zjc9f+jMr63Z6EQpEgFVwIwzq6YVRoWeoHDR6Gsdc+mvHpg6aiBFg0bUK rEFPxaCbKAKjpjlCcwzMCdY89ZFJG6vYnrSi9tWe+y9QPg8HECrWuLYjfxG9MqJ/nBoggl 20FXGs6KU/VR45846Dg/EhXfEL7dbNoZAaJtJ8qd4+YubTOOp865kqczojyMJyYjmu1hHg 3czK2n93Y/kunUzjuDeGeDdtaxwXPTTpvmDLb5w3OWqEy8lyntl1xhHiByHkQO3HfMsY6Q K/vDVffIxdosKJGX1ZtuB2VGCPqUASGsoHznOvw2cJwxDc6Pj12jqtrebCveUg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dJ9ct2CrVz8l8 for ; Sat, 29 Nov 2025 00:13:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id c42b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 29 Nov 2025 00:13:50 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jose Luis Duran Subject: git: 3d91a746380e - main - mtree: Keep mtree files indented with spaces List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3d91a746380e81c2089d8beaae28438867ae6dbf Auto-Submitted: auto-generated Date: Sat, 29 Nov 2025 00:13:50 +0000 Message-Id: <692a3abe.c42b.26a13b07@gitrepo.freebsd.org> The branch main has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=3d91a746380e81c2089d8beaae28438867ae6dbf commit 3d91a746380e81c2089d8beaae28438867ae6dbf Author: Jose Luis Duran AuthorDate: 2025-11-29 00:12:39 +0000 Commit: Jose Luis Duran CommitDate: 2025-11-29 00:12:39 +0000 mtree: Keep mtree files indented with spaces The mtree tool indents directory entries with 4 spaces. Reviewed by: imp Fixes: 9cab9fde5eda ("virtual_oss: Port to base") MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D53979 --- etc/mtree/BSD.lib32.dist | 4 ++-- etc/mtree/BSD.usr.dist | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/etc/mtree/BSD.lib32.dist b/etc/mtree/BSD.lib32.dist index 6520b7b95116..8a3fe9a34714 100644 --- a/etc/mtree/BSD.lib32.dist +++ b/etc/mtree/BSD.lib32.dist @@ -21,7 +21,7 @@ .. pkgconfig .. - virtual_oss - .. + virtual_oss + .. .. .. diff --git a/etc/mtree/BSD.usr.dist b/etc/mtree/BSD.usr.dist index 9cb8e57650c6..d1b4a6fdfef9 100644 --- a/etc/mtree/BSD.usr.dist +++ b/etc/mtree/BSD.usr.dist @@ -103,8 +103,8 @@ .. ossl-modules .. - virtual_oss - .. + virtual_oss + .. .. libdata ldscripts From nobody Sat Nov 29 00:35:42 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dJB664bZlz6HxL0 for ; Sat, 29 Nov 2025 00:35:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dJB662NtMz40jr for ; Sat, 29 Nov 2025 00: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=1764376542; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xO+m2PwEbLpsC/7ryMeQvBbSvQnI23DxQhb7YV/aEWY=; b=i7KERvZOl9j5/PmyvcnNh10j6GEPsUfAm5WJw5D3yA+QJ3YBLcnGqEEjlTWj3Op/Yc+3pb In+fMQpigLwA4cwx7leq9Uk8FoA7KLXEhl4zy2g5nD08vaE4lHXWFeChVBhWmndB0NceHK ynQkTDnHgrbOK3OumshvQWEYXkEMLv2nR9bGN82T68ByLO6pFhHokCY7VEVHl8hLuXUz6A 9QEcY7jnwNfb/QMzNJsw81SDQIhzqBBmFoqFmcKqjWXCxGV7dikDyqFM5k59AdL5WITuYF TdWYkfl0g2pNa+HWipJ4KNbtPPaT5uPGGi2D6s8MHxG0bhgkjwOvIXKoRkT82w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764376542; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xO+m2PwEbLpsC/7ryMeQvBbSvQnI23DxQhb7YV/aEWY=; b=NX3MvBqg1Kyjhh99/k7XvegoNQoVGnnQYguMFfEXPwr0ZcRL0LceZIRjdg60DOipIoWuxM Plkzh7fTY863co/t2sTSckvU7xuiwFrbwo97rIvtI194EfaHFLevD4q7h/ZGf+cwzLGqfX oamdd6W75jrMMRlw1jpdu7nkYnQeeU2CNC5fQLne546Z4mj9MLehbf4rdj608VgDe1jd29 o4KZebwT73mCOIxzdoLxwd1uQ8D2qUigKn9uJ+qtH5EanXxldNWsaWdX9eR1zfmw1Fl8NS O5kKRR5w4ewa8K4My8oSSn9qg70DikiMdNObZPjqr+XbhMRfGyAkFzVtJZALxw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764376542; a=rsa-sha256; cv=none; b=U2clyVh2oiWvfOpg5nnSwAJsChvBNRtaHHtQJ+Y1OJ+Kfiegspe7w81gjK4z3gy9aYvs4u 4zaANcUKyoMYevPrBj57Kb9ewzmXUSU+20M3vQXM9nkNAHhx2hmM3phQdiDaRPmZgfhRHY KTVmdDe6nxiFVDdaLaZ99inA1+/Bz8kUXt0YWPJJJR3SDxkEbVUtwIVr37a1bw2QaxLici Sp3OU9Xd5jRLlmWv0k0aPzrFPmL0RBIAKIhCz6OU30YrNTJcHx3aByy7UYtQ1mh5vinWD0 FTv4ifn3tzWKGDEW88bvf+lMp7+iRoVW+b7uejVW/AIHWNs225wse9P2gVKZXg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dJB661tXkz98s for ; Sat, 29 Nov 2025 00:35:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id ce53 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 29 Nov 2025 00:35:42 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Jose Luis Duran Subject: git: 6bda3655b827 - stable/15 - beep: Sort usage and man page options List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 6bda3655b8272aa9fd1301df3346aca4d5b0d39c Auto-Submitted: auto-generated Date: Sat, 29 Nov 2025 00:35:42 +0000 Message-Id: <692a3fde.ce53.1d0b82fa@gitrepo.freebsd.org> The branch stable/15 has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=6bda3655b8272aa9fd1301df3346aca4d5b0d39c commit 6bda3655b8272aa9fd1301df3346aca4d5b0d39c Author: Jose Luis Duran AuthorDate: 2025-11-19 15:59:25 +0000 Commit: Jose Luis Duran CommitDate: 2025-11-29 00:30:21 +0000 beep: Sort usage and man page options Sort usage and man page options, mention possible minimum and maximum values, fix punctuation marks, and cleanup the man page. PR: 291092 Reviewed by: pauamma_gundo.com, christos MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D53827 (cherry picked from commit 55d98b024f25403f60efe04f90a391014b6bc388) --- usr.bin/beep/beep.1 | 55 ++++++++++++++++++++++++++++------------------------- usr.bin/beep/beep.c | 19 +++++++++--------- 2 files changed, 39 insertions(+), 35 deletions(-) diff --git a/usr.bin/beep/beep.1 b/usr.bin/beep/beep.1 index 732f2ae261cd..a13d220a7882 100644 --- a/usr.bin/beep/beep.1 +++ b/usr.bin/beep/beep.1 @@ -21,53 +21,55 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd November 4, 2021 -.Dt beep 1 +.Dd November 19, 2025 +.Dt BEEP 1 .Os .Sh NAME .Nm beep .Nd play a beep sound .Sh SYNOPSIS .Nm -.Op Fl F Ar frequency +.Op Fl Bh .Op Fl D Ar duration_ms -.Op Fl r Ar sample_rate_hz +.Op Fl F Ar frequency_hz .Op Fl d Ar oss_device .Op Fl g Ar gain -.Op Fl B -.Op Fl h +.Op Fl r Ar sample_rate_hz .Sh DESCRIPTION The .Nm -utility is used to playback a beep on the soundcard. +utility is used to play a beep on the sound card. .Pp The options are as follows: -.Bl -tag -width "-f device" -.It Fl F -Sets the center frequency of the beep in Hz. -The default is 440 Hz . -.It Fl D -Sets the duration of the beep in milliseconds. -The default is 150 ms . -.It Fl d -Sets the soundcard to use. -The default is /dev/dsp . -.It Fl r -Sets the soundcard samplerate in Hz. -The default is 48000 Hz. -.It Fl g -Sets the waveform gain, between 0 and 100 inclusively. -The default is 75. +.Bl -tag -width "-r sample_rate_hz" .It Fl B Runs the .Nm utility in the background. +.It Fl D Ar duration_ms +Sets the duration of the beep in milliseconds, +between 50\~ms and 2000\~ms inclusively. +The default is 150\~ms. +.It Fl F Ar frequency_hz +Sets the center frequency of the beep in Hz. +The default is 440\~Hz. +.It Fl d Ar oss_device +Sets the OSS device to use. +The default is +.Pa /dev/dsp . +.It Fl g Ar gain +Sets the waveform gain, between 0 and 100 inclusively. +The default is 75. .It Fl h Display summary of options. +.It Fl r Ar sample_rate_hz +Sets the sound card sample rate in Hz, +between 8000\~Hz and 48000\~Hz inclusively. +The default is 48000\~Hz. .El .Sh EXAMPLES -.Pp -Playback default beep sound using /dev/dsp . +Play default beep sound on +.Pa /dev/dsp : .Bl -tag -width Ds -offset indent .It $ beep .El @@ -77,6 +79,7 @@ Playback default beep sound using /dev/dsp . .Sh HISTORY The .Nm -utility first appeared in FreeBSD 14.0. +utility first appeared in +.Fx 14.0 . .Sh AUTHORS .An Hans Petter Selasky Aq Mt hselasky@FreeBSD.org diff --git a/usr.bin/beep/beep.c b/usr.bin/beep/beep.c index 9d274770ad75..d16ad5b699c3 100644 --- a/usr.bin/beep/beep.c +++ b/usr.bin/beep/beep.c @@ -133,20 +133,21 @@ wave_function_16(float phase, float power) static void usage(void) { - fprintf(stderr, "Usage: %s [parameters]\n" - "\t" "-F \n" + fprintf(stderr, "Usage: %s [-Bh] [-D duration_ms] [-F frequency_hz] " + "[-d oss_device] [-g gain] [-r sample_rate_hz]\n" + "\t" "-B Run in background\n" "\t" "-D \n" - "\t" "-r \n" - "\t" "-d \n" + "\t" "-F \n" + "\t" "-d \n" "\t" "-g \n" - "\t" "-B Run in background\n" - "\t" "-h Show usage\n", + "\t" "-h Show usage\n" + "\t" "-r \n", getprogname(), - DEFAULT_HZ, DURATION_MIN, DURATION_MAX, DURATION_DEF, - SAMPLE_RATE_MIN, SAMPLE_RATE_MAX, SAMPLE_RATE_DEF, + DEFAULT_HZ, DEFAULT_DEVICE, - GAIN_MIN, GAIN_MAX, GAIN_DEF); + GAIN_MIN, GAIN_MAX, GAIN_DEF, + SAMPLE_RATE_MIN, SAMPLE_RATE_MAX, SAMPLE_RATE_DEF); exit(1); } From nobody Sat Nov 29 00:36:00 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dJB6T10mBz6HxmH for ; Sat, 29 Nov 2025 00:36:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dJB6S5klrz40nb for ; Sat, 29 Nov 2025 00:36:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764376560; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PJyAMGx1Dg0NiQeJQIf1+IQfe0RdOkVsy4izjRBK5VQ=; b=shQwtcjmYWxv+zF/5O2ljKTyRX0dcsq4YD3xUmRZCkTMgbBkzKPW91F29tHCK+asXV53Lr LPHxK1uYI8e6zvObQG7zhayOAXo/ykSoLzXFho54Mx2QdOVGZWuB9e5anApERRKWOIEF3D fIItTTi6Ni+IifTAaQmr93Lw93aX1tMdW+g8Yl9r0NSb1i221Ik0ScCSZ7n414A+MRsyku pHEo2cpxqElJ2tO04AR8ByBKDKRNRkg0vGe4eBj9pWeG59xR4eeRQCAbVD2WPvshqMQmia /jdR32gc0+gm6jMu4hfXeb4pwtMusaNg6QqJnBo4M9UYL5G5Dm60A5SkQjnxZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764376560; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PJyAMGx1Dg0NiQeJQIf1+IQfe0RdOkVsy4izjRBK5VQ=; b=iSOSlVfx9Siqum10xct0p3go3APA01OwHnwvQjpMIC6c89zAZ3nBrJfRLNPqleVE0suz5+ hZq39rKyC9rmPSLN+xu7KeBtjtSnhXdJ914ggOlgMw04aUQDfC6PVSMRTCq1s3ffetH2Pr T7zr6Lukqrpwg9Pr+d5Xh7oH6V8LHLzHZqbJDaulfMHIK6oj8PJr1+mxWlxGOrTSZa8HGL gO4UPaoyZ2+IP4gKJ9lXTJ0dkq+htemvuOxxX+Cv0xff2OquXRbIFDI+DeyZ1ifEuJPbx2 7uA/T99jIDnvBrBXYajqELA5whHq/f9LjF2a4TZdaaXu+THh2suDmPT+ri9z/w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764376560; a=rsa-sha256; cv=none; b=D2GVvkXr1DmSB1xm5YLTu0ebBdAg0wq4r9YIQJnm1l2W2x70mjHsV1I12/0y9FgYB1M3BX V6EpHTwbAsVN//C5u2Tf65CWSyr3BqzJT5blpCQ9n8jusgBPll4N3TypgESRX2CsMX7qXd U4i76GVMt0TU5nMIh1g86cYl+N0LBq0iqpxpIS1vd9GOdMwCNnHerQSJES4hcW61JpDGtm A85fUFZSvW3QMZETvJpVF5gnNqEcomZzBhhtwrDwCW7T1jAp3HZ2fxm6x4PlRkmpOZkUNi ixGAURBJYndCrt7ka4XOoULFCKF4EWqB4DTNYFzeBNlBEWJ8R+8b2NHNUxINsw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dJB6S5CRyz8m9 for ; Sat, 29 Nov 2025 00:36:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id ddaf by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 29 Nov 2025 00:36:00 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Jose Luis Duran Subject: git: 4c10ec9bd43f - stable/14 - beep: Sort usage and man page options List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 4c10ec9bd43feb86394dc2dc1c16f1c15d4b0285 Auto-Submitted: auto-generated Date: Sat, 29 Nov 2025 00:36:00 +0000 Message-Id: <692a3ff0.ddaf.7a52ab76@gitrepo.freebsd.org> The branch stable/14 has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=4c10ec9bd43feb86394dc2dc1c16f1c15d4b0285 commit 4c10ec9bd43feb86394dc2dc1c16f1c15d4b0285 Author: Jose Luis Duran AuthorDate: 2025-11-19 15:59:25 +0000 Commit: Jose Luis Duran CommitDate: 2025-11-29 00:31:57 +0000 beep: Sort usage and man page options Sort usage and man page options, mention possible minimum and maximum values, fix punctuation marks, and cleanup the man page. PR: 291092 Reviewed by: pauamma_gundo.com, christos MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D53827 (cherry picked from commit 55d98b024f25403f60efe04f90a391014b6bc388) --- usr.bin/beep/beep.1 | 55 ++++++++++++++++++++++++++++------------------------- usr.bin/beep/beep.c | 19 +++++++++--------- 2 files changed, 39 insertions(+), 35 deletions(-) diff --git a/usr.bin/beep/beep.1 b/usr.bin/beep/beep.1 index 732f2ae261cd..a13d220a7882 100644 --- a/usr.bin/beep/beep.1 +++ b/usr.bin/beep/beep.1 @@ -21,53 +21,55 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd November 4, 2021 -.Dt beep 1 +.Dd November 19, 2025 +.Dt BEEP 1 .Os .Sh NAME .Nm beep .Nd play a beep sound .Sh SYNOPSIS .Nm -.Op Fl F Ar frequency +.Op Fl Bh .Op Fl D Ar duration_ms -.Op Fl r Ar sample_rate_hz +.Op Fl F Ar frequency_hz .Op Fl d Ar oss_device .Op Fl g Ar gain -.Op Fl B -.Op Fl h +.Op Fl r Ar sample_rate_hz .Sh DESCRIPTION The .Nm -utility is used to playback a beep on the soundcard. +utility is used to play a beep on the sound card. .Pp The options are as follows: -.Bl -tag -width "-f device" -.It Fl F -Sets the center frequency of the beep in Hz. -The default is 440 Hz . -.It Fl D -Sets the duration of the beep in milliseconds. -The default is 150 ms . -.It Fl d -Sets the soundcard to use. -The default is /dev/dsp . -.It Fl r -Sets the soundcard samplerate in Hz. -The default is 48000 Hz. -.It Fl g -Sets the waveform gain, between 0 and 100 inclusively. -The default is 75. +.Bl -tag -width "-r sample_rate_hz" .It Fl B Runs the .Nm utility in the background. +.It Fl D Ar duration_ms +Sets the duration of the beep in milliseconds, +between 50\~ms and 2000\~ms inclusively. +The default is 150\~ms. +.It Fl F Ar frequency_hz +Sets the center frequency of the beep in Hz. +The default is 440\~Hz. +.It Fl d Ar oss_device +Sets the OSS device to use. +The default is +.Pa /dev/dsp . +.It Fl g Ar gain +Sets the waveform gain, between 0 and 100 inclusively. +The default is 75. .It Fl h Display summary of options. +.It Fl r Ar sample_rate_hz +Sets the sound card sample rate in Hz, +between 8000\~Hz and 48000\~Hz inclusively. +The default is 48000\~Hz. .El .Sh EXAMPLES -.Pp -Playback default beep sound using /dev/dsp . +Play default beep sound on +.Pa /dev/dsp : .Bl -tag -width Ds -offset indent .It $ beep .El @@ -77,6 +79,7 @@ Playback default beep sound using /dev/dsp . .Sh HISTORY The .Nm -utility first appeared in FreeBSD 14.0. +utility first appeared in +.Fx 14.0 . .Sh AUTHORS .An Hans Petter Selasky Aq Mt hselasky@FreeBSD.org diff --git a/usr.bin/beep/beep.c b/usr.bin/beep/beep.c index 9d274770ad75..d16ad5b699c3 100644 --- a/usr.bin/beep/beep.c +++ b/usr.bin/beep/beep.c @@ -133,20 +133,21 @@ wave_function_16(float phase, float power) static void usage(void) { - fprintf(stderr, "Usage: %s [parameters]\n" - "\t" "-F \n" + fprintf(stderr, "Usage: %s [-Bh] [-D duration_ms] [-F frequency_hz] " + "[-d oss_device] [-g gain] [-r sample_rate_hz]\n" + "\t" "-B Run in background\n" "\t" "-D \n" - "\t" "-r \n" - "\t" "-d \n" + "\t" "-F \n" + "\t" "-d \n" "\t" "-g \n" - "\t" "-B Run in background\n" - "\t" "-h Show usage\n", + "\t" "-h Show usage\n" + "\t" "-r \n", getprogname(), - DEFAULT_HZ, DURATION_MIN, DURATION_MAX, DURATION_DEF, - SAMPLE_RATE_MIN, SAMPLE_RATE_MAX, SAMPLE_RATE_DEF, + DEFAULT_HZ, DEFAULT_DEVICE, - GAIN_MIN, GAIN_MAX, GAIN_DEF); + GAIN_MIN, GAIN_MAX, GAIN_DEF, + SAMPLE_RATE_MIN, SAMPLE_RATE_MAX, SAMPLE_RATE_DEF); exit(1); } From nobody Sat Nov 29 00:36:18 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dJB6p72mzz6Hxn5 for ; Sat, 29 Nov 2025 00:36:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dJB6p5Ry1z41PF for ; Sat, 29 Nov 2025 00:36:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764376578; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SK7WT4O+4nRWUq/DJjiNaujLEi2q6lRPAldQXtxgzbE=; b=DmvjwDaT/1RnI1KOvWnwoW/SJrkRPmNoXBBGbv+HrC+0nR8ZkDAp8HzulVTv40c3LqU6xk cBRizuH/FRGZt+60ZWvfrh1vYaFfp3U/eL9fOFPW1llk4lvsSX2MY+LYz5Cf3svk81BUmK LRlhbNW+bVFzN8B+NXvE1UHIKJBMvq72SHg6TqojBQhIr7E9+CiZycly+y/esatlndI9hJ vKScqbQOkv3PNrJeBHoNb8jOz22FDtBzPScYDWqYdU8/BJiZAyBB9JiLKYEn1gNJiZWS0q N5FGrdncyzeDR9irOceAwEJynQ+Ws7Le7WKsCzOYrl0lA9+k1Yf3ScU1Y+OA5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764376578; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SK7WT4O+4nRWUq/DJjiNaujLEi2q6lRPAldQXtxgzbE=; b=PiYoK6v1e/gw47KUSwjXFyZ8oN4Y9z4r4zDfy4+FD1FETQ9xJSFe/D0YjeuYhrCbg1jkTw VwbTWsADpDEI7cokgXANgwuiDhXz2nts5pbK5RoQEshwuUjSNlQXwHLKg1Ml+pzRYuZq+k VmaiqLdP+qeQBvoKydzXhTcwcox5PJP/DNo/8ZMYG9hdtDpTTpCrtmAwok8+9ZnSM6vOKZ a4FNG7ZKc5M1iBfUo9p0aw92CX6Idd8G9Gi5/ITguQHUIgYePItXh2Vxg4YtYDGRl4Nkug HFl/bV2B5shjXPzeJuCOe2r+Hdzi8KPoulgr+T8cb8CEar15gE+iihJjhKe4aA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764376578; a=rsa-sha256; cv=none; b=gEaMKa/lGWK4Nwah8yKn/gRgBgSoJPtDtMrSKeWaWArTm8GYWt5aLwry79fMGhUtLvSo0v v/rz5udZwkUql+0HGf76jbTgmP1pc4JYMilqZ3bhV1IOqyyQ3sQv1pCxq4LAut4bpdnp8Y +/X8/1IDqfbAWZ6bP5SrfJ2zmW15Y505NpmB6P7n6H2LSYE/wrfjyWpawlfq1RK5GxqCfM qSO9++0LB5yBrG+baLCeZBWA2pgb4enla3budN+L3ZNcS6HgJFYY84comJHCYUgWVOMxt2 XuoB1Yt/PO1XqokBFEkUXNZbXlEoapaz2xAjXbLtORyBES1wUc7M5bAQHfYywA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dJB6p514fz9F8 for ; Sat, 29 Nov 2025 00:36:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id df93 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 29 Nov 2025 00:36:18 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Jose Luis Duran Subject: git: 8d338f99f8b1 - stable/13 - beep: Sort usage and man page options List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 8d338f99f8b1dc16d2175721c48201fce117fe43 Auto-Submitted: auto-generated Date: Sat, 29 Nov 2025 00:36:18 +0000 Message-Id: <692a4002.df93.2c462457@gitrepo.freebsd.org> The branch stable/13 has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=8d338f99f8b1dc16d2175721c48201fce117fe43 commit 8d338f99f8b1dc16d2175721c48201fce117fe43 Author: Jose Luis Duran AuthorDate: 2025-11-19 15:59:25 +0000 Commit: Jose Luis Duran CommitDate: 2025-11-29 00:32:36 +0000 beep: Sort usage and man page options Sort usage and man page options, mention possible minimum and maximum values, fix punctuation marks, and cleanup the man page. PR: 291092 Reviewed by: pauamma_gundo.com, christos MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D53827 (cherry picked from commit 55d98b024f25403f60efe04f90a391014b6bc388) --- usr.bin/beep/beep.1 | 55 ++++++++++++++++++++++++++++------------------------- usr.bin/beep/beep.c | 19 +++++++++--------- 2 files changed, 39 insertions(+), 35 deletions(-) diff --git a/usr.bin/beep/beep.1 b/usr.bin/beep/beep.1 index 29988c5b271d..d00ee73795aa 100644 --- a/usr.bin/beep/beep.1 +++ b/usr.bin/beep/beep.1 @@ -21,53 +21,55 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd November 4, 2021 -.Dt beep 1 +.Dd November 19, 2025 +.Dt BEEP 1 .Os .Sh NAME .Nm beep .Nd play a beep sound .Sh SYNOPSIS .Nm -.Op Fl F Ar frequency +.Op Fl Bh .Op Fl D Ar duration_ms -.Op Fl r Ar sample_rate_hz +.Op Fl F Ar frequency_hz .Op Fl d Ar oss_device .Op Fl g Ar gain -.Op Fl B -.Op Fl h +.Op Fl r Ar sample_rate_hz .Sh DESCRIPTION The .Nm -utility is used to playback a beep on the soundcard. +utility is used to play a beep on the sound card. .Pp The options are as follows: -.Bl -tag -width "-f device" -.It Fl F -Sets the center frequency of the beep in Hz. -The default is 440 Hz . -.It Fl D -Sets the duration of the beep in milliseconds. -The default is 150 ms . -.It Fl d -Sets the soundcard to use. -The default is /dev/dsp . -.It Fl r -Sets the soundcard samplerate in Hz. -The default is 48000 Hz. -.It Fl g -Sets the waveform gain, between 0 and 100 inclusively. -The default is 75. +.Bl -tag -width "-r sample_rate_hz" .It Fl B Runs the .Nm utility in the background. +.It Fl D Ar duration_ms +Sets the duration of the beep in milliseconds, +between 50\~ms and 2000\~ms inclusively. +The default is 150\~ms. +.It Fl F Ar frequency_hz +Sets the center frequency of the beep in Hz. +The default is 440\~Hz. +.It Fl d Ar oss_device +Sets the OSS device to use. +The default is +.Pa /dev/dsp . +.It Fl g Ar gain +Sets the waveform gain, between 0 and 100 inclusively. +The default is 75. .It Fl h Display summary of options. +.It Fl r Ar sample_rate_hz +Sets the sound card sample rate in Hz, +between 8000\~Hz and 48000\~Hz inclusively. +The default is 48000\~Hz. .El .Sh EXAMPLES -.Pp -Playback default beep sound using /dev/dsp . +Play default beep sound on +.Pa /dev/dsp : .Bl -tag -width Ds -offset indent .It $ beep .El @@ -77,6 +79,7 @@ Playback default beep sound using /dev/dsp . .Sh HISTORY The .Nm -utility first appeared in FreeBSD 14.0. +utility first appeared in +.Fx 14.0 . .Sh AUTHORS .An Hans Petter Selasky Aq Mt hselasky@FreeBSD.org diff --git a/usr.bin/beep/beep.c b/usr.bin/beep/beep.c index 2696bacfacf4..5b219b4fd406 100644 --- a/usr.bin/beep/beep.c +++ b/usr.bin/beep/beep.c @@ -132,20 +132,21 @@ wave_function_16(float phase, float power) static void usage(void) { - fprintf(stderr, "Usage: %s [parameters]\n" - "\t" "-F \n" + fprintf(stderr, "Usage: %s [-Bh] [-D duration_ms] [-F frequency_hz] " + "[-d oss_device] [-g gain] [-r sample_rate_hz]\n" + "\t" "-B Run in background\n" "\t" "-D \n" - "\t" "-r \n" - "\t" "-d \n" + "\t" "-F \n" + "\t" "-d \n" "\t" "-g \n" - "\t" "-B Run in background\n" - "\t" "-h Show usage\n", + "\t" "-h Show usage\n" + "\t" "-r \n", getprogname(), - DEFAULT_HZ, DURATION_MIN, DURATION_MAX, DURATION_DEF, - SAMPLE_RATE_MIN, SAMPLE_RATE_MAX, SAMPLE_RATE_DEF, + DEFAULT_HZ, DEFAULT_DEVICE, - GAIN_MIN, GAIN_MAX, GAIN_DEF); + GAIN_MIN, GAIN_MAX, GAIN_DEF, + SAMPLE_RATE_MIN, SAMPLE_RATE_MAX, SAMPLE_RATE_DEF); exit(1); } From nobody Sat Nov 29 06:11:47 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dJKYw0b3Hz6JYNp for ; Sat, 29 Nov 2025 06:11:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dJKYv6wg7z3b5L for ; Sat, 29 Nov 2025 06:11:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764396708; 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=eooMZwek/y45ZZfMJ3QdlKfgQm5MzmWnsFlUdz8efRE=; b=LAotjLaLZnSlzB2v27bRqwtvZ+L5LQXdj1nWMl2GG+pfFht+wBasDcLgTNaxZ9myK78qWh H+IfbzLYILvk6Dr8s9KY26NQFMq1BViWU5glaYDIZEM2ML5tvX126Fm3z4sKksOSP2USrp QexVw6b2aNSJRuumdPr9Cd3iBAAa173ARyXPTSxIlSrYBFzoxpfzUc26A+SYO4DrYlUTLy O8H2fFtBHpjZNqEu7+e8ig+9v8H1tuJscw1Kkv9sTqB3FPdhDsAXFtN/q0VfoEhSuPgmdu vdfWKo3lXYfCUhy0Lc6DQ26XpGZzTY9SMadlYB0vTnnLJAH7RaX57sOGs+ZUCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764396708; 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=eooMZwek/y45ZZfMJ3QdlKfgQm5MzmWnsFlUdz8efRE=; b=iTmU1OANXQoKLHCt6xpkt5+LpqTMXY67XyBGgX8dASUe60UMEDsMQLgRdrDFp9fH1h/yyg lv85ebB38GLwQ/uPkb1yk9hbMGHr9SRv4NjFjUchgMEIBIMWsAPBiKx4wpuhOW4hiiPm+W KN+4ZuI1aKcUjlgct0CRp2OZSrlwr+9AUta23rWGr8oPuSVv6kfKXu6FOlkSTEvRiuEktI 7v8sU7NMIaUgfOUIbWviK4SzETBzuKk3RyTwcQA/nGKTaGDYagcBg+6KvL0kLRAti9JsiZ S1gVloJxYyxcKadyTICISMfWsSdeGXr/O7ejXdo9ap/yGfkTFKI779Bl/goQww== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764396708; a=rsa-sha256; cv=none; b=unuhYqAx7cuceciXSHY63ucES16wZzSTAVILWgvitYLlAXqLe9IjKn3X02RX8ESPxzroJi y/uHhDz1/tGASLtgkjm3cx3i7q6FEHyrm0jCBHO+73PSP+RUkxFLxbGwUWhzmU6evOJtCZ DKuk612gx7gnfM48QHCGPuCCzj1pI+vVG5WXHrp6fgu6WyqvHcS+YXgOn3bUkMRobOzJvG QAV/t4Gu4tcJ3uEfrucsunhmyw5WqtoLhyuSGs1EnVIHGbadKQZeoJADHMgZOpk/YPAKGo EfR3IMI/YGFO1U7TX53Jfph/qvM03caoGND/o/U/qKkkG2yRGbO5RrflgHu71Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dJKYv6RkpzcTr for ; Sat, 29 Nov 2025 06:11:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id fd16 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 29 Nov 2025 06:11:47 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Minsoo Choo From: Warner Losh Subject: git: 37c650b4ee2e - main - tools: remove WITH_LIBSOFT option List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 37c650b4ee2e098b7c8b3be117c8bb555baf9f2e Auto-Submitted: auto-generated Date: Sat, 29 Nov 2025 06:11:47 +0000 Message-Id: <692a8ea3.fd16.389f4342@gitrepo.freebsd.org> The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=37c650b4ee2e098b7c8b3be117c8bb555baf9f2e commit 37c650b4ee2e098b7c8b3be117c8bb555baf9f2e Author: Minsoo Choo AuthorDate: 2025-11-29 00:13:42 +0000 Commit: Warner Losh CommitDate: 2025-11-29 04:56:34 +0000 tools: remove WITH_LIBSOFT option This is only used for armv6, which as been removed since FreeBSD 15. Signed-off-by: Minsoo Choo Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1903 --- tools/build/options/WITH_LIBSOFT | 2 -- 1 file changed, 2 deletions(-) diff --git a/tools/build/options/WITH_LIBSOFT b/tools/build/options/WITH_LIBSOFT deleted file mode 100644 index 6fec6f3cb037..000000000000 --- a/tools/build/options/WITH_LIBSOFT +++ /dev/null @@ -1,2 +0,0 @@ -On armv6 only, enable soft float ABI compatibility libraries. -This option is for transitioning to the new hard float ABI. From nobody Sat Nov 29 06:11:48 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dJKYx1Rnnz6JYLV for ; Sat, 29 Nov 2025 06:11:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dJKYx0XSNz3Zmw for ; Sat, 29 Nov 2025 06:11:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764396709; 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=wQFCf9bg0or1QoV4xyO3HoXSMnkikSwAQgCcfI5CgqQ=; b=EMBiaOaTT+ks00zFysp9Pp36KsF7F6yt4iMK4rFr9XX6+zek9BZwPzDdPmPbVYQl35DJUN oMvNZ5BC2OO+FmvdIgH+k1Iq27glUXle1TeUVfoU6PwHJnWx8Q9Clt2sayYQ4d+tj6O07V 1/mpO2zd6AcUxb04v7w27Lr84V1QZLk7XcpxkRxqAkwwbhinTB3KDOsBt7Xh38/DEoYJXO gpIOGFk/DnQ2ufAlxzKSS3luu6p8QiiU5HMP4sSfiE5eHNTPh2FViBmq3xZ2i9cLzQWvCg RtFXhYefjA5y2IzBCVApSemiSfx1tAPXnSPuxLPqvqPfLYYC8fG8OiMXY2ji0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764396709; 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=wQFCf9bg0or1QoV4xyO3HoXSMnkikSwAQgCcfI5CgqQ=; b=H1oilpGGoaB7MvhQ4P4qeVBM5Hg+hDq980s0JiMv6LSG1Fvda53jwWeYPE0cq6xlXL/fll h0VNmFqDEBCMZ8tux2M5P9PSJLv4a/9GI/uMvaagxzI3uWx+iHlGjkjfcIwYvxDISwY0dK w4EuIHxZFgaBW0KWrLKR6o2ET3SmjNXq7tMxyiZMK/5XFVNer/0zixWNstFjjSxHsGASxg couIgOSo3MfHJcbgCNufWJi7F/tnOYYoN6Y+9+NQGh7xO1pbIfIf62kFPeWOYFIo+PGdjS +wbqWPvAqZDAjrm0Ia0WtCLgam2ZryHK367h5EtDksjmyZweeyNTa8ldT5x6gg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764396709; a=rsa-sha256; cv=none; b=dN++eoIL4J07JlpEZO0GrK1zUB6IZT0SQbEmbk9FgHrIjZxc/KOBhhPHzm9kvsB54OKY04 iCIcAupazEmMNFzBvUOOKUz9h3uHznlMclYpoVZ/1u0W0RmkaFSEDaL2OBKoW6sC2UlLFf poBGl57iijPwjtnVEnjComLNDP/vbgczqXSh2kxyyWDUGQuDCGZMrACn5T8EZ+mCngJLJe ajWw1DLGIlfpaZDya1lyJOI1kfQuqeicU3eYfHE04S1FNh47EuU1zhKAzSCTYwmpge+OUc ADC725TQLk88kaPVO7glxavJ0AXazsS4HZd9HgdBTfLXAHiwXW8ogA1Rd7MXew== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dJKYw6wCLzcGC for ; Sat, 29 Nov 2025 06:11:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 21ebd by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 29 Nov 2025 06:11:48 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Minsoo Choo From: Warner Losh Subject: git: 96265d5ea907 - main - release: match comment for if statement List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 96265d5ea907d75709f419b01b44c60337ae7fcc Auto-Submitted: auto-generated Date: Sat, 29 Nov 2025 06:11:48 +0000 Message-Id: <692a8ea4.21ebd.11995d43@gitrepo.freebsd.org> The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=96265d5ea907d75709f419b01b44c60337ae7fcc commit 96265d5ea907d75709f419b01b44c60337ae7fcc Author: Minsoo Choo AuthorDate: 2025-11-29 00:17:34 +0000 Commit: Warner Losh CommitDate: 2025-11-29 04:56:35 +0000 release: match comment for if statement Signed-off-by: Minsoo Choo Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1903 --- release/Makefile.mirrors | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release/Makefile.mirrors b/release/Makefile.mirrors index 924d289d1c44..db7026ea07a7 100644 --- a/release/Makefile.mirrors +++ b/release/Makefile.mirrors @@ -45,7 +45,7 @@ TLD?= ${FTPDIR}/releases SNAPSHOT= 1 . endif IMAGES:= img -. endif # arm/armv6 +. endif # arm/riscv .endif # embedded .if defined(WITH_VMIMAGES) && !empty(WITH_VMIMAGES) From nobody Sat Nov 29 06:11:50 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dJKYy480tz6JYQx for ; Sat, 29 Nov 2025 06:11:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dJKYy1CZpz3Zsb for ; Sat, 29 Nov 2025 06:11:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764396710; 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=/31+OHeS3Y8k4q7EH2oi06RDv9BkG2pga/ODtvtvln8=; b=G0HI9TW17acioU5GkGNut76r5Kx41Hs0Rxl1FYHrU7ijeLbDyov3bTCpBL55NcnQpLdMew vwwQHQrp9Q2Nwg8hcAV/oYOHlH9duJI/Dex3NZ2xGxB7q3ZAUgFdUwi8zwHVi18c9O8Ze/ WFiWjmf2ztyxxr+uLT50v908QuuPq+z+1SZMBjKRuAAY7LxVj8PMASNDobGim6PnlY6HE1 ObhRuuMV5p7QPbsDxR5aU3wJ1yiJj6I05raoUgNSoeEbQKzTXvg9xk87oPHBHtwbVqYK/W MsYRZfecExvOwlJWT+XOLUWmWzRwNQQ0f5kgKsylFqxV/LzIGNmCveXkOcQ0xw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764396710; 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=/31+OHeS3Y8k4q7EH2oi06RDv9BkG2pga/ODtvtvln8=; b=ij+8A0V/0TIF36ozMQPS060UTIn2QUcmZiqCCKhuU9HpYgBha8QwIbZj2dRX+tiWcBsNSu Xv01TBOfhTTRl2WPfOLRkR+XKFL88bPn8UZ8xm/4WeDGaSFcmufTIQfFP0VDsFn+P8jW/k 0qQx+H5oppMJ+ATK+pkDA0Qw1WJSSlt+cV7oOiaCHq1nO9CG8ydXuYFqJkUlFPT5tXdUQV WqZkBeHg2q3QdbsOAoQIMt2GFZJqmaZ6KnGsVbsQvAl8JRNjOkNhs+n1RsWEGS+eOcCukI iAr8fcPBgUmje/iTP85b1isSX+ipdYTN1YJTGhAO/nz0LJ5lvtdwBFoFfzDlKw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764396710; a=rsa-sha256; cv=none; b=AThrKby1gZBYFTJdEH5t6KMGQxvIEyL9E8cV3AyEC2Z3XmhZJoVb8dDZ5aAi1S9EirCC7e YzcZKqFmbiraTnP5+W7bqs6WHoFe27u/yLKMeA6dGoL3Sni+xqmgIqQ8uo0fLCibkChpCB JrH+GPM4Mercs85C6ZuwgtLfCVZZYT+Hk8etf3s9/3MJh2WwsF/NKFBzFyM/JxaZyaPyF+ k9pe9/AD5JTrZH3W8sx/JHkqcwacZV10spc8esV7XRVr2GGhLw6tkBNBdT/fxBO3AuzZEd u5W0LuLDc3Apx+R3r72os9KDCLf8+wb1fabyh9/eqIroGKSE3FI77Xm70iKtxA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dJKYy0cRKzclC for ; Sat, 29 Nov 2025 06:11:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id fd1b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 29 Nov 2025 06:11:50 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Minsoo Choo From: Warner Losh Subject: git: 42d704bfc45a - main - sys: remove comment for armv5/6 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 42d704bfc45a1eee601e7cd33ae4bef01c24b9ed Auto-Submitted: auto-generated Date: Sat, 29 Nov 2025 06:11:50 +0000 Message-Id: <692a8ea6.fd1b.836b1ac@gitrepo.freebsd.org> The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=42d704bfc45a1eee601e7cd33ae4bef01c24b9ed commit 42d704bfc45a1eee601e7cd33ae4bef01c24b9ed Author: Minsoo Choo AuthorDate: 2025-11-29 00:32:17 +0000 Commit: Warner Losh CommitDate: 2025-11-29 04:56:36 +0000 sys: remove comment for armv5/6 Signed-off-by: Minsoo Choo Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1903 --- sys/arm/include/param.h | 2 -- sys/arm/include/vmparam.h | 5 +---- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/sys/arm/include/param.h b/sys/arm/include/param.h index 67f49ec14a99..79c9bc09c284 100644 --- a/sys/arm/include/param.h +++ b/sys/arm/include/param.h @@ -78,8 +78,6 @@ * This does not reflect the optimal alignment, just the possibility * (within reasonable limits). * - * armv4 and v5 require alignment to the type's size. armv6 requires 8-byte - * alignment for the ldrd/strd instructions, but otherwise follows armv7 rules. * armv7 requires that an 8-byte type be aligned to at least a 4-byte boundary; * access to smaller types can be unaligned, except that the compiler may * optimize access to adjacent uint32_t values into a single load/store-multiple diff --git a/sys/arm/include/vmparam.h b/sys/arm/include/vmparam.h index 15807923cefb..03145d7e322a 100644 --- a/sys/arm/include/vmparam.h +++ b/sys/arm/include/vmparam.h @@ -73,10 +73,7 @@ #endif /* - * The virtual address the kernel is linked to run at. For armv4/5 platforms - * the low-order 30 bits of this must match the low-order bits of the physical - * address the kernel is loaded at, so the value is most often provided as a - * kernel config option in the std.platform file. For armv6/7 the kernel can + * The virtual address the kernel is linked to run at. For armv7 the kernel can * be loaded at any 2MB boundary, and KERNVIRTADDR can also be set to any 2MB * boundary. It is typically overridden in the std.platform file only when * KERNBASE is also set to a lower address to provide more KVA. From nobody Sat Nov 29 06:11:51 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dJKYz5DP7z6JYNy for ; Sat, 29 Nov 2025 06: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dJKYz1f9kz3b0y for ; Sat, 29 Nov 2025 06: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=1764396711; 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=PCKQzGqSJXT+1/EtQ1U7P3B0xFs5YaAeUdfLVBg09Oc=; b=n/KhuX7ddMehgSwj/ClOODLLHgVUT3Ab6Z0mreVs7FCc6zFDU31sSO2gXt+RZfysDsBVjL ks4ppzMnViQQwmAWJmp7njveDey28A+yme+HO+6EQ9AEtqgU1zWgKYO5C6l5NCuRu/jmKA ErbWXaHSdXWnHXPiFY/smTgluQRIt3tieGcn6eh/MGbqreM4OELNboSdFUwseoHKfi37dR V5erKqyFaensGEHZS4LHlH3+oO0WV/OxN4+ci2Lgj/fMObLp9NYNC3JIGjv0GqSibSufgf rzzZSEz+v3WwF4/5ZTYGbH3/JLAe0RypAwWAHFNPG/AKI3bkzY9WL0FOPW0Yug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764396711; 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=PCKQzGqSJXT+1/EtQ1U7P3B0xFs5YaAeUdfLVBg09Oc=; b=cCmMU5VaRXo5rQJ1jj3NXmkWSwx9W+9f/JqlgwuKc9zr42l772wL1EJAOE1b/ah+m6AG+U pd4wX6wDty52UAlAfPiVnAAO18GJiPHpHC9qYmbqJXmNqMHbJINwS44nxHLNvoJQ9SpM95 ncxjxYd9YOcHENuwIcrRyUMc+ONizOmrqfbaxODDxOQk93z/fLwOAMyURTQHUwP2Htzoqn 5dtOh1vivnod1rXG6zkZzj3U0IAxHyXg1oTIabInTTC6eZHTOhNcOxu9X5lKHK9b5rpHgc LLBp0jtD38WIwHK4wg71d0qGfpvK7jee+M9wHANyNUyPOhGYA1910z09z705Kg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764396711; a=rsa-sha256; cv=none; b=C0N4n7JiZ4+5InJXQt0rMQ8IfE+pKeThEsXQtSTNri8DvjL6u1g2w86PBRqo4CRMqAEnMm eLJW5p3eEoDUktTPdhgrpDCr1IkbIw5ISEfGGXAx7iN9WpxoAu/40F35HX4WzxduBavZDU bvKAbwGZcBuvaPVu27B6Q8ULJ6QHD2JfrGFLu0YceCuNmulAGQMiAhn/BWifAchGXiVCEd K2dkiY3IeTGJ5egHp+vK92CB/M+T3RRsQV0sbqMVa1WpGyl59K3uL9Fs98BtU0fAZkJUQr s5+zG1pNOoA4rkul0BrJHai/dCryX5cYQol2o6TO6rsHmo5vhGBvtn60sJq6+Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dJKYz10ZKzclF for ; Sat, 29 Nov 2025 06:11:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id feb1 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 29 Nov 2025 06:11:51 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Minsoo Choo From: Warner Losh Subject: git: f42421307b11 - main - sys: remove armv6/6.1 support from debug monitor List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f42421307b115345ea1a6c8fdf61fbb581e4400f Auto-Submitted: auto-generated Date: Sat, 29 Nov 2025 06:11:51 +0000 Message-Id: <692a8ea7.feb1.63d10382@gitrepo.freebsd.org> The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=f42421307b115345ea1a6c8fdf61fbb581e4400f commit f42421307b115345ea1a6c8fdf61fbb581e4400f Author: Minsoo Choo AuthorDate: 2025-11-29 00:34:40 +0000 Commit: Warner Losh CommitDate: 2025-11-29 04:56:36 +0000 sys: remove armv6/6.1 support from debug monitor Signed-off-by: Minsoo Choo Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1903 --- sys/arm/arm/debug_monitor.c | 30 ------------------------------ 1 file changed, 30 deletions(-) diff --git a/sys/arm/arm/debug_monitor.c b/sys/arm/arm/debug_monitor.c index 7944becbae4d..4d61896a2142 100644 --- a/sys/arm/arm/debug_monitor.c +++ b/sys/arm/arm/debug_monitor.c @@ -83,8 +83,6 @@ static uint32_t dbg_breakpoint_num; #define ID_DFR0_CP_DEBUG_M_SHIFT 0 #define ID_DFR0_CP_DEBUG_M_MASK (0xF << ID_DFR0_CP_DEBUG_M_SHIFT) #define ID_DFR0_CP_DEBUG_M_NS (0x0) /* Not supported */ -#define ID_DFR0_CP_DEBUG_M_V6 (0x2) /* v6 Debug arch. CP14 access */ -#define ID_DFR0_CP_DEBUG_M_V6_1 (0x3) /* v6.1 Debug arch. CP14 access */ #define ID_DFR0_CP_DEBUG_M_V7 (0x4) /* v7 Debug arch. CP14 access */ #define ID_DFR0_CP_DEBUG_M_V7_1 (0x5) /* v7.1 Debug arch. CP14 access */ @@ -594,10 +592,6 @@ dbg_enable_monitor(void) dbg_dscr = cp14_dbgdscrint_get(); switch (dbg_model) { - case ID_DFR0_CP_DEBUG_M_V6: - case ID_DFR0_CP_DEBUG_M_V6_1: /* fall through */ - cp14_dbgdscr_v6_set(dbg_dscr | DBGSCR_MDBG_EN); - break; case ID_DFR0_CP_DEBUG_M_V7: /* fall through */ case ID_DFR0_CP_DEBUG_M_V7_1: cp14_dbgdscr_v7_set(dbg_dscr | DBGSCR_MDBG_EN); @@ -823,18 +817,6 @@ dbg_arch_supported(void) uint32_t dbg_didr; switch (dbg_model) { - case ID_DFR0_CP_DEBUG_M_V6: - case ID_DFR0_CP_DEBUG_M_V6_1: - dbg_didr = cp14_dbgdidr_get(); - /* - * read-all-zeroes is used by QEMU - * to indicate that ARMv6 debug support - * is not implemented. Real hardware has at - * least version bits set - */ - if (dbg_didr == 0) - return (FALSE); - return (TRUE); case ID_DFR0_CP_DEBUG_M_V7: case ID_DFR0_CP_DEBUG_M_V7_1: /* fall through */ return (TRUE); @@ -875,16 +857,6 @@ dbg_reset_state(void) err = 0; switch (dbg_model) { - case ID_DFR0_CP_DEBUG_M_V6: - case ID_DFR0_CP_DEBUG_M_V6_1: /* fall through */ - /* - * Arch needs monitor mode selected and enabled - * to be able to access breakpoint/watchpoint registers. - */ - err = dbg_enable_monitor(); - if (err != 0) - return (err); - goto vectr_clr; case ID_DFR0_CP_DEBUG_M_V7: /* Is core power domain powered up? */ if ((cp14_dbgprsr_get() & DBGPRSR_PU) == 0) @@ -974,8 +946,6 @@ dbg_monitor_init(void) if (bootverbose) { db_printf("ARM Debug Architecture %s\n", - (dbg_model == ID_DFR0_CP_DEBUG_M_V6) ? "v6" : - (dbg_model == ID_DFR0_CP_DEBUG_M_V6_1) ? "v6.1" : (dbg_model == ID_DFR0_CP_DEBUG_M_V7) ? "v7" : (dbg_model == ID_DFR0_CP_DEBUG_M_V7_1) ? "v7.1" : "unknown"); } From nobody Sat Nov 29 06:11:52 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dJKZ056Y5z6JYD3 for ; Sat, 29 Nov 2025 06:11:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dJKZ021SBz3Zvw for ; Sat, 29 Nov 2025 06:11:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764396712; 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=KZkwDMbccWOcnRh3ovw9yBRtydncuegRZgnq2q6dyuI=; b=mcssRytn3Ct86LdGF/sxBMTx59chPc8TUx2uLHTxOZgGhi8HZYCLn8ad/VDlYwErDfDMx/ MFHvZwPR6So9fELwn7AZHX+NxvgCxq7jv089QA/G2QEJ6n7A3uNZyJwvZ4DWX3zk7HOHkq vgGOa0rzHRAFm6rTxqh5449KEHR3V6L/Fy+cGJNgsNpGGP/gsvF+pQ5BNWq/63aDYJpDuY jusOeMUMexD1P9hevANgbDxqxYQmyY855ozofMiw9zUx+7Psl1BZpEbLi2dmt2tpXLSoFS SsO0Gi5u3iO3WFfnBZuV9VRdGnAxsZ7WKsSxAXFFtOjRf5uX8cMMySdgOGeEng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764396712; 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=KZkwDMbccWOcnRh3ovw9yBRtydncuegRZgnq2q6dyuI=; b=NzXm5XTbprmDDgnx2Lzu2Mfpt5ZX4z/uFmdjaNd6xleIK5RPu9+SvIkVYw4k3c8pmctoyp DrC29fYyi6isMvcRLlPGmAVq3dGtAZXStGHh6q5wJjsw2kB9iKMcG46UDyKT8bpWWdqJGO P6Vww7UFHDpLXgsm032Okj2BEx4CVttN0EbVAzJe8TKDrjxBRfYPcFSnHmGMR1l4miaivT UIcuWGV0aE0LtI9+puEKiminSjYJVrwrtJeF8kl9gJbFO4WpzAvfNqR08RN4znRhkfsZYC 3chmm+rBrhiAV1bUQedWBFXqzJqdCSVQr/wBxc1u3p4VG4frQi5cy3mkLruxiw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764396712; a=rsa-sha256; cv=none; b=IbrTi+qBTP4Zy7Aa2F2w8vnwT67lwkOLA6Br0jhJVZqkvvmvcocUHWed9xCKmNsV/R1TwH dRtYxalHdmsH5fWSuDd4lAoVUThgQAns+kmfHAk566e3XvKhiytxnSAgdP93aowLMm5gCZ 9qNcmw6dOtHorLQuMcqZ27RJk0obCe5xzD/Di3BPAR44XWUbOo72bLz9dTu1irhAmWZ42Y 2+As2WLTkjLCvPirqUI3ALartNe4JZvVSdWL2DFeYEifFyh4xp8QdfdtAl7IKySGXqAMB1 M/GNvvakEhgG8bRu7AfNUdFxtrKybQKEgvGrIlYTC4fCgrUnwqb0iKL1xBjFHg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dJKZ01W2hzcrp for ; Sat, 29 Nov 2025 06:11:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 21f9d by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 29 Nov 2025 06:11:52 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Minsoo Choo From: Warner Losh Subject: git: 3387a1bdbae6 - main - sys: update comment for removal of armv6 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3387a1bdbae6785306209cdbe0412dcc3d38c141 Auto-Submitted: auto-generated Date: Sat, 29 Nov 2025 06:11:52 +0000 Message-Id: <692a8ea8.21f9d.470ac0c9@gitrepo.freebsd.org> The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=3387a1bdbae6785306209cdbe0412dcc3d38c141 commit 3387a1bdbae6785306209cdbe0412dcc3d38c141 Author: Minsoo Choo AuthorDate: 2025-11-29 00:35:45 +0000 Commit: Warner Losh CommitDate: 2025-11-29 04:56:37 +0000 sys: update comment for removal of armv6 Signed-off-by: Minsoo Choo Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1903 --- sys/arm/arm/machdep_boot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/arm/arm/machdep_boot.c b/sys/arm/arm/machdep_boot.c index 8a6c63af3c92..9bb1f0ccae91 100644 --- a/sys/arm/arm/machdep_boot.c +++ b/sys/arm/arm/machdep_boot.c @@ -165,7 +165,7 @@ cmdline_set_env(char *cmdline, const char *guard) } /* - * Called for armv6 and newer. + * Called for armv7 and newer. */ void arm_parse_fdt_bootargs(void) { From nobody Sat Nov 29 06:11:53 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dJKZ21P60z6JYD6 for ; Sat, 29 Nov 2025 06:11:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dJKZ1306hz3b1F for ; Sat, 29 Nov 2025 06:11:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764396713; 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=VO0dRbNUP5cfFfgIFy6o2zq7cbOCIixrqte3wsgKsKA=; b=ckC60Tr8DLkIu78STbVdB5RrBlvIYsn1fx7gbLNcUuVKuCMW4Os+woRgK9dVO55AnQECP5 Hb1u1z+mAr8KUrCJHFviCE+VZVa4hqQlVj1ScLUfAFmUVn2dP7c+xCGq+KEvnDAJCCJGqq 2xi33YuTCucpzAIEz/aHu7QQxtvomV0BqMp8OjFYUx71f9RZSdC0bqqSmy4106GcrrrTHg 0SxJWn1qrnFiE9PZiR/VMk0yH+X4GHVKS2qWovR8dOe3RElHV+ng0Unk+GTSHz9/RCIG65 /5VzofdPb10p+Aq/fjaHlBOTDy6ihCZDxeazzAdZ90Kp6nO4DBqzYgEskapOgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764396713; 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=VO0dRbNUP5cfFfgIFy6o2zq7cbOCIixrqte3wsgKsKA=; b=kHMrwSWlJqR4udd0iTVLb573cABPfbYjJ14paXtdUB9NXG+1vvXIwhQccqKOFnjZl2PPRn usJd3sLDJEPOMgVEp9lL1Au5mE9Jd+Vmv9aCkggqomhVFKV7uGNR/wDKH3wYw8UAV78Q+9 lW9ntN3RPw8tfO402VeUm9RxqxXjTMBXg9ymQIS0sow6MTz8nkhSbTjlD0WFBVVgnQuj3W t4bAdG/fLrd6wJ1/06hyMprLAgjBdxnjAJdteZp+7Sv64f8+NK7OiACmsSZuKk9iwBABcV HOKjHgiriOMDjjysjgBNac+nJioQ7zUAyVeYJv40biqYMuF3D2/hz+b/rK0atQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764396713; a=rsa-sha256; cv=none; b=R2Y451OOV6zRy9HocKh58A4MGGhQ4rjjHhgbOCQAtGbRXc2AKnS7a9nhVNA3XxfVbnL0V/ U2HO4c8jghxqkT9eFeORXM0kkNQLKlHliOtei1872A08b/vuuaB7jbzZlvaeCoqs2zkJSJ vsW7FqbX5Su9pmQ+HAmDucARWRuMUWeZs/yhW8PTK43MDsojh6Xekzw2JWWEEULjshoh82 NFXg//RRihXZJgRwY1YHveYBd4xvFGuFCZKWvQauShZyhYukzUSo6+FZOQE/oLcTn7HiCC 8JsUJjRYsWwPQflHJZ0S5qnCZNluZd7J3j9rka3X3rtae1E6iKm5a0kOozclSw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dJKZ12Pj6zc47 for ; Sat, 29 Nov 2025 06:11:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id fc3f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 29 Nov 2025 06:11:53 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Minsoo Choo From: Warner Losh Subject: git: 53da09369c42 - main - libc: remove ARMv5/6 from man page List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 53da09369c42333820762415cb6b829b10362389 Auto-Submitted: auto-generated Date: Sat, 29 Nov 2025 06:11:53 +0000 Message-Id: <692a8ea9.fc3f.2c2dd45d@gitrepo.freebsd.org> The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=53da09369c42333820762415cb6b829b10362389 commit 53da09369c42333820762415cb6b829b10362389 Author: Minsoo Choo AuthorDate: 2025-11-29 00:40:11 +0000 Commit: Warner Losh CommitDate: 2025-11-29 04:56:38 +0000 libc: remove ARMv5/6 from man page Signed-off-by: Minsoo Choo Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1903 --- lib/libc/arm/gen/arm_drain_writebuf.2 | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/libc/arm/gen/arm_drain_writebuf.2 b/lib/libc/arm/gen/arm_drain_writebuf.2 index 613c35d39ef2..7fa9eb460114 100644 --- a/lib/libc/arm/gen/arm_drain_writebuf.2 +++ b/lib/libc/arm/gen/arm_drain_writebuf.2 @@ -42,10 +42,7 @@ Not all hardware supports buffered writes; on such systems the .Nm function is a no-op. .Pp -On ARMv5 systems, this executes a cp15 coprocessor -.Dq drain write buffer -operation. -On ARMv6 and ARMv7 systems, this executes a +This executes a .Dq DSB SY synchronization barrier, followed by an L2 cache drain on systems where the DSB does not include L2 automatically. From nobody Sat Nov 29 06:11:54 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dJKZ26x5wz6JYXJ for ; Sat, 29 Nov 2025 06:11:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dJKZ23LPDz3ZrD for ; Sat, 29 Nov 2025 06:11:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764396714; 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=I5/a2stgle67x1s9zFNIHwkt80hArSWXXoCU1zPtG/8=; b=ZkKgSZbsOXV+NxeBoMOg5ao4nFvkXcNE4X2cKejVbnm7WFeC70FxeAgbOx5u5K9v//jZwW gO8lG/QqlehvPr8fm3FI/n1q54sL3uI3FgPXGAYt8uxJHDobzQ6eHgztqUvFRgwY8zXlqd n4gHIWVp5PIVv4Ox7PzSJu2Cw+d7QojYwqLw4/LrVWrW5YrSaV8xfVIV2oynkJ9G3iMkEF loi3DZnorF4oeufpPNr0ZoRxTS+XpwAMrVR0jb7H5IRJod+Lt9hMdLUPnmq45hLVzKPiMy YLqGESCKfIA5Ig0dqTtAJ5vpbfOgoN+HujeWtyWDSKDbtiMjXrgkNFwC2JLW/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764396714; 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=I5/a2stgle67x1s9zFNIHwkt80hArSWXXoCU1zPtG/8=; b=M1BIfnXJqa/UWdS8y0/rfwTubl/3sIu3+koE0LsIWa6MtW+MuRiWh0pnn3KFpObQZGHIKe vkPnNfBlTfFUZCkHHXoiUjaRbxTIqdO+RlLNgppA9G5vwrBf+xjFhFhO1LKjlkZXJLNoE8 XX3oLwAfIqo0FNDwnNIA29W2t//y+BozDvjhP4/STONZ+YpgxEUQYd6nHKOZjddgaOmli1 AraZ8C4vDKYaQu79UwcTjEd1WH7eoh7wx93N8IqOU1qN5sXcNonkKxsUSktKPL9O4frsJm cbtlr7N+0NfAuvxHYPOJlkED7WZdI/+DvRR/giLxVtzWqyJC54ucjBtsA4VLOg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764396714; a=rsa-sha256; cv=none; b=lGIuK/HH+sG3dH8TRMcviyp+zI5DadTjjNarwPIwYhep17Kpi9aAUUzHtgTFuJoFg3WekZ MtgA+KmCkt014X7ajIAi5BoJWCWt6OSYyzPNg4pA1fM/wbW5My2EV53ZnbXbz8HoB7mllU yFRA4M3CIljol3TiKDQymVeOqZMvRyildQxRoz9MD9gHMir3H1ROmT1SaZ7L+EeR1n8JNt 7eWWqZwG288PbjL7PUUsjMZoyCaqJ1P4lAFrzlhtI5/OFVghsMUS+u7MOaAE6visuSvh4S DkmwdMdz4MYSFLhPAV8E6XGDXLakvSkaxZPRIrWkh7WJkRpo8EuCZMg+iML2KA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dJKZ22t3SzcTs for ; Sat, 29 Nov 2025 06:11:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 214d0 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 29 Nov 2025 06:11:54 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Minsoo Choo From: Warner Losh Subject: git: f3607f5a7f69 - main - clang: remove armv6 comment List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f3607f5a7f6923bda8a2efc95d4238a5f1903fff Auto-Submitted: auto-generated Date: Sat, 29 Nov 2025 06:11:54 +0000 Message-Id: <692a8eaa.214d0.74157ab8@gitrepo.freebsd.org> The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=f3607f5a7f6923bda8a2efc95d4238a5f1903fff commit f3607f5a7f6923bda8a2efc95d4238a5f1903fff Author: Minsoo Choo AuthorDate: 2025-11-29 00:47:52 +0000 Commit: Warner Losh CommitDate: 2025-11-29 06:07:12 +0000 clang: remove armv6 comment Signed-off-by: Minsoo Choo Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1903 --- lib/clang/llvm.build.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/clang/llvm.build.mk b/lib/clang/llvm.build.mk index e88b2ff1033e..a26e15679242 100644 --- a/lib/clang/llvm.build.mk +++ b/lib/clang/llvm.build.mk @@ -36,8 +36,8 @@ CFLAGS+= -DNDEBUG TARGET_ARCH?= ${MACHINE_ARCH} BUILD_ARCH?= ${MACHINE_ARCH} -# Armv6 and armv7 uses hard float abi, unless the CPUTYPE has soft in it. -# For all other targets, we stick with 'unknown'. +# Arm uses hard float abi, unless the CPUTYPE has soft in it. For all other +# targets, we stick with 'unknown'. .if ${TARGET_ARCH:Marm*} .if !defined(CPUTYPE) || ${CPUTYPE:M*soft*} == "" TARGET_TRIPLE_ABI=-gnueabihf From nobody Sat Nov 29 06:11:55 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dJKZ40Sp2z6JYLt for ; Sat, 29 Nov 2025 06:11:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dJKZ34GTMz3b1l for ; Sat, 29 Nov 2025 06:11:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764396715; 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=vt/uGY4te581D3yL35HPFHjjOva5fe56fMwzKXbKz+Q=; b=qF08s7N8UPiO8fn/eXK9zVr5kIRGHP0kKUNshidKrKBDPVxYwYqPQjrNNvMnpj5YdhqWsn WYMtJ5bu8o85Au2t9Pid5cl1/61NHfT51/qmubAjaOm6s2J4plxamvNWprsggf7Gds12Mw Dq/aac2rkkbpjgNxl8m4/XxE1LBp5bgV5exo1Y3TOeqNHT26XX/CiV6KgfRLZDFtxlcABH 8k5OmZCSyHQUyYo13OFNqfjbQ0Av5youRUg2MkKO8538agFAQcHtdAwnJcpWuR+X1T9mu1 kxJzP0Yj3HpbskABirF/TpmE1a+X3sJQLvMq9AHvBDipBbE4wWxI4D+VywwaOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764396715; 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=vt/uGY4te581D3yL35HPFHjjOva5fe56fMwzKXbKz+Q=; b=Z/o51OLifzAuYf+9fwWJvad/EqlKpPp61tuqAeDKc6BmgobhmAjtFu+HbKBCESMuJNduHW nkNgu6L5xTXn3TvqaWVCEZzlylr5tNfiSUl7cYHLag+1+BwgW6stqt22sZ/n0XC6jdd3Wd ZX6uBwU2UKVRA0wThoFi9+e675q+JTvWodjXmOJCE0sQ+HPfjhPFHbgLUwN4Z4iiRcmte8 r5B3/7RfPeC9sdZ5JYob6gN0DtDy3oukw0+R/q86fcuzJ9zNqYfisWQthiEQ7hVljcRqW7 qrbHxzyN79tQAdUo5qlNVrw1W3Zz/Q8UOd3JrAe6zZGi9IRjLbCjviauGUgkgg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764396715; a=rsa-sha256; cv=none; b=kMFT/+RxVtWaO5uIECM5+KflIOsz4kZl4wHSBAJVF4X3BpHz3MxWkRwfs1TOhcVAQ/VcO+ TR4fXOyoFBIc779VkWBpVef/FQH61Tcrt2Vp94pIzRe52ClhqyZt4aphoYTiLRRJGyWbuk 2Xf8FGPB4cTyARGIYYc+P6j37WhnwpNh2pL45pl+dmv8t17hovpFvB8GvEYsMyuWlmY8hL A3QchiIyFeUMLONOGKGkitUUv2gT03No4Nw3rIg2g7BKXgad+HZs9/dOKTO8En4EMkkCaF 75igp8HIybrrVjaO+aDb2ZscUQtnTSXK89FgzccKGDytfshrn9ldNS5RlfCKTA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dJKZ33YzTzc48 for ; Sat, 29 Nov 2025 06:11:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 22585 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 29 Nov 2025 06:11:55 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Minsoo Choo From: Warner Losh Subject: git: 57c0a337dbc5 - main - libsys: remove armv6 hack List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 57c0a337dbc592a82d184f18dc69634eb0a9db10 Auto-Submitted: auto-generated Date: Sat, 29 Nov 2025 06:11:55 +0000 Message-Id: <692a8eab.22585.60655b6e@gitrepo.freebsd.org> The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=57c0a337dbc592a82d184f18dc69634eb0a9db10 commit 57c0a337dbc592a82d184f18dc69634eb0a9db10 Author: Minsoo Choo AuthorDate: 2025-11-29 00:48:29 +0000 Commit: Warner Losh CommitDate: 2025-11-29 06:07:12 +0000 libsys: remove armv6 hack Signed-off-by: Minsoo Choo Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1903 --- lib/libsys/arm/__vdso_gettc.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/lib/libsys/arm/__vdso_gettc.c b/lib/libsys/arm/__vdso_gettc.c index cb4bdec1e8ef..c86bb78becb9 100644 --- a/lib/libsys/arm/__vdso_gettc.c +++ b/lib/libsys/arm/__vdso_gettc.c @@ -62,12 +62,8 @@ __vdso_gettc(const struct vdso_timehands *th, u_int *tc) if (th->th_algo != VDSO_TH_ALGO_ARM_GENTIM) return (ENOSYS); - /* - * Userspace gettimeofday() is only enabled on ARMv7 CPUs, but - * libc is compiled for ARMv6. Due to clang issues, .arch - * armv7-a directive does not work. - */ - __asm __volatile(".word\t0xf57ff06f" : : : "memory"); /* isb */ + + __asm __volatile("isb" : : : "memory"); *tc = th->th_physical == 0 ? cp15_cntvct_get() : cp15_cntpct_get(); return (0); } From nobody Sat Nov 29 09:52:58 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dJQT61ppDz6HSDb for ; Sat, 29 Nov 2025 09:52:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dJQT615yGz412X for ; Sat, 29 Nov 2025 09:52:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764409978; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ahpTXJ9n37gIgn7eBQSYxHvVkVlguYFfvbNThqTyRBc=; b=iQdk1cGQ4xsS3YK3Hd8wJWM8XYQWQ31Bf+2qygd2Q+Q5Xv7vwkmiEsAgyCkaWz4xa3CvMq M2LPN/QCcOL4xPopa5WH8J405+gyrtf3eMLGHjNC9PfIGg8f6KEfGZ+vc6QFPUi9DH/1hy R/XSN7lnQ5sM/wCYuIj97ZEuMfLalwJvb+pI3dPtfuqLLDgPDPHGNkuM2oRno5R9TKqPeG uhP88Q120ZCtsaynexyctRsQ09QThv+6nrykXANRScoAFM+WQi84vuGf+CwHMzrXzUp0W2 7xYSbm+AnljH7StIr26uZb7LrlufTxOLJQt3DGUoHmCYRcOcTvhosk60yV6Rnw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764409978; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ahpTXJ9n37gIgn7eBQSYxHvVkVlguYFfvbNThqTyRBc=; b=Wfke8O7jQRw+MGe/lUqJW66Si6XnUCVnyPXsIte8nXnVfUFEOqtUuPt6X0IDK+6kXL6/iw jxtpksVmL/m8lc9MRH0dltjBX2a8K8mpguWU9uN7PSRo6NXFWL+DCmrdCq3d++t/R+zdom bqXHZ/++M8phRcm4nkKnYPKBDyO0yv4vN5HpAu7v/N5tFrzztxwNP6Fs4UYuC2ppmdUV79 dt+JNy0a/XmFa8VpCeEbInIKo2+R2HMu6r6hvIVGJkKe+J5sLA3l21KPHj9PoIz0vlDdcg sEtlwkt6SsY8zeEhYW+8p3NoFDYHcYY6Zj169BDfY6ZNcjwQR6JaLpOFMbXNRw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764409978; a=rsa-sha256; cv=none; b=p7OBPbzkw0REZo9Oh8hY+9IMmsmbEF7Ymzuexl4SXcYWzK4R+Jlk01ef2ZecFuKQf04+As N94mTTXF6J1H5KRsW7rJomVnP26wfG+BDMCFuQD+YcmdKCiUJ2beLYuriyWFdqJ0XF1yYX ngBahOlQms1Hc/W90MhpwLv1dsY4QehR7ukTGgENaY/eFXmNi9W1c9FPGcylQ9+ByTm9V5 GtOkuTlz785TB+v9UAnNBH5dmXj9RUX0HRV5cDAXxDbW6wSK5X5LkIfT3n2ruQnXMj4sr7 I4CyE+E+gTNB3bqtO47TLwZA3Jr8+3IkKqjEz6DmU6l4lMDThDQ+auXOF+3lkQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dJQT60WZ4zk8v for ; Sat, 29 Nov 2025 09:52:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 370eb by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 29 Nov 2025 09:52:58 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 02b72b1540bf - main - arm: Remove unused variable in dbg_arch_supported List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 02b72b1540bf4e8daaeda4b4ef1670b766768db7 Auto-Submitted: auto-generated Date: Sat, 29 Nov 2025 09:52:58 +0000 Message-Id: <692ac27a.370eb.5b6100@gitrepo.freebsd.org> The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=02b72b1540bf4e8daaeda4b4ef1670b766768db7 commit 02b72b1540bf4e8daaeda4b4ef1670b766768db7 Author: Warner Losh AuthorDate: 2025-11-29 09:47:49 +0000 Commit: Warner Losh CommitDate: 2025-11-29 09:47:49 +0000 arm: Remove unused variable in dbg_arch_supported Removed unused dbg_didr which had been used prior to f42421307b11 to detect qemu unsupported debugger. I'm unsure how this slipped through my testing. Fixes: f42421307b11 Sponsored by: Netflix --- sys/arm/arm/debug_monitor.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sys/arm/arm/debug_monitor.c b/sys/arm/arm/debug_monitor.c index 4d61896a2142..a703c65f541b 100644 --- a/sys/arm/arm/debug_monitor.c +++ b/sys/arm/arm/debug_monitor.c @@ -814,14 +814,12 @@ dbg_get_ossr(void) static __inline boolean_t dbg_arch_supported(void) { - uint32_t dbg_didr; - switch (dbg_model) { case ID_DFR0_CP_DEBUG_M_V7: case ID_DFR0_CP_DEBUG_M_V7_1: /* fall through */ return (TRUE); default: - /* We only support valid v6.x/v7.x modes through CP14 */ + /* We only support valid v7.x modes through CP14 */ return (FALSE); } } From nobody Sat Nov 29 10:26:58 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dJRDg5PZKz6HWp1 for ; Sat, 29 Nov 2025 10:27:15 +0000 (UTC) (envelope-from eduardo@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dJRDZ41npz43M8 for ; Sat, 29 Nov 2025 10:27:10 +0000 (UTC) (envelope-from eduardo@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764412030; 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=JTfmbrVi+iKYNE3OKwTDLWGWUa4MO+uYW5EoLxVekLA=; b=vaN0I1w03rA7SaI628cqB7lN7y2YOATXV3rM6rCTEhxElItawHEMy+nW7IFR7LxWsoft5i 6KHJqrewrltK8iZFuO0dPORKVljCgERpUySr+im9yPANZeAndecM55OXpSL0QSH6rsO9dX 3/eJN18zHhoI8iE+62zd0nCX0It8jwr+oUJybgS0BJm1Hv6JwF3+AO1YNrvq43Bhp9DkB7 d/jo7/mx7pGIMn5OCfWhAWnlslUW3wGu0yQImJZyFeHlraCEdim6bKl5pJHHmWywCFGpmZ p4JhLryFwnI11/Sbqk9L6IpxnczsoAh1S9hTzr5jPJAn/eNgLU6oJYU+us2crg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764412030; 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=JTfmbrVi+iKYNE3OKwTDLWGWUa4MO+uYW5EoLxVekLA=; b=Al+zwUiByVTos3SuxBbFLb56J8lWAU5LcoVvhOviC6wc0iDBMSRX4e4Cv9lJS/zJX6I9j+ UN6KcNT/IOA3x4V3uUXzRuD53iCyMQh8BYxl1BsNqP0BY0ilY2UItvKjFD3Qf75sAnXaEV 60C+L5DF53/zWhP/7wsxzruSfOPzBcSG0PcHEgVn3lTuRHc5aeWqKMZuHfU5prCsRKkueH nTN/gdGfe42wkcLwCWI2wAYOelm8EZ3hx2Bjr1oS+T5MJYTkM3OeCAIczRNaUxPcWhXEfi TnO5SoroBVkJkOdMHhtbUyGR1l89x4kkywDG/lkD9sNr9gedx0eBbVUIQWhnYw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764412030; a=rsa-sha256; cv=none; b=n4IzlfDMPpTgQndQMH3LNgYzp59WuIlBdjH0Csu3UE3AWKbU0XId9Dt95rwsEtYk9DGWEi 2LPp9oGw6PC/QRxpA6HOCLS62eSYq8GhlmI1Kx9adhVHliHGpnDGR6pwVb5dcrBWV66EUQ oBPwsl7jCLMZsXBSiMgHKOgaWqYkkIGzNX2UXSQvd2T7QM9bg80V847auHemd565vf61q9 LtC7h4qtKJQpxOPhQxkE1d31ClvO35kxcHBJOTAljzf6haHxGCcAC40QuJoq/Sfkam/tHM 62pa8HIydtOobGIfZKak/B9yYMmIz3wA2TZrYTtIxmhp2Tc/8o4ZUoEY2/cBPg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from mail-qk1-f172.google.com (mail-qk1-f172.google.com [209.85.222.172]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) (Authenticated sender: eduardo) by smtp.freebsd.org (Postfix) with ESMTPSA id 4dJRDZ3HMMzBqJ for ; Sat, 29 Nov 2025 10:27:10 +0000 (UTC) (envelope-from eduardo@freebsd.org) Received: by mail-qk1-f172.google.com with SMTP id af79cd13be357-8b2e2500517so44903085a.1 for ; Sat, 29 Nov 2025 02:27:10 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCXRwFtemzY+qdJjUeaVqm8IsCgSfGHO6gXEZnz+/zcfvaV6hf7rRYk9XjVFd90dQKGFvy+aaczW1KeRUwN7eQP8snWQ@freebsd.org X-Gm-Message-State: AOJu0YxjRpGc70xG4+BN082T40w0ALg2lqPqWWHF2jHR85Z5jKhn8UY7 D+yZewzhK5q/uPueTuLtk1zwrvriiI96qn7AEmeIBfTOno573VWCXgKQ5YWlJ9oxkYKWxGhncFY CD63m9pJeCFrH3E8g0cwYeuPHjchNgIE= X-Google-Smtp-Source: AGHT+IEibYqGs1Ykf4BPYZQIZeDpqOMxIMrIBWRgwifzrEvpH2O6nUy3DGi84M04SRN3auq7lfR8AP+qqKMVGagiwBA= X-Received: by 2002:a05:622a:1826:b0:4ed:b7f0:c76e with SMTP id d75a77b69052e-4ee5b7fa25cmr311494881cf.8.1764412029933; Sat, 29 Nov 2025 02:27:09 -0800 (PST) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 References: <6929fcae.2962d.8015a0f@gitrepo.freebsd.org> In-Reply-To: <6929fcae.2962d.8015a0f@gitrepo.freebsd.org> From: Nuno Teixeira Date: Sat, 29 Nov 2025 10:26:58 +0000 X-Gmail-Original-Message-ID: X-Gm-Features: AWmQ_bmflafjovJvHtOWbuJucqMCZ9WG66rmtAf1RXh9BuGDKb1exse274l40D4 Message-ID: Subject: Re: git: 19728f31ae42 - main - sys/_types.h: Unbreak gcc build To: =?UTF-8?Q?Dag=2DErling_Sm=C3=B8rgrav?= Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="000000000000481f4a0644b930a6" --000000000000481f4a0644b930a6 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hello, I'm at main-n282229-687ab0dc54a9: Fri Nov 28 and gcc build still fails: /usr/include/sys/_types.h:164:46: error: missing binary operator before token "(" 164 | #if !defined(__has_feature) || !__has_feature(capabilities) | ^ gmake[3]: *** [Makefile:501: _trampoline.o] Error 1 Cheers, Dag-Erling Sm=C3=B8rgrav escreveu (sexta, 28/11/2025 =C3= =A0(s) 19:49): > The branch main has been updated by des: > > URL: > https://cgit.FreeBSD.org/src/commit/?id=3D19728f31ae421f40e2b0b0c775f4eed= d7f927be0 > > commit 19728f31ae421f40e2b0b0c775f4eedd7f927be0 > Author: Dag-Erling Sm=C3=B8rgrav > AuthorDate: 2025-11-28 19:47:04 +0000 > Commit: Dag-Erling Sm=C3=B8rgrav > CommitDate: 2025-11-28 19:47:22 +0000 > > sys/_types.h: Unbreak gcc build > > We can't assume that is in scope. > > Fixes: 85ab981a8e4e ("sys/_types.h: define fallback > __(u)intcap_t") > Reviewed by: olce, imp, emaste > Differential Revision: https://reviews.freebsd.org/D53980 > --- > sys/sys/_types.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/sys/sys/_types.h b/sys/sys/_types.h > index e368f44f950e..f3c80957af34 100644 > --- a/sys/sys/_types.h > +++ b/sys/sys/_types.h > @@ -161,7 +161,7 @@ typedef int __cpulevel_t; /* level > parameter for cpuset. */ > typedef int __cpusetid_t; /* cpuset identifier. */ > typedef __int64_t __daddr_t; /* bwrite(3), FIOBMAP2, etc */ > > -#if !__has_feature(capabilities) > +#if !defined(__has_feature) || !__has_feature(capabilities) > /* > * On non-CHERI systems, define __(u)intcap_t to __(u)intptr_t so that > * hybrid-C code which needs to be explicitly aware of capabilities can > > --=20 Nuno Teixeira FreeBSD UNIX: Web: https://FreeBSD.org --000000000000481f4a0644b930a6 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello,

I'm at main-n282229= -687ab0dc54a9: Fri Nov 28 and gcc build still fails:

/usr/incl= ude/sys/_types.h:164:46: error: missing binary operator before token "= ("
=C2=A0 164 | #if !defined(__has_feature) || !__has_feature(capab= ilities)
=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^
gmake[3]: *** [Makefil= e:501: _trampoline.o] Error 1

Cheers,

Dag= -Erling Sm=C3=B8rgrav <des@freebsd.or= g> escreveu (sexta, 28/11/2025 =C3=A0(s) 19:49):
The branch main has been updated by= des:

URL: https://cgit.= FreeBSD.org/src/commit/?id=3D19728f31ae421f40e2b0b0c775f4eedd7f927be0
commit 19728f31ae421f40e2b0b0c775f4eedd7f927be0
Author:=C2=A0 =C2=A0 =C2=A0Dag-Erling Sm=C3=B8rgrav <des@FreeBSD.org>=
AuthorDate: 2025-11-28 19:47:04 +0000
Commit:=C2=A0 =C2=A0 =C2=A0Dag-Erling Sm=C3=B8rgrav <des@FreeBSD.org>=
CommitDate: 2025-11-28 19:47:22 +0000

=C2=A0 =C2=A0 sys/_types.h: Unbreak gcc build

=C2=A0 =C2=A0 We can't assume that <sys/cdefs.h> is in scope.

=C2=A0 =C2=A0 Fixes:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 85ab981a8e4e ("= sys/_types.h: define fallback __(u)intcap_t")
=C2=A0 =C2=A0 Reviewed by:=C2=A0 =C2=A0 olce, imp, emaste
=C2=A0 =C2=A0 Differential Revision:=C2=A0 https://reviews.freebsd= .org/D53980
---
=C2=A0sys/sys/_types.h | 2 +-
=C2=A01 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/sys/_types.h b/sys/sys/_types.h
index e368f44f950e..f3c80957af34 100644
--- a/sys/sys/_types.h
+++ b/sys/sys/_types.h
@@ -161,7 +161,7 @@ typedef=C2=A0 =C2=A0 =C2=A0int=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0__cpulevel_t;=C2=A0 =C2=A0/* level parameter for cp= uset. */
=C2=A0typedef int=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 __cpusetid_t;=C2= =A0 =C2=A0/* cpuset identifier. */
=C2=A0typedef __int64_t=C2=A0 =C2=A0 =C2=A0 __daddr_t;=C2=A0 =C2=A0 =C2=A0 = /* bwrite(3), FIOBMAP2, etc */

-#if !__has_feature(capabilities)
+#if !defined(__has_feature) || !__has_feature(capabilities)
=C2=A0/*
=C2=A0 * On non-CHERI systems, define __(u)intcap_t to __(u)intptr_t so tha= t
=C2=A0 * hybrid-C code which needs to be explicitly aware of capabilities c= an



--
Nuno Teixeira
=
FreeBSD UNIX:=C2=A0 <eduardo@FreeBSD.org>=C2=A0 =C2=A0Web:=C2=A0 https://Fr= eeBSD.org
--000000000000481f4a0644b930a6-- From nobody Sat Nov 29 10:38:50 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dJRV421SPz6HXxl; Sat, 29 Nov 2025 10:38:52 +0000 (UTC) (envelope-from des@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dJRV41SMcz47L9; Sat, 29 Nov 2025 10:38:52 +0000 (UTC) (envelope-from des@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764412732; 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=yqLd133Ex0b3cFLhkyTdDgRgJNDOHJROR+J0dXjuHLg=; b=WDmP2PUYEDlAf7j9Qcy+A8wftFiqHrXMUnlvNLeU1HgpN60vJgwfBIl6KoPlniBqq1l8M1 dInNlm06sLxXWtTxavw/bDcnecBeWDNzesDRuGLtN5ZLABRY/D0NYAG2yVmEWclJD5BkYU Wm46ACG2f/jAzf/n/xN6mcHvAzJk0HrUVwo6FLR5+zUO8cxr97MVpCnXzexvJy8bCPXaT8 uDovHGZaD4+gKcleDpL0KP1MTMCp/YiMdePxSexRsvoJh8TQJJhdkzxYKXf56az3McvEtJ l4q8dmNfk/2Zwhg5DnBi5QvOJRmcK+kQb2XlRYkXlbtbXzes3v50uIZj5njLlw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764412732; 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=yqLd133Ex0b3cFLhkyTdDgRgJNDOHJROR+J0dXjuHLg=; b=PJ09VLzi91XBxv4WDUJcxb8cfsyR/ekibpU0Ed6DLR9cpbZcZeZze0q2ioqlYC6gIPA0u6 hgA10eYQ1qrrte5EwPX6xvntmTht4p4vuucew1wuIjJqiqODrkaVG3Ow4aGOD2nionHppE JszMZHg1S8vPGcCQyiey711tCLT8ouH55ABwKTdpDZALzGmwuha/ilKoSpVL96fUjW/gaI 3J9Uw+xQ9MlF3jWCq/mHlzm6gInlR9lGtd5UWTQiozr/vfRK7AeQIrKlrXGUH56EeO2Fy6 HVgNFqeWJ55cKfI/jFmdK2zPvoX/U3O31qZ8CATfHqjuTlDw+z/tT6743DVxSw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764412732; a=rsa-sha256; cv=none; b=cPYX6foaZokd8nHv8UZBugVMrtfQ27dihD2ksEnmKxcPtWj0kvq52PodSD+XS41cz5S3Dw 0exewSOrP7Vxqc9q067OGPxxy5a5n1YK77fkk8QFYtqoRnGAS1hvUVgGHAe0EKjCol8KB7 SO+e9m2tbHF5IeWj6+OMzM/5cLkF3L51Uettd98YxcVHfkZHNoIxzJ4Pd5WaG1ucv7JX+H cODu5+fvBRSQ3S5gqXsFVYZZ+KlF6ZTDaYijk7dVMmEdRkDuovRD9R31ZC9wiipS6TqRyi EPtNyyDwmmKaeMqzRRPwRrDpE2TN5YlO96HjlrNuMmWRr6JfDe6No11LLJkZqQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from ltc.des.dev (lfbn-nan-1-698-103.w86-236.abo.wanadoo.fr [86.236.35.103]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: des) by smtp.freebsd.org (Postfix) with ESMTPSA id 4dJRV404M4zCgy; Sat, 29 Nov 2025 10:38:51 +0000 (UTC) (envelope-from des@freebsd.org) Received: by ltc.des.dev (Postfix, from userid 1001) id 116FD8EE05; Sat, 29 Nov 2025 11:38:50 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Nuno Teixeira Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 19728f31ae42 - main - sys/_types.h: Unbreak gcc build In-Reply-To: (Nuno Teixeira's message of "Sat, 29 Nov 2025 10:26:58 +0000") References: <6929fcae.2962d.8015a0f@gitrepo.freebsd.org> User-Agent: Gnus/5.13 (Gnus v5.13) Date: Sat, 29 Nov 2025 11:38:50 +0100 Message-ID: <86345xi0n9.fsf@ltc.des.dev> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Nuno Teixeira writes: > I'm at main-n282229-687ab0dc54a9: Fri Nov 28 and gcc build still fails: > > /usr/include/sys/_types.h:164:46: error: missing binary operator before t= oken "(" > =C2=A0 164 | #if !defined(__has_feature) || !__has_feature(capabilities) > =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^ > gmake[3]: *** [Makefile:501: _trampoline.o] Error 1 I know, and I don't understand why... what's really weird is this: $ x86_64-unknown-freebsd14.3-gcc13 -E sys/sys/_types.h >/dev/null sys/sys/_types.h:164:46: error: missing binary operator before token "(" 164 | #if !defined(__has_feature) || !__has_feature(capabilities) | ^ as expected, but $ x86_64-unknown-freebsd14.3-gcc13 -E sys/sys/_types.h | less +Gq no error! anyway, see https://reviews.freebsd.org/D53986 DES --=20 Dag-Erling Sm=C3=B8rgrav - des@FreeBSD.org From nobody Sun Nov 30 01:45:45 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dJqcV2knBz6Jf7q for ; Sun, 30 Nov 2025 01:45:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dJqcV0PTBz3m7x for ; Sun, 30 Nov 2025 01:45:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764467146; 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=TqmrKaKEhly3SII9ORvv0OpWrR3r2eCKpDuDh6G3XjY=; b=fwrWfFIUmc3C5oYOtICVrUTriBygszDiN72VPGme5hG8Lj1VpZRtA71s+U+4jlyKZXnxKO wcIGra3E/v1DGCO9+8INISAZSMLFGdTMGehwgoaK+9smJmgS1RTzMoWxfnSj19BfGNZX0H xdIHDpQn78S8iHPTjyO87IJqt6s6TPC8YqVvBZZMG1LDzNDAIscz1dCkDEACj3mulSt4UA d0zZYSagZ7r+bL9eMtHU9i3w8k8IHz6qu/EBkbe0GTziyKQ7nR7bE0GiO+zxOrGEj7THgK DpRg8v0VRmMRgHYvnonNulmQyy8bqd6iTIxZfUZUTz61pfvFQ+lMMwLh2vX3gw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764467146; 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=TqmrKaKEhly3SII9ORvv0OpWrR3r2eCKpDuDh6G3XjY=; b=iN2RRlkYNHSi9R5etql79mjsabg5wObc7FWt8CYF+iPmpMmL5/d68abdrzBl8+awvsNG2N 4fTXvu1iOfqQIrl8/yUryf+LRG8+QSG4wUjEEoYTWD+15WT3oXStI8PvCndP+JzvoSiYTm L58nl4fuWcliDxEgkRQ5psFRCUVK3VkyTqbKGYIbQSgi/yeZeGDgDl/3Y8mp8AyKg5biSA aNHXelt/f+bc5JivpqnXatq/1IDc+3fOY7d872MxDTVUQISK7tTDbZTILMG1e71xbQd449 BIVU8Sz2DE1OXaxwB3U5zjTxagdM4w1unB9EutYDVI2uPI0V3AU7IPwnJiVbXw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764467146; a=rsa-sha256; cv=none; b=jGPxvwmDBFUm4pvFwT0ts5IHkr6nw/Fp5OJ0nVBHx882pHpiFyK8GF8eb7pzToWYfeLyPd ouWaMhn3qyoHgiIUJaHv4zjbA+I0wfB7Y+CVqomv8JLODsON3NSZ5AzmZhiSL6HN9AX5Ir 2O19Zh9Wp2el1Rre0BSWRuLjYZZlIlGRYV22IqJHPxaZifoXn/PKQjGLag5a1f75QbNf24 MUuut0lCsaCKLKs2yZMZ/VLQ8Gt6cQg2yuflPcLokF5Bnf9gX/6RFrLmp9MJnqtVOjYo+h tDyjkmAXkU9jPnYtRGNlup6CnyEdYSmqr1gPigEpRahUXQH5AJrmdcIOBly18w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dJqcT6VKdzT6 for ; Sun, 30 Nov 2025 01:45:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 29cae by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 30 Nov 2025 01:45:45 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Strahinja =?utf-8?Q?Stani=C5=A1?==?utf-8?Q?i=C4=87?= From: Robert Clausecker Subject: git: 8a02704131b8 - stable/15 - libc: scalar strrchr() in RISC-V assembly List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: fuz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 8a02704131b84826f4a327097361199d9762a471 Auto-Submitted: auto-generated Date: Sun, 30 Nov 2025 01:45:45 +0000 Message-Id: <692ba1c9.29cae.10676243@gitrepo.freebsd.org> The branch stable/15 has been updated by fuz: URL: https://cgit.FreeBSD.org/src/commit/?id=8a02704131b84826f4a327097361199d9762a471 commit 8a02704131b84826f4a327097361199d9762a471 Author: Strahinja Stanišić AuthorDate: 2024-10-24 16:18:07 +0000 Commit: Robert Clausecker CommitDate: 2025-11-30 00:43:05 +0000 libc: scalar strrchr() in RISC-V assembly Implements strrchr in RISC-V assembly, leading to the following improvements (performance measured on SiFive HF105-001) os: FreeBSD arch: riscv │ strrchr_baseline │ strrchr_scalar │ │ sec/op │ sec/op vs base │ Short 837.2µ ± 1% 574.6µ ± 1% -31.37% (p=0.000 n=20+21) Mid 639.7µ ± 0% 269.7µ ± 0% -57.84% (p=0.000 n=20+21) Long 589.1µ ± 0% 176.7µ ± 0% -70.01% (p=0.000 n=20+21) geomean 680.8µ 301.4µ -55.73% │ strrchr_baseline │ strrchr_scalar │ │ MiB/s │ MiB/s vs base │ Short 149.3 ± 1% 217.6 ± 1% +45.71% (p=0.000 n=20+21) Mid 195.4 ± 0% 463.6 ± 0% +137.22% (p=0.000 n=20+21) Long 212.2 ± 0% 707.4 ± 0% +233.40% (p=0.000 n=20+21) geomean 183.6 414.7 +125.88% MFC after: 1 month MFC to: stable/15 Approved by: mhorne, markj (mentor) Sponsored by: Google LLC (GSoC 2024) Differential Revision: https://reviews.freebsd.org/D47275 (cherry picked from commit df21a004be237a1dccd03c7b47254625eea62fa9) --- lib/libc/riscv/string/Makefile.inc | 2 + lib/libc/riscv/string/strrchr.S | 124 +++++++++++++++++++++++++++++++++++++ 2 files changed, 126 insertions(+) diff --git a/lib/libc/riscv/string/Makefile.inc b/lib/libc/riscv/string/Makefile.inc new file mode 100644 index 000000000000..a9cf8bf52481 --- /dev/null +++ b/lib/libc/riscv/string/Makefile.inc @@ -0,0 +1,2 @@ +MDSRCS+= \ + strrchr.S diff --git a/lib/libc/riscv/string/strrchr.S b/lib/libc/riscv/string/strrchr.S new file mode 100644 index 000000000000..51f34ca21fac --- /dev/null +++ b/lib/libc/riscv/string/strrchr.S @@ -0,0 +1,124 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2024 Strahinja Stanisic + */ + +#include + +/* + * a0 - const char *s + * a1 - int c + */ +ENTRY(strrchr) + /* + * a0 - const char *ptr_align + * a1 - temporary + * a2 - temporary + * a3 - temporary + * a4 - temporary + * a5 - const char[8] cccccccc + * a6 - const uint64_t *save_align + * a7 - const uint64_t save_iter + * t0 - const uintr64_t REP8_0X01 + * t1 - const uintr64_t REP8_0X80 + */ + + /* + * save_align = 0 + * save_iter = 0xFFFFFFFFFFFFFF00 + * REP8_0X01 = 0x0101010101010101 + * cccccccc = (char)c * REP8_0X01 + * REP8_0X80 = (REP8_0X80 << 7) << ((str % 8) * 8) + * ptr_align = str - str % 8 + */ + li t0, 0x01010101 + li a6, 0 + slli a2, a0, 3 + slli t1, t0, 32 + li a7, 0xFFFFFFFFFFFFFF00 + or t0, t0, t1 + andi a1, a1, 0xFF + slli t1, t0, 7 + andi a0, a0, ~0b111 + mul a5, a1, t0 + sll t1, t1, a2 + +.Lloop: /* do { */ + ld a1, 0(a0) /* a1 -> data = *ptr_align */ + not a3, a1 /* a3 -> nhz = ~data */ + xor a2, a1, a5 /* a2 -> iter = data ^ cccccccc */ + sub a1, a1, t0 /* a1 -> hz = data - REP8_0X01 */ + not a4, a2 /* a4 -> nhc = ~iter */ + and a1, a1, a3 /* hz = hz & nhz */ + sub a3, a2, t0 /* a3 -> hc = iter - REP8_0X01 */ + and a1, a1, t1 /* hz = hz & REP8_0X80 */ + and a3, a3, a4 /* hc = hc & nhc */ + addi a4, a1, -1 /* a4 -> mask_end = hz - 1 */ + and a3, a3, t1 /* hc = hc & REP8_0X80 */ + xor a4, a4, a1 /* mask_end = mask_end ^ hz */ + addi a0, a0, 8 /* ptr_align = ptr_align + 8 */ + and a3, a3, a4 /* hc = hc & mask_end */ + slli t1, t0, 7 /* REP8_0X80 = REP8_0X01 << 7 */ + not a4, a4 /* mask_end = ~mask_end */ + + beqz a3, .Lskip_save /* if(!hc) goto skip_save */ + or a2, a2, a4 /* iter = iter | mask_end */ + addi a6, a0, -8 /* save_align = ptr_align - 8 */ + mv a7, a2 /* save_iter = iter */ + +.Lskip_save: + beqz a1, .Lloop /* } while(!hz) */ + +.Lfind_char: + /* + * a1 -> iter = save_iter + * a2 -> mask_iter = 0xFF00000000000000 + * a3 -> match_off = 7 + */ + li a2, 0xFF + mv a1, a7 + slli a2, a2, 56 + li a3, 7 + + and a0, a1, a2 + srli a2, a2, 8 + beqz a0, .Lret + + addi a3, a3, -1 + and a0, a1, a2 + srli a2, a2, 8 + beqz a0, .Lret + + addi a3, a3, -1 + and a0, a1, a2 + srli a2, a2, 8 + beqz a0, .Lret + + addi a3, a3, -1 + and a0, a1, a2 + srli a2, a2, 8 + beqz a0, .Lret + + addi a3, a3, -1 + and a0, a1, a2 + srli a2, a2, 8 + beqz a0, .Lret + + addi a3, a3, -1 + and a0, a1, a2 + srli a2, a2, 8 + beqz a0, .Lret + + addi a3, a3, -1 + and a0, a1, a2 + srli a2, a2, 8 + beqz a0, .Lret + + addi a3, a3, -1 + +.Lret: + /* return save_align + match_offset */ + add a0, a6, a3 + ret +END(strrchr) From nobody Sun Nov 30 01:45:48 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dJqcX4SWzz6Jf5r for ; Sun, 30 Nov 2025 01:45:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dJqcX1z3hz3mKs for ; Sun, 30 Nov 2025 01:45:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764467148; 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=llD3Ij8ZdLqI3C81mdaivnoQT4c16twBnLOWCY9CwiU=; b=Bt/DNabcoykTy5dxwl7MTL8qu/hTN9hCqXzfk5ih4p5D7L2SX/5GPkkyk2gl2bnAOD0MKk G0jiTl13f5olsnhz46KXTiF7IOvrtnZrYgztL9ed2T/LOJgWi4uxcNXmEHIkFybjX49qNn Q32f1KFrNYC/TZI7S1p9yNeC33py3pSthmxfieDN5fAUPYDMnpnDnJ4krB1DImv7zKLv3V s1g7eTlaVZwv4ILd+4l1amU5zJKOO58N0LA1v2Usb+JeOdSAVuYqIsggdiw7JnMl0uOzYv zIAASjNWXtjIktBAApJqNSycy7yVJ+TrgPmI2m8VSb9+AgCAlcCfjmZSXNRxeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764467148; 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=llD3Ij8ZdLqI3C81mdaivnoQT4c16twBnLOWCY9CwiU=; b=mmESXLkqz33RiYKRuQILmRZgyO8MzAx05KnJSAbWYRNxLL8RePEUT2ZcGpMO+tJEaeCVjS CitR+ujpFNY3BfSNYte8LBqCqAcoKljt5r1dvEVpcHeP60nBEPDBAiuz86F/6GAK2KE9cP 5plYfadm6t9/OD1+ef8PGKuJaigAEWlmi5XKP2JdM+4ry2S12BzjjsGdf6KhKtJkZGIiB6 T18oQ0Aaay5Z4S0oeOET+Vel821yLkyIpVRMsnYiSpdzGjABFo2XiQxM1kz6F3G+5DLnIC G68HARsxQjgmvtKEEJg+w0V0Li3e6wtMKZI0BopNwHJJDfj1qfbOfaJRGYKOYg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764467148; a=rsa-sha256; cv=none; b=KwIlF7w5YyeCCSX5dc7pfda0KrGVmQG0DHt8Ns1bfNQxpgIUB8UEpzxqFsILq44TKhVeYq oJMzbIGNutJN2nPFANuuVIK48lEQJfswTNd92COa70e1TCRffIJNY4Y8rNKdCPx4Jfh2hq HVxLZJQP34muZekv5ljoJAI+hPmGL7n34/o11dI35IfhsG45dtzGxqQuULdiNuD3t/dBHb Blp38akYoG0f8fzGT7huBclRWz/h+G5gk12wbyxrwGVbHYQkhvXpL8y4mOx5lNQ6Lb+/tu WUeNOmCfXUBJImOB0mlQ6e0jeqsKx7CQ4fjnOrnyQac+X6MMFR2vIjCTOdC2XQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dJqcX12thzFD for ; Sun, 30 Nov 2025 01:45:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 29374 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 30 Nov 2025 01:45:48 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Strahinja =?utf-8?Q?Stani=C5=A1?==?utf-8?Q?i=C4=87?= From: Robert Clausecker Subject: git: 514677bd33fb - stable/15 - libc: scalar memchr() in RISC-V assembly List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: fuz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 514677bd33fb8f9d99d0f4f51be0efb4bcd86583 Auto-Submitted: auto-generated Date: Sun, 30 Nov 2025 01:45:48 +0000 Message-Id: <692ba1cc.29374.13d96c2b@gitrepo.freebsd.org> The branch stable/15 has been updated by fuz: URL: https://cgit.FreeBSD.org/src/commit/?id=514677bd33fb8f9d99d0f4f51be0efb4bcd86583 commit 514677bd33fb8f9d99d0f4f51be0efb4bcd86583 Author: Strahinja Stanišić AuthorDate: 2024-07-17 11:19:52 +0000 Commit: Robert Clausecker CommitDate: 2025-11-30 00:43:05 +0000 libc: scalar memchr() in RISC-V assembly Added an optimized memchr() implementation in RISC-V assembly and updated the relevant manpage. │ memchr_baseline │ memchr_scalar │ │ sec/op │ sec/op vs base │ Short 636.6µ ± 1% 495.9µ ± 1% -22.10% (p=0.000 n=20) Mid 279.7µ ± 1% 224.1µ ± 1% -19.87% (p=0.000 n=20) Long 138.8µ ± 0% 124.9µ ± 0% -10.00% (p=0.000 n=20) geomean 291.3µ 240.3µ -17.48% │ memchr_baseline │ memchr_scalar │ │ B/s │ B/s vs base │ Short 187.3Mi ± 1% 240.4Mi ± 1% +28.37% (p=0.000 n=20) Mid 426.2Mi ± 1% 531.9Mi ± 1% +24.79% (p=0.000 n=20) Long 859.0Mi ± 0% 954.4Mi ± 0% +11.11% (p=0.000 n=20) geomean 409.3Mi 496.0Mi +21.19% MFC after: 1 month MFC to: stable/15 Approved by: mhorne, markj (mentor) Reviewed by: fuz Sponsored by: Google LLC (GSoC 2024) Differential Revision: https://reviews.freebsd.org/D46023 (cherry picked from commit 563efdd3bd5d5f94e356444bb64fd66e13dda5e1) --- lib/libc/riscv/string/Makefile.inc | 1 + lib/libc/riscv/string/memchr.S | 188 +++++++++++++++++++++++++++++++++++++ 2 files changed, 189 insertions(+) diff --git a/lib/libc/riscv/string/Makefile.inc b/lib/libc/riscv/string/Makefile.inc index a9cf8bf52481..cdbc19d286fc 100644 --- a/lib/libc/riscv/string/Makefile.inc +++ b/lib/libc/riscv/string/Makefile.inc @@ -1,2 +1,3 @@ MDSRCS+= \ + memchr.S \ strrchr.S diff --git a/lib/libc/riscv/string/memchr.S b/lib/libc/riscv/string/memchr.S new file mode 100644 index 000000000000..e6e04bfae96a --- /dev/null +++ b/lib/libc/riscv/string/memchr.S @@ -0,0 +1,188 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2024 Strahinja Stanisic + */ + +#include + +/* + * a0 - const void *b + * a1 - int c + * a2 - size_t len + */ +ENTRY(memchr) + /* + * a0 - const char *ptr + * a1 - char cccccccc[8] + * a2 - char iter[8] + * a3 - uint8_t *end + * a4 - uint64_t *end_align + * a5 - uint64_t *end_unroll + */ + + beqz a2, .Lno_match + + /* c = (uint8_t) c */ + andi a1, a1, 0xFF + + /* + * t0 = 0x0101010101010101 + * t1 = 0x8080808080808080 + * t2 = b << 3 + * cccccccc = (uint8_t)c * t0 + * end = b + len; + * ptr = b & ~0b111 + */ + add a3, a0, a2 + li t0, 0x01010101 + sltu t2, a0, a3 + slli t1, t0, 32 + neg t2, t2 + or t0, t0, t1 + and a3, a3, t2 + slli t1, t0, 7 + slli t2, a0, 3 + and a0, a0, ~0b111 + mul a1, t0, a1 + + ld a2, (a0) + + /* + * mask_start = REP8_0x01 ^ (REP8_0x01 << t2) + * iter = iter ^ cccccccc + * iter = iter | mask_start + */ + sll t2, t0, t2 + xor a2, a2, a1 + xor t2, t2, t0 + or a2, a2, t2 + + /* has_zero(iter) + * end_align = (end + 7) & ~0b111; + */ + addi a4, a3, 7 + not t2, a2 + sub a2, a2, t0 + and t2, t2, t1 + andi a4, a4, ~0b111 + and a2, a2, t2 + + /* ptr = ptr + 8 */ + addi a0, a0, 8 + + bnez a2, .Lfind_zero + + /* if(ptr == end_align) */ + beq a0, a4, .Lno_match + + /* end_unroll = end_align & ~0b1111 */ + andi a5, a4, ~0b1111 + + /* + * Instead of branching to check if `ptr` is 16-byte aligned: + * - Probe the next 8 bytes for `c` + * - Align `ptr` down to the nearest 16-byte boundary + * + * If `ptr` was already 16-byte aligned, those 8 bytes will be + * checked again inside the unrolled loop. + * + * This removes an unpredictable branch and improves performance. + */ + + ld a2, (a0) + xor a2, a2, a1 + + not t2, a2 + sub a2, a2, t0 + and t2, t2, t1 + and a2, a2, t2 + + addi a0, a0, 8 + + bnez a2, .Lfind_zero + + andi a0, a0, ~0b1111 + + /* while(ptr != end_unroll) */ + beq a0, a5, .Lskip_loop +.Lloop: + ld a2, (a0) + ld t3, 8(a0) + + xor a2, a2, a1 + xor t3, t3, a1 + + not t2, a2 + not t4, t3 + sub a2, a2, t0 + sub t3, t3, t0 + and t2, t2, t1 + and t4, t4, t1 + and a2, a2, t2 + and t3, t3, t4 + + addi a0, a0, 8 + + bnez a2, .Lfind_zero + + /* move into iter for find_zero */ + mv a2, t3 + + addi a0, a0, 8 + + bnez a2, .Lfind_zero + + bne a0, a5, .Lloop +.Lskip_loop: + + /* there might be one 8byte left */ + beq a0, a4, .Lno_match + + ld a2, (a0) + xor a2, a2, a1 + + not t2, a2 + sub a2, a2, t0 + and t2, t2, t1 + and a2, a2, t2 + + addi a0, a0, 8 + + beqz a2, .Lno_match + +.Lfind_zero: + /* + * ptr = ptr - 8 + * t1 = 0x0001020304050607 + * iter = iter & (-iter) + * iter = iter >> 7 + * iter = iter * t1 + * iter = iter >> 56 + */ + li t1, 0x10203000 + neg t0, a2 + slli t1, t1, 4 + and a2, a2, t0 + addi t1, t1, 0x405 + srli a2, a2, 7 + slli t1, t1, 16 + addi a0, a0, -8 + addi t1, t1, 0x607 + mul a2, a2, t1 + srli a2, a2, 56 + + /* left = end - ptr */ + sub t0, a3, a0 + + /* return iter < left ? ptr + iter : NULL */ + sltu t1, a2, t0 + neg t1, t1 + add a0, a0, a2 + and a0, a0, t1 + ret + +.Lno_match: + li a0, 0 + ret +END(memchr) From nobody Sun Nov 30 01:45:49 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dJqcY4cPBz6Jf5s for ; Sun, 30 Nov 2025 01:45:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dJqcY2LLyz3mPZ for ; Sun, 30 Nov 2025 01:45:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764467149; 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=HMTlLc471Fapyj6KF6X4xA6g5AGJSE6nGVBQlsepcRc=; b=hrMXiWw6Ege+M67BpyhOvPkv5fand30CwL83xDOyenpCJY/hR3wfrtX9Tt6Gfrmn2hp+t3 qu+u0JPWVTlO9Xw3m4Ah4epRIR08fD0ynbY7TclITK34iktOGGpRy9ztHbAu+7ptcMTe5H iayn4/QpR826ZSxhjEdQE85NAihj9amlmyMKhcILGnpxbzZ1+y8mth892n6xKrRhykkca2 sr0Y11Uc8eYsXeXiEf29bD6kIC7aS0mHS8PR8oEw8h0gkQmP7d0RQWxj5LSsSdkElUzRac OgeB6EVvaAdpWqoygVxEPT+Xu+6qHBghTZBGByxbgLlS3qf5Gs6TheI02RD/3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764467149; 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=HMTlLc471Fapyj6KF6X4xA6g5AGJSE6nGVBQlsepcRc=; b=fqA0Xy/Hbd9KWjpPr7FgBRk63sXEsZ6lXW2ZolPTVZyQzUajsMBbp2Nk3rKU9O2aiE/ErH nVM1B2Yc29MtJW8URp5VKDa6FAYW0WKhHV+nr4L91gKZL5hUmx7DYXPs3oomXqLAG+dilO qT8HV+t8+fUirsMAViVbZ7g53KVmLs4X3UmPZQ83CcdXTpBzUVASh/sAz8xA8djrQNVkXW SBnfZfPPA5Xl4OCHds73fgFjMYNkpjlp/8s3qo3QsDG8APGqZquAdHxVKvBH7LhYfZdtER ROWvoHpyww1uPqLT7U4Yy3DOMfI5sjgI+mOvFJ39gb13DTQ+LqxU0gAxHzPEGw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764467149; a=rsa-sha256; cv=none; b=xJEpDKDSTMm2Yt7uI23BQT1328VcFmRYJgZo9OnNgeTEYwm+kzKoSVRiRgKEhuT4ztNOp9 cY+YipXNj2B+N0alEXb7HWF0Dkz1a8vg9ZAtuMLe1U5EUmr92onzi8dkq7QCTj2gzVLtoE mnEehWkrWOUinpTOtgzbGXI+9apLY7lFuHizP1kx0CXUU9V3Da2KUjOyrqSS4FeRH4t952 j1gkQPNtjv00FNRCYWE0KrhqtR00FBHUK71AmXsy+xS43qxJ6AabD5RyNls92v/pDRc4Pw uJJuwKXbevBDMKUrE5kw/S5sbbOKcx7/bAI43TGLytlLSnWYz04/4YYwksQc8w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dJqcY1wlczPv for ; Sun, 30 Nov 2025 01:45:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2877d by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 30 Nov 2025 01:45:49 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Strahinja =?utf-8?Q?Stani=C5=A1?==?utf-8?Q?i=C4=87?= From: Robert Clausecker Subject: git: 8c9581a829be - stable/15 - simd.7: add scalar memchr() for RISC-V to manpage List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: fuz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 8c9581a829be8989b8ce65ef6f0067279b31bf2d Auto-Submitted: auto-generated Date: Sun, 30 Nov 2025 01:45:49 +0000 Message-Id: <692ba1cd.2877d.4211481d@gitrepo.freebsd.org> The branch stable/15 has been updated by fuz: URL: https://cgit.FreeBSD.org/src/commit/?id=8c9581a829be8989b8ce65ef6f0067279b31bf2d commit 8c9581a829be8989b8ce65ef6f0067279b31bf2d Author: Strahinja Stanišić AuthorDate: 2024-07-18 17:57:51 +0000 Commit: Robert Clausecker CommitDate: 2025-11-30 00:43:05 +0000 simd.7: add scalar memchr() for RISC-V to manpage MFC after: 1 month MFC to: stable/15 Approved by: mhorne, markj (mentor) Sponsored by: Google LLC (GSoC 2024) Differential Revision: https://reviews.freebsd.org/D46023 (cherry picked from commit d2c23f5953a823e01f0c6418b0f98c119f145e20) --- share/man/man7/simd.7 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/man/man7/simd.7 b/share/man/man7/simd.7 index 92cbbdee25a4..31a4e3b0844f 100644 --- a/share/man/man7/simd.7 +++ b/share/man/man7/simd.7 @@ -58,7 +58,7 @@ Enhanced functions are present for the following architectures: .It index Ta A Ta Ta S1 .It ldiv Ta Ta Ta S Ta S .It lldiv Ta Ta Ta S -.It memchr Ta A Ta Ta S1 +.It memchr Ta A Ta Ta S1 Ta Ta Ta S .It memcmp Ta A Ta S Ta S1 Ta S .It memccpy Ta A Ta Ta S1 .It memcpy Ta A Ta S Ta S Ta S Ta SV From nobody Sun Nov 30 01:45:50 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dJqcZ5JZ4z6JfBD for ; Sun, 30 Nov 2025 01:45:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dJqcZ3Pjhz3mKv for ; Sun, 30 Nov 2025 01:45:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764467150; 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=sZwB2Zxrz1V4nlDMvRnzU0/CvR4CfO5lOU1vgY09YFE=; b=Bidg+Jz38C/ZS3dZ2ighUW1LvMmTtmjEYDwyD+iLnV73YaP53Jbu7JfabwX2332daplUR4 JaYeqZORtaIrnLn+47Pn0ItJZ9uD/mxVY/4hy7vQg/fmIf02SRYJeBRnRhOgNZPEp06KLr JD2pBYH0c3udJBPesvQwSOHQXdLI6GGlViPcEC/K1e7wDm503wKa0mW1zTET+0UkhvW/Wh BVnN5Zm3SJv/KgV+gamFdEpZb8EQ+WVmrimD3ft3YTRYQIh4eNnSkWCpUPbUO+K22L1p/t /SVzoqX5RHSbVNnYUpTq43FyX2bGqNAJ7HAYTY5vlDyRWMIvUuf1BTOC3ddiEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764467150; 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=sZwB2Zxrz1V4nlDMvRnzU0/CvR4CfO5lOU1vgY09YFE=; b=bkFAHb4qgdf7x8VWqc2s+j4fNK0UCSm6D4UQG/gGxG2r8DDlePZanT5gLFim8ksPtDEHj0 W6btESY8smyjfEuloWWrpQRgUrzuQj+CM2r//so2ShVUnBvY3Lshhr5O3SY62CcBKaTrPx 51ENJ+GCBqwS3ISxW87o+LJREUEm9rhXjubHtxvLmCeOTp+6I5Oy0yUyj6IMPzydXNY1EB PVbE17TdlJrCy7Z8qPZ9N0210Zi/+UiXJXlCOaSimmkL0GYtzWv7J2/bm/NJbH0+AEMvia KMdA9rCT7XLFBTesQj5GTDxosxAGtoDQX+TQ3KVAav1vznYJlsnAayfNjQkpyA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764467150; a=rsa-sha256; cv=none; b=cC1GBUE4fBOgg4cm1jPqb7OPNAjKjDx3z4IkRED9wFahiCvjeOy+trz9cHEN5FshLIijrG y3itYvV6zQbj0QioEMFJsvFJUvFzythRMlgzbyD/Pn+lXgGNoCB6vsPIpyF4xdRm2mYk2j qefBG9YzEYNxqk/wsYq3RzAIylX54lHbsMp1ovTrxOpxoias/KdO+B7WeV6gjXOJhKPRd7 SZPJOFQiJzlehDtrUT9nrxqqZ9JgtA7Nk09nZOhaXN/v7TzbL7PzkBFDWFuM21x0WPrAqB zYkqdHgqwUGZepyF8r5Ble5yCdzFeT9HYVKASYKcdPODQpXJd4YwfssSctpX/w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dJqcZ2nKbzPx for ; Sun, 30 Nov 2025 01:45:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 28660 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 30 Nov 2025 01:45:50 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Strahinja =?utf-8?Q?Stani=C5=A1?==?utf-8?Q?i=C4=87?= From: Robert Clausecker Subject: git: 2d205cdb41e3 - stable/15 - libc: scalar memset() in RISC-V assembly List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: fuz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 2d205cdb41e375ab5fcdab9233439aec75eeebd6 Auto-Submitted: auto-generated Date: Sun, 30 Nov 2025 01:45:50 +0000 Message-Id: <692ba1ce.28660.7af4e31b@gitrepo.freebsd.org> The branch stable/15 has been updated by fuz: URL: https://cgit.FreeBSD.org/src/commit/?id=2d205cdb41e375ab5fcdab9233439aec75eeebd6 commit 2d205cdb41e375ab5fcdab9233439aec75eeebd6 Author: Strahinja Stanišić AuthorDate: 2024-06-21 15:43:45 +0000 Commit: Robert Clausecker CommitDate: 2025-11-30 00:43:05 +0000 libc: scalar memset() in RISC-V assembly Adds scalar implementation of memset for RISC-V and updates the relevant manpage os: FreeBSD arch: riscv │ ./results/memset/memset_baseline │ ./results/memset/memset_scalar │ │ sec/op │ sec/op vs base │ 40 527.5µ ± 1% 479.4µ ± 1% -9.12% (p=0.000 n=20) 168 254.5µ ± 1% 216.7µ ± 1% -14.86% (p=0.000 n=20) 2k 169.5µ ± 1% 128.4µ ± 0% -24.24% (p=0.000 n=20) 256k 161.2µ ± 1% 118.6µ ± 1% -26.42% (p=0.000 n=20) 16m 56.58m ± 0% 53.91m ± 0% -4.72% (p=0.000 n=20) geomean 730.2µ 611.2µ -16.29% │ ./results/memset/memset_baseline │ ./results/memset/memset_scalar │ │ B/s │ B/s vs base │ 40 452.0Mi ± 1% 497.3Mi ± 1% +10.04% (p=0.000 n=20) 168 936.9Mi ± 1% 1100.4Mi ± 1% +17.45% (p=0.000 n=20) 2k 1.373Gi ± 1% 1.813Gi ± 0% +32.00% (p=0.000 n=20) 256k 1.444Gi ± 1% 1.962Gi ± 1% +35.91% (p=0.000 n=20) 16m 269.7Mi ± 0% 283.1Mi ± 0% +4.96% (p=0.000 n=20) geomean 750.1Mi 896.1Mi +19.47% MFC after: 1 month MFC to: stable/15 Approved by: mhorne, markj (mentor) Reviewed by: fuz Sponsored by: Google LLC (GSoc 2024) Differential Revision: https://reviews.freebsd.org/D45730 (cherry picked from commit 40a958d5850ddda6d863558c8b31572f700d53ca) --- lib/libc/riscv/string/Makefile.inc | 1 + lib/libc/riscv/string/memset.S | 95 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 96 insertions(+) diff --git a/lib/libc/riscv/string/Makefile.inc b/lib/libc/riscv/string/Makefile.inc index cdbc19d286fc..44aeb65bf1f7 100644 --- a/lib/libc/riscv/string/Makefile.inc +++ b/lib/libc/riscv/string/Makefile.inc @@ -1,3 +1,4 @@ MDSRCS+= \ memchr.S \ + memset.S \ strrchr.S diff --git a/lib/libc/riscv/string/memset.S b/lib/libc/riscv/string/memset.S new file mode 100644 index 000000000000..ca435dfdd5c1 --- /dev/null +++ b/lib/libc/riscv/string/memset.S @@ -0,0 +1,95 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2024 Strahinja Stanisic + */ + +#include + +/* + * register a0 - void *dest + * register a1 - int c + * register a2 - size_t len + */ +ENTRY(memset) + andi a1, a1, 0xFF + + sltiu t1, a2, 8 + mv t0, a0 + bnez t1, .Lend + + li t1, 0x0101010101010101 + mul a1, a1, t1 + + andi t1, a0, 0b111 + andi t0, a0, ~0b111 + + beqz t1, .Lloop_store_64 + + la t2, .Lduff_start + slli t3, t1, 2 + add t2, t2, t3 + jr -4(t2) +.Lduff_start: + sb a1, 1(t0) + sb a1, 2(t0) + sb a1, 3(t0) + sb a1, 4(t0) + sb a1, 5(t0) + sb a1, 6(t0) + sb a1, 7(t0) + + /* a3 = a3 -(8-a) <=> a3 = a3 + (a-8) */ + addi t1, t1, -8 + add a2, a2, t1 + addi t0, t0, 8 + +.Lloop_store_64: + slti t1, a2, 64 + bnez t1, .Lstore_rest + sd a1, 0(t0) + sd a1, 8(t0) + sd a1, 16(t0) + sd a1, 24(t0) + sd a1, 32(t0) + sd a1, 40(t0) + sd a1, 48(t0) + sd a1, 56(t0) + addi a2, a2, -64 + addi t0, t0, 64 + j .Lloop_store_64 + +.Lstore_rest: + la t2, .Lduff_rest + andi t3, a2, ~0b111 + srli t4, t3, 1 + sub t2, t2, t4 + jr t2 + sd a1, 56(t0) + sd a1, 48(t0) + sd a1, 40(t0) + sd a1, 32(t0) + sd a1, 24(t0) + sd a1, 16(t0) + sd a1, 8(t0) + sd a1, 0(t0) +.Lduff_rest: + add t0, t0, t3 + sub a2, a2, t3 + +.Lend: + slli a2, a2, 2 + la t2, .Lduff_end + sub t2, t2, a2 + jr t2 + sb a1, 6(t0) + sb a1, 5(t0) + sb a1, 4(t0) + sb a1, 3(t0) + sb a1, 2(t0) + sb a1, 1(t0) + sb a1, (t0) +.Lduff_end: + ret +END(memset) + From nobody Sun Nov 30 01:45:51 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dJqcb6Ff8z6Jf1Z for ; Sun, 30 Nov 2025 01:45:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dJqcb4KFXz3mLr for ; Sun, 30 Nov 2025 01:45:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764467151; 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=oLcNKkSNQW7226Rg6/sDJ6SDABwfqs5/0JdRAlrO2tc=; b=ZTCaQqlSMWK2dHtS3pa7RE4E3DWxGRVunnJCBaS5hs0PQNiiPAHnoGVCBYyxVNVRiBhHh3 t/cL9QrHsCnXnFz1SNN0AkNkHJ3UXJbljQe+v+/5OlxxUQ/8MNrp6wSL7ZHkg9U/hq3l1I WfCqzA2NmsjpSAOHncV4WTNmGO5UTm0uA42cfBAxOhJBv6Oz3RKxUDjM/iRIMWzsabsmPV g364I8bfr/MoXB4SSWq7DZhK9cP87h3VKUdzNVRZ/HUSTaoVOVXvWTr9SDdGyEOXXHaK/5 x+abjI/rgma2awjp29uv5bSwPCuMhbB0PKXiAN51E7epzAfN0rhcsuZasxjHZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764467151; 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=oLcNKkSNQW7226Rg6/sDJ6SDABwfqs5/0JdRAlrO2tc=; b=D6wjFu0gln7QogIAKwrsfIwvvDfHMy3f7nKoskk2sLNqoF8UMN8mFW2ktNYDRlwMUwjiI4 ykn0HuKhcvwi5n1lisM2GtjpChhwz2KVVLof80RERviI/dDq5QCBBBIGbrO1Za70gbdZW5 SWPl8Yls2ovOII5WjerB8d4lryJK71vEigiPeOKLT9nfZJZ6QLmxKLuOajiTn7IBnMOHTu tupSkuCPIx8dMVfjFaO0dM1R6x/WDoWGET57V4PmpahdjHt80l+vzWh97Mcg2MSUylK/BJ CqI2Y6YkBnJTVnvZXVS0rRmNotYwX+kt7O705BZlYCyFLIUuxugVh3VyfR4RhQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764467151; a=rsa-sha256; cv=none; b=ymwfSguVMenNdOwNkayzg9aBQRFngmSfXDdziXEijZWRAEKRrxtiweC/IBVcNe58wlaCjX 82Nvvz0vxWedBd2xatl13IPjKdTfSCYhRrQ1H7fcgrIumlcO5N+ydpJqde5GuOmGL1gbCS Vtp7Mpe06+XMJaj8PK099i66jtKsYyMwp4VO3pzmhGS9Two4FNVuMHfcwuq3f/GXXpbUjD HHvrtLF1LTrwVkgvDgStr+lr3WxIfW6gZxL9Pf+25swnE0JTBHIZCqf1B+x2U8RsByEaH7 CB+9ydsVMk76hEGsoARSICeQ/Ltg11FOEbsK8BL1gPK1uk0WFZlJyXNhZhpTbw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dJqcb3hLRzR3 for ; Sun, 30 Nov 2025 01:45:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2a971 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 30 Nov 2025 01:45:51 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Strahinja =?utf-8?Q?Stani=C5=A1?==?utf-8?Q?i=C4=87?= From: Robert Clausecker Subject: git: 62fa1d20fec7 - stable/15 - simd.7: add scalar memset() for RISC-V to manpage List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: fuz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 62fa1d20fec709772664d64fb5585d09d451f1b3 Auto-Submitted: auto-generated Date: Sun, 30 Nov 2025 01:45:51 +0000 Message-Id: <692ba1cf.2a971.1713d6ea@gitrepo.freebsd.org> The branch stable/15 has been updated by fuz: URL: https://cgit.FreeBSD.org/src/commit/?id=62fa1d20fec709772664d64fb5585d09d451f1b3 commit 62fa1d20fec709772664d64fb5585d09d451f1b3 Author: Strahinja Stanišić AuthorDate: 2024-06-24 17:07:06 +0000 Commit: Robert Clausecker CommitDate: 2025-11-30 00:43:05 +0000 simd.7: add scalar memset() for RISC-V to manpage MFC after: 1 month MFC to: stable/15 Approved by: mhorne, markj (mentor) Reviewed by: fuz Sponsored by: Google LLC (GSoC 2024) Differential Revision: https://reviews.freebsd.org/D45730 (cherry picked from commit 164156058e723c0d9b2bb68054543963f40f1159) --- share/man/man7/simd.7 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/man/man7/simd.7 b/share/man/man7/simd.7 index 31a4e3b0844f..565b4fa7ea2f 100644 --- a/share/man/man7/simd.7 +++ b/share/man/man7/simd.7 @@ -64,7 +64,7 @@ Enhanced functions are present for the following architectures: .It memcpy Ta A Ta S Ta S Ta S Ta SV .It memmove Ta A Ta S Ta S Ta S Ta SV .It memrchr Ta A Ta Ta S1 -.It memset Ta A Ta S Ta S Ta S +.It memset Ta A Ta S Ta S Ta S Ta Ta S .It rindex Ta A Ta Ta S1 Ta S Ta Ta S .It stpcpy Ta A Ta Ta S1 .It stpncpy Ta Ta Ta S1 From nobody Sun Nov 30 01:45:52 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dJqcd0kCWz6Jf1d for ; Sun, 30 Nov 2025 01:45:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dJqcc59yMz3mM6 for ; Sun, 30 Nov 2025 01:45:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764467152; 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=WUsrF02wP46twxyxfhQF67mPxQvRYsQiDbin0Tg3Cgo=; b=fePEZxJFST8svhgD4zNjHbCfkzTJ7wEfA48ZUpvKVWeM7nmH69OAJgH1PQ2kJWHfLlE/xC J1swpS4552WEjmJquVcyBXTScdFYMcsW+ELotRJ29kYLoslvXMjSCcSgMFpjM5SbkaYpRm FFbguD/m7vTBHhmV+lbjzkH3G2gACMNYUw0BATvRTOXz8QIECZrxgM8zCGEzZtBWGefN/m xZ0j18UAWN5CzlfLozbj6BVx0fW4OEEJCA9Hwpc+QQ/ammxQVA5qn/Em8GbVI+G0b1xjtg 7emyLF+14kZq/p8M21YbNmW6SFK4B53nqcyHy0tMyj+Eat9TorigSrDgIvMxDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764467152; 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=WUsrF02wP46twxyxfhQF67mPxQvRYsQiDbin0Tg3Cgo=; b=BNKtvCV3ovowsvyruEIT5gf8Z6PdHOcb5HGmrYOhilu9+rzMRftzRfDE4p3LivNZfCHwSo h1/qB+3/85+3MX59g32BXZJcGJMSnJNB4WXawqgkYc3qeLKWELxuEruHJXv6YW/y+wqtw8 r5N78T+oGtCv9CZkNz74CA5KCS290HRDxBEfmBid/+BcU9aYOF5+h/Imm9v0oQqJ4Ekt4W 6dYQgAw4ptmNkb20WcoHtNoFqXXP0JTQ+rV0iKl4weNlya3KK42MoxClOmUf99Tm2+whvh IpdQyUrvVwiALSyZN2spuUkJAb/ega06kQEFuqRUyDNoXQ8AT8WJq9f50k6WrA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764467152; a=rsa-sha256; cv=none; b=CFvYy2LgzWcCEKIJBe0eN1u904i5/8lSdPC5i0DUWgfvEOQjFe1UrspemlCI7LbRoexrJN IT0BeYLRxq1jeba/HyhGFN2yTDPgdfEOqSRtqvZyIw8squN96l9m62WHN2eILK9N4ElJa3 Z7jpHByzMBNhntyN8aRQlxyJDFjFU0lFSmUnsN9zHXmk9ePP6BvjQwrQDqR2d+hB/h/ktM zCIazoB6igR1gLHask9LPn8p72ndgrh/TuNQharB/T8Xih6OGdALTRTpFZGbDC+9WJDRFh vE9l39MHKsNXEDC34r+15+Q5Ao/6MgD3hHOF1yYXIleC+FMb1OcW1hakh2Os4A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dJqcc4Xq7zT8 for ; Sun, 30 Nov 2025 01:45:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2a65e by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 30 Nov 2025 01:45:52 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Strahinja =?utf-8?Q?Stani=C5=A1?==?utf-8?Q?i=C4=87?= From: Robert Clausecker Subject: git: 650ac47256ab - stable/15 - libc: scalar strlen() in RISC-V assembly List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: fuz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 650ac47256ab933f45a44f92900fffc85189b2b6 Auto-Submitted: auto-generated Date: Sun, 30 Nov 2025 01:45:52 +0000 Message-Id: <692ba1d0.2a65e.7e1b0d1b@gitrepo.freebsd.org> The branch stable/15 has been updated by fuz: URL: https://cgit.FreeBSD.org/src/commit/?id=650ac47256ab933f45a44f92900fffc85189b2b6 commit 650ac47256ab933f45a44f92900fffc85189b2b6 Author: Strahinja Stanišić AuthorDate: 2024-05-17 14:23:48 +0000 Commit: Robert Clausecker CommitDate: 2025-11-30 00:43:05 +0000 libc: scalar strlen() in RISC-V assembly Includes a scalar implementation of strlen() for the RISC-V architecture and changes to the corresponding manpage. Performance was benchamarked using before and after: https://github.com/clausecker/strperf os: FreeBSD arch: riscv │ strlen_baseline │ strlen_scalar │ │ sec/op │ sec/op vs base │ Short 541.2µ ± 17% 401.6µ ± 0% -25.78% (p=0.000 n=21+20) Mid 249.6µ ± 3% 191.9µ ± 0% -23.13% (p=0.000 n=21+20) Long 124.6µ ± 0% 110.7µ ± 0% -11.13% (p=0.000 n=21+20) geomean 256.3µ 204.3µ -20.26% │ strlen_baseline │ strlen_scalar │ │ B/s │ B/s vs base │ Short 220.3Mi ± 14% 296.8Mi ± 0% +34.74% (p=0.000 n=21+20) Mid 477.6Mi ± 3% 621.3Mi ± 0% +30.09% (p=0.000 n=21+20) Long 956.9Mi ± 0% 1076.7Mi ± 0% +12.52% (p=0.000 n=21+20) geomean 465.2Mi 583.4Mi +25.40% MFC after: 1 month MFC to: stable/15 Approved by: mhorne, markj (mentor) Reviewed by: fuz Sponsored by: Google LLC (GSoC 2024) Differential Revision: https://reviews.freebsd.org/D45693 (cherry picked from commit e09c1583eddd345bdb79f3db8a91166f6f139207) --- lib/libc/riscv/string/Makefile.inc | 1 + lib/libc/riscv/string/strlen.S | 77 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 78 insertions(+) diff --git a/lib/libc/riscv/string/Makefile.inc b/lib/libc/riscv/string/Makefile.inc index 44aeb65bf1f7..5853ea114277 100644 --- a/lib/libc/riscv/string/Makefile.inc +++ b/lib/libc/riscv/string/Makefile.inc @@ -1,4 +1,5 @@ MDSRCS+= \ memchr.S \ memset.S \ + strlen.S \ strrchr.S diff --git a/lib/libc/riscv/string/strlen.S b/lib/libc/riscv/string/strlen.S new file mode 100644 index 000000000000..3beb160f2e6f --- /dev/null +++ b/lib/libc/riscv/string/strlen.S @@ -0,0 +1,77 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2024 Strahinja Stanisic + */ + +#include + +/* + * https://graphics.stanford.edu/~seander/bithacks.html#ZeroInWord + * uses haszero(v) (((v) - 0x01010101UL) & ~(v) & 0x80808080UL) + * which evalutates > 0 when there is zero in v + * + * register a0 - char *s + */ +ENTRY(strlen) + /* + * register a0 - char *str_start + * register a1 - char *str_ptr + * register a2 - char[8] iter + */ + + /* load constants for haszero */ + li t0, 0x0101010101010101 + slli t1, t0, 7 # 0x8080808080808080, avoid li + + /* check alignment of str_start */ + andi a1, a0, ~0b111 + ld a2, (a1) + beq a1, a0, .Lhas_zero + + /* fill bytes before str_start with non-zero */ + slli t2, a0, 3 + addi t3, t2, -64 + neg t3, t3 + srl t3, t0, t3 + or a2, a2, t3 + + /* unrolled iteration of haszero */ + not t2, a2 + sub a2, a2, t0 + and a2, a2, t2 + and a2, a2, t1 + + bnez a2, .Lfind_zero + +.Lloop_has_zero: + ld a2, 8(a1) + addi a1, a1, 8 # move ptr to next 8byte +.Lhas_zero: + not t2, a2 + sub a2, a2, t0 + and a2, a2, t2 + and a2, a2, t1 + + beqz a2, .Lloop_has_zero + +.Lfind_zero: + /* use (iter & -iter) to isolate lowest set bit */ + sub a3, zero, a2 #a3 = -iter + and t1, a2, a3 #t1 = (iter & -iter) + + li t0, 0x0001020304050607 + srli t1, t1, 7 + /* + * lowest set bit is 2^(8*k) + * multiplying by it shifts the idx array in t0 by k bytes to the left + */ + mul t1, t1, t0 + /* highest byte contains idx of first zero */ + srli t1, t1, 56 + + add a1, a1, t1 + sub a0, a1, a0 + ret +END(strlen) + From nobody Sun Nov 30 01:45:53 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dJqcf0cp1z6JdgP for ; Sun, 30 Nov 2025 01:45:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dJqcd5TmNz3mVd for ; Sun, 30 Nov 2025 01:45:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764467153; 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=4YsktO0T1C1cQy1SEX29aojqo9IFr8JTHVUPMvwYF/w=; b=fiCGqBOPQ80ETQwQ8LwVkBm/3348r3uba8qQ22eYQy7aJP1hJctlwTCd0Lx8z1UIP06XiE djyTLDyTIoaccr6epYb8ToleE8SA2G0mUj3yC+IZnrbMb7qbughQ3SWva8EPdwxVGzjekn i3cEoXtbOEGtroreyn0ln75MnqEAfSexou6IxZ0JOD3lCp0QszyhoRQjUPJr7n2a5vQfPR Bi17cJDuAnSDvTsOYoW89bYkDFQQx86e+mwdygbpwGoPT4caCDfgVfLDMewGBOJ/hoWA6x u1bvXGt+hVLhkJYblRakB++8yj3VjFXf//gtQXLe0iGPcJ349ipGaNebWw1ZoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764467153; 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=4YsktO0T1C1cQy1SEX29aojqo9IFr8JTHVUPMvwYF/w=; b=mWSUEDTJOhaDY6v4ZJNGdGOR6vUZr2VrXx7D4PnLco1piA0BdnveWIkzctmEenUBL3exQd y+tBVt86LTA/S1Jw6arG9uqCDu7vqCx/SuhBlVQgrPyjNpfVvLVgJyWg71pK8aS4ZlbMfl Ifx92iF8oc+udisrrAII1DRLw3kfV0cz3IB/W4bCOFztgx8N06HfVrtb2yRIj5Gb+zzStH uqmr7jFbQa4DyJs8OL6tZzU6UicbSs3eyKyXDlmCvL/qBsSwnHm2Fjq5AkLUsIEL0M9GPo 2oiIGvusqaafIqzD++VCAgQK1JTAdGEe53erh/y2ae1JyQOr9Zb1WCA5ZDdHPQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764467153; a=rsa-sha256; cv=none; b=O723ONMfRiUvzQz2rSpOZF7MVnNxWgemlFoIjfvCNRftif7IUzOD/bpCAdHRO+jZ6ENV+p AVnFPr5cV9l6pLSv+sYBrMvUi4Atyns2m9Aq76mM+JXVJhe8E4zYKBPFDM0wRG+KAWYekB sWj8yA1QpXr5jzCJ3htUD9siYlt78KTSzAZEDPz6miuLqqJTmvCWA8X+vob4v7UXdwfa95 P9l3I+25im4+L03jqbbWgJDSlDPwSrFp3gyDaK/Rw6dgW4Ou/bFtU+JknTfNwbYMpdc4Jc BU/faK7rvG1/XyntUtHI1B9VDPo/SC98PfLQqd0vVoIjqVyBrrmUqw2e1eCmAw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dJqcd54PmzR4 for ; Sun, 30 Nov 2025 01:45:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 28f29 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 30 Nov 2025 01:45:53 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Strahinja =?utf-8?Q?Stani=C5=A1?==?utf-8?Q?i=C4=87?= From: Robert Clausecker Subject: git: 6eed64ce1f6b - stable/15 - simd.7: add scalar strlen() for RISC-V to manpage List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: fuz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 6eed64ce1f6b5c88d734c3f6bb68d4775fc39b55 Auto-Submitted: auto-generated Date: Sun, 30 Nov 2025 01:45:53 +0000 Message-Id: <692ba1d1.28f29.337dac95@gitrepo.freebsd.org> The branch stable/15 has been updated by fuz: URL: https://cgit.FreeBSD.org/src/commit/?id=6eed64ce1f6b5c88d734c3f6bb68d4775fc39b55 commit 6eed64ce1f6b5c88d734c3f6bb68d4775fc39b55 Author: Strahinja Stanišić AuthorDate: 2024-06-21 23:43:51 +0000 Commit: Robert Clausecker CommitDate: 2025-11-30 00:43:05 +0000 simd.7: add scalar strlen() for RISC-V to manpage MFC after: 1 month MFC to: stable/15 Approved by: mhorne, markj (mentor) Reviewed by: fuz Sponsored by: Google LLC (GSoC 2024) Differential Revision: https://reviews.freebsd.org/D45693 (cherry picked from commit 07b1d5a37741f5d4de69117a03ef757edff29032) --- share/man/man7/simd.7 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/man/man7/simd.7 b/share/man/man7/simd.7 index 565b4fa7ea2f..5978d4b6655e 100644 --- a/share/man/man7/simd.7 +++ b/share/man/man7/simd.7 @@ -76,7 +76,7 @@ Enhanced functions are present for the following architectures: .It strcspn Ta S Ta Ta S2 .It strlcat Ta A Ta Ta S1 .It strlcpy Ta A Ta Ta S1 -.It strlen Ta A Ta S Ta S1 +.It strlen Ta A Ta S Ta S1 Ta Ta Ta S .It strncat Ta A Ta Ta S1 .It strncmp Ta A Ta S Ta S1 Ta S .It strncpy Ta Ta Ta S1 Ta Ta S2 From nobody Sun Nov 30 01:45:55 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dJqch2g3dz6Jf3q for ; Sun, 30 Nov 2025 01:45:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dJqch0LPpz3mQX for ; Sun, 30 Nov 2025 01:45:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764467156; 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=cZnbT1NKQDAGSgNNfqAjnTwcpOjAS4/L63cPvqDPBTE=; b=Mi9qr6zy51zWx84DmbodMtEFs3FhiHawhMZeGFXvHHphFhBzFTAiM8RFmyKX0v8ZbGVf8m 7SzO57mWhpaSgGCr/yVmgG8t1tl3DQ0RdFdgAnQ0/e2Rq69hH92UOkNXIhlDeD2QSqRjeC 737KvTfR7lDmbBn9Xq2INvpJc8Wqg6605G3TpD/eQniD0TXtAIVTuhtglNwT0qe/NAcuHF 6/Cc7H46pO8XD7RYmSb5eAkF/esk0SKFKjib7vdA4KO4H7rMw0CG6/e3mgfFo994iHB24H xG/h/Y+225mE9mTl5njsIWSDSZEGnpKhE+CmosFtDj5kvX8j3YInRbyLG5qlqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764467156; 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=cZnbT1NKQDAGSgNNfqAjnTwcpOjAS4/L63cPvqDPBTE=; b=eUXlFB2UIj52X4Bie3SaB4fkcf/Nr7xYcEzxsH3053y4ClcaoHZ7NJdNnmn78Gpcv7u8Zu 1susSPsaYvA1+X6OUEb2kLTmFSSO/wUJWQKBGXXuIPgr0jaDLsA0R0LInAnNBgIL3cPD84 El+knG0f6M8vhdpm8Z01a/npZrZP04N2rErio7C1Hwfq0GcvCM+pqH5oHkx/sRS/toAaUP u466dZ5+nv3oKOD5apqdvFkzjwibXtaCsfmtHU1M2P/aC44BuAUqnehsIGG09+u0FNm7hp 73qct2E+CnZrgSMT6tS1tFjb4FyqNpOnnTBdsq+QDZwbmP5bRRhygCyki+vjYg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764467156; a=rsa-sha256; cv=none; b=XNEggcJk3uG3PBi99v+iXXkQlpaJVw7gL32+OWa7iLg3pLRrXxPurbAO0iyKA/w8cB6Z18 hjfE0Zr3qTP1+rdLjgO/KuiKUfUsjPwNwCBC3sQnL/ZVskuh8OMxEqmmi78LnYuDW0n5y+ nv/Uv2TEbM1Jkz+MQ/hzEn3u56+kZKzj9hM3HbReCEzZD8gfMfhP6rYZCgqjbyq/W9a3Nh t8VtDMun4KTwBgMrnQFqSvBcWfBnw72cMi891te4A8GAIOgZcCzBo7EjIo1bbY+T5AJ8F/ Q6LNSBpbbHHA3uKLx41res7RmIjNW34ymVa+0k3O355XW0S725ZTn7Qd/R02sg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dJqcg6nlYz1CWL for ; Sun, 30 Nov 2025 01:45:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2a4b9 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 30 Nov 2025 01:45:55 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Strahinja =?utf-8?Q?Stani=C5=A1?==?utf-8?Q?i=C4=87?= From: Robert Clausecker Subject: git: bb2cbe8c53f8 - stable/15 - simd.7: add scalar memcpy() for RISC-V to manpage List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: fuz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: bb2cbe8c53f8cf8229823afca284c4c5ba853764 Auto-Submitted: auto-generated Date: Sun, 30 Nov 2025 01:45:55 +0000 Message-Id: <692ba1d3.2a4b9.596dbb73@gitrepo.freebsd.org> The branch stable/15 has been updated by fuz: URL: https://cgit.FreeBSD.org/src/commit/?id=bb2cbe8c53f8cf8229823afca284c4c5ba853764 commit bb2cbe8c53f8cf8229823afca284c4c5ba853764 Author: Strahinja Stanišić AuthorDate: 2024-07-24 23:36:09 +0000 Commit: Robert Clausecker CommitDate: 2025-11-30 00:43:06 +0000 simd.7: add scalar memcpy() for RISC-V to manpage MFC after: 1 month MFC to: stable/15 Approved by: mhorne, markj (mentor) Reviewed by: fuz Sponsored by: Google LLC (GSoC 2024) Differential Revision: https://reviews.freebsd.org/D46139 (cherry picked from commit c80dfcb37261e5e8575d41801e64a39b7db6f4f8) --- share/man/man7/simd.7 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/share/man/man7/simd.7 b/share/man/man7/simd.7 index 5978d4b6655e..c09ed0edb960 100644 --- a/share/man/man7/simd.7 +++ b/share/man/man7/simd.7 @@ -24,7 +24,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE . -.Dd October 8, 2025 +.Dd October 16, 2025 .Dt SIMD 7 .Os .Sh NAME @@ -61,7 +61,7 @@ Enhanced functions are present for the following architectures: .It memchr Ta A Ta Ta S1 Ta Ta Ta S .It memcmp Ta A Ta S Ta S1 Ta S .It memccpy Ta A Ta Ta S1 -.It memcpy Ta A Ta S Ta S Ta S Ta SV +.It memcpy Ta A Ta S Ta S Ta S Ta SV Ta S .It memmove Ta A Ta S Ta S Ta S Ta SV .It memrchr Ta A Ta Ta S1 .It memset Ta A Ta S Ta S Ta S Ta Ta S From nobody Sun Nov 30 01:45:54 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dJqcg0Srrz6Jf81 for ; Sun, 30 Nov 2025 01:45:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dJqcf6TXGz3mHR for ; Sun, 30 Nov 2025 01:45:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764467154; 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=vYG4mzq/vu99Qi0CqG5JRZDkTZXK3KUpN6md8ROSU3E=; b=YCbabuy38YrjMilcduePMSPX8ToAPbVCN9lSjs3OD+GaCpgrTjzrZjrXu2iAc52xBs9MFv oTs9CLkXMZS1R5xFiy6Syn9IyqkoZ2cMpWMiKQzhlDkYpQzMrk4L/1E8AfnPA5Zbe0jErc ipHqa7W/siwfuNj04SY9hGWaaIRAaKLowH7/NzHnGHG5XFZlj4DE39URcM7Z+b6aty8af5 FqQZMQ1tK4NzPbmhppjOPL5yrWzegz74LJWhInZLPDFV9sw9LO9XJ8Rf5Nz3fQaicBm4Km tmZHKXl5RMGdD2h5LgXPi+nn3Hur3avcRtIxalk+Gw8ccFcqE5NWncdQDafCxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764467154; 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=vYG4mzq/vu99Qi0CqG5JRZDkTZXK3KUpN6md8ROSU3E=; b=h1CdWDhDkEcioLnZ4SXSbJmdm9e3p17yN9Ke5mMSb/CGtWodrFykODdkUAg2J0eZqLALOZ 00ROtVgPB6K2ln9OzXX+cxvlbaDep0Zz9v18GGoMqhMvXtONppdWSq4lj62C/OE1KkJf0C nJBsjqCxITqyyCJpzA6QQYqutqz0zdtpX2QYVd9zPZnefmDycQMB1q5eNUiDx1jnmhBTvH PYfKzc1eQMEX+KI5eiIIuNzUCIAJ8iUexnWmjXNEnhgTOBHKchCWhX7LNyMPIOlp4oDcSA +1KlJTt5h0poIfWIY5P/IKKbSUpTo0DsKmVb1vdGqkKWB3CW/LKHBieD5UR0kQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764467154; a=rsa-sha256; cv=none; b=ReZH/kXOcVBk2xjvlsNld28E5jtxEpq80I69HndxuyGC6rauKR17LM32cwu0DoKgmzYXpy A8XE5pqsCS0hh4ZGKCxuPvK/zOZwfv2HT5BOX6Wj+zNr84lg7+igG1BKa6FLneAu+i0X8D hAmrqF/qBse5ktlc3l0Pnob2hH5aKDqfSVjHoi9nFo3efvT3Ijem7xXs/dHPila0CZiwqI ++EVC1mbwNjXo/lPbVZ219K0dm2iKmd2jHOWBB3BCmY7Tf3VOrNRnONUj2lEwo51mHWI3B lCmIal8fDzhOnmvb187J927pS1gsLR/ml4v2DKQm6yoF6rx5qAY7ES73XnvFZw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dJqcf5wdfzR6 for ; Sun, 30 Nov 2025 01:45:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2a52c by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 30 Nov 2025 01:45:54 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Strahinja =?utf-8?Q?Stani=C5=A1?==?utf-8?Q?i=C4=87?= From: Robert Clausecker Subject: git: a86afcd3f33c - stable/15 - libc: scalar memcpy() in RISC-V assembly List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: fuz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: a86afcd3f33c4b9a7879faa421367bb8a4423002 Auto-Submitted: auto-generated Date: Sun, 30 Nov 2025 01:45:54 +0000 Message-Id: <692ba1d2.2a52c.657d441c@gitrepo.freebsd.org> The branch stable/15 has been updated by fuz: URL: https://cgit.FreeBSD.org/src/commit/?id=a86afcd3f33c4b9a7879faa421367bb8a4423002 commit a86afcd3f33c4b9a7879faa421367bb8a4423002 Author: Strahinja Stanišić AuthorDate: 2024-07-24 23:33:30 +0000 Commit: Robert Clausecker CommitDate: 2025-11-30 00:43:05 +0000 libc: scalar memcpy() in RISC-V assembly Optimized assembly implementation of memcpy() for the RISC-V architecture. The implementation has two paths: - An aligned path - (dst - src) % 8 = 0, runs faster - An unaligned path - (dst - src) % 8 != 0, runs slower os: FreeBSD arch: riscv │ memcpy_baseline │ memcpy_scalar │ │ sec/op │ sec/op vs base │ 64Align8 851.6µ ± 1% 488.9µ ± 1% -42.59% (p=0.000 n=12) 4kAlign8 681.5µ ± 1% 255.1µ ± 2% -62.57% (p=0.000 n=12) 256kAlign8 273.0µ ± 2% 230.7µ ± 2% -15.50% (p=0.000 n=12) 16mAlign8 98.07m ± 0% 95.29m ± 0% -2.84% (p=0.000 n=12) 64UAlign 887.5µ ± 1% 531.6µ ± 1% -40.10% (p=0.000 n=12) 4kUAlign 725.6µ ± 1% 262.2µ ± 1% -63.87% (p=0.000 n=12) 256kUAlign 844.1µ ± 2% 322.8µ ± 0% -61.76% (p=0.000 n=12) 16mUAlign 134.9m ± 0% 101.2m ± 0% -24.97% (p=0.000 n=20) geomean 2.410m 1.371m -43.12% │ memcpy_baseline │ memcpy_scalar │ │ MiB/s │ MiB/s vs base │ 64Align8 293.6 ± 1% 511.3 ± 1% +74.18% (p=0.000 n=12) 4kAlign8 366.8 ± 1% 980.0 ± 2% +167.15% (p=0.000 n=12) 256kAlign8 915.8 ± 2% 1083.7 ± 2% +18.34% (p=0.000 n=12) 16mAlign8 163.1 ± 0% 167.9 ± 0% +2.92% (p=0.000 n=12) 64UAlign 281.7 ± 1% 470.3 ± 1% +66.94% (p=0.000 n=12) 4kUAlign 344.5 ± 1% 953.6 ± 1% +176.77% (p=0.000 n=12) 256kUAlign 296.2 ± 2% 774.5 ± 0% +161.49% (p=0.000 n=12) 16mUAlign 118.6 ± 0% 158.1 ± 0% +33.28% (p=0.000 n=20) geomean 293.4 515.8 +75.81% MFC after: 1 month MFC to: stable/15 Approved by: mhorne, markj (mentor) Reviewed by: fuz Sponsored by: Google LLC (GSoC 2024) Differential Revision: https://reviews.freebsd.org/D46139 (cherry picked from commit 25fdd86a4c92b5bdab82db289f3bcd57756778e7) --- lib/libc/riscv/string/Makefile.inc | 1 + lib/libc/riscv/string/memcpy.S | 217 +++++++++++++++++++++++++++++++++++++ 2 files changed, 218 insertions(+) diff --git a/lib/libc/riscv/string/Makefile.inc b/lib/libc/riscv/string/Makefile.inc index 5853ea114277..ebea8d1d3412 100644 --- a/lib/libc/riscv/string/Makefile.inc +++ b/lib/libc/riscv/string/Makefile.inc @@ -1,5 +1,6 @@ MDSRCS+= \ memchr.S \ + memcpy.S \ memset.S \ strlen.S \ strrchr.S diff --git a/lib/libc/riscv/string/memcpy.S b/lib/libc/riscv/string/memcpy.S new file mode 100644 index 000000000000..7536514df777 --- /dev/null +++ b/lib/libc/riscv/string/memcpy.S @@ -0,0 +1,217 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2024 Strahinja Stanisic + */ + +#include + +/* + * a0 - void* dst + * a1 - const void* src + * a2 - size_t len + */ +ENTRY(memcpy) + beqz a2, .Lreturn + + /* diff = (dstv - srcv) & 0b111 */ + sub t0, a0, a1 + andi t0, t0, 0b111 + + sltiu t1, a2, 8 + + /* we never change a0, because memcpy returns the original dst */ + mv a3, a0 + + /* len < 8 */ + bnez t1, .Lend + + /* t1 = (-dst) & 0b111 */ + neg t1, a0 + andi t1, t1, 0b111 + + sub a2, a2, t1 + + la t2, .Lduff_start + slli t3, t1, 3 + sub t2, t2, t3 + jr t2 + lb t3, 6(a1) + sb t3, 6(a3) + lb t3, 5(a1) + sb t3, 5(a3) + lb t3, 4(a1) + sb t3, 4(a3) + lb t3, 3(a1) + sb t3, 3(a3) + lb t3, 2(a1) + sb t3, 2(a3) + lb t3, 1(a1) + sb t3, 1(a3) + lb t3, 0(a1) + sb t3, 0(a3) +.Lduff_start: + + add a1, a1, t1 + add a3, a3, t1 + + beqz a2, .Lreturn + + beqz t0, .Lmemcpy8 + + /* + * a4 - size_t right_shift + * a5 - size_t left_shift + * a6 - size_t whole (number of dword stores) + */ + + /* right_shift = (src % 0b111) * 8; */ + andi a4, a1, 0b111 + slli a4, a4, 3 + + /* left_shift = 64 - right_shift */ + neg a5, a4 + + /* whole = len / 8 */ + srli a6, a2, 3 + + /* len = len % 8 */ + andi a2, a2, 0b111 + + /* t0 - uint64_t* ptr */ + + /* ptr = src & ~0b111 */ + andi t0, a1, ~0b111 + + /* src += whole * 8 */ + slli t1, a6, 3 + add a1, a1, t1 + + /* + * t1 - uint64_t low + * t2 - uint64_t high + */ + + /* low = *ptr++ */ + ld t1, (t0) + addi t0, t0, 8 + + /* low >>= right_shift */ + srl t1, t1, a4 + + beqz a6, .Llmain_skip +.Llmain: + /* high = *ptr++ */ + ld t2, (t0) + addi t0, t0, 8 + + /* whole-- */ + addi a6, a6, -1 + + /* temp = (high << left_shift) | low */ + sll t3, t2, a5 + or t3, t3, t1 + + /* low = high >> right_shift */ + srl t1, t2, a4 + + /* *dst++ = temp */ + sd t3, (a3) + addi a3, a3, 8 + + bnez a6, .Llmain + +.Llmain_skip: + +.Lend: + la t1, .Lduff_end + slli t2, a2, 3 + sub t1, t1, t2 + jr t1 + lb t2, 6(a1) + sb t2, 6(a3) + lb t2, 5(a1) + sb t2, 5(a3) + lb t2, 4(a1) + sb t2, 4(a3) + lb t2, 3(a1) + sb t2, 3(a3) + lb t2, 2(a1) + sb t2, 2(a3) + lb t2, 1(a1) + sb t2, 1(a3) + lb t2, 0(a1) + sb t2, 0(a3) +.Lduff_end: + +.Lreturn: + ret + +/* exectued when dst - src is multiple of 8 + * a0 - void* dst + * a1 - const void* src + * a2 - size_t len + */ +.Lmemcpy8: + + beqz a2, .Lreturn + + slti t0, a2, 128 + bnez t0, .Llmain8_64_skip + + /* a4 - uint64_t* end_unroll */ + + /* end_unroll = dst + len / 64 * 64 */ + andi t0, a2, ~0b111111 + add a4, a3, t0 + + /* len = len % 64 */ + andi a2, a2, 0b111111 + +.Llmain8_64: + ld t0, 0(a1) + ld t1, 8(a1) + ld t2, 16(a1) + ld t3, 24(a1) + sd t0, 0(a3) + sd t1, 8(a3) + sd t2, 16(a3) + sd t3, 24(a3) + ld t0, 32(a1) + ld t1, 40(a1) + ld t2, 48(a1) + ld t3, 56(a1) + sd t0, 32(a3) + sd t1, 40(a3) + sd t2, 48(a3) + sd t3, 56(a3) + addi a3, a3, 64 + addi a1, a1, 64 + bne a3, a4, .Llmain8_64 +.Llmain8_64_skip: + + beqz a2, .Lreturn + + /* a4 - uint64_t* end_align */ + + /* end_align = (dst + len) & ~0b111 */ + add a4, a3, a2 + andi a4, a4, ~0b111 + + /* len = len % 8 */ + andi a2, a2, 0b111 + + beq a3, a4, .Llmain8_skip +.Llmain8: + ld t0, (a1) + sd t0, (a3) + addi a3, a3, 8 + addi a1, a1, 8 + bne a3, a4, .Llmain8 +.Llmain8_skip: + + la t1, .Lduff_end + slli t2, a2, 3 + sub t1, t1, t2 + jr t1 +END(memcpy) From nobody Sun Nov 30 01:45:57 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dJqcj51Dtz6Jf62 for ; Sun, 30 Nov 2025 01:45:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dJqcj16YBz3mMv for ; Sun, 30 Nov 2025 01:45:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764467157; 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=myjDDQrjoPDjCqW9makz+ShAJ6/2B9RwoOGvw8i6cK4=; b=YZI2Fxvuh9eJ35yjsjfkejBEYvMDXKZ39xmjT66kor1j9l+baq1tIitKyrm9SdilFNurhv qikXEO6fJAMF+n+J+Ih3bWpKk/BcI9hcJ3wNNUlA+48dEEa/u8Z1FUxrH2EhFOeuGGhdd9 IxkVeYWiBQOrmG3Oa4iTxkMQz987bdzKu2yAl6iJIo1i6V3kD2f/K8NLtoC9R/dqPeDElm kbVQlLU4x5RWpkFPc2w2KrwmIgomIlTpkRWoJHdqwn6AiQzdggUf4cSFKCkeEAZ9fvbw/V MVKd6kXicJvXd18cB0Artw+NUlfvO4WZpAO70wbOkVwfuCBIMUyfsjOrXFyQZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764467157; 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=myjDDQrjoPDjCqW9makz+ShAJ6/2B9RwoOGvw8i6cK4=; b=EWJblZrmhtFAX6IvIyKvPbwB2DMG1O0cYQtvPars0bKOHxIfcByi+Z/FwFcZm4np+/zvGW nlSwVHCiXjEXBB9qtpbVfuLwPqh7XUwchGEUszpxfR/33HU5dT0C3yRnicUzVgCxxc9An5 Zv4zJrkaMv+6xY4YhmGrNFDXjkyIWNfL+3GdYqsR2OPjF25CHuRCm64Y6hoLvis02N9ZVr ny9fQ8bRTxqoEgPzwLCbo43VgfeLjPP1JQPjRdylbM4pgJ7ZVa/tnYjX6zyrEB2SjmXqzT HiOVzIWRF6ztZ/pTx2QGYu70pnXxpKzx6yDQrA8Mmy23thkPuLL7j+oNJt6I4Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764467157; a=rsa-sha256; cv=none; b=Dq9HbPe04R1BXhu7k11eIus/w9psp0xxn+pFfDeCiBT36gyiQ+UhkzWfQ2M5aGfMun3/hH YS5iNqEIjQK8YUn08+Ydt49+ds/fuaQCmWEU8MalRRjgp5NxGOj3Rso0j4vy6B0OKwJirE /27Gb2kT4Nd8wEEG98asZp2x04vxJDYgXFQdjsYDY9Lx8gcn7TU0oKsN/YTibvcFdOEJ/B KxRPJjNWTDw/05a6PRWMzua2dqlxjvkOiErGyyT/mfEnyBUmTEgbR4GcFuR5nylCrog2KY L+VxisxqZWEer2h0US2oHe/xRtqv0ZKJFSHKWuM29zESj9LX6T/ggwfVzdprSA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dJqcj0XY1z9L for ; Sun, 30 Nov 2025 01:45:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2975f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 30 Nov 2025 01:45:57 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Strahinja =?utf-8?Q?Stani=C5=A1?==?utf-8?Q?i=C4=87?= From: Robert Clausecker Subject: git: 3f0dda7c5928 - stable/15 - libc: scalar strnlen() in RISC-V assembly List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: fuz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 3f0dda7c59280fe05b57fe695022053cd8b7d5f1 Auto-Submitted: auto-generated Date: Sun, 30 Nov 2025 01:45:57 +0000 Message-Id: <692ba1d5.2975f.6532a362@gitrepo.freebsd.org> The branch stable/15 has been updated by fuz: URL: https://cgit.FreeBSD.org/src/commit/?id=3f0dda7c59280fe05b57fe695022053cd8b7d5f1 commit 3f0dda7c59280fe05b57fe695022053cd8b7d5f1 Author: Strahinja Stanišić AuthorDate: 2024-08-04 15:12:00 +0000 Commit: Robert Clausecker CommitDate: 2025-11-30 00:43:06 +0000 libc: scalar strnlen() in RISC-V assembly Optimized implementation of strnlen() in RISC-V assembly Performance was measured using strperf on a HiFive Unmatched (SiFive HF105-001) board. os: FreeBSD arch: riscv │ strnlen_baseline │ strnlen_scalar │ │ sec/op │ sec/op vs base │ Short 787.0µ ± 0% 430.9µ ± 1% -45.24% (p=0.000 n=20) Mid 621.6µ ± 0% 195.1µ ± 1% -68.61% (p=0.000 n=20) Long 569.4µ ± 1% 100.6µ ± 0% -82.34% (p=0.000 n=20) geomean 653.1µ 203.7µ -68.81% │ strnlen_baseline │ strnlen_scalar │ │ MiB/s │ MiB/s vs base │ Short 158.8 ± 0% 290.1 ± 1% +82.62% (p=0.000 n=20) Mid 201.1 ± 0% 640.6 ± 1% +218.59% (p=0.000 n=20) Long 219.5 ± 1% 1242.9 ± 0% +466.19% (p=0.000 n=20) geomean 191.4 613.5 +220.57% MFC after: 1 month MFC to: stable/15 Approved by: mhorne, markj (mentor) Reviewed by: fuz, Jari Sihvola Sponsored by: Google LLC (GSoC 2024) Differential Revision: https://reviews.freebsd.org/D46230 (cherry picked from commit 5a52f0704435b089199201be0029e0d7c9ef2fce) --- lib/libc/riscv/string/Makefile.inc | 1 + lib/libc/riscv/string/strnlen.S | 143 +++++++++++++++++++++++++++++++++++++ 2 files changed, 144 insertions(+) diff --git a/lib/libc/riscv/string/Makefile.inc b/lib/libc/riscv/string/Makefile.inc index ebea8d1d3412..4b97490a5494 100644 --- a/lib/libc/riscv/string/Makefile.inc +++ b/lib/libc/riscv/string/Makefile.inc @@ -3,4 +3,5 @@ MDSRCS+= \ memcpy.S \ memset.S \ strlen.S \ + strnlen.S \ strrchr.S diff --git a/lib/libc/riscv/string/strnlen.S b/lib/libc/riscv/string/strnlen.S new file mode 100644 index 000000000000..c0fd959548ff --- /dev/null +++ b/lib/libc/riscv/string/strnlen.S @@ -0,0 +1,143 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2024 Strahinja Stanisic + */ + +#include + +/* + * a0 - const char *s + * a1 - size_t maxlen; + */ +ENTRY(strnlen) + /* + * a0 - const char *s; + * a1 - size_t maxlen; + * a2 - uint64_t *ptr; + * a3 - char iter[8]; + * a4 - uint64_t *end_align; + * a5 - uint64_t *end_unroll; + */ + + beqz a1, .Lnot_found + + /* ptr = s & ~0b111 */ + /* t0 = 0x0101010101010101 */ + /* t1 = 0x8080808080808080 */ + /* end_align = (s + maxlen + 7) & ~0b111 */ + /* mask_start = t0 >> ((-s.value) << 3) */ + add a4, a0, a1 + li t0, 0x01010101 + addi a4, a4, 7 + slli t1, t0, 32 + neg t2, a0 + andi a4, a4, ~0b111 + or t0, t0, t1 + slli t2, t2, 3 + andi a2, a0, ~0b111 + slli t1, t0, 7 + srl t2, t0, t2 + + /* if pointer is aligned skip to loop */ + beq a0, a2, .Lskip_start + + /* iter = *ptr */ + ld a3, (a2) + + /* iter = iter | mask_start */ + or a3, a3, t2 + + /* has_zero */ + not t2, a3 + sub a3, a3, t0 + and t2, t2, t1 + and a3, a3, t2 + + addi a2, a2, 8 + bnez a3, .Lfind_zero + +.Lskip_start: + /* end_unroll */ + sub t2, a4, a2 + andi t2, t2, ~0b1111 + add a5, a2, t2 + + /* while (ptr != end_unroll) */ + beq a2, a5, .Lskip_loop +.Lloop: + ld a3, (a2) + ld a6, 8(a2) + + /* has_zero */ + not t2, a3 + not t3, a6 + sub a3, a3, t0 + sub a6, a6, t0 + and t2, t2, t1 + and t3, t3, t1 + and a3, a3, t2 + and a6, a6, t3 + + addi a2, a2, 8 + bnez a3, .Lfind_zero + + mv a3, a6 + + addi a2, a2, 8 + bnez a3, .Lfind_zero + + bne a2, a5, .Lloop + +.Lskip_loop: + + beq a2, a4, .Lnot_found + + ld a3, (a2) + + /* has_zero */ + not t2, a3 + sub a3, a3, t0 + and t2, t2, t1 + and a3, a3, t2 + + + addi a2, a2, 8 + beqz a3, .Lnot_found + +.Lfind_zero: + + /* move ptr back */ + addi a2, a2, -8 + + /* isolate lowest set bit */ + neg t0, a3 + and a3, a3, t0 + + li t0, 0x0001020304050607 + srli a3, a3, 7 + + /* lowest set bit is 2^(8*k) + * multiplying by it shifts the idx array in t0 by k bytes to the left */ + mul a3, a3, t0 + + /* highest byte contains idx of first zero */ + srli a3, a3, 56 + + /* zero_idx */ + sub a2, a2, a0 + add a2, a2, a3 + + /* min(zero_idx, maxlen) */ + sub a2, a2, a1 + srai t1, a2, 63 + and a2, a2, t1 + add a0, a1, a2 + + ret + +.Lnot_found: + mv a0, a1 + ret + +END(strnlen) From nobody Sun Nov 30 01:45:59 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dJqcl5r89z6JfDc for ; Sun, 30 Nov 2025 01:45:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dJqcl34fyz3mhN for ; Sun, 30 Nov 2025 01:45:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764467159; 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=6diB2hHvaOOPB2XdMHY2fvgdHJI0CpUp65t8XUPG97k=; b=etwQI1hYi3/87OExW4SUW3LjkqnPmsjk/kJ4VXyOaHhM3QdtcoYqamfwe3pT3uHDk3/RNu ij2F1MRSTrSZRAEWuOyOJZMFt1vHLaDPBmcclyDPItvLaDu705xu4Zw2TjhYe5wnVMEpux SH0UNyFX7N1RgV2y7/IIMmVd+BfRh1YEwCOnpuHci2hw6TEeXU4T0ZOgpGRzwrhWB7l7EL Rx0a0tk5mJKBA3jSb0dFUJOlsXKe0cJE/H7WFTH1KQDE+pvdkiKsx6kKJrds08bAafHSQn NmeheUu48TxZa9iAMy4jhwGMUKEMeZsbuneDXWr9s4eI44/gjGxZ5XqsukGGWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764467159; 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=6diB2hHvaOOPB2XdMHY2fvgdHJI0CpUp65t8XUPG97k=; b=F6DcMFqfMP0Kwp+l6+EBDTXkM4lI9pbDNXq2sWdkOCEiVvBlWkI9CIw6fQEUhgoHtaN7jL eZQeXQPR5q/iDSIZ0o3co+KAh4AExNm0/xsJpqBN1+qjTAA0FZvHqm2qWMtuu9I2sF+JgU JecpWIda8efVWzXnweShRDmQrONMxPb9UfZ16NwwK9OhsMCwP044FHLtdZRT0qxfo8o/gS ATkaMln4tUEs2z2mkHtbMxXSAPJ2pKvjJy06BlkA++1xU6+4UOJcDMZ5yArvao70Jltnhp OizoLKzh7EkBNKUmXZRgnFtwmHPcC3/yeMXzRYsG2ckiD9DtC5EI1/qQjkiUDA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764467159; a=rsa-sha256; cv=none; b=HuOD237z6qj1L1Pm4a3zmfgkE9XrNUTulPNK5zSs5JmVbw63IUtYelIa5N+Ru78YXHE/6k 1LP9fC8l9Aqa9CwbJgD30ayVw3OSdchDjWZASoH/vARji+o+WbCQPs3zha0Q9EF/GKPvrw 8QdIKAYY8EHCWqfQNzmt/h72+MPZAckQSTgNNvvv1AEWOteHmlxo7QMs8xdFqAz/TeXlJa U8dHdfqqxsv1gbL2xvJshsjot5kndu1QFJ7Qg49tzd13Xd1haLzA/SDYrvugUgjjpOlRlc 7LxM0JOOGmn7JwGWdNssp9tudX5Xm2Aqa3DZkDORlDEzTLPJvHwBmxjP9kbSyA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dJqcl2Hw6zR9 for ; Sun, 30 Nov 2025 01:45:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 28665 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 30 Nov 2025 01:45:59 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Strahinja =?utf-8?Q?Stani=C5=A1?==?utf-8?Q?i=C4=87?= From: Robert Clausecker Subject: git: f56c68448d42 - stable/15 - libc: scalar strchrnul() in RISC-V assembly List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: fuz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: f56c68448d429687a81ce4d97b16e7b9d7c57808 Auto-Submitted: auto-generated Date: Sun, 30 Nov 2025 01:45:59 +0000 Message-Id: <692ba1d7.28665.9efa142@gitrepo.freebsd.org> The branch stable/15 has been updated by fuz: URL: https://cgit.FreeBSD.org/src/commit/?id=f56c68448d429687a81ce4d97b16e7b9d7c57808 commit f56c68448d429687a81ce4d97b16e7b9d7c57808 Author: Strahinja Stanišić AuthorDate: 2024-07-19 17:58:04 +0000 Commit: Robert Clausecker CommitDate: 2025-11-30 00:43:06 +0000 libc: scalar strchrnul() in RISC-V assembly Scalar implementation of strchrnul() in RISC-V assembly and changes to the corresponding manpage. Performance was benchmarked on a HiFive Unmatched (SiFive HF105-001) board using: https://github.com/clausecker/strperf os: FreeBSD arch: riscv │ strchrnul_baseline │ strchrnul_scalar │ │ sec/op │ sec/op vs base │ Short 680.2µ ± 5% 435.3µ ± 0% -36.01% (p=0.000 n=20) Mid 314.7µ ± 3% 221.4µ ± 0% -29.63% (p=0.000 n=20) Long 152.3µ ± 0% 138.5µ ± 0% -9.08% (p=0.000 n=20) geomean 319.5µ 237.2µ -25.75% │ strchrnul_baseline │ strchrnul_scalar │ │ MiB/s │ MiB/s vs base │ Short 183.8 ± 5% 287.2 ± 0% +56.27% (p=0.000 n=20) Mid 397.3 ± 3% 564.6 ± 0% +42.12% (p=0.000 n=20) Long 820.5 ± 0% 902.5 ± 0% +9.99% (p=0.000 n=20) geomean 391.3 527.0 +34.68% MFC after: 1 month MFC to: stable/15 Approved by: markj (mentor) Reviewed by: fuz Sponsored by: Google LLC (GSoC 2024) Differential Revision: https://reviews.freebsd.org/D46047 (cherry picked from commit 08af0bbc9c7d71bbaadb31ad31f8492f40537c5c) --- lib/libc/riscv/string/Makefile.inc | 1 + lib/libc/riscv/string/strchrnul.S | 116 +++++++++++++++++++++++++++++++++++++ 2 files changed, 117 insertions(+) diff --git a/lib/libc/riscv/string/Makefile.inc b/lib/libc/riscv/string/Makefile.inc index 4b97490a5494..719f22f6077f 100644 --- a/lib/libc/riscv/string/Makefile.inc +++ b/lib/libc/riscv/string/Makefile.inc @@ -4,4 +4,5 @@ MDSRCS+= \ memset.S \ strlen.S \ strnlen.S \ + strchrnul.S \ strrchr.S diff --git a/lib/libc/riscv/string/strchrnul.S b/lib/libc/riscv/string/strchrnul.S new file mode 100644 index 000000000000..8abba71c4199 --- /dev/null +++ b/lib/libc/riscv/string/strchrnul.S @@ -0,0 +1,116 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2024 Strahinja Stanisic + */ + +#include + + .weak strchrnul + .set strchrnul, __strchrnul + +/* + * a0 - const char *str + * a1 - int c; + */ +ENTRY(__strchrnul) + /* + * a0 - const char *ptr; + * a1 - char cccccccc[8]; + * a2 - char iter[8]; + * a3 - char mask_end + */ + + /* int to char */ + andi a1, a1, 0xFF + + /* t0 = 0x0101010101010101 */ + li t0, 0x01010101 + slli t1, t0, 32 + or t0, t0, t1 + + /* t1 = 0x8080808080808080 */ + slli t1, t0, 7 + + /* spread char across bytes */ + mul a1, a1, t0 + + /* align_offset */ + andi t2, a0, 0b111 + + /* align pointer */ + andi a0, a0, ~0b111 + + /* if pointer is aligned skip to loop */ + beqz t2, .Lloop + + ld a2, (a0) + + /* mask_start calculation */ + slli t2, t2, 3 + neg t2, t2 + srl t2, t0, t2 + + /* fill bytes before start with non-zero */ + or a3, a2, t2 + + xor a2, a2, a1 + or a2, a2, t2 + + /* has_zero for \0 */ + not t3, a3 + not t2, a2 + sub a3, a3, t0 + sub a2, a2, t0 + and a3, a3, t3 + and a2, a2, t2 + and a3, a3, t1 + and a2, a2, t1 + + + /* if \0 or c was found, exit */ + or a2, a2, a3 + addi a0, a0, 8 + bnez a2, .Lfind_char + + +.Lloop: + ld a2, (a0) + + /* has_zero for both \0 or c */ + xor a3, a2, a1 + + not t2, a2 + not t3, a3 + sub a2, a2, t0 + sub a3, a3, t0 + and a2, a2, t2 + and a3, a3, t3 + and a2, a2, t1 + and a3, a3, t1 + + /* if \0 or c was found, exit */ + or a2, a2, a3 + addi a0, a0, 8 + beqz a2, .Lloop + +.Lfind_char: + addi a0, a0, -8 + + /* isolate lowest set bit */ + neg t0, a2 + and a2, a2, t0 + + li t0, 0x0001020304050607 + srli a2, a2, 7 + + /* lowest set bit is 2^(8*k) + * multiplying by it shifts the idx array in t0 by k bytes to the left */ + mul a2, a2, t0 + + /* highest byte contains idx of first zero */ + srli a2, a2, 56 + + add a0, a0, a2 + ret +END(__strchrnul) From nobody Sun Nov 30 01:45:58 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dJqck4SD0z6JdyK for ; Sun, 30 Nov 2025 01:45:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dJqck1xkVz3mTK for ; Sun, 30 Nov 2025 01:45:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764467158; 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=WVFFuec1dYkOq/CRQLpq2ddcvhGyDo3wEn6nsBJ+zTw=; b=dB8mvSMrt/H9/e8bHPFEZMNz4vP/BrKxYtSV6H9UjV+M+Lh/jg2xo6pVywH6rT+gOwh/dF DlxfjzpOXEyCos9hQE7sNz6BD4f3I5lG1nafcCN3LjQ8dkQcaKsvwzJAlL/WaL4op8rgd/ XSfVK6Of0yGIuc/fF3udFV+nxAjAunr3dro7+JgPqgJGaeaCG5PQHi/fLrgLj5SXhdT48V LXrxhQ8wSCl23dn5PcUz/XwCJADOQXmn+vShD/y2zGQq8M+as2umIR7vrrqfGo9IUp/bkK YmW7fSwms2mLS3823lwSipycy1RtbVjnnK8COBda7ad+/lT/jinqxLHAuivftw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764467158; 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=WVFFuec1dYkOq/CRQLpq2ddcvhGyDo3wEn6nsBJ+zTw=; b=Cbmp074JdunuDkmzXnnZGaa9a8hKcaB9KKsr3oV0aDf1dninaMhqfTb0he+V+a8dUOaVr9 Qiisl3SUojQq37+EglqGEvE/33gK8mo8JltMTRd3POsTsjB82nNBvXEPNEU5TnnOYFcxM6 VzEvmHOIs44/fLBrN1c6hPawc1kZ2Z5YEud/MS0vCIWH1W54wmI81cvncKhTDZ0AHC1Nv3 EE02SkfF3c+IQ9Sq72z7h452lqjvUTTOh1FWWyQqGBiOAcFGlTbyVVfb5mDSqD+/RgETDG su5+EbIKbrIM/uZfarYmodpg2ljwKxU7MY7u8wAS6vXH43/8jammQybs9/0ymA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764467158; a=rsa-sha256; cv=none; b=nVXIO+8kQ78WFSxCm/en4KNwtMHnimOiJWK2ZjOhkvOkgcPAJdokWzKd0inFMCMHRtqntu UUtgxySJtgbTfWT/hZpFW7nJWNGijOs09fv2LBgwJ+FR1I29XnfYArlObpvbtXMy03wmV0 a//IhM6pJAd1h7J9CtCxXCSZaBqpIKiqU4HaKgPj0UkjULQbxaxIJGNkcoOKMz3+dUeaQT opAEQFQ8xUDIpIEhZ0FOsQncLdcbqa73bthNCBYf8ALDLtiAHxRPIsoyhzztRyu14M80Oh 7taDwGzwiWjzO1ejvP3FaA7j75/elpryyvPxYBoRjQeUHEW6FYM4+4MDtFWlRw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dJqck1Tr9z9P for ; Sun, 30 Nov 2025 01:45:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2a976 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 30 Nov 2025 01:45:58 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Strahinja =?utf-8?Q?Stani=C5=A1?==?utf-8?Q?i=C4=87?= From: Robert Clausecker Subject: git: b06836f6231c - stable/15 - simd.7: add scalar strnlen() for RISC-V to manpage List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: fuz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: b06836f6231cf6f3c09fa0b7940ea27f5b645166 Auto-Submitted: auto-generated Date: Sun, 30 Nov 2025 01:45:58 +0000 Message-Id: <692ba1d6.2a976.7efdfb97@gitrepo.freebsd.org> The branch stable/15 has been updated by fuz: URL: https://cgit.FreeBSD.org/src/commit/?id=b06836f6231cf6f3c09fa0b7940ea27f5b645166 commit b06836f6231cf6f3c09fa0b7940ea27f5b645166 Author: Strahinja Stanišić AuthorDate: 2024-08-05 13:51:09 +0000 Commit: Robert Clausecker CommitDate: 2025-11-30 00:43:06 +0000 simd.7: add scalar strnlen() for RISC-V to manpage MFC after: 1 month MFC to: stable/15 Approved by: mhorne, markj (mentor) Reviewed by: fuz, Jari Sihvola Sponsored by: Google LLC (GSoC 2024) Differential Revision: https://reviews.freebsd.org/D46230 (cherry picked from commit 474a80d3ff8516df5c379fa7f8e563cecb032060) --- share/man/man7/simd.7 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/man/man7/simd.7 b/share/man/man7/simd.7 index c09ed0edb960..6695a137da77 100644 --- a/share/man/man7/simd.7 +++ b/share/man/man7/simd.7 @@ -80,7 +80,7 @@ Enhanced functions are present for the following architectures: .It strncat Ta A Ta Ta S1 .It strncmp Ta A Ta S Ta S1 Ta S .It strncpy Ta Ta Ta S1 Ta Ta S2 -.It strnlen Ta A Ta Ta S1 +.It strnlen Ta A Ta Ta S1 Ta Ta Ta S .It strrchr Ta A Ta Ta S1 Ta S Ta Ta S .It strpbrk Ta S Ta Ta S2 .It strsep Ta S Ta Ta S2 From nobody Sun Nov 30 01:46:00 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dJqcm6J6Lz6Jf41 for ; Sun, 30 Nov 2025 01:46:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dJqcm3rjNz3mcV for ; Sun, 30 Nov 2025 01:46:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764467160; 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=ZClRHxKs7ulnk6rPqEqNvkqdq7Ue5eN4WFYiAUOGUyQ=; b=cwNBx/3C69EH1Ei02wWIv+ii1r9XNUTu5wpaxZWsQcgeXQUUnB9sS6rkzLXLPs4SvMJNP3 j/3itsonFPR4u39GEdpFffubXt74jW5w2+pzsMAPbYQ+WorMA5DtABl3/8Ou/Nph2hJczD QZ3q1sZs3hxlvw2q2u87SPVKflSqToSbgj+NXlvbiCOo4GMiLpYN1l0We1fKo4umrMSFQJ FW2fixPyAnDNmwp1CRVMTgpsL4mFvLqW7I86gLXSuU+yV/xe8uguM+PdXaQePkWQ7+YHnb fO5X5G+kCMIbYuW6KQ6eLJqUQJbWQ9oa6hmKyGFjJF+r0aaXH0ahDusDqSyXBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764467160; 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=ZClRHxKs7ulnk6rPqEqNvkqdq7Ue5eN4WFYiAUOGUyQ=; b=W/FxCvaPAd8Gv0x9Mpc+ZgYndWyfv6SQoebMq7XpPEpSzUMiDz8xnXf1brzHuBjGZI+s7r mzK+QqdaF9B18dptCSYSIKQaSVJ+des5zr5i1pzrqwGLVAZ0hX6UrEBPxGW7n18EFMIwZD BWBGq9VfNkaUvUYVHOvgj+JlFZS/gswJbwpp4+EMcLkE5bAO4ont9DUfi9ckyuX8NZbPNY CjsmaPrr9ZKQxiXYS9F4lueftnp9FiaYjtIY/ig0O9G6zI2GAHrnI/U1CLHJi41EVnNatl Zrm4qGGUKzXUsJXirU5WE/xU57R1Y72YwOqKtnvNSl/Gvuzoeq7myvArehtJ1g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764467160; a=rsa-sha256; cv=none; b=bAnbzI4ZXs0QafJjxtyqi8KeT/+TVIJQIRKYcS2kUF/H4F8XcXVu6geeK9pbRkGj4ZF6E8 GDNavJva/i94Td35HFXsfBj3n7BqrTx08gze9jPtpSPrO/Dhgfrdq0rtP/X4heNCOPVAZx GbhAEpdzqcLpY6m9zPOHMXB3iXh9qVh8jk+SB5ehGYtzVxB6UzsKN7njMZOBDf43Qdn18A 0lt5cD/+XwJoViku3LnzXnEUDC8oGoV3V00B8zrU/Kq/hBNPVdhqVKfSi94B/kFfB6238W w96w4Tkv3voe71dMakJerQe2xA2sZlfG1vKkZOYGZay2ni9HXMdHxobjyCb/PQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dJqcm3K2Lz1CT9 for ; Sun, 30 Nov 2025 01:46:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 29e85 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 30 Nov 2025 01:46:00 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Strahinja =?utf-8?Q?Stani=C5=A1?==?utf-8?Q?i=C4=87?= From: Robert Clausecker Subject: git: 4e63278f7b7f - stable/15 - simd.7: add scalar strchrnul() for RISC-V to manpage List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: fuz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 4e63278f7b7f5b5cd326cf53c34fdee3abed1021 Auto-Submitted: auto-generated Date: Sun, 30 Nov 2025 01:46:00 +0000 Message-Id: <692ba1d8.29e85.67a278ae@gitrepo.freebsd.org> The branch stable/15 has been updated by fuz: URL: https://cgit.FreeBSD.org/src/commit/?id=4e63278f7b7f5b5cd326cf53c34fdee3abed1021 commit 4e63278f7b7f5b5cd326cf53c34fdee3abed1021 Author: Strahinja Stanišić AuthorDate: 2024-07-19 18:01:51 +0000 Commit: Robert Clausecker CommitDate: 2025-11-30 00:43:06 +0000 simd.7: add scalar strchrnul() for RISC-V to manpage index() and strchr() are implemented by calling strchrnul(), so they also get to be marked as platform-specific. MFC after: 1 month MFC to: stable/15 Approved by: markj (mentor) Reviewed by: fuz Sponsored by: Google LLC (GSoC 2024) Differential Revision: https://reviews.freebsd.org/D46047 (cherry picked from commit 39fef5b9fa943f301776e0b0bf406cedd7c29af2) --- share/man/man7/simd.7 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/share/man/man7/simd.7 b/share/man/man7/simd.7 index 6695a137da77..449ca4274287 100644 --- a/share/man/man7/simd.7 +++ b/share/man/man7/simd.7 @@ -24,7 +24,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE . -.Dd October 16, 2025 +.Dd October 21, 2025 .Dt SIMD 7 .Os .Sh NAME @@ -55,7 +55,7 @@ Enhanced functions are present for the following architectures: .It bcopy Ta A Ta S Ta S Ta S Ta SV .It bzero Ta A Ta S Ta S Ta S .It div Ta Ta Ta S Ta S -.It index Ta A Ta Ta S1 +.It index Ta A Ta Ta S1 Ta Ta S .It ldiv Ta Ta Ta S Ta S .It lldiv Ta Ta Ta S .It memchr Ta A Ta Ta S1 Ta Ta Ta S @@ -69,8 +69,8 @@ Enhanced functions are present for the following architectures: .It stpcpy Ta A Ta Ta S1 .It stpncpy Ta Ta Ta S1 .It strcat Ta A Ta Ta S1 Ta S -.It strchr Ta A Ta Ta S1 Ta S -.It strchrnul Ta A Ta Ta S1 +.It strchr Ta A Ta Ta S1 Ta S Ta Ta S +.It strchrnul Ta A Ta Ta S1 Ta Ta Ta S .It strcmp Ta A Ta S Ta S1 Ta S .It strcpy Ta A Ta Ta S1 Ta S Ta S2 .It strcspn Ta S Ta Ta S2 From nobody Sun Nov 30 01:46:01 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dJqcp5FqLz6Jf4F for ; Sun, 30 Nov 2025 01:46:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dJqcn4Zk8z3mNP for ; Sun, 30 Nov 2025 01:46:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764467161; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KwrzZZlEb8CdRz8ycd07o9QNMvpA0CukNdCIXt3+8Co=; b=s1bzPZs2FML8RpAUPyn5l0u1JgQrQnU0YGm6V7r2YJ/uxRThuMyW8jEmrzeNIrIzIK4/3n j3QksHSRnvuEkzKQ2rJy5TyTHRqOJEbIP846JjZMX3GO7MDGDz/mnCqZmKOpC0qBuJIAKU yGbbR/SQPf8h61iMA7PCRTMlOtlyPk2q1APcc6kZ1UteDg0fnoN2P2MeJuago9ncSPRaW7 peWU4+iRa9xc497+2Nindmgf1TayID0mN+dPvjqIw8/Ux0x5SG0KNPlGnmjLDJ2yvranQi FfxuGfctpJqbMzJzlSzFocuiYVnLy58tWmQKkwxMgKu6HL1GtkNCgXFTiuHLyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764467161; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KwrzZZlEb8CdRz8ycd07o9QNMvpA0CukNdCIXt3+8Co=; b=cA5FvLBhoPpovBljuT+bZTsDOSbKd6tJiAEIjsaHpUBcutHClmPOjHpRiFPs2jQ54qoJLy 3066zA02pQSRmXoucJ+r7ITSZu+Rct9qu0ElHOaMYWSwuWCy2XhUm98QDOgXfXtGqaqsIT FTpyOMq0pachWYQH0t/BzGj3LaVA0fDPpZwu82sr1PVlCgDxscs26AW43AcWXqh1HCdbX7 n3bQe73jC0IzuMqxIo91R67j+XNM/GeCKpg8HxhCJ+3/vhxWlnygil5HVWvMbQrg0fJNjF xhhMKi+Fpml0KNkR/GOftno/BSGWnZS97cBYSx4zBjxQNlCCUfqA4vLvC4A7+g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764467161; a=rsa-sha256; cv=none; b=onyN/QsG8lrCFjJn14Tvo2fHZMXYuzmgqOku1HZ+14x72hYFq1SE55v5vnxLsmoPM1fg/V aEcWCxjw3qd+oZJL+iA5fsTDq0tVeiyXkU3tygPqaHXgnNlPzvJMpJEss1MjYGGdnlzhO3 dFL6VAfdgHj5UKxGXI9F4JGs1+pD40noJNXp0vl3EEvKOTqq0pr+h97+qaFyJFXRSkPzAR KeIAv2esWF7DaqyW3C4nw0SHWnsoV30+htzFMk+kpANVppjPPi5gAVaY3AiNcWG0Pnciw2 FNBKQvl0ReJpqe0OVauXexV+3PJHhPR4gc/H6A1aY253ujlEx0LbUSjVxBEfYQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dJqcn40mCzTC for ; Sun, 30 Nov 2025 01:46:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 29572 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 30 Nov 2025 01:46:01 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Robert Clausecker Subject: git: be97631f198f - stable/15 - libc/riscv64: implement bcopy() and bzero() through memcpy() and memset() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: fuz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: be97631f198fd2fb94f6ab10c144f0292bc731bc Auto-Submitted: auto-generated Date: Sun, 30 Nov 2025 01:46:01 +0000 Message-Id: <692ba1d9.29572.13c9d595@gitrepo.freebsd.org> The branch stable/15 has been updated by fuz: URL: https://cgit.FreeBSD.org/src/commit/?id=be97631f198fd2fb94f6ab10c144f0292bc731bc commit be97631f198fd2fb94f6ab10c144f0292bc731bc Author: Robert Clausecker AuthorDate: 2025-10-21 18:55:41 +0000 Commit: Robert Clausecker CommitDate: 2025-11-30 00:43:06 +0000 libc/riscv64: implement bcopy() and bzero() through memcpy() and memset() This picks up the accelerated string functions written by strajabot@. Event: Google Summer of Code 2024 MFC after: 1 month MFC to: stable/15 See also: 79e01e7e643c9337d8d6046b6db7df674475a099 Approved by: markj (mentor) Differential Revision: https://reviews.freebsd.org/D53248 (cherry picked from commit b5dbf3de561189140c73f915bd50c28ea69a1e19) --- lib/libc/riscv/string/Makefile.inc | 2 ++ lib/libc/riscv/string/bcopy.c | 14 ++++++++++++++ lib/libc/riscv/string/bzero.c | 14 ++++++++++++++ 3 files changed, 30 insertions(+) diff --git a/lib/libc/riscv/string/Makefile.inc b/lib/libc/riscv/string/Makefile.inc index 719f22f6077f..6dae6b2cb62d 100644 --- a/lib/libc/riscv/string/Makefile.inc +++ b/lib/libc/riscv/string/Makefile.inc @@ -1,4 +1,6 @@ MDSRCS+= \ + bcopy.c \ + bzero.c \ memchr.S \ memcpy.S \ memset.S \ diff --git a/lib/libc/riscv/string/bcopy.c b/lib/libc/riscv/string/bcopy.c new file mode 100644 index 000000000000..0dee529fb9df --- /dev/null +++ b/lib/libc/riscv/string/bcopy.c @@ -0,0 +1,14 @@ +/*- + * Public domain. + */ + +#include + +#undef bcopy /* _FORTIFY_SOURCE */ + +void +bcopy(const void *src, void *dst, size_t len) +{ + + memmove(dst, src, len); +} diff --git a/lib/libc/riscv/string/bzero.c b/lib/libc/riscv/string/bzero.c new file mode 100644 index 000000000000..d82f3061865b --- /dev/null +++ b/lib/libc/riscv/string/bzero.c @@ -0,0 +1,14 @@ +/*- + * Public domain. + */ + +#include + +#undef bzero /* _FORTIFY_SOURCE */ + +void +bzero(void *b, size_t len) +{ + + memset(b, 0, len); +} From nobody Sun Nov 30 01:46:03 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dJqcr26bqz6Jf4K for ; Sun, 30 Nov 2025 01:46:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dJqcq6JFZz3mkl for ; Sun, 30 Nov 2025 01:46:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764467163; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MmoH+Yt72ixVezcuOvCEnIKGDLJ/om1hCSogaI2cJYk=; b=eM9tUYvybhqBb0NKHxqok8T0v2RDzvq74Z9tyuCT/ogtVYur3w3ECChXVlyU01v5YQpd7j mYH4jJw0TK57W7ijSSVFeFKZD5YlmRLp9u0/aXY985FSPTwoTqC0UzyL+i1E/viglMVKVV uQw3Du6VEwgxmwUSw+gVJBHwm6BgZPKCf3Y3ydrgvVt0w/HixVztsbgK7td7CepebJpEAZ A8Q/a0VgzBAYq8yFJZpe/W7T27IUqaSt07vhUuB2YoJmvbeR2lww7VnDSxHes1h3NYmwRE VDZk2QMGztG+kqQlMk5enFXOFDqPassK1PYcEB+mw3SsMPhz4dimItfN98RC8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764467163; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MmoH+Yt72ixVezcuOvCEnIKGDLJ/om1hCSogaI2cJYk=; b=TzmFvHyqws0mUiqSgXt9JCWaHe4gblRTtFsNqE+kH6kDplBt3JGJ3YqPajxxjOe2WkeKVe wfDUz4El22MvvmxxSgSyjlpqBwrBTuEO4WXDL/voXNM5ByTJoMTAysWNaJvfNrjygRIckQ CebJkMfTa1NvfHLXmjIQWOP20y/ub6kmVckZcv/TPL7hC6PwQSfUlF9l6mPPMorKZPaPxw oFUKzmtD4WseWb9rZtowqzcZrdCG1xxQ3eVoN5MJDslN1IGWt+63aSsDXFmugXC+vsWPk4 biXm15WJzvl8cJgV9yFWhLX9+i4T2fnRZQ9pRKeD0VzgvAqEyyMvaSEp7iPH3g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764467163; a=rsa-sha256; cv=none; b=WKExEezK+cvBfVAxMqb5KdyAyaKKQit51QUDZr/X9Xg3ob4TBt83QmRlRwhvv8A7/yozHn 1dtJEsGO/D0OWpiE94PVoHLtJ7JJjBqzxoI3SWVzXFkbxZFmcrMJBnN6Lkfk5pfxGuCu04 hmli7hL5Azy4LbpoqsYqHOsUJMSh38pTSqmjVUXeCOEDjgqMqS4bSS1wcSsrkiCGiYyUWE VaJtU1Npg/mxythH6NbVgOivcPKAo29rMaquWoxahKXkQ4uqZi6ipSmIkc3zDFd0QOp/+F IuEDEKFFsKyg15IXuW3lMyKGck1IHYgFEa4ilRBhiNFj5XUYMHL+R6X5NwQJMA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dJqcq5pj0zQ3 for ; Sun, 30 Nov 2025 01:46:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 29032 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 30 Nov 2025 01:46:03 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Robert Clausecker Subject: git: 136905676ef1 - stable/15 - depend-cleanup.sh: clean up after riscv64 enhanced string function patch set List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: fuz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 136905676ef116d161ae3955ad378f2ae090519f Auto-Submitted: auto-generated Date: Sun, 30 Nov 2025 01:46:03 +0000 Message-Id: <692ba1db.29032.d34af5a@gitrepo.freebsd.org> The branch stable/15 has been updated by fuz: URL: https://cgit.FreeBSD.org/src/commit/?id=136905676ef116d161ae3955ad378f2ae090519f commit 136905676ef116d161ae3955ad378f2ae090519f Author: Robert Clausecker AuthorDate: 2025-10-30 18:57:23 +0000 Commit: Robert Clausecker CommitDate: 2025-11-30 00:43:06 +0000 depend-cleanup.sh: clean up after riscv64 enhanced string function patch set This ensures an incremental build succeeds after import of D47275, D46023, D45730, D45693, D46139, D46230, D46047, and D53248. Approved by: markj (mentor) MFC after: 1 month MFC to: stable/15 Differential Revision: https://reviews.freebsd.org/D53485 (cherry picked from commit d59e924d2969ce2c8bec0fc4500989865fbece75) --- tools/build/depend-cleanup.sh | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/tools/build/depend-cleanup.sh b/tools/build/depend-cleanup.sh index aa01db6ccc37..d751118a79a2 100755 --- a/tools/build/depend-cleanup.sh +++ b/tools/build/depend-cleanup.sh @@ -476,3 +476,30 @@ if [ -f "$OBJTOP"/usr.sbin/moused/moused ]; then echo "Removing old moused binary" run rm -fv "$OBJTOP"/usr.sbin/moused/moused fi + +if [ ${MACHINE} = riscv ]; then + # 20251031 df21a004be23 libc: scalar strrchr() in RISC-V assembly + clean_dep lib/libc strrchr c + + # 20251031 563efdd3bd5d libc: scalar memchr() in RISC-V assembly + clean_dep lib/libc memchr c + + # 20251031 40a958d5850d libc: scalar memset() in RISC-V assembly + clean_dep lib/libc memset c + + # 20251031 e09c1583eddd libc: scalar strlen() in RISC-V assembly + clean_dep lib/libc strlen c + + # 20251031 25fdd86a4c92 libc: scalar memcpy() in RISC-V assembly + clean_dep lib/libc memcpy c + + # 20251031 5a52f0704435 libc: scalar strnlen() in RISC-V assembly + clean_dep lib/libc strnlen c + + # 20251031 08af0bbc9c7d libc: scalar strchrnul() in RISC-V assembly + clean_dep lib/libc strchrnul c + + # 20251031 b5dbf3de5611 libc/riscv64: implement bcopy() and bzero() through memcpy() and memset() + clean_dep lib/libc bcopy c "libc.string.bcopy.c" + clean_dep lib/libc bzero c "libc.string.bzero.c" +fi From nobody Sun Nov 30 01:46:02 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dJqcq3HLSz6Jf1w for ; Sun, 30 Nov 2025 01:46:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dJqcp5py7z3mf7 for ; Sun, 30 Nov 2025 01:46:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764467162; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gTmIi53JpZBRlIWIVZbxYCxzf/HKG8xw+qnELkFOkgE=; b=Xw675SQAGFofJNVSBvQe43rluNda0yUx2zBrSUnkYP0FOC1HSfNnM8YNDifPHR2bFxmF7P YiTqp+IUiLDvqxL0YGKG4rPh4Zt5ftJRbb16HIbyQQGB6bDBn89TFnPr/1V0baGi7nEOyT WN2INRwWoIlo9rNUJuLNmAp07alJPloxdL50EHCJviUq3k7lmZtKhNuL/4s1tdr5WQGoVJ HVGIeKQrDIqhclDM49tizl4jMS1hi4WKsUxJAn1Oo7GyhZYj47MNLOzBc/Ndq1vNbU4O6a IngLPYcQUAeDjIpTCpAN9KgKa/u7zFIsrjRoUH11fT7Or/N9XcFpjvxkSyQf8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764467162; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gTmIi53JpZBRlIWIVZbxYCxzf/HKG8xw+qnELkFOkgE=; b=rb7m29Ldjwk0ccly1920wUhOa+11mE4Jc+SE659/1hgGhWNj17Klxoab3spBfrZyZcHUiC BOhrG7n25/KhBYU/4nE7irTgJokD3EIEjPy5/mebFgeGVXTF5XyN6f1VWe+Z8bZYSNmGbH tukQdL+S4owQK3wlrZrQHSQyJh3osacTCADOtLWCd8azidrLUS/IcKFnawEnQzu3RhyOBR T5ro5IrVHFIJ75Yn8vmAGkh2gI8t+kUw/K80mrnyeV5N18UWqthG5lZlcUp50bBIk4eRGw Yg5bRQwUbtXo9y2dz1v3nAhS4Y9UnDmx7eKmGC6rTapaDfuYhwZdglSBSyOBpw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764467162; a=rsa-sha256; cv=none; b=ePxF5yHs6nhC1bSh1yXtFehDmhfcuTsQusSM+0QakHztn1EfrR5W1wv8udw06+3urt+pZg S4J8Yqk9Uvr7VkiKH78U2LPR31MzrkN2yBDWOYtPbi9LXRexE6s4RH+HDmpSnxm+ezrnjZ 07FXR/gzt6mzxieBlNmGC+nSgaw+DQCkD0v1s5JGr2b1cqPuMxViT42IcQiP8b/uDPMKDE C4w/a0D6EKWytFVJpJEfh/lWtfcFs3NC0riLcywwjX9JoLVZamhjyZoRdcUR8M2Hex+d+5 HNjwSW16HjbOxc2dYS7/SPiJZfCOzLRmfacf9zeTK5s/q0ekhwzk2JTsIgcfLg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dJqcp581PzTD for ; Sun, 30 Nov 2025 01:46:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2866a by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 30 Nov 2025 01:46:02 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Robert Clausecker Subject: git: 65f6088d1775 - stable/15 - simd.7: document bcopy() and bzero() as accelerated on riscv64 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: fuz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 65f6088d177525306751e3e03f9089aef0d82d6a Auto-Submitted: auto-generated Date: Sun, 30 Nov 2025 01:46:02 +0000 Message-Id: <692ba1da.2866a.1b820bb0@gitrepo.freebsd.org> The branch stable/15 has been updated by fuz: URL: https://cgit.FreeBSD.org/src/commit/?id=65f6088d177525306751e3e03f9089aef0d82d6a commit 65f6088d177525306751e3e03f9089aef0d82d6a Author: Robert Clausecker AuthorDate: 2025-10-21 18:58:16 +0000 Commit: Robert Clausecker CommitDate: 2025-11-30 00:43:06 +0000 simd.7: document bcopy() and bzero() as accelerated on riscv64 Event: Google Summer of Code 2024 MFC after: 1 month MFC to: stable/15 Approved by: markj (mentor) Differential Revision: https://reviews.freebsd.org/D53248 (cherry picked from commit d6870bb941fe235e0031f8bfb53fbd120ff859f9) --- share/man/man7/simd.7 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/share/man/man7/simd.7 b/share/man/man7/simd.7 index 449ca4274287..3343508df504 100644 --- a/share/man/man7/simd.7 +++ b/share/man/man7/simd.7 @@ -52,8 +52,8 @@ Enhanced functions are present for the following architectures: .Bl -column FUNCTION_________ aarch64_ arm_ amd64_ i386_ ppc64_ -offset indent .It Em FUNCTION Ta Em AARCH64 Ta Em ARM Ta Em AMD64 Ta Em I386 Ta Em PPC64 Ta Em RISC-V .It bcmp Ta A Ta Ta S1 Ta S -.It bcopy Ta A Ta S Ta S Ta S Ta SV -.It bzero Ta A Ta S Ta S Ta S +.It bcopy Ta A Ta S Ta S Ta S Ta SV Ta S +.It bzero Ta A Ta S Ta S Ta S Ta Ta S .It div Ta Ta Ta S Ta S .It index Ta A Ta Ta S1 Ta Ta S .It ldiv Ta Ta Ta S Ta S From nobody Sun Nov 30 10:30:49 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dK3GK65sNz6J7RX for ; Sun, 30 Nov 2025 10:30:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dK3GK2yRWz3fGc for ; Sun, 30 Nov 2025 10:30:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764498649; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wj9J7HoU7463q9XkfhzSHvLgaAxjA3mkOerTthM2NXo=; b=cS1DPO0AjgZ0qcm/srIQls6AaS3wnbY3pzwx118GrjdwnYxJVLLvYzEahN0PhLhMF1y5wL IeE4BOcBSKKKFdwTARlWWqkln8wUdEy6KcGyr+5jtQI+RuUICZZ87EpEa3ekQJbCuGyNfs knrCbuGYP5dxkzYysCCVTzAkP2NeCFaYUZmhEsDP1bBl2Ffis8EUW8YFOka4qKkVJ5kQQa XSMY5K1kOOfPXhMSIso6FU/RhG6LG/tW6q7UvO/w6FK4loI7IiZI51wkh/9Eu9zB5/Y28n IwQtWb6lL9uZIegvXgMyxNHkt4yGwQa4IDqkUGR1qVB/vW6pt+al6uvrmob2yA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764498649; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wj9J7HoU7463q9XkfhzSHvLgaAxjA3mkOerTthM2NXo=; b=IF6q4Sma/9UmhXpB0uewzdAnOTYpHbD4oviUJc2V1fhlpOeS4qbFSg3wG6QbOHlsiEuzzQ WZv/YGwRLG3qNWkMySmJPGcQJvzDRKUygnnkn7Q7iIq4tN34+uxuJxQCzHqVOWUtLshoyZ wD2e9GlMwOIPSAMI+avWKIX8OM89bfldc52+KFhmVEJPg0mhbML5LJml80mmJRKZXIq1Cq KQrZ7rTWepUkE9shsuznNXXN3bsiTc32QG+rkTMVjPGizyApSnKzJ+q2T00XWFt5kaO89T /m+tOswf4jAn0OnRogQq+N+8P+KwoG2ojLUlrQobjIUZK9191iQqO3CEEaZXHg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764498649; a=rsa-sha256; cv=none; b=koyWGL9fGuR7QjmJDOdEhOWSbvS1cLkOVo81bRnnH218icpe7pkpZnrqX/gJeTuT5PIFhF KDxHwDZQu+ji3SJxU2rqT17eCGnqmqil6Sj9VR/zw1/DspYU6DDWGcBNKg6pGUwlo4zNAG zdF8LIV915CnMdCVLh33O6nahX34Lkogms5BAED+CtBwgFfbLK/AAUIUuZXYVfcnIvw1zi KoHsQ7TsGu1AgTgWyQnS53DU7x4KgcpYEArYJvpDhMFt2ED45AEg0EZAVqtVi1C4ifK4L9 uZI4RVw68prVJG2ugv86QuHJa+meXHLX8P4J6dDYpFEZKHGVQWBsfEwVvt7b7w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dK3GK24QrzX1W for ; Sun, 30 Nov 2025 10:30:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 8482 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 30 Nov 2025 10:30:49 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 7d8effcf65fe - stable/15 - pf: handle divert packets List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 7d8effcf65fe598417924e0b314570b893b626c0 Auto-Submitted: auto-generated Date: Sun, 30 Nov 2025 10:30:49 +0000 Message-Id: <692c1cd9.8482.3e4056af@gitrepo.freebsd.org> The branch stable/15 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=7d8effcf65fe598417924e0b314570b893b626c0 commit 7d8effcf65fe598417924e0b314570b893b626c0 Author: Kristof Provost AuthorDate: 2025-11-15 13:44:54 +0000 Commit: Kristof Provost CommitDate: 2025-11-30 10:27:27 +0000 pf: handle divert packets In a divert setup pf_test_state() may return PF_PASS, but not set the state pointer. We didn't handle that, and as a result crashed immediately afterwards trying to dereference that NULL state pointer. Add a test case to provoke the problem. PR: 260867 MFC after: 2 weeks Submitted by: Phil Budne Sponsored by: Rubicon Communications, LLC ("Netgate") (cherry picked from commit 66f2f1c83247f05a3a599d7e88c7e7efbedd16b5) --- sys/netpfil/pf/pf.c | 20 ++++++++++-------- tests/sys/netpfil/pf/divert-to.sh | 43 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+), 8 deletions(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index af0629397ea0..fa6dd41cecee 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -11020,10 +11020,12 @@ pf_test(sa_family_t af, int dir, int pflags, struct ifnet *ifp, struct mbuf **m0 break; action = pf_test_state(&s, &pd, &reason); if (action == PF_PASS || action == PF_AFRT) { - if (V_pfsync_update_state_ptr != NULL) - V_pfsync_update_state_ptr(s); - r = s->rule; - a = s->anchor; + if (s != NULL) { + if (V_pfsync_update_state_ptr != NULL) + V_pfsync_update_state_ptr(s); + r = s->rule; + a = s->anchor; + } } else if (s == NULL) { /* Validate remote SYN|ACK, re-create original SYN if * valid. */ @@ -11072,10 +11074,12 @@ pf_test(sa_family_t af, int dir, int pflags, struct ifnet *ifp, struct mbuf **m0 default: action = pf_test_state(&s, &pd, &reason); if (action == PF_PASS || action == PF_AFRT) { - if (V_pfsync_update_state_ptr != NULL) - V_pfsync_update_state_ptr(s); - r = s->rule; - a = s->anchor; + if (s != NULL) { + if (V_pfsync_update_state_ptr != NULL) + V_pfsync_update_state_ptr(s); + r = s->rule; + a = s->anchor; + } } else if (s == NULL) { action = pf_test_rule(&r, &s, &pd, &a, &ruleset, &reason, inp, &match_rules); diff --git a/tests/sys/netpfil/pf/divert-to.sh b/tests/sys/netpfil/pf/divert-to.sh index ae44cd5d51af..153136199311 100644 --- a/tests/sys/netpfil/pf/divert-to.sh +++ b/tests/sys/netpfil/pf/divert-to.sh @@ -372,6 +372,47 @@ in_dn_in_div_in_out_div_out_dn_out_cleanup() pft_cleanup } +atf_test_case "pr260867" "cleanup" +pr260867_head() +{ + atf_set descr 'Test for the loop reported in PR260867' + atf_set require.user root +} + +pr260867_body() +{ + pft_init + divert_init + + epair=$(vnet_mkepair) + + ifconfig ${epair}a 192.0.2.1/24 up + + vnet_mkjail alcatraz ${epair}b + jexec alcatraz ifconfig ${epair}b 192.0.2.2/24 up + + # Sanity check + atf_check -s exit:0 -o ignore ping -c3 192.0.2.2 + + jexec alcatraz /usr/sbin/inetd -p ${PWD}/inetd-echo.pid $(atf_get_srcdir)/echo_inetd.conf + jexec alcatraz $(atf_get_srcdir)/../common/divapp 1001 divert-back & + + jexec alcatraz pfctl -e + pft_set_rules alcatraz \ + "pass in on ${epair}b proto tcp from any to port 7 divert-to 0.0.0.0 port 1001" + + reply=$(echo "foo" | nc -N 192.0.2.2 7) + if ["${reply}" != "foo" ]; + then + atf_fail "Did not receive echo reply" + fi +} + +pr260867_cleanup() +{ + pft_cleanup +} + atf_init_test_cases() { atf_add_test_case "in_div" @@ -383,4 +424,6 @@ atf_init_test_cases() atf_add_test_case "in_div_in_fwd_out_div_out" atf_add_test_case "in_dn_in_div_in_out_div_out_dn_out" + + atf_add_test_case "pr260867" } From nobody Sun Nov 30 10:30:53 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dK3GP4hSSz6J7Z0 for ; Sun, 30 Nov 2025 10:30:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dK3GP3JV0z3fZZ for ; Sun, 30 Nov 2025 10:30:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764498653; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9D4COp3mrSjPT8fsKno0oQa/kc92C0Y0K/qdr57WzUw=; b=Ml+0lur2yJWfe1BFm1HkpelLEYsCw/Ay9+dP4M9Gekdhv7US48dU4UJLcqWK2lv8fzg1DG 9+6u6m69CLhKFAyusjUXmG+aE7Ye2FcQyzGKGEMZhH+86lGU7o6LCNY0WOWaUuRiphsv6+ PUt7ytcUurumzhhj58Mi179PKmG9YJVncAYwUSBgQZlKPjplfsw3lGEdUNpxXt86WrAJQq sODeifBd9lctPMEOtoQSrnC3UeHROAsntFBjB6GKi7JJMVV2O/T8hrTr9iVIJbZqaBb++H 4n9uZewmJbSz+hqY2sOAYKzFEw61hVdxWrgJF9DO40qDjSQ/6FKMZ6unRWhpqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764498653; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9D4COp3mrSjPT8fsKno0oQa/kc92C0Y0K/qdr57WzUw=; b=P1hbcnIKZ1mqF07JRHExDnXcDGgVtLmwBZyl92Ey/skFJZL3HeUCRUAbu5pc33i4Sljb63 t6r33yh41BqjD6JUKK3LnXahK28a5WG1mEqX+hUATFRfYMm/dJgwcCPVp6y2YTRqiWX/0k JfJrMxhBS3Ll28Awz6ha2YJiVxrUtgFAfUA6h3PRLLrInWqbG2abFvoh5+cRIRCuwSJmng 2iuw5QOl9o4MX+iZ6ccz46mG+VftHNB8jn4UWpVmsOJOKDiwGVrzKw8smAMjmJrdQ+/huE zP76/8N6l6pSXhY5Z1KDL5zqQeI5jWR/fQgkHFdSwqAk85m57YXl8f19tj1/XQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764498653; a=rsa-sha256; cv=none; b=GYq6e1lHBjUmhyk6gQQ7FspNT6JIxYYyIMqCvn0hm548l3cy/kp6LzY01ge8Fqq1Dm9T+X esyHsWEXKsYAIG6vzTbLWbMb4EMGY+ZRTl3RUXLJ0P5T9JIsvwuyRGGGpnsvtVjjCGfEMw HFRy+L3Hjti2cnK9WICkByoGRu0ajnZM5uF6TT/0nXpJk7LgMBjIrhAmL3soG+1wUZ/dw8 wPyQ7f2da5Nl0P99dTCdx9KoKp7ogvdlCrOadN4UK3qLtfytbPmHwrUCyLDbA7H8mfNjUf rOYXwsN9I2K5doCJ+4jYGYerPvpy0Gr7V+giV3LHhcOcI4BUOl4b7pgmZ1ubmA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dK3GP2WmrzXPL for ; Sun, 30 Nov 2025 10:30:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 36c69 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 30 Nov 2025 10:30:53 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: a009793a5e5f - stable/14 - pf: handle divert packets List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: a009793a5e5fad0b42cb0a158dcbccd5eff40d9f Auto-Submitted: auto-generated Date: Sun, 30 Nov 2025 10:30:53 +0000 Message-Id: <692c1cdd.36c69.3cf5cd41@gitrepo.freebsd.org> The branch stable/14 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=a009793a5e5fad0b42cb0a158dcbccd5eff40d9f commit a009793a5e5fad0b42cb0a158dcbccd5eff40d9f Author: Kristof Provost AuthorDate: 2025-11-15 13:44:54 +0000 Commit: Kristof Provost CommitDate: 2025-11-30 10:26:28 +0000 pf: handle divert packets In a divert setup pf_test_state() may return PF_PASS, but not set the state pointer. We didn't handle that, and as a result crashed immediately afterwards trying to dereference that NULL state pointer. Add a test case to provoke the problem. PR: 260867 MFC after: 2 weeks Submitted by: Phil Budne Sponsored by: Rubicon Communications, LLC ("Netgate") (cherry picked from commit 66f2f1c83247f05a3a599d7e88c7e7efbedd16b5) --- sys/netpfil/pf/pf.c | 20 +++++++++++------- tests/sys/netpfil/pf/divert-to.sh | 44 +++++++++++++++++++++++++++++++++++++-- 2 files changed, 54 insertions(+), 10 deletions(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index f067c2b6bdf4..44d72d228104 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -8558,10 +8558,12 @@ pf_test(int dir, int pflags, struct ifnet *ifp, struct mbuf **m0, goto done; action = pf_test_state_tcp(&s, kif, m, off, h, &pd, &reason); if (action == PF_PASS) { - if (V_pfsync_update_state_ptr != NULL) - V_pfsync_update_state_ptr(s); - r = s->rule.ptr; - a = s->anchor.ptr; + if (s != NULL) { + if (V_pfsync_update_state_ptr != NULL) + V_pfsync_update_state_ptr(s); + r = s->rule.ptr; + a = s->anchor.ptr; + } } else if (s == NULL) { /* Validate remote SYN|ACK, re-create original SYN if * valid. */ @@ -8621,10 +8623,12 @@ pf_test(int dir, int pflags, struct ifnet *ifp, struct mbuf **m0, } action = pf_test_state_udp(&s, kif, m, off, h, &pd); if (action == PF_PASS) { - if (V_pfsync_update_state_ptr != NULL) - V_pfsync_update_state_ptr(s); - r = s->rule.ptr; - a = s->anchor.ptr; + if (s != NULL) { + if (V_pfsync_update_state_ptr != NULL) + V_pfsync_update_state_ptr(s); + r = s->rule.ptr; + a = s->anchor.ptr; + } } else if (s == NULL) action = pf_test_rule(&r, &s, kif, m, off, &pd, &a, &ruleset, inp); diff --git a/tests/sys/netpfil/pf/divert-to.sh b/tests/sys/netpfil/pf/divert-to.sh index 965464b35810..8c76ffd35bfe 100644 --- a/tests/sys/netpfil/pf/divert-to.sh +++ b/tests/sys/netpfil/pf/divert-to.sh @@ -509,6 +509,47 @@ ipfwon_in_dn_in_div_in_out_dn_out_div_out_cleanup() pft_cleanup } +atf_test_case "pr260867" "cleanup" +pr260867_head() +{ + atf_set descr 'Test for the loop reported in PR260867' + atf_set require.user root +} + +pr260867_body() +{ + pft_init + divert_init + + epair=$(vnet_mkepair) + + ifconfig ${epair}a 192.0.2.1/24 up + + vnet_mkjail alcatraz ${epair}b + jexec alcatraz ifconfig ${epair}b 192.0.2.2/24 up + + # Sanity check + atf_check -s exit:0 -o ignore ping -c3 192.0.2.2 + + jexec alcatraz /usr/sbin/inetd -p ${PWD}/inetd-echo.pid $(atf_get_srcdir)/echo_inetd.conf + jexec alcatraz $(atf_get_srcdir)/../common/divapp 1001 divert-back & + + jexec alcatraz pfctl -e + pft_set_rules alcatraz \ + "pass in on ${epair}b proto tcp from any to port 7 divert-to 0.0.0.0 port 1001" + + reply=$(echo "foo" | nc -N 192.0.2.2 7) + if ["${reply}" != "foo" ]; + then + atf_fail "Did not receive echo reply" + fi +} + +pr260867_cleanup() +{ + pft_cleanup +} + atf_init_test_cases() { atf_add_test_case "ipfwoff_in_div" @@ -524,6 +565,5 @@ atf_init_test_cases() atf_add_test_case "ipfwoff_in_div_in_fwd_out_div_out" atf_add_test_case "ipfwon_in_div_in_fwd_out_div_out" - atf_add_test_case "ipfwoff_in_dn_in_div_in_out_dn_out_div_out" - atf_add_test_case "ipfwon_in_dn_in_div_in_out_dn_out_div_out" + atf_add_test_case "pr260867" } From nobody Sun Nov 30 10:30:58 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dK3GW6TStz6J7PH for ; Sun, 30 Nov 2025 10:30:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dK3GV6Hx3z3fQN for ; Sun, 30 Nov 2025 10:30:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764498658; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oNLo3FATt3yJQRUMVHjPIdRZ2UnvFEErTPJCGi7Fd3g=; b=ngfCFqQrCY9VFtBoR7RctgrMDQUe4FXlCYHbokYnarAwcyrjAzfGDq92SiGCpCDcfxV/ZY UlwFXJYmpd2PvYsyp4rayo8kT6JvRLrEpPR/tNfcLc5NipngSUKTioAti/1zjSXSIBRRYn DovD0+6EXQY/BodHXq2a1iv2/N53samgPZGJDTEkfylaFX/G82WFw561H7VLlgnL8RdsnU F7HERgceqrHi/6GIodJIKqPHOVeFzyKva1f7bHNwjae0Ebm4NRYgxgD7XuMGE0Zz6GnEu9 vXgZEOVTaWTpFBB/jXkWG8fozMJdlXc13BLSv3n74TKNTC5lHfoRHvYDUIDVWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764498658; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oNLo3FATt3yJQRUMVHjPIdRZ2UnvFEErTPJCGi7Fd3g=; b=HokooNXcQuUTWp9Z8O4eI3QFEomQy0Yk9tbiopMDuYiE+0ZAXXiCW6J9Fgdr00WF45YVQB 7sdPkbKSzDPyj221DAtxd5K+5ivDSNJjUxsK2CTbCnzwI+0eSPiWyjg7IQ4/ex84H3XyzC e4I4UJeSVKTxNLuR0Nqc/URsFZheNGyGGma12vM5IQnf6vAoxc94X+0lA0akrh5dEtl2qU Gj1L/6Syp0K3GHilSANcr1BytAgtZ3b8O1PB0BQLADI03cBWWwELoQV5DyAVUp5SsEm+bi qffeecB7IA+ZZQDo+fOrXozYf1ycTVD2IsEUclG/KYhFod1b9h34PgH+BtSiLA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764498658; a=rsa-sha256; cv=none; b=MGxeI0C8kGoUVxXCVPcQs7Sqvpor3taV4nDrERhHgHTjDapS2qcRUbEs3YNRequRlBSnZX 7nQ9N7mVDZGozlJppkJpt73SR0UwEVPe/2gnV7NaZHM/IArfP470w/y3pCXOyra4vNCHTN th5rQ/uz/5Ntdcq3oEwnAKL87tVBfQGjy20vGHdZBrP4gZ01xoZmmXsmYDlA2l+MUuzuUF j1nqs26uyPbuCzNCEiUGUE7dTtxgQ4bFus38hhygbxWb6FLYZqHKWm65dZMV9XYZ1gxeYc 71HhqSa9DyvJFciO4Rc2JCUuqqqLkZsxl0Vv/OniDSF+P1btsi7WEgrebPEuDw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dK3GV3vCpzXJZ for ; Sun, 30 Nov 2025 10:30:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 356fc by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 30 Nov 2025 10:30:58 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 81385f622037 - stable/13 - pf: handle divert packets List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 81385f622037a5b78fd4f8046163367fa607d37a Auto-Submitted: auto-generated Date: Sun, 30 Nov 2025 10:30:58 +0000 Message-Id: <692c1ce2.356fc.63801cce@gitrepo.freebsd.org> The branch stable/13 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=81385f622037a5b78fd4f8046163367fa607d37a commit 81385f622037a5b78fd4f8046163367fa607d37a Author: Kristof Provost AuthorDate: 2025-11-15 13:44:54 +0000 Commit: Kristof Provost CommitDate: 2025-11-29 20:02:00 +0000 pf: handle divert packets In a divert setup pf_test_state() may return PF_PASS, but not set the state pointer. We didn't handle that, and as a result crashed immediately afterwards trying to dereference that NULL state pointer. Add a test case to provoke the problem. PR: 260867 MFC after: 2 weeks Submitted by: Phil Budne Sponsored by: Rubicon Communications, LLC ("Netgate") (cherry picked from commit 66f2f1c83247f05a3a599d7e88c7e7efbedd16b5) --- sys/netpfil/pf/pf.c | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 298793e6228e..16ce78560e2d 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -7552,11 +7552,13 @@ pf_test(int dir, int pflags, struct ifnet *ifp, struct mbuf **m0, struct inpcb * action = pf_test_state_tcp(&s, dir, kif, m, off, h, &pd, &reason); if (action == PF_PASS) { - if (V_pfsync_update_state_ptr != NULL) - V_pfsync_update_state_ptr(s); - r = s->rule.ptr; - a = s->anchor.ptr; - log = s->log; + if (s != NULL) { + if (V_pfsync_update_state_ptr != NULL) + V_pfsync_update_state_ptr(s); + r = s->rule.ptr; + a = s->anchor.ptr; + log = s->log; + } } else if (s == NULL) { /* Validate remote SYN|ACK, re-create original SYN if * valid. */ @@ -7612,11 +7614,13 @@ pf_test(int dir, int pflags, struct ifnet *ifp, struct mbuf **m0, struct inpcb * } action = pf_test_state_udp(&s, dir, kif, m, off, h, &pd); if (action == PF_PASS) { - if (V_pfsync_update_state_ptr != NULL) - V_pfsync_update_state_ptr(s); - r = s->rule.ptr; - a = s->anchor.ptr; - log = s->log; + if (s != NULL) { + if (V_pfsync_update_state_ptr != NULL) + V_pfsync_update_state_ptr(s); + r = s->rule.ptr; + a = s->anchor.ptr; + log = s->log; + } } else if (s == NULL) action = pf_test_rule(&r, &s, dir, kif, m, off, &pd, &a, &ruleset, inp); From nobody Sun Nov 30 10:31:30 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dK3H72Dstz6J7ZJ for ; Sun, 30 Nov 2025 10:31:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dK3H65h6sz3gPT for ; Sun, 30 Nov 2025 10:31:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764498690; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dSY6Pxy9/BHnME7IYj43fmiJv5aswT8e/YC4YnZaXIo=; b=W20+YZ/CniZKZOFNNEa9ifYPpwqGjWC6BCcO/HAhuDDYsp8NCzpzUnUXhLtyyBqsMjQPyz PervdIls5K4K6HoPN+oRobYfe8MtDLqRDDzpnDJNDr/cdl4smcmHYPXD0VHGLs+bjTwFEO bRjkAGKH1gMGOrKiccGk7B08MsTtMgLMCWwxQoG6vSz/RILtjRl3wm5+ObVgVFXdfayn+8 oKjnskahdYkV2IWq3rMex8PIJJ0G9TvMMiF9xGJVv0No3qUq/RfP27GYNm0SEKCxUJRmyd NbA3Sp2tuSXTjabt9+8/gt00vor6pdErre2fgAkbsZYSoxCzIrUgOXeGT6cWEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764498690; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dSY6Pxy9/BHnME7IYj43fmiJv5aswT8e/YC4YnZaXIo=; b=yykltMZxJvQlfOCPUwJoqDpCLYbEHWsq1S4Sf5T0HFbWLpVf57brPXE8v9BHT48BIWyoLd mljdsqtKbF02QsTJPb0nZK2sJqwZbRypw1SfQhX74sumBUIZMf0+TO17xvNiXLwsfn5tHu ZHEu5GIlz2MyVnfOlYADv83UOOMXMFfMdI2RPZrHfaclOpYifdvJTYyeGUW7VSFI3AIlyM HOdAFJ1yfMRq5FypvcwQfx7Wy25dn8SArPTE/xBxgH5wQgTH/ejpjhUJ7+CvPi8UiG/d1l r2/s1a7D0vQMqIEzM6rOqlRb7e1qMBgkDI1cBcm2RknF4dJ1daAhvmVghOZdgA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764498690; a=rsa-sha256; cv=none; b=j9kvk+sk39x1TzISiURgML66hhWQtuhSytZYJFXEd7lQZcu8Wqtazv/jOvL2EA+VqKqCci hZkKmxgeSemtg4XGHHWeUKWKO5FGBudDJQ5RlaxyHU4/aKyZqKH3jAuRuB07fbMqNl2w7h 6c+Sbg81qiIw3hDuFY/MUm47U6Y24+Ki+p3+TLU3tyuO4xGi9MYt10N8ojD+ybNgRD+3Vw NGHGumTCECIPrt5VQxSluzclokNZKJvnohY9zALVAZJiXf5J4PMlOx9Nk4Uv9tb/OOEz0Z LGu+QlSYLV1Y9m1R8hoqL6lQSilkhRo1qgjay1DV5TuwqS3O+QKNG3OcJLRIug== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dK3H64zSGzXQ6 for ; Sun, 30 Nov 2025 10:31:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 367c7 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 30 Nov 2025 10:31:30 +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: 029a09f18032 - main - sys/_types.h: Actually unbreak gcc build List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 029a09f18032353a9ae874590b879322efc6e53a Auto-Submitted: auto-generated Date: Sun, 30 Nov 2025 10:31:30 +0000 Message-Id: <692c1d02.367c7.22c28c58@gitrepo.freebsd.org> The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=029a09f18032353a9ae874590b879322efc6e53a commit 029a09f18032353a9ae874590b879322efc6e53a Author: Dag-Erling Smørgrav AuthorDate: 2025-11-30 10:30:45 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-11-30 10:31:09 +0000 sys/_types.h: Actually unbreak gcc build Fixes: 19728f31ae42 ("sys/_types.h: Unbreak gcc build") Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D53986 --- sys/sys/_types.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sys/sys/_types.h b/sys/sys/_types.h index f3c80957af34..4e217704ceb6 100644 --- a/sys/sys/_types.h +++ b/sys/sys/_types.h @@ -161,7 +161,10 @@ typedef int __cpulevel_t; /* level parameter for cpuset. */ typedef int __cpusetid_t; /* cpuset identifier. */ typedef __int64_t __daddr_t; /* bwrite(3), FIOBMAP2, etc */ -#if !defined(__has_feature) || !__has_feature(capabilities) +#ifndef __has_feature +#define __has_feature(x) 0 +#endif +#if !__has_feature(capabilities) /* * On non-CHERI systems, define __(u)intcap_t to __(u)intptr_t so that * hybrid-C code which needs to be explicitly aware of capabilities can From nobody Sun Nov 30 15:52:10 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dKBP70nLgz6HmZQ for ; Sun, 30 Nov 2025 15:52:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dKBP703Njz4Q1w for ; Sun, 30 Nov 2025 15:52:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764517931; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vBuX3g2HyFlygbS35tMtH3gL8gte2bTxfR2EYGVgAFI=; b=n8L7c/I3HD26z8oC8vY30VrJIBbGjeuOfy4WI+H+XIQl8sjLbU+vqf/v3PewG0/90sKaGg BLwKU74ik2GCPmTZp7ucSUSyhWdYftE8GzA6OT9nJQuXJogOtC/dTnR1z5mc9VQXN9bEVj 0QD+h3ma63M4i2chCCG9DjAFTBUiJwnfQUEQfwKG2oe2v7W3iR/ifNVHez64ibe/HmtBuF fSx1b/Sb2zKR/j8LZqiOb7akIGVRxR27i6tA2wcOthirewzcvbbMOtAl2vd3z0a1b7Eie2 iGma50vdhbaZzHIneDhhlDxSmWDQGvlSuRK32PvT6r9MNePzfRXrhyU2r6VmLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764517931; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vBuX3g2HyFlygbS35tMtH3gL8gte2bTxfR2EYGVgAFI=; b=F5zpyT6Kt0U+o4WqAuGdQT4dmJR0tBIbWaVl7CHX2VikJUAK+f4D/foWUllVqIiJZNEuj0 nfQGgTI6c2uvC2roc08elz+77gxa3Tl+xe6Qi48x41sYOSR+daMgfa4jvAqVqvHlrvM77V vo/bn7Wl+4+g+KNLfdFucLgSrAIj0TkfuEMdjgU9ZnPutAgS4BuE5ZIBaNseUeGjLXu2f4 hQB1mbgdMo1fqnKfcD57z8oVUPuJMrZ4GPh1jZNPaAK4AMPozp4NkC6noMOWkP51KcE/us l0ozxm5JrsMOyfqDWHzJRuEl8zuYaWPaMOkjVoS7MQv8bFcYwUSN9J9fnqLIuA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764517931; a=rsa-sha256; cv=none; b=UZxfApdPDLYLfAQH2WnYpGi0E+zBFh0Fa3wEpoVTM814hte/i2qvRlJECt6dlP+y4kZmdA SKPRbukcGdVwNzbJMB80eKJ78FyQBeudwUoPZL6UTedWRVTT98Qyei9NuavDn0zIYQvRVu fN5oX/fuTf/KRx0fXtqOSWlXEkUPuQeB4m3P1q082v8r3GHaXnDSy5/Tuj2IdqoZwW1Ee9 nU3bpzX9vcIJKXneaouJGLFg1ZZooliFdhAskoZJ2yYJpG+gl3bf+tohZrFTvgEXJLqyGI NTxe9raz64DDwNDrbQhsF6so2QnJdrHqH/Ie/Lb2s6LThORoA143XuV6z1rSTA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dKBP66k7TzhTf for ; Sun, 30 Nov 2025 15:52:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3880a by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 30 Nov 2025 15:52:10 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 493d26c58e73 - main - sys: Import snapshot of Aquantia ACQ107 vendor driver List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 493d26c58e732dcfcdd87993ef71880adfe9d0cb Auto-Submitted: auto-generated Date: Sun, 30 Nov 2025 15:52:10 +0000 Message-Id: <692c682a.3880a.22078a5d@gitrepo.freebsd.org> The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=493d26c58e732dcfcdd87993ef71880adfe9d0cb commit 493d26c58e732dcfcdd87993ef71880adfe9d0cb Author: Ed Maste AuthorDate: 2025-11-13 18:48:54 +0000 Commit: Ed Maste CommitDate: 2025-11-30 15:38:33 +0000 sys: Import snapshot of Aquantia ACQ107 vendor driver Obtained from https://github.com/Aquantia/aqtion-freebsd commit c61d27b1d94af72c642deefa0595884481ea7377. This is not using a vendor branch. The formerly-upstream repo is abandoned and I do not believe it will receive updates. This initial import serves as a snapshot of the vendor code, but from here we will iterate on it in the tree as our own code. Bug fixes, code cleanup, and build infrastructure will follow. NetBSD and OpenBSD have derivatives of this driver (with additional hardware support). We can look to changes in those drivers, and the Linux driver, to add support here. Reviewed by: adrian Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D53813 --- sys/dev/aq/aq_common.h | 87 + sys/dev/aq/aq_dbg.c | 237 +++ sys/dev/aq/aq_dbg.h | 138 ++ sys/dev/aq/aq_device.h | 150 ++ sys/dev/aq/aq_fw.c | 352 +++++ sys/dev/aq/aq_fw.h | 76 + sys/dev/aq/aq_fw1x.c | 313 ++++ sys/dev/aq/aq_fw2x.c | 498 ++++++ sys/dev/aq/aq_hw.c | 907 +++++++++++ sys/dev/aq/aq_hw.h | 356 +++++ sys/dev/aq/aq_hw_llh.c | 1986 +++++++++++++++++++++++ sys/dev/aq/aq_hw_llh.h | 1176 ++++++++++++++ sys/dev/aq/aq_hw_llh_internal.h | 3335 +++++++++++++++++++++++++++++++++++++++ sys/dev/aq/aq_irq.c | 185 +++ sys/dev/aq/aq_main.c | 1329 ++++++++++++++++ sys/dev/aq/aq_media.c | 219 +++ sys/dev/aq/aq_ring.c | 581 +++++++ sys/dev/aq/aq_ring.h | 184 +++ 18 files changed, 12109 insertions(+) diff --git a/sys/dev/aq/aq_common.h b/sys/dev/aq/aq_common.h new file mode 100644 index 000000000000..b123a7e6807d --- /dev/null +++ b/sys/dev/aq/aq_common.h @@ -0,0 +1,87 @@ +/* + * aQuantia Corporation Network Driver + * Copyright (C) 2014-2017 aQuantia Corporation. All rights reserved + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * (1) Redistributions of source code must retain the above + * copyright notice, this list of conditions and the following + * disclaimer. + * + * (2) Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * + * (3)The name of the author may not be used to endorse or promote + * products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS + * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE + * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef _AQ_COMMON_H_ +#define _AQ_COMMON_H_ + +#include + +#define ETH_MAC_LEN 6 + +/* Types definition */ +#define TRUE 1 +#define FALSE 0 + +#define s8 __int8_t +#define u8 __uint8_t +#define u16 __uint16_t +#define s16 __int16_t +#define u32 __uint32_t +#define u64 __uint64_t +#define s64 __int64_t +#define s32 int +typedef __uint32_t DWORD; + +#define ETIME ETIMEDOUT +#define EOK 0 + +#define BIT(nr) (1UL << (nr)) + +#define usec_delay(x) DELAY(x) + +#ifndef msec_delay +#define msec_delay(x) DELAY(x*1000) +#define msec_delay_irq(x) DELAY(x*1000) +#endif + +#define AQ_HW_WAIT_FOR(_B_, _US_, _N_) \ + do { \ + unsigned int i; \ + for (i = _N_; (!(_B_)) && i; --i) { \ + usec_delay(_US_); \ + } \ + if (!i) { \ + err = -1; \ + } \ + } while (0) + + +#define LODWORD(a) ((DWORD)(a)) +#define LOWORD(a) ((u16)(a)) +#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) + +#define AQ_VER "0.0.5" + +#endif //_AQ_COMMON_H_ + diff --git a/sys/dev/aq/aq_dbg.c b/sys/dev/aq/aq_dbg.c new file mode 100644 index 000000000000..5340fc46a223 --- /dev/null +++ b/sys/dev/aq/aq_dbg.c @@ -0,0 +1,237 @@ +/** + * aQuantia Corporation Network Driver + * Copyright (C) 2014-2017 aQuantia Corporation. All rights reserved + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * (1) Redistributions of source code must retain the above + * copyright notice, this list of conditions and the following + * disclaimer. + * + * (2) Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * + * (3) The name of the author may not be used to endorse or promote + * products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS + * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE + * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * @file aq_dbg.c + * Debugging stuff. + * @date 2017.12.13 @author roman.agafonov@aquantia.com + */ + + +#include +__FBSDID("$FreeBSD$"); + +#include +#include "aq_common.h" +#include "aq_dbg.h" + + +const aq_debug_level dbg_level_ = lvl_detail; +const u32 dbg_categories_ = dbg_init | dbg_config | dbg_fw; + + + +#define DESCR_FIELD(DESCR, BIT_BEGIN, BIT_END) \ + ((DESCR >> BIT_END) &\ + (BIT(BIT_BEGIN - BIT_END + 1) -1)) + +#define __field(TYPE, VAR) TYPE VAR; +void trace_aq_tx_descr(int ring_idx, unsigned int pointer, volatile u64 descr[2]) +{ +#if AQ_CFG_DEBUG_LVL > 2 + struct __entry{ + __field(unsigned int, ring_idx) + __field(unsigned int, pointer) + /* Tx Descriptor */ + __field(u64, data_buf_addr) + __field(u32, pay_len) + __field(u8, ct_en) + __field(u8, ct_idx) + __field(u16, rsvd2) + __field(u8, tx_cmd) + __field(u8, eop) + __field(u8, dd) + __field(u16, buf_len) + __field(u8, rsvd1) + __field(u8, des_typ) + } entry; + + entry.ring_idx = ring_idx; + entry.pointer = pointer; + entry.data_buf_addr = descr[0]; + entry.pay_len = DESCR_FIELD(descr[1], 63, 46); + entry.ct_en = DESCR_FIELD(descr[1], 45, 45); + entry.ct_idx = DESCR_FIELD(descr[1], 44, 44); + entry.rsvd2 = DESCR_FIELD(descr[1], 43, 30); + entry.tx_cmd = DESCR_FIELD(descr[1], 29, 22); + entry.eop = DESCR_FIELD(descr[1], 21, 21); + entry.dd = DESCR_FIELD(descr[1], 20, 20); + entry.buf_len = DESCR_FIELD(descr[1], 19, 4); + entry.rsvd1 = DESCR_FIELD(descr[1], 3, 3); + entry.des_typ = DESCR_FIELD(descr[1], 2, 0); + + + aq_log_detail("trace_aq_tx_descr ring=%d descr=%u pay_len=%u ct_en=%u ct_idx=%u rsvd2=0x%x tx_cmd=0x%x eop=%u dd=%u buf_len=%u rsvd1=%u des_typ=0x%x", + entry.ring_idx, entry.pointer, entry.pay_len, + entry.ct_en, entry.ct_idx, entry.rsvd2, + entry.tx_cmd, entry.eop, entry.dd, entry.buf_len, + entry.rsvd1, entry.des_typ); +#endif +} + +void trace_aq_rx_descr(int ring_idx, unsigned int pointer, volatile u64 descr[2]) +{ +#if AQ_CFG_DEBUG_LVL > 2 + u8 dd; + u8 eop; + u8 rx_stat; + u8 rx_estat; + u8 rsc_cnt; + u16 pkt_len; + u16 next_desp; + u16 vlan_tag; + + u8 rss_type; + u8 pkt_type; + u8 rdm_err; + u8 avb_ts; + u8 rsvd; + u8 rx_cntl; + u8 sph; + u16 hdr_len; + u32 rss_hash; + + rss_hash = DESCR_FIELD(descr[0], 63, 32); + hdr_len = DESCR_FIELD(descr[0], 31, 22); + sph = DESCR_FIELD(descr[0], 21, 21); + rx_cntl = DESCR_FIELD(descr[0], 20, 19); + rsvd = DESCR_FIELD(descr[0], 18, 14); + avb_ts = DESCR_FIELD(descr[0], 13, 13); + rdm_err = DESCR_FIELD(descr[0], 12, 12); + pkt_type = DESCR_FIELD(descr[0], 11, 4); + rss_type = DESCR_FIELD(descr[0], 3, 0); + + vlan_tag = DESCR_FIELD(descr[1], 63, 48); + next_desp = DESCR_FIELD(descr[1], 47, 32); + pkt_len = DESCR_FIELD(descr[1], 31, 16); + rsc_cnt = DESCR_FIELD(descr[1], 15, 12); + rx_estat = DESCR_FIELD(descr[1], 11, 6); + rx_stat = DESCR_FIELD(descr[1], 5, 2); + eop = DESCR_FIELD(descr[1], 1, 1); + dd = DESCR_FIELD(descr[1], 0, 0); + + printf("trace_aq_rx_descr ring=%d descr=%u rss_hash=0x%x hdr_len=%u sph=%u rx_cntl=%u rsvd=0x%x avb_ts=%u rdm_err=%u pkt_type=%u rss_type=%u vlan_tag=%u next_desp=%u pkt_len=%u rsc_cnt=%u rx_estat=0x%x rx_stat=0x%x eop=%u dd=%u\n", + ring_idx, pointer, rss_hash, + hdr_len, sph, rx_cntl, + rsvd, avb_ts, rdm_err, + pkt_type, rss_type, vlan_tag, + next_desp, pkt_len, rsc_cnt, + rx_estat, rx_stat, eop, dd); +#endif +} + +void trace_aq_tx_context_descr(int ring_idx, unsigned int pointer, volatile u64 descr[2]) +{ +#if AQ_CFG_DEBUG_LVL > 2 + struct __entry_s{ + __field(unsigned int, ring_idx) + __field(unsigned int, pointer) + /* Tx Context Descriptor */ + __field(u16, out_len) + __field(u8, tun_len) + __field(u64, resvd3) + __field(u16, mss_len) + __field(u8, l4_len) + __field(u8, l3_len) + __field(u8, l2_len) + __field(u8, ct_cmd) + __field(u16, vlan_tag) + __field(u8, ct_idx) + __field(u8, des_typ) + } entry; + struct __entry_s *__entry = &entry; + __entry->ring_idx = ring_idx; + __entry->pointer = pointer; + __entry->out_len = DESCR_FIELD(descr[0], 63, 48); + __entry->tun_len = DESCR_FIELD(descr[0], 47, 40); + __entry->resvd3 = DESCR_FIELD(descr[0], 39, 0); + __entry->mss_len = DESCR_FIELD(descr[1], 63, 48); + __entry->l4_len = DESCR_FIELD(descr[1], 47, 40); + __entry->l3_len = DESCR_FIELD(descr[1], 39, 31); + __entry->l2_len = DESCR_FIELD(descr[1], 30, 24); + __entry->ct_cmd = DESCR_FIELD(descr[1], 23, 20); + __entry->vlan_tag = DESCR_FIELD(descr[1], 19, 4); + __entry->ct_idx = DESCR_FIELD(descr[1], 3, 3); + __entry->des_typ = DESCR_FIELD(descr[1], 2, 0); + + printf("trace_aq_tx_context_descr ring=%d descr=%u out_len=%u tun_len=%u resvd3=%lu mss_len=%u l4_len=%u l3_len=%u l2_len=%d ct_cmd=%u vlan_tag=%u ct_idx=%u des_typ=0x%x\n", + __entry->ring_idx, __entry->pointer, __entry->out_len, + __entry->tun_len, __entry->resvd3, __entry->mss_len, + __entry->l4_len, __entry->l3_len, __entry->l2_len, + __entry->ct_cmd, __entry->vlan_tag, __entry->ct_idx, + __entry->des_typ); +#endif +} + +void DumpHex(const void* data, size_t size) { +#if AQ_CFG_DEBUG_LVL > 3 + char ascii[17]; + size_t i, j; + char line[256]; + char buf[256]; + + ascii[16] = '\0'; + line[0] = '\0'; + printf("packet at %p\n", data); + + for (i = 0; i < size; ++i) { + sprintf(buf, "%02X ", ((const unsigned char*)data)[i]); + strcat(line, buf); + if (((const unsigned char*)data)[i] >= ' ' && ((const unsigned char*)data)[i] <= '~') { + ascii[i % 16] = ((const unsigned char*)data)[i]; + } else { + ascii[i % 16] = '.'; + } + if ((i+1) % 8 == 0 || i+1 == size) { + strcat(line, " "); + if ((i+1) % 16 == 0) { + sprintf(buf, "| %s \n", ascii); + strcat(line, buf); + printf("%s", line); + line[0] = '\0'; + } else if (i+1 == size) { + ascii[(i+1) % 16] = '\0'; + if ((i+1) % 16 <= 8) { + strcat(line, " "); + } + for (j = (i+1) % 16; j < 16; ++j) { + strcat(line, " "); + } + sprintf(buf, "| %s \n", ascii); + strcat(line, buf); + printf("%s", line); + line[0] = '\0'; + } + } + } +#endif +} \ No newline at end of file diff --git a/sys/dev/aq/aq_dbg.h b/sys/dev/aq/aq_dbg.h new file mode 100644 index 000000000000..bb786bf0adc6 --- /dev/null +++ b/sys/dev/aq/aq_dbg.h @@ -0,0 +1,138 @@ +/** + * aQuantia Corporation Network Driver + * Copyright (C) 2014-2017 aQuantia Corporation. All rights reserved + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * (1) Redistributions of source code must retain the above + * copyright notice, this list of conditions and the following + * disclaimer. + * + * (2) Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * + * (3) The name of the author may not be used to endorse or promote + * products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS + * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE + * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * @file aq_dbg.h + * Debug print macros & definitions. + * @date 2017.12.07 @author roman.agafonov@aquantia.com + */ +#ifndef AQ_DBG_H +#define AQ_DBG_H + +#include +#include +/* +Debug levels: +0 - no debug +1 - important warnings +2 - debug prints +3 - trace function calls +4 - dump descriptor +*/ + +#define AQ_CFG_DEBUG_LVL 0x0 + +#define AQ_DBG_ERROR(string, args...) printf( "atlantic: " string "\n", ##args) + +/* Debug stuff */ +#if AQ_CFG_DEBUG_LVL > 0 +#define AQ_DBG_WARNING(string, args...) printf( "atlantic: " string "\n", ##args) +#else +#define AQ_DBG_WARNING(string, ...) +#endif + +#if AQ_CFG_DEBUG_LVL > 1 +#define AQ_DBG_PRINT(string, args...) printf( "atlantic: " string "\n", ##args) +#else +#define AQ_DBG_PRINT(string, ...) +#endif + +#if AQ_CFG_DEBUG_LVL > 2 +#define AQ_DBG_ENTER() printf( "atlantic: %s() {\n", __func__) +#define AQ_DBG_ENTERA(s, args...) printf( "atlantic: %s(" s ") {\n", __func__, ##args) +#define AQ_DBG_EXIT(err) printf( "atlantic: } %s(), err=%d\n", __func__, err) +#else +#define AQ_DBG_ENTER() +#define AQ_DBG_ENTERA(s, args...) +#define AQ_DBG_EXIT(err) +#endif + +#if AQ_CFG_DEBUG_LVL > 2 +#define AQ_DBG_DUMP_DESC(desc) { \ + volatile u8 *raw = (volatile u8*)(desc); \ + printf( "07-00 %02X%02X%02X%02X %02X%02X%02X%02X 15-08 %02X%02X%02X%02X %02X%02X%02X%02X\n", \ + raw[7], raw[6], raw[5], raw[4], raw[3], raw[2], raw[1], raw[0], \ + raw[15], raw[14], raw[13], raw[12], raw[11], raw[10], raw[9], raw[8]); \ +}\ + +#else +#define AQ_DBG_DUMP_DESC(desc) +#endif + +typedef enum aq_debug_level +{ + lvl_error = LOG_ERR, + lvl_warn = LOG_WARNING, + lvl_trace = LOG_NOTICE, + lvl_detail = LOG_INFO, +} aq_debug_level; + +typedef enum aq_debug_category +{ + dbg_init = 1, + dbg_config = 1 << 1, + dbg_tx = 1 << 2, + dbg_rx = 1 << 3, + dbg_intr = 1 << 4, + dbg_fw = 1 << 5, +} aq_debug_category; + + +#define __FILENAME__ (__builtin_strrchr(__FILE__, '/') ? __builtin_strrchr(__FILE__, '/') + 1 : __FILE__) + +extern const aq_debug_level dbg_level_; +extern const u32 dbg_categories_; + +#define log_base_(_lvl, _fmt, args...) printf( "atlantic: " _fmt "\n", ##args) + +#if AQ_CFG_DEBUG_LVL > 0 +#define trace_base_(_lvl, _cat, _fmt, args...) do { if (dbg_level_ >= _lvl && (_cat & dbg_categories_)) { printf( "atlantic: " _fmt " @%s,%d\n", ##args, __FILENAME__, __LINE__); }} while (0) +#else +#define trace_base_(_lvl, _cat, _fmt, ...) do {} while (0) +#endif // AQ_CFG_DEBUG_LVL > 0 + +#define aq_log_error(_fmt, args...) log_base_(lvl_error, "[!] " _fmt, ##args) +#define aq_log_warn(_fmt, args...) log_base_(lvl_warn, "/!\\ " _fmt, ##args) +#define aq_log(_fmt, args...) log_base_(lvl_trace, _fmt, ##args) +#define aq_log_detail(_fmt, args...) log_base_(lvl_detail, _fmt, ##args) + +#define trace_error(_cat,_fmt, args...) trace_base_(lvl_error, _cat, "[!] " _fmt, ##args) +#define trace_warn(_cat, _fmt, args...) trace_base_(lvl_warn, _cat, "/!\\ " _fmt, ##args) +#define trace(_cat, _fmt, args...) trace_base_(lvl_trace, _cat, _fmt, ##args) +#define trace_detail(_cat, _fmt, args...) trace_base_(lvl_detail, _cat, _fmt, ##args) + +void trace_aq_tx_descr(int ring_idx, unsigned int pointer, volatile u64 descr[2]); +void trace_aq_rx_descr(int ring_idx, unsigned int pointer, volatile u64 descr[2]); +void trace_aq_tx_context_descr(int ring_idx, unsigned int pointer, volatile u64 descr[2]); +void DumpHex(const void* data, size_t size); + +#endif // AQ_DBG_H diff --git a/sys/dev/aq/aq_device.h b/sys/dev/aq/aq_device.h new file mode 100644 index 000000000000..2c0d8df77cb9 --- /dev/null +++ b/sys/dev/aq/aq_device.h @@ -0,0 +1,150 @@ +/* + * aQuantia Corporation Network Driver + * Copyright (C) 2014-2017 aQuantia Corporation. All rights reserved + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * (1) Redistributions of source code must retain the above + * copyright notice, this list of conditions and the following + * disclaimer. + * + * (2) Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * + * (3)The name of the author may not be used to endorse or promote + * products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS + * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE + * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef _AQ_DEVICE_H_ +#define _AQ_DEVICE_H_ + +#include "aq_hw.h" + +enum aq_media_type { + AQ_MEDIA_TYPE_UNKNOWN = 0, + AQ_MEDIA_TYPE_FIBRE, + AQ_MEDIA_TYPE_TP, +}; + +#define AQ_LINK_UNKNOWN 0x00000000 +#define AQ_LINK_100M 0x00000001 +#define AQ_LINK_1G 0x00000002 +#define AQ_LINK_2G5 0x00000004 +#define AQ_LINK_5G 0x00000008 +#define AQ_LINK_10G 0x00000010 + +#define AQ_LINK_ALL (AQ_LINK_100M | AQ_LINK_1G | AQ_LINK_2G5 | AQ_LINK_5G | \ + AQ_LINK_10G ) + +struct aq_stats_s { + u64 prc; + u64 uprc; + u64 mprc; + u64 bprc; + u64 cprc; + u64 erpr; + u64 dpc; + u64 brc; + u64 ubrc; + u64 mbrc; + u64 bbrc; + + u64 ptc; + u64 uptc; + u64 mptc; + u64 bptc; + u64 erpt; + u64 btc; + u64 ubtc; + u64 mbtc; + u64 bbtc; +}; + +enum aq_dev_state_e { + AQ_DEV_STATE_UNLOAD, + AQ_DEV_STATE_PCI_STOP, + AQ_DEV_STATE_DOWN, + AQ_DEV_STATE_UP, +}; + +struct aq_rx_filters { + unsigned int rule_cnt; + struct aq_rx_filter_vlan vlan_filters[AQ_HW_VLAN_MAX_FILTERS]; + struct aq_rx_filter_l2 etype_filters[AQ_HW_ETYPE_MAX_FILTERS]; +}; + +struct aq_vlan_tag { + SLIST_ENTRY(aq_vlan_tag) next; + uint16_t tag; +}; + +struct aq_dev { + device_t dev; + if_ctx_t ctx; + if_softc_ctx_t scctx; + if_shared_ctx_t sctx; + struct ifmedia * media; + + struct aq_hw hw; + + enum aq_media_type media_type; + uint32_t link_speeds; + uint32_t chip_features; + uint32_t mbox_addr; + uint8_t mac_addr[ETHER_ADDR_LEN]; + uint64_t admin_ticks; + struct if_irq irq; + int msix; + + int mmio_rid; + struct resource * mmio_res; + bus_space_tag_t mmio_tag; + bus_space_handle_t mmio_handle; + bus_size_t mmio_size; + + struct aq_ring *tx_rings[HW_ATL_B0_RINGS_MAX]; + struct aq_ring *rx_rings[HW_ATL_B0_RINGS_MAX]; + uint32_t tx_rings_count; + uint32_t rx_rings_count; + bool linkup; + int media_active; + + struct aq_hw_stats_s last_stats; + struct aq_stats_s curr_stats; + + bitstr_t *vlan_tags; + int mcnt; + + uint8_t rss_key[HW_ATL_RSS_HASHKEY_SIZE]; + uint8_t rss_table[HW_ATL_RSS_INDIRECTION_TABLE_MAX]; +}; + +typedef struct aq_dev aq_dev_t; + +int aq_update_hw_stats(aq_dev_t *aq_dev); +void aq_initmedia(aq_dev_t *aq_dev); +int aq_linkstat_isr(void *arg); +int aq_isr_rx(void *arg); +void aq_mediastatus_update(aq_dev_t *aq_dev, u32 link_speed, const struct aq_hw_fc_info *fc_neg); +void aq_mediastatus(struct ifnet *ifp, struct ifmediareq *ifmr); +int aq_mediachange(struct ifnet *ifp); +void aq_if_update_admin_status(if_ctx_t ctx); + +#endif diff --git a/sys/dev/aq/aq_fw.c b/sys/dev/aq/aq_fw.c new file mode 100644 index 000000000000..619a3048cc28 --- /dev/null +++ b/sys/dev/aq/aq_fw.c @@ -0,0 +1,352 @@ +/* + * aQuantia Corporation Network Driver + * Copyright (C) 2014-2017 aQuantia Corporation. All rights reserved + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * (1) Redistributions of source code must retain the above + * copyright notice, this list of conditions and the following + * disclaimer. + * + * (2) Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * + * (3) The name of the author may not be used to endorse or promote + * products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS + * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE + * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * @file aq_fw.c + * Firmware-related functions implementation. + * @date 2017.12.07 @author roman.agafonov@aquantia.com + */ + +#include +__FBSDID("$FreeBSD$"); + +#include + +#include "aq_common.h" + +#include "aq_hw.h" +#include "aq_hw_llh.h" +#include "aq_hw_llh_internal.h" + +#include "aq_fw.h" +#include "aq_common.h" + +#include "aq_dbg.h" + + +typedef enum aq_fw_bootloader_mode +{ + boot_mode_unknown = 0, + boot_mode_flb, + boot_mode_rbl_flash, + boot_mode_rbl_host_bootload, +} aq_fw_bootloader_mode; + +#define AQ_CFG_HOST_BOOT_DISABLE 0 +// Timeouts +#define RBL_TIMEOUT_MS 10000 +#define MAC_FW_START_TIMEOUT_MS 10000 +#define FW_LOADER_START_TIMEOUT_MS 10000 + +const u32 NO_RESET_SCRATCHPAD_ADDRESS = 0; +const u32 NO_RESET_SCRATCHPAD_LEN_RES = 1; +const u32 NO_RESET_SCRATCHPAD_RBL_STATUS = 2; +const u32 NO_RESET_SCRATCHPAD_RBL_STATUS_2 = 3; +const u32 WRITE_DATA_COMPLETE = 0x55555555; +const u32 WRITE_DATA_CHUNK_DONE = 0xaaaaaaaa; +const u32 WRITE_DATA_FAIL_WRONG_ADDRESS = 0x66666666; + +const u32 WAIT_WRITE_TIMEOUT = 1; +const u32 WAIT_WRITE_TIMEOUT_COUNT = 1000; + +const u32 RBL_STATUS_SUCCESS = 0xabba; +const u32 RBL_STATUS_FAILURE = 0xbad; +const u32 RBL_STATUS_HOST_BOOT = 0xf1a7; + +const u32 SCRATCHPAD_FW_LOADER_STATUS = (0x40 / sizeof(u32)); + + +extern struct aq_firmware_ops aq_fw1x_ops; +extern struct aq_firmware_ops aq_fw2x_ops; + + +int mac_soft_reset_(struct aq_hw* hw, aq_fw_bootloader_mode* mode); +int mac_soft_reset_flb_(struct aq_hw* hw); +int mac_soft_reset_rbl_(struct aq_hw* hw, aq_fw_bootloader_mode* mode); +int wait_init_mac_firmware_(struct aq_hw* hw); + + +int aq_fw_reset(struct aq_hw* hw) +{ + int ver = AQ_READ_REG(hw, 0x18); + u32 bootExitCode = 0; + int k; + + for (k = 0; k < 1000; ++k) { + u32 flbStatus = reg_glb_daisy_chain_status1_get(hw); + bootExitCode = AQ_READ_REG(hw, 0x388); + if (flbStatus != 0x06000000 || bootExitCode != 0) + break; + } + + if (k == 1000) { + aq_log_error("Neither RBL nor FLB started"); + return (-EBUSY); + } + + hw->rbl_enabled = bootExitCode != 0; + + trace(dbg_init, "RBL enabled = %d", hw->rbl_enabled); + + /* Having FW version 0 is an indicator that cold start + * is in progress. This means two things: + * 1) Driver have to wait for FW/HW to finish boot (500ms giveup) + * 2) Driver may skip reset sequence and save time. + */ + if (hw->fast_start_enabled && !ver) { + int err = wait_init_mac_firmware_(hw); + /* Skip reset as it just completed */ + if (!err) + return (0); + } + + aq_fw_bootloader_mode mode = boot_mode_unknown; + int err = mac_soft_reset_(hw, &mode); + if (err < 0) { + aq_log_error("MAC reset failed: %d", err); + return (err); + } + + switch (mode) { + case boot_mode_flb: + aq_log("FLB> F/W successfully loaded from flash."); + hw->flash_present = true; + return wait_init_mac_firmware_(hw); + + case boot_mode_rbl_flash: + aq_log("RBL> F/W loaded from flash. Host Bootload disabled."); + hw->flash_present = true; + return wait_init_mac_firmware_(hw); + + case boot_mode_unknown: + aq_log_error("F/W bootload error: unknown bootloader type"); + return (-ENOTSUP); + + case boot_mode_rbl_host_bootload: +#if AQ_CFG_HOST_BOOT_DISABLE + aq_log_error("RBL> Host Bootload mode: this driver does not support Host Boot"); + return (-ENOTSUP); +#else + trace(dbg_init, "RBL> Host Bootload mode"); + break; +#endif // HOST_BOOT_DISABLE + } + + /* + * #todo: Host Boot + */ + aq_log_error("RBL> F/W Host Bootload not implemented"); + + return (-ENOTSUP); +} + +int aq_fw_ops_init(struct aq_hw* hw) +{ + if (hw->fw_version.raw == 0) + hw->fw_version.raw = AQ_READ_REG(hw, 0x18); + + aq_log("MAC F/W version is %d.%d.%d", + hw->fw_version.major_version, hw->fw_version.minor_version, + hw->fw_version.build_number); + + if (hw->fw_version.major_version == 1) { + trace(dbg_init, "using F/W ops v1.x"); + hw->fw_ops = &aq_fw1x_ops; + return (EOK); + } else if (hw->fw_version.major_version >= 2) { + trace(dbg_init, "using F/W ops v2.x"); + hw->fw_ops = &aq_fw2x_ops; + return (EOK); + } + + aq_log_error("aq_fw_ops_init(): invalid F/W version %#x", hw->fw_version.raw); + return (-ENOTSUP); +} + + +int mac_soft_reset_(struct aq_hw* hw, aq_fw_bootloader_mode* mode /*= nullptr*/) +{ + if (hw->rbl_enabled) { + return mac_soft_reset_rbl_(hw, mode); + } else { + if (mode) + *mode = boot_mode_flb; + + return mac_soft_reset_flb_(hw); + } +} + +int mac_soft_reset_flb_(struct aq_hw* hw) +{ + int k; + + reg_global_ctl2_set(hw, 0x40e1); + // Let Felicity hardware to complete SMBUS transaction before Global software reset. + msec_delay(50); + + /* + * If SPI burst transaction was interrupted(before running the script), global software + * reset may not clear SPI interface. Clean it up manually before global reset. + */ + reg_glb_nvr_provisioning2_set(hw, 0xa0); + reg_glb_nvr_interface1_set(hw, 0x9f); + reg_glb_nvr_interface1_set(hw, 0x809f); + msec_delay(50); + + reg_glb_standard_ctl1_set(hw, (reg_glb_standard_ctl1_get(hw) & ~glb_reg_res_dis_msk) | glb_soft_res_msk); + + // Kickstart. + reg_global_ctl2_set(hw, 0x80e0); + reg_mif_power_gating_enable_control_set(hw, 0); + if (!hw->fast_start_enabled) + reg_glb_general_provisioning9_set(hw, 1); + + /* + * For the case SPI burst transaction was interrupted (by MCP reset above), + * wait until it is completed by hardware. + */ + msec_delay(50); // Sleep for 10 ms. + + /* MAC Kickstart */ + if (!hw->fast_start_enabled) { + reg_global_ctl2_set(hw, 0x180e0); + + u32 flb_status = 0; + int k; + for (k = 0; k < 1000; ++k) { + flb_status = reg_glb_daisy_chain_status1_get(hw) & 0x10; + if (flb_status != 0) + break; + msec_delay(10); // Sleep for 10 ms. + } + + if (flb_status == 0) { + trace_error(dbg_init, "FLB> MAC kickstart failed: timed out"); + return (false); + } + + trace(dbg_init, "FLB> MAC kickstart done, %d ms", k); + /* FW reset */ + reg_global_ctl2_set(hw, 0x80e0); + // Let Felicity hardware complete SMBUS transaction before Global software reset. + msec_delay(50); + } + reg_glb_cpu_sem_set(hw, 1, 0); + + // PHY Kickstart: #undone + + // Global software reset + rx_rx_reg_res_dis_set(hw, 0); + tx_tx_reg_res_dis_set(hw, 0); + mpi_tx_reg_res_dis_set(hw, 0); + reg_glb_standard_ctl1_set(hw, (reg_glb_standard_ctl1_get(hw) & ~glb_reg_res_dis_msk) | glb_soft_res_msk); + + bool restart_completed = false; + for (k = 0; k < 1000; ++k) { + restart_completed = reg_glb_fw_image_id1_get(hw) != 0; + if (restart_completed) + break; + msec_delay(10); + } + + if (!restart_completed) { + trace_error(dbg_init, "FLB> Global Soft Reset failed"); + return (false); + } + + trace(dbg_init, "FLB> F/W restart: %d ms", k * 10); + return (true); +} + +int mac_soft_reset_rbl_(struct aq_hw* hw, aq_fw_bootloader_mode* mode) +{ + trace(dbg_init, "RBL> MAC reset STARTED!"); + + reg_global_ctl2_set(hw, 0x40e1); *** 11281 LINES SKIPPED *** From nobody Sun Nov 30 15:52:12 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dKBP82cjKz6Hn39 for ; Sun, 30 Nov 2025 15:52:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dKBP81CX4z4PYh for ; Sun, 30 Nov 2025 15:52:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764517932; 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=KHbOnJ4c+nmJO9tHeAEAFh2TXv05ScSy4hL8WGNtUk0=; b=fE2smn1Vg7cuSjoEu1IzkfXs0J6KfbGCYUf7sjB9Aj+iHwjkQl135652a1QS4Jr3BF6Ecq Jl8y6T8tM+HtakpgWaFaGZFhVn/L6+GGNEyOvkwBH9L4CiU/cjcyt7gHsjqg1+uSWK6kMJ 3Mmvr/RXxdkUAXM0kZCE6BG5YSztCRpdv9C4a9c/kwZZZVW8zQ25QIDPi10QTJiSDnqVAr cYUxgU0YFHGQkXtGbgbgI96O0CRY8+qQh9bTEBYpnbXjY2M2VKtB69L18Cl53FeCcsotbs +wGrCii5JVNMmbttagJnd+Bf7HWO2QR3kJrw/gMWfPOCt8rkEhY0A3Q6WvCORQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764517932; 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=KHbOnJ4c+nmJO9tHeAEAFh2TXv05ScSy4hL8WGNtUk0=; b=yjnaj0NzDY9QslSLL7KNHchbmmt1PnENr6E6sQzpz4QwxvRo8FBp/8UnHJwdKiynLwgxAx bH8p1gUC/2IjlVQcVR5HEJjDWCgE4jDIutCTBysiX4XVYMPo8pcjjJYQxgGKnYInwny3Vq 0qY0x0LmBqhChiL9OZeNrGj4q6kNyyX/E8iErpKXauMq6WwdM7FQqoVMQsgqy9vaO1l+An LvtD2sd3x4LXEK0u3asZRHAv6YC83BGKkCpt7LHhVnI1C7RfMm/NBCe3TWwOZH+/Z89fCP APa5SqJid9BD6ZbGKKfvRmfjSr57b/ZYPRXVGzQ3NKSdoAk9kY53QM2a00VW+w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764517932; a=rsa-sha256; cv=none; b=xeXASxPb4QxchqEsQj+9Cv5HxJWG+OLHRGmN48lU1CprGMHs7b1jUWg4TaERv7ejShGU6K 1f63gH5DbAgpmPrcvLwGMLzDwPTfwuxY4B14EavPD050jJd5mPKeQ1iu1yzNhVkzEJUirC xyz3vvau8+Nqv9WhYkBkurdmtRLBQ4XPFnyGnF6x8SkAmJQwuX9smNiZWVmcRGgrDpNDPT 6h+0twUJaIwOiORTqJ6kcQhEEpwed2vfAeJD/6zf3PFgvXo6X/7rhyZe88n4/AwoeX5L9C HO5xb6sW0cjAKGqOm4yD8srsmu+ZtxoueXKE7Dhy1LYe6YBaB7JsIeQeKuejZA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dKBP80CsjzhdT for ; Sun, 30 Nov 2025 15:52:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 38d0f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 30 Nov 2025 15:52:12 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Rozhuk Ivan From: Ed Maste Subject: git: 14eb7ec7b713 - main - aq(4): Remove #include of user header List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 14eb7ec7b7135ad1a3448590cbe70b1368b40ec7 Auto-Submitted: auto-generated Date: Sun, 30 Nov 2025 15:52:12 +0000 Message-Id: <692c682c.38d0f.466ce7df@gitrepo.freebsd.org> The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=14eb7ec7b7135ad1a3448590cbe70b1368b40ec7 commit 14eb7ec7b7135ad1a3448590cbe70b1368b40ec7 Author: Rozhuk Ivan AuthorDate: 2022-10-26 12:37:57 +0000 Commit: Ed Maste CommitDate: 2025-11-30 15:38:33 +0000 aq(4): Remove #include of user header pause() has 2 different definition in unistd.h and sys/systm.h --- sys/dev/aq/aq_hw.c | 1 - 1 file changed, 1 deletion(-) diff --git a/sys/dev/aq/aq_hw.c b/sys/dev/aq/aq_hw.c index 3b1764477369..f5f84203588c 100644 --- a/sys/dev/aq/aq_hw.c +++ b/sys/dev/aq/aq_hw.c @@ -32,7 +32,6 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include #include #include #include From nobody Sun Nov 30 15:52:13 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dKBP92Ld6z6HmWw for ; Sun, 30 Nov 2025 15:52:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dKBP91NkWz4PqX for ; Sun, 30 Nov 2025 15:52:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764517933; 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=JixXTMfpNkUSI3F8oHb2FbiPpjFbYyhbljEEAi2p3H8=; b=YFaaG/BrRgc+0UQ1NZuzPuO2YBb1xHGLwkjXYM7gWm0SCxSTVgtV/pt0Oia0J4Ld5eGmqo RP6LtpJ7KxR4g3tXRvZ3XkbIEi4kfdKYtVTTF+S76qPA1v6oBcTkpWssMMxHD5GptZmYYi Xxjo2kXchW8RNoCckcpQtg7BatlAq7SAepwQzkMRpjCaYi1Xj8iInhGZlcLlZW2aEdMhQA Hq8x2K+gOAFlsNGchZ6uhBIkIA6wzo0GejqUf4O8pPB5DpMwFA7TeYpkZO7nE65rrDuN9j W1Q++gS0PDnvbvlDqPtfnW9jRMTVxNGw3U1Zt3/IW8YKuDdlgT7K64RhqMduZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764517933; 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=JixXTMfpNkUSI3F8oHb2FbiPpjFbYyhbljEEAi2p3H8=; b=uTGZSAyh50F1rCfpaMTco2jyENlDMjp4XDzd9/+h6XC9876zjjFCb1BZ4GaR0LrPGMwZ4B ciwaXLlK4w8QgAVydlYecWTekh4Uwi8BzB7tVfmzscneSlVDqes4iJGRMQrmCDIlR+OmHK 9JrEp8tAG9bOHpRMFX6SMRkOeB6v25OAcyODG0EUat446QLj0EJfhZbFVmsOtlQf/WjcRZ CzTHASIOsfFlKX+NPXbG1fE2VHtbToZpUoGc2kbTYq6jVTnJpAmMJ9z65v4A/4hdXsS3V6 idNW1XAh5ZqLnvEenZmY5Ax2FzJpfACY+AfM5+PdDiE35h2ZQw3i4bNGxsQovA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764517933; a=rsa-sha256; cv=none; b=r/ucJD0/opg/QK1kCuAgoktZ4bk/ibHM3JV68rwN4U4P4acDy5mSLq6Md0r4CsTww8Giq7 Cbkr7qSZgZC9qO6UrKRy4P6pfejrg9ah5VZtAWCNTsRtIqNDflNlOBFu5VuCgDiKX4ENS8 LcW27Ahp814HJT6/niH35Ab7jdy8gCDO6yMICWDNP1AmtNN2Wj4g8Oz8SOYjsLcKIvlXqn SbNJnQryeMn8lja+B6WekqG59XhRGJmbfeUbC2ydz85IMvkoucKrQOsDavLToLE6BvCtI0 829XZfjQOyv5iImJDwaWRKnAApwye4HRkLWt0YIosMeMsH0AW9qkcVdusYFytA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dKBP90wdYzhw7 for ; Sun, 30 Nov 2025 15:52:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3864c by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 30 Nov 2025 15:52:13 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Olivier Cochard From: Ed Maste Subject: git: 4756f5ff8f10 - main - aq(4): Port to IfAPI List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4756f5ff8f10cdda925cab60c0b66606698e49ee Auto-Submitted: auto-generated Date: Sun, 30 Nov 2025 15:52:13 +0000 Message-Id: <692c682d.3864c.1b910a79@gitrepo.freebsd.org> The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=4756f5ff8f10cdda925cab60c0b66606698e49ee commit 4756f5ff8f10cdda925cab60c0b66606698e49ee Author: Olivier Cochard AuthorDate: 2025-11-13 03:17:03 +0000 Commit: Ed Maste CommitDate: 2025-11-30 15:38:33 +0000 aq(4): Port to IfAPI Direct access to struct ifnet members is not possible in FreeBSD 15; accessors must be used. These exist in all supported FreeBSD versions, so we do not need to make this conditional. --- sys/dev/aq/aq_main.c | 16 ++++++++-------- sys/dev/aq/aq_media.c | 12 ++++++------ sys/dev/aq/aq_ring.c | 4 ++-- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/sys/dev/aq/aq_main.c b/sys/dev/aq/aq_main.c index 299ed79f9094..7345c7cc2d03 100644 --- a/sys/dev/aq/aq_main.c +++ b/sys/dev/aq/aq_main.c @@ -379,7 +379,7 @@ static int aq_if_attach_pre(if_ctx_t ctx) #else if_t ifp; ifp = iflib_get_ifp(ctx); - ifp->if_capenable = IFCAP_RXCSUM | IFCAP_TXCSUM | IFCAP_HWCSUM | IFCAP_TSO | + if_setcapenable(ifp, IFCAP_RXCSUM | IFCAP_TXCSUM | IFCAP_HWCSUM | IFCAP_TSO | IFCAP_JUMBO_MTU | IFCAP_VLAN_HWFILTER | IFCAP_VLAN_MTU | IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_HWCSUM; @@ -718,7 +718,7 @@ static void aq_if_stop(if_ctx_t ctx) static uint64_t aq_if_get_counter(if_ctx_t ctx, ift_counter cnt) { struct aq_dev *softc = iflib_get_softc(ctx); - struct ifnet *ifp = iflib_get_ifp(ctx); + if_t ifp = iflib_get_ifp(ctx); switch (cnt) { case IFCOUNTER_IERRORS: @@ -776,7 +776,7 @@ static bool aq_is_mc_promisc_required(struct aq_dev *softc) static void aq_if_multi_set(if_ctx_t ctx) { struct aq_dev *softc = iflib_get_softc(ctx); - struct ifnet *ifp = iflib_get_ifp(ctx); + if_t ifp = iflib_get_ifp(ctx); struct aq_hw *hw = &softc->hw; AQ_DBG_ENTER(); #if __FreeBSD_version >= 1300054 @@ -786,9 +786,9 @@ static void aq_if_multi_set(if_ctx_t ctx) #endif if (softc->mcnt >= AQ_HW_MAC_MAX) { - aq_hw_set_promisc(hw, !!(ifp->if_flags & IFF_PROMISC), + aq_hw_set_promisc(hw, !!(if_getflags(ifp) & IFF_PROMISC), aq_is_vlan_promisc_required(softc), - !!(ifp->if_flags & IFF_ALLMULTI) || aq_is_mc_promisc_required(softc)); + !!(if_getflags(ifp) & IFF_ALLMULTI) || aq_is_mc_promisc_required(softc)); }else{ #if __FreeBSD_version >= 1300054 if_foreach_llmaddr(iflib_get_ifp(ctx), &aq_mc_filter_apply, softc); @@ -810,7 +810,7 @@ static int aq_if_mtu_set(if_ctx_t ctx, uint32_t mtu) static void aq_if_media_status(if_ctx_t ctx, struct ifmediareq *ifmr) { - struct ifnet *ifp; + if_t ifp; AQ_DBG_ENTER(); @@ -824,13 +824,13 @@ static void aq_if_media_status(if_ctx_t ctx, struct ifmediareq *ifmr) static int aq_if_media_change(if_ctx_t ctx) { struct aq_dev *softc = iflib_get_softc(ctx); - struct ifnet *ifp = iflib_get_ifp(ctx); + if_t ifp = iflib_get_ifp(ctx); int rc = 0; AQ_DBG_ENTER(); /* Not allowd in UP state, since causes unsync of rings */ - if ((ifp->if_flags & IFF_UP)){ + if ((if_getflags(ifp) & IFF_UP)){ rc = EPERM; goto exit; } diff --git a/sys/dev/aq/aq_media.c b/sys/dev/aq/aq_media.c index 914d3d3eb940..fdf7ef38d2dc 100644 --- a/sys/dev/aq/aq_media.c +++ b/sys/dev/aq/aq_media.c @@ -94,9 +94,9 @@ void aq_mediastatus_update(aq_dev_t *aq_dev, u32 link_speed, const struct aq_hw_ aq_dev->media_active |= IFM_AUTO; } -void aq_mediastatus(struct ifnet *ifp, struct ifmediareq *ifmr) +void aq_mediastatus(if_t ifp, struct ifmediareq *ifmr) { - aq_dev_t *aq_dev = iflib_get_softc(ifp->if_softc); + aq_dev_t *aq_dev = iflib_get_softc(if_getsoftc(ifp)); ifmr->ifm_active = IFM_ETHER; ifmr->ifm_status = IFM_AVALID; @@ -107,11 +107,11 @@ void aq_mediastatus(struct ifnet *ifp, struct ifmediareq *ifmr) ifmr->ifm_active |= aq_dev->media_active; } -int aq_mediachange(struct ifnet *ifp) +int aq_mediachange(if_t ifp) { - aq_dev_t *aq_dev = iflib_get_softc(ifp->if_softc); + aq_dev_t *aq_dev = iflib_get_softc(if_getsoftc(ifp)); struct aq_hw *hw = &aq_dev->hw; - int old_media_rate = ifp->if_baudrate; + int old_media_rate = if_getbaudrate(ifp); int old_link_speed = hw->link_rate; struct ifmedia *ifm = iflib_get_media(aq_dev->ctx); int user_media = IFM_SUBTYPE(ifm->ifm_media); @@ -169,7 +169,7 @@ int aq_mediachange(struct ifnet *ifp) hw->fc.fc_tx = (ifm->ifm_media & IFM_ETH_TXPAUSE) ? 1 : 0; /* In down state just remember new link speed */ - if (!(ifp->if_flags & IFF_UP)) + if (!(if_getflags(ifp) & IFF_UP)) return (0); if ((media_rate != old_media_rate) || (hw->link_rate != old_link_speed)) { diff --git a/sys/dev/aq/aq_ring.c b/sys/dev/aq/aq_ring.c index 1de52ed0fc79..e20527b8c7c2 100644 --- a/sys/dev/aq/aq_ring.c +++ b/sys/dev/aq/aq_ring.c @@ -331,7 +331,7 @@ static int aq_isc_rxd_pkt_get(void *arg, if_rxd_info_t ri) aq_dev_t *aq_dev = arg; struct aq_ring *ring = aq_dev->rx_rings[ri->iri_qsidx]; aq_rx_desc_t *rx_desc; - struct ifnet *ifp; + if_t ifp; int cidx, rc = 0, i; size_t len, total_len; @@ -370,7 +370,7 @@ static int aq_isc_rxd_pkt_get(void *arg, if_rxd_info_t ri) cidx = aq_next(cidx, ring->rx_size - 1); } while (!rx_desc->wb.eop); - if ((ifp->if_capenable & IFCAP_RXCSUM) != 0) { + if ((if_getcapenable(ifp) & IFCAP_RXCSUM) != 0) { aq_rx_set_cso_flags(rx_desc, ri); } ri->iri_rsstype = bsd_rss_type[rx_desc->wb.rss_type & 0xF]; From nobody Sun Nov 30 15:52:14 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dKBPC0hg9z6Hmg2 for ; Sun, 30 Nov 2025 15:52:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dKBPB23Jnz4Pc3 for ; Sun, 30 Nov 2025 15:52:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764517934; 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=eb/y2ax4LMErVeueETM9s8bijVhhx0AgRobbIKMOylk=; b=DW3RMNJnpBgo6YstKi1DAaMA1i/QszjE4noq8xqIdKCDdxYg37+EICoai2VvuEmIn9UaHR VB3tP2rvM7JGWuDRn3ZLCjoZ8fncGcKIo+vM0JGtMhlWJ2w+x4bjqNEyvu6VKwvkET7vtE M3cdqt2FnfNyKPZmIhHzM08uPzM7hxAvwaXHEwI82cvqm3R0df9n8UjLOlmimrFHYZ5o7P Ni5D+JL0Wv+RQHU29rkES5OFMLxDHowV4gmjcvV7smGIm7/fIdtRXSo1/luG2UFYozIUuU sZUiC8y+ZExBP59sju04kGnbKmAnPknQRwfSiai0zyV3pgeNNnKfw3qvqngY1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764517934; 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=eb/y2ax4LMErVeueETM9s8bijVhhx0AgRobbIKMOylk=; b=OHoVe8q0YEIJzhnoDgvXtaVWQ1L4HCRF+McEc58zs1QDdDFhiSxhmflgvEGmIJg2gEb4ne 1zoMRwIeMJdyDzGLgzwv+E1ynYkCUFGpArzIpGk6UmWcwGSZ7Pex4Qt4pASnaJjTpCoPfL eEEnzVy/3Nj5stcsWvk9GmRidGOnDvW5nJ/w+MG7VY/iwtH1cF0njJSxFfb4/dFBmd74eS dpebxX0eUrbx1Kjd7Afz1msaprFOjMOKltB3/Gae4Yi0fHH95MABrjkhwvyTBnMyPf8DiG bUkRAMiebmVBSu0pc9LIWCzLGJlJuuO4WgY1wMFPj+9l1Mx5T+nleEyTejE02Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764517934; a=rsa-sha256; cv=none; b=WvpFMZOgif8oVnPLgPQc3HD7C021XNUd0Oq9AL7lDm1l6S2lztqIFuYZJGTxKgy4GIZN7r 5ZRWvVc9BXUuUrBD7XBbZGv/mPLF8zM8Pxk9VPiYOgmHgYBvO4FzK5FokWG5Nj48pAKK9k DcHL2zVaXtiMhDjYD1g2Is2pXoD1x+XqFZiCYG2B6Y/xjZVS/InAPnSJtjXYy+fWGsMbNG UaUv9ESaPItruukxHuGzlCBc47RV0ecjyLN6y/gp2nGc+2hSxLvHTNj1vMRQ1LIwc0RJlY VgQOrkUW2cZJnP3dkcTHJCxkQ1oVwBXPxfxCvobUMhpbgEeZ3+kD+qziDC2SVA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dKBPB1Tw9zhTj for ; Sun, 30 Nov 2025 15:52:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 393ee by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 30 Nov 2025 15:52:14 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: John Baldwin From: Ed Maste Subject: git: 2b587c0c8a93 - main - aq(4): Remove unused DRIVER_MODULE devclass List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2b587c0c8a933cd110ae579366644a280c509b7f Auto-Submitted: auto-generated Date: Sun, 30 Nov 2025 15:52:14 +0000 Message-Id: <692c682e.393ee.14f61817@gitrepo.freebsd.org> The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=2b587c0c8a933cd110ae579366644a280c509b7f commit 2b587c0c8a933cd110ae579366644a280c509b7f Author: John Baldwin AuthorDate: 2025-11-13 03:23:27 +0000 Commit: Ed Maste CommitDate: 2025-11-30 15:38:33 +0000 aq(4): Remove unused DRIVER_MODULE devclass --- sys/dev/aq/aq_main.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/dev/aq/aq_main.c b/sys/dev/aq/aq_main.c index 7345c7cc2d03..5712e347cff8 100644 --- a/sys/dev/aq/aq_main.c +++ b/sys/dev/aq/aq_main.c @@ -196,8 +196,12 @@ static driver_t aq_driver = { "aq", aq_methods, sizeof(struct aq_dev), }; +#if __FreeBSD_version >= 1400058 +DRIVER_MODULE(atlantic, pci, aq_driver, 0, 0); +#else static devclass_t aq_devclass; DRIVER_MODULE(atlantic, pci, aq_driver, aq_devclass, 0, 0); +#endif MODULE_DEPEND(atlantic, pci, 1, 1, 1); MODULE_DEPEND(atlantic, ether, 1, 1, 1); From nobody Sun Nov 30 15:56:39 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dKBVH2Pl9z6Hmmw for ; Sun, 30 Nov 2025 15:56:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dKBVH0hMBz3CR5 for ; Sun, 30 Nov 2025 15:56:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764518199; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=q5+0B32o0F7IFhNpDn2JxMpfKY5E+WC74SDNuNs0CDc=; b=eZbKU5KkFMh+etd1v4RClz1h1NZRKcqhugkTTg392dKs6X63EYnahzcX4vavHyIdFjNcsG YSa7YVolfFgw/KOn611xQZx87mwOCfbjy3Xe/hyXHnGx60nX/oTAoyTd7Y+Z9ERWr60D+L FrWP31MQ7BPOBx3nWA/18fAaGxycZ4ASTy9pnfsqDLK5Gx6P6V1X3SFNXZfYAX6IB/EJls xik7F/rjfbeZTl2rplAD5CvwBZkLeN2UX7m0MDAEnrYl4Po4yh1nXD2E7dJ1CVHdix/OIp OFFFuZZCeJY3ZyVbW/34Rwsw5dKyfJb35cBctUAiBBMvEMJwVX9546OwPFacKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764518199; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=q5+0B32o0F7IFhNpDn2JxMpfKY5E+WC74SDNuNs0CDc=; b=XPb+FeFbvtmztN1R6HPHNSQIVjWQRx2iL+X8ZM8XLoYK0z5AR4Uuq9yzoYfaDTpmG3rqq2 GYMxwZC7v/hJDuq4jR53FO08jZsKZGHei+WY309DUt5FJ30OykfIQNPllBSYE9ms9Wy17r l1uTWSDWQKdkW09rY0Aowk7I9Xem7SNXRHXi4nFXd5jvKA+UGAk9sJs1J43yJkYu2PnmoR 5s58nntXsie4ibDq2tC0Q7AmwEBBopoD1tp4vDjiQKAaS+F3mnWPkcBWWXO28TOf5jtLQj 6A5X8SYO1Ffx52E1AtQLCo4Ggzew6goGRrywt0XNYFlBENLx9oHEtVupfu0k3Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764518199; a=rsa-sha256; cv=none; b=pXOdKbipBSKFpa3Urqb3ob4Ezo8yJ+vE1+uOFuA0XKqdVNm7RoulmmECx176jrbMWHtajN QmgmBEWAzjZaOG9lCY3qZ/Ybxi6wi6aixKefw/YVfeh9NZrOEqe6hVPrYkkkKKXHagoL/c mzZB+IGY+liuR4axik+nbDwsTARxb92f0knIHOfJ8I98FXh9wGzfk7GRChkH/DVzUrENZO zaJSETSEMMPzTuOPrLXQX2ZgyMLTi6/DmstGi1/yjLa1vqV3iQWUUVfMAqs4/C8QT/H0Ir Qneq777HfoUG+d/o1NKroELmM+OvR2aQ50ozUrEyseZYxOIT7BNo6w4Nwoj9jA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dKBVH0BBPzhTq for ; Sun, 30 Nov 2025 15:56:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 38e4d by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 30 Nov 2025 15:56:39 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 8666fda1afb0 - main - aq(4): Fix VLAN tag test List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8666fda1afb03b3a88e57a20d76da8e7910b6407 Auto-Submitted: auto-generated Date: Sun, 30 Nov 2025 15:56:39 +0000 Message-Id: <692c6937.38e4d.382f8d99@gitrepo.freebsd.org> The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=8666fda1afb03b3a88e57a20d76da8e7910b6407 commit 8666fda1afb03b3a88e57a20d76da8e7910b6407 Author: Ed Maste AuthorDate: 2025-11-13 14:15:38 +0000 Commit: Ed Maste CommitDate: 2025-11-30 15:56:13 +0000 aq(4): Fix VLAN tag test Previously emitted a compiler warning "warning: bitwise comparison always evaluates to false." Looking at the OpenBSD driver (which is based on this code) it looks like the VLAN flag should be set if either of these bits is. In the OpenBSD driver these are AQ_RXDESC_TYPE_VLAN and AQ_RXDESC_TYPE_VLAN2 rather than a magic number 0x60. Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D53836 --- sys/dev/aq/aq_ring.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/aq/aq_ring.c b/sys/dev/aq/aq_ring.c index e20527b8c7c2..ca0391a6d61b 100644 --- a/sys/dev/aq/aq_ring.c +++ b/sys/dev/aq/aq_ring.c @@ -361,7 +361,7 @@ static int aq_isc_rxd_pkt_get(void *arg, if_rxd_info_t ri) ri->iri_frags[i].irf_idx = cidx; ri->iri_frags[i].irf_len = len; - if ((rx_desc->wb.pkt_type & 0x60) == 1) { + if ((rx_desc->wb.pkt_type & 0x60) != 0) { ri->iri_flags |= M_VLANTAG; ri->iri_vtag = le32toh(rx_desc->wb.vlan); } From nobody Sun Nov 30 15:56:37 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dKBVM4wKrz6HnNp for ; Sun, 30 Nov 2025 15:56:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dKBVM0CVbz3CgV for ; Sun, 30 Nov 2025 15:56:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764518203; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9JA2TkTvSHuDeEHM27kzdk523j3+r8gBu8N+m12rz3g=; b=j4XowWKAQvQ1nSRmEFNI51sIXEzvZ0Gmup+q3fV3q8Ai1XsqyQTLE1AXvosbVJPss7WGZ5 Z/6bvbFrpRl40fLGgn3WdHZgZWvVLHUUwXGBBL3paNiWIg8Pww0ItmknH+zLmrU2is3qZt Gse3j2Qu09s5CzYf5ny+MtYBSn5fSXkVFZ1lD/Fp9o0a6w+WuKc3RGUwjO/mXpgP4xH1o+ 1lyAvI2E/haVNe6N4ijNlF1ClnHdd//83RYQ/6+mQlHlAtHpYa1YdLMQyaATpRXWZUtpsu 1XKLwYePE8UL+PeyV5Q8AQtTzqJJ8oj7L/5uZlFsUZxa7hOtMkPzeRI4tsj0ng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764518203; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9JA2TkTvSHuDeEHM27kzdk523j3+r8gBu8N+m12rz3g=; b=UA6TKDePhFFQ+sm8Husng/kxmUZgPH4ejFXoB7f0bOGlgIJoD8ty3Qsl0ButLJU+6Ehung dNQbqoCCtCBZLk3S0waCVf1MUCG9JqY+3nZYKvJE9zDqIppp2yU7tOZQ4xrqdKwGexWT25 N3Rw3GJze5Ukw2TaM8zBnKmeDdZFItHJARSDzzmFk73KkflBgP4MCp1HVrhGJkV8YHPXGh JNpuicVgWTYtAFA+F6ghIQnahg9YqvZ3YilIJeVgsa9paCyEOIUuswNQ6OQM5vMM2fBW3A YYTtaWPImWP7KUaHhTelTYBCquLqQd97oj85Hf3UvA/iLAgqwU9Yo6Xj3vshcQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764518203; a=rsa-sha256; cv=none; b=n0/NHZM8/fOqXNBLgLTLPtXVYb0J1kivmUxae4EtVXoU9At9y/l9kMQP3jdU3YgMiWzHFn KWBPx4nRuQOl/zvl0jioFcKjd+X5wy3OO1viefj3znVhnbpqb7EbtKXxR1e98mBlrcSuGT +O7A+bWUkUiRX8ekiS3VvHOoBYkpBqOcwMbi7yZ/CGSpLPO2gSt9qf4/vWOmMvUV51zW75 UGbAFXbOqKy43QxjZPuJylVa4HTQ8T4WcY7vV1sw9kgcEQzot8Zhi9WWutUPpGcCtNicHG X/vUr4TxtfkLa2TYgAAaci/b8LC7jSyn52qVLDa1wv2czqm7+GAYo0KHfMG7qg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dKBVL6mLczhkG for ; Sun, 30 Nov 2025 15:56:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 382ac by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 30 Nov 2025 15:56:37 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 0156be41a1eb - main - aq(4): Remove unimplemented functions List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0156be41a1eb8e0408819466b912181aa7966df9 Auto-Submitted: auto-generated Date: Sun, 30 Nov 2025 15:56:37 +0000 Message-Id: <692c6935.382ac.230e8dab@gitrepo.freebsd.org> The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=0156be41a1eb8e0408819466b912181aa7966df9 commit 0156be41a1eb8e0408819466b912181aa7966df9 Author: Ed Maste AuthorDate: 2025-11-12 23:45:37 +0000 Commit: Ed Maste CommitDate: 2025-11-30 15:55:27 +0000 aq(4): Remove unimplemented functions aq_if_priv_ioctl and aq_if_debug have prototypes but are not yet implemented. Just remove the commented-out DEVMETHODs and the unused prototypes, to clear a build-time warning; the DEVMETHODs and prototypes can be readded if / when they are implemented. --- sys/dev/aq/aq_main.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/sys/dev/aq/aq_main.c b/sys/dev/aq/aq_main.c index 5712e347cff8..48f8305fcd15 100644 --- a/sys/dev/aq/aq_main.c +++ b/sys/dev/aq/aq_main.c @@ -160,7 +160,6 @@ static int aq_if_media_change(if_ctx_t ctx); static int aq_if_promisc_set(if_ctx_t ctx, int flags); static uint64_t aq_if_get_counter(if_ctx_t ctx, ift_counter cnt); static void aq_if_timer(if_ctx_t ctx, uint16_t qid); -static int aq_if_priv_ioctl(if_ctx_t ctx, u_long command, caddr_t data); static int aq_hw_capabilities(struct aq_dev *softc); static void aq_add_stats_sysctls(struct aq_dev *softc); @@ -177,7 +176,6 @@ static void aq_if_vlan_register(if_ctx_t ctx, uint16_t vtag); static void aq_if_vlan_unregister(if_ctx_t ctx, uint16_t vtag); /* Informational/diagnostic */ -static void aq_if_debug(if_ctx_t ctx); static void aq_if_led_func(if_ctx_t ctx, int onoff); static device_method_t aq_methods[] = { @@ -235,7 +233,6 @@ static device_method_t aq_if_methods[] = { DEVMETHOD(ifdi_get_counter, aq_if_get_counter), DEVMETHOD(ifdi_update_admin_status, aq_if_update_admin_status), DEVMETHOD(ifdi_timer, aq_if_timer), -// DEVMETHOD(ifdi_priv_ioctl, aq_if_priv_ioctl), /* Interrupt enable / disable */ DEVMETHOD(ifdi_intr_enable, aq_if_enable_intr), @@ -250,7 +247,6 @@ static device_method_t aq_if_methods[] = { /* Informational/diagnostic */ DEVMETHOD(ifdi_led_func, aq_if_led_func), -// DEVMETHOD(ifdi_debug, aq_if_debug), DEVMETHOD_END }; From nobody Sun Nov 30 19:22:08 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dKH3N3yQdz6Jghd for ; Sun, 30 Nov 2025 19:22:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dKH3N3B0hz3gDs for ; Sun, 30 Nov 2025 19:22:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764530528; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xvUN9fJRzW9nj7uuMhqPK4p7kRPm49cAGEqvhMuwTkw=; b=MXvVbiLA522zrJ6l+HhsuFsbD8/QdMj+r6xmrFNn99IDoYxmsHdmdxSeoqoFy5n9BsqGp+ 2+7h0EqgOfaYJ6X6ZbVUZSWEHI+6479QnM2vTWNogIYog77I4oG4OmQ1a6o2gIWG/1TY4i rF5FazTkJPZHstop72IfQ7zOdVGJRTae+F5ie1wm5sfn1C8K1JhNALw8i3g1Zeb6Wj1a2k 4ZuFySd0yXma3FTgIGw54trQ11cmasoFmvAuARRgs0ovSoq9o7uvxfEPob4xmTS6AMSvIo 7rJ+Ui+SSZXpZ7hssPP8P+wS+q9sMs8enQ+UUqb5hJqS3ZaZ2aY15GTGvwU0nQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764530528; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xvUN9fJRzW9nj7uuMhqPK4p7kRPm49cAGEqvhMuwTkw=; b=I6or7wKn+FSGXmRL7+fJfYEuofKxHzQCeNtJ3XqnheM20A+1tk69HK+cXNntBemu4kdy6I 1pSQFi0ONjnJC0mAQq59BsEG1tgUskiOCXkCarMSMrSlZ+BlYyp6sGim8JRJIymV/DLt+k cF7H2ON8NFMEDt9DJ1KqvKKzhkhabMw2HKuWPukl5y13CaR/DyxX929FGzzLmkcZkWx5R2 vo395SeIKGB75ZHjTHhKccEfps2po+CFYEt5dYlnFlnhw8fZIPZe3zDGosAJ5qX4UD1jS2 Pn4qWbiFoXA4+g3KhZAo5zCK5Sh8S5Buw3uLZ5V56vx02F23wrlXp3qgb0SgGQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764530528; a=rsa-sha256; cv=none; b=j+ia/NfQ9eJnChbLLvp0+FTbXhYwSed15qbTQZ1SodL1c6VqLbs3jxve24xlzPIIZbarnt xOjlxDs+sZ16IMxyq3sTvyO9iskpimSm+WBxg6L1IEeIMhFwrDy6vaWRWLWVhuqXAZxPc4 T/+UZ/6gCGtOlwEWYWwOxqYO2W0jOcxLgEj0nq/Y3Lt/tvMWrWVq9lVMb971ZgS4QykrjQ P5sqxwUHMYJTK9fYn2jMgJCDFvfajKuRfo6V14oMUwYre60rXtnVbfXodj0UGn8KPbe6yJ oeQ4sEkwDt+a/bhe/ZunEel8jdws2CwzwOl8AFVGhfIhdkzB6A+g3Z75e55cZg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dKH3N2jjPznbb for ; Sun, 30 Nov 2025 19:22:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2533f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 30 Nov 2025 19:22:08 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Robert Clausecker Subject: git: 7326bc7f9c14 - main - sys/limits.h: add C23 _WIDTH macros List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: fuz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7326bc7f9c14f86976a7769906b167ff96140809 Auto-Submitted: auto-generated Date: Sun, 30 Nov 2025 19:22:08 +0000 Message-Id: <692c9960.2533f.f6bcf48@gitrepo.freebsd.org> The branch main has been updated by fuz: URL: https://cgit.FreeBSD.org/src/commit/?id=7326bc7f9c14f86976a7769906b167ff96140809 commit 7326bc7f9c14f86976a7769906b167ff96140809 Author: Robert Clausecker AuthorDate: 2025-11-19 12:29:58 +0000 Commit: Robert Clausecker CommitDate: 2025-11-30 19:21:47 +0000 sys/limits.h: add C23 _WIDTH macros For compliance with IOS/IEC 9899:2024 ("C23"). These macros define the width in bits of the basic integer types. Another new macro, BITINT_MAXWIDTH, is not yet included as I do not understand what it should be set to. Perhaps it is compiler-specific. Approved by: markj (mentor) MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D53825 --- sys/arm/include/_limits.h | 3 +++ sys/arm64/include/_limits.h | 3 +++ sys/powerpc/include/_limits.h | 3 +++ sys/riscv/include/_limits.h | 3 +++ sys/sys/limits.h | 20 ++++++++++++++++++++ sys/x86/include/_limits.h | 3 +++ 6 files changed, 35 insertions(+) diff --git a/sys/arm/include/_limits.h b/sys/arm/include/_limits.h index 8cd48337508e..d6bcb09bda84 100644 --- a/sys/arm/include/_limits.h +++ b/sys/arm/include/_limits.h @@ -42,6 +42,9 @@ */ #define __CHAR_BIT 8 /* number of bits in a char */ +#define __SHRT_BIT 16 /* number of bits in a short */ +#define __INT_BIT 32 /* number of bits in an int */ +#define __LLONG_BIT 64 /* number of bits in a long long */ #define __SCHAR_MAX 0x7f /* max value for a signed char */ #define __SCHAR_MIN (-0x7f - 1) /* min value for a signed char */ diff --git a/sys/arm64/include/_limits.h b/sys/arm64/include/_limits.h index 08649b5c779d..aeb72dc19b09 100644 --- a/sys/arm64/include/_limits.h +++ b/sys/arm64/include/_limits.h @@ -41,6 +41,9 @@ */ #define __CHAR_BIT 8 /* number of bits in a char */ +#define __SHRT_BIT 16 /* number of bits in a short */ +#define __INT_BIT 32 /* number of bits in an int */ +#define __LLONG_BIT 64 /* number of bits in a long long */ #define __SCHAR_MAX 0x7f /* max value for a signed char */ #define __SCHAR_MIN (-0x7f - 1) /* min value for a signed char */ diff --git a/sys/powerpc/include/_limits.h b/sys/powerpc/include/_limits.h index 542248e51498..cae389ef0f36 100644 --- a/sys/powerpc/include/_limits.h +++ b/sys/powerpc/include/_limits.h @@ -42,6 +42,9 @@ */ #define __CHAR_BIT 8 /* number of bits in a char */ +#define __SHRT_BIT 16 /* number of bits in an short */ +#define __INT_BIT 32 /* number of bits in an int */ +#define __LLONG_BIT 64 /* number of bits in a long long */ #define __SCHAR_MAX 0x7f /* max value for a signed char */ #define __SCHAR_MIN (-0x7f - 1) /* min value for a signed char */ diff --git a/sys/riscv/include/_limits.h b/sys/riscv/include/_limits.h index 95e86c14e168..872e5b610e0c 100644 --- a/sys/riscv/include/_limits.h +++ b/sys/riscv/include/_limits.h @@ -37,6 +37,9 @@ */ #define __CHAR_BIT 8 /* number of bits in a char */ +#define __SHRT_BIT 16 /* number of bits in a short */ +#define __INT_BIT 32 /* number of bits in an int */ +#define __LLONG_BIT 64 /* number of bits in a long long */ #define __SCHAR_MAX 0x7f /* max value for a signed char */ #define __SCHAR_MIN (-0x7f - 1) /* min value for a signed char */ diff --git a/sys/sys/limits.h b/sys/sys/limits.h index 2cb0051fe86c..8044d4458639 100644 --- a/sys/sys/limits.h +++ b/sys/sys/limits.h @@ -68,6 +68,26 @@ #define LLONG_MIN __LLONG_MIN /* min for a long long */ #endif +#if __ISO_C_VISIBLE >= 2023 +#define BOOL_WIDTH 1 /* number of bits in a bool */ + +#define CHAR_WIDTH __CHAR_BIT /* number of bits in a char */ +#define SCHAR_WIDTH __CHAR_BIT /* number of bits in a signed char */ +#define UCHAR_WIDTH __CHAR_BIT /* number of bits in an unsigned char */ + +#define SHRT_WIDTH __SHRT_BIT /* number of bits in a short */ +#define USHRT_WIDTH __SHRT_BIT /* number of bits in an unsigned short */ + +#define INT_WIDTH __INT_BIT /* number of bits in an int */ +#define UINT_WIDTH __INT_BIT /* number of bits in an unsigned int */ + +#define LONG_WIDTH __LONG_BIT /* number of bits in a long */ +#define ULONG_WIDTH __LONG_BIT /* number of bits in an unsigned long */ + +#define LLONG_WIDTH __LLONG_BIT /* number of bits in a long long */ +#define ULLONG_WIDTH __LLONG_BIT /* number of bits in an unsigned long long */ +#endif + #if __POSIX_VISIBLE || __XSI_VISIBLE #define SSIZE_MAX __SSIZE_MAX /* max value for an ssize_t */ #endif diff --git a/sys/x86/include/_limits.h b/sys/x86/include/_limits.h index 422667a79bc0..fc7cfac1e70d 100644 --- a/sys/x86/include/_limits.h +++ b/sys/x86/include/_limits.h @@ -42,6 +42,9 @@ */ #define __CHAR_BIT 8 /* number of bits in a char */ +#define __SHRT_BIT 16 /* number of bits in a short */ +#define __INT_BIT 32 /* number of bits in an int */ +#define __LLONG_BIT 64 /* number of bits in a long long */ #define __SCHAR_MAX 0x7f /* max value for a signed char */ #define __SCHAR_MIN (-0x7f - 1) /* min value for a signed char */ From nobody Sun Nov 30 19:22:09 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dKH3P54vkz6Jgqy for ; Sun, 30 Nov 2025 19:22:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dKH3P3yG4z3g10 for ; Sun, 30 Nov 2025 19:22:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764530529; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=acYkyxmloCP4E4jbY0zm5K754UcSaNoDXa8Htnsr5mM=; b=xSw0ss2bT+uIWrcaxc5fU1jZVst2t9IENUiVop+uNywkGIgDOJ9xYHBfMffs/wxRy69PeP yIpKooAf+QHbfU07xdfkcbkp/DxSGy3TzH8ZDboPZ1Y52BNS2QWkGhh/Z3722u2R8ZFqId 64qB5gE4p93GZxWhX5n+B/Hh1RJUUzYxg6fqi/flTCaFFQpdlKOW90LuqAqpCO1SABoiO2 uGV3kWmgYYbd9EhH63UBJteJopMF4ypRmAmVrV+Px1c11eXhoIRR7M/KffukdiwMBGC9MY +YBLMlfQ+C1ogTQ546OakAxrzU0ptXruOpslyyFHS0+OmNehqANbCgaia8TwnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764530529; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=acYkyxmloCP4E4jbY0zm5K754UcSaNoDXa8Htnsr5mM=; b=c2y60PQ299V09LjCqyiFBfLym5OspPmuyvGXS817ME0swmhzTM8Mf4CEpOwTygtc6RNtq4 W3JQ6r7pbFaq0jevjP+8YfzJa3ohFwqkqJUI4MCgAaR/WT+UChPJJYHP51aOUSW7tC+Kxl z1h+KnmZzkDUd5zz4+8DFP3JlyP6KmZp6DXDRpIHba0hk2DOBf9AuaRBoFQWwREA6Sz4/j Ui7ljoJ4MeHES3zhD98raSYZAzKfcHS7+scNWWPo2FM1snqD/Ne0ioQKeqtKihniu3m3ds 5usBoSzv5rTDFNZez7bsOnkPXkv4hJoXEAzsVCPw8JRkzAh6hXYwVd7BGfo4Bw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764530529; a=rsa-sha256; cv=none; b=QlcGRaEJ8yMW9RYxCkJmq+NHk34rVzZteTahfYClzfZ7VV/48dn8JhDkzUmSK14U3rEOuu KKs3Hf2pJsEcGFqke57HSU3/acuYSmHu5Gy5NE3lCOuEUv3j2vqTdiEDoj9cZedOrHAD2g v0qWoRl2PBVKTalLOuaUpiyr0ZxejqwHuOjvhire679vKdS6pcr8hwbjLT+R6yqHF3yoTs vpxEVbVUKSSwSsRLSHk25WjHuBLlklSHMETx9+78v+AX4IW5fNWVk2BgY7cz0E1KQq9y7X fd0kTVuf8Nay5rT/6Aa30xEIDZLr3WPGSdPRci6PUuCpiDqlKQLBoc6tZSD1SQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dKH3P3VCDzpVr for ; Sun, 30 Nov 2025 19:22:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 26e23 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 30 Nov 2025 19:22:09 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Robert Clausecker Subject: git: 7998a82d2f99 - main - sys/stdint.h: add C23 _WIDTH macros List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: fuz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7998a82d2f99a00086baf64b2a3343ba10f8806d Auto-Submitted: auto-generated Date: Sun, 30 Nov 2025 19:22:09 +0000 Message-Id: <692c9961.26e23.67d8f161@gitrepo.freebsd.org> The branch main has been updated by fuz: URL: https://cgit.FreeBSD.org/src/commit/?id=7998a82d2f99a00086baf64b2a3343ba10f8806d commit 7998a82d2f99a00086baf64b2a3343ba10f8806d Author: Robert Clausecker AuthorDate: 2025-11-19 18:53:07 +0000 Commit: Robert Clausecker CommitDate: 2025-11-30 19:21:51 +0000 sys/stdint.h: add C23 _WIDTH macros The platform-dependent macros are added to the various _stdint.h headers, those that are always the same are added directly to _stdint.h. We may want to move the definitions for WCHAR_* and WINT_* out of the platform header files as those are always the same. Approved by: markj (mentor) MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D53830 --- sys/arm/include/_stdint.h | 23 +++++++++++++++++++++++ sys/arm64/include/_stdint.h | 23 +++++++++++++++++++++++ sys/powerpc/include/_stdint.h | 33 +++++++++++++++++++++++++++++++++ sys/riscv/include/_stdint.h | 23 +++++++++++++++++++++++ sys/sys/stdint.h | 29 +++++++++++++++++++++++++++++ sys/x86/include/_stdint.h | 33 +++++++++++++++++++++++++++++++++ 6 files changed, 164 insertions(+) diff --git a/sys/arm/include/_stdint.h b/sys/arm/include/_stdint.h index 9931f8b56ef5..2ebc6ea4f89f 100644 --- a/sys/arm/include/_stdint.h +++ b/sys/arm/include/_stdint.h @@ -153,6 +153,29 @@ #define WINT_MIN INT32_MIN #define WINT_MAX INT32_MAX +#if __ISO_C_VISIBLE >= 2023 +/* + * ISO/IEC 9899:2023 + * 7.22.2 Widths of specified-width integer types + */ +#define INT_FAST8_WIDTH INT32_WIDTH +#define INT_FAST16_WIDTH INT32_WIDTH +#define INT_FAST32_WIDTH INT32_WIDTH +#define INT_FAST64_WIDTH INT64_WIDTH +#define INTPTR_WIDTH INT32_WIDTH +#define INTMAX_WIDTH INT64_WIDTH + +/* + * ISO/IEC 9899:2023 + * 7.22.3 Width of other integer types + */ +#define PTRDIFF_WIDTH INT32_WIDTH +#define SIG_ATOMIC_WIDTH INT32_WIDTH +#define SIZE_WIDTH INT32_WIDTH +#define WCHAR_WIDTH INT32_WIDTH +#define WINT_WIDTH INT32_WIDTH +#endif /* __ISO_C_VISIBLE >= 2023 */ + #endif /* !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS) */ #endif /* !_MACHINE__STDINT_H_ */ diff --git a/sys/arm64/include/_stdint.h b/sys/arm64/include/_stdint.h index 0c183bd60dca..0b360b8ab460 100644 --- a/sys/arm64/include/_stdint.h +++ b/sys/arm64/include/_stdint.h @@ -155,6 +155,29 @@ #define WINT_MIN INT32_MIN #define WINT_MAX INT32_MAX +#if __ISO_C_VISIBLE >= 2023 +/* + * ISO/IEC 9899:2023 + * 7.22.2 Widths of specified-width integer types + */ +#define INT_FAST8_WIDTH INT32_WIDTH +#define INT_FAST16_WIDTH INT32_WIDTH +#define INT_FAST32_WIDTH INT32_WIDTH +#define INT_FAST64_WIDTH INT64_WIDTH +#define INTPTR_WIDTH INT64_WIDTH +#define INTMAX_WIDTH INT64_WIDTH + +/* + * ISO/IEC 9899:2023 + * 7.22.3 Width of other integer types + */ +#define PTRDIFF_WIDTH INT64_WIDTH +#define SIG_ATOMIC_WIDTH INT64_WIDTH +#define SIZE_WIDTH INT64_WIDTH +#define WCHAR_WIDTH INT32_WIDTH +#define WINT_WIDTH INT32_WIDTH +#endif /* __ISO_C_VISIBLE >= 2023 */ + #endif /* !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS) */ #endif /* !_MACHINE__STDINT_H_ */ diff --git a/sys/powerpc/include/_stdint.h b/sys/powerpc/include/_stdint.h index 67719432259d..983db38ccf25 100644 --- a/sys/powerpc/include/_stdint.h +++ b/sys/powerpc/include/_stdint.h @@ -195,6 +195,39 @@ #define WINT_MIN INT32_MIN #define WINT_MAX INT32_MAX +#if __ISO_C_VISIBLE >= 2023 +/* + * ISO/IEC 9899:2023 + * 7.22.2 Widths of specified-width integer types + */ +#define INT_FAST8_WIDTH INT32_WIDTH +#define INT_FAST16_WIDTH INT32_WIDTH +#define INT_FAST32_WIDTH INT32_WIDTH +#define INT_FAST64_WIDTH INT64_WIDTH +#ifdef __LP64__ +#define INTPTR_WIDTH INT64_WIDTH +#else +#define INTPTR_WIDTH INT32_WIDTH +#endif +#define INTMAX_WIDTH INT64_WIDTH + +/* + * ISO/IEC 9899:2023 + * 7.22.3 Width of other integer types + */ +#ifdef __LP64__ +#define PTRDIFF_WIDTH INT64_WIDTH +#define SIG_ATOMIC_WIDTH INT64_WIDTH +#define SIZE_WIDTH INT64_WIDTH +#else +#define PTRDIFF_WIDTH INT32_WIDTH +#define SIG_ATOMIC_WIDTH INT32_WIDTH +#define SIZE_WIDTH INT32_WIDTH +#endif +#define WCHAR_WIDTH INT32_WIDTH +#define WINT_WIDTH INT32_WIDTH +#endif /* __ISO_C_VISIBLE >= 2023 */ + #endif /* !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS) */ #endif /* !_MACHINE__STDINT_H_ */ diff --git a/sys/riscv/include/_stdint.h b/sys/riscv/include/_stdint.h index 4e032c8b0a1d..9df000b0eac4 100644 --- a/sys/riscv/include/_stdint.h +++ b/sys/riscv/include/_stdint.h @@ -151,6 +151,29 @@ #define WINT_MIN INT32_MIN #define WINT_MAX INT32_MAX +#if __ISO_C_VISIBLE >= 2023 +/* + * ISO/IEC 9899:2023 + * 7.22.2 Widths of specified-width integer types + */ +#define INT_FAST8_WIDTH INT32_WIDTH +#define INT_FAST16_WIDTH INT32_WIDTH +#define INT_FAST32_WIDTH INT32_WIDTH +#define INT_FAST64_WIDTH INT64_WIDTH +#define INTPTR_WIDTH INT64_WIDTH +#define INTMAX_WIDTH INT64_WIDTH + +/* + * ISO/IEC 9899:2023 + * 7.22.3 Width of other integer types + */ +#define PTRDIFF_WIDTH INT64_WIDTH +#define SIG_ATOMIC_WIDTH INT64_WIDTH +#define SIZE_WIDTH INT64_WIDTH +#define WCHAR_WIDTH INT32_WIDTH +#define WINT_WIDTH INT32_WIDTH +#endif /* __ISO_C_VISIBLE >= 2023 */ + #endif /* !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS) */ #endif /* !_MACHINE__STDINT_H_ */ diff --git a/sys/sys/stdint.h b/sys/sys/stdint.h index f82e391c9e41..77f469f3c2a3 100644 --- a/sys/sys/stdint.h +++ b/sys/sys/stdint.h @@ -73,4 +73,33 @@ typedef __uint_fast64_t uint_fast64_t; #endif #endif /* __EXT1_VISIBLE */ +#if __ISO_C_VISIBLE >= 2023 +#define INT8_WIDTH 8 +#define UINT8_WIDTH 8 +#define INT_LEAST8_WIDTH 8 +#define UINT_LEAST8_WIDTH 8 +#define UINT_FAST8_WIDTH INT_FAST8_WIDTH + +#define INT16_WIDTH 16 +#define UINT16_WIDTH 16 +#define INT_LEAST16_WIDTH 16 +#define UINT_LEAST16_WIDTH 16 +#define UINT_FAST16_WIDTH INT_FAST16_WIDTH + +#define INT32_WIDTH 32 +#define UINT32_WIDTH 32 +#define INT_LEAST32_WIDTH 32 +#define UINT_LEAST32_WIDTH 32 +#define UINT_FAST32_WIDTH INT_FAST32_WIDTH + +#define INT64_WIDTH 64 +#define UINT64_WIDTH 64 +#define INT_LEAST64_WIDTH 64 +#define UINT_LEAST64_WIDTH 64 +#define UINT_FAST64_WIDTH INT_FAST64_WIDTH + +#define UINTMAX_WIDTH INTMAX_WIDTH +#define UINTPTR_WIDTH INTPTR_WIDTH +#endif /* __ISO_C_VISIBLE >= 2023 */ + #endif /* !_SYS_STDINT_H_ */ diff --git a/sys/x86/include/_stdint.h b/sys/x86/include/_stdint.h index 59aab4b39c0c..1b8523bf656b 100644 --- a/sys/x86/include/_stdint.h +++ b/sys/x86/include/_stdint.h @@ -184,6 +184,39 @@ #define WINT_MIN INT32_MIN #define WINT_MAX INT32_MAX +#if __ISO_C_VISIBLE >= 2023 +/* + * ISO/IEC 9899:2023 + * 7.22.2 Widths of specified-width integer types + */ +#define INT_FAST8_WIDTH INT32_WIDTH +#define INT_FAST16_WIDTH INT32_WIDTH +#define INT_FAST32_WIDTH INT32_WIDTH +#define INT_FAST64_WIDTH INT64_WIDTH +#ifdef __LP64__ +#define INTPTR_WIDTH INT64_WIDTH +#else +#define INTPTR_WIDTH INT32_WIDTH +#endif +#define INTMAX_WIDTH INT64_WIDTH + +/* + * ISO/IEC 9899:2023 + * 7.22.3 Width of other integer types + */ +#ifdef __LP64__ +#define PTRDIFF_WIDTH INT64_WIDTH +#define SIG_ATOMIC_WIDTH INT64_WIDTH +#define SIZE_WIDTH INT64_WIDTH +#else +#define PTRDIFF_WIDTH INT32_WIDTH +#define SIG_ATOMIC_WIDTH INT32_WIDTH +#define SIZE_WIDTH INT32_WIDTH +#endif +#define WCHAR_WIDTH INT32_WIDTH +#define WINT_WIDTH INT32_WIDTH +#endif /* __ISO_C_VISIBLE >= 2023 */ + #endif /* !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS) */ #endif /* !_MACHINE__STDINT_H_ */ From nobody Sun Nov 30 19:22:10 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dKH3Q6phBz6Jgss for ; Sun, 30 Nov 2025 19:22:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dKH3Q4lhFz3gQ2 for ; Sun, 30 Nov 2025 19:22:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764530530; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8TRAP3IbjW8VB6aUCbK85/Yz/88HG+vDtpsL8tNruDM=; b=PUP3vKl69loeYmrUkqcCL8u/cLqH/qLXwh9VxvihlmwqhplpM+4I8jGZpYviK36NsMHJf7 x+JuXQ6EV+92+2TmnT6rbO4ELsDhB0sYWNb+2GT6ncWgnkOyWv/J99c5gI5fGF4Yf0IMRG PtD7dsDAzbt95Jed0QEjsdXK+zYQF52+KW9741SDgEAmlhNAQ2Hm+vzWyZU65KHoCP+I4C Eie39opEYwx/Kj7W4ULfnbrbXihBIpm8b+lVz5La7xKPOJ5dSVpNuR9axpk6UTpWc1xnVa X401X/edmcv5eso/MxBVCO0DAtZO/npbeWkJsQMgEpm/v0K3kwvwDJAxuX5DPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764530530; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8TRAP3IbjW8VB6aUCbK85/Yz/88HG+vDtpsL8tNruDM=; b=Aitki4odFUgwiBvWYtnbe8v7WSUHXT57H/6G0jLDMehqutuROYyvLfUusrCTbem/PxsWKG OUucSeDRR2m2rdHhXG8hrZ2KNawbq5Otw53+dP6A7q2oNSDniqRgZ1d3j1yAMbTt2oRG0P v4z/8ne8xOw79FyPUghUIScWtF1V5NnnMP1egScLiJwBsTPTClKIpXHF6CjwxVoQByh9+U ZzET1YXgD/kqiU5cJDvWauHRAAcTNGrwK5OE+Ecz+PNUbHm0NnhNMy7wwfx5lDXI4rshhn IDbwg+PvderY6oWzenx/xxvFoyGntx2Yg6srIcY5KEvxV1eg7ULshpphvN9Xpg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764530530; a=rsa-sha256; cv=none; b=jvN1ZEbdbZPQGHAjuegJfGrSgy/8JzuxMiuQZFaT7aJrIWF2EwA8hyw4Ig+XzrWu8sAZrF sXU6oHnmzBgujnNSho5DNu8B3zT7xbChFlEWcozP6yGdwa3mxTN+K8vSmh6w9MdrbeREmX eASEtzQ7ol14A30UvOgrbUYfvImu+xCVvLPv8n3OhG346gthq0v7py51CaododOLNrjwfW H5JcZNvL2EP4dPNIBvtLdV54lXaCefOAQZ0cGFsQ3qciXBy0gLMZz8B50dG3u8TRy7197Q ANtgz37YT9m9OenNds5kQsNhkhWc5F6Re8coRVIsdXqazsKUZVLbehIETTfsAg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dKH3Q4JdJznbd for ; Sun, 30 Nov 2025 19:22:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 26202 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 30 Nov 2025 19:22:10 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Robert Clausecker Subject: git: 4a1c7529c96f - main - libc/tests: add test for *_MAX, *_MIN, and *_WIDTH List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: fuz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4a1c7529c96ff54657ef701fa89b92230ee6bac2 Auto-Submitted: auto-generated Date: Sun, 30 Nov 2025 19:22:10 +0000 Message-Id: <692c9962.26202.741eff79@gitrepo.freebsd.org> The branch main has been updated by fuz: URL: https://cgit.FreeBSD.org/src/commit/?id=4a1c7529c96ff54657ef701fa89b92230ee6bac2 commit 4a1c7529c96ff54657ef701fa89b92230ee6bac2 Author: Robert Clausecker AuthorDate: 2025-11-19 19:26:11 +0000 Commit: Robert Clausecker CommitDate: 2025-11-30 19:21:51 +0000 libc/tests: add test for *_MAX, *_MIN, and *_WIDTH This file checks the correctness of the various _MAX, _MIN, and _WIDTH macros defined for the libc types. It assumes that none of the types have padding bits. Approved by: markj (mentor) MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D53831 --- lib/libc/tests/gen/Makefile | 1 + lib/libc/tests/gen/limits_test.c | 101 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 102 insertions(+) diff --git a/lib/libc/tests/gen/Makefile b/lib/libc/tests/gen/Makefile index 8c2151105209..054b1b426b3d 100644 --- a/lib/libc/tests/gen/Makefile +++ b/lib/libc/tests/gen/Makefile @@ -19,6 +19,7 @@ ATF_TESTS_C+= glob2_test .if ${COMPILER_FEATURES:Mblocks} ATF_TESTS_C+= glob_blocks_test .endif +ATF_TESTS_C+= limits_test ATF_TESTS_C+= makecontext_test ATF_TESTS_C+= opendir_test ATF_TESTS_C+= popen_test diff --git a/lib/libc/tests/gen/limits_test.c b/lib/libc/tests/gen/limits_test.c new file mode 100644 index 000000000000..b4e8bf3178f1 --- /dev/null +++ b/lib/libc/tests/gen/limits_test.c @@ -0,0 +1,101 @@ +/* + * Copyright (c) 2025 Robert Clausecker + * + * SPDX-License-Identifier: FreeBSD-2-Clause + */ + +#include +#include +#include +#include +#include + +#include + +/* if this file builds, the unit tests have passed */ +#define CHECK_STYPE(type, TYPE) \ + static_assert(sizeof(type) * CHAR_BIT == TYPE ## _WIDTH, \ + __XSTRING(TYPE) "_WIDTH wrongly defined"); \ + static_assert((1ULL << (TYPE ## _WIDTH - 1)) - 1 == TYPE ## _MAX, \ + __XSTRING(TYPE) "_MAX wrongly defined"); \ + static_assert(TYPE ## _MIN == -TYPE ## _MAX - 1, \ + __XSTRING(TYPE) "_MIN wrongly defined") +#define CHECK_UTYPE(type, TYPE) \ + static_assert(sizeof(type) * CHAR_BIT == TYPE ## _WIDTH, \ + __XSTRING(TYPE) "_WIDTH wrongly defined"); \ + static_assert((type)~0ULL == TYPE ## _MAX, \ + __XSTRING(TYPE) "_MAX wrongly defined"); + +/* primitive types */ +#ifdef __CHAR_UNSIGNED__ +CHECK_UTYPE(char, CHAR); +#else +CHECK_STYPE(char, CHAR); +#endif + +CHECK_STYPE(signed char, SCHAR); +CHECK_STYPE(short, SHRT); +CHECK_STYPE(int, INT); +CHECK_STYPE(long, LONG); +CHECK_STYPE(long long, LLONG); + +CHECK_UTYPE(unsigned char, UCHAR); +CHECK_UTYPE(unsigned short, USHRT); +CHECK_UTYPE(unsigned int, UINT); +CHECK_UTYPE(unsigned long, ULONG); +CHECK_UTYPE(unsigned long long, ULLONG); + +/* fixed-width types */ +CHECK_STYPE(int8_t, INT8); +CHECK_STYPE(int16_t, INT16); +CHECK_STYPE(int32_t, INT32); +CHECK_STYPE(int64_t, INT64); + +CHECK_UTYPE(uint8_t, UINT8); +CHECK_UTYPE(uint16_t, UINT16); +CHECK_UTYPE(uint32_t, UINT32); +CHECK_UTYPE(uint64_t, UINT64); + +CHECK_STYPE(int_least8_t, INT_LEAST8); +CHECK_STYPE(int_least16_t, INT_LEAST16); +CHECK_STYPE(int_least32_t, INT_LEAST32); +CHECK_STYPE(int_least64_t, INT_LEAST64); + +CHECK_UTYPE(uint_least8_t, UINT_LEAST8); +CHECK_UTYPE(uint_least16_t, UINT_LEAST16); +CHECK_UTYPE(uint_least32_t, UINT_LEAST32); +CHECK_UTYPE(uint_least64_t, UINT_LEAST64); + +CHECK_STYPE(int_fast8_t, INT_FAST8); +CHECK_STYPE(int_fast16_t, INT_FAST16); +CHECK_STYPE(int_fast32_t, INT_FAST32); +CHECK_STYPE(int_fast64_t, INT_FAST64); + +CHECK_UTYPE(uint_fast8_t, UINT_FAST8); +CHECK_UTYPE(uint_fast16_t, UINT_FAST16); +CHECK_UTYPE(uint_fast32_t, UINT_FAST32); +CHECK_UTYPE(uint_fast64_t, UINT_FAST64); + +/* other types */ +#if WCHAR_MIN == 0 +CHECK_UTYPE(wchar_t, WCHAR); +#else +CHECK_STYPE(wchar_t, WCHAR); +#endif +CHECK_STYPE(intmax_t, INTMAX); +CHECK_STYPE(intptr_t, INTPTR); +CHECK_STYPE(ptrdiff_t, PTRDIFF); +CHECK_STYPE(wint_t, WINT); +CHECK_STYPE(sig_atomic_t, SIG_ATOMIC); + +CHECK_UTYPE(uintmax_t, UINTMAX); +CHECK_UTYPE(uintptr_t, UINTPTR); +CHECK_UTYPE(size_t, SIZE); + +/* dummy */ +ATF_TP_ADD_TCS(tp) +{ + (void)tp; + + return (atf_no_error()); +} From nobody Sun Nov 30 19:22:11 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dKH3S0f74z6Jh35 for ; Sun, 30 Nov 2025 19:22:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dKH3R5Z11z3g3j for ; Sun, 30 Nov 2025 19:22:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764530531; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cOnPtZUqqH9f70YlqSzxGPKAdhJUBmIimpifzT+uj7A=; b=ZZRLglKjzoEIITLO245wmyTUlL3+SItGP1Gkppq/XLyQWGO98Fg8hLPqY2Pdp6jouKZkkj Jo5ZjrEQrYqqqXobt0ctheCW8bGqFF8jnPORL2vSeueEjgSghQTcRn+zeAIt3ogtSf3RDV b3cPtJ2XyE+MKrrEed65xlfnUMDkvcdAi/Eu2rbTFQ5HirbSpcfdFpOFfifUAvuYHgqy6/ lKHraTrq56+RmN0fdBa7He2Jeth/JI4YL7L66nu2vrc+tAeZae/M3Lzrv3EQieuhbVS+Jq hXFrJlbaXzNa4fZaERXZ6mRGUMHwEfFn48reLzoSYi9TmReMmdG0UGHAAXoRXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764530531; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cOnPtZUqqH9f70YlqSzxGPKAdhJUBmIimpifzT+uj7A=; b=EzKoIrxb90ftsud8SFoWufeMO6tJ66ebAXc5qmXuKcxhq9GBFj/7qrggtgND2WQJukggiI b+57zpOUakbJe8UdEvMQSS9oO78gE3s6atdq5jkWi41xFZiwnq7js470jA/cIw05OmwBVI kHFAqOnKCAkRqvHKIynYr6bGuBeLmdL/Ryd/N7zrIgVAnpjmMQXoYWj11Zn5jaE3JFM52i TK4xRIMI4iBu40BvTrplUle0JrqCMP7tapMcW+vpxwzK23yuE7BjsYp68+/sfetcVUqRB7 Ub+ZyDD2k6LliCDHkoIiZe3QvwoqzqiS+2X911KvLYJgy6FxzPahK3MzkIOoSg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764530531; a=rsa-sha256; cv=none; b=scHK/kWLAC9uCchsYl7K7D/oseDX/WllX4lYBDkFiujWd7meGw0WpUAul7SoJMfHzmHI1/ cDsUFPBDcyl6ME0R9ux5FOgxk3E9fJmCy3785aXMzLtrD0wE1RibsDqO184CaJtzyy2jBU 3LnCNAIk4jAyD0aQaEJ3CHAZBy7JWu9qHJyp5cABOp6QL4063Err5G4KTbwfQGVC705wo7 qF88OFV/LneY9XNFqT681v8u1YJ1KqbVa7vEPWMZwI91x3dSmA50bFlwCnI2M4o0ZaUr/V sA/Hz9qQFOFZ1N/XEFpevDsFpoGsyH0uqlMU27RS/PlRkpnZwz1uBW3HdIAo8Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dKH3R4sgzzpPN for ; Sun, 30 Nov 2025 19:22:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 265f1 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 30 Nov 2025 19:22:11 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Robert Clausecker Subject: git: 6296500a85c8 - main - libc: implement C23 functions List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: fuz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6296500a85c8474e3ff3fe2f8e4a9d56dd0acd64 Auto-Submitted: auto-generated Date: Sun, 30 Nov 2025 19:22:11 +0000 Message-Id: <692c9963.265f1.61704e46@gitrepo.freebsd.org> The branch main has been updated by fuz: URL: https://cgit.FreeBSD.org/src/commit/?id=6296500a85c8474e3ff3fe2f8e4a9d56dd0acd64 commit 6296500a85c8474e3ff3fe2f8e4a9d56dd0acd64 Author: Robert Clausecker AuthorDate: 2025-11-18 17:32:53 +0000 Commit: Robert Clausecker CommitDate: 2025-11-30 19:21:52 +0000 libc: implement C23 functions This new header complies with ISO/IEC 9899:2024 (C23). Contrary to glibc, we do not provide inline definitions in as we expect our system compiler to soon recognise these as builtins anyway. Relnotes: yes MFC after: 1 month Reviewed by: adrian Approved by: markj (mentor) Differential Revision: https://reviews.freebsd.org/D53657 --- include/Makefile | 4 +- include/stdbit.h | 124 +++++++++++++++++++++++++++++ lib/libc/Makefile | 1 + lib/libc/stdbit/Makefile.inc | 19 +++++ lib/libc/stdbit/Symbol.map | 85 ++++++++++++++++++++ lib/libc/stdbit/stdc_bit_ceil.c | 71 +++++++++++++++++ lib/libc/stdbit/stdc_bit_floor.c | 53 ++++++++++++ lib/libc/stdbit/stdc_bit_width.c | 53 ++++++++++++ lib/libc/stdbit/stdc_count_ones.c | 38 +++++++++ lib/libc/stdbit/stdc_count_zeros.c | 38 +++++++++ lib/libc/stdbit/stdc_first_leading_one.c | 57 +++++++++++++ lib/libc/stdbit/stdc_first_leading_zero.c | 57 +++++++++++++ lib/libc/stdbit/stdc_first_trailing_one.c | 52 ++++++++++++ lib/libc/stdbit/stdc_first_trailing_zero.c | 53 ++++++++++++ lib/libc/stdbit/stdc_has_single_bit.c | 38 +++++++++ lib/libc/stdbit/stdc_leading_ones.c | 60 ++++++++++++++ lib/libc/stdbit/stdc_leading_zeros.c | 60 ++++++++++++++ lib/libc/stdbit/stdc_trailing_ones.c | 56 +++++++++++++ lib/libc/stdbit/stdc_trailing_zeros.c | 56 +++++++++++++ 19 files changed, 973 insertions(+), 2 deletions(-) diff --git a/include/Makefile b/include/Makefile index b8cbf0ecc1c2..028e5055cc91 100644 --- a/include/Makefile +++ b/include/Makefile @@ -29,8 +29,8 @@ INCS= a.out.h ar.h assert.h bitstring.h byteswap.h \ pthread_np.h pwd.h ranlib.h readpassphrase.h regex.h \ res_update.h resolv.h runetype.h sched.h \ search.h semaphore.h setjmp.h \ - signal.h spawn.h stab.h stdalign.h stdbool.h stdckdint.h stddef.h \ - stdnoreturn.h stdio.h stdlib.h string.h stringlist.h \ + signal.h spawn.h stab.h stdalign.h stdbit.h stdbool.h stdckdint.h \ + stddef.h stdnoreturn.h stdio.h stdlib.h string.h stringlist.h \ strings.h sysexits.h tar.h termios.h tgmath.h \ time.h timeconv.h timers.h ttyent.h \ uchar.h ulimit.h unistd.h utime.h utmpx.h uuid.h varargs.h \ diff --git a/include/stdbit.h b/include/stdbit.h new file mode 100644 index 000000000000..a529676bed4b --- /dev/null +++ b/include/stdbit.h @@ -0,0 +1,124 @@ +/*- + * Copyright (c) 2025 Robert Clausecker + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#ifndef __STDC_VERSION_STDBIT_H__ +#define __STDC_VERSION_STDBIT_H__ 202311L + +#include + +/* byte order */ +#define __STDC_ENDIAN_LITTLE__ __ORDER_LITTLE_ENDIAN__ +#define __STDC_ENDIAN_BIG__ __ORDER_BIG_ENDIAN__ +#define __STDC_ENDIAN_NATIVE__ __BYTE_ORDER__ + +#define __generic_bitfunc(func, x) (_Generic(x, \ + unsigned char: func ## _uc, \ + unsigned short: func ## _us, \ + unsigned int: func ## _ui, \ + unsigned long: func ## _ul, \ + unsigned long long: func ## _ull)(x)) + +__BEGIN_DECLS +unsigned int stdc_leading_zeros_uc(unsigned char) __pure2; +unsigned int stdc_leading_zeros_us(unsigned short) __pure2; +unsigned int stdc_leading_zeros_ui(unsigned int) __pure2; +unsigned int stdc_leading_zeros_ul(unsigned long) __pure2; +unsigned int stdc_leading_zeros_ull(unsigned long long) __pure2; +#define stdc_leading_zeros(x) __generic_bitfunc(stdc_leading_zeros, x) + +unsigned int stdc_leading_ones_uc(unsigned char) __pure2; +unsigned int stdc_leading_ones_us(unsigned short) __pure2; +unsigned int stdc_leading_ones_ui(unsigned int) __pure2; +unsigned int stdc_leading_ones_ul(unsigned long) __pure2; +unsigned int stdc_leading_ones_ull(unsigned long long) __pure2; +#define stdc_leading_ones(x) __generic_bitfunc(stdc_leading_ones, x) + +unsigned int stdc_trailing_zeros_uc(unsigned char) __pure2; +unsigned int stdc_trailing_zeros_us(unsigned short) __pure2; +unsigned int stdc_trailing_zeros_ui(unsigned int) __pure2; +unsigned int stdc_trailing_zeros_ul(unsigned long) __pure2; +unsigned int stdc_trailing_zeros_ull(unsigned long long) __pure2; +#define stdc_trailing_zeros(x) __generic_bitfunc(stdc_trailing_zeros, x) + +unsigned int stdc_trailing_ones_uc(unsigned char) __pure2; +unsigned int stdc_trailing_ones_us(unsigned short) __pure2; +unsigned int stdc_trailing_ones_ui(unsigned int) __pure2; +unsigned int stdc_trailing_ones_ul(unsigned long) __pure2; +unsigned int stdc_trailing_ones_ull(unsigned long long) __pure2; +#define stdc_trailing_ones(x) __generic_bitfunc(stdc_trailing_ones, x) + +unsigned int stdc_first_leading_zero_uc(unsigned char) __pure2; +unsigned int stdc_first_leading_zero_us(unsigned short) __pure2; +unsigned int stdc_first_leading_zero_ui(unsigned int) __pure2; +unsigned int stdc_first_leading_zero_ul(unsigned long) __pure2; +unsigned int stdc_first_leading_zero_ull(unsigned long long) __pure2; +#define stdc_first_leading_zero(x) __generic_bitfunc(stdc_first_leading_zero, x) + +unsigned int stdc_first_leading_one_uc(unsigned char) __pure2; +unsigned int stdc_first_leading_one_us(unsigned short) __pure2; +unsigned int stdc_first_leading_one_ui(unsigned int) __pure2; +unsigned int stdc_first_leading_one_ul(unsigned long) __pure2; +unsigned int stdc_first_leading_one_ull(unsigned long long) __pure2; +#define stdc_first_leading_one(x) __generic_bitfunc(stdc_first_leading_one, x) + +unsigned int stdc_first_trailing_zero_uc(unsigned char) __pure2; +unsigned int stdc_first_trailing_zero_us(unsigned short) __pure2; +unsigned int stdc_first_trailing_zero_ui(unsigned int) __pure2; +unsigned int stdc_first_trailing_zero_ul(unsigned long) __pure2; +unsigned int stdc_first_trailing_zero_ull(unsigned long long) __pure2; +#define stdc_first_trailing_zero(x) __generic_bitfunc(stdc_first_trailing_zero, x) + +unsigned int stdc_first_trailing_one_uc(unsigned char) __pure2; +unsigned int stdc_first_trailing_one_us(unsigned short) __pure2; +unsigned int stdc_first_trailing_one_ui(unsigned int) __pure2; +unsigned int stdc_first_trailing_one_ul(unsigned long) __pure2; +unsigned int stdc_first_trailing_one_ull(unsigned long long) __pure2; +#define stdc_first_trailing_one(x) __generic_bitfunc(stdc_first_trailing_one, x) + +unsigned int stdc_count_zeros_uc(unsigned char) __pure2; +unsigned int stdc_count_zeros_us(unsigned short) __pure2; +unsigned int stdc_count_zeros_ui(unsigned int) __pure2; +unsigned int stdc_count_zeros_ul(unsigned long) __pure2; +unsigned int stdc_count_zeros_ull(unsigned long long) __pure2; +#define stdc_count_zeros(x) __generic_bitfunc(stdc_count_zeros, x) + +unsigned int stdc_count_ones_uc(unsigned char) __pure2; +unsigned int stdc_count_ones_us(unsigned short) __pure2; +unsigned int stdc_count_ones_ui(unsigned int) __pure2; +unsigned int stdc_count_ones_ul(unsigned long) __pure2; +unsigned int stdc_count_ones_ull(unsigned long long) __pure2; +#define stdc_count_ones(x) __generic_bitfunc(stdc_count_ones, x) + +_Bool stdc_has_single_bit_uc(unsigned char) __pure2; +_Bool stdc_has_single_bit_us(unsigned short) __pure2; +_Bool stdc_has_single_bit_ui(unsigned int) __pure2; +_Bool stdc_has_single_bit_ul(unsigned long) __pure2; +_Bool stdc_has_single_bit_ull(unsigned long long) __pure2; +#define stdc_has_single_bit(x) __generic_bitfunc(stdc_has_single_bit, x) + +unsigned int stdc_bit_width_uc(unsigned char) __pure2; +unsigned int stdc_bit_width_us(unsigned short) __pure2; +unsigned int stdc_bit_width_ui(unsigned int) __pure2; +unsigned int stdc_bit_width_ul(unsigned long) __pure2; +unsigned int stdc_bit_width_ull(unsigned long long) __pure2; +#define stdc_bit_width(x) __generic_bitfunc(stdc_bit_width, x) + +unsigned char stdc_bit_floor_uc(unsigned char) __pure2; +unsigned short stdc_bit_floor_us(unsigned short) __pure2; +unsigned stdc_bit_floor_ui(unsigned int) __pure2; +unsigned long stdc_bit_floor_ul(unsigned long) __pure2; +unsigned long long stdc_bit_floor_ull(unsigned long long) __pure2; +#define stdc_bit_floor(x) __generic_bitfunc(stdc_bit_floor, x) + +unsigned char stdc_bit_ceil_uc(unsigned char) __pure2; +unsigned short stdc_bit_ceil_us(unsigned short) __pure2; +unsigned int stdc_bit_ceil_ui(unsigned int) __pure2; +unsigned long stdc_bit_ceil_ul(unsigned long) __pure2; +unsigned long long stdc_bit_ceil_ull(unsigned long long) __pure2; +#define stdc_bit_ceil(x) __generic_bitfunc(stdc_bit_ceil, x) +__END_DECLS + +#endif /* __STDC_VERSION_STDBIT_H__ */ diff --git a/lib/libc/Makefile b/lib/libc/Makefile index 8705568f6d34..34474cfa9fe4 100644 --- a/lib/libc/Makefile +++ b/lib/libc/Makefile @@ -118,6 +118,7 @@ NOASM= .endif .include "${LIBC_SRCTOP}/regex/Makefile.inc" .include "${LIBC_SRCTOP}/resolv/Makefile.inc" +.include "${LIBC_SRCTOP}/stdbit/Makefile.inc" .include "${LIBC_SRCTOP}/stdio/Makefile.inc" .include "${LIBC_SRCTOP}/stdlib/Makefile.inc" .include "${LIBC_SRCTOP}/stdtime/Makefile.inc" diff --git a/lib/libc/stdbit/Makefile.inc b/lib/libc/stdbit/Makefile.inc new file mode 100644 index 000000000000..2ea96d2b6dfe --- /dev/null +++ b/lib/libc/stdbit/Makefile.inc @@ -0,0 +1,19 @@ +# sources for +.PATH: ${LIBC_SRCTOP}/stdbit + +SRCS+= stdc_bit_ceil.c \ + stdc_bit_floor.c \ + stdc_bit_width.c \ + stdc_count_ones.c \ + stdc_count_zeros.c \ + stdc_first_leading_one.c \ + stdc_first_leading_zero.c \ + stdc_first_trailing_one.c \ + stdc_first_trailing_zero.c \ + stdc_has_single_bit.c \ + stdc_leading_ones.c \ + stdc_leading_zeros.c \ + stdc_trailing_ones.c \ + stdc_trailing_zeros.c + +SYM_MAPS+=${LIBC_SRCTOP}/stdbit/Symbol.map diff --git a/lib/libc/stdbit/Symbol.map b/lib/libc/stdbit/Symbol.map new file mode 100644 index 000000000000..7014d6984c07 --- /dev/null +++ b/lib/libc/stdbit/Symbol.map @@ -0,0 +1,85 @@ +FBSD_1.9 { + stdc_leading_zeros_uc; + stdc_leading_zeros_us; + stdc_leading_zeros_ui; + stdc_leading_zeros_ul; + stdc_leading_zeros_ull; + + stdc_leading_ones_uc; + stdc_leading_ones_us; + stdc_leading_ones_ui; + stdc_leading_ones_ul; + stdc_leading_ones_ull; + + stdc_trailing_zeros_uc; + stdc_trailing_zeros_us; + stdc_trailing_zeros_ui; + stdc_trailing_zeros_ul; + stdc_trailing_zeros_ull; + + stdc_trailing_ones_uc; + stdc_trailing_ones_us; + stdc_trailing_ones_ui; + stdc_trailing_ones_ul; + stdc_trailing_ones_ull; + + stdc_first_leading_zero_uc; + stdc_first_leading_zero_us; + stdc_first_leading_zero_ui; + stdc_first_leading_zero_ul; + stdc_first_leading_zero_ull; + + stdc_first_leading_one_uc; + stdc_first_leading_one_us; + stdc_first_leading_one_ui; + stdc_first_leading_one_ul; + stdc_first_leading_one_ull; + + stdc_first_trailing_zero_uc; + stdc_first_trailing_zero_us; + stdc_first_trailing_zero_ui; + stdc_first_trailing_zero_ul; + stdc_first_trailing_zero_ull; + + stdc_first_trailing_one_uc; + stdc_first_trailing_one_us; + stdc_first_trailing_one_ui; + stdc_first_trailing_one_ul; + stdc_first_trailing_one_ull; + + stdc_count_zeros_uc; + stdc_count_zeros_us; + stdc_count_zeros_ui; + stdc_count_zeros_ul; + stdc_count_zeros_ull; + + stdc_count_ones_uc; + stdc_count_ones_us; + stdc_count_ones_ui; + stdc_count_ones_ul; + stdc_count_ones_ull; + + stdc_has_single_bit_uc; + stdc_has_single_bit_us; + stdc_has_single_bit_ui; + stdc_has_single_bit_ul; + stdc_has_single_bit_ull; + + stdc_bit_width_uc; + stdc_bit_width_us; + stdc_bit_width_ui; + stdc_bit_width_ul; + stdc_bit_width_ull; + + stdc_bit_floor_uc; + stdc_bit_floor_us; + stdc_bit_floor_ui; + stdc_bit_floor_ul; + stdc_bit_floor_ull; + + stdc_bit_ceil_uc; + stdc_bit_ceil_us; + stdc_bit_ceil_ui; + stdc_bit_ceil_ul; + stdc_bit_ceil_ull; +}; diff --git a/lib/libc/stdbit/stdc_bit_ceil.c b/lib/libc/stdbit/stdc_bit_ceil.c new file mode 100644 index 000000000000..2dfd7bbcbea2 --- /dev/null +++ b/lib/libc/stdbit/stdc_bit_ceil.c @@ -0,0 +1,71 @@ +/* + * Copyright (c) 2025 Robert Clausecker + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#include +#include +#include + +/* Ensure we don't shift 1U out of range. */ +static_assert(UCHAR_WIDTH < UINT_WIDTH, + "stdc_bit_ceil_uc needs UCHAR_WIDTH < UINT_WIDTH"); + +unsigned char +stdc_bit_ceil_uc(unsigned char x) +{ + if (x <= 1) + return (1); + + return (1U << (UINT_WIDTH - __builtin_clz(x - 1))); +} + +/* Ensure we don't shift 1U out of range. */ +static_assert(USHRT_WIDTH < UINT_WIDTH, + "stdc_bit_ceil_us needs USHRT_WIDTH < UINT_WIDTH"); + +unsigned short +stdc_bit_ceil_us(unsigned short x) +{ + if (x <= 1) + return (1); + + return (1U << (UINT_WIDTH - __builtin_clz(x - 1))); +} + +unsigned int +stdc_bit_ceil_ui(unsigned int x) +{ + if (x <= 1) + return (1); + + if (x > UINT_MAX/2 + 1) + return (0); + + return (1U << (UINT_WIDTH - __builtin_clz(x - 1))); +} + +unsigned long +stdc_bit_ceil_ul(unsigned long x) +{ + if (x <= 1) + return (1); + + if (x > ULONG_MAX/2 + 1) + return (0); + + return (1UL << (ULONG_WIDTH - __builtin_clzl(x - 1))); +} + +unsigned long long +stdc_bit_ceil_ull(unsigned long long x) +{ + if (x <= 1) + return (1); + + if (x > ULLONG_MAX/2 + 1) + return (0); + + return (1ULL << (ULLONG_WIDTH - __builtin_clzll(x - 1))); +} diff --git a/lib/libc/stdbit/stdc_bit_floor.c b/lib/libc/stdbit/stdc_bit_floor.c new file mode 100644 index 000000000000..0a491d6ec7b3 --- /dev/null +++ b/lib/libc/stdbit/stdc_bit_floor.c @@ -0,0 +1,53 @@ +/* + * Copyright (c) 2025 Robert Clausecker + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#include +#include + +unsigned char +stdc_bit_floor_uc(unsigned char x) +{ + if (x == 0) + return (0); + + return (1U << (UINT_WIDTH - __builtin_clz(x) - 1)); +} + +unsigned short +stdc_bit_floor_us(unsigned short x) +{ + if (x == 0) + return (0); + + return (1U << (UINT_WIDTH - __builtin_clz(x) - 1)); +} + +unsigned int +stdc_bit_floor_ui(unsigned int x) +{ + if (x == 0) + return (0); + + return (1U << (UINT_WIDTH - __builtin_clz(x) - 1)); +} + +unsigned long +stdc_bit_floor_ul(unsigned long x) +{ + if (x == 0) + return (0); + + return (1UL << (ULONG_WIDTH - __builtin_clzl(x) - 1)); +} + +unsigned long long +stdc_bit_floor_ull(unsigned long long x) +{ + if (x == 0) + return (0); + + return (1ULL << (ULLONG_WIDTH - __builtin_clzll(x) - 1)); +} diff --git a/lib/libc/stdbit/stdc_bit_width.c b/lib/libc/stdbit/stdc_bit_width.c new file mode 100644 index 000000000000..e248fae48e9f --- /dev/null +++ b/lib/libc/stdbit/stdc_bit_width.c @@ -0,0 +1,53 @@ +/* + * Copyright (c) 2025 Robert Clausecker + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#include +#include + +unsigned int +stdc_bit_width_uc(unsigned char x) +{ + if (x == 0) + return (0); + + return (UINT_WIDTH - __builtin_clz(x)); +} + +unsigned int +stdc_bit_width_us(unsigned short x) +{ + if (x == 0) + return (0); + + return (UINT_WIDTH - __builtin_clz(x)); +} + +unsigned int +stdc_bit_width_ui(unsigned int x) +{ + if (x == 0) + return (0); + + return (UINT_WIDTH - __builtin_clz(x)); +} + +unsigned int +stdc_bit_width_ul(unsigned long x) +{ + if (x == 0) + return (0); + + return (ULONG_WIDTH - __builtin_clzl(x)); +} + +unsigned int +stdc_bit_width_ull(unsigned long long x) +{ + if (x == 0) + return (0); + + return (ULLONG_WIDTH - __builtin_clzll(x)); +} diff --git a/lib/libc/stdbit/stdc_count_ones.c b/lib/libc/stdbit/stdc_count_ones.c new file mode 100644 index 000000000000..c5198dca84df --- /dev/null +++ b/lib/libc/stdbit/stdc_count_ones.c @@ -0,0 +1,38 @@ +/* + * Copyright (c) 2025 Robert Clausecker + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#include +#include + +unsigned int +stdc_count_ones_uc(unsigned char x) +{ + return (__builtin_popcount(x)); +} + +unsigned int +stdc_count_ones_us(unsigned short x) +{ + return (__builtin_popcount(x)); +} + +unsigned int +stdc_count_ones_ui(unsigned int x) +{ + return (__builtin_popcount(x)); +} + +unsigned int +stdc_count_ones_ul(unsigned long x) +{ + return (__builtin_popcountl(x)); +} + +unsigned int +stdc_count_ones_ull(unsigned long long x) +{ + return (__builtin_popcountll(x)); +} diff --git a/lib/libc/stdbit/stdc_count_zeros.c b/lib/libc/stdbit/stdc_count_zeros.c new file mode 100644 index 000000000000..35db965afcb5 --- /dev/null +++ b/lib/libc/stdbit/stdc_count_zeros.c @@ -0,0 +1,38 @@ +/* + * Copyright (c) 2025 Robert Clausecker + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#include +#include + +unsigned int +stdc_count_zeros_uc(unsigned char x) +{ + return (__builtin_popcount(x ^ UCHAR_MAX)); +} + +unsigned int +stdc_count_zeros_us(unsigned short x) +{ + return (__builtin_popcount(x ^ USHRT_MAX)); +} + +unsigned int +stdc_count_zeros_ui(unsigned int x) +{ + return (__builtin_popcount(~x)); +} + +unsigned int +stdc_count_zeros_ul(unsigned long x) +{ + return (__builtin_popcountl(~x)); +} + +unsigned int +stdc_count_zeros_ull(unsigned long long x) +{ + return (__builtin_popcountll(~x)); +} diff --git a/lib/libc/stdbit/stdc_first_leading_one.c b/lib/libc/stdbit/stdc_first_leading_one.c new file mode 100644 index 000000000000..de436856569f --- /dev/null +++ b/lib/libc/stdbit/stdc_first_leading_one.c @@ -0,0 +1,57 @@ +/* + * Copyright (c) 2025 Robert Clausecker + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#include +#include + +unsigned int +stdc_first_leading_one_uc(unsigned char x) +{ + const int offset = UINT_WIDTH - UCHAR_WIDTH; + + if (x == 0) + return (0); + + return (__builtin_clz(x << offset) + 1); +} + +unsigned int +stdc_first_leading_one_us(unsigned short x) +{ + const int offset = UINT_WIDTH - USHRT_WIDTH; + + if (x == 0) + return (0); + + return (__builtin_clz(x << offset) + 1); +} + +unsigned int +stdc_first_leading_one_ui(unsigned int x) +{ + if (x == 0) + return (0); + + return (__builtin_clz(x) + 1); +} + +unsigned int +stdc_first_leading_one_ul(unsigned long x) +{ + if (x == 0) + return (0); + + return (__builtin_clzl(x) + 1); +} + +unsigned int +stdc_first_leading_one_ull(unsigned long long x) +{ + if (x == 0) + return (0); + + return (__builtin_clzll(x) + 1); +} diff --git a/lib/libc/stdbit/stdc_first_leading_zero.c b/lib/libc/stdbit/stdc_first_leading_zero.c new file mode 100644 index 000000000000..e6609b51b648 --- /dev/null +++ b/lib/libc/stdbit/stdc_first_leading_zero.c @@ -0,0 +1,57 @@ +/* + * Copyright (c) 2025 Robert Clausecker + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#include +#include + +unsigned int +stdc_first_leading_zero_uc(unsigned char x) +{ + const int offset = UINT_WIDTH - UCHAR_WIDTH; + + if (x == UCHAR_MAX) + return (0); + + return (__builtin_clz(~(unsigned int)x << offset) + 1); +} + +unsigned int +stdc_first_leading_zero_us(unsigned short x) +{ + const int offset = UINT_WIDTH - USHRT_WIDTH; + + if (x == USHRT_MAX) + return (0); + + return (__builtin_clz(~(unsigned int)x << offset) + 1); +} + +unsigned int +stdc_first_leading_zero_ui(unsigned int x) +{ + if (x == ~0U) + return (0); + + return (__builtin_clz(~x) + 1); +} + +unsigned int +stdc_first_leading_zero_ul(unsigned long x) +{ + if (x == ~0UL) + return (0); + + return (__builtin_clzl(~x) + 1); +} + +unsigned int +stdc_first_leading_zero_ull(unsigned long long x) +{ + if (x == ~0ULL) + return (0); + + return (__builtin_clzll(~x) + 1); +} diff --git a/lib/libc/stdbit/stdc_first_trailing_one.c b/lib/libc/stdbit/stdc_first_trailing_one.c new file mode 100644 index 000000000000..22972758d25d --- /dev/null +++ b/lib/libc/stdbit/stdc_first_trailing_one.c @@ -0,0 +1,52 @@ +/* + * Copyright (c) 2025 Robert Clausecker + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#include + +unsigned int +stdc_first_trailing_one_uc(unsigned char x) +{ + if (x == 0) + return (0); + + return (__builtin_ctz(x) + 1); +} + +unsigned int +stdc_first_trailing_one_us(unsigned short x) +{ + if (x == 0) + return (0); + + return (__builtin_ctz(x) + 1); +} + +unsigned int +stdc_first_trailing_one_ui(unsigned int x) +{ + if (x == 0) + return (0); + + return (__builtin_ctz(x) + 1); +} + +unsigned int +stdc_first_trailing_one_ul(unsigned long x) +{ + if (x == 0) + return (0); + + return (__builtin_ctzl(x) + 1); +} + +unsigned int +stdc_first_trailing_one_ull(unsigned long long x) +{ + if (x == 0) + return (0); + + return (__builtin_ctzll(x) + 1); +} diff --git a/lib/libc/stdbit/stdc_first_trailing_zero.c b/lib/libc/stdbit/stdc_first_trailing_zero.c new file mode 100644 index 000000000000..27395c6977c3 --- /dev/null +++ b/lib/libc/stdbit/stdc_first_trailing_zero.c @@ -0,0 +1,53 @@ +/* + * Copyright (c) 2025 Robert Clausecker + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#include +#include + +unsigned int +stdc_first_trailing_zero_uc(unsigned char x) +{ + if (x == UCHAR_MAX) + return (0); + + return (__builtin_ctz(~x) + 1); +} + +unsigned int +stdc_first_trailing_zero_us(unsigned short x) +{ + if (x == USHRT_MAX) + return (0); + + return (__builtin_ctz(~x) + 1); +} + +unsigned int +stdc_first_trailing_zero_ui(unsigned int x) +{ + if (x == ~0U) + return (0); + + return (__builtin_ctz(~x) + 1); +} + +unsigned int +stdc_first_trailing_zero_ul(unsigned long x) +{ + if (x == ~0UL) + return (0); + + return (__builtin_ctzl(~x) + 1); +} + +unsigned int +stdc_first_trailing_zero_ull(unsigned long long x) +{ + if (x == ~0ULL) + return (0); + + return (__builtin_ctzll(~x) + 1); +} diff --git a/lib/libc/stdbit/stdc_has_single_bit.c b/lib/libc/stdbit/stdc_has_single_bit.c new file mode 100644 index 000000000000..e5f676265551 --- /dev/null +++ b/lib/libc/stdbit/stdc_has_single_bit.c @@ -0,0 +1,38 @@ +/* + * Copyright (c) 2025 Robert Clausecker + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#include +#include + +bool +stdc_has_single_bit_uc(unsigned char x) +{ + return (x != 0 && (x & x - 1) == 0); +} + +bool +stdc_has_single_bit_us(unsigned short x) +{ + return (x != 0 && (x & x - 1) == 0); +} + +bool +stdc_has_single_bit_ui(unsigned int x) +{ + return (x != 0 && (x & x - 1) == 0); +} + +bool +stdc_has_single_bit_ul(unsigned long x) +{ + return (x != 0 && (x & x - 1) == 0); +} + +bool +stdc_has_single_bit_ull(unsigned long long x) +{ + return (x != 0 && (x & x - 1) == 0); +} diff --git a/lib/libc/stdbit/stdc_leading_ones.c b/lib/libc/stdbit/stdc_leading_ones.c new file mode 100644 index 000000000000..79d3ec7f2065 --- /dev/null +++ b/lib/libc/stdbit/stdc_leading_ones.c @@ -0,0 +1,60 @@ +/* + * Copyright (c) 2025 Robert Clausecker + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#include +#include +#include + +/* Avoid triggering undefined behavior if x == 0. */ +static_assert(UCHAR_WIDTH < UINT_WIDTH, + "stdc_leading_ones_uc needs UCHAR_WIDTH < UINT_WIDTH"); + +unsigned int +stdc_leading_ones_uc(unsigned char x) +{ + const int offset = UINT_WIDTH - UCHAR_WIDTH; + + return (__builtin_clz(~(x << offset))); +} + +/* Avoid triggering undefined behavior if x == 0. */ +static_assert(USHRT_WIDTH < UINT_WIDTH, + "stdc_leading_ones_us needs USHRT_WIDTH < UINT_WIDTH"); + +unsigned int +stdc_leading_ones_us(unsigned short x) +{ + const int offset = UINT_WIDTH - USHRT_WIDTH; + + return (__builtin_clz(~(x << offset))); +} + +unsigned int +stdc_leading_ones_ui(unsigned int x) +{ + if (x == ~0U) + return (UINT_WIDTH); + + return (__builtin_clz(~x)); +} + +unsigned int +stdc_leading_ones_ul(unsigned long x) +{ + if (x == ~0UL) + return (ULONG_WIDTH); + + return (__builtin_clzl(~x)); +} + +unsigned int +stdc_leading_ones_ull(unsigned long long x) +{ + if (x == ~0ULL) + return (ULLONG_WIDTH); + + return (__builtin_clzll(~x)); +} diff --git a/lib/libc/stdbit/stdc_leading_zeros.c b/lib/libc/stdbit/stdc_leading_zeros.c new file mode 100644 index 000000000000..2fdf64ec93d4 --- /dev/null +++ b/lib/libc/stdbit/stdc_leading_zeros.c @@ -0,0 +1,60 @@ +/* + * Copyright (c) 2025 Robert Clausecker + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#include +#include +#include + +/* Offset must be greater than zero. */ +static_assert(UCHAR_WIDTH < UINT_WIDTH, + "stdc_leading_zeros_uc needs UCHAR_WIDTH < UINT_WIDTH"); + +unsigned int +stdc_leading_zeros_uc(unsigned char x) +{ + const int offset = UINT_WIDTH - UCHAR_WIDTH; + + return (__builtin_clz((x << offset) + (1U << (offset - 1)))); +} + +/* Offset must be greater than zero. */ +static_assert(USHRT_WIDTH < UINT_WIDTH, + "stdc_leading_zeros_us needs USHRT_WIDTH < UINT_WIDTH"); + +unsigned int *** 157 LINES SKIPPED *** From nobody Sun Nov 30 19:22:12 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dKH3T2Zskz6Jgwm for ; Sun, 30 Nov 2025 19:22:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dKH3S69LSz3gCq for ; Sun, 30 Nov 2025 19:22:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764530532; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ijxCfLo/t9tGGoFLv0lNOGqZWtEbQXWMZKvRSqmgiPw=; b=NuSIMXluG6k4sXn6iFsrux6bD77/VT1hxIVcFNrHj4bVB+1IZL5l1e8UGRk/DjpeX2zbwL U7mNs+D2PYPbwB8Eba0fE+n7LwZuoWfwF9t2yiIVluuY9oa7akNi5x8ZY0RlFY+GVx55dZ YhMVlL0Wck5FIKoRZQhksXxP/QAI3DZ8kL/P3GZilxj3JkjrdHYpQZrjn0ePhtLjqxnfK8 Y0PVJNS1R+CZj2uuVpSnwd6se7wlYkB38lyAzPhXMF1UeOobzDEK7P8ygrFf4nO1JTmdpb vGF6tgSfyHSPrwixlzxv9XgjjmNw+HxNQzrXPPKVDpMrEG3kb7voYwksb51D8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764530532; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ijxCfLo/t9tGGoFLv0lNOGqZWtEbQXWMZKvRSqmgiPw=; b=PHTUtqotuWU+icpgnDsnnOymmosdaGkvA7DYmR2Wv5nm+6jWhCyFE/2zCsGJ11Ezvd7Z+D /Ss+eRb2uYY2Ui4dC76hks6ntO2SxwF8Dei4Qi25vCzsTjBwieEyxHUrCtA36DqI54tPvS TgE6S64fUlSn5hWe4OqHsvLegwcPSs0/iG2P6q/mwRC0WKO6PCQCWd0oTvlPmaB+rLwUHP KkHNCE6TWXfcSKsq4maQ1h/epmkAeMsFtsPyKq1KNAoWCbb+HtTsO0EcPAO4dy27b4g3me 3/ZQKmr87TLM6IVkm5bU3kPvV9YeBLALtYhpTTuvMww/bkLK0WeTtWXImHmGyw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764530532; a=rsa-sha256; cv=none; b=oT7G/bByEJYqSKiRM9OVO41lo6v3V45LUbHIaXmm1jg/6lKA992IQvKrEO1P5Ygb/c8+FS qKn2A/0Xj6SF5rK0fkVbdCzTmlRVBOCgxHPJUG2OeYIbIUaatlxz5LL3IXpl8TIOzfBVf+ ZY9WxMvEg5j3z2z1s9doRyl+WMWqvn98GO+rO+WQOnve3+rXxIBt+VI+ZI+pAaHQpqMrLn aVjV5sKrS1KtW5O2rsMfLK8ICXt1soba/g13gwlvejpR6ywHjVq3vGpIcOyXX8MbhV+mT5 MXmxN+Mq/jD+yjB1aBSFLN8QTFT7FDwSUzna1LnQZC53+kNf5v8JgpEnIUfSSA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dKH3S5Z9Fznbg for ; Sun, 30 Nov 2025 19:22:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 265f5 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 30 Nov 2025 19:22:12 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Robert Clausecker Subject: git: d39e310c7d6a - main - man/man3: add stdbit.3 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: fuz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d39e310c7d6a42b459aa7919310e3c99cc478d50 Auto-Submitted: auto-generated Date: Sun, 30 Nov 2025 19:22:12 +0000 Message-Id: <692c9964.265f5.3c429860@gitrepo.freebsd.org> The branch main has been updated by fuz: URL: https://cgit.FreeBSD.org/src/commit/?id=d39e310c7d6a42b459aa7919310e3c99cc478d50 commit d39e310c7d6a42b459aa7919310e3c99cc478d50 Author: Robert Clausecker AuthorDate: 2025-11-18 17:33:04 +0000 Commit: Robert Clausecker CommitDate: 2025-11-30 19:21:52 +0000 man/man3: add stdbit.3 This is the overview man page for the functions. Reviewed by: pauamma@gundo.com, adrian Approved by: markj (mentor) MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D53658 --- share/man/man3/Makefile | 1 + share/man/man3/stdbit.3 | 120 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 121 insertions(+) diff --git a/share/man/man3/Makefile b/share/man/man3/Makefile index e5e790194ffc..3fd819814f77 100644 --- a/share/man/man3/Makefile +++ b/share/man/man3/Makefile @@ -31,6 +31,7 @@ MAN= alloca.3 \ snl.3 \ stats.3 \ stdarg.3 \ + stdbit.3 \ stdckdint.3 \ sysexits.3 \ tgmath.3 \ diff --git a/share/man/man3/stdbit.3 b/share/man/man3/stdbit.3 new file mode 100644 index 000000000000..ec647fea4a7f --- /dev/null +++ b/share/man/man3/stdbit.3 @@ -0,0 +1,120 @@ +.\" +.\" Copyright (c) 2025 Robert Clausecker +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.Dd November 9, 2025 +.Dt STDBIT 3 +.Os +.Sh NAME +.Nm stdbit +.Nd bit and byte utilities +.Sh SYNOPSIS +.Lb libc +.In stdbit.h +.Fd #define __STDC_ENDIAN_LITTLE__ +.Fd #define __STDC_ENDIAN_BIG__ +.Fd #define __STDC_ENDIAN_NATIVE__ +.Ft unsigned int +.Fn stdc_count_leading_zeros "value" +.Ft unsigned int +.Fn stdc_count_leading_ones "value" +.Ft unsigned int +.Fn stdc_count_trailing_zeros "value" +.Ft unsigned int +.Fn stdc_count_trailing_ones "value" +.Ft unsigned int +.Fn stdc_first_leading_zero "value" +.Ft unsigned int +.Fn stdc_first_leading_one "value" +.Ft unsigned int +.Fn stdc_first_trailing_zero "value" +.Ft unsigned int +.Fn stdc_first_trailing_one "value" +.Ft unsigned int +.Fn stdc_count_zeros "value" +.Ft unsigned int +.Fn stdc_count_ones "value" +.Ft bool +.Fn stdc_has_single_bit "value" +.Ft unsigned int +.Fn stdc_bit_width "value" +.Ft typeof Ns Pq Em value +.Fn stdc_bit_floor "value" +.Ft typeof Ns Pq Em value +.Fn stdc_bit_ceil "value" +.Sh DESCRIPTION +The +.Dv __STDC_ENDIAN_NATIVE__ +macro describes the byte order or endianness of the machine for which the +program is built. +If the machine has big-endian byte order, this macro is equal to +.Dv __STDC_ENDIAN_BIG__ . +If the machine has little-endian byte order, this macro is equal to +.Dv __STDC_ENDIAN_LITTLE__ . +Otherwise, the macro has a value that is equal to neither. +.Pp +The bit and byte utility functions analyze the bits within a datum. +Each function +.Em func +is provided in five variants +.Nm stdc_ Ns Em func Ns Em _ Ns Em type Ns Pq Em value +where +.Fa value +is of type +.Va unsigned char , +.Va unsigned short , +.Va unsigned int , +.Va unsigned long , +or +.Va unsigned long long +for +.Em type +being +.Sy uc , +.Sy us , +.Sy ui , +.Sy ul , +or +.Sy ull +respectively. +Additionally, for each +.Em func , +a type-generic macro +.Nm stdc_ Ns Em func Ns Pq Em value +that picks the appropriate function +.Nm stdc_ Ns Em func Ns Em _ Ns Em type Ns Pq Em value +based on the type of +.Fa value +is provided. +.Sh SEE ALSO +.Xr arch 7 , +.Xr bitstring 3 , +.Xr ffs 3 , +.Xr fls 3 , +.Xr stdc_count_leading_zeros 3 , +.Xr stdc_count_leading_ones 3 , +.Xr stdc_count_trailing_zeros 3 , +.Xr stdc_count_trailing_ones 3 , +.Xr stdc_first_leading_zero 3 , +.Xr stdc_first_leading_one 3 , +.Xr stdc_first_trailing_zero 3 , +.Xr stdc_first_trailing_one 3 , +.Xr stdc_count_zeros 3 , +.Xr stdc_count_ones 3 , +.Xr stdc_has_single_bit 3 , +.Xr stdc_bit_width 3 , +.Xr stdc_bit_floor 3 , +.Xr stdc_bit_ceil 3 +.Sh STANDARDS +The macros and functions of the +.In stdbit.h +header conform to +.St -isoC-2023 . +.Sh HISTORY +The +.In stdbit.h +header and the macros and functions defined therein where added in +.Fx 15.1. +.Sh AUTHOR +.Ah Robert Clausecker Aq Mt fuz@FreeBSD.org From nobody Sun Nov 30 19:22:13 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dKH3V1N5Qz6Jgwq for ; Sun, 30 Nov 2025 19:22:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dKH3T6xkhz3g9F for ; Sun, 30 Nov 2025 19:22:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764530534; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nopxYZyxSr0pp+mQFy6FXFGSOOSUGBbYpA39PaCBw8c=; b=x/pV3fhh65j11TekeunmVxM4aPmwYM72VzJiCE/9PaAzhIyXs6IYjhPi8oUbt17+E46/C3 ZbaaleROumjnuFErMvPWaK3JR2o2Fd+P12yzrIxTcpB05CcyzYm8NG52S3bW7qwcroO08B F8l1kfo3mUHkND2u4UXwyaL4ivpT9D6SwkGMDYA60/5EwCk5dOWQGKTABelrcW/8SDqjGT ksf2wvgBx0xfzb9pj0USxUa7DYuVk5VOiFQx/4XYRyYnaXtOeVcwgjhxxRy1MJiA9oOT5B FtRaT9339En6VZkleZWBw1sCgvjvsdIXoYF6WpfFnbB2398COQ/DeDZQ5VSSFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764530533; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nopxYZyxSr0pp+mQFy6FXFGSOOSUGBbYpA39PaCBw8c=; b=X9ySp6XuWTNdRz6K/kRddHYmpcT2ZWbj9IhuU9ZwBJCMQp4sOu9xKdYT1IqdIKTWOxnvce FVsI5qnT92OgaNuRJ/0ZnXs3TMrfAEx3Cg7WdlrkqMhHwZg+vtdhuBErj0dH5UxOr/Sydv bTkGMBZR8iycVGUimcc40gkduD73p+acIqvBNu7PoWFV2i7vHPlepnscAyAkdGw3jACTC/ 7evUpz2ps0KTh3fmN0Qfdc96dqszsi//437gInMdaaChQhF7usJss7zDZWVTv492fm44sL Nx7upJP3/6beiG2B957c6bhhlDmDYEoeUG6CpVOQ8mxXBRhNgTs4tDkCyJHmSw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764530533; a=rsa-sha256; cv=none; b=f+CtSdB6sYjRjcxz/qljY+nxX6yQAk+CuUqQxpmp78jHtIv7YtrOKhgjL619rccNTROeIn R3qfSnOfT4b5uhZwXfqQJxDQaTrGgmZ1WTnaCTPCLymcdDeZrLyXZ3GecMHiOR1CeVP8EK 7pDLQCe3MXStJPKuZ3qcrzNKIBBGTvmBECVElCEsCveSUJMAoV5SseUDf0Yx+hTfKZ83iy VWYndRadcrPB9YMIAvAbhJbf3BeZuZZZx3RFS3JwzwwCD5aB9dB2swrTnqPK5szBQ8zKof 271SJ3PNxBCLBrUCxtiV5eZ4E0LaCtS7QhIU3TAiV7Oe1DD+QFRhCu7BtFM/QA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dKH3T6H24zpQx for ; Sun, 30 Nov 2025 19:22:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 253a2 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 30 Nov 2025 19:22:13 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Robert Clausecker Subject: git: d790b16bbf0c - main - libc/stdbit: add man pages for stdbit functions List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: fuz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d790b16bbf0c3055ef00200d01659dfb3c0e5e5e Auto-Submitted: auto-generated Date: Sun, 30 Nov 2025 19:22:13 +0000 Message-Id: <692c9965.253a2.403b89e0@gitrepo.freebsd.org> The branch main has been updated by fuz: URL: https://cgit.FreeBSD.org/src/commit/?id=d790b16bbf0c3055ef00200d01659dfb3c0e5e5e commit d790b16bbf0c3055ef00200d01659dfb3c0e5e5e Author: Robert Clausecker AuthorDate: 2025-11-18 17:31:07 +0000 Commit: Robert Clausecker CommitDate: 2025-11-30 19:21:52 +0000 libc/stdbit: add man pages for stdbit functions This adds man pages for each group of functions in . The man pages have cross references to one-another. Cross references from external man pages to these will be added in a later commit. Reviewed by: pauamma@gundo.com, kib Approved by: markj (mentor) MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D53659 --- lib/libc/stdbit/Makefile.inc | 15 ++++ lib/libc/stdbit/stdc_bit_ceil.3 | 81 +++++++++++++++++++++ lib/libc/stdbit/stdc_bit_floor.3 | 83 ++++++++++++++++++++++ lib/libc/stdbit/stdc_bit_width.3 | 104 +++++++++++++++++++++++++++ lib/libc/stdbit/stdc_count_ones.3 | 85 ++++++++++++++++++++++ lib/libc/stdbit/stdc_count_zeros.3 | 84 ++++++++++++++++++++++ lib/libc/stdbit/stdc_first_leading_one.3 | 93 ++++++++++++++++++++++++ lib/libc/stdbit/stdc_first_leading_zero.3 | 92 ++++++++++++++++++++++++ lib/libc/stdbit/stdc_first_trailing_one.3 | 110 +++++++++++++++++++++++++++++ lib/libc/stdbit/stdc_first_trailing_zero.3 | 93 ++++++++++++++++++++++++ lib/libc/stdbit/stdc_has_single_bit.3 | 98 +++++++++++++++++++++++++ lib/libc/stdbit/stdc_leading_ones.3 | 86 ++++++++++++++++++++++ lib/libc/stdbit/stdc_leading_zeros.3 | 86 ++++++++++++++++++++++ lib/libc/stdbit/stdc_trailing_ones.3 | 86 ++++++++++++++++++++++ lib/libc/stdbit/stdc_trailing_zeros.3 | 87 +++++++++++++++++++++++ 15 files changed, 1283 insertions(+) diff --git a/lib/libc/stdbit/Makefile.inc b/lib/libc/stdbit/Makefile.inc index 2ea96d2b6dfe..fceccb12b589 100644 --- a/lib/libc/stdbit/Makefile.inc +++ b/lib/libc/stdbit/Makefile.inc @@ -17,3 +17,18 @@ SRCS+= stdc_bit_ceil.c \ stdc_trailing_zeros.c SYM_MAPS+=${LIBC_SRCTOP}/stdbit/Symbol.map + +MAN+= stdc_bit_ceil.3 \ + stdc_bit_floor.3 \ + stdc_bit_width.3 \ + stdc_count_ones.3 \ + stdc_count_zeros.3 \ + stdc_first_leading_one.3 \ + stdc_first_leading_zero.3 \ + stdc_first_trailing_one.3 \ + stdc_first_trailing_zero.3 \ + stdc_has_single_bit.3 \ + stdc_leading_ones.3 \ + stdc_leading_zeros.3 \ + stdc_trailing_ones.3 \ + stdc_trailing_zeros.3 diff --git a/lib/libc/stdbit/stdc_bit_ceil.3 b/lib/libc/stdbit/stdc_bit_ceil.3 new file mode 100644 index 000000000000..470b255f471e --- /dev/null +++ b/lib/libc/stdbit/stdc_bit_ceil.3 @@ -0,0 +1,81 @@ +.\" +.\" Copyright (c) 2025 Robert Clausecker +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.Dd November 9, 2025 +.Dt STDC_BIT_CEIL 3 +.Os +.Sh NAME +.Nm stdc_bit_ceil +.Nd round up to the next power of\~2 +.Sh SYNOPSIS +.Lb libc +.In stdbit.h +.Ft unsigned char +.Fn stdc_bit_ceil_uc "unsigned char value" +.Ft unsigned short +.Fn stdc_bit_ceil_us "unsigned short value" +.Ft unsigned int +.Fn stdc_bit_ceil_ui "unsigned int value" +.Ft unsigned long +.Fn stdc_bit_ceil_ul "unsigned long value" +.Ft unsigned long long +.Fn stdc_bit_ceil_ull "unsigned long long value" +.Ft typeof Ns Pq Em value +.Fn stdc_bit_ceil "value" +.Sh DESCRIPTION +The +.Nm stdc_bit_ceil_ Ns Em type Ns () +family of functions rounds +.Fa value +up to the next power of\~2, where +.Fa value +is of type +.Va unsigned char , +.Va unsigned short , +.Va unsigned int , +.Va unsigned long , +or +.Va unsigned long long +for +.Em type +being +.Sy uc , +.Sy us , +.Sy ui , +.Sy ul , +or +.Sy ull +respectively. +The +.Fn stdc_bit_ceil "value" +type-generic macro picks the appropriate +.Nm stdc_bit_ceil_ Ns Em type Ns () +function based on the type of +.Fa value . +.Sh RETURN VALUES +Returns +.Fa value +round up to the next power of\~2. +If this value is not representable, +0\~is returned. +.Sh SEE ALSO +.Xr stdbit 3 , +.Xr stdc_bit_floor 3 +.Sh STANDARDS +The +.Nm stdc_bit_ceil_ Ns Em type Ns () +family of functions and the +.Fn stdc_bit_ceil +type-generic macro conform to +.St -isoC-2023 . +.Sh HISTORY +The +.Nm stdc_bit_ceil_ Ns Em type Ns () +family of functions and the +.Fn stdc_bit_ceil +type-generic macro were added in +.Fx 15.1. +.Sh AUTHOR +.An Robert Clausecker Aq Mt fuz@FreeBSD.org diff --git a/lib/libc/stdbit/stdc_bit_floor.3 b/lib/libc/stdbit/stdc_bit_floor.3 new file mode 100644 index 000000000000..3e90c34f070f --- /dev/null +++ b/lib/libc/stdbit/stdc_bit_floor.3 @@ -0,0 +1,83 @@ +.\" +.\" Copyright (c) 2025 Robert Clausecker +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.Dd November 9, 2025 +.Dt STDC_BIT_FLOOR 3 +.Os +.Sh NAME +.Nm stdc_bit_floor +.Nd round down to the previous power of\~2 +.Sh SYNOPSIS +.Lb libc +.In stdbit.h +.Ft unsigned char +.Fn stdc_bit_floor_uc "unsigned char value" +.Ft unsigned short +.Fn stdc_bit_floor_us "unsigned short value" +.Ft unsigned int +.Fn stdc_bit_floor_ui "unsigned int value" +.Ft unsigned long +.Fn stdc_bit_floor_ul "unsigned long value" +.Ft unsigned long long +.Fn stdc_bit_floor_ull "unsigned long long value" +.Ft typeof Ns Pq Em value +.Fn stdc_bit_floor "value" +.Sh DESCRIPTION +The +.Nm stdc_bit_floor_ Ns Em type Ns () +family of functions rounds +.Fa value +down to the previous power of\~2, where +.Fa value +is of type +.Va unsigned char , +.Va unsigned short , +.Va unsigned int , +.Va unsigned long , +or +.Va unsigned long long +for +.Em type +being +.Sy uc , +.Sy us , +.Sy ui , +.Sy ul , +or +.Sy ull +respectively. +The +.Fn stdc_bit_floor "value" +type-generic macro picks the appropriate +.Nm stdc_bit_floor_ Ns Em type Ns () +function based on the type of +.Fa value . +.Sh RETURN VALUES +Returns +.Fa value +round down to the previous power of\~2. +If +.Fa value +is equal to zero, +zero is returned. +.Sh SEE ALSO +.Xr stdbit 3 , +.Xr stdc_bit_ceil 3 +.Sh STANDARDS +The +.Nm stdc_bit_floor_ Ns Em type Ns () +family of functions and the +.Fn stdc_bit_floor +type-generic macro conform to +.St -isoC-2023 . +.Sh HISTORY +The +.Nm stdc_bit_floor_ Ns Em type Ns () +family of functions and the +.Fn stdc_bit_floor +type-generic macro were added in +.Fx 15.1. +.Sh AUTHOR +.An Robert Clausecker Aq Mt fuz@FreeBSD.org diff --git a/lib/libc/stdbit/stdc_bit_width.3 b/lib/libc/stdbit/stdc_bit_width.3 new file mode 100644 index 000000000000..8d59886818d3 --- /dev/null +++ b/lib/libc/stdbit/stdc_bit_width.3 @@ -0,0 +1,104 @@ +.\" +.\" Copyright (c) 2025 Robert Clausecker +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.Dd November 9, 2025 +.Dt STDC_BIT_WIDTH 3 +.Os +.Sh NAME +.Nm stdc_bit_width +.Nd find the first trailing one in an intege +.Sh SYNOPSIS +.Lb libc +.In stdbit.h +.Ft unsigned int +.Fn stdc_bit_width_uc "unsigned char value" +.Ft unsigned int +.Fn stdc_bit_width_us "unsigned short value" +.Ft unsigned int +.Fn stdc_bit_width_ui "unsigned int value" +.Ft unsigned int +.Fn stdc_bit_width_ul "unsigned long value" +.Ft unsigned int +.Fn stdc_bit_width_ull "unsigned long long value" +.Ft unsigned int +.Fn stdc_bit_width "value" +.Sh DESCRIPTION +The +.Nm stdc_bit_width_ Ns Em type Ns () +family of functions returns the number of bits needed to represent +.Fa value , +where +.Fa value +is of type +.Va unsigned char , +.Va unsigned short , +.Va unsigned int , +.Va unsigned long , +or +.Va unsigned long long +for +.Em type +being +.Sy uc , +.Sy us , +.Sy ui , +.Sy ul , +or +.Sy ull +respectively. +The +.Fn stdc_bit_width "value" +type-generic macro picks the appropriate +.Nm stdc_bit_width_ Ns Em type Ns () +function based on the type of +.Fa value . +.Pp +Functions +.Fn stdc_bit_width_ui , +.Fn stdc_bit_width_ul , +and +.Fn stdc_bit_width_ull +are identical to +.Bx 4.3 +functions +.Xr fls 3 , +.Xr flsl 3 , +and +.Xr flsll 3 +respectively, except for operating on unsigned instead of signed values. +.Sh RETURN VALUES +Returns the least number of bits needed to represent +.Fa value . +If +.Fa value +is zero, the return value is zero. +Otherwise it is +.EQ +1 + \(lf log sub 2 italic value \(rf . +.EN +.Sh SEE ALSO +.Xr bit_fls 3 , +.Xr fls 3 , +.Xr flsl 3 , +.Xr flsll 3 , +.Xr stdbit 3 , +.Xr stdc_count_leading_zeros 3 , +.Xr stdc_first_leading_one 3 +.Sh STANDARDS +The +.Nm stdc_bit_width_ Ns Em type Ns () +family of functions and the +.Fn stdc_bit_width +type-generic macro conform to +.St -isoC-2023 . +.Sh HISTORY +The +.Nm stdc_bit_width_ Ns Em type Ns () +family of functions and the +.Fn stdc_bit_width +type-generic macro were added in +.Fx 15.1. +.Sh AUTHOR +.An Robert Clausecker Aq Mt fuz@FreeBSD.org diff --git a/lib/libc/stdbit/stdc_count_ones.3 b/lib/libc/stdbit/stdc_count_ones.3 new file mode 100644 index 000000000000..6de92216c24b --- /dev/null +++ b/lib/libc/stdbit/stdc_count_ones.3 @@ -0,0 +1,85 @@ +.\" +.\" Copyright (c) 2025 Robert Clausecker +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.Dd November 9, 2025 +.Dt STDC_COUNT_ONES 3 +.Os +.Sh NAME +.Nm stdc_count_ones +.Nd count the ones in an integer +.Sh SYNOPSIS +.Lb libc +.In stdbit.h +.Ft unsigned int +.Fn stdc_count_ones_uc "unsigned char value" +.Ft unsigned int +.Fn stdc_count_ones_us "unsigned short value" +.Ft unsigned int +.Fn stdc_count_ones_ui "unsigned int value" +.Ft unsigned int +.Fn stdc_count_ones_ul "unsigned long value" +.Ft unsigned int +.Fn stdc_count_ones_ull "unsigned long long value" +.Ft unsigned int +.Fn stdc_count_ones "value" +.Sh DESCRIPTION +The +.Nm stdc_count_ones_ Ns Em type Ns () +family of functions returns the number of bits set to\~1 in +.Fa value , +where +.Fa value +is of type +.Va unsigned char , +.Va unsigned short , +.Va unsigned int , +.Va unsigned long , +or +.Va unsigned long long +for +.Em type +being +.Sy uc , +.Sy us , +.Sy ui , +.Sy ul , +or +.Sy ull +respectively. +This is also known as the +.Dq population count +(popcount) or +.Dq Hamming weight +operation. +The +.Fn stdc_count_ones "value" +type-generic macro picks the appropriate +.Nm stdc_count_ones_ Ns Em type Ns () +function based on the type of +.Fa value . +.Sh RETURN VALUES +Returns the number of bits set to\~1 in +.Fa value . +.Sh SEE ALSO +.Xr bit_count 3 , +.Xr stdbit 3 , +.Xr stdc_count_zeros 3 , +.Xr stdc_has_single_bit 3 +.Sh STANDARDS +The +.Nm stdc_count_ones_ Ns Em type Ns () +family of functions and the +.Fn stdc_count_ones +type-generic macro conform to +.St -isoC-2023 . +.Sh HISTORY +The +.Nm stdc_count_ones_ Ns Em type Ns () +family of functions and the +.Fn stdc_count_ones +type-generic macro were added in +.Fx 15.1. +.Sh AUTHOR +.An Robert Clausecker Aq Mt fuz@FreeBSD.org diff --git a/lib/libc/stdbit/stdc_count_zeros.3 b/lib/libc/stdbit/stdc_count_zeros.3 new file mode 100644 index 000000000000..762ba62d3793 --- /dev/null +++ b/lib/libc/stdbit/stdc_count_zeros.3 @@ -0,0 +1,84 @@ +.\" +.\" Copyright (c) 2025 Robert Clausecker +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.Dd November 9, 2025 +.Dt STDC_COUNT_ZEROS 3 +.Os +.Sh NAME +.Nm stdc_count_zeros +.Nd count the zeros in an integer +.Sh SYNOPSIS +.Lb libc +.In stdbit.h +.Ft unsigned int +.Fn stdc_count_zeros_uc "unsigned char value" +.Ft unsigned int +.Fn stdc_count_zeros_us "unsigned short value" +.Ft unsigned int +.Fn stdc_count_zeros_ui "unsigned int value" +.Ft unsigned int +.Fn stdc_count_zeros_ul "unsigned long value" +.Ft unsigned int +.Fn stdc_count_zeros_ull "unsigned long long value" +.Ft unsigned int +.Fn stdc_count_zeros "value" +.Sh DESCRIPTION +The +.Nm stdc_count_zeros_ Ns Em type Ns () +family of functions returns the number of bits set to\~0 in +.Fa value , +where +.Fa value +is of type +.Va unsigned char , +.Va unsigned short , +.Va unsigned int , +.Va unsigned long , +or +.Va unsigned long long +for +.Em type +being +.Sy uc , +.Sy us , +.Sy ui , +.Sy ul , +or +.Sy ull +respectively. +This is also known as the +.Dq population count +(popcount) or +.Dq Hamming weight +of the complement of +.Fa value . +The +.Fn stdc_count_zeros "value" +type-generic macro picks the appropriate +.Nm stdc_count_zeros_ Ns Em type Ns () +function based on the type of +.Fa value . +.Sh RETURN VALUES +Returns the number of bits set to\~0 in +.Fa value . +.Sh SEE ALSO +.Xr stdbit 3 , +.Xr stdc_count_ones 3 +.Sh STANDARDS +The +.Nm stdc_count_zeros_ Ns Em type Ns () +family of functions and the +.Fn stdc_count_zeros +type-generic macro conform to +.St -isoC-2023 . +.Sh HISTORY +The +.Nm stdc_count_zeros_ Ns Em type Ns () +family of functions and the +.Fn stdc_count_zeros +type-generic macro were added in +.Fx 15.1. +.Sh AUTHOR +.An Robert Clausecker Aq Mt fuz@FreeBSD.org diff --git a/lib/libc/stdbit/stdc_first_leading_one.3 b/lib/libc/stdbit/stdc_first_leading_one.3 new file mode 100644 index 000000000000..48f62d997043 --- /dev/null +++ b/lib/libc/stdbit/stdc_first_leading_one.3 @@ -0,0 +1,93 @@ +.\" +.\" Copyright (c) 2025 Robert Clausecker +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.Dd November 9, 2025 +.Dt STDC_FIRST_LEADING_ONE 3 +.Os +.Sh NAME +.Nm stdc_first_leading_one +.Nd find the first leading one in an integer +.Sh SYNOPSIS +.Lb libc +.In stdbit.h +.Ft unsigned int +.Fn stdc_first_leading_one_uc "unsigned char value" +.Ft unsigned int +.Fn stdc_first_leading_one_us "unsigned short value" +.Ft unsigned int +.Fn stdc_first_leading_one_ui "unsigned int value" +.Ft unsigned int +.Fn stdc_first_leading_one_ul "unsigned long value" +.Ft unsigned int +.Fn stdc_first_leading_one_ull "unsigned long long value" +.Ft unsigned int +.Fn stdc_first_leading_one "value" +.Sh DESCRIPTION +The +.Nm stdc_first_leading_one_ Ns Em type Ns () +family of functions returns the index of the most significant set bit in +.Fa value , +where +.Fa value +is of type +.Va unsigned char , +.Va unsigned short , +.Va unsigned int , +.Va unsigned long , +or +.Va unsigned long long +for +.Em type +being +.Sy uc , +.Sy us , +.Sy ui , +.Sy ul , +or +.Sy ull +respectively. +The +.Fn stdc_first_leading_one "value" +type-generic macro picks the appropriate +.Nm stdc_first_leading_one_ Ns Em type Ns () +function based on the type of +.Fa value . +.Sh RETURN VALUES +Returns the index of the most significant set bit in +.Fa value . +The bits are numbered such that the most significant bit has number\~1, +and the least significant bit has number +.Ms w +where +.Ms w +is the number of bits in the type of +.Fa value . +If no bits are set in +.Fa value +(i.\^e.\& +.Fa value +is zero), zero is returned. +.Sh SEE ALSO +.Xr fls 3 , +.Xr stdbit 3 , +.Xr stdc_leading_zeros 3 , +.Xr stdc_first_leading_zero 3 , +.Xr stdc_first_trailing_one 3 +.Sh STANDARDS +The +.Nm stdc_first_leading_one_ Ns Em type Ns () +family of functions and the +.Fn stdc_first_leading_one +type-generic macro conform to +.St -isoC-2023 . +.Sh HISTORY +The +.Nm stdc_first_leading_one_ Ns Em type Ns () +family of functions and the +.Fn stdc_first_leading_one +type-generic macro were added in +.Fx 15.1. +.Sh AUTHOR +.An Robert Clausecker Aq Mt fuz@FreeBSD.org diff --git a/lib/libc/stdbit/stdc_first_leading_zero.3 b/lib/libc/stdbit/stdc_first_leading_zero.3 new file mode 100644 index 000000000000..317b6263acb0 --- /dev/null +++ b/lib/libc/stdbit/stdc_first_leading_zero.3 @@ -0,0 +1,92 @@ +.\" +.\" Copyright (c) 2025 Robert Clausecker +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.Dd November 9, 2025 +.Dt STDC_FIRST_LEADING_ZERO 3 +.Os +.Sh NAME +.Nm stdc_first_leading_zero +.Nd find the first leading zero in an integer +.Sh SYNOPSIS +.Lb libc +.In stdbit.h +.Ft unsigned int +.Fn stdc_first_leading_zero_uc "unsigned char value" +.Ft unsigned int +.Fn stdc_first_leading_zero_us "unsigned short value" +.Ft unsigned int +.Fn stdc_first_leading_zero_ui "unsigned int value" +.Ft unsigned int +.Fn stdc_first_leading_zero_ul "unsigned long value" +.Ft unsigned int +.Fn stdc_first_leading_zero_ull "unsigned long long value" +.Ft unsigned int +.Fn stdc_first_leading_zero "value" +.Sh DESCRIPTION +The +.Nm stdc_first_leading_zero_ Ns Em type Ns () +family of functions returns the index of the most significant clear bit in +.Fa value , +where +.Fa value +is of type +.Va unsigned char , +.Va unsigned short , +.Va unsigned int , +.Va unsigned long , +or +.Va unsigned long long +for +.Em type +being +.Sy uc , +.Sy us , +.Sy ui , +.Sy ul , +or +.Sy ull +respectively. +The +.Fn stdc_first_leading_zero "value" +type-generic macro picks the appropriate +.Nm stdc_first_leading_zero_ Ns Em type Ns () +function based on the type of +.Fa value . +.Sh RETURN VALUES +Returns the index of the most significant clear bit in +.Fa value . +The bits are numbered such that the most significant bit has number\~1, +and the least significant bit has number +.Ms w +where +.Ms w +is the number of bits in the type of +.Fa value . +If no bits are clear in +.Fa value +(i.\^e.\& +.Fa value +is the bitwise complement of zero), zero is returned. +.Sh SEE ALSO +.Xr stdbit 3 , +.Xr stdc_leading_ones 3 , +.Xr stdc_first_leading_ones 3 , +.Xr stdc_first_trailing_zero 3 +.Sh STANDARDS +The +.Nm stdc_first_leading_zero_ Ns Em type Ns () +family of functions and the +.Fn stdc_first_leading_zero +type-generic macro conform to +.St -isoC-2023 . +.Sh HISTORY +The +.Nm stdc_first_leading_zero_ Ns Em type Ns () +family of functions and the +.Fn stdc_first_leading_zero +type-generic macro were added in +.Fx 15.1. +.Sh AUTHOR +.An Robert Clausecker Aq Mt fuz@FreeBSD.org diff --git a/lib/libc/stdbit/stdc_first_trailing_one.3 b/lib/libc/stdbit/stdc_first_trailing_one.3 new file mode 100644 index 000000000000..0b590ac39732 --- /dev/null +++ b/lib/libc/stdbit/stdc_first_trailing_one.3 @@ -0,0 +1,110 @@ +.\" +.\" Copyright (c) 2025 Robert Clausecker +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.Dd November 9, 2025 +.Dt STDC_FIRST_TRAILING_ONE 3 +.Os +.Sh NAME +.Nm stdc_first_trailing_one +.Nd find the first trailing one in an integer +.Sh SYNOPSIS +.Lb libc +.In stdbit.h +.Ft unsigned int +.Fn stdc_first_trailing_one_uc "unsigned char value" +.Ft unsigned int +.Fn stdc_first_trailing_one_us "unsigned short value" +.Ft unsigned int +.Fn stdc_first_trailing_one_ui "unsigned int value" +.Ft unsigned int +.Fn stdc_first_trailing_one_ul "unsigned long value" +.Ft unsigned int +.Fn stdc_first_trailing_one_ull "unsigned long long value" +.Ft unsigned int +.Fn stdc_first_trailing_one "value" +.Sh DESCRIPTION +The +.Nm stdc_first_trailing_one_ Ns Em type Ns () +family of functions returns the index of the least significant set bit in +.Fa value , +where +.Fa value +is of type +.Va unsigned char , +.Va unsigned short , +.Va unsigned int , +.Va unsigned long , +or +.Va unsigned long long +for +.Em type +being +.Sy uc , +.Sy us , +.Sy ui , +.Sy ul , +or +.Sy ull +respectively. +The +.Fn stdc_first_trailing_one "value" +type-generic macro picks the appropriate +.Nm stdc_first_trailing_one_ Ns Em type Ns () +function based on the type of +.Fa value . +.Pp +Functions +.Fn stdc_first_trailing_one_ui , +.Fn stdc_first_trailing_one_ul , +and +.Fn stdc_first_trailing_one_ull +are identical to +.Bx 4.3 +functions +.Xr ffs 3 , +.Xr ffsl 3 , +and +.Xr ffsll 3 +respectively, except for operating on unsigned instead of signed values. +.Sh RETURN VALUES +Returns the index of the least significant set bit in +.Fa value . +The bits are numbered such that the least significant bit has number\~1, +and the most significant bit has number +.Ms w +where +.Ms w +is the number of bits in the type of +.Fa value . +If no bits are set in +.Fa value +(i.\^e.\& +.Fa value +is zero), one is returned. +.Sh SEE ALSO +.Xr bit_ffs 3 , +.Xr ffs 3 , +.Xr ffsl 3 , +.Xr ffsll 3 , +.Xr stdbit 3 , +.Xr stdc_trailing_zeros 3 , +.Xr stdc_first_trailing_zero 3 , +.Xr stdc_first_leading_one 3 +.Sh STANDARDS +The +.Nm stdc_first_trailing_one_ Ns Em type Ns () +family of functions and the +.Fn stdc_first_trailing_one +type-generic macro conform to +.St -isoC-2023 . +.Sh HISTORY +The +.Nm stdc_first_trailing_one_ Ns Em type Ns () +family of functions and the +.Fn stdc_first_trailing_one +type-generic macro were added in +.Fx 15.1. +.Sh AUTHOR +.An Robert Clausecker Aq Mt fuz@FreeBSD.org diff --git a/lib/libc/stdbit/stdc_first_trailing_zero.3 b/lib/libc/stdbit/stdc_first_trailing_zero.3 new file mode 100644 index 000000000000..bc4f7982d765 --- /dev/null +++ b/lib/libc/stdbit/stdc_first_trailing_zero.3 @@ -0,0 +1,93 @@ +.\" +.\" Copyright (c) 2025 Robert Clausecker +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.Dd November 9, 2025 +.Dt STDC_FIRST_TRAILING_ZERO 3 +.Os +.Sh NAME +.Nm stdc_first_trailing_zero +.Nd find the first trailing zero in an integer +.Sh SYNOPSIS +.Lb libc +.In stdbit.h +.Ft unsigned int +.Fn stdc_first_trailing_zero_uc "unsigned char value" +.Ft unsigned int +.Fn stdc_first_trailing_zero_us "unsigned short value" +.Ft unsigned int +.Fn stdc_first_trailing_zero_ui "unsigned int value" +.Ft unsigned int +.Fn stdc_first_trailing_zero_ul "unsigned long value" +.Ft unsigned int +.Fn stdc_first_trailing_zero_ull "unsigned long long value" +.Ft unsigned int +.Fn stdc_first_trailing_zero "value" +.Sh DESCRIPTION +The +.Nm stdc_first_trailing_zero_ Ns Em type Ns () +family of functions returns the index of the least significant clear bit in +.Fa value , +where +.Fa value +is of type +.Va unsigned char , +.Va unsigned short , +.Va unsigned int , +.Va unsigned long , +or +.Va unsigned long long +for +.Em type +being +.Sy uc , +.Sy us , +.Sy ui , +.Sy ul , +or +.Sy ull +respectively. +The +.Fn stdc_first_trailing_zero "value" +type-generic macro picks the appropriate +.Nm stdc_first_trailing_zero_ Ns Em type Ns () +function based on the type of +.Fa value . +.Sh RETURN VALUES +Returns the index of the least significant clear bit in +.Fa value . +The bits are numbered such that the least significant bit has number\~1, +and the most significant bit has number +.Ms w +where +.Ms w +is the number of bits in the type of +.Fa value . +If no bits are clear in +.Fa value +(i.\^e.\& +.Fa value +is the bitwise complement of zero), zero is returned. +.Sh SEE ALSO +.Xr bit_ffc 3 , +.Xr stdbit 3 , +.Xr stdc_trailing_ones 3 , +.Xr stdc_first_trailing_ones 3 , +.Xr stdc_first_leading_zero 3 +.Sh STANDARDS +The +.Nm stdc_first_trailing_zero_ Ns Em type Ns () +family of functions and the +.Fn stdc_first_trailing_zero +type-generic macro conform to +.St -isoC-2023 . +.Sh HISTORY +The +.Nm stdc_first_trailing_zero_ Ns Em type Ns () +family of functions and the +.Fn stdc_first_trailing_zero +type-generic macro were added in +.Fx 15.1. +.Sh AUTHOR +.An Robert Clausecker Aq Mt fuz@FreeBSD.org diff --git a/lib/libc/stdbit/stdc_has_single_bit.3 b/lib/libc/stdbit/stdc_has_single_bit.3 new file mode 100644 index 000000000000..8f82c552216a --- /dev/null +++ b/lib/libc/stdbit/stdc_has_single_bit.3 @@ -0,0 +1,98 @@ +.\" +.\" Copyright (c) 2025 Robert Clausecker +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.Dd November 9, 2025 +.Dt STDC_HAS_SINGLE_BIT 3 +.Os +.Sh NAME +.Nm stdc_has_single_bit +.Nd check for single bit set +.Sh SYNOPSIS +.Lb libc +.In stdbit.h +.Ft bool +.Fn stdc_has_single_bit_uc "unsigned char value" +.Ft bool +.Fn stdc_has_single_bit_us "unsigned short value" +.Ft bool +.Fn stdc_has_single_bit_ui "unsigned int value" +.Ft bool +.Fn stdc_has_single_bit_ul "unsigned long value" +.Ft bool +.Fn stdc_has_single_bit_ull "unsigned long long value" +.Ft bool +.Fn stdc_has_single_bit "value" +.Sh DESCRIPTION +The +.Nm stdc_has_single_bit_ Ns Em type Ns () +family of functions checks if there is exactly one bit +set in +.Fa value , +where +.Fa value +is of type +.Va unsigned char , +.Va unsigned short , +.Va unsigned int , +.Va unsigned long , +or *** 427 LINES SKIPPED *** From nobody Sun Nov 30 19:22:14 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dKH3W4cqCz6Jh01 for ; Sun, 30 Nov 2025 19:22:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dKH3W19XWz3gT0 for ; Sun, 30 Nov 2025 19:22:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764530535; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fZ8Qaj60RmT2Uo5Eevra2MVgvsadf3NIvP/35sZd+pU=; b=cFxa3QT/JuQemEe/Gr6d6o+bF19eWnVSFuGk7Gu+7Yjz6Ui+Z4Y6IwrXLlQxgsEykC1y3o apaEl4+Vzoins1cOHXr7aNRUhqcll1aIMVgE2j8MP08oXuu5SfROyPuoaRpxL71q3XKI9b jhbAG/NklPbz1p8whxmvbWugOQX3wMb7j6e7T0tdBYHRZr0GiZ8rgBZwbYcoc9hIMU/nlX WpQVbZMKZh+6pSkFKBLJQTQYrJmbQsjYf2VX1rablq/RbWqdKb1ECa09U3N7Y09RJwwouK PPq2/Ti/+gwkvBvrfyGoM3FTyaT7IUiAgaGOSnAqpijplcTDQH282wy4YRVg2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764530535; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fZ8Qaj60RmT2Uo5Eevra2MVgvsadf3NIvP/35sZd+pU=; b=yNsW6XTU9u8gQytt+kGeZvW6QTYOaXA3a7PjK+5ltE8qQvpmmd19mxNKhKafWUej1IhLUe eQPDthDkJLm6eo/40AybNJyFdsAG4ahRcx5z3VccOmZDfO996CCWdLCkLK/BS2eZhkHT69 m9l+4+QPdOZpcSGmM0/6NebXjDFIoJsIcfidtHGnjGemGq4OqgPaZtuPoMVYxvOCrXlIHY Rb7RmiuMuYaOXv/A5lsfq7Rf/FLotuyMXvWhnaBj1hn/8Qj4UPoZ/JQnG39PlGV8C943P+ /3NxoyVAXwM6q/HzDH/DJp9RpSfcfTS7JI0wFCTv8yH3bY3guQJxSLAZWjB7lA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764530535; a=rsa-sha256; cv=none; b=ZWiG86hdp8Y3E9yQaZkCgPmD/F1/+0JlNU5b9su6P22a+5rZOOxYnQogUVKb2EnRDrmSXW NWUr9/GRGF5tOsNLs6Exdg2sN3GMPc/twb5vijLeyJT5kfI7AQUDqlQ2wVKFRpfff35ChK rt4xCKme9JZMf455DQ1EHnKbwAPBK2svfD69YxZry5IIH3KsBUonmjnAgt3U4JeDra0qWs AuCIHnzDlQJf+TONyyEiIak0oNq/1eqDIWiKiw/S3FBWdmESZ294nzl6e53cMIGjH0uNXi ZoKX4jMKggxQoHZ+NO7t00XBLSYRIAMcz1NKe5TWJ/YroGoTWzxde1YbQc9Q5w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dKH3W01zGzpGy for ; Sun, 30 Nov 2025 19:22:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 26e27 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 30 Nov 2025 19:22:14 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Robert Clausecker Subject: git: 2fb8cbc6ef1b - main - libc/tests: add stdbit test framework and unit tests List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: fuz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2fb8cbc6ef1b3cc6cd60e5db07f8305623f9b044 Auto-Submitted: auto-generated Date: Sun, 30 Nov 2025 19:22:14 +0000 Message-Id: <692c9966.26e27.70621b5b@gitrepo.freebsd.org> The branch main has been updated by fuz: URL: https://cgit.FreeBSD.org/src/commit/?id=2fb8cbc6ef1b3cc6cd60e5db07f8305623f9b044 commit 2fb8cbc6ef1b3cc6cd60e5db07f8305623f9b044 Author: Robert Clausecker AuthorDate: 2025-11-18 17:33:12 +0000 Commit: Robert Clausecker CommitDate: 2025-11-30 19:21:52 +0000 libc/tests: add stdbit test framework and unit tests This adds unit tests for all 70 functions in . I'm sorry for the test framework, but it makes it so I don't have to write 70 unit tests by hand. Reviewed by: adrian, des Approved by: markj (mentor) MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D53660 --- etc/mtree/BSD.tests.dist | 2 + lib/libc/tests/Makefile | 1 + lib/libc/tests/stdbit/Makefile | 19 +++++ lib/libc/tests/stdbit/stdbit-test-framework.c | 80 ++++++++++++++++++++++ lib/libc/tests/stdbit/stdbit-test-kernel.c | 68 ++++++++++++++++++ lib/libc/tests/stdbit/stdc_bit_ceil_test.c | 20 ++++++ lib/libc/tests/stdbit/stdc_bit_floor_test.c | 25 +++++++ lib/libc/tests/stdbit/stdc_bit_width_test.c | 22 ++++++ lib/libc/tests/stdbit/stdc_count_ones_test.c | 22 ++++++ lib/libc/tests/stdbit/stdc_count_zeros_test.c | 23 +++++++ .../tests/stdbit/stdc_first_leading_one_test.c | 29 ++++++++ .../tests/stdbit/stdc_first_leading_zero_test.c | 30 ++++++++ .../tests/stdbit/stdc_first_trailing_one_test.c | 26 +++++++ .../tests/stdbit/stdc_first_trailing_zero_test.c | 27 ++++++++ lib/libc/tests/stdbit/stdc_has_single_bit_test.c | 21 ++++++ lib/libc/tests/stdbit/stdc_leading_ones_test.c | 26 +++++++ lib/libc/tests/stdbit/stdc_leading_zeros_test.c | 26 +++++++ lib/libc/tests/stdbit/stdc_trailing_ones_test.c | 23 +++++++ lib/libc/tests/stdbit/stdc_trailing_zeros_test.c | 23 +++++++ 19 files changed, 513 insertions(+) diff --git a/etc/mtree/BSD.tests.dist b/etc/mtree/BSD.tests.dist index 0380b925e64c..e2b8c8ede325 100644 --- a/etc/mtree/BSD.tests.dist +++ b/etc/mtree/BSD.tests.dist @@ -382,6 +382,8 @@ .. ssp .. + stdbit + .. stdio .. stdlib diff --git a/lib/libc/tests/Makefile b/lib/libc/tests/Makefile index 975c895770ee..ae8e0e937676 100644 --- a/lib/libc/tests/Makefile +++ b/lib/libc/tests/Makefile @@ -14,6 +14,7 @@ TESTS_SUBDIRS+= resolv TESTS_SUBDIRS+= rpc TESTS_SUBDIRS+= secure TESTS_SUBDIRS+= setjmp +TESTS_SUBDIRS+= stdbit TESTS_SUBDIRS+= stdio TESTS_SUBDIRS+= stdlib TESTS_SUBDIRS+= stdtime diff --git a/lib/libc/tests/stdbit/Makefile b/lib/libc/tests/stdbit/Makefile new file mode 100644 index 000000000000..37450056007a --- /dev/null +++ b/lib/libc/tests/stdbit/Makefile @@ -0,0 +1,19 @@ +# ensure libc functions are tested, not clang's builtins +CFLAGS+= -fno-builtin + +ATF_TESTS_C+= stdc_bit_ceil_test \ + stdc_bit_floor_test \ + stdc_bit_width_test \ + stdc_count_ones_test \ + stdc_count_zeros_test \ + stdc_first_leading_one_test \ + stdc_first_leading_zero_test \ + stdc_first_trailing_one_test \ + stdc_first_trailing_zero_test \ + stdc_has_single_bit_test \ + stdc_leading_ones_test \ + stdc_leading_zeros_test \ + stdc_trailing_ones_test \ + stdc_trailing_zeros_test + +.include diff --git a/lib/libc/tests/stdbit/stdbit-test-framework.c b/lib/libc/tests/stdbit/stdbit-test-framework.c new file mode 100644 index 000000000000..368b38fb4745 --- /dev/null +++ b/lib/libc/tests/stdbit/stdbit-test-framework.c @@ -0,0 +1,80 @@ +/* + * Copyright (c) 2025 Robert Clausecker + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +/* + * Test framework for stdbit functions. + * Requires the following macros to be defined: + * + * FUNCSTEM -- name of the function without type suffix + * MKREFFUNC(name, type) -- macro to generate a reference + * implementation of the function as a static function + * named name with give argument type. + */ + +#include +#include +#include +#include +#include + +#define ATF_TC_WITHOUT_HEAD1(stem, suffix) ATF_TC_WITHOUT_HEAD2(__CONCAT(stem, suffix)) +#define ATF_TC_WITHOUT_HEAD2(case) ATF_TC_WITHOUT_HEAD(case) +#define ATF_TC_BODY1(stem, suffix, tc) ATF_TC_BODY2(__CONCAT(stem, suffix), tc) +#define ATF_TC_BODY2(case, tc) ATF_TC_BODY(case, tc) + +#define SUFFIX _uc +#define TYPE unsigned char +#define TYPE_WIDTH UCHAR_WIDTH +#include "stdbit-test-kernel.c" +#undef TYPE_WIDTH +#undef TYPE +#undef SUFFIX + +#define SUFFIX _us +#define TYPE unsigned short +#define TYPE_WIDTH USHRT_WIDTH +#include "stdbit-test-kernel.c" +#undef TYPE_WIDTH +#undef TYPE +#undef SUFFIX + +#define SUFFIX _ui +#define TYPE unsigned int +#define TYPE_WIDTH UINT_WIDTH +#include "stdbit-test-kernel.c" +#undef TYPE_WIDTH +#undef TYPE +#undef SUFFIX + +#define SUFFIX _ul +#define TYPE unsigned long +#define TYPE_WIDTH ULONG_WIDTH +#include "stdbit-test-kernel.c" +#undef TYPE_WIDTH +#undef TYPE +#undef SUFFIX + +#define SUFFIX _ull +#define TYPE unsigned long long +#define TYPE_WIDTH ULLONG_WIDTH +#include "stdbit-test-kernel.c" +#undef TYPE_WIDTH +#undef TYPE +#undef SUFFIX + +#define ADD_CASE(stem, suffix) ADD_CASE1(__CONCAT(stem, suffix)) +#define ADD_CASE1(case) ATF_TP_ADD_TC(tp, case) + +ATF_TP_ADD_TCS(tp) +{ + ADD_CASE(FUNCSTEM, _uc); + ADD_CASE(FUNCSTEM, _us); + ADD_CASE(FUNCSTEM, _ui); + ADD_CASE(FUNCSTEM, _ul); + ADD_CASE(FUNCSTEM, _ull); + + return (atf_no_error()); +} diff --git a/lib/libc/tests/stdbit/stdbit-test-kernel.c b/lib/libc/tests/stdbit/stdbit-test-kernel.c new file mode 100644 index 000000000000..d584e391ff6f --- /dev/null +++ b/lib/libc/tests/stdbit/stdbit-test-kernel.c @@ -0,0 +1,68 @@ +/* + * Copyright (c) 2025 Robert Clausecker + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +/* + * test kernel for stdbit functions. + * Requires the following macros to be defined: + * + * FUNCSTEM -- stem of the function name + * SUFFIX -- type suffic + * TYPE -- argument type + * MKREFFUNC(ref, type) -- reference function builder + */ + +#define FUNC __CONCAT(FUNCSTEM, SUFFIX) +#define REF __CONCAT(FUNCSTEM, __CONCAT(SUFFIX, _ref)) + +MKREFFUNC(REF, TYPE) + +ATF_TC_WITHOUT_HEAD1(FUNCSTEM, SUFFIX); +ATF_TC_BODY1(FUNCSTEM, SUFFIX, tc) +{ + uintmax_t has, want; + size_t i, j; + TYPE value; + + /* test all single-bit patterns */ + for (i = 0; i < TYPE_WIDTH; i++) { + value = (TYPE)1 << i; + has = FUNC(value); + want = REF(value); + ATF_CHECK_EQ_MSG(has, want, "%s(%#jx) == %#jx != %#jx == %s(%#jx)", + __XSTRING(FUNC), (uintmax_t)value, has, want, __XSTRING(REF), (uintmax_t)value); + } + + /* test all double-bit patterns */ + for (i = 0; i < TYPE_WIDTH; i++) { + for (j = 0; j < i; j++) { + value = (TYPE)1 << i | (TYPE)1 << j; + has = FUNC(value); + want = REF(value); + ATF_CHECK_EQ_MSG(has, want, "%s(%#jx) == %#jx != %#jx == %s(%#jx)", + __XSTRING(FUNC), (uintmax_t)value, has, want, __XSTRING(REF), (uintmax_t)value); + } + } + + /* test all barber-pole patterns */ + value = ~(TYPE)0; + for (i = 0; i < TYPE_WIDTH; i++) { + has = FUNC(value); + want = REF(value); + ATF_CHECK_EQ_MSG(has, want, "%s(%#jx) == %#jx != %#jx == %s(%#jx)", + __XSTRING(FUNC), (uintmax_t)value, has, want, __XSTRING(REF), (uintmax_t)value); + + value = ~value; + has = FUNC(value); + want = REF(value); + ATF_CHECK_EQ_MSG(has, want, "%s(%#jx) == %#jx != %#jx == %s(%#jx)", + __XSTRING(FUNC), (uintmax_t)value, has, want, __XSTRING(REF), (uintmax_t)value); + + value = ~value << 1; + } +} + +#undef REF +#undef FUNC diff --git a/lib/libc/tests/stdbit/stdc_bit_ceil_test.c b/lib/libc/tests/stdbit/stdc_bit_ceil_test.c new file mode 100644 index 000000000000..0495da55c5d9 --- /dev/null +++ b/lib/libc/tests/stdbit/stdc_bit_ceil_test.c @@ -0,0 +1,20 @@ +/* + * Copyright (c) 2025 Robert Clausecker + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#define FUNCSTEM stdc_bit_ceil +#define MKREFFUNC(name, type) \ + static type \ + name(type value) \ + { \ + type ceil = 1; \ + \ + while (ceil < value && ceil != 0) \ + ceil <<= 1; \ + \ + return (ceil); \ + } + +#include "stdbit-test-framework.c" diff --git a/lib/libc/tests/stdbit/stdc_bit_floor_test.c b/lib/libc/tests/stdbit/stdc_bit_floor_test.c new file mode 100644 index 000000000000..a2c5b5f7d8ce --- /dev/null +++ b/lib/libc/tests/stdbit/stdc_bit_floor_test.c @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2025 Robert Clausecker + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#define FUNCSTEM stdc_bit_floor +#define MKREFFUNC(name, type) \ + static type \ + name(type value) \ + { \ + type floor = 1; \ + \ + if (value == 0) \ + return (0); \ + \ + while (value != 1) { \ + floor <<= 1; \ + value >>= 1; \ + } \ + \ + return (floor); \ + } + +#include "stdbit-test-framework.c" diff --git a/lib/libc/tests/stdbit/stdc_bit_width_test.c b/lib/libc/tests/stdbit/stdc_bit_width_test.c new file mode 100644 index 000000000000..bfcb2b3bd779 --- /dev/null +++ b/lib/libc/tests/stdbit/stdc_bit_width_test.c @@ -0,0 +1,22 @@ +/* + * Copyright (c) 2025 Robert Clausecker + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#define FUNCSTEM stdc_bit_width +#define MKREFFUNC(name, type) \ + static unsigned \ + name(type value) \ + { \ + unsigned width = 0; \ + \ + while (value != 0) { \ + value >>= 1; \ + width++; \ + } \ + \ + return (width); \ + } + +#include "stdbit-test-framework.c" diff --git a/lib/libc/tests/stdbit/stdc_count_ones_test.c b/lib/libc/tests/stdbit/stdc_count_ones_test.c new file mode 100644 index 000000000000..9093edde495b --- /dev/null +++ b/lib/libc/tests/stdbit/stdc_count_ones_test.c @@ -0,0 +1,22 @@ +/* + * Copyright (c) 2025 Robert Clausecker + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#define FUNCSTEM stdc_count_ones +#define MKREFFUNC(name, type) \ + static unsigned \ + name(type value) \ + { \ + unsigned count = 0; \ + \ + while (value != 0) { \ + count += value & 1; \ + value >>= 1; \ + } \ + \ + return (count); \ + } + +#include "stdbit-test-framework.c" diff --git a/lib/libc/tests/stdbit/stdc_count_zeros_test.c b/lib/libc/tests/stdbit/stdc_count_zeros_test.c new file mode 100644 index 000000000000..a82de6696a64 --- /dev/null +++ b/lib/libc/tests/stdbit/stdc_count_zeros_test.c @@ -0,0 +1,23 @@ +/* + * Copyright (c) 2025 Robert Clausecker + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#define FUNCSTEM stdc_count_zeros +#define MKREFFUNC(name, type) \ + static unsigned \ + name(type value) \ + { \ + unsigned count = 0; \ + \ + value = ~value; \ + while (value != 0) { \ + count += value & 1; \ + value >>= 1; \ + } \ + \ + return (count); \ + } + +#include "stdbit-test-framework.c" diff --git a/lib/libc/tests/stdbit/stdc_first_leading_one_test.c b/lib/libc/tests/stdbit/stdc_first_leading_one_test.c new file mode 100644 index 000000000000..7312789262ea --- /dev/null +++ b/lib/libc/tests/stdbit/stdc_first_leading_one_test.c @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2025 Robert Clausecker + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#define FUNCSTEM stdc_first_leading_one +#define MKREFFUNC(name, type) \ + static unsigned \ + name(type value) \ + { \ + type bit = 1; \ + unsigned pos = 1; \ + \ + if (value == 0) \ + return (0); \ + \ + while ((type)(bit << 1) != 0) \ + bit <<= 1; \ + \ + while ((bit & value) == 0) { \ + bit >>= 1; \ + pos++; \ + } \ + \ + return (pos); \ + } + +#include "stdbit-test-framework.c" diff --git a/lib/libc/tests/stdbit/stdc_first_leading_zero_test.c b/lib/libc/tests/stdbit/stdc_first_leading_zero_test.c new file mode 100644 index 000000000000..df2a1f4b8673 --- /dev/null +++ b/lib/libc/tests/stdbit/stdc_first_leading_zero_test.c @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2025 Robert Clausecker + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#define FUNCSTEM stdc_first_leading_zero +#define MKREFFUNC(name, type) \ + static unsigned \ + name(type value) \ + { \ + type bit = 1; \ + unsigned pos = 1; \ + \ + value = ~value; \ + if (value == 0) \ + return (0); \ + \ + while ((type)(bit << 1) != 0) \ + bit <<= 1; \ + \ + while ((bit & value) == 0) { \ + bit >>= 1; \ + pos++; \ + } \ + \ + return (pos); \ + } + +#include "stdbit-test-framework.c" diff --git a/lib/libc/tests/stdbit/stdc_first_trailing_one_test.c b/lib/libc/tests/stdbit/stdc_first_trailing_one_test.c new file mode 100644 index 000000000000..43284786cd0e --- /dev/null +++ b/lib/libc/tests/stdbit/stdc_first_trailing_one_test.c @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2025 Robert Clausecker + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#define FUNCSTEM stdc_first_trailing_one +#define MKREFFUNC(name, type) \ + static unsigned \ + name(type value) \ + { \ + type bit = 1; \ + unsigned pos = 1; \ + \ + if (value == 0) \ + return (0); \ + \ + while ((bit & value) == 0) { \ + bit <<= 1; \ + pos++; \ + } \ + \ + return (pos); \ + } + +#include "stdbit-test-framework.c" diff --git a/lib/libc/tests/stdbit/stdc_first_trailing_zero_test.c b/lib/libc/tests/stdbit/stdc_first_trailing_zero_test.c new file mode 100644 index 000000000000..ab2a995dcc86 --- /dev/null +++ b/lib/libc/tests/stdbit/stdc_first_trailing_zero_test.c @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2025 Robert Clausecker + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#define FUNCSTEM stdc_first_trailing_zero +#define MKREFFUNC(name, type) \ + static unsigned \ + name(type value) \ + { \ + type bit = 1; \ + unsigned pos = 1; \ + \ + value = ~value; \ + if (value == 0) \ + return (0); \ + \ + while ((bit & value) == 0) { \ + bit <<= 1; \ + pos++; \ + } \ + \ + return (pos); \ + } + +#include "stdbit-test-framework.c" diff --git a/lib/libc/tests/stdbit/stdc_has_single_bit_test.c b/lib/libc/tests/stdbit/stdc_has_single_bit_test.c new file mode 100644 index 000000000000..3426deccd8d0 --- /dev/null +++ b/lib/libc/tests/stdbit/stdc_has_single_bit_test.c @@ -0,0 +1,21 @@ +/* + * Copyright (c) 2025 Robert Clausecker + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#define FUNCSTEM stdc_has_single_bit +#define MKREFFUNC(name, type) \ + static bool \ + name(type value) \ + { \ + type bit; \ + \ + for (bit = 1; bit != 0; bit <<= 1) \ + if (value == bit) \ + return (true); \ + \ + return (false); \ + } + +#include "stdbit-test-framework.c" diff --git a/lib/libc/tests/stdbit/stdc_leading_ones_test.c b/lib/libc/tests/stdbit/stdc_leading_ones_test.c new file mode 100644 index 000000000000..616b3d5e6279 --- /dev/null +++ b/lib/libc/tests/stdbit/stdc_leading_ones_test.c @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2025 Robert Clausecker + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#define FUNCSTEM stdc_leading_ones +#define MKREFFUNC(name, type) \ + static unsigned \ + name(type value) \ + { \ + type bit = 1; \ + unsigned count = 0; \ + \ + while ((type)(bit << 1) != 0) \ + bit <<= 1; \ + \ + while (bit != 0 && (bit & value) != 0) { \ + bit >>= 1; \ + count++; \ + } \ + \ + return (count); \ + } + +#include "stdbit-test-framework.c" diff --git a/lib/libc/tests/stdbit/stdc_leading_zeros_test.c b/lib/libc/tests/stdbit/stdc_leading_zeros_test.c new file mode 100644 index 000000000000..7c9d26e86456 --- /dev/null +++ b/lib/libc/tests/stdbit/stdc_leading_zeros_test.c @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2025 Robert Clausecker + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#define FUNCSTEM stdc_leading_zeros +#define MKREFFUNC(name, type) \ + static unsigned \ + name(type value) \ + { \ + type bit = 1; \ + unsigned count = 0; \ + \ + while ((type)(bit << 1) != 0) \ + bit <<= 1; \ + \ + while (bit != 0 && (bit & value) == 0) { \ + bit >>= 1; \ + count++; \ + } \ + \ + return (count); \ + } + +#include "stdbit-test-framework.c" diff --git a/lib/libc/tests/stdbit/stdc_trailing_ones_test.c b/lib/libc/tests/stdbit/stdc_trailing_ones_test.c new file mode 100644 index 000000000000..9e261cc543de --- /dev/null +++ b/lib/libc/tests/stdbit/stdc_trailing_ones_test.c @@ -0,0 +1,23 @@ +/* + * Copyright (c) 2025 Robert Clausecker + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#define FUNCSTEM stdc_trailing_ones +#define MKREFFUNC(name, type) \ + static unsigned \ + name(type value) \ + { \ + type bit = 1; \ + unsigned count = 0; \ + \ + while (bit != 0 && (bit & value) != 0) { \ + bit <<= 1; \ + count++; \ + } \ + \ + return (count); \ + } + +#include "stdbit-test-framework.c" diff --git a/lib/libc/tests/stdbit/stdc_trailing_zeros_test.c b/lib/libc/tests/stdbit/stdc_trailing_zeros_test.c new file mode 100644 index 000000000000..81fe11c5c82a --- /dev/null +++ b/lib/libc/tests/stdbit/stdc_trailing_zeros_test.c @@ -0,0 +1,23 @@ +/* + * Copyright (c) 2025 Robert Clausecker + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#define FUNCSTEM stdc_trailing_zeros +#define MKREFFUNC(name, type) \ + static unsigned \ + name(type value) \ + { \ + type bit = 1; \ + unsigned count = 0; \ + \ + while (bit != 0 && (bit & value) == 0) { \ + bit <<= 1; \ + count++; \ + } \ + \ + return (count); \ + } + +#include "stdbit-test-framework.c" From nobody Sun Nov 30 19:22:16 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dKH3X3qnrz6JhC0 for ; Sun, 30 Nov 2025 19:22:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dKH3X1LlVz3g1v for ; Sun, 30 Nov 2025 19:22:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764530536; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RCvy3BSYGZRr87qYhXdEmhFd4+w5pWxQHHK8tA2MwDA=; b=apf6YBxpD4YHlF77dX0Zr5QbL1YNPHyvyf/P1L4ylEgfFxmabSFOEueNusGrQGAhYT8Iq6 DXf2IJFL9NOC9Jj4EoDpTF33F6EpMQfxzJRyRcisbaDdohpx3SxaU1FxnCiNELPJg4hL4V MMG/C9EFXrIrpRNLHD2xVlql2T4jZ5nUajMroq7K3o8ytUC7LKYkYpFJ3E//c6whbxhcNB CvuN95yfUEPPWwjgzvezRtVhysDe3JYhqQTH7BH7zLQswcCFA1Q2EWJBow6puYRVXYGXZI CyaYZIPLWKS/BNgoxEFDajjPpuXmGsND5QvDBUD4NM1cxAr//nmMNHxgyoiThQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764530536; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RCvy3BSYGZRr87qYhXdEmhFd4+w5pWxQHHK8tA2MwDA=; b=tFztXDv0IFM+mPbeaY7p0p6+f4EdU3wOf6TgWzxEhU97iTAcToWzoPvmjS19Dy3QrOqhiH OJZ8utIVhH4kn8sN7T+XPm6DnKhPjpBbRB84+ifihdgYNEJW3oT0YSos8WrUDpRYrovNDb nBINxKrO7QFTNy/8oBS7v5FzdPeR58FQ5wpvkYj1gflGQjY6PolXt6q3TMNhGq9XpqsAOC 69W4qE1C/+W23+Syb7Y+1TqeVT1LhFYyNTrZzsTFOiHHNZttgZyOso99NEUEc7HVPr7dj7 ENmxHyhT4mOBIi5xg25iudf6DLR+vHCP0gGo6gP0pctwCitfO5aWaLnEXgDB5A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764530536; a=rsa-sha256; cv=none; b=dxPnW2QQs/Oj6kglz1j1nxpzIhCJpuqGBiL9XyrKvLi5YAk2Qa+sI3HU4aTkSPP+VWpVFV Zig59cQy0RIwSNXPtL6h7viW07yD/P5u3riM0MWMEMCuobBuuN2Ky4TZB+qjsVZQKB6ZOY S4vLrT2+uPdEBY0+ldZUjwqAfGTIAmH5N3mfTknL1Eq7EYwA8qXupIO0SSkdqW34Bpdap3 wsrtfuyy1PR3mMCwXPB/b1H7JZ7vYPNvnTdvyKbZYF9VRcDVKOSE8YzO5xFKIuOge7QXvO P/wqD8jkXqurBg1zaMAcxH7FYPPku1TyBUfhwvLnIPr0yq4fCeWPmkQuAu63WA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dKH3X0nfqzp5j for ; Sun, 30 Nov 2025 19:22:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 25842 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 30 Nov 2025 19:22:16 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Robert Clausecker Subject: git: 5bfdb66ad985 - main - man/man3: add cross references to stdbit(3) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: fuz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5bfdb66ad985774b123ecd0cadee65c071b7ded0 Auto-Submitted: auto-generated Date: Sun, 30 Nov 2025 19:22:16 +0000 Message-Id: <692c9968.25842.1f2e5ea7@gitrepo.freebsd.org> The branch main has been updated by fuz: URL: https://cgit.FreeBSD.org/src/commit/?id=5bfdb66ad985774b123ecd0cadee65c071b7ded0 commit 5bfdb66ad985774b123ecd0cadee65c071b7ded0 Author: Robert Clausecker AuthorDate: 2025-11-10 09:43:37 +0000 Commit: Robert Clausecker CommitDate: 2025-11-30 19:21:52 +0000 man/man3: add cross references to stdbit(3) Add cross references to relevant stdbit man pages Approved by: markj (mentor) MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D53661 --- lib/libc/string/ffs.3 | 2 ++ share/man/man3/bitstring.3 | 1 + share/man/man3/intro.3 | 11 +++++++++-- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/lib/libc/string/ffs.3 b/lib/libc/string/ffs.3 index 1cca54c0b30b..14a64126e692 100644 --- a/lib/libc/string/ffs.3 +++ b/lib/libc/string/ffs.3 @@ -79,6 +79,8 @@ A return value of zero from any of these functions means that the argument was zero. .Sh SEE ALSO .Xr bitstring 3 , +.Xr stdc_first_trailing_one 3 , +.Xr stdc_trailing_zeros 3 , .Xr bitset 9 .Sh STANDARDS The diff --git a/share/man/man3/bitstring.3 b/share/man/man3/bitstring.3 index 07558bd41ec3..87ba9a24a1b5 100644 --- a/share/man/man3/bitstring.3 +++ b/share/man/man3/bitstring.3 @@ -461,6 +461,7 @@ make_lpr_available() .Ed .Sh SEE ALSO .Xr malloc 3 , +.Xr stdbit 3 , .Xr bitset 9 .Sh HISTORY The diff --git a/share/man/man3/intro.3 b/share/man/man3/intro.3 index 0cecdcab4069..952183d7dd2d 100644 --- a/share/man/man3/intro.3 +++ b/share/man/man3/intro.3 @@ -24,7 +24,7 @@ .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. -.Dd November 27, 2024 +.Dd November 10, 2025 .Dt INTRO 3 .Os .Sh NAME @@ -72,13 +72,20 @@ see .It database routines see .Xr db 3 -.It bit operators +.It bit string operators see .Xr bitstring 3 +.It bit and byte utilities +see +.Xr stdbit 3 .It string operators see .Xr string 3 +and +.Xr bstring 3 .It character tests and character operators +see +.Xr ctype 3 .It storage allocation see .Xr mpool 3